aboutsummaryrefslogtreecommitdiff
path: root/gdb/configure.in
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2000-04-07 08:57:39 +0000
committerAndrew Cagney <cagney@redhat.com>2000-04-07 08:57:39 +0000
commit1decb32380b8eacf945595321f515d9035a01d6c (patch)
tree8dacbbcc4def556bdbcc38e09843e384a9571941 /gdb/configure.in
parent37cc8ec1be0959c1878e79fd2baed888da4a2775 (diff)
downloadgdb-1decb32380b8eacf945595321f515d9035a01d6c.zip
gdb-1decb32380b8eacf945595321f515d9035a01d6c.tar.gz
gdb-1decb32380b8eacf945595321f515d9035a01d6c.tar.bz2
When GCC always enable certain warnings.
Allow configure to set CFLAGS (-g -O2) when GCC.
Diffstat (limited to 'gdb/configure.in')
-rw-r--r--gdb/configure.in15
1 files changed, 8 insertions, 7 deletions
diff --git a/gdb/configure.in b/gdb/configure.in
index 48beb0b..025d8e3 100644
--- a/gdb/configure.in
+++ b/gdb/configure.in
@@ -454,12 +454,14 @@ if test "${enable_netrom}" = "yes"; then
CONFIG_SRCS="${CONFIG_SRCS} remote-nrom.c"
fi
+
+build_warnings="-Wimplicit -Wreturn-type -Wcomment -Wtrigraphs \
+-Wformat -Wparentheses -Wpointer-arith"
+# Not yet: -Wall -Wpointer-arith -Wstrict-prototypes
+# -Wmissing-prototypes -Wmissing-declarations
AC_ARG_ENABLE(build-warnings,
[ --enable-build-warnings Enable build-time compiler warnings if gcc is used],
-[
-# not yet: -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations
-build_warnings="-Wimplicit -Wreturn-type -Wcomment -Wtrigraphs -Wformat -Wparentheses -Wpointer-arith"
-case "${enableval}" in
+[case "${enableval}" in
yes) ;;
no) build_warnings="-w";;
,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
@@ -470,7 +472,7 @@ case "${enableval}" in
esac
if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
echo "Setting warning flags = $build_warnings" 6>&1
-fi
+fi])dnl
WARN_CFLAGS=""
WERROR_CFLAGS=""
if test "x${build_warnings}" != x -a "x$GCC" = xyes
@@ -483,8 +485,7 @@ then
*) WARN_CFLAGS="${WARN_CFLAGS} $w"
esac
done
-fi],[build_warnings=""])dnl
-
+fi
AC_SUBST(WARN_CFLAGS)
AC_SUBST(WERROR_CFLAGS)