diff options
author | Paolo Bonzini <bonzini@gnu.org> | 2007-06-14 14:41:46 +0000 |
---|---|---|
committer | Paolo Bonzini <bonzini@gnu.org> | 2007-06-14 14:41:46 +0000 |
commit | 1f616ca10d6c112b81ac7be7e9251d267dc2c283 (patch) | |
tree | bb188027e5b1a453339f1152c2976dcbe0925ae1 /libiberty/configure | |
parent | b7b949f5e9cad15fb0e6a63dca180d5115129132 (diff) | |
download | gdb-1f616ca10d6c112b81ac7be7e9251d267dc2c283.zip gdb-1f616ca10d6c112b81ac7be7e9251d267dc2c283.tar.gz gdb-1f616ca10d6c112b81ac7be7e9251d267dc2c283.tar.bz2 |
2007-06-14 Paolo Bonzini <bonzini@gnu.org>
* configure.ac: Use ACX_PROG_CC_ALMOST_PEDANTIC too.
* configure: Regenerate.
Diffstat (limited to 'libiberty/configure')
-rwxr-xr-x | libiberty/configure | 67 |
1 files changed, 66 insertions, 1 deletions
diff --git a/libiberty/configure b/libiberty/configure index d350af7..0312cc4 100755 --- a/libiberty/configure +++ b/libiberty/configure @@ -2956,7 +2956,7 @@ ac_c_preproc_warn_flag=yes ac_libiberty_warn_cflags= save_CFLAGS="$CFLAGS" -for option in -W -Wall -pedantic -Wwrite-strings -Wc++-compat \ +for option in -W -Wall -Wwrite-strings -Wc++-compat \ -Wstrict-prototypes; do as_acx_Woption=`echo "acx_cv_prog_cc_warning_$option" | $as_tr_sh` @@ -3022,6 +3022,71 @@ fi done CFLAGS="$save_CFLAGS" +if test "$GCC" = yes; then + echo "$as_me:$LINENO: checking whether $CC supports -pedantic " >&5 +echo $ECHO_N "checking whether $CC supports -pedantic ... $ECHO_C" >&6 +if test "${acx_cv_prog_cc_pedantic_+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + save_CFLAGS="$CFLAGS" +CFLAGS="-pedantic " +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + acx_cv_prog_cc_pedantic_=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +acx_cv_prog_cc_pedantic_=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +CFLAGS="$save_CFLAGS" +fi +echo "$as_me:$LINENO: result: $acx_cv_prog_cc_pedantic_" >&5 +echo "${ECHO_T}$acx_cv_prog_cc_pedantic_" >&6 +if test $acx_cv_prog_cc_pedantic_ = yes; then + ac_libiberty_warn_cflags="$ac_libiberty_warn_cflags${ac_libiberty_warn_cflags:+ }-pedantic " +fi + + +fi + + if test "x$CC" != xcc; then echo "$as_me:$LINENO: checking whether $CC and cc understand -c and -o together" >&5 |