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.
This commit is contained in:
Akim Demaille 2000-02-04 09:15:26 +00:00
parent 7f8a47f153
commit 34804a9d13
5 changed files with 25 additions and 14 deletions

View File

@ -1,3 +1,14 @@
1999-11-13 Akim Demaille <akim@epita.fr>
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 <akim@epita.fr>
Clean up a bit the handling of the LANG stack. More is needed.

View File

@ -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"

View File

@ -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

View File

@ -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

View File

@ -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"