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
6 AC_DEFUN([AS_AC_EXPAND],
10 dnl first expand prefix and exec_prefix if necessary
12 exec_prefix_save=$exec_prefix
13 dnl if no prefix given, then use /usr/local, the default prefix
14 if test "x$prefix" = "xNONE"; then
15 prefix=$ac_default_prefix
17 dnl if no exec_prefix given, then use prefix
18 if test "x$exec_prefix" = "xNONE"; then
22 dnl loop until it doesn't change anymore
24 new_full_var="`eval echo $full_var`"
25 if test "x$new_full_var"="x$full_var"; then break; fi
26 full_var=$new_full_var
29 full_var=$new_full_var
30 AC_SUBST([$1], "$full_var")
31 dnl restore prefix and exec_prefix
33 exec_prefix=$exec_prefix_save