diff options
author | Steve Ellcey <sje@cup.hp.com> | 2005-11-07 22:14:12 +0000 |
---|---|---|
committer | Steve Ellcey <sje@cup.hp.com> | 2005-11-07 22:14:12 +0000 |
commit | 49c96104aa8c20ee6d0e7911e5ae44b496ce3986 (patch) | |
tree | 2e4727db7f0866ba052b223577798798558a5a6d /bfd/warning.m4 | |
parent | 76f703bfeb0abad84f800d3a780ab21b7f799582 (diff) | |
download | gdb-49c96104aa8c20ee6d0e7911e5ae44b496ce3986.zip gdb-49c96104aa8c20ee6d0e7911e5ae44b496ce3986.tar.gz gdb-49c96104aa8c20ee6d0e7911e5ae44b496ce3986.tar.bz2 |
* warning.m4 (AM_BINUTILS_WARNINGS): Default to empty string
if compiler is not GCC.
* configure: Regenerate
Diffstat (limited to 'bfd/warning.m4')
-rw-r--r-- | bfd/warning.m4 | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/bfd/warning.m4 b/bfd/warning.m4 index 38feb5f..2e2dd42 100644 --- a/bfd/warning.m4 +++ b/bfd/warning.m4 @@ -1,7 +1,7 @@ dnl Common configure.in fragment AC_DEFUN([AM_BINUTILS_WARNINGS],[ -WARN_CFLAGS="-W -Wall -Wstrict-prototypes -Wmissing-prototypes" +GCC_WARN_CFLAGS="-W -Wall -Wstrict-prototypes -Wmissing-prototypes" AC_ARG_ENABLE(werror, [ --enable-werror treat compile warnings as errors], @@ -18,19 +18,25 @@ fi NO_WERROR= if test "${ERROR_ON_WARNING}" = yes ; then - WARN_CFLAGS="$WARN_CFLAGS -Werror" + GCC_WARN_CFLAGS="$GCC_WARN_CFLAGS -Werror" NO_WERROR="-Wno-error" fi +if test "${GCC}" = yes ; then + WARN_CFLAGS="${GCC_WARN_CFLAGS}" +fi + AC_ARG_ENABLE(build-warnings, [ --enable-build-warnings Enable build-time compiler warnings], [case "${enableval}" in - yes) ;; - no) WARN_CFLAGS="-w";; + yes) WARN_CFLAGS="${GCC_WARN_CFLAGS}";; + no) if test "${GCC}" = yes ; then + WARN_CFLAGS="-w" + fi;; ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` - WARN_CFLAGS="${WARN_CFLAGS} ${t}";; + WARN_CFLAGS="${GCC_WARN_CFLAGS} ${t}";; *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` - WARN_CFLAGS="${t} ${WARN_CFLAGS}";; + WARN_CFLAGS="${t} ${GCC_WARN_CFLAGS}";; *) WARN_CFLAGS=`echo "${enableval}" | sed -e "s/,/ /g"`;; esac]) |