# and some are already tested elsewhere. EGREP_EXCLUDE must filter out
# the macros we don't want to test in syntax.m4.
#
-# - AC_CANONICALIZE, AC_PREFIX_PROGRAM
+# - AC_CANONICALIZE, AC_PREFIX_PROGRAM, AC_PREREQ
# Need an argument.
# - AC_CHECK decl, file, func, header, lib, member, prog, sizeof, type
# Performed in the semantics tests.
# - AC_CYGWIN, AC_CYGWIN32, AC_EMXOS2, AC_MING32, AC_EXEEXT, AC_OBJEXT
# AU defined to nothing.
syntax_exclude_list='^AC_ARG_VAR$
-^AC_CANONICALIZE$
+^AC_CANONICALIZE|AC_PREFIX_PROGRAM|AC_PREREQ$
^AC_CHECK_(DECL|FILE|FUNC|HEADER|LIB|MEMBER|PROG|SIZEOF|TOOL|TYPE)S?$
^AC_CONFIG
^AC_F77_FUNC$
^AC_LIST_MEMBER_OF$
^AC_OUTPUT$
^AC_PATH_(TOOL|PROG)S?$
-^AC_PREFIX_PROGRAM$
^AC_REPLACE_FUNCS$
^AC_SEARCH_LIBS$
^AC_TRY
# update_exclude_list
# -------------------
-# AC_LANG_RESTORE alone cannot be used.
-# AC_LINK_FILES needs argument and is tested elsewhere.
-# AC_INIT and AC_OUTPUT are already in `configure.in'.
+# AC_LANG_RESTORE
+# cannot be used alone.
+# AC_LINK_FILES, AC_PREREQ
+# need arguments and are tested elsewhere.
+# AC_INIT and AC_OUTPUT
+# are already in `configure.in'.
update_exclude_list='^AC_LANG_RESTORE$
-^AC_LINK_FILES$
+^AC_LINK_FILES|AC_PREREQ$
^AC_(INIT|OUTPUT)$'
# syntax_exclude_egrep --
]])
if /bin/sh ./syntax.sh; then
- AT_CHECK([/bin/sh -n ../autoconf], 0)
- AT_CHECK([/bin/sh -n ../autoreconf], 0)
- AT_CHECK([/bin/sh -n ../autoupdate], 0)
- AT_CHECK([/bin/sh -n ../autoreconf], 0)
- AT_CHECK([/bin/sh -n ../ifnames], 0)
+ AT_CHECK([/bin/sh -n autoconf], 0)
+ AT_CHECK([/bin/sh -n autoreconf], 0)
+ AT_CHECK([/bin/sh -n autoupdate], 0)
+ AT_CHECK([/bin/sh -n autoreconf], 0)
+ AT_CHECK([/bin/sh -n ifnames], 0)
fi
AT_CLEANUP
AC_DEFINE(this, "whatever you want.")
]])
-AT_CHECK([../autoheader --autoconf-dir .. -<configure.in], 0,
+AT_CHECK([autoheader --autoconf-dir .. -<configure.in], 0,
[[/* config.h.in. Generated automatically from - by autoheader. */
/* Define this to whatever you want. */
#undef this
AC_DEFINE(that, "whatever you want.")
]])
-AT_CHECK([../autoheader --autoconf-dir .. -<configure.in], 1, [],
+AT_CHECK([autoheader --autoconf-dir .. -<configure.in], 1, [],
[autoheader: No template for symbol `that'
])
# Yes, that's right: the `middle' part of `acconfig.h' is still before
# the AH_TOP part. But so what, you're not supposed to use the two
# together.
-AT_CHECK([../autoheader --autoconf-dir .. -<configure.in], 0,
+AT_CHECK([autoheader --autoconf-dir .. -<configure.in], 0,
[[/* config.h.in. Generated automatically from - by autoheader. */
/* Top from acconfig.h. */
]])
# Checking `autoupdate'.
-AT_CHECK([../autoupdate --autoconf-dir $top_srcdir -<configure.in], 0,
+AT_CHECK([autoupdate --autoconf-dir $top_srcdir -<configure.in], 0,
[[AC_INIT
AC_CANONICAL_TARGET()
dnl The doc says 27 is a valid fubar.
AT_CLEANUP
-AT_SETUP([autoupdating AC_LINK FILES])
+# autoupdating AC_LINK_FILES
+# --------------------------
+AT_SETUP([autoupdating AC_LINK_FILES])
AT_DATA(configure.in,
[[AC_INIT
)
# Checking `autoupdate'.
-AT_CHECK([../autoupdate --autoconf-dir $top_srcdir], 0, [],
+AT_CHECK([autoupdate --autoconf-dir $top_srcdir], 0, [],
[autoupdate: `configure.in' is updated
])
-AT_CHECK([../autoconf --autoconf-dir $top_srcdir], 0)
+AT_CHECK([autoconf --autoconf-dir $top_srcdir], 0)
AT_CHECK([./configure], 0, ignore)
AT_CHECK([cat src1], 0, [dst1
])
AT_CLEANUP(src1 src2)
+# autoupdating AC_PREREQ
+# ----------------------
+AT_SETUP([autoupdating AC_PREREQ])
+
+cat >expout <<EOF
+AC_PREREQ($at_version)
+EOF
+
+AT_CHECK([echo "AC_PREREQ(1.0)" |
+ autoupdate --autoconf-dir $top_srcdir -],
+ 0, [expout], [])
+
+AT_CHECK([echo "AC_PREREQ($at_version)" |
+ autoupdate --autoconf-dir $top_srcdir -],
+ 0, [expout], [])
+
+AT_CHECK([echo "AC_PREREQ(999.99)" |
+ autoupdate --autoconf-dir $top_srcdir -],
+ 1, [], [ignore])
+
+AT_CLEANUP
+
+
+
## ------------------ ##
## autoconf --trace. ##
## ------------------ ##
]])
# Several --traces.
-AT_CHECK([../autoconf --autoconf-dir .. -l $at_srcdir -t TRACE1 -t TRACE2], 0,
+AT_CHECK([autoconf --autoconf-dir .. -l $at_srcdir -t TRACE1 -t TRACE2], 0,
[[configure.in:4:TRACE1:foo:bar:baz
configure.in:4:TRACE2:bar:baz
configure.in:5:TRACE1:foo:AC_TRACE1(bar, baz)
]])
# Several line requests.
-AT_CHECK([[../autoconf --autoconf-dir .. -l $at_srcdir -t TRACE1:'
+AT_CHECK([[autoconf --autoconf-dir .. -l $at_srcdir -t TRACE1:'
[$1], [$2], [$3].']], 0,
[[
[foo], [bar], [baz].
]])
# ${sep}@.
-AT_CHECK([../autoconf --autoconf-dir .. -l $at_srcdir -t TRACE2:'${)===(}@'], 0,
+AT_CHECK([autoconf --autoconf-dir .. -l $at_srcdir -t TRACE2:'${)===(}@'], 0,
[[[bar])===([baz]
[AC_TRACE1(bar, baz)]
[ACTIVE])===([baz]
It would be very bad if Autoconf forgot to expand [AC_]OUTPUT!
]])
-AT_CHECK([../autoconf --autoconf-dir .. -l $at_srcdir], 1, [],
+AT_CHECK([autoconf --autoconf-dir .. -l $at_srcdir], 1, [],
[[configure.in:2: error: undefined macro: AC_THIS_IS_PROBABLY_NOT_DEFINED
configure:3: error: undefined macro: AC_OUTPUT
]])
if (gawk --version) >/dev/null 2>&1; then
# Generation of the script.
- AT_CHECK([AWK='gawk --posix' ../autoconf --autoconf-dir .. -l $at_srcdir], 0,
+ AT_CHECK([AWK='gawk --posix' autoconf --autoconf-dir .. -l $at_srcdir], 0,
[], [])
# Tracing.
- AT_CHECK([AWK='gawk --posix' ../autoconf --autoconf-dir .. -l $at_srcdir -t AC_INIT], 0,
+ AT_CHECK([AWK='gawk --posix' autoconf --autoconf-dir .. -l $at_srcdir -t AC_INIT], 0,
ignore, [])
fi