]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
more tweaks
authorDavid MacKenzie <djm@djmnet.org>
Thu, 14 Nov 1996 18:03:47 +0000 (18:03 +0000)
committerDavid MacKenzie <djm@djmnet.org>
Thu, 14 Nov 1996 18:03:47 +0000 (18:03 +0000)
ChangeLog
NEWS
acspecific.m4
autoheader.in
autoheader.sh
bin/autoheader.in
lib/autoconf/specific.m4

index 2556827e847c860743ce547ebe37be0f1030a9ab..ace43d56accccf210f34f683731974aceadeddb2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+Thu Nov 14 11:15:27 1996  David J MacKenzie  <djm@catapult.va.pubnix.com>
+
+       * autoheader.sh: Take the multiple-include protection back out.
+       It's not needed for a file that just #defines stuff, and, as Ken
+       Raeburn pointed out in Apr 1994:
+       Since you don't make it optional, and you don't give the writer of
+       configure.in much control over the name of the symbol, it also would
+       prevent one "config.h" file in a subdirectory from including
+       "../config.h" as a way to avoid duplicating some common tests.
+
+       * acspecific.m4 (AC_PROG_CC_WORKS, AC_PROG_CXX_WORKS): Don't try
+       running a program, just try linking.
+
 Wed Nov 13 10:07:14 1996  David J MacKenzie  <djm@catapult.va.pubnix.com>
 
        * acspecific.m4 (AC_PROG_CC, AC_PROG_CXX): Check whether the
@@ -7,6 +20,8 @@ Wed Nov 13 10:07:14 1996  David J MacKenzie  <djm@catapult.va.pubnix.com>
        of CC doesn't get eval'd correctly to actually work.
        Directly test whether a space is needed after -R.
        Don't add "-L" to LDFLAGS if $x_libraries is empty.
+       (AC_FUNC_STRFTIME): Check for it in -lintl only if it's not in the
+       normal libraries.
 
        * Test release 2.10.3.
 
diff --git a/NEWS b/NEWS
index 0c74043c405ad09dc3f6ce67cec951ee41f025f6..59480c399f56777a299b6b5165c480e2eb508c9d 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -9,7 +9,6 @@ Major changes in release 2.11:
   fail are saved in config.log. 
 * Another workaround has been added for seds with small command length limits.
 * config.sub and config.guess recognize more system types.
-* autoheader.sh adds multiple-inclusion protection for config.h.
 * Bug fixes.
 \f
 Major changes in release 2.10:
index 5e98312f22d4c278897db1853f53fc041a3aef82..5383478de1a1bcbd2e8b49e5e793865d95417622 100644 (file)
@@ -174,9 +174,11 @@ AC_DEFUN(AC_PROG_CC_WORKS,
 [AC_MSG_CHECKING([whether the C compiler ($CC $CFLAGS $LDFLAGS) works])
 AC_LANG_SAVE
 AC_LANG_C
-AC_TRY_RUN_NATIVE([main() { exit(0); }],
-           ac_cv_prog_cc_works=yes, ac_cv_prog_cc_works=no,
-           AC_TRY_LINK(, , ac_cv_prog_cc_works=yes, ac_cv_prog_cc_works=no))
+dnl We can't try running a program here because we don't know yet if
+dnl we're cross-compiling.  And we can't check for that first, because the
+dnl cross-compiling test being fooled by non-working compiler installations
+dnl is the reason we're doing this in the first place.
+AC_TRY_LINK(, , ac_cv_prog_cc_works=yes, ac_cv_prog_cc_works=no)
 AC_LANG_RESTORE
 AC_MSG_RESULT($ac_cv_prog_cc_works)
 if test $ac_cv_prog_cc_works = no; then
@@ -188,9 +190,11 @@ AC_DEFUN(AC_PROG_CXX_WORKS,
 [AC_MSG_CHECKING([whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works])
 AC_LANG_SAVE
 AC_LANG_CPLUSPLUS
-AC_TRY_RUN_NATIVE([main() { exit(0); }],
-           ac_cv_prog_cxx_works=yes, ac_cv_prog_cxx_works=no,
-           AC_TRY_LINK(, , ac_cv_prog_cxx_works=yes, ac_cv_prog_cxx_works=no))
+dnl We can't try running a program here because we don't know yet if
+dnl we're cross-compiling.  And we can't check for that first, because the
+dnl cross-compiling test being fooled by non-working compiler installations
+dnl is the reason we're doing this in the first place.
+AC_TRY_LINK(, , ac_cv_prog_cxx_works=yes, ac_cv_prog_cxx_works=no)
 AC_LANG_RESTORE
 AC_MSG_RESULT($ac_cv_prog_cxx_works)
 if test $ac_cv_prog_cxx_works = no; then
@@ -1419,9 +1423,11 @@ AC_CHECK_LIB(sun, getmntent, LIBS="-lsun $LIBS",
 AC_CHECK_FUNC(getmntent, [AC_DEFINE(HAVE_GETMNTENT)])])
 
 AC_DEFUN(AC_FUNC_STRFTIME,
+[AC_CHECK_FUNC(strftime, [AC_DEFINE(HAVE_STRFTIME)],
 [# strftime is in -lintl on SCO UNIX.
-AC_CHECK_LIB(intl, strftime, LIBS="-lintl $LIBS")
-AC_CHECK_FUNC(strftime, [AC_DEFINE(HAVE_STRFTIME)])])
+AC_CHECK_LIB(intl, strftime, 
+[AC_DEFINE(HAVE_STRFTIME)
+LIBS="-lintl $LIBS"])])])
 
 AC_DEFUN(AC_FUNC_MEMCMP,
 [AC_CACHE_CHECK(for 8-bit clean memcmp, ac_cv_func_memcmp_clean,
index 03ca1f2b9d0dba1b95237bca423f0f852020f070..e47ef20271c5c30216462ba82a0107fe2fe6cf8b 100644 (file)
@@ -154,8 +154,6 @@ esac
 cat <<EOF
 /* ${config_h_in}.  Generated automatically from $infile by autoheader.  */
 
-#ifndef _CONFIG_H
-#define _CONFIG_H
 EOF
 
 test -r ${config_h}.top && cat ${config_h}.top
@@ -247,11 +245,6 @@ test -r $localdir/acconfig.h &&
   sed -n '/@BOTTOM@/,${/@BOTTOM@/!p;}' $localdir/acconfig.h
 test -f ${config_h}.bot && cat ${config_h}.bot
 
-cat <<EOF
-
-#endif /* _CONFIG_H */
-EOF
-
 status=0
 
 if test -n "$syms"; then
index 03ca1f2b9d0dba1b95237bca423f0f852020f070..e47ef20271c5c30216462ba82a0107fe2fe6cf8b 100644 (file)
@@ -154,8 +154,6 @@ esac
 cat <<EOF
 /* ${config_h_in}.  Generated automatically from $infile by autoheader.  */
 
-#ifndef _CONFIG_H
-#define _CONFIG_H
 EOF
 
 test -r ${config_h}.top && cat ${config_h}.top
@@ -247,11 +245,6 @@ test -r $localdir/acconfig.h &&
   sed -n '/@BOTTOM@/,${/@BOTTOM@/!p;}' $localdir/acconfig.h
 test -f ${config_h}.bot && cat ${config_h}.bot
 
-cat <<EOF
-
-#endif /* _CONFIG_H */
-EOF
-
 status=0
 
 if test -n "$syms"; then
index 03ca1f2b9d0dba1b95237bca423f0f852020f070..e47ef20271c5c30216462ba82a0107fe2fe6cf8b 100644 (file)
@@ -154,8 +154,6 @@ esac
 cat <<EOF
 /* ${config_h_in}.  Generated automatically from $infile by autoheader.  */
 
-#ifndef _CONFIG_H
-#define _CONFIG_H
 EOF
 
 test -r ${config_h}.top && cat ${config_h}.top
@@ -247,11 +245,6 @@ test -r $localdir/acconfig.h &&
   sed -n '/@BOTTOM@/,${/@BOTTOM@/!p;}' $localdir/acconfig.h
 test -f ${config_h}.bot && cat ${config_h}.bot
 
-cat <<EOF
-
-#endif /* _CONFIG_H */
-EOF
-
 status=0
 
 if test -n "$syms"; then
index 5e98312f22d4c278897db1853f53fc041a3aef82..5383478de1a1bcbd2e8b49e5e793865d95417622 100644 (file)
@@ -174,9 +174,11 @@ AC_DEFUN(AC_PROG_CC_WORKS,
 [AC_MSG_CHECKING([whether the C compiler ($CC $CFLAGS $LDFLAGS) works])
 AC_LANG_SAVE
 AC_LANG_C
-AC_TRY_RUN_NATIVE([main() { exit(0); }],
-           ac_cv_prog_cc_works=yes, ac_cv_prog_cc_works=no,
-           AC_TRY_LINK(, , ac_cv_prog_cc_works=yes, ac_cv_prog_cc_works=no))
+dnl We can't try running a program here because we don't know yet if
+dnl we're cross-compiling.  And we can't check for that first, because the
+dnl cross-compiling test being fooled by non-working compiler installations
+dnl is the reason we're doing this in the first place.
+AC_TRY_LINK(, , ac_cv_prog_cc_works=yes, ac_cv_prog_cc_works=no)
 AC_LANG_RESTORE
 AC_MSG_RESULT($ac_cv_prog_cc_works)
 if test $ac_cv_prog_cc_works = no; then
@@ -188,9 +190,11 @@ AC_DEFUN(AC_PROG_CXX_WORKS,
 [AC_MSG_CHECKING([whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works])
 AC_LANG_SAVE
 AC_LANG_CPLUSPLUS
-AC_TRY_RUN_NATIVE([main() { exit(0); }],
-           ac_cv_prog_cxx_works=yes, ac_cv_prog_cxx_works=no,
-           AC_TRY_LINK(, , ac_cv_prog_cxx_works=yes, ac_cv_prog_cxx_works=no))
+dnl We can't try running a program here because we don't know yet if
+dnl we're cross-compiling.  And we can't check for that first, because the
+dnl cross-compiling test being fooled by non-working compiler installations
+dnl is the reason we're doing this in the first place.
+AC_TRY_LINK(, , ac_cv_prog_cxx_works=yes, ac_cv_prog_cxx_works=no)
 AC_LANG_RESTORE
 AC_MSG_RESULT($ac_cv_prog_cxx_works)
 if test $ac_cv_prog_cxx_works = no; then
@@ -1419,9 +1423,11 @@ AC_CHECK_LIB(sun, getmntent, LIBS="-lsun $LIBS",
 AC_CHECK_FUNC(getmntent, [AC_DEFINE(HAVE_GETMNTENT)])])
 
 AC_DEFUN(AC_FUNC_STRFTIME,
+[AC_CHECK_FUNC(strftime, [AC_DEFINE(HAVE_STRFTIME)],
 [# strftime is in -lintl on SCO UNIX.
-AC_CHECK_LIB(intl, strftime, LIBS="-lintl $LIBS")
-AC_CHECK_FUNC(strftime, [AC_DEFINE(HAVE_STRFTIME)])])
+AC_CHECK_LIB(intl, strftime, 
+[AC_DEFINE(HAVE_STRFTIME)
+LIBS="-lintl $LIBS"])])])
 
 AC_DEFUN(AC_FUNC_MEMCMP,
 [AC_CACHE_CHECK(for 8-bit clean memcmp, ac_cv_func_memcmp_clean,