Commit 11a6e9a7 by Phil Edwards Committed by Phil Edwards

acinclude.m4: If the new pragma isn't supported, don't kill -Werror...

2000-05-22  Phil Edwards  <pme@sourceware.cygnus.com>

	* acinclude.m4:  If the new pragma isn't supported, don't kill -Werror;
	  keep -Werror and add -Wno-unknown-pragma.  -Werror Is Good.
	* aclocal.m4:  Regenerate.
	* configure:  Regenerate.

From-SVN: r34088
parent 678164a5
2000-05-22 Phil Edwards <pme@sourceware.cygnus.com>
* acinclude.m4: If the new pragma isn't supported, don't kill -Werror;
keep -Werror and add -Wno-unknown-pragma. -Werror Is Good.
* aclocal.m4: Regenerate.
* configure: Regenerate.
2000-05-19 Nathan C. Myers <ncm@cantrip.org> 2000-05-19 Nathan C. Myers <ncm@cantrip.org>
* bits/generic_shadow.h: s/swamp/legacy/ * bits/generic_shadow.h: s/swamp/legacy/
......
...@@ -171,6 +171,7 @@ AC_DEFUN(GLIBCPP_CHECK_COMPILER_VERSION, [ ...@@ -171,6 +171,7 @@ AC_DEFUN(GLIBCPP_CHECK_COMPILER_VERSION, [
], gpp_satisfactory=yes, AC_MSG_ERROR("please upgrade to gcc-2.95 or above")) ], gpp_satisfactory=yes, AC_MSG_ERROR("please upgrade to gcc-2.95 or above"))
AC_MSG_RESULT($gpp_satisfactory) AC_MSG_RESULT($gpp_satisfactory)
WERROR='-Werror'
AC_MSG_CHECKING([for g++ that supports new system_header pragma]) AC_MSG_CHECKING([for g++ that supports new system_header pragma])
AC_LANG_SAVE AC_LANG_SAVE
AC_LANG_CPLUSPLUS AC_LANG_CPLUSPLUS
...@@ -180,7 +181,7 @@ AC_DEFUN(GLIBCPP_CHECK_COMPILER_VERSION, [ ...@@ -180,7 +181,7 @@ AC_DEFUN(GLIBCPP_CHECK_COMPILER_VERSION, [
ac_save_CXXFLAGS="$CXXFLAGS" ac_save_CXXFLAGS="$CXXFLAGS"
CXXFLAGS='-Wunknown-pragmas -Werror' CXXFLAGS='-Wunknown-pragmas -Werror'
AC_TRY_COMPILE([#pragma system_header], [int foo; AC_TRY_COMPILE([#pragma system_header], [int foo;
], [WERROR='-Werror'], [WERROR='']) ], [ac_newpragma=yes], [ac_newpragma=no])
if test "$ac_test_CXXFLAGS" = set; then if test "$ac_test_CXXFLAGS" = set; then
CXXFLAGS="$ac_save_CXXFLAGS" CXXFLAGS="$ac_save_CXXFLAGS"
else else
...@@ -188,11 +189,10 @@ AC_DEFUN(GLIBCPP_CHECK_COMPILER_VERSION, [ ...@@ -188,11 +189,10 @@ AC_DEFUN(GLIBCPP_CHECK_COMPILER_VERSION, [
CXXFLAGS='' CXXFLAGS=''
fi fi
AC_LANG_RESTORE AC_LANG_RESTORE
if test "$WERROR" = ""; then if test "$ac_newpragma" = "no"; then
AC_MSG_RESULT(no) WERROR="$WERROR -Wno-unknown-pragmas"
else
AC_MSG_RESULT(yes)
fi fi
AC_MSG_RESULT($ac_newpragma)
AC_MSG_CHECKING([for g++ that supports new inlining mechanism]) AC_MSG_CHECKING([for g++ that supports new inlining mechanism])
AC_EGREP_CPP([ok], [ AC_EGREP_CPP([ok], [
......
...@@ -183,6 +183,7 @@ AC_DEFUN(GLIBCPP_CHECK_COMPILER_VERSION, [ ...@@ -183,6 +183,7 @@ AC_DEFUN(GLIBCPP_CHECK_COMPILER_VERSION, [
], gpp_satisfactory=yes, AC_MSG_ERROR("please upgrade to gcc-2.95 or above")) ], gpp_satisfactory=yes, AC_MSG_ERROR("please upgrade to gcc-2.95 or above"))
AC_MSG_RESULT($gpp_satisfactory) AC_MSG_RESULT($gpp_satisfactory)
WERROR='-Werror'
AC_MSG_CHECKING([for g++ that supports new system_header pragma]) AC_MSG_CHECKING([for g++ that supports new system_header pragma])
AC_LANG_SAVE AC_LANG_SAVE
AC_LANG_CPLUSPLUS AC_LANG_CPLUSPLUS
...@@ -192,7 +193,7 @@ AC_DEFUN(GLIBCPP_CHECK_COMPILER_VERSION, [ ...@@ -192,7 +193,7 @@ AC_DEFUN(GLIBCPP_CHECK_COMPILER_VERSION, [
ac_save_CXXFLAGS="$CXXFLAGS" ac_save_CXXFLAGS="$CXXFLAGS"
CXXFLAGS='-Wunknown-pragmas -Werror' CXXFLAGS='-Wunknown-pragmas -Werror'
AC_TRY_COMPILE([#pragma system_header], [int foo; AC_TRY_COMPILE([#pragma system_header], [int foo;
], [WERROR='-Werror'], [WERROR='']) ], [ac_newpragma=yes], [ac_newpragma=no])
if test "$ac_test_CXXFLAGS" = set; then if test "$ac_test_CXXFLAGS" = set; then
CXXFLAGS="$ac_save_CXXFLAGS" CXXFLAGS="$ac_save_CXXFLAGS"
else else
...@@ -200,11 +201,10 @@ AC_DEFUN(GLIBCPP_CHECK_COMPILER_VERSION, [ ...@@ -200,11 +201,10 @@ AC_DEFUN(GLIBCPP_CHECK_COMPILER_VERSION, [
CXXFLAGS='' CXXFLAGS=''
fi fi
AC_LANG_RESTORE AC_LANG_RESTORE
if test "$WERROR" = ""; then if test "$ac_newpragma" = "no"; then
AC_MSG_RESULT(no) WERROR="$WERROR -Wno-unknown-pragmas"
else
AC_MSG_RESULT(yes)
fi fi
AC_MSG_RESULT($ac_newpragma)
AC_MSG_CHECKING([for g++ that supports new inlining mechanism]) AC_MSG_CHECKING([for g++ that supports new inlining mechanism])
AC_EGREP_CPP([ok], [ AC_EGREP_CPP([ok], [
......
...@@ -2098,8 +2098,9 @@ rm -f conftest* ...@@ -2098,8 +2098,9 @@ rm -f conftest*
echo "$ac_t""$gpp_satisfactory" 1>&6 echo "$ac_t""$gpp_satisfactory" 1>&6
WERROR='-Werror'
echo $ac_n "checking for g++ that supports new system_header pragma""... $ac_c" 1>&6 echo $ac_n "checking for g++ that supports new system_header pragma""... $ac_c" 1>&6
echo "configure:2103: checking for g++ that supports new system_header pragma" >&5 echo "configure:2104: checking for g++ that supports new system_header pragma" >&5
ac_ext=C ac_ext=C
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
...@@ -2114,7 +2115,7 @@ cross_compiling=$ac_cv_prog_cxx_cross ...@@ -2114,7 +2115,7 @@ cross_compiling=$ac_cv_prog_cxx_cross
ac_save_CXXFLAGS="$CXXFLAGS" ac_save_CXXFLAGS="$CXXFLAGS"
CXXFLAGS='-Wunknown-pragmas -Werror' CXXFLAGS='-Wunknown-pragmas -Werror'
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 2118 "configure" #line 2119 "configure"
#include "confdefs.h" #include "confdefs.h"
#pragma system_header #pragma system_header
int main() { int main() {
...@@ -2122,14 +2123,14 @@ int foo; ...@@ -2122,14 +2123,14 @@ int foo;
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:2126: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then if { (eval echo configure:2127: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest* rm -rf conftest*
WERROR='-Werror' ac_newpragma=yes
else else
echo "configure: failed program was:" >&5 echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5 cat conftest.$ac_ext >&5
rm -rf conftest* rm -rf conftest*
WERROR='' ac_newpragma=no
fi fi
rm -f conftest* rm -f conftest*
if test "$ac_test_CXXFLAGS" = set; then if test "$ac_test_CXXFLAGS" = set; then
...@@ -2145,11 +2146,10 @@ ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ...@@ -2145,11 +2146,10 @@ ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
cross_compiling=$ac_cv_prog_cc_cross cross_compiling=$ac_cv_prog_cc_cross
if test "$WERROR" = ""; then if test "$ac_newpragma" = "no"; then
echo "$ac_t""no" 1>&6 WERROR="$WERROR -Wno-unknown-pragmas"
else
echo "$ac_t""yes" 1>&6
fi fi
echo "$ac_t""$ac_newpragma" 1>&6
echo $ac_n "checking for g++ that supports new inlining mechanism""... $ac_c" 1>&6 echo $ac_n "checking for g++ that supports new inlining mechanism""... $ac_c" 1>&6
echo "configure:2156: checking for g++ that supports new inlining mechanism" >&5 echo "configure:2156: checking for g++ that supports new inlining mechanism" >&5
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment