From: Akim Demaille Date: Fri, 4 Feb 2000 09:15:26 +0000 (+0000) Subject: Introduce a means to distinguish failures of `configure' due to X-Git-Tag: autoconf-2.50~1255 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=34804a9d13f74aea646f9e2614a173efbab7212e;p=thirdparty%2Fautoconf.git Introduce a means to distinguish failures of `configure' due to extern software (so that the test suite doesn't fail on them). * acgeneral.m4 (AC_MSG_ERROR, AC_MSG_ERROR_UNQUOTED): Allow an optional $2: exit status. * doc/autoconf.texi: Document. * acspecific.m4 (AC_PROG_CC_WORKS, PROG_CXX_WORKS, AC_PROG_F77_WORKS): Exit 77 if the compiler does not work. --- diff --git a/ChangeLog b/ChangeLog index 9a60d8a3c..9aef37e22 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +1999-11-13 Akim Demaille + + Introduce a means to distinguish failures of `configure' due to + extern software (so that the test suite doesn't fail on them). + + * acgeneral.m4 (AC_MSG_ERROR, AC_MSG_ERROR_UNQUOTED): Allow an + optional $2: exit status. + * doc/autoconf.texi: Document. + * acspecific.m4 (AC_PROG_CC_WORKS, PROG_CXX_WORKS, + AC_PROG_F77_WORKS): Exit 77 if the compiler does not work. + 1999-11-13 Akim Demaille Clean up a bit the handling of the LANG stack. More is needed. diff --git a/acspecific.m4 b/acspecific.m4 index a93bdc092..6fbb3eb3b 100644 --- a/acspecific.m4 +++ b/acspecific.m4 @@ -213,7 +213,7 @@ AC_TRY_COMPILER([int main(){return(0);}], AC_LANG_RESTORE AC_MSG_RESULT($ac_cv_prog_cc_works) if test $ac_cv_prog_cc_works = no; then - AC_MSG_ERROR([installation or configuration problem: C compiler cannot create executables.]) + AC_MSG_ERROR([installation or configuration problem: C compiler cannot create executables.], 77) fi AC_MSG_CHECKING([whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler]) AC_MSG_RESULT($ac_cv_prog_cc_cross) @@ -232,7 +232,7 @@ AC_TRY_COMPILER([int main(){return(0);}], AC_LANG_RESTORE AC_MSG_RESULT($ac_cv_prog_cxx_works) if test $ac_cv_prog_cxx_works = no; then - AC_MSG_ERROR([installation or configuration problem: C++ compiler cannot create executables.]) + AC_MSG_ERROR([installation or configuration problem: C++ compiler cannot create executables.], 77) fi AC_MSG_CHECKING([whether the C++ compiler ($CXX $CXXFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler]) AC_MSG_RESULT($ac_cv_prog_cxx_cross) @@ -257,7 +257,7 @@ AC_TRY_COMPILER( AC_LANG_RESTORE 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.]) + AC_MSG_ERROR([installation or configuration problem: Fortran 77 compiler cannot create executables.], 77) fi AC_MSG_CHECKING([whether the Fortran 77 compiler ($F77 $FFLAGS $LDFLAGS) is a cross-compiler]) AC_MSG_RESULT($ac_cv_prog_f77_cross) @@ -2924,7 +2924,7 @@ EOF AC_TRY_LINK_FUNC(${foo_bar}, f77_underscore=double) - if test x"$f77_case" = x -o x"$f77_underscore" = x; then + if test x"$f77_case" = x || test x"$f77_underscore" = x; then ac_cv_f77_mangling="unknown" else ac_cv_f77_mangling="$f77_case case, $f77_underscore underscores" diff --git a/autoconf.texi b/autoconf.texi index 928020779..a827f0460 100644 --- a/autoconf.texi +++ b/autoconf.texi @@ -2631,7 +2631,7 @@ is declared in a system header file, either @file{signal.h} or These macros are used to find declarations not covered by the particular test macros. -@defmac AC_CHECK_DECL (@var{symbol}, @ovar{action-if-found}, @ovar{action-if-not-found}, o@var{includes}) +@defmac AC_CHECK_DECL (@var{symbol}, @ovar{action-if-found}, @ovar{action-if-not-found}, @ovar{includes}) @maindex CHECK_DECL If the declaration of @var{symbol} (a function or a variable) is needed because it is not declared in @var{includes}, run the shell commands @@ -4240,11 +4240,11 @@ This macro prints nothing if @code{configure} is run with the @samp{--quiet} or @samp{--silent} option. @end defmac -@defmac AC_MSG_ERROR (@var{error-description}) +@defmac AC_MSG_ERROR (@var{error-description}, @ovar{exit-status}) @maindex MSG_ERROR Notify the user of an error that prevents @code{configure} from completing. This macro prints an error message on the standard error -output and exits @code{configure} with a nonzero status. +output and exits @code{configure} with @var{exit-status} (1 by default). @var{error-description} should be something like @samp{invalid value $HOME for \$HOME}. @end defmac diff --git a/doc/autoconf.texi b/doc/autoconf.texi index 928020779..a827f0460 100644 --- a/doc/autoconf.texi +++ b/doc/autoconf.texi @@ -2631,7 +2631,7 @@ is declared in a system header file, either @file{signal.h} or These macros are used to find declarations not covered by the particular test macros. -@defmac AC_CHECK_DECL (@var{symbol}, @ovar{action-if-found}, @ovar{action-if-not-found}, o@var{includes}) +@defmac AC_CHECK_DECL (@var{symbol}, @ovar{action-if-found}, @ovar{action-if-not-found}, @ovar{includes}) @maindex CHECK_DECL If the declaration of @var{symbol} (a function or a variable) is needed because it is not declared in @var{includes}, run the shell commands @@ -4240,11 +4240,11 @@ This macro prints nothing if @code{configure} is run with the @samp{--quiet} or @samp{--silent} option. @end defmac -@defmac AC_MSG_ERROR (@var{error-description}) +@defmac AC_MSG_ERROR (@var{error-description}, @ovar{exit-status}) @maindex MSG_ERROR Notify the user of an error that prevents @code{configure} from completing. This macro prints an error message on the standard error -output and exits @code{configure} with a nonzero status. +output and exits @code{configure} with @var{exit-status} (1 by default). @var{error-description} should be something like @samp{invalid value $HOME for \$HOME}. @end defmac diff --git a/lib/autoconf/specific.m4 b/lib/autoconf/specific.m4 index a93bdc092..6fbb3eb3b 100644 --- a/lib/autoconf/specific.m4 +++ b/lib/autoconf/specific.m4 @@ -213,7 +213,7 @@ AC_TRY_COMPILER([int main(){return(0);}], AC_LANG_RESTORE AC_MSG_RESULT($ac_cv_prog_cc_works) if test $ac_cv_prog_cc_works = no; then - AC_MSG_ERROR([installation or configuration problem: C compiler cannot create executables.]) + AC_MSG_ERROR([installation or configuration problem: C compiler cannot create executables.], 77) fi AC_MSG_CHECKING([whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler]) AC_MSG_RESULT($ac_cv_prog_cc_cross) @@ -232,7 +232,7 @@ AC_TRY_COMPILER([int main(){return(0);}], AC_LANG_RESTORE AC_MSG_RESULT($ac_cv_prog_cxx_works) if test $ac_cv_prog_cxx_works = no; then - AC_MSG_ERROR([installation or configuration problem: C++ compiler cannot create executables.]) + AC_MSG_ERROR([installation or configuration problem: C++ compiler cannot create executables.], 77) fi AC_MSG_CHECKING([whether the C++ compiler ($CXX $CXXFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler]) AC_MSG_RESULT($ac_cv_prog_cxx_cross) @@ -257,7 +257,7 @@ AC_TRY_COMPILER( AC_LANG_RESTORE 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.]) + AC_MSG_ERROR([installation or configuration problem: Fortran 77 compiler cannot create executables.], 77) fi AC_MSG_CHECKING([whether the Fortran 77 compiler ($F77 $FFLAGS $LDFLAGS) is a cross-compiler]) AC_MSG_RESULT($ac_cv_prog_f77_cross) @@ -2924,7 +2924,7 @@ EOF AC_TRY_LINK_FUNC(${foo_bar}, f77_underscore=double) - if test x"$f77_case" = x -o x"$f77_underscore" = x; then + if test x"$f77_case" = x || test x"$f77_underscore" = x; then ac_cv_f77_mangling="unknown" else ac_cv_f77_mangling="$f77_case case, $f77_underscore underscores"