]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* acgeneral.m4 (AC_RUN_IFELSE): New macro.
authorAkim Demaille <akim@epita.fr>
Sat, 25 Mar 2000 09:12:59 +0000 (09:12 +0000)
committerAkim Demaille <akim@epita.fr>
Sat, 25 Mar 2000 09:12:59 +0000 (09:12 +0000)
(AC_TRY_RUN_NATIVE): Remove.
(AC_TRY_RUN): Use AC_RUN_IFELSE, not AC_TRY_RUN_NATIVE.

ChangeLog
acgeneral.m4
lib/autoconf/general.m4
tests/Makefile.in

index 4ce07627973bc3c3aa7387a0912f92998dcaea3f..a0acf078833c41beae06395a67aceed3a1081d4b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+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
index 595a37e6bd02ead209cc534cdf13f3ed95c44d5e..b7c88b2803df147368c1948213e3d12f56905e67 100644 (file)
@@ -2988,38 +2988,40 @@ AC_LINK_IFELSE([AC_LANG_PROGRAM([[$2]], [[$3]])], [$4], [$5])
 ## -------------------------------- ##
 
 
+# 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
 
 
 
index 595a37e6bd02ead209cc534cdf13f3ed95c44d5e..b7c88b2803df147368c1948213e3d12f56905e67 100644 (file)
@@ -2988,38 +2988,40 @@ AC_LINK_IFELSE([AC_LANG_PROGRAM([[$2]], [[$3]])], [$4], [$5])
 ## -------------------------------- ##
 
 
+# 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
 
 
 
index 76876f22db059f1078a54a00e75aa24cddc496af..ff6494e27a7d906c30c352d5aca99ea7bd9025e0 100644 (file)
@@ -80,15 +80,15 @@ PERL = perl
 # 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?
@@ -101,7 +101,7 @@ PERL = perl
 #
 # 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
@@ -109,7 +109,8 @@ CLEANFILES = debug-*.sh macro configure configure.in config.status config.cache
 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@