diff --git a/ChangeLog b/ChangeLog index 902cfdf2..6a6ea2da 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,88 @@ +1999-01-05 Ben Elliston + + * Version 2.13. + +1999-01-04 Ben Elliston + + * autoconf.texi (AC_CHECK_FILE): Document. + (AC_CHECK_FILES): Likewise. + (AC_SEARCH_LIBS): Likewise. + (AC_FUNC_SELECT_ARGTYPES): Use Jeff Garzik's version. + (AC_C_STRINGIZE): Likewise. + (AC_CYGWIN): Document. + (AC_EXEEXT): Likewise. + (AC_OBJEXT): Likewise. + (AC_MINGW32): Likewise. + (AC_TRY_LINK_FUNC): Likewise. + (AC_VALIDATE_CACHED_SYSTEM_TUPLE): Likewise. + +1999-01-01 Ben Elliston + + * NEWS: Update. + + * acspecific.m4 (AC_PROG_CXX_WORKS): Specify an explicit return + type for `main' to keep modern C++ compilers happy. + +1998-12-28 Jeff Garzik + + * autoconf.texi: + (AC_SEARCH_LIBS, AC_CHECK_FILE, AC_CHECK_FILES, + AC_TRY_LINK_FUNC): Document. + (AC_CHECK_LIB): Indicate the absence of + action-if-not-found will not kill default action. + (AC_SYS_INTERPRETER): Alphabetize with rest of section, + s/ac_cv_sys_interpreter/interpval/ + + * acgeneral.m4: + (AC_TRY_LINK_FUNC): Fix arg transposition. + (AC_SEARCH_LIBS): Require autoconf 2.13, add other-libs arg. + (AC_CHECK_FILES): Add underscore to HAVE_file define. + + * acspecific.m4: + (AC_SYS_INTERPRETER): New shell var 'interpval' stores + internal var ac_cv_sys_interpreter. + 1998-12-27 Ben Elliston - * config.guess: Handle BSD/OS variants for non-x86 machines. - Contributed by Chris P. Ross . + * autoconf.texi (AC_PROG_INSTALL): Update. + (AC_FUNC_ALLOCA): Correct code fragment. + (AC_FUNC_SELECT_ARGTYPES): Document. + (AC_C_STRINGIZE): Likewise. + (AC_VALIDATE_CACHED_SYSTEM_TUPLE): Likewise. + + * acspecific.m4 (AC_CYGWIN): Rename from `AC_CYGWIN32'. + (AC_CYGWIN32): Warn about deprecated usage. Forward to AC_CYGWIN. + + * config.sub: Drop `32' from `Cygwin32'. + + * config.guess: Likewise. + Handle BSD/OS variants for non-x86 machines. Contributed by Chris + P. Ross . + + * NEWS: Update. + + * configure: Rebuild. + +1998-12-26 Ben Elliston + + * autoreconf.sh (stamp): Add missing quote. + + * mkinstalldirs: Write output which is not diagnostic to standard + output and not standard error. Suggested by Steve Robbins + . + +1998-12-11 Matthew D. Langston + + * acconfig.h, acgeneral.m4, acspecific.m4, autoconf.texi: Change + all of the Fortran 77 code to use the new `F77' prefix instead of + the older `FC' prefix. + +1998-12-11 Ben Elliston + + * acgeneral.m4 (AC_ACVERSION): Bump to 2.13. + + * autoconf.texi (EDITION): Likewise. + (VERSION): Likewise. 1998-10-30 Jeff Garzik diff --git a/NEWS b/NEWS index dc8e6e1e..be224331 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,34 @@ +Major changes in release 2.13: + +* Support for building on Win32 systems where the only available C or + C++ compiler is the Microsoft Visual C++ command line compiler + (`cl'). Additional support for building on Win32 systems which are + using the Cygwin or Mingw32 environments. +* Support for alternative object file and executable file extensions. + On Win32, for example, these are .obj and .exe. These are discovered + using AC_OBJEXT and AC_EXEEXT, which substitute @OBJEXT@ and + @EXEEXT@ in the output, respectively. +* New macros: AC_CACHE_LOAD, AC_CACHE_SAVE, AC_FUNC_SELECT_ARGTYPES, + AC_VALIDATE_CACHED_SYSTEM_TUPLE, AC_SEARCH_LIBS, AC_TRY_LINK_FUNC, + AC_C_STRINGIZE, AC_CHECK_FILE(S), AC_PROG_F77 (and friends). +* AC_DEFINE now has an optional third argument for a description to be + placed in the config header input file (e.g. config.h.in). +* The C++ code fragment compiled for the C++ compiler test had to be + improved to include an explicit return type for main(). This was + causing failures on systems using recent versions of the EGCS C++ + compiler. +* Fixed an important bug in AC_CHECK_TYPE that would cause a configure + script to report that `sometype_t' was present when only `type_t' + was defined. +* Merge of the FSF version of config.guess and config.sub to modernise + these scripts. Add support for a few new hosts in config.guess. + Incorporate latest versions of install-sh, mkinstalldirs and + texinfo.tex from the FSF. +* autoreconf is capable of running automake if necessary (and + applicable). +* Support for Fortran 77. See the Texinfo documentation for details. +* Bug fixes and workarounds for quirky bugs in vendor utilities. + Major changes in release 2.12: * AC_OUTPUT and AC_CONFIG_HEADER can create output files by diff --git a/acconfig.h b/acconfig.h index d1fe9833..ea6988fd 100644 --- a/acconfig.h +++ b/acconfig.h @@ -170,7 +170,7 @@ #undef NO_MINUS_C_MINUS_O /* Define if your Fortran 77 compiler doesn't accept -c and -o together. */ -#undef FC_NO_MINUS_C_MINUS_O +#undef F77_NO_MINUS_C_MINUS_O /* Define to `long' if doesn't define. */ #undef off_t diff --git a/acgeneral.m4 b/acgeneral.m4 index b3418eae..ae971de1 100644 --- a/acgeneral.m4 +++ b/acgeneral.m4 @@ -52,7 +52,7 @@ dnl divert(-1)dnl Throw away output until AC_INIT is called. changequote([, ]) -define(AC_ACVERSION, 2.12.2) +define(AC_ACVERSION, 2.13) dnl Some old m4's don't support m4exit. But they provide dnl equivalent functionality by core dumping because of the @@ -1249,9 +1249,9 @@ dnl AC_LANG_FORTRAN77() AC_DEFUN(AC_LANG_FORTRAN77, [define([AC_LANG], [FORTRAN77])dnl ac_ext=f -ac_compile='${FC-f77} -c $FFLAGS conftest.$ac_ext 1>&AC_FD_CC' -ac_link='${FC-f77} -o conftest${ac_exeext} $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&AC_FD_CC' -cross_compiling=$ac_cv_prog_fc_cross +ac_compile='${F77-f77} -c $FFLAGS conftest.$ac_ext 1>&AC_FD_CC' +ac_link='${F77-f77} -o conftest${ac_exeext} $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&AC_FD_CC' +cross_compiling=$ac_cv_prog_f77_cross ]) dnl Push the current language on a stack. @@ -1534,7 +1534,7 @@ dnl ACTION-IF-NOT-FOUND. AC_DEFUN(AC_TRY_LINK_FUNC, AC_TRY_LINK(dnl -ifelse([$2], [main], , dnl Avoid conflicting decl of main. +ifelse([$1], [main], , dnl Avoid conflicting decl of main. [/* Override any gcc2 internal prototype to avoid an error. */ ]ifelse(AC_LANG, CPLUSPLUS, [#ifdef __cplusplus extern "C" @@ -1549,17 +1549,18 @@ char $1(); [$3])) -dnl AC_SEARCH_LIBS(func, searchlibs, [action-if-found], [action-if-not-found]) +dnl AC_SEARCH_LIBS(FUNCTION, SEARCH-LIBS [, ACTION-IF-FOUND +dnl [, ACTION-IF-NOT-FOUND [, OTHER-LIBRARIES]]]) dnl Search for a library defining FUNC, if it's not already available. AC_DEFUN(AC_SEARCH_LIBS, -[AC_PREREQ([2.12]) +[AC_PREREQ([2.13]) AC_CACHE_CHECK([for library containing $1], [ac_cv_search_$1], [ac_func_search_save_LIBS="$LIBS" ac_cv_search_$1="no" AC_TRY_LINK_FUNC([$1], [ac_cv_search_$1="none required"]) test "$ac_cv_search_$1" = "no" && for i in $2; do -LIBS="-l$i $ac_func_search_save_LIBS" +LIBS="-l$i $5 $ac_func_search_save_LIBS" AC_TRY_LINK_FUNC([$1], [ac_cv_search_$1="-l$i" break]) @@ -1905,7 +1906,7 @@ AC_DEFUN(AC_CHECK_FILES, do AC_CHECK_FILE($ac_file, [changequote(, )dnl - ac_tr_file=HAVE`echo $ac_file | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + ac_tr_file=HAVE_`echo $ac_file | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` changequote([, ])dnl AC_DEFINE_UNQUOTED($ac_tr_file) $2], $3)dnl done diff --git a/acspecific.m4 b/acspecific.m4 index 5dd3ae3d..5c6f1c9e 100644 --- a/acspecific.m4 +++ b/acspecific.m4 @@ -154,33 +154,27 @@ else fi ]) -dnl Determine a Fortran compiler to use. If `FC' is not already set in -dnl the environment, check for `g77', `f77' and `f2c', in that order. -dnl See the output variable `FC' to the name of the compiler found. +dnl Determine a Fortran 77 compiler to use. If `F77' is not already set +dnl in the environment, check for `g77', `f77' and `f2c', in that order. +dnl Set the output variable `F77' to the name of the compiler found. dnl -dnl If using `g77' (the GNU Fortran compiler), then `AC_PROG_FC' will -dnl set the shell variable `G77' to `yes', and empty otherwise. If the -dnl output variable `FFLAGS' was not already set in the environment, +dnl If using `g77' (the GNU Fortran 77 compiler), then `AC_PROG_F77' +dnl will set the shell variable `G77' to `yes', and empty otherwise. If +dnl the output variable `FFLAGS' was not already set in the environment, dnl then set it to `-g -02' for `g77' (or `-O2' where `g77' does not dnl accept `-g'). Otherwise, set `FFLAGS' to `-g' for all other Fortran -dnl compilers. +dnl 77 compilers. dnl -dnl AC_PROG_FC() -AC_DEFUN(AC_PROG_FC, +dnl AC_PROG_F77() +AC_DEFUN(AC_PROG_F77, [AC_BEFORE([$0], [AC_PROG_CPP])dnl -if test -z "$FC"; then - AC_CHECK_PROG(FC, g77, g77) - if test -z "$FC"; then - AC_CHECK_PROG(FC, f77, f77) - if test -z "$FC"; then - AC_CHECK_PROG(FC, f2c, f2c) - fi - test -z "$FC" && AC_MSG_ERROR([no acceptable Fortran compiler found in \$PATH]) - fi +if test -z "$F77"; then + AC_CHECK_PROGS(F77, g77 f77 f2c) + test -z "$F77" && AC_MSG_ERROR([no acceptable Fortran 77 compiler found in \$PATH]) fi -AC_PROG_FC_WORKS -AC_PROG_FC_GNU +AC_PROG_F77_WORKS +AC_PROG_F77_GNU if test $ac_cv_prog_g77 = yes; then G77=yes @@ -190,10 +184,10 @@ dnl normal versions of a library), tasteless as that idea is. ac_test_FFLAGS="${FFLAGS+set}" ac_save_FFLAGS="$FFLAGS" FFLAGS= - AC_PROG_FC_G + AC_PROG_F77_G if test "$ac_test_FFLAGS" = set; then FFLAGS="$ac_save_FFLAGS" - elif test $ac_cv_prog_fc_g = yes; then + elif test $ac_cv_prog_f77_g = yes; then FFLAGS="-g -O2" else FFLAGS="-O2" @@ -223,7 +217,7 @@ 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_COMPILER([main(){return(0);}], ac_cv_prog_cxx_works, ac_cv_prog_cxx_cross) +AC_TRY_COMPILER([int main(){return(0);}], ac_cv_prog_cxx_works, ac_cv_prog_cxx_cross) AC_LANG_RESTORE AC_MSG_RESULT($ac_cv_prog_cxx_works) if test $ac_cv_prog_cxx_works = no; then @@ -234,28 +228,28 @@ AC_MSG_RESULT($ac_cv_prog_cxx_cross) cross_compiling=$ac_cv_prog_cxx_cross ]) -dnl Test whether the Fortran compiler can compile and link a trivial -dnl Fortran program. Also, test whether the Fortran compiler is a +dnl Test whether the Fortran 77 compiler can compile and link a trivial +dnl Fortran program. Also, test whether the Fortran 77 compiler is a dnl cross-compiler (which may realistically be the case if the Fortran dnl compiler is `g77'). dnl -dnl AC_PROG_FC_WORKS() -AC_DEFUN(AC_PROG_FC_WORKS, -[AC_MSG_CHECKING([whether the Fortran compiler ($FC $FFLAGS $LDFLAGS) works]) +dnl AC_PROG_F77_WORKS() +AC_DEFUN(AC_PROG_F77_WORKS, +[AC_MSG_CHECKING([whether the Fortran 77 compiler ($F77 $FFLAGS $LDFLAGS) works]) AC_LANG_SAVE AC_LANG_FORTRAN77 AC_TRY_COMPILER(dnl [ program conftest end -], ac_cv_prog_fc_works, ac_cv_prog_fc_cross) +], ac_cv_prog_f77_works, ac_cv_prog_f77_cross) AC_LANG_RESTORE -AC_MSG_RESULT($ac_cv_prog_fc_works) -if test $ac_cv_prog_fc_works = no; then - AC_MSG_ERROR([installation or configuration problem: Fortran compiler cannot create executables.]) +AC_MSG_RESULT($ac_cv_prog_f77_works) +if test $ac_cv_prog_f77_works = no; then + AC_MSG_ERROR([installation or configuration problem: Fortran 77 compiler cannot create executables.]) fi -AC_MSG_CHECKING([whether the Fortran compiler ($FC $FFLAGS $LDFLAGS) is a cross-compiler]) -AC_MSG_RESULT($ac_cv_prog_fc_cross) -cross_compiling=$ac_cv_prog_fc_cross +AC_MSG_CHECKING([whether the Fortran 77 compiler ($F77 $FFLAGS $LDFLAGS) is a cross-compiler]) +AC_MSG_RESULT($ac_cv_prog_f77_cross) +cross_compiling=$ac_cv_prog_f77_cross ]) AC_DEFUN(AC_PROG_CC_GNU, @@ -286,19 +280,19 @@ else ac_cv_prog_gxx=no fi])]) -dnl Test whether for Fortran compiler is `g77' (the GNU Fortran -dnl Compiler). This test depends on whether the Fortran compiler can do -dnl CPP pre-processing. +dnl Test whether for Fortran 77 compiler is `g77' (the GNU Fortran 77 +dnl Compiler). This test depends on whether the Fortran 77 compiler can +dnl do CPP pre-processing. dnl -dnl AC_PROG_FC_GNU() -AC_DEFUN(AC_PROG_FC_GNU, -[AC_CACHE_CHECK(whether we are using GNU Fortran, ac_cv_prog_g77, +dnl AC_PROG_F77_GNU() +AC_DEFUN(AC_PROG_F77_GNU, +[AC_CACHE_CHECK(whether we are using GNU Fortran 77, ac_cv_prog_g77, [cat > conftest.fpp </dev/null 2>&1; then +if AC_TRY_COMMAND($F77 -E conftest.fpp) | egrep yes >/dev/null 2>&1; then ac_cv_prog_g77=yes else ac_cv_prog_g77=no @@ -326,20 +320,20 @@ fi rm -f conftest* ])]) -dnl Test whether the Fortran compiler can accept the `-g' option to +dnl Test whether the Fortran 77 compiler can accept the `-g' option to dnl enable debugging. dnl -dnl AC_PROG_FC_G() -AC_DEFUN(AC_PROG_FC_G, -[AC_CACHE_CHECK(whether $FC accepts -g, ac_cv_prog_fc_g, +dnl AC_PROG_F77_G() +AC_DEFUN(AC_PROG_F77_G, +[AC_CACHE_CHECK(whether $F77 accepts -g, ac_cv_prog_f77_g, [cat > conftest.f << EOF program conftest end EOF -if test -z "`$FC -g -c conftest.f 2>&1`"; then - ac_cv_prog_fc_g=yes +if test -z "`$F77 -g -c conftest.f 2>&1`"; then + ac_cv_prog_f77_g=yes else - ac_cv_prog_fc_g=no + ac_cv_prog_f77_g=no fi rm -f conftest* ])]) @@ -414,22 +408,22 @@ else fi ]) -dnl Test if the Fortran compiler accepts the options `-c' and `-o' -dnl simultaneously, and define `FC_NO_MINUS_C_MINUS_O' if it does not. +dnl Test if the Fortran 77 compiler accepts the options `-c' and `-o' +dnl simultaneously, and define `F77_NO_MINUS_C_MINUS_O' if it does not. dnl dnl The usefulness of this macro is questionable, as I can't really see dnl why anyone would use it. The only reason I include it is for dnl completeness, since a similar test exists for the C compiler. dnl -dnl AC_PROG_FC_C_O -AC_DEFUN(AC_PROG_FC_C_O, -[AC_BEFORE([$0], [AC_PROG_FC])dnl -AC_MSG_CHECKING(whether $FC understand -c and -o together) -set dummy $FC; ac_fc="`echo [$]2 | +dnl AC_PROG_F77_C_O +AC_DEFUN(AC_PROG_F77_C_O, +[AC_BEFORE([$0], [AC_PROG_F77])dnl +AC_MSG_CHECKING(whether $F77 understand -c and -o together) +set dummy $F77; ac_f77="`echo [$]2 | changequote(, )dnl sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`" changequote([, ])dnl -AC_CACHE_VAL(ac_cv_prog_fc_${ac_fc}_c_o, +AC_CACHE_VAL(ac_cv_prog_f77_${ac_f77}_c_o, [cat > conftest.f << EOF program conftest end @@ -437,19 +431,19 @@ EOF # We do the `AC_TRY_EVAL' test twice because some compilers refuse to # overwrite an existing `.o' file with `-o', although they will create # one. -ac_try='$FC $FFLAGS -c conftest.f -o conftest.o 1>&AC_FD_CC' +ac_try='$F77 $FFLAGS -c conftest.f -o conftest.o 1>&AC_FD_CC' if AC_TRY_EVAL(ac_try) && test -f conftest.o && AC_TRY_EVAL(ac_try); then - eval ac_cv_prog_fc_${ac_fc}_c_o=yes + eval ac_cv_prog_f77_${ac_f77}_c_o=yes else - eval ac_cv_prog_fc_${ac_fc}_c_o=no + eval ac_cv_prog_f77_${ac_f77}_c_o=no fi rm -f conftest* ])dnl -if eval "test \"`echo '$ac_cv_prog_fc_'${ac_fc}_c_o`\" = yes"; then +if eval "test \"`echo '$ac_cv_prog_f77_'${ac_f77}_c_o`\" = yes"; then AC_MSG_RESULT(yes) else AC_MSG_RESULT(no) - AC_DEFINE(FC_NO_MINUS_C_MINUS_O) + AC_DEFINE(F77_NO_MINUS_C_MINUS_O) fi ]) @@ -2030,15 +2024,15 @@ dnl extremely useful macro. Thank you John. dnl dnl AC_F77_LIBRARY_LDFLAGS() AC_DEFUN(AC_F77_LIBRARY_LDFLAGS, -[AC_MSG_CHECKING([for Fortran libraries]) -AC_REQUIRE([AC_PROG_FC]) +[AC_MSG_CHECKING([for Fortran 77 libraries]) +AC_REQUIRE([AC_PROG_F77]) AC_REQUIRE([AC_CANONICAL_HOST]) AC_CACHE_VAL(ac_cv_flibs, [changequote(, )dnl dnl Write a minimal program and compile it with -v. I don't know what dnl to do if your compiler doesn't have -v... echo " END" > conftest.f -foutput=`${FC} -v -o conftest conftest.f 2>&1` +foutput=`${F77} -v -o conftest conftest.f 2>&1` dnl dnl The easiest thing to do for xlf output is to replace all the commas dnl with spaces. Try to only do that if the output is really from xlf, @@ -2143,7 +2137,7 @@ dnl case "$arg" in -lkernel32) case "$canonical_host_type" in - *-*-cygwin32) + *-*-cygwin*) arg= ;; *) @@ -2231,6 +2225,7 @@ else ac_cv_sys_interpreter=no fi rm -f conftest]) +interpval="$ac_cv_sys_interpreter" ]) define(AC_HAVE_POUNDBANG, @@ -2617,15 +2612,24 @@ AC_SUBST(X_LIBS)dnl AC_SUBST(X_EXTRA_LIBS)dnl ]) -dnl Check for cygwin32. This is a way to set the right value for -dnl EXEEXT. +dnl The old Cygwin32 macro is deprecated. AC_DEFUN(AC_CYGWIN32, -[AC_CACHE_CHECK(for cygwin32 environment, ac_cv_cygwin32, -[AC_TRY_COMPILE(,[return __CYGWIN32__;], -ac_cv_cygwin32=yes, ac_cv_cygwin32=no) +[AC_OBSOLETE([$0], [; instead use AC_CYGWIN])dnl +AC_CYGWIN]) + +dnl Check for Cygwin. This is a way to set the right value for +dnl EXEEXT. +AC_DEFUN(AC_CYGWIN, +[AC_CACHE_CHECK(for Cygwin environment, ac_cv_cygwin, +[AC_TRY_COMPILE(,[ +#ifndef __CYGWIN__ +#define __CYGWIN__ __CYGWIN32__ +#endif +return __CYGWIN__;], +ac_cv_cygwin=yes, ac_cv_cygwin=no) rm -f conftest*]) -CYGWIN32= -test "$ac_cv_cygwin32" = yes && CYGWIN32=yes]) +CYGWIN= +test "$ac_cv_cygwin" = yes && CYGWIN=yes]) dnl Check for mingw32. This is another way to set the right value for dnl EXEEXT. @@ -2638,15 +2642,15 @@ MINGW32= test "$ac_cv_mingw32" = yes && MINGW32=yes]) dnl Check for the extension used for executables. This knows that we -dnl add .exe for cygwin32 or mingw32. Otherwise, it compiles a test +dnl add .exe for Cygwin or mingw32. Otherwise, it compiles a test dnl executable. If this is called, the executable extensions will be dnl automatically used by link commands run by the configure script. AC_DEFUN(AC_EXEEXT, -[AC_REQUIRE([AC_CYGWIN32]) +[AC_REQUIRE([AC_CYGWIN]) AC_REQUIRE([AC_MINGW32]) AC_MSG_CHECKING([for executable suffix]) AC_CACHE_VAL(ac_cv_exeext, -[if test "$CYGWIN32" = yes || test "$MINGW32" = yes; then +[if test "$CYGWIN" = yes || test "$MINGW32" = yes; then ac_cv_exeext=.exe else rm -f conftest* diff --git a/autoconf.texi b/autoconf.texi index 47013cb7..22a2ccd5 100644 --- a/autoconf.texi +++ b/autoconf.texi @@ -6,9 +6,9 @@ @c @setchapternewpage odd @c %**end of header -@set EDITION 2.12 -@set VERSION 2.12 -@set UPDATED November 1996 +@set EDITION 2.13 +@set VERSION 2.13 +@set UPDATED December 1998 @iftex @finalout @@ -56,12 +56,12 @@ by the Foundation. @subtitle Creating Automatic Configuration Scripts @subtitle Edition @value{EDITION}, for Autoconf version @value{VERSION} @subtitle @value{UPDATED} -@author by David MacKenzie +@author by David MacKenzie and Ben Elliston @c I think I've rewritten all of Noah and Roland's contributions by now. @page @vskip 0pt plus 1filll -Copyright @copyright{} 1992, 93, 94, 95, 96 Free Software Foundation, Inc. +Copyright @copyright{} 1992, 93, 94, 95, 96, 98 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice @@ -1056,7 +1056,7 @@ C++ features. @ovindex FFLAGS Debugging and optimization options for the Fortran 77 compiler. If it is not set in the environment when @code{configure} runs, the default -value is set when you call @code{AC_PROG_FC} (or empty if you don't). +value is set when you call @code{AC_PROG_F77} (or empty if you don't). @code{configure} uses this variable when compiling programs to test for Fortran 77 features. @end defvar @@ -1623,17 +1623,17 @@ calling @code{AC_TRY_CPP}, @code{AC_CHECK_HEADER}, @code{AC_EGREP_HEADER}, or @code{AC_EGREP_CPP}. @end defmac -@defmac AC_PROG_FC +@defmac AC_PROG_F77 @maindex PROG_FORTRAN -@ovindex FC +@ovindex F77 @ovindex FFLAGS -Determine a Fortran 77 compiler to use. If @code{FC} is not already set -in the environment, check for @code{g77}, @code{f77} and @code{f2c}, in -that order. Set the output variable @code{FC} to the name of the +Determine a Fortran 77 compiler to use. If @code{F77} is not already +set in the environment, check for @code{g77}, @code{f77} and @code{f2c}, +in that order. Set the output variable @code{F77} to the name of the compiler found. If using @code{g77} (the GNU Fortran 77 compiler), then -@code{AC_PROG_FC} will set the shell variable @code{G77} to @samp{yes}, +@code{AC_PROG_F77} will set the shell variable @code{G77} to @samp{yes}, and empty otherwise. If the output variable @code{FFLAGS} was not already set in the environment, then set it to @samp{-g -02} for @code{g77} (or @samp{-O2} where @code{g77} does not accept @samp{-g}). @@ -1641,11 +1641,11 @@ Otherwise, set @code{FFLAGS} to @samp{-g} for all other Fortran 77 compilers. @end defmac -@defmac AC_PROG_FC_C_O -@maindex PROG_FC_C_O -@cvindex FC_NO_MINUS_C_MINUS_O +@defmac AC_PROG_F77_C_O +@maindex PROG_F77_C_O +@cvindex F77_NO_MINUS_C_MINUS_O Test if the Fortran 77 compiler accepts the options @samp{-c} and -@samp{-o} simultaneously, and define @code{FC_NO_MINUS_C_MINUS_O} if it +@samp{-o} simultaneously, and define @code{F77_NO_MINUS_C_MINUS_O} if it does not. @end defmac @@ -1665,13 +1665,14 @@ is becoming a less prevalent problem. @ovindex INSTALL @ovindex INSTALL_PROGRAM @ovindex INSTALL_DATA +@ovindex INSTALL_SCRIPT Set output variable @code{INSTALL} to the path of a BSD compatible @code{install} program, if one is found in the current @code{PATH}. Otherwise, set @code{INSTALL} to @samp{@var{dir}/install-sh -c}, checking the directories specified to @code{AC_CONFIG_AUX_DIR} (or its default directories) to determine @var{dir} (@pxref{Output}). Also set -the variable @code{INSTALL_PROGRAM} to @samp{$@{INSTALL@}} and -@code{INSTALL_DATA} to @samp{$@{INSTALL@} -m 644}. +the variables @code{INSTALL_PROGRAM} and @code{INSTALL_SCRIPT} to +@samp{$@{INSTALL@}} and @code{INSTALL_DATA} to @samp{$@{INSTALL@} -m 644}. This macro screens out various instances of @code{install} known to not work. It prefers to find a C program rather than a shell script, for @@ -1745,7 +1746,7 @@ to @samp{byacc}. Otherwise set @code{YACC} to @samp{yacc}. @end defmac @node Generic Programs, , Particular Programs, Alternative Programs -@subsection Generic Program Checks +@subsection Generic Program and File Checks These macros are used to find programs not covered by the particular test macros. If you need to check the behavior of a program as well as @@ -1760,6 +1761,19 @@ AC_PATH_PROG(INETD, inetd, /usr/libexec/inetd, $PATH:/usr/libexec:/usr/sbin:/usr/etc:etc) @end example +@defmac AC_CHECK_FILE (@var{file} @r{[}, @var{action-if-found} @r{[}, @var{action-if-not-found}@r{]]}) +@maindex CHECK_FILE +Check whether file @var{file} exists on the native system. +If it is found, execute @var{action-if-found}, otherwise do +@var{action-if-not-found}, if given. +@end defmac + +@defmac AC_CHECK_FILES (@var{files}@r{[}, @var{action-if-found} @r{[}, @var{action-if-not-found}@r{]]}) +@maindex CHECK_FILES +Executes @code{AC_CHECK_FILE} once for each file listed in @var{files}. +Additionally, defines @samp{HAVE@var{file}} for each file found, set to 1. +@end defmac + @defmac AC_CHECK_PROG (@var{variable}, @var{prog-to-check-for}, @var{value-if-found} @r{[}, @var{value-if-not-found} @r{[}, @var{path}, @r{[} @var{reject} @r{]]]}) @maindex CHECK_PROG Check whether program @var{prog-to-check-for} exists in @code{PATH}. If @@ -1827,11 +1841,10 @@ name of the library; e.g., to check for @samp{-lmp}, use @samp{mp} as the @var{library} argument. @var{action-if-found} is a list of shell commands to run if the link -with the library succeeds; @var{action-if-not-found} is a list of shell -commands to run if the link fails. If @var{action-if-found} and -@var{action-if-not-found} are not specified, the default action is to -add @samp{-l@var{library}} to @code{LIBS} and define -@samp{HAVE_LIB@var{library}} (in all capitals). +with the library succeeds; @var{action-if-not-found} is a list of +shell commands to run if the link fails. If @var{action-if-found} is +not specified, the default action will add @samp{-l@var{library}} to +@code{LIBS} and define @samp{HAVE_LIB@var{library}} (in all capitals). If linking with @var{library} results in unresolved symbols, which would be resolved by linking with additional libraries, give those libraries @@ -1851,6 +1864,32 @@ all of those cases, the compiler is passed @samp{-lfoo}. However, This macro is considered obsolete. @end defmac +@defmac AC_SEARCH_LIBS (@var{function}, @var{search-libs} @r{[}, @var{action-if-found} @r{[}, @var{action-if-not-found} @r{[}, @var{other-libraries}@r{]]]}) +@maindex SEARCH_LIBS +Search for a library defining @var{function}, if it's not already +available. This equates to calling @code{AC_TRY_LINK_FUNC} first +with no libraries, then for each library listed in @var{search-libs}. + +If the function is found, run @var{action-if-found}, otherwise run +@var{action-if-not-found}. + +If linking with @var{library} results in unresolved symbols, which would +be resolved by linking with additional libraries, give those libraries +as the @var{other-libraries} argument, separated by spaces: @samp{-lXt +-lX11}. Otherwise this macro will fail to detect that @var{function} is +present, because linking the test program will always fail with +unresolved symbols. +@end defmac + +@defmac AC_SEARCH_LIBS (@var{function}, @var{search-libs}@r{[}, @var{action-if-found} @r{[}, @var{action-if-not-found}@r{]]}) +@maindex SEARCH_LIBS +This macro is equivalent to calling @code{AC_TRY_LINK_FUNC} once for each +library listed in @var{search-libs}. Add @samp{-l@var{library}} to +@code{LIBS} for the first library found to contain @var{function}, and +execute @var{action-if-found}. Otherwise execute +@var{action-if-not-found}. +@end defmac + @node Library Functions, Header Files, Libraries, Existing Tests @section Library Functions @@ -1906,9 +1945,7 @@ rather than choke on it. @example @group /* AIX requires this to be the first thing in the file. */ -#ifdef __GNUC__ -# define alloca __builtin_alloca -#else +#ifndef __GNUC__ # if HAVE_ALLOCA_H # include # else @@ -2021,6 +2058,19 @@ If the @code{mmap} function exists and works correctly, define memory. @end defmac +@defmac AC_FUNC_SELECT_ARGTYPES +@maindex FUNC_SELECT_ARGTYPES +@cvindex SELECT_TYPE_ARG1 +@cvindex SELECT_TYPE_ARG234 +@cvindex SELECT_TYPE_ARG5 +Determines the correct type to be passed to each of the +@code{select} function's arguments, and defines those types +in @code{SELECT_TYPE_ARG1}, @code{SELECT_TYPE_ARG234}, and +@code{SELECT_TYPE_ARG5} respectively. @code{SELECT_TYPE_ARG1} defaults +to @samp{int}, @code{SELECT_TYPE_ARG234} defaults to @samp{int *}, +and @code{SELECT_TYPE_ARG5} defaults to @samp{struct timeval *}. +@end defmac + @defmac AC_FUNC_SETPGRP @maindex FUNC_SETPGRP @cvindex SETPGRP_VOID @@ -2653,6 +2703,18 @@ If the C compiler supports the @code{long double} type, define that define @code{__STDC__} do not support @code{long double}. @end defmac +@defmac AC_C_STRINGIZE +@maindex C_STRINGIZE +@cvindex HAVE_STRINGIZE +If the C preprocessor supports the stringizing operator, define +@code{HAVE_STRINGIZE}. The stringizing operator is @samp{#} and is +found in macros such as this: + +@example +#define x(y) #y +@end example +@end defmac + @defmac AC_CHECK_SIZEOF (@var{type} @r{[}, @var{cross-size}@r{]}) @maindex CHECK_SIZEOF Define @code{SIZEOF_@var{uctype}} to be the size in bytes of the C (or @@ -2729,13 +2791,34 @@ libraries. The following macros check for operating system services or capabilities. -@defmac AC_SYS_INTERPRETER -@maindex SYS_INTERPRETER -Check whether the system supports starting scripts with a line of the -form @samp{#! /bin/csh} to select the interpreter to use for the script. -After running this macro, shell code in @code{configure.in} can check -the variable @code{ac_cv_sys_interpreter}; it will be set to @samp{yes} -if the system supports @samp{#!}, @samp{no} if not. +@defmac AC_CYGWIN +@maindex CYGWIN +Checks for the Cygwin environment. If present, sets shell variable +@code{CYGWIN} to @samp{yes}. If not present, sets @code{CYGWIN} +to the empty string. +@end defmac + +@defmac AC_EXEEXT +@maindex EXEEXT +@ovindex EXEEXT +Defines substitute variable @code{EXEEXT} based on the output of the +compiler, after .c, .o, and .obj files have been excluded. Typically +set to empty string if Unix, @samp{.exe} or @samp{.EXE} if Win32. +@end defmac + +@defmac AC_OBJEXT +@maindex OBJEXT +@ovindex OBJEXT +Defines substitute variable @code{OBJEXT} based on the output of the +compiler, after .c files have been excluded. Typically +set to @samp{.o} if Unix, @samp{.obj} if Win32. +@end defmac + +@defmac AC_MINGW32 +@maindex MINGW32 +Checks for the MingW32 compiler environment. If present, sets shell +variable @code{MINGW32} to @samp{yes}. If not present, sets +@code{MINGW32} to the empty string. @end defmac @defmac AC_PATH_X @@ -2776,7 +2859,16 @@ found to the output variable @code{X_PRE_LIBS}. @c This is an incomplete kludge. Make a real way to do it. @c If you need to check for other X functions or libraries yourself, then @c after calling this macro, add the contents of @code{X_EXTRA_LIBS} to -@c @code{LIBS} temporarily, like this: +@c @code{LIBS} temporarily, like this: (FIXME - add example) +@end defmac + +@defmac AC_SYS_INTERPRETER +@maindex SYS_INTERPRETER +Check whether the system supports starting scripts with a line of the +form @samp{#! /bin/csh} to select the interpreter to use for the script. +After running this macro, shell code in @code{configure.in} can check +the shell variable @code{interpval}; it will be set to @samp{yes} +if the system supports @samp{#!}, @samp{no} if not. @end defmac @defmac AC_SYS_LONG_FILE_NAMES @@ -3037,6 +3129,24 @@ If the file compiles and links successfully, run shell commands @var{action-if-found}, otherwise run @var{action-if-not-found}. @end defmac +@defmac AC_TRY_LINK_FUNC (@var{function}, @r{[}@var{action-if-found} @r{[}, @var{action-if-not-found}@r{]]}) +@maindex TRY_LINK_FUNC +Depending on the current language (@pxref{Language Choice}), create a +test program to see whether a program whose body consists of +a prototype of and a call to @var{function} can be compiled and linked. + +If the file compiles and links successfully, run shell commands +@var{action-if-found}, otherwise run @var{action-if-not-found}. +@end defmac + +@defmac AC_TRY_LINK_FUNC (@var{function}, @r{[}@var{action-if-found} @r{[}, @var{action-if-not-found}@r{]]}) +@maindex TRY_LINK_FUNC +Attempt to compile and link a small program that links with +@var{function}. If the file compiles and links successfully, +run shell commands @var{action-if-found}, otherwise run +@var{action-if-not-found}. +@end defmac + @defmac AC_COMPILE_CHECK (@var{echo-text}, @var{includes}, @var{function-body}, @var{action-if-found} @r{[}, @var{action-if-not-found}@r{]}) @maindex COMPILE_CHECK This is an obsolete version of @code{AC_TRY_LINK}, with the addition @@ -3323,9 +3433,10 @@ it has been run, empty otherwise. @defmac AC_LANG_FORTRAN77 @maindex LANG_FORTRAN77 -Do compilation tests using @code{FC} and use extension @file{.f} for +Do compilation tests using @code{F77} and use extension @file{.f} for test programs. Set the shell variable @code{cross_compiling} to the -value computed by @code{AC_PROG_FC} if it has been run, empty otherwise. +value computed by @code{AC_PROG_F77} if it has been run, empty +otherwise. @end defmac @defmac AC_LANG_SAVE @@ -4137,6 +4248,13 @@ host type. This is all that is needed for programs that are not part of a compiler toolchain. @end defmac +@defmac AC_VALIDATE_CACHED_SYSTEM_TUPLE (@var{cmd}) +@maindex VALIDATE_CACHED_SYSTEM_TUPLE +If the cache file is inconsistent with the current host, +target and build system types, execute @var{cmd} or print a default +error message. +@end defmac + @node System Type Variables, Using System Type, Canonicalizing, Manual Configuration @section System Type Variables diff --git a/autoreconf.in b/autoreconf.in index 022e1a5f..99770bbf 100644 --- a/autoreconf.in +++ b/autoreconf.in @@ -127,7 +127,7 @@ while read dir; do then run_aclocal=yes else - if test -f `echo $aclocal | sed 's,/[^/]*,,;s,^$,.,'`/acinclude.m4 + if test -f `echo $aclocal | sed 's,/*[^/]*$,,;s,^$,.,'`/acinclude.m4 then run_aclocal=yes fi @@ -136,14 +136,14 @@ while read dir; do then if test $force = no && ls -lt configure.in $aclocal \ - `echo $aclocal | sed 's,/[^/]*,,;s,^$,.,'`/acinclude.m4 | + `echo $aclocal | sed 's,/*[^/]*$,,;s,^$,.,'`/acinclude.m4 | sed 1q | grep 'aclocal\.m4$' > /dev/null then : else test $verbose = yes && echo running aclocal in $dir, creating $aclocal - aclocal --output=$aclocal -I `echo $aclocal | sed 's,/[^/]*,,;s,^$,.,'` + aclocal --output=$aclocal -I `echo $aclocal | sed 's,/*[^/]*$,,;s,^$,.,'` fi fi @@ -183,12 +183,12 @@ while read dir; do : colon s/:.*// '` - stamp=`echo $template | sed 's,/[^/]*$,,;s,^$,.,`/stamp-h`test "$tcount" -gt 1 && echo "$tcount"`.in + stamp=`echo $template | sed 's,/*[^/]*$,,;s,^$,.,'`/stamp-h`test "$tcount" -gt 1 && echo "$tcount"`.in if test ! -f "$template" || grep autoheader "$template" >/dev/null; then if test $force = no && test -f $template && ls -lt $template configure.in $aclocal $stamp 2>/dev/null \ - `echo $localdir_opt | sed 's/--localdir=// - s%\(.\)$%\1/%'`acconfig.h | + `echo $localdir_opt | sed -e 's/--localdir=//' \ + -e '/./ s%$%/%'`acconfig.h | sed 1q | egrep "$template$|$stamp$" > /dev/null then : diff --git a/autoreconf.sh b/autoreconf.sh index 022e1a5f..99770bbf 100644 --- a/autoreconf.sh +++ b/autoreconf.sh @@ -127,7 +127,7 @@ while read dir; do then run_aclocal=yes else - if test -f `echo $aclocal | sed 's,/[^/]*,,;s,^$,.,'`/acinclude.m4 + if test -f `echo $aclocal | sed 's,/*[^/]*$,,;s,^$,.,'`/acinclude.m4 then run_aclocal=yes fi @@ -136,14 +136,14 @@ while read dir; do then if test $force = no && ls -lt configure.in $aclocal \ - `echo $aclocal | sed 's,/[^/]*,,;s,^$,.,'`/acinclude.m4 | + `echo $aclocal | sed 's,/*[^/]*$,,;s,^$,.,'`/acinclude.m4 | sed 1q | grep 'aclocal\.m4$' > /dev/null then : else test $verbose = yes && echo running aclocal in $dir, creating $aclocal - aclocal --output=$aclocal -I `echo $aclocal | sed 's,/[^/]*,,;s,^$,.,'` + aclocal --output=$aclocal -I `echo $aclocal | sed 's,/*[^/]*$,,;s,^$,.,'` fi fi @@ -183,12 +183,12 @@ while read dir; do : colon s/:.*// '` - stamp=`echo $template | sed 's,/[^/]*$,,;s,^$,.,`/stamp-h`test "$tcount" -gt 1 && echo "$tcount"`.in + stamp=`echo $template | sed 's,/*[^/]*$,,;s,^$,.,'`/stamp-h`test "$tcount" -gt 1 && echo "$tcount"`.in if test ! -f "$template" || grep autoheader "$template" >/dev/null; then if test $force = no && test -f $template && ls -lt $template configure.in $aclocal $stamp 2>/dev/null \ - `echo $localdir_opt | sed 's/--localdir=// - s%\(.\)$%\1/%'`acconfig.h | + `echo $localdir_opt | sed -e 's/--localdir=//' \ + -e '/./ s%$%/%'`acconfig.h | sed 1q | egrep "$template$|$stamp$" > /dev/null then : diff --git a/bin/autoreconf.in b/bin/autoreconf.in index 022e1a5f..99770bbf 100644 --- a/bin/autoreconf.in +++ b/bin/autoreconf.in @@ -127,7 +127,7 @@ while read dir; do then run_aclocal=yes else - if test -f `echo $aclocal | sed 's,/[^/]*,,;s,^$,.,'`/acinclude.m4 + if test -f `echo $aclocal | sed 's,/*[^/]*$,,;s,^$,.,'`/acinclude.m4 then run_aclocal=yes fi @@ -136,14 +136,14 @@ while read dir; do then if test $force = no && ls -lt configure.in $aclocal \ - `echo $aclocal | sed 's,/[^/]*,,;s,^$,.,'`/acinclude.m4 | + `echo $aclocal | sed 's,/*[^/]*$,,;s,^$,.,'`/acinclude.m4 | sed 1q | grep 'aclocal\.m4$' > /dev/null then : else test $verbose = yes && echo running aclocal in $dir, creating $aclocal - aclocal --output=$aclocal -I `echo $aclocal | sed 's,/[^/]*,,;s,^$,.,'` + aclocal --output=$aclocal -I `echo $aclocal | sed 's,/*[^/]*$,,;s,^$,.,'` fi fi @@ -183,12 +183,12 @@ while read dir; do : colon s/:.*// '` - stamp=`echo $template | sed 's,/[^/]*$,,;s,^$,.,`/stamp-h`test "$tcount" -gt 1 && echo "$tcount"`.in + stamp=`echo $template | sed 's,/*[^/]*$,,;s,^$,.,'`/stamp-h`test "$tcount" -gt 1 && echo "$tcount"`.in if test ! -f "$template" || grep autoheader "$template" >/dev/null; then if test $force = no && test -f $template && ls -lt $template configure.in $aclocal $stamp 2>/dev/null \ - `echo $localdir_opt | sed 's/--localdir=// - s%\(.\)$%\1/%'`acconfig.h | + `echo $localdir_opt | sed -e 's/--localdir=//' \ + -e '/./ s%$%/%'`acconfig.h | sed 1q | egrep "$template$|$stamp$" > /dev/null then : diff --git a/config.guess b/config.guess index 35bcb5c2..5d4a9d7a 100755 --- a/config.guess +++ b/config.guess @@ -526,13 +526,13 @@ EOF echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` exit 0 ;; i*:CYGWIN*:*) - echo ${UNAME_MACHINE}-pc-cygwin32 + echo ${UNAME_MACHINE}-pc-cygwin exit 0 ;; i*:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit 0 ;; p*:CYGWIN*:*) - echo powerpcle-unknown-cygwin32 + echo powerpcle-unknown-cygwin exit 0 ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` diff --git a/config.sub b/config.sub index f7911664..00bea6e6 100755 --- a/config.sub +++ b/config.sub @@ -713,7 +713,7 @@ case $os in | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ - | -cygwin32* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ + | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -uxpv* | -beos*) # Remember, each alternative MUST END IN *, to match a version number. ;; diff --git a/configure b/configure index 49456a43..7c2ad021 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.12.2 +# Generated automatically using autoconf version 2.13 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. # # This configure script is free software; the Free Software Foundation @@ -333,7 +333,7 @@ EOF verbose=yes ;; -version | --version | --versio | --versi | --vers) - echo "configure generated by autoconf version 2.12.2" + echo "configure generated by autoconf version 2.13" exit 0 ;; -with-* | --with-*) @@ -547,7 +547,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:__oline__: checking for $ac_word" >&5 +echo "configure:551: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_M4'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -560,7 +560,8 @@ else ;; *) IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - for ac_dir in $PATH; do + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_path_M4="$ac_dir/$ac_word" @@ -587,7 +588,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:__oline__: checking for $ac_word" >&5 +echo "configure:592: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -595,7 +596,8 @@ else ac_cv_prog_AWK="$AWK" # Let the user override the test. else IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - for ac_dir in $PATH; do + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_prog_AWK="$ac_prog" @@ -619,7 +621,7 @@ done # Extract the first word of "perl", so it can be a program name with args. set dummy perl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:__oline__: checking for $ac_word" >&5 +echo "configure:625: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -632,7 +634,8 @@ else ;; *) IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" - for ac_dir in $PATH; do + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_path_PERL="$ac_dir/$ac_word" @@ -688,7 +691,7 @@ ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:__oline__: checking for a BSD compatible install" >&5 +echo "configure:695: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -736,6 +739,8 @@ echo "$ac_t""$INSTALL" 1>&6 # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' + test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' @@ -767,7 +772,7 @@ EOF # 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. (set) 2>&1 | - case `(ac_space=' '; set) 2>&1 | grep ac_space` in + case `(ac_space=' '; set | grep ac_space) 2>&1` in *ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote substitution # turns \\\\ into \\, and sed turns \\ into \). @@ -846,7 +851,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.12.2" + echo "$CONFIG_STATUS generated by autoconf version 2.13" exit 0 ;; -help | --help | --hel | --he | --h) echo "\$ac_cs_usage"; exit 0 ;; @@ -870,6 +875,7 @@ s%@SHELL@%$SHELL%g s%@CFLAGS@%$CFLAGS%g s%@CPPFLAGS@%$CPPFLAGS%g s%@CXXFLAGS@%$CXXFLAGS%g +s%@FFLAGS@%$FFLAGS%g s%@DEFS@%$DEFS%g s%@LDFLAGS@%$LDFLAGS%g s%@LIBS@%$LIBS%g @@ -893,6 +899,7 @@ s%@AWK@%$AWK%g s%@PERL@%$PERL%g s%@SCRIPTS@%$SCRIPTS%g s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g +s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g s%@INSTALL_DATA@%$INSTALL_DATA%g s%@standards_info@%$standards_info%g s%@standards_dvi@%$standards_dvi%g diff --git a/doc/autoconf.texi b/doc/autoconf.texi index 47013cb7..22a2ccd5 100644 --- a/doc/autoconf.texi +++ b/doc/autoconf.texi @@ -6,9 +6,9 @@ @c @setchapternewpage odd @c %**end of header -@set EDITION 2.12 -@set VERSION 2.12 -@set UPDATED November 1996 +@set EDITION 2.13 +@set VERSION 2.13 +@set UPDATED December 1998 @iftex @finalout @@ -56,12 +56,12 @@ by the Foundation. @subtitle Creating Automatic Configuration Scripts @subtitle Edition @value{EDITION}, for Autoconf version @value{VERSION} @subtitle @value{UPDATED} -@author by David MacKenzie +@author by David MacKenzie and Ben Elliston @c I think I've rewritten all of Noah and Roland's contributions by now. @page @vskip 0pt plus 1filll -Copyright @copyright{} 1992, 93, 94, 95, 96 Free Software Foundation, Inc. +Copyright @copyright{} 1992, 93, 94, 95, 96, 98 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice @@ -1056,7 +1056,7 @@ C++ features. @ovindex FFLAGS Debugging and optimization options for the Fortran 77 compiler. If it is not set in the environment when @code{configure} runs, the default -value is set when you call @code{AC_PROG_FC} (or empty if you don't). +value is set when you call @code{AC_PROG_F77} (or empty if you don't). @code{configure} uses this variable when compiling programs to test for Fortran 77 features. @end defvar @@ -1623,17 +1623,17 @@ calling @code{AC_TRY_CPP}, @code{AC_CHECK_HEADER}, @code{AC_EGREP_HEADER}, or @code{AC_EGREP_CPP}. @end defmac -@defmac AC_PROG_FC +@defmac AC_PROG_F77 @maindex PROG_FORTRAN -@ovindex FC +@ovindex F77 @ovindex FFLAGS -Determine a Fortran 77 compiler to use. If @code{FC} is not already set -in the environment, check for @code{g77}, @code{f77} and @code{f2c}, in -that order. Set the output variable @code{FC} to the name of the +Determine a Fortran 77 compiler to use. If @code{F77} is not already +set in the environment, check for @code{g77}, @code{f77} and @code{f2c}, +in that order. Set the output variable @code{F77} to the name of the compiler found. If using @code{g77} (the GNU Fortran 77 compiler), then -@code{AC_PROG_FC} will set the shell variable @code{G77} to @samp{yes}, +@code{AC_PROG_F77} will set the shell variable @code{G77} to @samp{yes}, and empty otherwise. If the output variable @code{FFLAGS} was not already set in the environment, then set it to @samp{-g -02} for @code{g77} (or @samp{-O2} where @code{g77} does not accept @samp{-g}). @@ -1641,11 +1641,11 @@ Otherwise, set @code{FFLAGS} to @samp{-g} for all other Fortran 77 compilers. @end defmac -@defmac AC_PROG_FC_C_O -@maindex PROG_FC_C_O -@cvindex FC_NO_MINUS_C_MINUS_O +@defmac AC_PROG_F77_C_O +@maindex PROG_F77_C_O +@cvindex F77_NO_MINUS_C_MINUS_O Test if the Fortran 77 compiler accepts the options @samp{-c} and -@samp{-o} simultaneously, and define @code{FC_NO_MINUS_C_MINUS_O} if it +@samp{-o} simultaneously, and define @code{F77_NO_MINUS_C_MINUS_O} if it does not. @end defmac @@ -1665,13 +1665,14 @@ is becoming a less prevalent problem. @ovindex INSTALL @ovindex INSTALL_PROGRAM @ovindex INSTALL_DATA +@ovindex INSTALL_SCRIPT Set output variable @code{INSTALL} to the path of a BSD compatible @code{install} program, if one is found in the current @code{PATH}. Otherwise, set @code{INSTALL} to @samp{@var{dir}/install-sh -c}, checking the directories specified to @code{AC_CONFIG_AUX_DIR} (or its default directories) to determine @var{dir} (@pxref{Output}). Also set -the variable @code{INSTALL_PROGRAM} to @samp{$@{INSTALL@}} and -@code{INSTALL_DATA} to @samp{$@{INSTALL@} -m 644}. +the variables @code{INSTALL_PROGRAM} and @code{INSTALL_SCRIPT} to +@samp{$@{INSTALL@}} and @code{INSTALL_DATA} to @samp{$@{INSTALL@} -m 644}. This macro screens out various instances of @code{install} known to not work. It prefers to find a C program rather than a shell script, for @@ -1745,7 +1746,7 @@ to @samp{byacc}. Otherwise set @code{YACC} to @samp{yacc}. @end defmac @node Generic Programs, , Particular Programs, Alternative Programs -@subsection Generic Program Checks +@subsection Generic Program and File Checks These macros are used to find programs not covered by the particular test macros. If you need to check the behavior of a program as well as @@ -1760,6 +1761,19 @@ AC_PATH_PROG(INETD, inetd, /usr/libexec/inetd, $PATH:/usr/libexec:/usr/sbin:/usr/etc:etc) @end example +@defmac AC_CHECK_FILE (@var{file} @r{[}, @var{action-if-found} @r{[}, @var{action-if-not-found}@r{]]}) +@maindex CHECK_FILE +Check whether file @var{file} exists on the native system. +If it is found, execute @var{action-if-found}, otherwise do +@var{action-if-not-found}, if given. +@end defmac + +@defmac AC_CHECK_FILES (@var{files}@r{[}, @var{action-if-found} @r{[}, @var{action-if-not-found}@r{]]}) +@maindex CHECK_FILES +Executes @code{AC_CHECK_FILE} once for each file listed in @var{files}. +Additionally, defines @samp{HAVE@var{file}} for each file found, set to 1. +@end defmac + @defmac AC_CHECK_PROG (@var{variable}, @var{prog-to-check-for}, @var{value-if-found} @r{[}, @var{value-if-not-found} @r{[}, @var{path}, @r{[} @var{reject} @r{]]]}) @maindex CHECK_PROG Check whether program @var{prog-to-check-for} exists in @code{PATH}. If @@ -1827,11 +1841,10 @@ name of the library; e.g., to check for @samp{-lmp}, use @samp{mp} as the @var{library} argument. @var{action-if-found} is a list of shell commands to run if the link -with the library succeeds; @var{action-if-not-found} is a list of shell -commands to run if the link fails. If @var{action-if-found} and -@var{action-if-not-found} are not specified, the default action is to -add @samp{-l@var{library}} to @code{LIBS} and define -@samp{HAVE_LIB@var{library}} (in all capitals). +with the library succeeds; @var{action-if-not-found} is a list of +shell commands to run if the link fails. If @var{action-if-found} is +not specified, the default action will add @samp{-l@var{library}} to +@code{LIBS} and define @samp{HAVE_LIB@var{library}} (in all capitals). If linking with @var{library} results in unresolved symbols, which would be resolved by linking with additional libraries, give those libraries @@ -1851,6 +1864,32 @@ all of those cases, the compiler is passed @samp{-lfoo}. However, This macro is considered obsolete. @end defmac +@defmac AC_SEARCH_LIBS (@var{function}, @var{search-libs} @r{[}, @var{action-if-found} @r{[}, @var{action-if-not-found} @r{[}, @var{other-libraries}@r{]]]}) +@maindex SEARCH_LIBS +Search for a library defining @var{function}, if it's not already +available. This equates to calling @code{AC_TRY_LINK_FUNC} first +with no libraries, then for each library listed in @var{search-libs}. + +If the function is found, run @var{action-if-found}, otherwise run +@var{action-if-not-found}. + +If linking with @var{library} results in unresolved symbols, which would +be resolved by linking with additional libraries, give those libraries +as the @var{other-libraries} argument, separated by spaces: @samp{-lXt +-lX11}. Otherwise this macro will fail to detect that @var{function} is +present, because linking the test program will always fail with +unresolved symbols. +@end defmac + +@defmac AC_SEARCH_LIBS (@var{function}, @var{search-libs}@r{[}, @var{action-if-found} @r{[}, @var{action-if-not-found}@r{]]}) +@maindex SEARCH_LIBS +This macro is equivalent to calling @code{AC_TRY_LINK_FUNC} once for each +library listed in @var{search-libs}. Add @samp{-l@var{library}} to +@code{LIBS} for the first library found to contain @var{function}, and +execute @var{action-if-found}. Otherwise execute +@var{action-if-not-found}. +@end defmac + @node Library Functions, Header Files, Libraries, Existing Tests @section Library Functions @@ -1906,9 +1945,7 @@ rather than choke on it. @example @group /* AIX requires this to be the first thing in the file. */ -#ifdef __GNUC__ -# define alloca __builtin_alloca -#else +#ifndef __GNUC__ # if HAVE_ALLOCA_H # include # else @@ -2021,6 +2058,19 @@ If the @code{mmap} function exists and works correctly, define memory. @end defmac +@defmac AC_FUNC_SELECT_ARGTYPES +@maindex FUNC_SELECT_ARGTYPES +@cvindex SELECT_TYPE_ARG1 +@cvindex SELECT_TYPE_ARG234 +@cvindex SELECT_TYPE_ARG5 +Determines the correct type to be passed to each of the +@code{select} function's arguments, and defines those types +in @code{SELECT_TYPE_ARG1}, @code{SELECT_TYPE_ARG234}, and +@code{SELECT_TYPE_ARG5} respectively. @code{SELECT_TYPE_ARG1} defaults +to @samp{int}, @code{SELECT_TYPE_ARG234} defaults to @samp{int *}, +and @code{SELECT_TYPE_ARG5} defaults to @samp{struct timeval *}. +@end defmac + @defmac AC_FUNC_SETPGRP @maindex FUNC_SETPGRP @cvindex SETPGRP_VOID @@ -2653,6 +2703,18 @@ If the C compiler supports the @code{long double} type, define that define @code{__STDC__} do not support @code{long double}. @end defmac +@defmac AC_C_STRINGIZE +@maindex C_STRINGIZE +@cvindex HAVE_STRINGIZE +If the C preprocessor supports the stringizing operator, define +@code{HAVE_STRINGIZE}. The stringizing operator is @samp{#} and is +found in macros such as this: + +@example +#define x(y) #y +@end example +@end defmac + @defmac AC_CHECK_SIZEOF (@var{type} @r{[}, @var{cross-size}@r{]}) @maindex CHECK_SIZEOF Define @code{SIZEOF_@var{uctype}} to be the size in bytes of the C (or @@ -2729,13 +2791,34 @@ libraries. The following macros check for operating system services or capabilities. -@defmac AC_SYS_INTERPRETER -@maindex SYS_INTERPRETER -Check whether the system supports starting scripts with a line of the -form @samp{#! /bin/csh} to select the interpreter to use for the script. -After running this macro, shell code in @code{configure.in} can check -the variable @code{ac_cv_sys_interpreter}; it will be set to @samp{yes} -if the system supports @samp{#!}, @samp{no} if not. +@defmac AC_CYGWIN +@maindex CYGWIN +Checks for the Cygwin environment. If present, sets shell variable +@code{CYGWIN} to @samp{yes}. If not present, sets @code{CYGWIN} +to the empty string. +@end defmac + +@defmac AC_EXEEXT +@maindex EXEEXT +@ovindex EXEEXT +Defines substitute variable @code{EXEEXT} based on the output of the +compiler, after .c, .o, and .obj files have been excluded. Typically +set to empty string if Unix, @samp{.exe} or @samp{.EXE} if Win32. +@end defmac + +@defmac AC_OBJEXT +@maindex OBJEXT +@ovindex OBJEXT +Defines substitute variable @code{OBJEXT} based on the output of the +compiler, after .c files have been excluded. Typically +set to @samp{.o} if Unix, @samp{.obj} if Win32. +@end defmac + +@defmac AC_MINGW32 +@maindex MINGW32 +Checks for the MingW32 compiler environment. If present, sets shell +variable @code{MINGW32} to @samp{yes}. If not present, sets +@code{MINGW32} to the empty string. @end defmac @defmac AC_PATH_X @@ -2776,7 +2859,16 @@ found to the output variable @code{X_PRE_LIBS}. @c This is an incomplete kludge. Make a real way to do it. @c If you need to check for other X functions or libraries yourself, then @c after calling this macro, add the contents of @code{X_EXTRA_LIBS} to -@c @code{LIBS} temporarily, like this: +@c @code{LIBS} temporarily, like this: (FIXME - add example) +@end defmac + +@defmac AC_SYS_INTERPRETER +@maindex SYS_INTERPRETER +Check whether the system supports starting scripts with a line of the +form @samp{#! /bin/csh} to select the interpreter to use for the script. +After running this macro, shell code in @code{configure.in} can check +the shell variable @code{interpval}; it will be set to @samp{yes} +if the system supports @samp{#!}, @samp{no} if not. @end defmac @defmac AC_SYS_LONG_FILE_NAMES @@ -3037,6 +3129,24 @@ If the file compiles and links successfully, run shell commands @var{action-if-found}, otherwise run @var{action-if-not-found}. @end defmac +@defmac AC_TRY_LINK_FUNC (@var{function}, @r{[}@var{action-if-found} @r{[}, @var{action-if-not-found}@r{]]}) +@maindex TRY_LINK_FUNC +Depending on the current language (@pxref{Language Choice}), create a +test program to see whether a program whose body consists of +a prototype of and a call to @var{function} can be compiled and linked. + +If the file compiles and links successfully, run shell commands +@var{action-if-found}, otherwise run @var{action-if-not-found}. +@end defmac + +@defmac AC_TRY_LINK_FUNC (@var{function}, @r{[}@var{action-if-found} @r{[}, @var{action-if-not-found}@r{]]}) +@maindex TRY_LINK_FUNC +Attempt to compile and link a small program that links with +@var{function}. If the file compiles and links successfully, +run shell commands @var{action-if-found}, otherwise run +@var{action-if-not-found}. +@end defmac + @defmac AC_COMPILE_CHECK (@var{echo-text}, @var{includes}, @var{function-body}, @var{action-if-found} @r{[}, @var{action-if-not-found}@r{]}) @maindex COMPILE_CHECK This is an obsolete version of @code{AC_TRY_LINK}, with the addition @@ -3323,9 +3433,10 @@ it has been run, empty otherwise. @defmac AC_LANG_FORTRAN77 @maindex LANG_FORTRAN77 -Do compilation tests using @code{FC} and use extension @file{.f} for +Do compilation tests using @code{F77} and use extension @file{.f} for test programs. Set the shell variable @code{cross_compiling} to the -value computed by @code{AC_PROG_FC} if it has been run, empty otherwise. +value computed by @code{AC_PROG_F77} if it has been run, empty +otherwise. @end defmac @defmac AC_LANG_SAVE @@ -4137,6 +4248,13 @@ host type. This is all that is needed for programs that are not part of a compiler toolchain. @end defmac +@defmac AC_VALIDATE_CACHED_SYSTEM_TUPLE (@var{cmd}) +@maindex VALIDATE_CACHED_SYSTEM_TUPLE +If the cache file is inconsistent with the current host, +target and build system types, execute @var{cmd} or print a default +error message. +@end defmac + @node System Type Variables, Using System Type, Canonicalizing, Manual Configuration @section System Type Variables diff --git a/lib/autoconf/general.m4 b/lib/autoconf/general.m4 index b3418eae..ae971de1 100644 --- a/lib/autoconf/general.m4 +++ b/lib/autoconf/general.m4 @@ -52,7 +52,7 @@ dnl divert(-1)dnl Throw away output until AC_INIT is called. changequote([, ]) -define(AC_ACVERSION, 2.12.2) +define(AC_ACVERSION, 2.13) dnl Some old m4's don't support m4exit. But they provide dnl equivalent functionality by core dumping because of the @@ -1249,9 +1249,9 @@ dnl AC_LANG_FORTRAN77() AC_DEFUN(AC_LANG_FORTRAN77, [define([AC_LANG], [FORTRAN77])dnl ac_ext=f -ac_compile='${FC-f77} -c $FFLAGS conftest.$ac_ext 1>&AC_FD_CC' -ac_link='${FC-f77} -o conftest${ac_exeext} $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&AC_FD_CC' -cross_compiling=$ac_cv_prog_fc_cross +ac_compile='${F77-f77} -c $FFLAGS conftest.$ac_ext 1>&AC_FD_CC' +ac_link='${F77-f77} -o conftest${ac_exeext} $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&AC_FD_CC' +cross_compiling=$ac_cv_prog_f77_cross ]) dnl Push the current language on a stack. @@ -1534,7 +1534,7 @@ dnl ACTION-IF-NOT-FOUND. AC_DEFUN(AC_TRY_LINK_FUNC, AC_TRY_LINK(dnl -ifelse([$2], [main], , dnl Avoid conflicting decl of main. +ifelse([$1], [main], , dnl Avoid conflicting decl of main. [/* Override any gcc2 internal prototype to avoid an error. */ ]ifelse(AC_LANG, CPLUSPLUS, [#ifdef __cplusplus extern "C" @@ -1549,17 +1549,18 @@ char $1(); [$3])) -dnl AC_SEARCH_LIBS(func, searchlibs, [action-if-found], [action-if-not-found]) +dnl AC_SEARCH_LIBS(FUNCTION, SEARCH-LIBS [, ACTION-IF-FOUND +dnl [, ACTION-IF-NOT-FOUND [, OTHER-LIBRARIES]]]) dnl Search for a library defining FUNC, if it's not already available. AC_DEFUN(AC_SEARCH_LIBS, -[AC_PREREQ([2.12]) +[AC_PREREQ([2.13]) AC_CACHE_CHECK([for library containing $1], [ac_cv_search_$1], [ac_func_search_save_LIBS="$LIBS" ac_cv_search_$1="no" AC_TRY_LINK_FUNC([$1], [ac_cv_search_$1="none required"]) test "$ac_cv_search_$1" = "no" && for i in $2; do -LIBS="-l$i $ac_func_search_save_LIBS" +LIBS="-l$i $5 $ac_func_search_save_LIBS" AC_TRY_LINK_FUNC([$1], [ac_cv_search_$1="-l$i" break]) @@ -1905,7 +1906,7 @@ AC_DEFUN(AC_CHECK_FILES, do AC_CHECK_FILE($ac_file, [changequote(, )dnl - ac_tr_file=HAVE`echo $ac_file | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` + ac_tr_file=HAVE_`echo $ac_file | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` changequote([, ])dnl AC_DEFINE_UNQUOTED($ac_tr_file) $2], $3)dnl done diff --git a/lib/autoconf/specific.m4 b/lib/autoconf/specific.m4 index 5dd3ae3d..5c6f1c9e 100644 --- a/lib/autoconf/specific.m4 +++ b/lib/autoconf/specific.m4 @@ -154,33 +154,27 @@ else fi ]) -dnl Determine a Fortran compiler to use. If `FC' is not already set in -dnl the environment, check for `g77', `f77' and `f2c', in that order. -dnl See the output variable `FC' to the name of the compiler found. +dnl Determine a Fortran 77 compiler to use. If `F77' is not already set +dnl in the environment, check for `g77', `f77' and `f2c', in that order. +dnl Set the output variable `F77' to the name of the compiler found. dnl -dnl If using `g77' (the GNU Fortran compiler), then `AC_PROG_FC' will -dnl set the shell variable `G77' to `yes', and empty otherwise. If the -dnl output variable `FFLAGS' was not already set in the environment, +dnl If using `g77' (the GNU Fortran 77 compiler), then `AC_PROG_F77' +dnl will set the shell variable `G77' to `yes', and empty otherwise. If +dnl the output variable `FFLAGS' was not already set in the environment, dnl then set it to `-g -02' for `g77' (or `-O2' where `g77' does not dnl accept `-g'). Otherwise, set `FFLAGS' to `-g' for all other Fortran -dnl compilers. +dnl 77 compilers. dnl -dnl AC_PROG_FC() -AC_DEFUN(AC_PROG_FC, +dnl AC_PROG_F77() +AC_DEFUN(AC_PROG_F77, [AC_BEFORE([$0], [AC_PROG_CPP])dnl -if test -z "$FC"; then - AC_CHECK_PROG(FC, g77, g77) - if test -z "$FC"; then - AC_CHECK_PROG(FC, f77, f77) - if test -z "$FC"; then - AC_CHECK_PROG(FC, f2c, f2c) - fi - test -z "$FC" && AC_MSG_ERROR([no acceptable Fortran compiler found in \$PATH]) - fi +if test -z "$F77"; then + AC_CHECK_PROGS(F77, g77 f77 f2c) + test -z "$F77" && AC_MSG_ERROR([no acceptable Fortran 77 compiler found in \$PATH]) fi -AC_PROG_FC_WORKS -AC_PROG_FC_GNU +AC_PROG_F77_WORKS +AC_PROG_F77_GNU if test $ac_cv_prog_g77 = yes; then G77=yes @@ -190,10 +184,10 @@ dnl normal versions of a library), tasteless as that idea is. ac_test_FFLAGS="${FFLAGS+set}" ac_save_FFLAGS="$FFLAGS" FFLAGS= - AC_PROG_FC_G + AC_PROG_F77_G if test "$ac_test_FFLAGS" = set; then FFLAGS="$ac_save_FFLAGS" - elif test $ac_cv_prog_fc_g = yes; then + elif test $ac_cv_prog_f77_g = yes; then FFLAGS="-g -O2" else FFLAGS="-O2" @@ -223,7 +217,7 @@ 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_COMPILER([main(){return(0);}], ac_cv_prog_cxx_works, ac_cv_prog_cxx_cross) +AC_TRY_COMPILER([int main(){return(0);}], ac_cv_prog_cxx_works, ac_cv_prog_cxx_cross) AC_LANG_RESTORE AC_MSG_RESULT($ac_cv_prog_cxx_works) if test $ac_cv_prog_cxx_works = no; then @@ -234,28 +228,28 @@ AC_MSG_RESULT($ac_cv_prog_cxx_cross) cross_compiling=$ac_cv_prog_cxx_cross ]) -dnl Test whether the Fortran compiler can compile and link a trivial -dnl Fortran program. Also, test whether the Fortran compiler is a +dnl Test whether the Fortran 77 compiler can compile and link a trivial +dnl Fortran program. Also, test whether the Fortran 77 compiler is a dnl cross-compiler (which may realistically be the case if the Fortran dnl compiler is `g77'). dnl -dnl AC_PROG_FC_WORKS() -AC_DEFUN(AC_PROG_FC_WORKS, -[AC_MSG_CHECKING([whether the Fortran compiler ($FC $FFLAGS $LDFLAGS) works]) +dnl AC_PROG_F77_WORKS() +AC_DEFUN(AC_PROG_F77_WORKS, +[AC_MSG_CHECKING([whether the Fortran 77 compiler ($F77 $FFLAGS $LDFLAGS) works]) AC_LANG_SAVE AC_LANG_FORTRAN77 AC_TRY_COMPILER(dnl [ program conftest end -], ac_cv_prog_fc_works, ac_cv_prog_fc_cross) +], ac_cv_prog_f77_works, ac_cv_prog_f77_cross) AC_LANG_RESTORE -AC_MSG_RESULT($ac_cv_prog_fc_works) -if test $ac_cv_prog_fc_works = no; then - AC_MSG_ERROR([installation or configuration problem: Fortran compiler cannot create executables.]) +AC_MSG_RESULT($ac_cv_prog_f77_works) +if test $ac_cv_prog_f77_works = no; then + AC_MSG_ERROR([installation or configuration problem: Fortran 77 compiler cannot create executables.]) fi -AC_MSG_CHECKING([whether the Fortran compiler ($FC $FFLAGS $LDFLAGS) is a cross-compiler]) -AC_MSG_RESULT($ac_cv_prog_fc_cross) -cross_compiling=$ac_cv_prog_fc_cross +AC_MSG_CHECKING([whether the Fortran 77 compiler ($F77 $FFLAGS $LDFLAGS) is a cross-compiler]) +AC_MSG_RESULT($ac_cv_prog_f77_cross) +cross_compiling=$ac_cv_prog_f77_cross ]) AC_DEFUN(AC_PROG_CC_GNU, @@ -286,19 +280,19 @@ else ac_cv_prog_gxx=no fi])]) -dnl Test whether for Fortran compiler is `g77' (the GNU Fortran -dnl Compiler). This test depends on whether the Fortran compiler can do -dnl CPP pre-processing. +dnl Test whether for Fortran 77 compiler is `g77' (the GNU Fortran 77 +dnl Compiler). This test depends on whether the Fortran 77 compiler can +dnl do CPP pre-processing. dnl -dnl AC_PROG_FC_GNU() -AC_DEFUN(AC_PROG_FC_GNU, -[AC_CACHE_CHECK(whether we are using GNU Fortran, ac_cv_prog_g77, +dnl AC_PROG_F77_GNU() +AC_DEFUN(AC_PROG_F77_GNU, +[AC_CACHE_CHECK(whether we are using GNU Fortran 77, ac_cv_prog_g77, [cat > conftest.fpp </dev/null 2>&1; then +if AC_TRY_COMMAND($F77 -E conftest.fpp) | egrep yes >/dev/null 2>&1; then ac_cv_prog_g77=yes else ac_cv_prog_g77=no @@ -326,20 +320,20 @@ fi rm -f conftest* ])]) -dnl Test whether the Fortran compiler can accept the `-g' option to +dnl Test whether the Fortran 77 compiler can accept the `-g' option to dnl enable debugging. dnl -dnl AC_PROG_FC_G() -AC_DEFUN(AC_PROG_FC_G, -[AC_CACHE_CHECK(whether $FC accepts -g, ac_cv_prog_fc_g, +dnl AC_PROG_F77_G() +AC_DEFUN(AC_PROG_F77_G, +[AC_CACHE_CHECK(whether $F77 accepts -g, ac_cv_prog_f77_g, [cat > conftest.f << EOF program conftest end EOF -if test -z "`$FC -g -c conftest.f 2>&1`"; then - ac_cv_prog_fc_g=yes +if test -z "`$F77 -g -c conftest.f 2>&1`"; then + ac_cv_prog_f77_g=yes else - ac_cv_prog_fc_g=no + ac_cv_prog_f77_g=no fi rm -f conftest* ])]) @@ -414,22 +408,22 @@ else fi ]) -dnl Test if the Fortran compiler accepts the options `-c' and `-o' -dnl simultaneously, and define `FC_NO_MINUS_C_MINUS_O' if it does not. +dnl Test if the Fortran 77 compiler accepts the options `-c' and `-o' +dnl simultaneously, and define `F77_NO_MINUS_C_MINUS_O' if it does not. dnl dnl The usefulness of this macro is questionable, as I can't really see dnl why anyone would use it. The only reason I include it is for dnl completeness, since a similar test exists for the C compiler. dnl -dnl AC_PROG_FC_C_O -AC_DEFUN(AC_PROG_FC_C_O, -[AC_BEFORE([$0], [AC_PROG_FC])dnl -AC_MSG_CHECKING(whether $FC understand -c and -o together) -set dummy $FC; ac_fc="`echo [$]2 | +dnl AC_PROG_F77_C_O +AC_DEFUN(AC_PROG_F77_C_O, +[AC_BEFORE([$0], [AC_PROG_F77])dnl +AC_MSG_CHECKING(whether $F77 understand -c and -o together) +set dummy $F77; ac_f77="`echo [$]2 | changequote(, )dnl sed -e 's/[^a-zA-Z0-9_]/_/g' -e 's/^[0-9]/_/'`" changequote([, ])dnl -AC_CACHE_VAL(ac_cv_prog_fc_${ac_fc}_c_o, +AC_CACHE_VAL(ac_cv_prog_f77_${ac_f77}_c_o, [cat > conftest.f << EOF program conftest end @@ -437,19 +431,19 @@ EOF # We do the `AC_TRY_EVAL' test twice because some compilers refuse to # overwrite an existing `.o' file with `-o', although they will create # one. -ac_try='$FC $FFLAGS -c conftest.f -o conftest.o 1>&AC_FD_CC' +ac_try='$F77 $FFLAGS -c conftest.f -o conftest.o 1>&AC_FD_CC' if AC_TRY_EVAL(ac_try) && test -f conftest.o && AC_TRY_EVAL(ac_try); then - eval ac_cv_prog_fc_${ac_fc}_c_o=yes + eval ac_cv_prog_f77_${ac_f77}_c_o=yes else - eval ac_cv_prog_fc_${ac_fc}_c_o=no + eval ac_cv_prog_f77_${ac_f77}_c_o=no fi rm -f conftest* ])dnl -if eval "test \"`echo '$ac_cv_prog_fc_'${ac_fc}_c_o`\" = yes"; then +if eval "test \"`echo '$ac_cv_prog_f77_'${ac_f77}_c_o`\" = yes"; then AC_MSG_RESULT(yes) else AC_MSG_RESULT(no) - AC_DEFINE(FC_NO_MINUS_C_MINUS_O) + AC_DEFINE(F77_NO_MINUS_C_MINUS_O) fi ]) @@ -2030,15 +2024,15 @@ dnl extremely useful macro. Thank you John. dnl dnl AC_F77_LIBRARY_LDFLAGS() AC_DEFUN(AC_F77_LIBRARY_LDFLAGS, -[AC_MSG_CHECKING([for Fortran libraries]) -AC_REQUIRE([AC_PROG_FC]) +[AC_MSG_CHECKING([for Fortran 77 libraries]) +AC_REQUIRE([AC_PROG_F77]) AC_REQUIRE([AC_CANONICAL_HOST]) AC_CACHE_VAL(ac_cv_flibs, [changequote(, )dnl dnl Write a minimal program and compile it with -v. I don't know what dnl to do if your compiler doesn't have -v... echo " END" > conftest.f -foutput=`${FC} -v -o conftest conftest.f 2>&1` +foutput=`${F77} -v -o conftest conftest.f 2>&1` dnl dnl The easiest thing to do for xlf output is to replace all the commas dnl with spaces. Try to only do that if the output is really from xlf, @@ -2143,7 +2137,7 @@ dnl case "$arg" in -lkernel32) case "$canonical_host_type" in - *-*-cygwin32) + *-*-cygwin*) arg= ;; *) @@ -2231,6 +2225,7 @@ else ac_cv_sys_interpreter=no fi rm -f conftest]) +interpval="$ac_cv_sys_interpreter" ]) define(AC_HAVE_POUNDBANG, @@ -2617,15 +2612,24 @@ AC_SUBST(X_LIBS)dnl AC_SUBST(X_EXTRA_LIBS)dnl ]) -dnl Check for cygwin32. This is a way to set the right value for -dnl EXEEXT. +dnl The old Cygwin32 macro is deprecated. AC_DEFUN(AC_CYGWIN32, -[AC_CACHE_CHECK(for cygwin32 environment, ac_cv_cygwin32, -[AC_TRY_COMPILE(,[return __CYGWIN32__;], -ac_cv_cygwin32=yes, ac_cv_cygwin32=no) +[AC_OBSOLETE([$0], [; instead use AC_CYGWIN])dnl +AC_CYGWIN]) + +dnl Check for Cygwin. This is a way to set the right value for +dnl EXEEXT. +AC_DEFUN(AC_CYGWIN, +[AC_CACHE_CHECK(for Cygwin environment, ac_cv_cygwin, +[AC_TRY_COMPILE(,[ +#ifndef __CYGWIN__ +#define __CYGWIN__ __CYGWIN32__ +#endif +return __CYGWIN__;], +ac_cv_cygwin=yes, ac_cv_cygwin=no) rm -f conftest*]) -CYGWIN32= -test "$ac_cv_cygwin32" = yes && CYGWIN32=yes]) +CYGWIN= +test "$ac_cv_cygwin" = yes && CYGWIN=yes]) dnl Check for mingw32. This is another way to set the right value for dnl EXEEXT. @@ -2638,15 +2642,15 @@ MINGW32= test "$ac_cv_mingw32" = yes && MINGW32=yes]) dnl Check for the extension used for executables. This knows that we -dnl add .exe for cygwin32 or mingw32. Otherwise, it compiles a test +dnl add .exe for Cygwin or mingw32. Otherwise, it compiles a test dnl executable. If this is called, the executable extensions will be dnl automatically used by link commands run by the configure script. AC_DEFUN(AC_EXEEXT, -[AC_REQUIRE([AC_CYGWIN32]) +[AC_REQUIRE([AC_CYGWIN]) AC_REQUIRE([AC_MINGW32]) AC_MSG_CHECKING([for executable suffix]) AC_CACHE_VAL(ac_cv_exeext, -[if test "$CYGWIN32" = yes || test "$MINGW32" = yes; then +[if test "$CYGWIN" = yes || test "$MINGW32" = yes; then ac_cv_exeext=.exe else rm -f conftest* diff --git a/mkinstalldirs b/mkinstalldirs index d0fd194f..6b3b5fc5 100755 --- a/mkinstalldirs +++ b/mkinstalldirs @@ -22,7 +22,7 @@ do esac if test ! -d "$pathcomp"; then - echo "mkdir $pathcomp" 1>&2 + echo "mkdir $pathcomp" mkdir "$pathcomp" || lasterr=$?