|
From: | Akim Demaille |
Subject: | Re: Sane way of making installation paths available to C ? |
Date: | Fri, 28 Feb 2003 10:56:14 +0100 |
User-agent: | Gnus/5.090015 (Oort Gnus v0.15) Emacs/21.2 |
| Is there some relatively sane way of making stuff like $bindir path | available to C programs (via config.h preferably) ? I'm entirely sure | I'm not the only one who's had to solve this problem a number of times. | | Currently we have (hold your bags nearby) : | | if test "$prefix" = "NONE"; then | prefix="$ac_default_prefix" | fi | if test "$exec_prefix" = "NONE"; then | exec_prefix="$prefix" | fi | if test "$bindir" = "NONE"; then | bindir="$prefix/bin" | fi | if test "$datadir" = "NONE"; then | datadir="$prefix/share" | fi | OP_DATADIR=`eval echo "$datadir/$PACKAGE/"` | OP_BINDIR=`eval echo "$bindir/"` | AC_SUBST(OP_BINDIR) | AC_SUBST(OP_DATADIR) | | into a version.h file. See Autoconf's documentation. Amusingly someone spent some time making an FAQ. http://www.gnu.org/manual/autoconf/html_chapter/autoconf_17.html#SEC179
[Prev in Thread] | Current Thread | [Next in Thread] |