1dnl FC_EXPAND_DIR(VARNAME, DIR) 2dnl expands occurrences of ${prefix} and ${exec_prefix} in the given DIR, 3dnl and assigns the resulting string to VARNAME 4dnl example: FC_EXPAND_DIR(LOCALEDIR, "$datadir/locale") 5dnl eg, then: AC_DEFINE_UNQUOTED(LOCALEDIR, "$LOCALEDIR") 6dnl by Alexandre Oliva 7dnl from http://www.cygnus.com/ml/automake/1998-Aug/0040.html 8dnl GCS: I stole this from freeciv. 9AC_DEFUN(FC_EXPAND_DIR, [ 10 $1=$2 11 $1=`( 12 test "x$prefix" = xNONE && prefix="$ac_default_prefix" 13 test "x$exec_prefix" = xNONE && exec_prefix="${prefix}" 14 eval echo \""[$]$1"\" 15 )` 16]) 17