]> The Tcpdump Group git mirrors - tcpdump/commitdiff
HP C isn't the only compiler on which we must avoid GCC-style -W flags.
authorGuy Harris <[email protected]>
Sun, 12 May 2013 19:30:01 +0000 (12:30 -0700)
committerGuy Harris <[email protected]>
Sun, 12 May 2013 19:30:01 +0000 (12:30 -0700)
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.

aclocal.m4
configure

index 131283be6c220857704d00a4ef4162885a0b7881..34e03fce66287f16984ecea37d4337b328490862 100644 (file)
@@ -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)
index 68af1c33324a84b26d3ca376ba9956d76c9a5a59..f2bf78781e567935eded809bb64995c4be4e585a 100755 (executable)
--- a/configure
+++ b/configure
@@ -3049,13 +3049,24 @@ echo "$as_me: error: see the INSTALL doc for more info" >&2;}
 
            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
                    V_CCOPT="$V_CCOPT -xansi -signed -O"
                    ;;
 
@@ -3064,6 +3075,13 @@ echo "$as_me: error: see the INSTALL doc for more info" >&2;}
                    # 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
                    V_CCOPT="$V_CCOPT -O"
                    ;;
 
@@ -11307,7 +11325,7 @@ rm -f os-proto.h
            # 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
 
        { echo "$as_me:$LINENO: checking whether the compiler fails when given an unknown warning option" >&5
 echo $ECHO_N "checking whether the compiler fails when given an unknown warning option... $ECHO_C" >&6; }