+Mon Nov 11 18:02:58 1996 David J MacKenzie <djm@catapult.va.pubnix.com>
+
+ * acgeneral.m4 (AC_TRY_COMPILE, AC_TRY_LINK): Deal with smart
+ compilers that know that an unused function doesn't have to be
+ linked in: call the function directly from main().
+ (Removing a legacy from when they tried to run the code, I think-djm.)
+ From fnf@ninemoons.com (Fred Fish).
+
+ * acspecific.m4 (AC_FUNC_GETLOADAVG): Rename ac_save_LIBS to avoid
+ a clash with AC_CHECK_LIB.
+ From Jim Meyering <meyering@asic.sc.ti.com>.
+ (AC_FUNC_FNMATCH, AC_FUNC_MMAP, AC_FUNC_VFORK, AC_FUNC_WAIT3,
+ AC_FUNC_STRCOLL, AC_FUNC_MEMCMP): Rename cache variables to avoid
+ wrong results if someone calls AC_CHECK_FUNC for these functions.
+
+ * autoheader.sh: Don't cmp with config.h.in if it doesn't exist yet.
+ Don't frob lines 1-@TOP@ or @BOTTOM@-end of acconfig.h's.
+ Accept TAB as well as SPC after #undef in acconfig.h's.
+
Sat Nov 9 01:54:04 1996 David J MacKenzie <djm@catapult.va.pubnix.com>
* Test release 2.10.1.
(AC_CHECK_LIB, AC_CHECK_HEADER, AC_CHECK_HEADERS): Replace use of
tr with sed, to avoid a bug in the AIX 4.1.3.0 tr reported by
Alain KNAFF <Alain.Knaff@imag.fr>. He says that version of
- tr interprets \055 magically like an unquoted -.
+ tr interprets \055 as a range specifier, like an unquoted -.
* acspecific.m4 (AC_PROG_MAKE_SET, AC_CHECK_HEADER_DIRENT,
AC_CHECK_HEADERS_DIRENT): Ditto.
Use AC_CHECK_FUNC in the system-dependent libs tests.
From Larry Schwimmer <rosebud@cyclone.stanford.edu>.
Wart removal: Don't require AC_ISC_POSIX.
- (AC_ISC_POSIX): Don't blather about being called before AC_TRY_LINK,
+ (AC_ISC_POSIX): Require AC_PROG_CC, since it uses $GCC.
+ From gvran@uddeborg.pp.se.
+ Don't blather about being called before AC_TRY_LINK,
which is now called in AC_PROG_CC. Don't encourage using this macro.
* acconfig.h (X_DISPLAY_MISSING): Add entry.
* acspecific.m4 (AC_PROG_CXX): Check for cc++ for NexT.
From Carl Edman <cedman@princeton.edu>.
- (AC_ISC_POSIX): Require AC_PROG_CC, since it uses $GCC.
- From gvran@uddeborg.pp.se.
(AC_PROG_CC, AC_PROG_CXX): Check whether -g works even if
C[XX]FLAGS is set. From T.E.Dickey <dickey@clark.net>
(AC_FUNC_FNMATCH): New macro.
(AC_CACHE_WRITE): Set the cache values only if not already set.
(AC_PARSEARGS, AC_OUTPUT): Allow giving an empty prefix or exec_prefix.
- AC_CONFIG_AUXDIR*.
-
* acgeneral.m4, acspecific.m4: Rename AC_CONFIG_AUX* to
AC_CONFIG_AUXDIR*.
------------------------------------------------------------------------------
-* Allow [ and ] in egrep patterns and AC_DEFINE args.
+* Allow [ and ] in AC_DEFINE args.
------------------------------------------------------------------------------
------------------------------------------------------------------------------
-Look into quoting of cache variable values reported by Paul Eggert.
+This is fine, but painfully slow.
+
+Sun Jun 30 04:43:08 1996 Paul Eggert <eggert@twinsun.com>
+
+ * acgeneral.m4 (AC_CACHE_SAVE):
+ Output each variable separately, so that values containing
+ special characters (e.g. ', \, newline) are handled correctly.
+
+--- acgeneral.m4 1996/11/09 22:20:01 1.211
++++ acgeneral.m4 1996/11/12 04:32:06
+@@ -1051,10 +1052,16 @@
+ dnl Allow a site initialization script to override cache values.
+ # Ultrix sh set writes to stderr and can't be redirected directly,
+ # and sets the high bit in the cache file unless we assign to the vars.
+-# HP-UX 10.01 sh prints single quotes around any value that contains spaces.
+-(set) 2>&1 |
+-sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)='*\([^']*\)'*/\1=\${\1='\2'}/p"\
+- >> confcache
++ac_vars=`(set) 2>&1 | sed -n '/^[a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*=/s/=.*//p'`
++# Output each variable separately so that values containing
++# special characters (e.g. ', \, newline) are handled correctly.
++for ac_var in $ac_vars; do
++ eval ac_val=\$$ac_var
++ sed -e "s/'/'\\\\''/g" -e "1s/^/$ac_var=\${$ac_var='&/" -e "\$s/\$/'}/" \
++ >> confcache <<EOF
++$ac_val
++EOF
++done
+ changequote([, ])dnl
+ if cmp -s $cache_file confcache; then
+ :
------------------------------------------------------------------------------
------------------------------------------------------------------------------
+Whichever AC_LINK_FILES directive comes last is that one that gets
+done.
+
+From Jim Meyering
+
+------------------------------------------------------------------------------
[#]line __oline__ "configure"
#include "confdefs.h"
[$1]
-int main() { return 0; }
-int t() {
+int main() {
[$2]
; return 0; }
EOF
[#]line __oline__ "configure"
#include "confdefs.h"
[$1]
-int main() { return 0; }
-int t() {
+int main() {
[$2]
; return 0; }
EOF
])
AC_DEFUN(AC_FUNC_FNMATCH,
-[AC_CACHE_CHECK(for working fnmatch, ac_cv_func_fnmatch,
+[AC_CACHE_CHECK(for working fnmatch, ac_cv_func_fnmatch_works,
# Some versions of Solaris or SCO have a broken fnmatch function.
# So we run a test program. If we are cross-compiling, take no chance.
# Thanks to John Oleynick and Franc,ois Pinard for this test.
[AC_TRY_RUN([main() { exit (fnmatch ("a*", "abc", 0) != 0); }],
-ac_cv_func_fnmatch=yes, ac_cv_func_fnmatch=no, ac_cv_func_fnmatch=no)])
-if test $ac_cv_func_fnmatch = yes; then
+ac_cv_func_fnmatch_works=yes, ac_cv_func_fnmatch_works=no,
+ac_cv_func_fnmatch_works=no)])
+if test $ac_cv_func_fnmatch_works = yes; then
AC_DEFINE(HAVE_FNMATCH)
fi
])
AC_DEFUN(AC_FUNC_MMAP,
[AC_CHECK_FUNCS(getpagesize)
-AC_CACHE_CHECK(for working mmap, ac_cv_func_mmap,
+AC_CACHE_CHECK(for working mmap, ac_cv_func_mmap_fixed_mapped,
[AC_TRY_RUN([
/* Thanks to Mike Haertel and Jim Avera for this test.
Here is a matrix of mmap possibilities:
unlink("conftestmmap");
exit(0);
}
-], ac_cv_func_mmap=yes, ac_cv_func_mmap=no, ac_cv_func_mmap=no)])
-if test $ac_cv_func_mmap = yes; then
+], ac_cv_func_mmap_fixed_mapped=yes, ac_cv_func_mmap_fixed_mapped=no,
+ac_cv_func_mmap_fixed_mapped=no)])
+if test $ac_cv_func_mmap_fixed_mapped = yes; then
AC_DEFINE(HAVE_MMAP)
fi
])
AC_DEFUN(AC_FUNC_VFORK,
[AC_REQUIRE([AC_TYPE_PID_T])dnl
AC_CHECK_HEADER(vfork.h, AC_DEFINE(HAVE_VFORK_H))
-AC_CACHE_CHECK(for working vfork, ac_cv_func_vfork,
+AC_CACHE_CHECK(for working vfork, ac_cv_func_vfork_works,
[AC_TRY_RUN([/* Thanks to Paul Eggert for this test. */
#include <stdio.h>
#include <sys/types.h>
);
}
}],
-ac_cv_func_vfork=yes, ac_cv_func_vfork=no, AC_CHECK_FUNC(vfork))])
-if test $ac_cv_func_vfork = no; then
+ac_cv_func_vfork_works=yes, ac_cv_func_vfork_works=no, AC_CHECK_FUNC(vfork))])
+if test $ac_cv_func_vfork_works = no; then
AC_DEFINE(vfork, fork)
fi
])
AC_DEFUN(AC_FUNC_WAIT3,
-[AC_CACHE_CHECK(for wait3 that fills in rusage, ac_cv_func_wait3,
+[AC_CACHE_CHECK(for wait3 that fills in rusage, ac_cv_func_wait3_rusage,
[AC_TRY_RUN([#include <sys/types.h>
#include <sys/time.h>
#include <sys/resource.h>
exit(r.ru_nvcsw == 0 && r.ru_majflt == 0 && r.ru_minflt == 0
&& r.ru_stime.tv_sec == 0 && r.ru_stime.tv_usec == 0);
}
-}], ac_cv_func_wait3=yes, ac_cv_func_wait3=no, ac_cv_func_wait3=no)])
-if test $ac_cv_func_wait3 = yes; then
+}], ac_cv_func_wait3_rusage=yes, ac_cv_func_wait3_rusage=no,
+ac_cv_func_wait3_rusage=no)])
+if test $ac_cv_func_wait3_rusage = yes; then
AC_DEFINE(HAVE_WAIT3)
fi
])
AC_DEFINE(HAVE_ALLOCA_H)
fi
-AC_CACHE_CHECK([for alloca], ac_cv_func_alloca,
+AC_CACHE_CHECK([for alloca], ac_cv_func_alloca_works,
[AC_TRY_LINK([
#ifdef __GNUC__
# define alloca __builtin_alloca
# endif
#endif
], [char *p = (char *) alloca(1);],
- ac_cv_func_alloca=yes, ac_cv_func_alloca=no)])
-if test $ac_cv_func_alloca = yes; then
+ ac_cv_func_alloca_works=yes, ac_cv_func_alloca_works=no)])
+if test $ac_cv_func_alloca_works = yes; then
AC_DEFINE(HAVE_ALLOCA)
fi
-if test $ac_cv_func_alloca = no; then
+if test $ac_cv_func_alloca_works = no; then
# The SVR3 libPW and SVR4 libucb both contain incompatible functions
# that cause trouble. Some versions do not even contain alloca or
# contain a buggy version. If you still want to use their alloca,
if test $ac_have_func = no; then
# There is a commonly available library for RS/6000 AIX.
# Since it is not a standard part of AIX, it might be installed locally.
- ac_save_LIBS="$LIBS" LIBS="-L/usr/local/lib $LIBS"
+ ac_getloadavg_LIBS="$LIBS" LIBS="-L/usr/local/lib $LIBS"
AC_CHECK_LIB(getloadavg, getloadavg,
- LIBS="-lgetloadavg $LIBS", LIBS="$ac_save_LIBS")
+ LIBS="-lgetloadavg $LIBS", LIBS="$ac_getloadavg_LIBS")
fi
# Make sure it is really in the library, if we think we found it.
])
AC_DEFUN(AC_FUNC_STRCOLL,
-[AC_CACHE_CHECK(for strcoll, ac_cv_func_strcoll,
+[AC_CACHE_CHECK(for strcoll, ac_cv_func_strcoll_works,
[AC_TRY_RUN([#include <string.h>
main ()
{
exit (strcoll ("abc", "def") >= 0 ||
strcoll ("ABC", "DEF") >= 0 ||
strcoll ("123", "456") >= 0);
-}], ac_cv_func_strcoll=yes, ac_cv_func_strcoll=no, ac_cv_func_strcoll=no)])
-if test $ac_cv_func_strcoll = yes; then
+}], ac_cv_func_strcoll_works=yes, ac_cv_func_strcoll_works=no,
+ac_cv_func_strcoll_works=no)])
+if test $ac_cv_func_strcoll_works = yes; then
AC_DEFINE(HAVE_STRCOLL)
fi
])
AC_CHECK_FUNC(strftime, [AC_DEFINE(HAVE_STRFTIME)])])
AC_DEFUN(AC_FUNC_MEMCMP,
-[AC_CACHE_CHECK(for 8-bit clean memcmp, ac_cv_func_memcmp,
+[AC_CACHE_CHECK(for 8-bit clean memcmp, ac_cv_func_memcmp_clean,
[AC_TRY_RUN([
main()
{
char c0 = 0x40, c1 = 0x80, c2 = 0x81;
exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
}
-], ac_cv_func_memcmp=yes, ac_cv_func_memcmp=no, ac_cv_func_memcmp=no)])
-test $ac_cv_func_memcmp = no && LIBOBJS="$LIBOBJS memcmp.o"
+], ac_cv_func_memcmp_clean=yes, ac_cv_func_memcmp_clean=no,
+ac_cv_func_memcmp_clean=no)])
+test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.o"
AC_SUBST(LIBOBJS)dnl
])
of information. The following macros print messages in ways appropriate
for each kind. The arguments to all of them get enclosed in shell
double quotes, so the shell performs variable and backquote substitution
-on them.
+on them. You can print a message containing a comma by quoting the
+message with the @code{m4} quote characters:
+
+@example
+AC_MSG_RESULT([never mind, I found the BASIC compiler])
+@end example
These macros are all wrappers around the @code{echo} shell command.
@code{configure} scripts should rarely need to run @code{echo} directly
#if test "$localdir" != .; then
# When running autoheader from autoreconf, this is how we get
# subdirectories' acconfig.h files.
- test -r ./acconfig.h && TEMPLATES="${TEMPLATES} ./acconfig.h"
+ #test -r ./acconfig.h && TEMPLATES="${TEMPLATES} ./acconfig.h"
#fi
test -r $localdir/acconfig.h && TEMPLATES="${TEMPLATES} $localdir/acconfig.h"
# This puts each template paragraph on its own line, separated by @s.
if test -n "$syms"; then
- # Make sure the boundary of template files is also the boundary
- # of the paragraph. Extra newlines don't hurt since they will
- # be removed.
- for t in $TEMPLATES; do cat $t; echo; echo; done |
- # The sed script is suboptimal because it has to take care of
- # some broken seds (e.g. AIX) that remove '\n' from the
- # pattern/hold space if the line is empty. (junio@twinsun.com).
- sed -n -e '
+ # Make sure the boundary of template files is also the boundary
+ # of the paragraph. Extra newlines don't hurt since they will
+ # be removed.
+ # Undocumented useless feature: stuff outside of @TOP@ and @BOTTOM@
+ # is ignored in the systemwide acconfig.h too.
+ for t in $TEMPLATES; do
+ sedscript=""
+ grep @TOP@ $t >/dev/null && sedscript="1,/@TOP@/d;"
+ grep @BOTTOM@ $t >/dev/null && sedscript="$sedscript /@BOTTOM@/,\$d;"
+ # This substitution makes "#undef<TAB>FOO" in acconfig.h work.
+ sed -n -e "$sedscript s/ / /g; p" $t
+ echo; echo
+ done |
+ # The sed script is suboptimal because it has to take care of
+ # some broken seds (e.g. AIX) that remove '\n' from the
+ # pattern/hold space if the line is empty. (junio@twinsun.com).
+ sed -n -e '
/^[ ]*$/{
x
s/\n/@/g
x
}
H' | sed -e 's/@@*/@/g' |
- # Select each paragraph that refers to a symbol we picked out above.
- # Some fgrep's have limits on the number of lines that can be in the
- # pattern on the command line, so use a temporary file containing the
- # pattern.
- (fgrep_tmp=${TMPDIR-/tmp}/autoh$$
- trap "rm -f $fgrep_tmp; exit 1" 1 2 15
- cat > $fgrep_tmp <<EOF
+ # Select each paragraph that refers to a symbol we picked out above.
+ # Some fgrep's have limits on the number of lines that can be in the
+ # pattern on the command line, so use a temporary file containing the
+ # pattern.
+ (fgrep_tmp=${TMPDIR-/tmp}/autoh$$
+ trap "rm -f $fgrep_tmp; exit 1" 1 2 15
+ cat > $fgrep_tmp <<EOF
$syms
EOF
- fgrep -f $fgrep_tmp
- rm -f $fgrep_tmp) |
- tr @ \\012
+ fgrep -f $fgrep_tmp
+ rm -f $fgrep_tmp) |
+ tr @ \\012
fi
echo "$types" | tr , \\012 | sort | uniq | while read ctype; do
sed -n '/@BOTTOM@/,${/@BOTTOM@/!p;}' $localdir/acconfig.h
test -f ${config_h}.bot && cat ${config_h}.bot
-echo '#endif /* _CONFIG_H */'
+cat <<EOF
+
+#endif /* _CONFIG_H */
+EOF
status=0
if test $# -eq 0; then
if test $status -eq 0; then
- if cmp -s $tmpout ${config_h_in}; then
- rm -f $tmpout
+ if test -f ${config_h_in} && cmp -s $tmpout ${config_h_in}; then
+ rm -f $tmpout # File didn't change, so don't update its mod time.
else
mv -f $tmpout ${config_h_in}
fi
#if test "$localdir" != .; then
# When running autoheader from autoreconf, this is how we get
# subdirectories' acconfig.h files.
- test -r ./acconfig.h && TEMPLATES="${TEMPLATES} ./acconfig.h"
+ #test -r ./acconfig.h && TEMPLATES="${TEMPLATES} ./acconfig.h"
#fi
test -r $localdir/acconfig.h && TEMPLATES="${TEMPLATES} $localdir/acconfig.h"
# This puts each template paragraph on its own line, separated by @s.
if test -n "$syms"; then
- # Make sure the boundary of template files is also the boundary
- # of the paragraph. Extra newlines don't hurt since they will
- # be removed.
- for t in $TEMPLATES; do cat $t; echo; echo; done |
- # The sed script is suboptimal because it has to take care of
- # some broken seds (e.g. AIX) that remove '\n' from the
- # pattern/hold space if the line is empty. (junio@twinsun.com).
- sed -n -e '
+ # Make sure the boundary of template files is also the boundary
+ # of the paragraph. Extra newlines don't hurt since they will
+ # be removed.
+ # Undocumented useless feature: stuff outside of @TOP@ and @BOTTOM@
+ # is ignored in the systemwide acconfig.h too.
+ for t in $TEMPLATES; do
+ sedscript=""
+ grep @TOP@ $t >/dev/null && sedscript="1,/@TOP@/d;"
+ grep @BOTTOM@ $t >/dev/null && sedscript="$sedscript /@BOTTOM@/,\$d;"
+ # This substitution makes "#undef<TAB>FOO" in acconfig.h work.
+ sed -n -e "$sedscript s/ / /g; p" $t
+ echo; echo
+ done |
+ # The sed script is suboptimal because it has to take care of
+ # some broken seds (e.g. AIX) that remove '\n' from the
+ # pattern/hold space if the line is empty. (junio@twinsun.com).
+ sed -n -e '
/^[ ]*$/{
x
s/\n/@/g
x
}
H' | sed -e 's/@@*/@/g' |
- # Select each paragraph that refers to a symbol we picked out above.
- # Some fgrep's have limits on the number of lines that can be in the
- # pattern on the command line, so use a temporary file containing the
- # pattern.
- (fgrep_tmp=${TMPDIR-/tmp}/autoh$$
- trap "rm -f $fgrep_tmp; exit 1" 1 2 15
- cat > $fgrep_tmp <<EOF
+ # Select each paragraph that refers to a symbol we picked out above.
+ # Some fgrep's have limits on the number of lines that can be in the
+ # pattern on the command line, so use a temporary file containing the
+ # pattern.
+ (fgrep_tmp=${TMPDIR-/tmp}/autoh$$
+ trap "rm -f $fgrep_tmp; exit 1" 1 2 15
+ cat > $fgrep_tmp <<EOF
$syms
EOF
- fgrep -f $fgrep_tmp
- rm -f $fgrep_tmp) |
- tr @ \\012
+ fgrep -f $fgrep_tmp
+ rm -f $fgrep_tmp) |
+ tr @ \\012
fi
echo "$types" | tr , \\012 | sort | uniq | while read ctype; do
sed -n '/@BOTTOM@/,${/@BOTTOM@/!p;}' $localdir/acconfig.h
test -f ${config_h}.bot && cat ${config_h}.bot
-echo '#endif /* _CONFIG_H */'
+cat <<EOF
+
+#endif /* _CONFIG_H */
+EOF
status=0
if test $# -eq 0; then
if test $status -eq 0; then
- if cmp -s $tmpout ${config_h_in}; then
- rm -f $tmpout
+ if test -f ${config_h_in} && cmp -s $tmpout ${config_h_in}; then
+ rm -f $tmpout # File didn't change, so don't update its mod time.
else
mv -f $tmpout ${config_h_in}
fi
#if test "$localdir" != .; then
# When running autoheader from autoreconf, this is how we get
# subdirectories' acconfig.h files.
- test -r ./acconfig.h && TEMPLATES="${TEMPLATES} ./acconfig.h"
+ #test -r ./acconfig.h && TEMPLATES="${TEMPLATES} ./acconfig.h"
#fi
test -r $localdir/acconfig.h && TEMPLATES="${TEMPLATES} $localdir/acconfig.h"
# This puts each template paragraph on its own line, separated by @s.
if test -n "$syms"; then
- # Make sure the boundary of template files is also the boundary
- # of the paragraph. Extra newlines don't hurt since they will
- # be removed.
- for t in $TEMPLATES; do cat $t; echo; echo; done |
- # The sed script is suboptimal because it has to take care of
- # some broken seds (e.g. AIX) that remove '\n' from the
- # pattern/hold space if the line is empty. (junio@twinsun.com).
- sed -n -e '
+ # Make sure the boundary of template files is also the boundary
+ # of the paragraph. Extra newlines don't hurt since they will
+ # be removed.
+ # Undocumented useless feature: stuff outside of @TOP@ and @BOTTOM@
+ # is ignored in the systemwide acconfig.h too.
+ for t in $TEMPLATES; do
+ sedscript=""
+ grep @TOP@ $t >/dev/null && sedscript="1,/@TOP@/d;"
+ grep @BOTTOM@ $t >/dev/null && sedscript="$sedscript /@BOTTOM@/,\$d;"
+ # This substitution makes "#undef<TAB>FOO" in acconfig.h work.
+ sed -n -e "$sedscript s/ / /g; p" $t
+ echo; echo
+ done |
+ # The sed script is suboptimal because it has to take care of
+ # some broken seds (e.g. AIX) that remove '\n' from the
+ # pattern/hold space if the line is empty. (junio@twinsun.com).
+ sed -n -e '
/^[ ]*$/{
x
s/\n/@/g
x
}
H' | sed -e 's/@@*/@/g' |
- # Select each paragraph that refers to a symbol we picked out above.
- # Some fgrep's have limits on the number of lines that can be in the
- # pattern on the command line, so use a temporary file containing the
- # pattern.
- (fgrep_tmp=${TMPDIR-/tmp}/autoh$$
- trap "rm -f $fgrep_tmp; exit 1" 1 2 15
- cat > $fgrep_tmp <<EOF
+ # Select each paragraph that refers to a symbol we picked out above.
+ # Some fgrep's have limits on the number of lines that can be in the
+ # pattern on the command line, so use a temporary file containing the
+ # pattern.
+ (fgrep_tmp=${TMPDIR-/tmp}/autoh$$
+ trap "rm -f $fgrep_tmp; exit 1" 1 2 15
+ cat > $fgrep_tmp <<EOF
$syms
EOF
- fgrep -f $fgrep_tmp
- rm -f $fgrep_tmp) |
- tr @ \\012
+ fgrep -f $fgrep_tmp
+ rm -f $fgrep_tmp) |
+ tr @ \\012
fi
echo "$types" | tr , \\012 | sort | uniq | while read ctype; do
sed -n '/@BOTTOM@/,${/@BOTTOM@/!p;}' $localdir/acconfig.h
test -f ${config_h}.bot && cat ${config_h}.bot
-echo '#endif /* _CONFIG_H */'
+cat <<EOF
+
+#endif /* _CONFIG_H */
+EOF
status=0
if test $# -eq 0; then
if test $status -eq 0; then
- if cmp -s $tmpout ${config_h_in}; then
- rm -f $tmpout
+ if test -f ${config_h_in} && cmp -s $tmpout ${config_h_in}; then
+ rm -f $tmpout # File didn't change, so don't update its mod time.
else
mv -f $tmpout ${config_h_in}
fi
| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
-e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/
exit 0 ;;
+ CRAY*TS:*:*:*)
+ echo t90-cray-unicos${UNAME_RELEASE}
+ exit 0 ;;
CRAY-2:*:*:*)
echo cray2-cray-unicos
exit 0 ;;
of information. The following macros print messages in ways appropriate
for each kind. The arguments to all of them get enclosed in shell
double quotes, so the shell performs variable and backquote substitution
-on them.
+on them. You can print a message containing a comma by quoting the
+message with the @code{m4} quote characters:
+
+@example
+AC_MSG_RESULT([never mind, I found the BASIC compiler])
+@end example
These macros are all wrappers around the @code{echo} shell command.
@code{configure} scripts should rarely need to run @code{echo} directly
[#]line __oline__ "configure"
#include "confdefs.h"
[$1]
-int main() { return 0; }
-int t() {
+int main() {
[$2]
; return 0; }
EOF
[#]line __oline__ "configure"
#include "confdefs.h"
[$1]
-int main() { return 0; }
-int t() {
+int main() {
[$2]
; return 0; }
EOF
])
AC_DEFUN(AC_FUNC_FNMATCH,
-[AC_CACHE_CHECK(for working fnmatch, ac_cv_func_fnmatch,
+[AC_CACHE_CHECK(for working fnmatch, ac_cv_func_fnmatch_works,
# Some versions of Solaris or SCO have a broken fnmatch function.
# So we run a test program. If we are cross-compiling, take no chance.
# Thanks to John Oleynick and Franc,ois Pinard for this test.
[AC_TRY_RUN([main() { exit (fnmatch ("a*", "abc", 0) != 0); }],
-ac_cv_func_fnmatch=yes, ac_cv_func_fnmatch=no, ac_cv_func_fnmatch=no)])
-if test $ac_cv_func_fnmatch = yes; then
+ac_cv_func_fnmatch_works=yes, ac_cv_func_fnmatch_works=no,
+ac_cv_func_fnmatch_works=no)])
+if test $ac_cv_func_fnmatch_works = yes; then
AC_DEFINE(HAVE_FNMATCH)
fi
])
AC_DEFUN(AC_FUNC_MMAP,
[AC_CHECK_FUNCS(getpagesize)
-AC_CACHE_CHECK(for working mmap, ac_cv_func_mmap,
+AC_CACHE_CHECK(for working mmap, ac_cv_func_mmap_fixed_mapped,
[AC_TRY_RUN([
/* Thanks to Mike Haertel and Jim Avera for this test.
Here is a matrix of mmap possibilities:
unlink("conftestmmap");
exit(0);
}
-], ac_cv_func_mmap=yes, ac_cv_func_mmap=no, ac_cv_func_mmap=no)])
-if test $ac_cv_func_mmap = yes; then
+], ac_cv_func_mmap_fixed_mapped=yes, ac_cv_func_mmap_fixed_mapped=no,
+ac_cv_func_mmap_fixed_mapped=no)])
+if test $ac_cv_func_mmap_fixed_mapped = yes; then
AC_DEFINE(HAVE_MMAP)
fi
])
AC_DEFUN(AC_FUNC_VFORK,
[AC_REQUIRE([AC_TYPE_PID_T])dnl
AC_CHECK_HEADER(vfork.h, AC_DEFINE(HAVE_VFORK_H))
-AC_CACHE_CHECK(for working vfork, ac_cv_func_vfork,
+AC_CACHE_CHECK(for working vfork, ac_cv_func_vfork_works,
[AC_TRY_RUN([/* Thanks to Paul Eggert for this test. */
#include <stdio.h>
#include <sys/types.h>
);
}
}],
-ac_cv_func_vfork=yes, ac_cv_func_vfork=no, AC_CHECK_FUNC(vfork))])
-if test $ac_cv_func_vfork = no; then
+ac_cv_func_vfork_works=yes, ac_cv_func_vfork_works=no, AC_CHECK_FUNC(vfork))])
+if test $ac_cv_func_vfork_works = no; then
AC_DEFINE(vfork, fork)
fi
])
AC_DEFUN(AC_FUNC_WAIT3,
-[AC_CACHE_CHECK(for wait3 that fills in rusage, ac_cv_func_wait3,
+[AC_CACHE_CHECK(for wait3 that fills in rusage, ac_cv_func_wait3_rusage,
[AC_TRY_RUN([#include <sys/types.h>
#include <sys/time.h>
#include <sys/resource.h>
exit(r.ru_nvcsw == 0 && r.ru_majflt == 0 && r.ru_minflt == 0
&& r.ru_stime.tv_sec == 0 && r.ru_stime.tv_usec == 0);
}
-}], ac_cv_func_wait3=yes, ac_cv_func_wait3=no, ac_cv_func_wait3=no)])
-if test $ac_cv_func_wait3 = yes; then
+}], ac_cv_func_wait3_rusage=yes, ac_cv_func_wait3_rusage=no,
+ac_cv_func_wait3_rusage=no)])
+if test $ac_cv_func_wait3_rusage = yes; then
AC_DEFINE(HAVE_WAIT3)
fi
])
AC_DEFINE(HAVE_ALLOCA_H)
fi
-AC_CACHE_CHECK([for alloca], ac_cv_func_alloca,
+AC_CACHE_CHECK([for alloca], ac_cv_func_alloca_works,
[AC_TRY_LINK([
#ifdef __GNUC__
# define alloca __builtin_alloca
# endif
#endif
], [char *p = (char *) alloca(1);],
- ac_cv_func_alloca=yes, ac_cv_func_alloca=no)])
-if test $ac_cv_func_alloca = yes; then
+ ac_cv_func_alloca_works=yes, ac_cv_func_alloca_works=no)])
+if test $ac_cv_func_alloca_works = yes; then
AC_DEFINE(HAVE_ALLOCA)
fi
-if test $ac_cv_func_alloca = no; then
+if test $ac_cv_func_alloca_works = no; then
# The SVR3 libPW and SVR4 libucb both contain incompatible functions
# that cause trouble. Some versions do not even contain alloca or
# contain a buggy version. If you still want to use their alloca,
if test $ac_have_func = no; then
# There is a commonly available library for RS/6000 AIX.
# Since it is not a standard part of AIX, it might be installed locally.
- ac_save_LIBS="$LIBS" LIBS="-L/usr/local/lib $LIBS"
+ ac_getloadavg_LIBS="$LIBS" LIBS="-L/usr/local/lib $LIBS"
AC_CHECK_LIB(getloadavg, getloadavg,
- LIBS="-lgetloadavg $LIBS", LIBS="$ac_save_LIBS")
+ LIBS="-lgetloadavg $LIBS", LIBS="$ac_getloadavg_LIBS")
fi
# Make sure it is really in the library, if we think we found it.
])
AC_DEFUN(AC_FUNC_STRCOLL,
-[AC_CACHE_CHECK(for strcoll, ac_cv_func_strcoll,
+[AC_CACHE_CHECK(for strcoll, ac_cv_func_strcoll_works,
[AC_TRY_RUN([#include <string.h>
main ()
{
exit (strcoll ("abc", "def") >= 0 ||
strcoll ("ABC", "DEF") >= 0 ||
strcoll ("123", "456") >= 0);
-}], ac_cv_func_strcoll=yes, ac_cv_func_strcoll=no, ac_cv_func_strcoll=no)])
-if test $ac_cv_func_strcoll = yes; then
+}], ac_cv_func_strcoll_works=yes, ac_cv_func_strcoll_works=no,
+ac_cv_func_strcoll_works=no)])
+if test $ac_cv_func_strcoll_works = yes; then
AC_DEFINE(HAVE_STRCOLL)
fi
])
AC_CHECK_FUNC(strftime, [AC_DEFINE(HAVE_STRFTIME)])])
AC_DEFUN(AC_FUNC_MEMCMP,
-[AC_CACHE_CHECK(for 8-bit clean memcmp, ac_cv_func_memcmp,
+[AC_CACHE_CHECK(for 8-bit clean memcmp, ac_cv_func_memcmp_clean,
[AC_TRY_RUN([
main()
{
char c0 = 0x40, c1 = 0x80, c2 = 0x81;
exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
}
-], ac_cv_func_memcmp=yes, ac_cv_func_memcmp=no, ac_cv_func_memcmp=no)])
-test $ac_cv_func_memcmp = no && LIBOBJS="$LIBOBJS memcmp.o"
+], ac_cv_func_memcmp_clean=yes, ac_cv_func_memcmp_clean=no,
+ac_cv_func_memcmp_clean=no)])
+test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.o"
AC_SUBST(LIBOBJS)dnl
])