mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 04:13:03 +00:00
# added --enable-gcc-warnings (not for user consumption).
This commit is contained in:
23
configure.in
23
configure.in
@@ -16,6 +16,29 @@ AM_PROG_CC_STDC
|
||||
AC_PROG_INSTALL
|
||||
AC_PROG_RANLIB
|
||||
|
||||
AC_ARG_ENABLE(gcc-warnings,
|
||||
[ --enable-gcc-warnings turn on lots of GCC warnings (not recommended)],
|
||||
[case "${enableval}" in
|
||||
yes|no) ;;
|
||||
*) AC_MSG_ERROR([bad value ${enableval} for gcc-warnings option]) ;;
|
||||
esac
|
||||
],
|
||||
enableval=no
|
||||
)
|
||||
if test "${enableval}" = yes; then
|
||||
BISON_WARNING(-Wall)
|
||||
BISON_WARNING(-W)
|
||||
BISON_WARNING(-Wbad-function-cast)
|
||||
BISON_WARNING(-Wcast-align)
|
||||
BISON_WARNING(-Wcast-qual)
|
||||
BISON_WARNING(-Wmissing-declarations)
|
||||
BISON_WARNING(-Wmissing-prototypes)
|
||||
BISON_WARNING(-Wnested-externs)
|
||||
BISON_WARNING(-Wno-char-subscripts)
|
||||
BISON_WARNING(-Wstrict-prototypes)
|
||||
BISON_WARNING(-Wwrite-strings)
|
||||
fi
|
||||
|
||||
dnl Checks for libraries.
|
||||
|
||||
dnl Checks for header files.
|
||||
|
||||
11
m4/warning.m4
Normal file
11
m4/warning.m4
Normal file
@@ -0,0 +1,11 @@
|
||||
AC_DEFUN(BISON_WARNING,
|
||||
[AC_MSG_CHECKING(whether compiler accepts $1)
|
||||
AC_SUBST(WARNING_CFLAGS)
|
||||
ac_save_CFLAGS="$CFLAGS"
|
||||
CFLAGS="$CFLAGS $1"
|
||||
AC_TRY_COMPILE(,
|
||||
[int x;],
|
||||
WARNING_CFLAGS="$WARNING_CFLAGS $1"
|
||||
AC_MSG_RESULT(yes),
|
||||
AC_MSG_RESULT(no))
|
||||
CFLAGS="$ac_save_CFLAGS"])
|
||||
@@ -5,7 +5,7 @@ DEFS = @DEFS@ \
|
||||
-DXPFILE=\"${datadir}/bison.simple\" \
|
||||
-DXPFILE1=\"${datadir}/bison.hairy\" \
|
||||
-DLOCALEDIR=\"${datadir}/locale\"
|
||||
INCLUDES = -I../intl -I$(top_srcdir)/intl -I..
|
||||
INCLUDES = -I../intl -I$(top_srcdir)/intl -I.. $(WARNING_CFLAGS)
|
||||
LDADD = @INTLLIBS@ ../lib/libbison.a
|
||||
|
||||
bin_PROGRAMS = bison
|
||||
|
||||
Reference in New Issue
Block a user