+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
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.
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:
[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
[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
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,
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
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
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
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
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
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
[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
[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
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,