diff options
author | Guy Harris <guy@alum.mit.edu> | 2013-05-12 12:30:01 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2013-05-12 12:30:01 -0700 |
commit | 60f8354159a2d5a2bf5ef29bb0aa03a55197466c (patch) | |
tree | b068fd02c823a2335fdcc74245923abc9f81306b /aclocal.m4 | |
parent | 0b80d76bdd99d799044ee74120d0ce8b29da6191 (diff) | |
download | tcpdump-60f8354159a2d5a2bf5ef29bb0aa03a55197466c.tar.gz |
HP C isn't the only compiler on which we must avoid GCC-style -W flags.
MIPS C and DEC C also can't be made to reliably Just Say No to those
flags, and they don't support those flags, so don't try them with those
compilers either.
Diffstat (limited to 'aclocal.m4')
-rw-r--r-- | aclocal.m4 | 26 |
1 files changed, 22 insertions, 4 deletions
@@ -173,13 +173,24 @@ AC_DEFUN(AC_LBL_C_INIT, hpux*) # - # Note that this is HP C, because we have to - # treat it specially below. + # HP C, which is what we presume we're using, doesn't + # exit with a non-zero exit status if we hand it an + # invalid -W flag, can't be forced to do so even with + # +We, and doesn't handle GCC-style -W flags, so we + # don't want to try using GCC-style -W flags. # - ac_lbl_cc_is_hp_c=yes + ac_lbl_cc_dont_try_gcc_dashW=yes ;; irix*) + # + # MIPS C, which is what we presume we're using, doesn't + # necessarily exit with a non-zero exit status if we + # hand it an invalid -W flag, can't be forced to do + # so, and doesn't handle GCC-style -W flags, so we + # don't want to try using GCC-style -W flags. + # + ac_lbl_cc_dont_try_gcc_dashW=yes $1="$$1 -xansi -signed -O" ;; @@ -188,6 +199,13 @@ AC_DEFUN(AC_LBL_C_INIT, # Presumed to be DEC OSF/1, Digital UNIX, or # Tru64 UNIX. # + # The DEC C compiler, which is what we presume we're + # using, doesn't exit with a non-zero exit status if we + # hand it an invalid -W flag, can't be forced to do + # so, and doesn't handle GCC-style -W flags, so we + # don't want to try using GCC-style -W flags. + # + ac_lbl_cc_dont_try_gcc_dashW=yes $1="$$1 -O" ;; @@ -998,7 +1016,7 @@ AC_DEFUN(AC_LBL_DEVEL, # We therefore skip all the warning option stuff # on HP-UX. # - if test "$ac_lbl_cc_is_hp_c" != yes; then + if test "$ac_lbl_cc_dont_try_gcc_dashW" != yes; then AC_LBL_CHECK_UNKNOWN_WARNING_OPTION_ERROR() AC_LBL_CHECK_COMPILER_OPT($1, -Wall) AC_LBL_CHECK_COMPILER_OPT($1, -Wmissing-prototypes) |