mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-14 06:43:03 +00:00
* configure.in (WERROR_CFLAGS): Compute it.
* src/Makefile.am (CFLAGS): Pass it. * tests/atlocal.in (CFLAGS): Idem.
This commit is contained in:
96
configure
vendored
96
configure
vendored
@@ -3209,6 +3209,55 @@ else
|
||||
enableval=no
|
||||
fi;
|
||||
if test "${enableval}" = yes; then
|
||||
echo "$as_me:$LINENO: checking whether compiler accepts -Werror" >&5
|
||||
echo $ECHO_N "checking whether compiler accepts -Werror... $ECHO_C" >&6
|
||||
|
||||
ac_save_CFLAGS="$CFLAGS"
|
||||
CFLAGS="$CFLAGS -Werror"
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
#line $LINENO "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#ifdef F77_DUMMY_MAIN
|
||||
# ifdef __cplusplus
|
||||
extern "C"
|
||||
# endif
|
||||
int F77_DUMMY_MAIN() { return 1; }
|
||||
#endif
|
||||
int
|
||||
main ()
|
||||
{
|
||||
int x;
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
rm -f conftest.$ac_objext
|
||||
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
||||
(eval $ac_compile) 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
|
||||
WARNING_CFLAGS="$WARNING_CFLAGS -Werror"
|
||||
echo "$as_me:$LINENO: result: yes" >&5
|
||||
echo "${ECHO_T}yes" >&6
|
||||
else
|
||||
echo "$as_me: failed program was:" >&5
|
||||
cat conftest.$ac_ext >&5
|
||||
echo "$as_me:$LINENO: result: no" >&5
|
||||
echo "${ECHO_T}no" >&6
|
||||
fi
|
||||
rm -f conftest.$ac_objext conftest.$ac_ext
|
||||
CFLAGS="$ac_save_CFLAGS"
|
||||
WERROR_CFLAGS=$WARNING_CFLAGS
|
||||
|
||||
WARNING_CFLAGS=
|
||||
echo "$as_me:$LINENO: checking whether compiler accepts -Wall" >&5
|
||||
echo $ECHO_N "checking whether compiler accepts -Wall... $ECHO_C" >&6
|
||||
|
||||
@@ -3760,52 +3809,6 @@ echo "$as_me:$LINENO: result: no" >&5
|
||||
echo "${ECHO_T}no" >&6
|
||||
fi
|
||||
rm -f conftest.$ac_objext conftest.$ac_ext
|
||||
CFLAGS="$ac_save_CFLAGS"
|
||||
echo "$as_me:$LINENO: checking whether compiler accepts -Werror" >&5
|
||||
echo $ECHO_N "checking whether compiler accepts -Werror... $ECHO_C" >&6
|
||||
|
||||
ac_save_CFLAGS="$CFLAGS"
|
||||
CFLAGS="$CFLAGS -Werror"
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
#line $LINENO "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#ifdef F77_DUMMY_MAIN
|
||||
# ifdef __cplusplus
|
||||
extern "C"
|
||||
# endif
|
||||
int F77_DUMMY_MAIN() { return 1; }
|
||||
#endif
|
||||
int
|
||||
main ()
|
||||
{
|
||||
int x;
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
rm -f conftest.$ac_objext
|
||||
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
||||
(eval $ac_compile) 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
|
||||
WARNING_CFLAGS="$WARNING_CFLAGS -Werror"
|
||||
echo "$as_me:$LINENO: result: yes" >&5
|
||||
echo "${ECHO_T}yes" >&6
|
||||
else
|
||||
echo "$as_me: failed program was:" >&5
|
||||
cat conftest.$ac_ext >&5
|
||||
echo "$as_me:$LINENO: result: no" >&5
|
||||
echo "${ECHO_T}no" >&6
|
||||
fi
|
||||
rm -f conftest.$ac_objext conftest.$ac_ext
|
||||
CFLAGS="$ac_save_CFLAGS"
|
||||
fi
|
||||
|
||||
@@ -9597,6 +9600,7 @@ s,@RANLIB@,$RANLIB,;t t
|
||||
s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
|
||||
s,@AUTOM4TE@,$AUTOM4TE,;t t
|
||||
s,@WARNING_CFLAGS@,$WARNING_CFLAGS,;t t
|
||||
s,@WERROR_CFLAGS@,$WERROR_CFLAGS,;t t
|
||||
s,@U@,$U,;t t
|
||||
s,@ANSI2KNR@,$ANSI2KNR,;t t
|
||||
s,@ALLOCA@,$ALLOCA,;t t
|
||||
|
||||
Reference in New Issue
Block a user