| ---
tdp_expand_dir.m4 (1080B)
---
1 dnl DP_EXPAND_DIR(VARNAME, DIR)
2 dnl expands occurrences of ${prefix} and ${exec_prefix} in the given DIR,
3 dnl and assigns the resulting string to VARNAME
4 dnl example: DP_EXPAND_DIR(LOCALEDIR, "$datadir/locale")
5 dnl eg, then: AC_DEFINE_UNQUOTED(LOCALEDIR, "$LOCALEDIR")
6 dnl by Alexandre Oliva
7 dnl from http://www.cygnus.com/ml/automake/1998-Aug/0040.html
8 dnl Modified by Ben Webb, 2013, to perform three expansions; this
9 dnl handles the case where DIR is something like ${datadir}
10 dnl (first expansion -> ${prefix}/share,
11 dnl second expansion -> /usr/local/share)
12 AC_DEFUN([DP_EXPAND_DIR], [
13 $1=$2
14 $1=`(
15 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
16 test "x$exec_prefix" = xNONE && exec_prefix="${prefix}"
17 eval echo \""[$]$1"\"
18 )`
19 $1=`(
20 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
21 test "x$exec_prefix" = xNONE && exec_prefix="${prefix}"
22 eval echo \""[$]$1"\"
23 )`
24 $1=`(
25 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
26 test "x$exec_prefix" = xNONE && exec_prefix="${prefix}"
27 eval echo \""[$]$1"\"
28 )`
29 ]) |