Download M4 Source Macro History Category Index

ac_subst_dir

Obsolete Macro

The macro AC_DEFINE_DIR provides this functionality directly now.

Synopsis

AC_SUBST_DIR(VARNAME, [DIR])

Description

This macro substitutes (with AC_SUBST) VARNAME with the expansion of itself or the DIR variable if specified, taking care of fixing up ${prefix} and such.

Side effect: VARNAME is replaced with the expansion.

AC_SUBST_DIR bases on Alexandre Oliva's AC_DEFINE_DIR macro.

Examples:

   AC_SUBST_DIR(DATADIR)

Authors

Stepan Kasal <kasal@ucw.cz> and Mathias Hasselmann <mathias.hasselmann@gmx.de>.

Last Modified

2005-07-29

M4 Source Code

AC_DEFUN([AC_SUBST_DIR], [
        ifelse($2,,,$1="[$]$2")
        $1=`(
            test "x$prefix" = xNONE && prefix="$ac_default_prefix"
            test "x$exec_prefix" = xNONE && exec_prefix="${prefix}"
            eval $1=\""[$]$1"\"
            eval echo \""[$]$1"\"
        )`
        AC_SUBST($1)
])

License

Copyright © 2005 Stepan Kasal <kasal@ucw.cz>
Copyright © 2005 Mathias Hasselmann <mathias.hasselmann@gmx.de>

Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved.