]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
misc little cleanups
authorDavid MacKenzie <djm@djmnet.org>
Fri, 16 Sep 1994 02:03:51 +0000 (02:03 +0000)
committerDavid MacKenzie <djm@djmnet.org>
Fri, 16 Sep 1994 02:03:51 +0000 (02:03 +0000)
NEWS
acgeneral.m4
acspecific.m4
lib/autoconf/general.m4
lib/autoconf/specific.m4

diff --git a/NEWS b/NEWS
index 644ce261645deeb5f057acb57035aec9a66e1605..01a55cc78e30023c2d457b57cf5cb29a694bc333 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,14 @@ Thanks to everybody who's submitted changes and additions to Autoconf!
 I've incorporated many of them, and am still considering others for
 future releases -- but I didn't want to postpone this release indefinitely.
 
+Caution: don't indiscriminantly rebuild configure scripts with
+Autoconf version 2.  Some configure.in files need minor adjustments to
+work with it; the documentation has a chapter on upgrading.  A few
+configure.in files, including those for GNU Emacs and the GNU C
+Library, need major changes because they relied on undocumented
+internals of version 1.  Future releases of those packages will have
+updated configure.in files.
+
 Major changes in release 2.0:
 
 ** New macros:
index 1c971cfdb2bb8767174c9957b47f648c5c796264..70fafaba8d53ca5c20af8b974ee047472ac987ec 100644 (file)
@@ -109,7 +109,7 @@ define([AC_DEFUN],
 [define($1, [AC_PRO([$1])$2[]AC_EPI()])])
 
 
-dnl ### Controlling Autoconf operation
+dnl ### Initialization
 
 
 dnl AC_INIT_NOTICE()
@@ -129,8 +129,11 @@ AC_DEFUN(AC_INIT_NOTICE,
 # Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
+# along with this script; if not, write to the Free Software
 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#
+# The copying terms for this script do not affect the copying terms
+# for software that it configures.
 
 ac_help=])
 
@@ -557,6 +560,10 @@ AC_DEFUN(AC_ENABLE,
 AC_ARG_ENABLE([$1], [  --enable-$1], [$2], [$3])dnl
 ])
 
+
+dnl ### Working with optional software
+
+
 dnl AC_ARG_WITH(PACKAGE, HELP-STRING, ACTION-IF-TRUE [, ACTION-IF-FALSE])
 AC_DEFUN(AC_ARG_WITH,
 [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl
@@ -800,13 +807,6 @@ AC_SUBST(build_vendor)dnl
 AC_SUBST(build_os)dnl
 ])
 
-dnl Link each of the existing files SOURCE... to the corresponding
-dnl link name in DEST...
-dnl Not actually done until AC_OUTPUT_LINKS.
-dnl AC_LINK_FILES(SOURCE..., DEST...)
-AC_DEFUN(AC_LINK_FILES,
-[define([AC_LIST_FILES], [$1])define([AC_LIST_LINKS], [$2])])
-
 
 dnl ### Caching test results
 
@@ -891,7 +891,7 @@ fi
 ])
 
 
-dnl ### Setting variables
+dnl ### Defining symbols
 
 
 dnl Set VARIABLE to VALUE, verbatim, or 1.
@@ -909,6 +909,10 @@ define(AC_DEFINE_UNQUOTED,
 EOF
 ])
 
+
+dnl ### Setting output variables
+
+
 dnl This macro protects VARIABLE from being diverted twice
 dnl if this macro is called twice for it.
 dnl AC_SUBST(VARIABLE)
@@ -992,7 +996,7 @@ define(AC_LANG_RESTORE,
 [ifelse(AC_LANG_STACK, C, [ifelse(AC_LANG, C, , [AC_LANG_C])], [ifelse(AC_LANG, CPLUSPLUS, , [AC_LANG_CPLUSPLUS])])[]popdef([AC_LANG_STACK])])
 
 
-dnl ### Enforcing ordering constraints
+dnl ### Dependencies between macros
 
 
 dnl AC_BEFORE(THIS-MACRO-NAME, CALLED-MACRO-NAME)
@@ -1018,7 +1022,7 @@ define(AC_OBSOLETE,
 )])
 
 
-dnl ### Checking for files (caching)
+dnl ### Checking for programs
 
 
 dnl AC_CHECK_PROG(VARIABLE, PROG-TO-CHECK-FOR, VALUE-IF-FOUND
@@ -1132,6 +1136,10 @@ fi
 undefine([AC_VAR_NAME])dnl
 ])
 
+
+dnl ### Checking for libraries
+
+
 dnl AC_CHECK_LIB(LIBRARY, FUNCTION, [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND
 dnl              [, OTHER-LIBRARIES]]])
 AC_DEFUN(AC_CHECK_LIB,
@@ -1189,8 +1197,33 @@ undefine([AC_CV_NAME])dnl
 ])
 
 
-dnl ### Checking C system output (no caching)
+dnl ### Examining declarations
+
 
+dnl AC_TRY_CPP(INCLUDES, ACTION-IF-TRUE [, ACTION-IF-FALSE])
+AC_DEFUN(AC_TRY_CPP,
+[AC_REQUIRE_CPP()dnl
+cat > conftest.$ac_ext <<EOF
+[#]line __oline__ "configure"
+#include "confdefs.h"
+[$1]
+EOF
+dnl Capture the stderr of cpp.  eval is necessary to expand ac_cpp.
+dnl We used to copy stderr to stdout and capture it in a variable, but
+dnl that breaks under sh -x, which writes compile commands starting
+dnl with ` +' to stderr in eval and subshells.
+eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+ac_err=`grep -v '^ *+' conftest.out`
+if test -z "$ac_err"; then
+  ifelse([$2], , :, [rm -rf conftest*
+  $2])
+else
+  echo "$ac_err" >&AC_FD_CC
+ifelse([$3], , , [  rm -rf conftest*
+  $3
+])dnl
+fi
+rm -f conftest*])
 
 dnl AC_EGREP_HEADER(PATTERN, HEADER-FILE, ACTION-IF-FOUND [,
 dnl                 ACTION-IF-NOT-FOUND])
@@ -1222,6 +1255,10 @@ fi
 rm -f conftest*
 ])
 
+
+dnl ### Examining libraries
+
+
 dnl AC_COMPILE_CHECK(ECHO-TEXT, INCLUDES, FUNCTION-BODY,
 dnl                  ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND])
 AC_DEFUN(AC_COMPILE_CHECK,
@@ -1260,6 +1297,10 @@ fi
 rm -f conftest*]
 )
 
+
+dnl ### Checking for run-time features
+
+
 dnl AC_TRY_RUN(PROGRAM, ACTION-IF-TRUE [, ACTION-IF-FALSE
 dnl            [, ACTION-IF-CROSS-COMPILING]])
 AC_DEFUN(AC_TRY_RUN,
@@ -1290,33 +1331,8 @@ fi
 fi
 rm -fr conftest*])
 
-dnl AC_TRY_CPP(INCLUDES, ACTION-IF-TRUE [, ACTION-IF-FALSE])
-AC_DEFUN(AC_TRY_CPP,
-[AC_REQUIRE_CPP()dnl
-cat > conftest.$ac_ext <<EOF
-[#]line __oline__ "configure"
-#include "confdefs.h"
-[$1]
-EOF
-dnl Capture the stderr of cpp.  eval is necessary to expand ac_cpp.
-dnl We used to copy stderr to stdout and capture it in a variable, but
-dnl that breaks under sh -x, which writes compile commands starting
-dnl with ` +' to stderr in eval and subshells.
-eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-ac_err=`grep -v '^ *+' conftest.out`
-if test -z "$ac_err"; then
-  ifelse([$2], , :, [rm -rf conftest*
-  $2])
-else
-  echo "$ac_err" >&AC_FD_CC
-ifelse([$3], , , [  rm -rf conftest*
-  $3
-])dnl
-fi
-rm -f conftest*])
-
 
-dnl ### Checking for C features (caching)
+dnl ### Checking for header files
 
 
 dnl AC_CHECK_HEADER(HEADER-FILE, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND])
@@ -1349,6 +1365,10 @@ changequote([, ])dnl
 done
 ])
 
+
+dnl ### Checking for library functions
+
+
 dnl AC_CHECK_FUNC(FUNCTION, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND])
 AC_DEFUN(AC_CHECK_FUNC,
 [AC_MSG_CHECKING([for $1])
@@ -1400,6 +1420,10 @@ done
 AC_SUBST(LIBOBJS)dnl
 ])
 
+
+dnl ### Checking compiler characteristics
+
+
 dnl AC_CHECK_SIZEOF(TYPE)
 AC_DEFUN(AC_CHECK_SIZEOF,
 [changequote(<<, >>)dnl
@@ -1424,6 +1448,10 @@ undefine([AC_TYPE_NAME])dnl
 undefine([AC_CV_NAME])dnl
 ])
 
+
+dnl ### Checking for typedefs
+
+
 dnl AC_CHECK_TYPE(TYPE, DEFAULT)
 AC_DEFUN(AC_CHECK_TYPE,
 [AC_REQUIRE([AC_HEADER_STDC])dnl
@@ -1440,13 +1468,19 @@ fi
 ])
 
 
-dnl ### Controlling Autoconf output
+dnl ### Creating output files
 
 
 dnl AC_CONFIG_HEADER(HEADER-TO-CREATE ...)
 AC_DEFUN(AC_CONFIG_HEADER,
 [define(AC_LIST_HEADER, $1)])
 
+dnl Link each of the existing files SOURCE... to the corresponding
+dnl link name in DEST...
+dnl AC_LINK_FILES(SOURCE..., DEST...)
+AC_DEFUN(AC_LINK_FILES,
+[define([AC_LIST_FILES], [$1])define([AC_LIST_LINKS], [$2])])
+
 dnl AC_CONFIG_SUBDIRS(DIR ...)
 AC_DEFUN(AC_CONFIG_SUBDIRS,
 [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
index ea9b1698592b9d8d0f6d1dfd223e5b3ee7f3cd35..1a2019648d7b07ea85cdc3a0afcd970ca0cf9e66 100644 (file)
@@ -275,7 +275,6 @@ AC_DEFUN(AC_REQUIRE_CPP,
 
 AC_DEFUN(AC_PROG_LEX,
 [AC_CHECK_PROG(LEX, flex, flex, lex)
-AC_MSG_CHECKING(for $LEX library)
 if test -z "$LEXLIB"
 then
   case "$LEX" in
@@ -283,7 +282,6 @@ then
   *) LEXLIB="-ll" ;;
   esac
 fi
-AC_MSG_RESULT($LEXLIB)
 AC_SUBST(LEXLIB)])
 
 AC_DEFUN(AC_DECL_YYTEXT,
index 1c971cfdb2bb8767174c9957b47f648c5c796264..70fafaba8d53ca5c20af8b974ee047472ac987ec 100644 (file)
@@ -109,7 +109,7 @@ define([AC_DEFUN],
 [define($1, [AC_PRO([$1])$2[]AC_EPI()])])
 
 
-dnl ### Controlling Autoconf operation
+dnl ### Initialization
 
 
 dnl AC_INIT_NOTICE()
@@ -129,8 +129,11 @@ AC_DEFUN(AC_INIT_NOTICE,
 # Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
+# along with this script; if not, write to the Free Software
 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+#
+# The copying terms for this script do not affect the copying terms
+# for software that it configures.
 
 ac_help=])
 
@@ -557,6 +560,10 @@ AC_DEFUN(AC_ENABLE,
 AC_ARG_ENABLE([$1], [  --enable-$1], [$2], [$3])dnl
 ])
 
+
+dnl ### Working with optional software
+
+
 dnl AC_ARG_WITH(PACKAGE, HELP-STRING, ACTION-IF-TRUE [, ACTION-IF-FALSE])
 AC_DEFUN(AC_ARG_WITH,
 [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl
@@ -800,13 +807,6 @@ AC_SUBST(build_vendor)dnl
 AC_SUBST(build_os)dnl
 ])
 
-dnl Link each of the existing files SOURCE... to the corresponding
-dnl link name in DEST...
-dnl Not actually done until AC_OUTPUT_LINKS.
-dnl AC_LINK_FILES(SOURCE..., DEST...)
-AC_DEFUN(AC_LINK_FILES,
-[define([AC_LIST_FILES], [$1])define([AC_LIST_LINKS], [$2])])
-
 
 dnl ### Caching test results
 
@@ -891,7 +891,7 @@ fi
 ])
 
 
-dnl ### Setting variables
+dnl ### Defining symbols
 
 
 dnl Set VARIABLE to VALUE, verbatim, or 1.
@@ -909,6 +909,10 @@ define(AC_DEFINE_UNQUOTED,
 EOF
 ])
 
+
+dnl ### Setting output variables
+
+
 dnl This macro protects VARIABLE from being diverted twice
 dnl if this macro is called twice for it.
 dnl AC_SUBST(VARIABLE)
@@ -992,7 +996,7 @@ define(AC_LANG_RESTORE,
 [ifelse(AC_LANG_STACK, C, [ifelse(AC_LANG, C, , [AC_LANG_C])], [ifelse(AC_LANG, CPLUSPLUS, , [AC_LANG_CPLUSPLUS])])[]popdef([AC_LANG_STACK])])
 
 
-dnl ### Enforcing ordering constraints
+dnl ### Dependencies between macros
 
 
 dnl AC_BEFORE(THIS-MACRO-NAME, CALLED-MACRO-NAME)
@@ -1018,7 +1022,7 @@ define(AC_OBSOLETE,
 )])
 
 
-dnl ### Checking for files (caching)
+dnl ### Checking for programs
 
 
 dnl AC_CHECK_PROG(VARIABLE, PROG-TO-CHECK-FOR, VALUE-IF-FOUND
@@ -1132,6 +1136,10 @@ fi
 undefine([AC_VAR_NAME])dnl
 ])
 
+
+dnl ### Checking for libraries
+
+
 dnl AC_CHECK_LIB(LIBRARY, FUNCTION, [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND
 dnl              [, OTHER-LIBRARIES]]])
 AC_DEFUN(AC_CHECK_LIB,
@@ -1189,8 +1197,33 @@ undefine([AC_CV_NAME])dnl
 ])
 
 
-dnl ### Checking C system output (no caching)
+dnl ### Examining declarations
+
 
+dnl AC_TRY_CPP(INCLUDES, ACTION-IF-TRUE [, ACTION-IF-FALSE])
+AC_DEFUN(AC_TRY_CPP,
+[AC_REQUIRE_CPP()dnl
+cat > conftest.$ac_ext <<EOF
+[#]line __oline__ "configure"
+#include "confdefs.h"
+[$1]
+EOF
+dnl Capture the stderr of cpp.  eval is necessary to expand ac_cpp.
+dnl We used to copy stderr to stdout and capture it in a variable, but
+dnl that breaks under sh -x, which writes compile commands starting
+dnl with ` +' to stderr in eval and subshells.
+eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+ac_err=`grep -v '^ *+' conftest.out`
+if test -z "$ac_err"; then
+  ifelse([$2], , :, [rm -rf conftest*
+  $2])
+else
+  echo "$ac_err" >&AC_FD_CC
+ifelse([$3], , , [  rm -rf conftest*
+  $3
+])dnl
+fi
+rm -f conftest*])
 
 dnl AC_EGREP_HEADER(PATTERN, HEADER-FILE, ACTION-IF-FOUND [,
 dnl                 ACTION-IF-NOT-FOUND])
@@ -1222,6 +1255,10 @@ fi
 rm -f conftest*
 ])
 
+
+dnl ### Examining libraries
+
+
 dnl AC_COMPILE_CHECK(ECHO-TEXT, INCLUDES, FUNCTION-BODY,
 dnl                  ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND])
 AC_DEFUN(AC_COMPILE_CHECK,
@@ -1260,6 +1297,10 @@ fi
 rm -f conftest*]
 )
 
+
+dnl ### Checking for run-time features
+
+
 dnl AC_TRY_RUN(PROGRAM, ACTION-IF-TRUE [, ACTION-IF-FALSE
 dnl            [, ACTION-IF-CROSS-COMPILING]])
 AC_DEFUN(AC_TRY_RUN,
@@ -1290,33 +1331,8 @@ fi
 fi
 rm -fr conftest*])
 
-dnl AC_TRY_CPP(INCLUDES, ACTION-IF-TRUE [, ACTION-IF-FALSE])
-AC_DEFUN(AC_TRY_CPP,
-[AC_REQUIRE_CPP()dnl
-cat > conftest.$ac_ext <<EOF
-[#]line __oline__ "configure"
-#include "confdefs.h"
-[$1]
-EOF
-dnl Capture the stderr of cpp.  eval is necessary to expand ac_cpp.
-dnl We used to copy stderr to stdout and capture it in a variable, but
-dnl that breaks under sh -x, which writes compile commands starting
-dnl with ` +' to stderr in eval and subshells.
-eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-ac_err=`grep -v '^ *+' conftest.out`
-if test -z "$ac_err"; then
-  ifelse([$2], , :, [rm -rf conftest*
-  $2])
-else
-  echo "$ac_err" >&AC_FD_CC
-ifelse([$3], , , [  rm -rf conftest*
-  $3
-])dnl
-fi
-rm -f conftest*])
-
 
-dnl ### Checking for C features (caching)
+dnl ### Checking for header files
 
 
 dnl AC_CHECK_HEADER(HEADER-FILE, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND])
@@ -1349,6 +1365,10 @@ changequote([, ])dnl
 done
 ])
 
+
+dnl ### Checking for library functions
+
+
 dnl AC_CHECK_FUNC(FUNCTION, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND])
 AC_DEFUN(AC_CHECK_FUNC,
 [AC_MSG_CHECKING([for $1])
@@ -1400,6 +1420,10 @@ done
 AC_SUBST(LIBOBJS)dnl
 ])
 
+
+dnl ### Checking compiler characteristics
+
+
 dnl AC_CHECK_SIZEOF(TYPE)
 AC_DEFUN(AC_CHECK_SIZEOF,
 [changequote(<<, >>)dnl
@@ -1424,6 +1448,10 @@ undefine([AC_TYPE_NAME])dnl
 undefine([AC_CV_NAME])dnl
 ])
 
+
+dnl ### Checking for typedefs
+
+
 dnl AC_CHECK_TYPE(TYPE, DEFAULT)
 AC_DEFUN(AC_CHECK_TYPE,
 [AC_REQUIRE([AC_HEADER_STDC])dnl
@@ -1440,13 +1468,19 @@ fi
 ])
 
 
-dnl ### Controlling Autoconf output
+dnl ### Creating output files
 
 
 dnl AC_CONFIG_HEADER(HEADER-TO-CREATE ...)
 AC_DEFUN(AC_CONFIG_HEADER,
 [define(AC_LIST_HEADER, $1)])
 
+dnl Link each of the existing files SOURCE... to the corresponding
+dnl link name in DEST...
+dnl AC_LINK_FILES(SOURCE..., DEST...)
+AC_DEFUN(AC_LINK_FILES,
+[define([AC_LIST_FILES], [$1])define([AC_LIST_LINKS], [$2])])
+
 dnl AC_CONFIG_SUBDIRS(DIR ...)
 AC_DEFUN(AC_CONFIG_SUBDIRS,
 [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
index ea9b1698592b9d8d0f6d1dfd223e5b3ee7f3cd35..1a2019648d7b07ea85cdc3a0afcd970ca0cf9e66 100644 (file)
@@ -275,7 +275,6 @@ AC_DEFUN(AC_REQUIRE_CPP,
 
 AC_DEFUN(AC_PROG_LEX,
 [AC_CHECK_PROG(LEX, flex, flex, lex)
-AC_MSG_CHECKING(for $LEX library)
 if test -z "$LEXLIB"
 then
   case "$LEX" in
@@ -283,7 +282,6 @@ then
   *) LEXLIB="-ll" ;;
   esac
 fi
-AC_MSG_RESULT($LEXLIB)
 AC_SUBST(LEXLIB)])
 
 AC_DEFUN(AC_DECL_YYTEXT,