2000-02-09 16:36:01 +08:00
|
|
|
# -*- autoconf -*-
|
|
|
|
|
2000-11-29 18:12:05 +08:00
|
|
|
AT_BANNER([Executables (autoheader, autoupdate...).])
|
2000-02-09 16:36:01 +08:00
|
|
|
|
2000-02-15 17:15:22 +08:00
|
|
|
## -------------------------------------------------------- ##
|
|
|
|
## Check that the shell scripts are syntactically correct. ##
|
|
|
|
## -------------------------------------------------------- ##
|
2000-02-09 16:36:01 +08:00
|
|
|
|
2000-02-18 17:25:46 +08:00
|
|
|
# We use `/bin/sh -n script' to check that there are no syntax errors
|
|
|
|
# in the scripts. Although incredible, there are /bin/sh that go into
|
|
|
|
# endless loops with `-n', e.g., SunOS's:
|
|
|
|
#
|
|
|
|
# $ uname -a
|
|
|
|
# SunOS ondine 4.1.3 2 sun4m unknown
|
|
|
|
# $ cat endless.sh
|
|
|
|
# while false
|
|
|
|
# do
|
|
|
|
# :
|
|
|
|
# done
|
|
|
|
# exit 0
|
|
|
|
# $ time sh endless.sh
|
|
|
|
# sh endless.sh 0,02s user 0,03s system 78% cpu 0,064 total
|
|
|
|
# $ time sh -nx endless.sh
|
|
|
|
# ^Csh -nx endless.sh 3,67s user 0,03s system 63% cpu 5,868 total
|
|
|
|
#
|
|
|
|
# So before using `/bin/sh -n' to check our scripts, we first check
|
|
|
|
# that `/bin/sh -n' is not broken to death.
|
|
|
|
|
2000-11-14 21:25:35 +08:00
|
|
|
AT_SETUP([Syntax of the scripts])
|
2000-02-15 17:15:22 +08:00
|
|
|
|
2000-02-18 17:25:46 +08:00
|
|
|
# A script that never returns. We don't care that it never returns,
|
|
|
|
# broken /bin/sh loop equally with `false', but it makes it easier to
|
|
|
|
# test the robusteness in a good environment: just remove the `-n'.
|
|
|
|
AT_DATA(endless.sh,
|
2000-11-10 02:59:18 +08:00
|
|
|
[[while :
|
2000-02-18 17:25:46 +08:00
|
|
|
do
|
|
|
|
:
|
|
|
|
done
|
2000-02-15 17:15:22 +08:00
|
|
|
]])
|
|
|
|
|
2000-02-18 17:25:46 +08:00
|
|
|
# A script in charge of testing `/bin/sh -n'.
|
|
|
|
AT_DATA(syntax.sh,
|
2000-02-21 20:57:47 +08:00
|
|
|
[[(/bin/sh -n endless.sh) &
|
|
|
|
sleep 2
|
|
|
|
if kill $! >/dev/null 2>&1; then
|
|
|
|
# We managed to kill the child, which means that we probably
|
|
|
|
# can't trust `/bin/sh -n', hence the test failed.
|
|
|
|
exit 1
|
|
|
|
fi
|
2000-02-18 17:25:46 +08:00
|
|
|
]])
|
2000-02-15 17:15:22 +08:00
|
|
|
|
2000-02-18 17:25:46 +08:00
|
|
|
if /bin/sh ./syntax.sh; then
|
2000-10-24 19:28:20 +08:00
|
|
|
# Specify the path to the tool, some shells don't honor PATH
|
|
|
|
# when running `sh PROG'.
|
|
|
|
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 ../ifnames], 0)
|
2000-11-14 21:25:35 +08:00
|
|
|
|
|
|
|
# These are not built, they are in the src tree.
|
|
|
|
AT_CHECK([/bin/sh -n $top_srcdir/install-sh], 0)
|
|
|
|
AT_CHECK([/bin/sh -n $top_srcdir/mkinstalldirs], 0)
|
|
|
|
AT_CHECK([/bin/sh -n $top_srcdir/missing], 0)
|
2000-02-15 17:15:22 +08:00
|
|
|
fi
|
|
|
|
|
|
|
|
AT_CLEANUP
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2000-05-03 19:00:46 +08:00
|
|
|
## ------------ ##
|
|
|
|
## autoheader. ##
|
|
|
|
## ------------ ##
|
|
|
|
|
|
|
|
# autoheader is intensively used in its modern form throught this
|
|
|
|
# test suite. But we also have to check that acconfig.h still works.
|
|
|
|
|
2000-11-14 21:25:35 +08:00
|
|
|
AT_SETUP([autoheader])
|
2000-05-03 19:00:46 +08:00
|
|
|
|
|
|
|
AT_DATA(acconfig.h,
|
|
|
|
[[/* Define this to whatever you want. */
|
|
|
|
#undef this
|
|
|
|
]])
|
|
|
|
|
2000-05-04 18:26:02 +08:00
|
|
|
|
2000-05-03 19:00:46 +08:00
|
|
|
# 1. Check that `acconfig.h' is still honored.
|
|
|
|
AT_DATA(configure.in,
|
|
|
|
[[AC_INIT
|
|
|
|
AC_CONFIG_HEADERS(config.h)
|
|
|
|
AC_DEFINE(this, "whatever you want.")
|
|
|
|
]])
|
|
|
|
|
2000-10-24 02:58:43 +08:00
|
|
|
AT_CHECK([autoheader --autoconf-dir .. -<configure.in], 0,
|
2000-05-03 19:00:46 +08:00
|
|
|
[[/* config.h.in. Generated automatically from - by autoheader. */
|
|
|
|
/* Define this to whatever you want. */
|
|
|
|
#undef this
|
|
|
|
]], ignore)
|
|
|
|
|
2000-05-04 18:26:02 +08:00
|
|
|
|
2000-05-03 19:00:46 +08:00
|
|
|
# 2. Check that missing templates are a fatal error.
|
|
|
|
AT_DATA(configure.in,
|
|
|
|
[[AC_INIT
|
|
|
|
AC_CONFIG_HEADERS(config.h)
|
|
|
|
AC_DEFINE(that, "whatever you want.")
|
|
|
|
]])
|
|
|
|
|
2000-10-24 02:58:43 +08:00
|
|
|
AT_CHECK([autoheader --autoconf-dir .. -<configure.in], 1, [],
|
2000-09-21 21:42:49 +08:00
|
|
|
[autoheader: No template for symbol `that'
|
|
|
|
])
|
2000-05-03 19:00:46 +08:00
|
|
|
|
2000-05-04 18:26:02 +08:00
|
|
|
|
|
|
|
# 3. Check TOP and BOTTOM.
|
|
|
|
AT_DATA(acconfig.h,
|
|
|
|
[[/* Top from acconfig.h. */
|
|
|
|
@TOP@
|
|
|
|
/* Middle from acconfig.h. */
|
|
|
|
@BOTTOM@
|
|
|
|
/* Bottom from acconfig.h. */
|
|
|
|
]])
|
|
|
|
|
|
|
|
AT_DATA(configure.in,
|
|
|
|
[[AC_INIT
|
|
|
|
AC_CONFIG_HEADERS(config.h)
|
|
|
|
AH_TOP([Top1 from configure.in.])
|
|
|
|
AH_TOP([Top2 from configure.in.])
|
|
|
|
AH_VERBATIM([Middle], [Middle from configure.in.])
|
|
|
|
AH_BOTTOM([Bottom1 from configure.in.])
|
|
|
|
AH_BOTTOM([Bottom2 from configure.in.])
|
|
|
|
]])
|
|
|
|
|
|
|
|
|
|
|
|
# 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.
|
2000-10-24 02:58:43 +08:00
|
|
|
AT_CHECK([autoheader --autoconf-dir .. -<configure.in], 0,
|
2000-05-04 18:26:02 +08:00
|
|
|
[[/* config.h.in. Generated automatically from - by autoheader. */
|
|
|
|
/* Top from acconfig.h. */
|
|
|
|
|
|
|
|
/* Middle from acconfig.h. */
|
|
|
|
|
|
|
|
Top1 from configure.in.
|
|
|
|
|
|
|
|
Top2 from configure.in.
|
|
|
|
|
|
|
|
Middle from configure.in.
|
|
|
|
|
|
|
|
Bottom1 from configure.in.
|
|
|
|
|
|
|
|
Bottom2 from configure.in.
|
|
|
|
/* Bottom from acconfig.h. */
|
2000-09-21 21:42:49 +08:00
|
|
|
]], [])
|
2000-05-04 18:26:02 +08:00
|
|
|
|
|
|
|
|
2000-05-03 19:00:46 +08:00
|
|
|
AT_CLEANUP
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2000-02-15 17:15:22 +08:00
|
|
|
## ------------ ##
|
|
|
|
## autoupdate. ##
|
|
|
|
## ------------ ##
|
|
|
|
|
2000-10-17 15:55:44 +08:00
|
|
|
# Check that AC_CANONICAL_SYSTEM and AC_OUTPUT are properly updated.
|
2000-11-14 21:25:35 +08:00
|
|
|
AT_SETUP([autoupdate])
|
2000-05-11 23:45:34 +08:00
|
|
|
|
|
|
|
AT_DATA(configure.in,
|
2000-12-05 21:52:49 +08:00
|
|
|
[[AC_INIT(Test, 1.0)
|
2000-09-19 20:21:47 +08:00
|
|
|
AC_CANONICAL_SYSTEM
|
2000-05-11 23:45:34 +08:00
|
|
|
dnl The doc says 27 is a valid fubar.
|
|
|
|
fubar=27
|
|
|
|
AC_OUTPUT(Makefile, echo $fubar, fubar=$fubar)
|
|
|
|
]])
|
|
|
|
|
2000-12-05 21:52:49 +08:00
|
|
|
AT_DATA([expout],
|
|
|
|
[[AC_INIT([Test],[1.0])
|
2000-11-03 19:59:39 +08:00
|
|
|
AC_CANONICAL_TARGET([])
|
2000-05-11 23:45:34 +08:00
|
|
|
dnl The doc says 27 is a valid fubar.
|
|
|
|
fubar=27
|
|
|
|
AC_CONFIG_FILES([Makefile])
|
|
|
|
AC_CONFIG_COMMANDS([default],[[echo $fubar]],[[fubar=$fubar]])
|
|
|
|
AC_OUTPUT
|
2000-12-05 21:52:49 +08:00
|
|
|
]])
|
|
|
|
|
|
|
|
# Checking `autoupdate'.
|
|
|
|
AT_CHECK([autoupdate --autoconf-dir $top_srcdir], 0, [],
|
|
|
|
[autoupdate: `configure.in' is updated
|
|
|
|
])
|
|
|
|
AT_CHECK([cat configure.in], 0, [expout])
|
|
|
|
# Checking that `autoupdate' is idempotent
|
|
|
|
AT_CHECK([autoupdate --autoconf-dir $top_srcdir], 0, [],
|
|
|
|
[autoupdate: `configure.in' is unchanged
|
|
|
|
])
|
|
|
|
AT_CHECK([cat configure.in], 0, [expout])
|
2000-05-11 23:45:34 +08:00
|
|
|
|
|
|
|
AT_CLEANUP
|
2000-03-21 20:08:24 +08:00
|
|
|
|
|
|
|
|
2000-10-24 02:58:43 +08:00
|
|
|
# autoupdating AC_LINK_FILES
|
|
|
|
# --------------------------
|
|
|
|
AT_SETUP([autoupdating AC_LINK_FILES])
|
2000-10-17 15:55:44 +08:00
|
|
|
|
|
|
|
AT_DATA(configure.in,
|
|
|
|
[[AC_INIT
|
|
|
|
AC_LINK_FILES(dst1 dst2, src1 src2)
|
|
|
|
AC_OUTPUT
|
|
|
|
]])
|
|
|
|
|
|
|
|
AT_DATA(dst1, dst1
|
|
|
|
)
|
|
|
|
AT_DATA(dst2, dst2
|
|
|
|
)
|
|
|
|
|
|
|
|
# Checking `autoupdate'.
|
2000-10-24 02:58:43 +08:00
|
|
|
AT_CHECK([autoupdate --autoconf-dir $top_srcdir], 0, [],
|
2000-10-17 15:55:44 +08:00
|
|
|
[autoupdate: `configure.in' is updated
|
|
|
|
])
|
2000-11-01 23:20:46 +08:00
|
|
|
AT_CHECK([autoconf --autoconf-dir .. -l $at_srcdir], 0)
|
2000-11-23 17:52:35 +08:00
|
|
|
AT_CHECK_CONFIGURE
|
2000-10-17 15:55:44 +08:00
|
|
|
AT_CHECK([cat src1], 0, [dst1
|
|
|
|
])
|
|
|
|
AT_CHECK([cat src2], 0, [dst2
|
|
|
|
])
|
|
|
|
|
2000-10-23 12:01:41 +08:00
|
|
|
AT_CLEANUP(src1 src2)
|
2000-05-03 19:00:46 +08:00
|
|
|
|
|
|
|
|
2000-10-24 02:58:43 +08:00
|
|
|
# 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
|
|
|
|
|
|
|
|
|
|
|
|
|
2000-11-03 19:59:39 +08:00
|
|
|
|
2000-03-21 20:08:24 +08:00
|
|
|
## ------------------ ##
|
|
|
|
## autoconf --trace. ##
|
|
|
|
## ------------------ ##
|
|
|
|
|
2000-11-02 23:32:23 +08:00
|
|
|
|
|
|
|
# Tracing user defined macros
|
|
|
|
# ---------------------------
|
2000-11-14 21:25:35 +08:00
|
|
|
AT_SETUP([autoconf --trace])
|
2000-03-21 20:08:24 +08:00
|
|
|
|
|
|
|
AT_DATA(configure.in,
|
2000-11-02 23:32:23 +08:00
|
|
|
[[define([active], [ACTIVE])
|
|
|
|
AC_DEFUN([TRACE1], [TRACE2(m4_shift($@))])
|
|
|
|
AC_DEFUN([TRACE2], [[$2], $1])
|
2000-03-21 20:08:24 +08:00
|
|
|
TRACE1(foo, bar, baz)
|
|
|
|
TRACE1(foo, AC_TRACE1(bar, baz))
|
|
|
|
TRACE1(foo, active, baz)
|
|
|
|
TRACE1(foo, [active], TRACE1(active, [active]))
|
|
|
|
]])
|
|
|
|
|
|
|
|
# Several --traces.
|
2000-10-24 02:58:43 +08:00
|
|
|
AT_CHECK([autoconf --autoconf-dir .. -l $at_srcdir -t TRACE1 -t TRACE2], 0,
|
2000-03-21 20:08:24 +08:00
|
|
|
[[configure.in:4:TRACE1:foo:bar:baz
|
|
|
|
configure.in:4:TRACE2:bar:baz
|
|
|
|
configure.in:5:TRACE1:foo:AC_TRACE1(bar, baz)
|
|
|
|
configure.in:5:TRACE2:AC_TRACE1(bar, baz)
|
|
|
|
configure.in:6:TRACE1:foo:ACTIVE:baz
|
|
|
|
configure.in:6:TRACE2:ACTIVE:baz
|
|
|
|
configure.in:7:TRACE1:ACTIVE:active
|
|
|
|
configure.in:7:TRACE2:active
|
|
|
|
configure.in:7:TRACE1:foo:active::ACTIVE
|
|
|
|
configure.in:7:TRACE2:active::ACTIVE
|
|
|
|
]])
|
|
|
|
|
|
|
|
# Several line requests.
|
2000-10-24 02:58:43 +08:00
|
|
|
AT_CHECK([[autoconf --autoconf-dir .. -l $at_srcdir -t TRACE1:'
|
2000-03-21 20:08:24 +08:00
|
|
|
[$1], [$2], [$3].']], 0,
|
|
|
|
[[
|
|
|
|
[foo], [bar], [baz].
|
|
|
|
|
|
|
|
[foo], [AC_TRACE1(bar, baz)], [].
|
|
|
|
|
|
|
|
[foo], [ACTIVE], [baz].
|
|
|
|
|
|
|
|
[ACTIVE], [active], [].
|
|
|
|
|
|
|
|
[foo], [active], [].
|
|
|
|
]])
|
|
|
|
|
|
|
|
# ${sep}@.
|
2000-10-24 02:58:43 +08:00
|
|
|
AT_CHECK([autoconf --autoconf-dir .. -l $at_srcdir -t TRACE2:'${)===(}@'], 0,
|
2000-03-21 20:08:24 +08:00
|
|
|
[[[bar])===([baz]
|
|
|
|
[AC_TRACE1(bar, baz)]
|
|
|
|
[ACTIVE])===([baz]
|
|
|
|
[active]
|
|
|
|
[active])===([])===([ACTIVE]
|
|
|
|
]])
|
|
|
|
|
|
|
|
AT_CLEANUP
|
2000-08-07 20:07:43 +08:00
|
|
|
|
|
|
|
|
2000-11-02 23:32:23 +08:00
|
|
|
# Tracing builtins
|
|
|
|
# ----------------
|
2000-11-14 21:25:35 +08:00
|
|
|
AT_SETUP([Tracing M4 builtins])
|
2000-11-02 23:32:23 +08:00
|
|
|
|
|
|
|
AT_DATA(configure.in,
|
|
|
|
[[define([active], [ACTIVE])
|
|
|
|
]])
|
|
|
|
|
|
|
|
AT_CHECK([[autoconf --autoconf-dir .. -l $at_srcdir -t define |
|
|
|
|
sed -n '$p']],
|
|
|
|
0,
|
|
|
|
[[configure.in:1:define:active:ACTIVE
|
|
|
|
]])
|
|
|
|
|
|
|
|
# FIXME: Without `$1' the following test dies. Groumphf, once again to
|
|
|
|
# dive into obscure feature interaction...
|
2000-11-14 21:25:35 +08:00
|
|
|
# Note that using `-i' means we need the *.m4 files, not the *.m4f files,
|
|
|
|
# hence we need srcdir, not builddir.
|
|
|
|
AT_CHECK([[autoconf --autoconf-dir $top_srcdir -l $at_srcdir -t define:'$1' -i|
|
2000-11-02 23:32:23 +08:00
|
|
|
sed -n '$p']],
|
|
|
|
0,
|
|
|
|
[[active
|
|
|
|
]])
|
|
|
|
|
|
|
|
AT_CLEANUP
|
|
|
|
|
|
|
|
|
2000-08-07 20:07:43 +08:00
|
|
|
|
|
|
|
|
2000-11-16 16:33:46 +08:00
|
|
|
## ------------------ ##
|
|
|
|
## Forbidden tokens. ##
|
|
|
|
## ------------------ ##
|
2000-08-07 20:07:43 +08:00
|
|
|
|
2000-11-16 16:33:46 +08:00
|
|
|
AT_SETUP([Forbidden tokens])
|
2000-08-07 20:07:43 +08:00
|
|
|
|
|
|
|
AT_DATA([configure.in],
|
|
|
|
[[AC_PLAIN_SCRIPT()dnl
|
2000-11-03 23:08:28 +08:00
|
|
|
AB_THIS_IS_PROBABLY_NOT_DEFINED
|
|
|
|
AND_AZ_THAT_EITHER
|
|
|
|
and_AZ_that_too
|
|
|
|
# This is legal, also there is `AC_DEFINE' in there.
|
|
|
|
BAC_DEFINE
|
2000-08-07 20:07:43 +08:00
|
|
|
# AC_THIS_IS_A_COMMENT so just shut up.
|
|
|
|
It would be very bad if Autoconf forgot to expand [AC_]OUTPUT!
|
2000-11-16 16:33:46 +08:00
|
|
|
|
|
|
|
# This is allowed in spite of the name.
|
|
|
|
m4_token_allow([AC_UNDEFINED])
|
|
|
|
AC_UNDEFINED
|
|
|
|
# But it does not allow this,
|
|
|
|
MY_AC_UNDEFINED
|
2000-08-07 20:07:43 +08:00
|
|
|
]])
|
|
|
|
|
2000-10-24 02:58:43 +08:00
|
|
|
AT_CHECK([autoconf --autoconf-dir .. -l $at_srcdir], 1, [],
|
2000-11-03 23:08:28 +08:00
|
|
|
[[configure.in:2: error: undefined macro: AB_THIS_IS_PROBABLY_NOT_DEFINED
|
|
|
|
configure.in:3: error: undefined macro: AND_AZ_THAT_EITHER
|
|
|
|
configure.in:4: error: undefined macro: and_AZ_that_too
|
2000-11-16 16:33:46 +08:00
|
|
|
configure.in:14: error: undefined macro: MY_AC_UNDEFINED
|
2000-11-03 23:08:28 +08:00
|
|
|
configure:7: error: undefined macro: AC_OUTPUT
|
2000-08-07 20:07:43 +08:00
|
|
|
]])
|
|
|
|
|
|
|
|
AT_CLEANUP(configure)
|
2000-08-09 14:53:07 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## ---------------------------- ##
|
|
|
|
## autoconf's AWK portability. ##
|
|
|
|
## ---------------------------- ##
|
|
|
|
|
2000-11-14 21:25:35 +08:00
|
|
|
AT_SETUP([AWK portability])
|
2000-08-09 14:53:07 +08:00
|
|
|
|
|
|
|
AT_DATA([configure.in],
|
|
|
|
[[AC_INIT
|
|
|
|
]])
|
|
|
|
|
|
|
|
if (gawk --version) >/dev/null 2>&1; then
|
|
|
|
# Generation of the script.
|
2000-10-24 02:58:43 +08:00
|
|
|
AT_CHECK([AWK='gawk --posix' autoconf --autoconf-dir .. -l $at_srcdir], 0,
|
2000-08-09 14:53:07 +08:00
|
|
|
[], [])
|
|
|
|
# Tracing.
|
2000-10-24 02:58:43 +08:00
|
|
|
AT_CHECK([AWK='gawk --posix' autoconf --autoconf-dir .. -l $at_srcdir -t AC_INIT], 0,
|
2000-08-09 14:53:07 +08:00
|
|
|
ignore, [])
|
2000-11-03 01:03:32 +08:00
|
|
|
# Syntax correctness of ifnames.
|
|
|
|
AT_CHECK([AWK='gawk --posix' ifnames empty], 0,
|
|
|
|
[], [])
|
2000-08-09 14:53:07 +08:00
|
|
|
fi
|
|
|
|
|
|
|
|
AT_CLEANUP(configure)
|
2000-11-03 01:03:32 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## --------- ##
|
|
|
|
## ifnames. ##
|
|
|
|
## --------- ##
|
|
|
|
|
2000-11-14 21:25:35 +08:00
|
|
|
AT_SETUP([ifnames])
|
2000-11-03 01:03:32 +08:00
|
|
|
|
|
|
|
AT_DATA([iftest1.c],
|
|
|
|
[[#ifdef DEF1
|
|
|
|
#ifndef DEF2
|
|
|
|
#if !defined(DEF3) && defined(DEF4) /* but not defined(DEF5) */
|
|
|
|
# if SPACES
|
|
|
|
# if TABS
|
|
|
|
/* #if C_COMMENTS */
|
|
|
|
// #if CXX_COMMENTS
|
|
|
|
#if LINE1 = \
|
|
|
|
LINE2
|
|
|
|
#if (VAL1*VAL2)==VAL3+VAL4 /* Not VAL5 !!! */
|
|
|
|
]])
|
|
|
|
|
|
|
|
AT_DATA([iftest2.c],
|
|
|
|
[[#ifdef IFTEST2
|
|
|
|
#if VAL1
|
|
|
|
]])
|
|
|
|
|
|
|
|
AT_CHECK([ifnames iftest1.c iftest2.c], 0,
|
|
|
|
[DEF1 iftest1.c
|
|
|
|
DEF2 iftest1.c
|
|
|
|
DEF3 iftest1.c
|
|
|
|
DEF4 iftest1.c
|
|
|
|
IFTEST2 iftest2.c
|
|
|
|
LINE1 iftest1.c
|
|
|
|
LINE2 iftest1.c
|
|
|
|
SPACES iftest1.c
|
|
|
|
TABS iftest1.c
|
|
|
|
VAL1 iftest1.c iftest2.c
|
|
|
|
VAL2 iftest1.c
|
|
|
|
VAL3 iftest1.c
|
|
|
|
VAL4 iftest1.c
|
|
|
|
], [])
|
|
|
|
|
|
|
|
AT_CLEANUP(configure)
|