changequote([,])dnl
-exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- | --exec | --exe | --ex | --e)
if test $[#] -eq 1; then
- echo "configure: missing argument to $ac_arg" >&2; exit 1
+ AC_ERROR(missing argument to $ac_arg)
else shift; exec_prefix=$[1]; fi ;;
-gas | --gas | --ga | --g) ;;
-host=* | --host=* | --hos=* | --ho=* | --h=*) ;;
-host | --host | --hos | --ho | --h)
if test $[#] -eq 1; then
- echo "configure: missing argument to $ac_arg" >&2; exit 1
+ AC_ERROR(missing argument to $ac_arg)
else shift; fi ;;
-nfp | --nfp | --nf) ;;
changequote([,])dnl
-prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
if test $[#] -eq 1; then
- echo "configure: missing argument to $ac_arg" >&2; exit 1
+ AC_ERROR(missing argument to $ac_arg)
else shift; prefix=$[1]; fi ;;
-srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=* | --s=*)
changequote([,])dnl
-srcdir | --srcdir | --srcdi | --srcd | --src | --sr | --s)
if test $[#] -eq 1; then
- echo "configure: missing argument to $ac_arg" >&2; exit 1
+ AC_ERROR(missing argument to $ac_arg)
else shift; srcdir=$[1]; fi ;;
-target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) ;;
-target | --target | --targe | --targ | --tar | --ta | --t)
if test $[#] -eq 1; then
- echo "configure: missing argument to $ac_arg" >&2; exit 1
+ AC_ERROR(missing argument to $ac_arg)
else shift; fi ;;
-with-* | --with-*)
changequote(,)dnl
if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
changequote([,])dnl
- echo "configure: $ac_package: invalid package name" >&2; exit 1
+ AC_ERROR($ac_package: invalid package name)
fi
ac_package=`echo $ac_package| sed 's/-/_/g'`
case "$ac_arg" in
if test "${LC_ALL+set}" = 'set' ; then LC_ALL=C; export LC_ALL; fi
if test "${LANG+set}" = 'set' ; then LANG=C; export LANG; fi
-dnl We use confdefs.h to avoid OS command line length limits that break DEFS.
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
rm -rf conftest* confdefs.h
# AIX cpp loses on an empty file, so make sure it contains at least a newline.
echo > confdefs.h
fi
if test ! -r $srcdir/$ac_unique_file; then
if test x$ac_srcdir_defaulted = xyes; then
- echo "configure: Can not find sources in \`${ac_confdir}' or \`..'." 1>&2
+ AC_ERROR(can not find sources in \`${ac_confdir}' or \`..')
else
- echo "configure: Can not find sources in \`${srcdir}'." 1>&2
+ AC_ERROR(can not find sources in \`${srcdir}')
fi
- exit 1
fi
])dnl
dnl
-dnl Protects the argument from being diverted twice
-dnl if this macro is called twice for it.
-dnl Diversion 0 is the normal output.
-dnl Diversion 1 is sed substitutions for output files.
-dnl Diversion 2 is variable assignments for config.status.
-define(AC_SUBST,
-[ifdef([AC_SUBST_$1], ,
-[define([AC_SUBST_$1], )dnl
-divert(1)dnl
-s%@$1@%[$]$1%g
-divert(2)dnl
-$1='[$]$1'
-divert(0)dnl
-])])dnl
-dnl
define(AC_WITH,
[[#] check whether --with-$1 was given
withval="[$with_]patsubst($1,-,_)"
define(AC_PREFIX,
[if test -z "$prefix"
then
- echo checking for $1 to derive installation directory prefix
+ AC_CHECKING(for $1 to derive installation directory prefix)
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="$IFS:"
for ac_dir in $PATH; do
test -z "$ac_dir" && ac_dir=.
fi
done
IFS="$ac_save_ifs"
- echo " chose installation directory prefix ${prefix}"
+ AC_VERBOSE(chose installation directory prefix ${prefix})
fi
])dnl
dnl
define(AC_REVISION, [AC_DOREV(translit($1,$"))])dnl
dnl
dnl
+dnl Setting variables
+dnl
+dnl
dnl Several simple subroutines to do various flavors of quoting.
dnl
dnl Quote $1 against shell "s.
popdef([AC_QUOTE_SQUOTE])dnl
])dnl
dnl
-define(AC_BEFORE,
-[ifdef([AC_PROVIDE_$2], [errprint(__file__:__line__: [$2 was called before $1
-])])])dnl
-dnl
-define(AC_REQUIRE,
-[ifdef([AC_PROVIDE_$1],,[indir([$1])
+dnl Protects the argument from being diverted twice
+dnl if this macro is called twice for it.
+dnl Diversion 0 is the normal output.
+dnl Diversion 1 is sed substitutions for output files.
+dnl Diversion 2 is variable assignments for config.status.
+define(AC_SUBST,
+[ifdef([AC_SUBST_$1], ,
+[define([AC_SUBST_$1], )dnl
+divert(1)dnl
+s%@$1@%[$]$1%g
+divert(2)dnl
+$1='[$]$1'
+divert(0)dnl
])])dnl
dnl
-define(AC_PROVIDE,
-[define([AC_PROVIDE_$1],)])dnl
dnl
-define(AC_OBSOLETE,
-[errprint(__file__:__line__: warning: [$1] is obsolete[$2]
-)])dnl
+dnl Printing messages
+dnl
+dnl
+define(AC_CHECKING,
+[echo "checking $1"])dnl
+dnl
+define(AC_VERBOSE,
+[test -n "$ac_verbose" && echo " $1"])dnl
+dnl
+define(AC_WARN,
+[echo "configure: warning: $1" >&2])dnl
+dnl
+define(AC_ERROR,
+[echo "configure: $1" >&2; exit 1])dnl
+dnl
+dnl
+dnl Selecting which language to use for testing
dnl
-dnl Which compiler do we use to run test checks?
dnl
define(AC_LANG_C,
[define([AC_LANG],[C])AC_PROVIDE([$0])ac_ext=c
-ac_cpp="${CPP} \$CFLAGS"
+ac_cpp='${CPP} $CFLAGS'
ac_compile='${CC-cc} $CFLAGS $LDFLAGS conftest.${ac_ext} -o conftest $LIBS >/dev/null 2>&1'
])dnl
dnl
define(AC_LANG_CPLUSPLUS,
[define([AC_LANG],[CPLUSPLUS])AC_PROVIDE([$0])ac_ext=C
-ac_cpp="${CXXCPP} \$CXXFLAGS"
+ac_cpp='${CXXCPP} $CXXFLAGS'
ac_compile='${CXX-gcc} $CXXFLAGS $LDFLAGS conftest.${ac_ext} -o conftest $LIBS >/dev/null 2>&1'
])dnl
dnl
[ifelse(AC_LANG_STACK,C,[ifelse(AC_LANG,C,,[AC_LANG_C])],[ifelse(AC_LANG,CPLUSPLUS,,[AC_LANG_CPLUSPLUS])])[]popdef([AC_LANG_STACK])])dnl
dnl
dnl
-dnl Checks for kinds of features
+dnl Enforcing ordering constraints
+dnl
+dnl
+define(AC_BEFORE,
+[ifdef([AC_PROVIDE_$2], [errprint(__file__:__line__: [$2 was called before $1
+])])])dnl
+dnl
+define(AC_REQUIRE,
+[ifdef([AC_PROVIDE_$1],,[indir([$1])
+])])dnl
+dnl
+define(AC_PROVIDE,
+[define([AC_PROVIDE_$1],)])dnl
+dnl
+define(AC_OBSOLETE,
+[errprint(__file__:__line__: warning: [$1] is obsolete[$2]
+)])dnl
+dnl
+dnl
+dnl Checking for kinds of features
dnl
dnl
define(AC_PROGRAM_CHECK,
[if test -z "[$]$1"; then
# Extract the first word of `$2', so it can be a program name with args.
set ac_dummy $2; ac_word=[$]2
- echo checking for $ac_word
+ AC_CHECKING(for $ac_word)
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
for ac_dir in $PATH; do
test -z "$ac_dir" && ac_dir=.
IFS="$ac_save_ifs"
fi
ifelse([$4],,, [test -z "[$]$1" && $1="$4"])
-test -n "[$]$1" && test -n "$ac_verbose" && echo " setting $1 to [$]$1"
+test -n "[$]$1" && AC_VERBOSE(setting $1 to [$]$1)
AC_SUBST($1)dnl
])dnl
dnl
[if test -z "[$]$1"; then
# Extract the first word of `$2', so it can be a program name with args.
set ac_dummy $2; ac_word=[$]2
- echo checking for $ac_word
+ AC_CHECKING(for $ac_word)
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
for ac_dir in $PATH; do
test -z "$ac_dir" && ac_dir=.
IFS="$ac_save_ifs"
fi
ifelse([$3],,, [test -z "[$]$1" && $1="$3"])
-test -n "[$]$1" && test -n "$ac_verbose" && echo " setting $1 to [$]$1"
+test -n "[$]$1" && AC_VERBOSE(setting $1 to [$]$1)
AC_SUBST($1)dnl
])dnl
define(AC_PROGRAMS_PATH,
])dnl
dnl
define(AC_HEADER_CHECK,
-[echo checking for $1
+[AC_CHECKING(for $1)
ifelse([$3], , [AC_TEST_CPP([#include <$1>], [$2])],
[AC_TEST_CPP([#include <$1>], [$2], [$3])])
])dnl
dnl
define(AC_COMPILE_CHECK,
[AC_PROVIDE([$0])dnl
-ifelse([$1], , , [echo checking for $1]
+ifelse([$1], , , [AC_CHECKING(for $1)]
)dnl
dnl We use return because because C++ requires a prototype for exit.
cat > conftest.${ac_ext} <<EOF
extern char ${ac_func}(); ${ac_func}();
#endif
], , [LIBOBJS="$LIBOBJS ${ac_func}.o"
-test -n "$ac_verbose" && echo " using ${ac_func}.o instead"])
+AC_VERBOSE(using ${ac_func}.o instead)])
done
AC_SUBST(LIBOBJS)dnl
])dnl
changequote([,])dnl
-exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- | --exec | --exe | --ex | --e)
if test $[#] -eq 1; then
- echo "configure: missing argument to $ac_arg" >&2; exit 1
+ AC_ERROR(missing argument to $ac_arg)
else shift; exec_prefix=$[1]; fi ;;
-gas | --gas | --ga | --g) ;;
-host=* | --host=* | --hos=* | --ho=* | --h=*) ;;
-host | --host | --hos | --ho | --h)
if test $[#] -eq 1; then
- echo "configure: missing argument to $ac_arg" >&2; exit 1
+ AC_ERROR(missing argument to $ac_arg)
else shift; fi ;;
-nfp | --nfp | --nf) ;;
changequote([,])dnl
-prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
if test $[#] -eq 1; then
- echo "configure: missing argument to $ac_arg" >&2; exit 1
+ AC_ERROR(missing argument to $ac_arg)
else shift; prefix=$[1]; fi ;;
-srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=* | --s=*)
changequote([,])dnl
-srcdir | --srcdir | --srcdi | --srcd | --src | --sr | --s)
if test $[#] -eq 1; then
- echo "configure: missing argument to $ac_arg" >&2; exit 1
+ AC_ERROR(missing argument to $ac_arg)
else shift; srcdir=$[1]; fi ;;
-target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) ;;
-target | --target | --targe | --targ | --tar | --ta | --t)
if test $[#] -eq 1; then
- echo "configure: missing argument to $ac_arg" >&2; exit 1
+ AC_ERROR(missing argument to $ac_arg)
else shift; fi ;;
-with-* | --with-*)
changequote(,)dnl
if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
changequote([,])dnl
- echo "configure: $ac_package: invalid package name" >&2; exit 1
+ AC_ERROR($ac_package: invalid package name)
fi
ac_package=`echo $ac_package| sed 's/-/_/g'`
case "$ac_arg" in
if test "${LC_ALL+set}" = 'set' ; then LC_ALL=C; export LC_ALL; fi
if test "${LANG+set}" = 'set' ; then LANG=C; export LANG; fi
-dnl We use confdefs.h to avoid OS command line length limits that break DEFS.
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
rm -rf conftest* confdefs.h
# AIX cpp loses on an empty file, so make sure it contains at least a newline.
echo > confdefs.h
fi
if test ! -r $srcdir/$ac_unique_file; then
if test x$ac_srcdir_defaulted = xyes; then
- echo "configure: Can not find sources in \`${ac_confdir}' or \`..'." 1>&2
+ AC_ERROR(can not find sources in \`${ac_confdir}' or \`..')
else
- echo "configure: Can not find sources in \`${srcdir}'." 1>&2
+ AC_ERROR(can not find sources in \`${srcdir}')
fi
- exit 1
fi
])dnl
dnl
-dnl Protects the argument from being diverted twice
-dnl if this macro is called twice for it.
-dnl Diversion 0 is the normal output.
-dnl Diversion 1 is sed substitutions for output files.
-dnl Diversion 2 is variable assignments for config.status.
-define(AC_SUBST,
-[ifdef([AC_SUBST_$1], ,
-[define([AC_SUBST_$1], )dnl
-divert(1)dnl
-s%@$1@%[$]$1%g
-divert(2)dnl
-$1='[$]$1'
-divert(0)dnl
-])])dnl
-dnl
define(AC_WITH,
[[#] check whether --with-$1 was given
withval="[$with_]patsubst($1,-,_)"
define(AC_PREFIX,
[if test -z "$prefix"
then
- echo checking for $1 to derive installation directory prefix
+ AC_CHECKING(for $1 to derive installation directory prefix)
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="$IFS:"
for ac_dir in $PATH; do
test -z "$ac_dir" && ac_dir=.
fi
done
IFS="$ac_save_ifs"
- echo " chose installation directory prefix ${prefix}"
+ AC_VERBOSE(chose installation directory prefix ${prefix})
fi
])dnl
dnl
define(AC_REVISION, [AC_DOREV(translit($1,$"))])dnl
dnl
dnl
+dnl Setting variables
+dnl
+dnl
dnl Several simple subroutines to do various flavors of quoting.
dnl
dnl Quote $1 against shell "s.
popdef([AC_QUOTE_SQUOTE])dnl
])dnl
dnl
-define(AC_BEFORE,
-[ifdef([AC_PROVIDE_$2], [errprint(__file__:__line__: [$2 was called before $1
-])])])dnl
-dnl
-define(AC_REQUIRE,
-[ifdef([AC_PROVIDE_$1],,[indir([$1])
+dnl Protects the argument from being diverted twice
+dnl if this macro is called twice for it.
+dnl Diversion 0 is the normal output.
+dnl Diversion 1 is sed substitutions for output files.
+dnl Diversion 2 is variable assignments for config.status.
+define(AC_SUBST,
+[ifdef([AC_SUBST_$1], ,
+[define([AC_SUBST_$1], )dnl
+divert(1)dnl
+s%@$1@%[$]$1%g
+divert(2)dnl
+$1='[$]$1'
+divert(0)dnl
])])dnl
dnl
-define(AC_PROVIDE,
-[define([AC_PROVIDE_$1],)])dnl
dnl
-define(AC_OBSOLETE,
-[errprint(__file__:__line__: warning: [$1] is obsolete[$2]
-)])dnl
+dnl Printing messages
+dnl
+dnl
+define(AC_CHECKING,
+[echo "checking $1"])dnl
+dnl
+define(AC_VERBOSE,
+[test -n "$ac_verbose" && echo " $1"])dnl
+dnl
+define(AC_WARN,
+[echo "configure: warning: $1" >&2])dnl
+dnl
+define(AC_ERROR,
+[echo "configure: $1" >&2; exit 1])dnl
+dnl
+dnl
+dnl Selecting which language to use for testing
dnl
-dnl Which compiler do we use to run test checks?
dnl
define(AC_LANG_C,
[define([AC_LANG],[C])AC_PROVIDE([$0])ac_ext=c
-ac_cpp="${CPP} \$CFLAGS"
+ac_cpp='${CPP} $CFLAGS'
ac_compile='${CC-cc} $CFLAGS $LDFLAGS conftest.${ac_ext} -o conftest $LIBS >/dev/null 2>&1'
])dnl
dnl
define(AC_LANG_CPLUSPLUS,
[define([AC_LANG],[CPLUSPLUS])AC_PROVIDE([$0])ac_ext=C
-ac_cpp="${CXXCPP} \$CXXFLAGS"
+ac_cpp='${CXXCPP} $CXXFLAGS'
ac_compile='${CXX-gcc} $CXXFLAGS $LDFLAGS conftest.${ac_ext} -o conftest $LIBS >/dev/null 2>&1'
])dnl
dnl
[ifelse(AC_LANG_STACK,C,[ifelse(AC_LANG,C,,[AC_LANG_C])],[ifelse(AC_LANG,CPLUSPLUS,,[AC_LANG_CPLUSPLUS])])[]popdef([AC_LANG_STACK])])dnl
dnl
dnl
-dnl Checks for kinds of features
+dnl Enforcing ordering constraints
+dnl
+dnl
+define(AC_BEFORE,
+[ifdef([AC_PROVIDE_$2], [errprint(__file__:__line__: [$2 was called before $1
+])])])dnl
+dnl
+define(AC_REQUIRE,
+[ifdef([AC_PROVIDE_$1],,[indir([$1])
+])])dnl
+dnl
+define(AC_PROVIDE,
+[define([AC_PROVIDE_$1],)])dnl
+dnl
+define(AC_OBSOLETE,
+[errprint(__file__:__line__: warning: [$1] is obsolete[$2]
+)])dnl
+dnl
+dnl
+dnl Checking for kinds of features
dnl
dnl
define(AC_PROGRAM_CHECK,
[if test -z "[$]$1"; then
# Extract the first word of `$2', so it can be a program name with args.
set ac_dummy $2; ac_word=[$]2
- echo checking for $ac_word
+ AC_CHECKING(for $ac_word)
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
for ac_dir in $PATH; do
test -z "$ac_dir" && ac_dir=.
IFS="$ac_save_ifs"
fi
ifelse([$4],,, [test -z "[$]$1" && $1="$4"])
-test -n "[$]$1" && test -n "$ac_verbose" && echo " setting $1 to [$]$1"
+test -n "[$]$1" && AC_VERBOSE(setting $1 to [$]$1)
AC_SUBST($1)dnl
])dnl
dnl
[if test -z "[$]$1"; then
# Extract the first word of `$2', so it can be a program name with args.
set ac_dummy $2; ac_word=[$]2
- echo checking for $ac_word
+ AC_CHECKING(for $ac_word)
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
for ac_dir in $PATH; do
test -z "$ac_dir" && ac_dir=.
IFS="$ac_save_ifs"
fi
ifelse([$3],,, [test -z "[$]$1" && $1="$3"])
-test -n "[$]$1" && test -n "$ac_verbose" && echo " setting $1 to [$]$1"
+test -n "[$]$1" && AC_VERBOSE(setting $1 to [$]$1)
AC_SUBST($1)dnl
])dnl
define(AC_PROGRAMS_PATH,
])dnl
dnl
define(AC_HEADER_CHECK,
-[echo checking for $1
+[AC_CHECKING(for $1)
ifelse([$3], , [AC_TEST_CPP([#include <$1>], [$2])],
[AC_TEST_CPP([#include <$1>], [$2], [$3])])
])dnl
dnl
define(AC_COMPILE_CHECK,
[AC_PROVIDE([$0])dnl
-ifelse([$1], , , [echo checking for $1]
+ifelse([$1], , , [AC_CHECKING(for $1)]
)dnl
dnl We use return because because C++ requires a prototype for exit.
cat > conftest.${ac_ext} <<EOF
extern char ${ac_func}(); ${ac_func}();
#endif
], , [LIBOBJS="$LIBOBJS ${ac_func}.o"
-test -n "$ac_verbose" && echo " using ${ac_func}.o instead"])
+AC_VERBOSE(using ${ac_func}.o instead)])
done
AC_SUBST(LIBOBJS)dnl
])dnl