1 ##### http://autoconf-archive.cryp.to/ac_define_dir.html
5 # AC_DEFINE_DIR(VARNAME, DIR [, DESCRIPTION])
9 # This macro sets VARNAME to the expansion of the DIR variable,
10 # taking care of fixing up ${prefix} and such.
12 # VARNAME is then offered as both an output variable and a C
13 # preprocessor symbol.
17 # AC_DEFINE_DIR([DATADIR], [datadir], [Where data are placed to.])
25 # Copyright (c) 2006 Stepan Kasal <kasal@ucw.cz>
26 # Copyright (c) 2006 Andreas Schwab <schwab@suse.de>
27 # Copyright (c) 2006 Guido U. Draheim <guidod@gmx.de>
28 # Copyright (c) 2006 Alexandre Oliva
30 # Copying and distribution of this file, with or without
31 # modification, are permitted in any medium without royalty provided
32 # the copyright notice and this notice are preserved.
34 AC_DEFUN([AC_DEFINE_DIR], [
37 test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix
38 test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix
39 dnl In Autoconf 2.60, ${datadir} refers to ${datarootdir}, which in turn
40 dnl refers to ${prefix}. Thus we have to use `eval' twice.
41 eval ac_define_dir="\"[$]$2\""
42 eval ac_define_dir="\"$ac_define_dir\""
43 AC_SUBST($1, "$ac_define_dir")
44 AC_DEFINE_UNQUOTED($1, "$ac_define_dir", [$3])
45 test "$prefix_NONE" && prefix=NONE
46 test "$exec_prefix_NONE" && exec_prefix=NONE