comparison mcabber/macros/define_dir.m4 @ 881:618967a008a2

Try to fix autoconf setup
author Mikael Berthe <mikael@lilotux.net>
date Sat, 27 May 2006 17:35:19 +0200
parents
children
comparison
equal deleted inserted replaced
880:ea983a945eba 881:618967a008a2
1 dnl define_dir.m4
2 dnl http://autoconf-archive.cryp.to/ac_define_dir.html
3
4 # AC_DEFINE_DIR(VARNAME, DIR [, DESCRIPTION])
5 # This macro sets VARNAME to the expansion of the DIR variable, taking care
6 # of fixing up ${prefix} and such.
7 # VARNAME is then offered as both an output variable and a C preprocessor
8 # symbol.
9
10 # Authors
11 # Stepan Kasal <kasal@ucw.cz>, Andreas Schwab <schwab@suse.de>,
12 # Guido Draheim <guidod@gmx.de>, Alexandre Oliva
13 # (Slightly modified -- Mikael Berthe)
14
15 AC_DEFUN([AC_DEFINE_DIR], [
16 prefix_NONE=
17 exec_prefix_NONE=
18 test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix
19 test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix
20 dnl In Autoconf 2.60, ${datadir} refers to ${datarootdir}, which in turn
21 dnl refers to ${prefix}. Thus we have to use `eval' twice.
22 ac_define_dir=`eval echo [$]$2`
23 ac_define_dir=`eval echo [$]ac_define_dir`
24 AC_SUBST($1, "$ac_define_dir")
25 ifelse($3, ,
26 AC_DEFINE_UNQUOTED($1, "$ac_define_dir"),
27 AC_DEFINE_UNQUOTED($1, "$ac_define_dir", $3))
28 test "$prefix_NONE" && prefix=NONE
29 test "$exec_prefix_NONE" && exec_prefix=NONE
30 ])