File: ac_subst_dir.m4

package info (click to toggle)
autoconf-archive 20060312-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 4,180 kB
  • ctags: 13
  • sloc: sh: 455; makefile: 44
file content (32 lines) | stat: -rw-r--r-- 967 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
dnl @synopsis AC_SUBST_DIR(VARNAME, [DIR])
dnl
dnl @obsoleted The macro AC_DEFINE_DIR provides this functionality directly now.
dnl
dnl This macro substitutes (with AC_SUBST) VARNAME with the expansion
dnl of itself or the DIR variable if specified, taking care of fixing
dnl up ${prefix} and such.
dnl
dnl Side effect: VARNAME is replaced with the expansion.
dnl
dnl AC_SUBST_DIR bases on Alexandre Oliva's AC_DEFINE_DIR macro.
dnl
dnl Examples:
dnl
dnl    AC_SUBST_DIR(DATADIR)
dnl
dnl @category Obsolete
dnl @author Stepan Kasal <kasal@ucw.cz>
dnl @author Mathias Hasselmann <mathias.hasselmann@gmx.de>
dnl @version 2005-07-29
dnl @license AllPermissive

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)
])