- AC_LBL_CHECK_UNKNOWN_WARNING_OPTION_ERROR()
- AC_LBL_CHECK_COMPILER_OPT($1, -Wall)
- AC_LBL_CHECK_COMPILER_OPT($1, -Wmissing-prototypes)
- AC_LBL_CHECK_COMPILER_OPT($1, -Wstrict-prototypes)
- AC_LBL_CHECK_COMPILER_OPT($1, -Wwrite-strings)
- AC_LBL_CHECK_COMPILER_OPT($1, -Wpointer-arith)
- AC_LBL_CHECK_COMPILER_OPT($1, -W)
+ #
+ # At least one version of HP's C compiler will not
+ # exit with a non-zero exit status when given an
+ # unknown -W flag, even if you use +We and the
+ # number of the warning it gives for that issue.
+ #
+ # We therefore skip all the warning option stuff
+ # on HP-UX.
+ #
+ if test "$ac_lbl_cc_is_hp_c" != yes; then
+ AC_LBL_CHECK_UNKNOWN_WARNING_OPTION_ERROR()
+ AC_LBL_CHECK_COMPILER_OPT($1, -Wall)
+ AC_LBL_CHECK_COMPILER_OPT($1, -Wmissing-prototypes)
+ AC_LBL_CHECK_COMPILER_OPT($1, -Wstrict-prototypes)
+ AC_LBL_CHECK_COMPILER_OPT($1, -Wwrite-strings)
+ AC_LBL_CHECK_COMPILER_OPT($1, -Wpointer-arith)
+ AC_LBL_CHECK_COMPILER_OPT($1, -W)
+ fi