Debian Codegraph @

common/ac_define_dir.m4

raw
1 dnl @synopsis AC_DEFINE_DIR(VARNAME, DIR [, DESCRIPTION])
2 dnl
3 dnl This macro sets VARNAME to the expansion of the DIR variable,
4 dnl taking care of fixing up ${prefix} and such.
5 dnl
6 dnl VARNAME is then offered as both an output variable and a C
7 dnl preprocessor symbol.
8 dnl
9 dnl Modified by Mark Hessling to fix eval bug
10 dnl
11 dnl Example:
12 dnl
13 dnl AC_DEFINE_DIR([DATADIR], [datadir], [Where data are placed to.])
14 dnl
15 dnl @category Misc
16 dnl @author Stepan Kasal <[email protected]>
17 dnl @author Andreas Schwab <[email protected]>
18 dnl @author Guido U. Draheim <[email protected]>
19 dnl @author Alexandre Oliva
20 dnl @version 2006-10-13
21 dnl @license AllPermissive
22
23 AC_DEFUN([AC_DEFINE_DIR], [
24 prefix_NONE=
25 exec_prefix_NONE=
26 test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix
27 test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix
28 dnl In Autoconf 2.60, ${datadir} refers to ${datarootdir}, which in turn
29 dnl refers to ${prefix}. Thus we have to use `eval' twice.
30 eval ac_define_dir="\"$2\""
31 eval ac_define_dir="\"$ac_define_dir\""
32 AC_SUBST($1, "$ac_define_dir")
33 AC_DEFINE_UNQUOTED($1, "$ac_define_dir", [$3])
34 test "$prefix_NONE" && prefix=NONE
35 test "$exec_prefix_NONE" && exec_prefix=NONE
36 ])
37