import of rt 3.0.4
[freeside.git] / rt / m4 / rt_subst_expanded_arg.m4
diff --git a/rt/m4/rt_subst_expanded_arg.m4 b/rt/m4/rt_subst_expanded_arg.m4
new file mode 100644 (file)
index 0000000..02002b0
--- /dev/null
@@ -0,0 +1,14 @@
+dnl
+dnl @synopsis  RT_SUBST_EXPANDED_ARG(var)
+dnl
+dnl Export (via AC_SUBST) a given variable, along with an expanded
+dnl version of the variable (same name, but with exp_ prefix).
+dnl
+dnl This code is heavily borrowed *cough* from the Apache 2 source.
+dnl
+
+AC_DEFUN([RT_SUBST_EXPANDED_ARG],[
+       RT_EXPAND_VAR(exp_$1, [$]$1)
+       AC_SUBST($1)
+       AC_SUBST(exp_$1)
+])