1# ===========================================================================
2#    https://www.gnu.org/software/autoconf-archive/ax_configure_args.html
3# ===========================================================================
4#
5# SYNOPSIS
6#
7#   AX_CONFIGURE_ARGS
8#
9# DESCRIPTION
10#
11#   Helper macro for AX_ENABLE_BUILDDIR.
12#
13#   The traditional way of starting a subdir-configure is running the script
14#   with ${1+"$@"} but since autoconf 2.60 this is broken. Instead we have
15#   to rely on eval'ing $ac_configure_args however some old autoconf
16#   versions do not provide that. To ensure maximum portability of autoconf
17#   extension macros this helper can be AC_REQUIRE'd so that
18#   $ac_configure_args will always be present.
19#
20#   Sadly, the traditional "exec $SHELL" of the enable_builddir macros is
21#   spoiled now and must be replaced by "eval + exit $?".
22#
23#   Example:
24#
25#     AC_DEFUN([AX_ENABLE_SUBDIR],[dnl
26#       AC_REQUIRE([AX_CONFIGURE_ARGS])dnl
27#       eval $SHELL $ac_configure_args || exit $?
28#       ...])
29#
30# LICENSE
31#
32#   Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
33#
34#   Copying and distribution of this file, with or without modification, are
35#   permitted in any medium without royalty provided the copyright notice
36#   and this notice are preserved.  This file is offered as-is, without any
37#   warranty.
38
39#serial 14
40
41AC_DEFUN([AX_CONFIGURE_ARGS],[
42   # [$]@ is unusable in 2.60+ but earlier autoconf had no ac_configure_args
43   if test "${ac_configure_args+set}" != "set" ; then
44      ac_configure_args=
45      for ac_arg in ${1+"[$]@"}; do
46         ac_configure_args="$ac_configure_args '$ac_arg'"
47      done
48   fi
49])
50