1 dnl AS_AC_EXPAND(VAR, CONFIGURE_VAR)
4 dnl AS_AC_EXPAND(SYSCONFDIR, $sysconfdir)
5 dnl will set SYSCONFDIR to /usr/local/etc if prefix=/usr/local
7 AC_DEFUN([AS_AC_EXPAND],
12 dnl first expand prefix and exec_prefix if necessary
14 exec_prefix_save=$exec_prefix
16 dnl if no prefix given, then use /usr/local, the default prefix
17 if test "x$prefix" = "xNONE"; then
18 prefix=$ac_default_prefix
20 dnl if no exec_prefix given, then use prefix
21 if test "x$exec_prefix" = "xNONE"; then
26 dnl loop until it doesn't change anymore
28 new_full_var="`eval echo $full_var`"
29 dnl if test "x$new_full_var" = "x$full_var"; then
30 if test "x${new_full_var:0:1}" != "x\$"; then
33 full_var=$new_full_var
37 full_var=$new_full_var
38 AC_SUBST([$1], "$full_var")
40 dnl restore prefix and exec_prefix
42 exec_prefix=$exec_prefix_save