aboutsummaryrefslogtreecommitdiffstats
path: root/m4/ac_expand_dir.m4
diff options
context:
space:
mode:
Diffstat (limited to 'm4/ac_expand_dir.m4')
-rw-r--r--m4/ac_expand_dir.m414
1 files changed, 14 insertions, 0 deletions
diff --git a/m4/ac_expand_dir.m4 b/m4/ac_expand_dir.m4
new file mode 100644
index 000000000..b5599a074
--- /dev/null
+++ b/m4/ac_expand_dir.m4
@@ -0,0 +1,14 @@
+dnl AC_EXPAND_DIR(VARNAME, DIR)
+dnl expands occurrences of ${prefix} and ${exec_prefix} in the given DIR,
+dnl and assigns the resulting string to VARNAME
+dnl example: AC_DEFINE_DIR(DATADIR, "$datadir")
+dnl by Alexandre Oliva <oliva@dcc.unicamp.br>
+AC_DEFUN([AC_EXPAND_DIR], [
+ $1=$2
+ $1=`(
+ test "x$prefix" = xNONE && prefix="$ac_default_prefix"
+ test "x$exec_prefix" = xNONE && exec_prefix="${prefix}"
+ eval echo \""[$]$1"\"
+ )`
+])
+