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 | b66bc505a06f5598df9f2e82c85dfc66b506bec1 (patch) | |
tree | 891509e8a22cf81e76ed733aad3b81354c2510e9 /libiberty/configure | |
parent | 5f734adfc1f4b38a2a6cb2bdc7dc252dd93d2840 (diff) | |
download | gdb-b66bc505a06f5598df9f2e82c85dfc66b506bec1.tar.gz |
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 d350af78985..0312cc418d2 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 |