From c77ff9f7d2c1fff43e6da5079c45edadbea89061 Mon Sep 17 00:00:00 2001 From: David MacKenzie Date: Wed, 22 Nov 1995 17:42:19 +0000 Subject: [PATCH] more bug fixes --- ChangeLog | 36 ++++++++++++++++++++++++++++++++++++ NEWS | 4 ++-- acgeneral.m4 | 34 +++++++++++++++++++--------------- acspecific.m4 | 30 ++++++++++++++---------------- autoconf.texi | 20 ++++++++++---------- autoheader.in | 1 - autoheader.m4 | 14 +++++++++++++- autoheader.sh | 1 - bin/autoheader.in | 1 - configure | 18 +++++++++++------- doc/autoconf.texi | 20 ++++++++++---------- lib/autoconf/general.m4 | 34 +++++++++++++++++++--------------- lib/autoconf/specific.m4 | 30 ++++++++++++++---------------- 13 files changed, 148 insertions(+), 95 deletions(-) diff --git a/ChangeLog b/ChangeLog index 976625e95..92f0452c0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,39 @@ +Wed Nov 22 11:01:16 1995 David J. MacKenzie + + * Version 2.7. + + * autoheader.m4 (AC_CHECK_FUNCS, AC_CHECK_HEADERS): Expand the + optional action args. From jj@jfch.vc.cvut.cz (Jakub Jelinek). + + * acgeneral.m4 (AC_CHECK_LIB): Translate - in library names to _. + (AC_ARG_PROGRAM): Use cat instead of echo to avoid SysV echo + interpreting backslashes. From kim@tac.nyc.ny.US (Kimmo Suominen). + (AC_OUTPUT_FILES): Quote $ and \ for being in an unquoted here + document. From Paul Eggert . + + * acspecific.m4 (AC_PATH_X_XMKMF): Use ${MAKE-make}, not plain make. + (AC_C_CONST): Avoid a warning from g++. + From tgl@sss.pgh.pa.us (Tom Lane). + (AC_FUNC_MMAP): Check for valloc and getpagesize; don't rely on + predefines. + (AC_HEADER_STDC): If cross-compiling, assume the ctype macros are + ANSI. From dje@cygnus.com (Doug Evans). + (AC_TYPE_SIGNAL) [__cplusplus]: Give a full prototype. + From churritz@cts.com (Chad Hurwitz). + (AC_FUNC_VFORK): If cross-compiling, use AC_CHECK_FUNC instead. + From steve chamberlain . + +Tue Sep 5 20:37:48 1995 Paul Eggert + + * acspecific.m4 (X_LIBS): Use `-R lib', not `-Rlib', since Sun + CC 3.0 requires this. + +Tue Aug 8 20:10:12 1995 Paul Eggert + + * acgeneral.m4: When creating config.status, start a new + here-script just before building conftest.subs, to work around + a bug in the HP-UX 9 HP9000-800 sh. + Tue Nov 21 17:36:41 1995 David J. MacKenzie * Makefile.in (install): Undo last ASCRIPTS panic change. diff --git a/NEWS b/NEWS index 5cc9f520d..1e8379883 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,6 @@ -Major changes in release 2.6: +Major changes in releases 2.6 and 2.7: -Just fixed a few silly bugs. +* Bug fixes. Major changes in release 2.5: diff --git a/acgeneral.m4 b/acgeneral.m4 index 2279df957..21105e87f 100644 --- a/acgeneral.m4 +++ b/acgeneral.m4 @@ -51,7 +51,7 @@ dnl divert(-1)dnl Throw away output until AC_INIT is called. changequote([, ]) -define(AC_ACVERSION, 2.6) +define(AC_ACVERSION, 2.7) dnl Some old m4's don't support m4exit. But they provide dnl equivalent functionality by core dumping because of the @@ -759,8 +759,10 @@ AC_DEFUN(AC_ARG_PROGRAM, [if test "$program_transform_name" = s,x,x,; then program_transform_name= else - # Double any \ or $. - echo 's,\\,\\\\,g; s,\$,$$,g' > conftestsed + # Double any \ or $. echo might interpret backslashes. + cat <<\EOF_SED > conftestsed +s,\\,\\\\,g; s,\$,$$,g +EOF_SED program_transform_name="`echo $program_transform_name|sed -f conftestsed`" rm -f conftestsed fi @@ -1365,7 +1367,7 @@ dnl [, OTHER-LIBRARIES]]]) AC_DEFUN(AC_CHECK_LIB, [AC_MSG_CHECKING([for -l$1]) changequote(, )dnl -ac_lib_var=`echo $1 | tr './+' '__p'` +ac_lib_var=`echo $1 | tr '.-/+' '___p'` changequote([, ])dnl AC_CACHE_VAL(ac_cv_lib_$ac_lib_var, [ac_save_LIBS="$LIBS" @@ -1424,7 +1426,7 @@ undefine([AC_CV_NAME])dnl dnl ### Examining declarations -dnl AC_TRY_CPP(INCLUDES, ACTION-IF-TRUE [, ACTION-IF-FALSE]) +dnl AC_TRY_CPP(INCLUDES, [ACTION-IF-TRUE [, ACTION-IF-FALSE]]) AC_DEFUN(AC_TRY_CPP, [AC_REQUIRE_CPP()dnl cat > conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext <>, <>, <>) changequote([, ])dnl +EOF +cat >> $CONFIG_STATUS < conftest.subs <<\CEOF +sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; + s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF changequote([, ])dnl dnl These here document variables are unquoted when configure runs dnl but quoted when config.status runs, so variables are expanded once. diff --git a/acspecific.m4 b/acspecific.m4 index b3b520af8..0c0186ff5 100644 --- a/acspecific.m4 +++ b/acspecific.m4 @@ -472,7 +472,7 @@ AC_TRY_RUN([#include int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } -], , ac_cv_header_stdc=no, ac_cv_header_stdc=no) +], , ac_cv_header_stdc=no, :) fi]) if test $ac_cv_header_stdc = yes; then AC_DEFINE(STDC_HEADERS) @@ -731,9 +731,11 @@ AC_DEFUN(AC_TYPE_SIGNAL, #undef signal #endif #ifdef __cplusplus -extern "C" +extern "C" void (*signal (int, void (*)(int)))(int); +#else +void (*signal ()) (); #endif -void (*signal ()) ();], +], [int i;], ac_cv_type_signal=void, ac_cv_type_signal=int)]) AC_DEFINE_UNQUOTED(RETSIGTYPE, $ac_cv_type_signal) ]) @@ -755,19 +757,14 @@ fi ]) AC_DEFUN(AC_FUNC_MMAP, -[AC_CACHE_CHECK(for working mmap, ac_cv_func_mmap, +[AC_CHECK_FUNCS(valloc getpagesize) +AC_CACHE_CHECK(for working mmap, ac_cv_func_mmap, [AC_TRY_RUN([ /* Thanks to Mike Haertel and Jim Avera for this test. */ #include #include #include -#ifdef BSD -# ifndef BSD4_1 -# define HAVE_GETPAGESIZE -# endif -#endif - #ifndef HAVE_GETPAGESIZE # include # ifdef EXEC_PAGESIZE @@ -788,7 +785,7 @@ AC_DEFUN(AC_FUNC_MMAP, # endif #endif -#ifdef __osf__ +#ifndef HAVE_VALLOC # define valloc malloc #endif @@ -803,7 +800,7 @@ main() { char *buf1, *buf2, *buf3; int i = getpagesize(), j; - int i2 = getpagesize()*2; + int i2 = i * 2; int fd; buf1 = (char *)valloc(i2); @@ -994,7 +991,8 @@ main() { || fstat(fileno(stdout), &st) != 0 ); } -}], ac_cv_func_vfork=yes, ac_cv_func_vfork=no, ac_cv_func_vfork=no)]) +}], +ac_cv_func_vfork=yes, ac_cv_func_vfork=no, AC_CHECK_FUNC(vfork))]) if test $ac_cv_func_vfork = no; then AC_DEFINE(vfork, fork) fi @@ -1511,7 +1509,7 @@ char const *const *ccp; char **p; /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; -static struct point const zero; +static struct point const zero = {0,0}; /* AIX XL C 1.02.0.0 rejects this. It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant expression */ @@ -1689,7 +1687,7 @@ EOF if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then no_x= # GNU make sometimes prints "make[1]: Entering...", which would confuse us. - eval `make acfindx 2>/dev/null | grep -v make` + eval `${MAKE-make} acfindx 2>/dev/null | grep -v make` # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. for ac_extension in a so sl; do if test ! -f $ac_im_usrlibdir/libX11.$ac_extension && @@ -1836,7 +1834,7 @@ else X_LIBS="$X_LIBS -L$x_libraries" if test "`(uname) 2>/dev/null`" = SunOS && uname -r | grep '^5' >/dev/null; then - X_LIBS="$X_LIBS -R$x_libraries" + X_LIBS="$X_LIBS -R $x_libraries" fi fi diff --git a/autoconf.texi b/autoconf.texi index 891a27de0..6a07529a9 100644 --- a/autoconf.texi +++ b/autoconf.texi @@ -6,8 +6,8 @@ @c @setchapternewpage odd @c %**end of header -@set EDITION 2.6 -@set VERSION 2.6 +@set EDITION 2.7 +@set VERSION 2.7 @set UPDATED November 1995 @iftex @@ -61,7 +61,7 @@ by the Foundation. @page @vskip 0pt plus 1filll -Copyright @copyright{} 1992, 1993, 1994 Free Software Foundation, Inc. +Copyright @copyright{} 1992, 1993, 1994, 1995 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice @@ -1974,7 +1974,7 @@ If you need to check the behavior of a function as well as find out whether it is present, you have to write your own test for it (@pxref{Writing Tests}). -@defmac AC_CHECK_FUNC (@var{function}, @var{action-if-found} @r{[}, @var{action-if-not-found}@r{]}) +@defmac AC_CHECK_FUNC (@var{function}, @r{[}@var{action-if-found} @r{[}, @var{action-if-not-found}@r{]]}) @maindex CHECK_FUNC If C function @var{function} is available, run shell commands @var{action-if-found}, otherwise @var{action-if-not-found}. If you just @@ -2270,7 +2270,7 @@ particular test macros. If you need to check the contents of a header as well as find out whether it is present, you have to write your own test for it (@pxref{Writing Tests}). -@defmac AC_CHECK_HEADER (@var{header-file}, @var{action-if-found} @r{[}, @var{action-if-not-found}@r{]}) +@defmac AC_CHECK_HEADER (@var{header-file}, @r{[}@var{action-if-found} @r{[}, @var{action-if-not-found}@r{]]}) @maindex CHECK_HEADER If the system header file @var{header-file} exists, execute shell commands @var{action-if-found}, otherwise execute @var{action-if-not-found}. If @@ -2735,7 +2735,7 @@ The macro @code{AC_TRY_CPP} is used to check whether particular header files exist. You can check for one at a time, or more than one if you need several header files to all exist for some purpose. -@defmac AC_TRY_CPP (@var{includes}, @var{action-if-true} @r{[}, @var{action-if-false}@r{]}) +@defmac AC_TRY_CPP (@var{includes}, @r{[}@var{action-if-true} @r{[}, @var{action-if-false}@r{]]}) @maindex TRY_CPP @var{includes} is C or C++ @code{#include} statements and declarations, on which shell variable, backquote, and backslash substitutions are @@ -2775,7 +2775,7 @@ AC_EGREP_CPP(yes, ], is_aix=yes, is_aix=no) @end example -@defmac AC_EGREP_CPP (@var{pattern}, @var{program}, @var{action-if-found} @r{[}, @var{action-if-not-found}@r{]}) +@defmac AC_EGREP_CPP (@var{pattern}, @var{program}, @r{[}@var{action-if-found} @r{[}, @var{action-if-not-found}@r{]]}) @maindex EGREP_CPP @var{program} is the text of a C or C++ program, on which shell variable, backquote, and backslash substitutions are performed. If the @@ -2797,7 +2797,7 @@ compile a small program that uses that feature. You can also use it to check for structures and structure members that are not present on all systems. -@defmac AC_TRY_COMPILE (@var{includes}, @var{function-body}, @var{action-if-found} @r{[}, @var{action-if-not-found}@r{]}) +@defmac AC_TRY_COMPILE (@var{includes}, @var{function-body}, @r{[}@var{action-if-found} @r{[}, @var{action-if-not-found}@r{]]}) @maindex TRY_COMPILE Create a test C program to see whether a function whose body consists of @var{function-body} can be compiled; @var{includes} is any @@ -2838,7 +2838,7 @@ functions and global variables. It is also used (by checked for to @code{LIBS} temporarily and trying to link a small program. -@defmac AC_TRY_LINK (@var{includes}, @var{function-body}, @var{action-if-found} @r{[}, @var{action-if-not-found}@r{]}) +@defmac AC_TRY_LINK (@var{includes}, @var{function-body}, @r{[}@var{action-if-found} @r{[}, @var{action-if-not-found}@r{]]}) @maindex TRY_LINK Create a test C program to see whether a function whose body consists of @var{function-body} can be compiled and linked; @var{includes} is any @@ -2884,7 +2884,7 @@ package for cross-compiling. Use the following macro if you need to test run-time behavior of the system while configuring. -@defmac AC_TRY_RUN (@var{program}, @var{action-if-true} @r{[}, @var{action-if-false} @r{[}, @var{action-if-cross-compiling}@r{]]}) +@defmac AC_TRY_RUN (@var{program}, @r{[}@var{action-if-true} @r{[}, @var{action-if-false} @r{[}, @var{action-if-cross-compiling}@r{]]]}) @maindex TRY_RUN @var{program} is the text of a C program, on which shell variable and backquote substitutions are performed. If it compiles and links diff --git a/autoheader.in b/autoheader.in index cb6b3034d..abbc98350 100644 --- a/autoheader.in +++ b/autoheader.in @@ -182,7 +182,6 @@ fi echo "$types" | tr , \\012 | sort | uniq | while read ctype; do test -z "$ctype" && continue - # Solaris 2.3 tr rejects noncontiguous characters in character classes. sym="`echo "${ctype}" | tr 'abcdefghijklmnopqrstuvwxyz *' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_P'`" echo " /* The number of bytes in a ${ctype}. */ diff --git a/autoheader.m4 b/autoheader.m4 index 148541439..eac62579b 100644 --- a/autoheader.m4 +++ b/autoheader.m4 @@ -1,6 +1,6 @@ dnl Driver and redefinitions of some Autoconf macros for autoheader. dnl This file is part of Autoconf. -dnl Copyright (C) 1994 Free Software Foundation, Inc. +dnl Copyright (C) 1994, 1995 Free Software Foundation, Inc. dnl dnl This program is free software; you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by @@ -31,10 +31,22 @@ dnl a line. define([AC_CHECK_FUNCS], [# @@@funcs="$funcs $1"@@@ +ifelse([$2], , , [ +# If it was found, we do: +$2 +# If it was not found, we do: +$3 +]) ]) define([AC_CHECK_HEADERS], [# @@@headers="$headers $1"@@@ +ifelse([$2], , , [ +# If it was found, we do: +$2 +# If it was not found, we do: +$3 +]) ]) define([AC_CHECK_HEADERS_DIRENT], [# diff --git a/autoheader.sh b/autoheader.sh index cb6b3034d..abbc98350 100644 --- a/autoheader.sh +++ b/autoheader.sh @@ -182,7 +182,6 @@ fi echo "$types" | tr , \\012 | sort | uniq | while read ctype; do test -z "$ctype" && continue - # Solaris 2.3 tr rejects noncontiguous characters in character classes. sym="`echo "${ctype}" | tr 'abcdefghijklmnopqrstuvwxyz *' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_P'`" echo " /* The number of bytes in a ${ctype}. */ diff --git a/bin/autoheader.in b/bin/autoheader.in index cb6b3034d..abbc98350 100644 --- a/bin/autoheader.in +++ b/bin/autoheader.in @@ -182,7 +182,6 @@ fi echo "$types" | tr , \\012 | sort | uniq | while read ctype; do test -z "$ctype" && continue - # Solaris 2.3 tr rejects noncontiguous characters in character classes. sym="`echo "${ctype}" | tr 'abcdefghijklmnopqrstuvwxyz *' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_P'`" echo " /* The number of bytes in a ${ctype}. */ diff --git a/configure b/configure index 54c1d1d95..710582ca7 100755 --- a/configure +++ b/configure @@ -1,7 +1,7 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated automatically using autoconf version 2.6 +# Generated automatically using autoconf version 2.7 # Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc. # # This configure script is free software; the Free Software Foundation @@ -330,7 +330,7 @@ EOF verbose=yes ;; -version | --version | --versio | --versi | --vers) - echo "configure generated by autoconf version 2.6" + echo "configure generated by autoconf version 2.7" exit 0 ;; -with-* | --with-*) @@ -519,8 +519,10 @@ fi if test "$program_transform_name" = s,x,x,; then program_transform_name= else - # Double any \ or $. - echo 's,\\,\\\\,g; s,\$,$$,g' > conftestsed + # Double any \ or $. echo might interpret backslashes. + cat <<\EOF_SED > conftestsed +s,\\,\\\\,g; s,\$,$$,g +EOF_SED program_transform_name="`echo $program_transform_name|sed -f conftestsed`" rm -f conftestsed fi @@ -812,7 +814,7 @@ do echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; -version | --version | --versio | --versi | --vers | --ver | --ve | --v) - echo "$CONFIG_STATUS generated by autoconf version 2.6" + echo "$CONFIG_STATUS generated by autoconf version 2.7" exit 0 ;; -help | --help | --hel | --he | --h) echo "\$ac_cs_usage"; exit 0 ;; @@ -824,10 +826,12 @@ ac_given_srcdir=$srcdir ac_given_INSTALL="$INSTALL" trap 'rm -fr `echo "Makefile testsuite/Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 +EOF +cat >> $CONFIG_STATUS < conftest.subs <<\CEOF +sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; + s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF $ac_vpsub $extrasub s%@CFLAGS@%$CFLAGS%g diff --git a/doc/autoconf.texi b/doc/autoconf.texi index 891a27de0..6a07529a9 100644 --- a/doc/autoconf.texi +++ b/doc/autoconf.texi @@ -6,8 +6,8 @@ @c @setchapternewpage odd @c %**end of header -@set EDITION 2.6 -@set VERSION 2.6 +@set EDITION 2.7 +@set VERSION 2.7 @set UPDATED November 1995 @iftex @@ -61,7 +61,7 @@ by the Foundation. @page @vskip 0pt plus 1filll -Copyright @copyright{} 1992, 1993, 1994 Free Software Foundation, Inc. +Copyright @copyright{} 1992, 1993, 1994, 1995 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice @@ -1974,7 +1974,7 @@ If you need to check the behavior of a function as well as find out whether it is present, you have to write your own test for it (@pxref{Writing Tests}). -@defmac AC_CHECK_FUNC (@var{function}, @var{action-if-found} @r{[}, @var{action-if-not-found}@r{]}) +@defmac AC_CHECK_FUNC (@var{function}, @r{[}@var{action-if-found} @r{[}, @var{action-if-not-found}@r{]]}) @maindex CHECK_FUNC If C function @var{function} is available, run shell commands @var{action-if-found}, otherwise @var{action-if-not-found}. If you just @@ -2270,7 +2270,7 @@ particular test macros. If you need to check the contents of a header as well as find out whether it is present, you have to write your own test for it (@pxref{Writing Tests}). -@defmac AC_CHECK_HEADER (@var{header-file}, @var{action-if-found} @r{[}, @var{action-if-not-found}@r{]}) +@defmac AC_CHECK_HEADER (@var{header-file}, @r{[}@var{action-if-found} @r{[}, @var{action-if-not-found}@r{]]}) @maindex CHECK_HEADER If the system header file @var{header-file} exists, execute shell commands @var{action-if-found}, otherwise execute @var{action-if-not-found}. If @@ -2735,7 +2735,7 @@ The macro @code{AC_TRY_CPP} is used to check whether particular header files exist. You can check for one at a time, or more than one if you need several header files to all exist for some purpose. -@defmac AC_TRY_CPP (@var{includes}, @var{action-if-true} @r{[}, @var{action-if-false}@r{]}) +@defmac AC_TRY_CPP (@var{includes}, @r{[}@var{action-if-true} @r{[}, @var{action-if-false}@r{]]}) @maindex TRY_CPP @var{includes} is C or C++ @code{#include} statements and declarations, on which shell variable, backquote, and backslash substitutions are @@ -2775,7 +2775,7 @@ AC_EGREP_CPP(yes, ], is_aix=yes, is_aix=no) @end example -@defmac AC_EGREP_CPP (@var{pattern}, @var{program}, @var{action-if-found} @r{[}, @var{action-if-not-found}@r{]}) +@defmac AC_EGREP_CPP (@var{pattern}, @var{program}, @r{[}@var{action-if-found} @r{[}, @var{action-if-not-found}@r{]]}) @maindex EGREP_CPP @var{program} is the text of a C or C++ program, on which shell variable, backquote, and backslash substitutions are performed. If the @@ -2797,7 +2797,7 @@ compile a small program that uses that feature. You can also use it to check for structures and structure members that are not present on all systems. -@defmac AC_TRY_COMPILE (@var{includes}, @var{function-body}, @var{action-if-found} @r{[}, @var{action-if-not-found}@r{]}) +@defmac AC_TRY_COMPILE (@var{includes}, @var{function-body}, @r{[}@var{action-if-found} @r{[}, @var{action-if-not-found}@r{]]}) @maindex TRY_COMPILE Create a test C program to see whether a function whose body consists of @var{function-body} can be compiled; @var{includes} is any @@ -2838,7 +2838,7 @@ functions and global variables. It is also used (by checked for to @code{LIBS} temporarily and trying to link a small program. -@defmac AC_TRY_LINK (@var{includes}, @var{function-body}, @var{action-if-found} @r{[}, @var{action-if-not-found}@r{]}) +@defmac AC_TRY_LINK (@var{includes}, @var{function-body}, @r{[}@var{action-if-found} @r{[}, @var{action-if-not-found}@r{]]}) @maindex TRY_LINK Create a test C program to see whether a function whose body consists of @var{function-body} can be compiled and linked; @var{includes} is any @@ -2884,7 +2884,7 @@ package for cross-compiling. Use the following macro if you need to test run-time behavior of the system while configuring. -@defmac AC_TRY_RUN (@var{program}, @var{action-if-true} @r{[}, @var{action-if-false} @r{[}, @var{action-if-cross-compiling}@r{]]}) +@defmac AC_TRY_RUN (@var{program}, @r{[}@var{action-if-true} @r{[}, @var{action-if-false} @r{[}, @var{action-if-cross-compiling}@r{]]]}) @maindex TRY_RUN @var{program} is the text of a C program, on which shell variable and backquote substitutions are performed. If it compiles and links diff --git a/lib/autoconf/general.m4 b/lib/autoconf/general.m4 index 2279df957..21105e87f 100644 --- a/lib/autoconf/general.m4 +++ b/lib/autoconf/general.m4 @@ -51,7 +51,7 @@ dnl divert(-1)dnl Throw away output until AC_INIT is called. changequote([, ]) -define(AC_ACVERSION, 2.6) +define(AC_ACVERSION, 2.7) dnl Some old m4's don't support m4exit. But they provide dnl equivalent functionality by core dumping because of the @@ -759,8 +759,10 @@ AC_DEFUN(AC_ARG_PROGRAM, [if test "$program_transform_name" = s,x,x,; then program_transform_name= else - # Double any \ or $. - echo 's,\\,\\\\,g; s,\$,$$,g' > conftestsed + # Double any \ or $. echo might interpret backslashes. + cat <<\EOF_SED > conftestsed +s,\\,\\\\,g; s,\$,$$,g +EOF_SED program_transform_name="`echo $program_transform_name|sed -f conftestsed`" rm -f conftestsed fi @@ -1365,7 +1367,7 @@ dnl [, OTHER-LIBRARIES]]]) AC_DEFUN(AC_CHECK_LIB, [AC_MSG_CHECKING([for -l$1]) changequote(, )dnl -ac_lib_var=`echo $1 | tr './+' '__p'` +ac_lib_var=`echo $1 | tr '.-/+' '___p'` changequote([, ])dnl AC_CACHE_VAL(ac_cv_lib_$ac_lib_var, [ac_save_LIBS="$LIBS" @@ -1424,7 +1426,7 @@ undefine([AC_CV_NAME])dnl dnl ### Examining declarations -dnl AC_TRY_CPP(INCLUDES, ACTION-IF-TRUE [, ACTION-IF-FALSE]) +dnl AC_TRY_CPP(INCLUDES, [ACTION-IF-TRUE [, ACTION-IF-FALSE]]) AC_DEFUN(AC_TRY_CPP, [AC_REQUIRE_CPP()dnl cat > conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext <>, <>, <>) changequote([, ])dnl +EOF +cat >> $CONFIG_STATUS < conftest.subs <<\CEOF +sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; + s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF changequote([, ])dnl dnl These here document variables are unquoted when configure runs dnl but quoted when config.status runs, so variables are expanded once. diff --git a/lib/autoconf/specific.m4 b/lib/autoconf/specific.m4 index b3b520af8..0c0186ff5 100644 --- a/lib/autoconf/specific.m4 +++ b/lib/autoconf/specific.m4 @@ -472,7 +472,7 @@ AC_TRY_RUN([#include int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } -], , ac_cv_header_stdc=no, ac_cv_header_stdc=no) +], , ac_cv_header_stdc=no, :) fi]) if test $ac_cv_header_stdc = yes; then AC_DEFINE(STDC_HEADERS) @@ -731,9 +731,11 @@ AC_DEFUN(AC_TYPE_SIGNAL, #undef signal #endif #ifdef __cplusplus -extern "C" +extern "C" void (*signal (int, void (*)(int)))(int); +#else +void (*signal ()) (); #endif -void (*signal ()) ();], +], [int i;], ac_cv_type_signal=void, ac_cv_type_signal=int)]) AC_DEFINE_UNQUOTED(RETSIGTYPE, $ac_cv_type_signal) ]) @@ -755,19 +757,14 @@ fi ]) AC_DEFUN(AC_FUNC_MMAP, -[AC_CACHE_CHECK(for working mmap, ac_cv_func_mmap, +[AC_CHECK_FUNCS(valloc getpagesize) +AC_CACHE_CHECK(for working mmap, ac_cv_func_mmap, [AC_TRY_RUN([ /* Thanks to Mike Haertel and Jim Avera for this test. */ #include #include #include -#ifdef BSD -# ifndef BSD4_1 -# define HAVE_GETPAGESIZE -# endif -#endif - #ifndef HAVE_GETPAGESIZE # include # ifdef EXEC_PAGESIZE @@ -788,7 +785,7 @@ AC_DEFUN(AC_FUNC_MMAP, # endif #endif -#ifdef __osf__ +#ifndef HAVE_VALLOC # define valloc malloc #endif @@ -803,7 +800,7 @@ main() { char *buf1, *buf2, *buf3; int i = getpagesize(), j; - int i2 = getpagesize()*2; + int i2 = i * 2; int fd; buf1 = (char *)valloc(i2); @@ -994,7 +991,8 @@ main() { || fstat(fileno(stdout), &st) != 0 ); } -}], ac_cv_func_vfork=yes, ac_cv_func_vfork=no, ac_cv_func_vfork=no)]) +}], +ac_cv_func_vfork=yes, ac_cv_func_vfork=no, AC_CHECK_FUNC(vfork))]) if test $ac_cv_func_vfork = no; then AC_DEFINE(vfork, fork) fi @@ -1511,7 +1509,7 @@ char const *const *ccp; char **p; /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; -static struct point const zero; +static struct point const zero = {0,0}; /* AIX XL C 1.02.0.0 rejects this. It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant expression */ @@ -1689,7 +1687,7 @@ EOF if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then no_x= # GNU make sometimes prints "make[1]: Entering...", which would confuse us. - eval `make acfindx 2>/dev/null | grep -v make` + eval `${MAKE-make} acfindx 2>/dev/null | grep -v make` # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. for ac_extension in a so sl; do if test ! -f $ac_im_usrlibdir/libX11.$ac_extension && @@ -1836,7 +1834,7 @@ else X_LIBS="$X_LIBS -L$x_libraries" if test "`(uname) 2>/dev/null`" = SunOS && uname -r | grep '^5' >/dev/null; then - X_LIBS="$X_LIBS -R$x_libraries" + X_LIBS="$X_LIBS -R $x_libraries" fi fi -- 2.47.3