[alsa-io] remove ALSASAMPLE and syncup alsa-in
[jack.git] / acinclude.m4
blobe61e2f6769aa5c64fce90df0d0c67038e867ca76
1 dnl AS_AC_EXPAND(VAR, CONFIGURE_VAR)
2 dnl example
3 dnl AS_AC_EXPAND(SYSCONFDIR, $sysconfdir)
4 dnl will set SYSCONFDIR to /usr/local/etc
6 dnl written by thomas vander stichele
8 AC_DEFUN([AS_AC_EXPAND],
10   EXP_VAR=[$1]
11   FROM_VAR=[$2]
13   dnl first expand prefix and exec_prefix if necessary
14   prefix_save=$prefix
15   if test "x$prefix" = "xNONE"; then
16     prefix=/usr/local
17   fi
18   exec_prefix_save=$exec_prefix
19   if test "x$exec_prefix" = "xNONE"; then
20     if test "x$prefix_save" = "xNONE"; then
21       exec_prefix=/usr/local
22     else
23       exec_prefix=$prefix
24     fi
25   fi
27   full_var="$FROM_VAR"
28   dnl loop until it doesn't change anymore
29   while true; do
30     new_full_var="`eval echo $full_var`"
31     if test "x$new_full_var" = "x$full_var"; then break; fi
32     full_var=$new_full_var
33   done
35   dnl clean up
36   full_var=$new_full_var
37   [$1]=$full_var
38   prefix=$prefix_save
39   exec_prefix=$exec_prefix_save