diff options
author | Andrew Cagney <cagney@redhat.com> | 1998-10-28 02:01:32 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 1998-10-28 02:01:32 +0000 |
commit | b9a9cde40b84c0c939b1f068befce7530393b4de (patch) | |
tree | a079d7ba9c5c0883ba7c1b669f4756d01ea4e0bd /gdb/configure.in | |
parent | 32dc84ef551a1f8d12a827f89a86f7a1d197a369 (diff) | |
download | gdb-b9a9cde40b84c0c939b1f068befce7530393b4de.zip gdb-b9a9cde40b84c0c939b1f068befce7530393b4de.tar.gz gdb-b9a9cde40b84c0c939b1f068befce7530393b4de.tar.bz2 |
Unify (well almost) --enable-build-warnings configuration option
across GDB and SIM directories.
Diffstat (limited to 'gdb/configure.in')
-rw-r--r-- | gdb/configure.in | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/gdb/configure.in b/gdb/configure.in index 8f1afa8..d1537ad 100644 --- a/gdb/configure.in +++ b/gdb/configure.in @@ -294,17 +294,23 @@ if test "${enable_netrom}" = "yes"; then CONFIG_SRCS="${CONFIG_SRCS} remote-nrom.c" fi -AC_ARG_ENABLE(warnings, -[ --enable-build-warnings Enable compiler warnings if gcc is used], -[case "${enableval}" in -yes) enable_build_warnings=yes ;; -no) enable_build_warnings=no ;; -*) AC_MSG_ERROR(bad value ${enableval} given for warnings options) ;; -esac]) - -if test "x$enable_build_warnings" = xyes -a "x$GCC" = xyes +AC_ARG_ENABLE(build-warnings, +[ --enable-build-warnings Enable build-time compiler warnings if gcc is used], +[build_warnings="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations" +case "${enableval}" in + yes) ;; + no) build_warnings="-w";; +dnl ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` +dnl build_warnings="${build_warnings} ${t}";; +dnl *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` +dnl build_warnings="${t} ${build_warnings}";; +dnl *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; + *) ;; +esac],[build_warnings=""])dnl + +if test "x${build_warnings}" != x -a "x$GCC" = xyes then - WARN_CFLAGS="-Wall -Wstrict-prototypes -Wmissing-prototypes" + WARN_CFLAGS="${build_warnings}" else WARN_CFLAGS="" fi |