fix detecting non-anonymous when 100 code is sent in initial presence.
[gajim.git] / m4 / acinclude.m4
blob4a356b5202500de680bd80f9ba397cb8bc024913
1 dnl as-ac-expand.m4 0.2.0                                   -*- autoconf -*-
2 dnl autostars m4 macro for expanding directories using configure's prefix
4 dnl (C) 2003, 2004, 2005 Thomas Vander Stichele <thomas at apestaart dot org>
6 dnl Copying and distribution of this file, with or without modification,
7 dnl are permitted in any medium without royalty provided the copyright
8 dnl notice and this notice are preserved.
10 dnl AS_AC_EXPAND(VAR, CONFIGURE_VAR)
12 dnl example:
13 dnl AS_AC_EXPAND(SYSCONFDIR, $sysconfdir)
14 dnl will set SYSCONFDIR to /usr/local/etc if prefix=/usr/local
16 AC_DEFUN([AS_AC_EXPAND],
18   EXP_VAR=[$1]
19   FROM_VAR=[$2]
21   dnl first expand prefix and exec_prefix if necessary
22   prefix_save=$prefix
23   exec_prefix_save=$exec_prefix
25   dnl if no prefix given, then use /usr/local, the default prefix
26   if test "x$prefix" = "xNONE"; then
27     prefix="$ac_default_prefix"
28   fi
29   dnl if no exec_prefix given, then use prefix
30   if test "x$exec_prefix" = "xNONE"; then
31     exec_prefix=$prefix
32   fi
34   full_var="$FROM_VAR"
35   dnl loop until it doesn't change anymore
36   while true; do
37     new_full_var="`eval echo $full_var`"
38     if test "x$new_full_var" = "x$full_var"; then break; fi
39     full_var=$new_full_var
40   done
42   dnl clean up
43   full_var=$new_full_var
44   AC_SUBST([$1], "$full_var")
46   dnl restore prefix and exec_prefix
47   prefix=$prefix_save
48   exec_prefix=$exec_prefix_save
51 # Fix autoconf: They don't allow shell variables in AC_INIT
52 # So we have to define them via m4 to be accepted....
54 m4_include(m4/hgversion.m4)