(AC_TRY_RUN_NATIVE): Remove.
(AC_TRY_RUN): Use AC_RUN_IFELSE, not AC_TRY_RUN_NATIVE.
+2000-03-25 Akim Demaille <akim@epita.fr>
+
+ * acgeneral.m4 (AC_RUN_IFELSE): New macro.
+ (AC_TRY_RUN_NATIVE): Remove.
+ (AC_TRY_RUN): Use AC_RUN_IFELSE, not AC_TRY_RUN_NATIVE.
+
2000-03-25 Akim Demaille <akim@epita.fr>
* acgeneral.m4 (AC_CHECK_LIB): Ah ah! I recognized you, even
## -------------------------------- ##
+# AC_RUN_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
+# -----------------------------------------------------------
+# Compile, link, and run.
+AC_DEFUN([AC_RUN_IFELSE],
+[cat >conftest.$ac_ext <<EOF
+$1
+EOF
+if AC_TRY_EVAL(ac_link) &&
+ test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null; then
+ m4_default([$2], :)
+else
+ echo "configure: failed program was:" >&AC_FD_CC
+ cat conftest.$ac_ext >&AC_FD_CC
+ifval([$3],
+[ $3
+])dnl
+fi
+rm -f conftest*[]dnl
+])# AC_RUN_IFELSE
+
+
# AC_TRY_RUN(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE],
# [ACTION-IF-CROSS-COMPILING])
# --------------------------------------------------------
-AC_DEFUN(AC_TRY_RUN,
+AC_DEFUN([AC_TRY_RUN],
[if test "$cross_compiling" = yes; then
ifelse([$4], ,
- [AC_WARNING([AC_TRY_RUN called without default to allow cross compiling])dnl
+ [AC_WARNING([AC_TRY_RUN called without default to allow cross compiling])dnl
AC_MSG_ERROR(cannot run test program while cross compiling)],
- [$4])
-else
- AC_TRY_RUN_NATIVE([$1], [$2], [$3])
-fi
-])
-
-
-# AC_TRY_RUN_NATIVE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
-# ---------------------------------------------------------------
-# Like AC_TRY_RUN but assumes a native-environment (non-cross) compiler.
-AC_DEFUN(AC_TRY_RUN_NATIVE,
-[cat >conftest.$ac_ext <<EOF
-AC_LANG_SOURCE([[$1]])
-EOF
-if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} &&
- (./conftest; exit) 2>/dev/null; then
- m4_default([$2], [:])
+ [$4])
else
- echo "configure: failed program was:" >&AC_FD_CC
- cat conftest.$ac_ext >&AC_FD_CC
- $3
+ AC_RUN_IFELSE([AC_LANG_SOURCE([[$1]])], [$2], [$3])
fi
-rm -fr conftest*
-])# AC_TRY_RUN_NATIVE
+])# AC_TRY_RUN
## -------------------------------- ##
+# AC_RUN_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
+# -----------------------------------------------------------
+# Compile, link, and run.
+AC_DEFUN([AC_RUN_IFELSE],
+[cat >conftest.$ac_ext <<EOF
+$1
+EOF
+if AC_TRY_EVAL(ac_link) &&
+ test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null; then
+ m4_default([$2], :)
+else
+ echo "configure: failed program was:" >&AC_FD_CC
+ cat conftest.$ac_ext >&AC_FD_CC
+ifval([$3],
+[ $3
+])dnl
+fi
+rm -f conftest*[]dnl
+])# AC_RUN_IFELSE
+
+
# AC_TRY_RUN(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE],
# [ACTION-IF-CROSS-COMPILING])
# --------------------------------------------------------
-AC_DEFUN(AC_TRY_RUN,
+AC_DEFUN([AC_TRY_RUN],
[if test "$cross_compiling" = yes; then
ifelse([$4], ,
- [AC_WARNING([AC_TRY_RUN called without default to allow cross compiling])dnl
+ [AC_WARNING([AC_TRY_RUN called without default to allow cross compiling])dnl
AC_MSG_ERROR(cannot run test program while cross compiling)],
- [$4])
-else
- AC_TRY_RUN_NATIVE([$1], [$2], [$3])
-fi
-])
-
-
-# AC_TRY_RUN_NATIVE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
-# ---------------------------------------------------------------
-# Like AC_TRY_RUN but assumes a native-environment (non-cross) compiler.
-AC_DEFUN(AC_TRY_RUN_NATIVE,
-[cat >conftest.$ac_ext <<EOF
-AC_LANG_SOURCE([[$1]])
-EOF
-if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} &&
- (./conftest; exit) 2>/dev/null; then
- m4_default([$2], [:])
+ [$4])
else
- echo "configure: failed program was:" >&AC_FD_CC
- cat conftest.$ac_ext >&AC_FD_CC
- $3
+ AC_RUN_IFELSE([AC_LANG_SOURCE([[$1]])], [$2], [$3])
fi
-rm -fr conftest*
-])# AC_TRY_RUN_NATIVE
+])# AC_TRY_RUN
# and some are already tested elsewhere. EGREP_EXCLUDE must filter out
# the macros we don't want to test in syntax.m4.
#
-# - AC_CHECK decl, file, func, header, member, prog, sizeof, type
+# - AC_CHECK decl, file, func, header, lib, member, prog, sizeof, type
# Performed in the semantics tests.
# - AC_CONFIG
# They fail when the source does not exist.
# - AC_INIT
# AC_INIT includes all the AC_INIT macros. Note that there is an
# infinite m4 recursion if AC_INIT it used twice.
-# - AC_LANG
-# Requires an argument.
+# - AC_LANG*
+# Heavily used by other macros.
# - AC_PROG_(CC|CXX|F77)_(GNU|WORKS)
# are used in AC_PROG_CC etc.
# - AC_PATH_PROGS?
#
# Multiple `-e' to egrep are not portable, so join all the patterns together.
# We use the fact that automake will replace all the `\\\n' with ` '.
-FILTER_MACROS = egrep -v -e `echo '^AC_ARG_VAR$$ ^AC_CHECK_(DECL|FILE|FUNC|HEADER|MEMBER|PROG|SIZEOF|TYPE)S?$$ ^AC_CONFIG ^AC_INIT ^AC_LANG ^AC_LINKER_OPTION$$ ^AC_LINK_FILES$$ ^AC_LIST_MEMBER_OF$$ ^AC_PATH_(TOOL|PROG)S?$$ ^AC_PROG_(CC|CXX|F77)_(GNU|WORKS)$$ ^AC_REPLACE_FUNCS$$ ^AC_SEARCH_LIBS$$ ^AC_TRY _AC_' | tr ' ' '|'`
+FILTER_MACROS = egrep -v -e `echo '^AC_ARG_VAR$$ ^AC_CHECK_(DECL|FILE|FUNC|HEADER|LIB|MEMBER|PROG|SIZEOF|TYPE)S?$$ ^AC_CONFIG ^AC_INIT ^AC_LANG ^AC_LINKER_OPTION$$ ^AC_LINK_FILES$$ ^AC_LIST_MEMBER_OF$$ ^AC_PATH_(TOOL|PROG)S?$$ ^AC_PROG_(CC|CXX|F77)_(GNU|WORKS)$$ ^AC_REPLACE_FUNCS$$ ^AC_SEARCH_LIBS$$ ^AC_TRY _AC_' | tr ' ' '|'`
CLEANFILES = debug-*.sh macro configure configure.in config.status config.cache config.log config.h.in config.h
DISTCLEANFILES = atconfig testsuite
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_CLEAN_FILES = atconfig
-DIST_COMMON = Makefile.am Makefile.in atconfig.in
+DIST_COMMON = Makefile.am Makefile.in atconfig.in configure \
+configure.in
PACKAGE = @PACKAGE@