| Back to the Main Page. | ac_define_dir |
Download the M4 Source. |
AC_DEFINE_DIR(VARNAME, DIR [, DESCRIPTION])
1.2 (2003/10/28) 0.5.57 : Miscellaneous
Guido Draheim <guidod@gmx.de>, original by Alexandre Oliva
This macro _AC_DEFINEs VARNAME to the expansion of the DIR variable, taking care of fixing up ${prefix} and such.
VARNAME is offered as both a C preprocessor symbol, and an output variable.
Note that the 3 argument form is only supported with autoconf 2.13 and later (i.e. only where _AC_DEFINE supports 3 arguments).
Examples:
AC_DEFINE_DIR(DATADIR, datadir)
AC_DEFINE_DIR(PROG_PATH, bindir, [Location of installed binaries])
AC_DEFUN([AC_DEFINE_DIR], [
test "x$prefix" = xNONE && prefix="$ac_default_prefix"
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
ac_define_dir=`eval echo [$]$2`
ac_define_dir=`eval echo [$]ac_define_dir`
$1="$ac_define_dir"
AC_SUBST($1)
ifelse($3, ,
AC_DEFINE_UNQUOTED($1, "$ac_define_dir"),
AC_DEFINE_UNQUOTED($1, "$ac_define_dir", $3))
])