| 1 |
dnl /usr/share/aclocal/guidod-cvs/ax_expand_prefix.m4 |
| 2 |
dnl @synopsis AX_EXPAND_PREFIX |
| 3 |
dnl |
| 4 |
dnl when $prefix and $exec_prefix are still set to NONE then set them |
| 5 |
dnl to the usual default values - being based on $ac_default_prefix. - |
| 6 |
dnl this macro can be AC_REQUIREd by other macros that need to compute |
| 7 |
dnl values for installation directories. It has been observed that it |
| 8 |
dnl was done wrong over and over again, so this is a bit more safe to |
| 9 |
dnl do. |
| 10 |
dnl |
| 11 |
dnl remember - setting exec_prefix='${prefix}' needs you interpolate |
| 12 |
dnl directories multiple times, it is not sufficient to just say |
| 13 |
dnl MYVAR="${datadir}/putter" but you do have to run `eval` a few |
| 14 |
dnl times, sth. like MYVAR=`eval "echo \"$MYVAR\""` done atleast two |
| 15 |
dnl times. |
| 16 |
dnl |
| 17 |
dnl The implementation of this macro simply picks up the lines that |
| 18 |
dnl would be run at the start of AC_OUTPUT anyway to set the |
| 19 |
dnl prefix/exec_prefix defaults. Between AC_INIT and the first command |
| 20 |
dnl to AC_REQUIRE this macro you can set the two variables to something |
| 21 |
dnl explicit instead. Probably, any command to compute installation |
| 22 |
dnl directories should be run _after_ AM_INIT_AUTOMAKE |
| 23 |
dnl |
| 24 |
dnl @category Misc |
| 25 |
dnl @author Guido U. Draheim <[email protected]> |
| 26 |
dnl @version 2005-01-21 |
| 27 |
dnl @license GPLWithACException |
| 28 |
|
| 29 |
AC_DEFUN([AX_EXPAND_PREFIX],[dnl |
| 30 |
# The prefix default can be set in configure.ac (otherwise it is /usr/local) |
| 31 |
test "x$prefix" = xNONE && prefix=$ac_default_prefix |
| 32 |
# Let make expand exec_prefix. Allows to override the makevar 'prefix' later |
| 33 |
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' |
| 34 |
]) |
| 35 |
|