diff options
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 35 |
1 files changed, 19 insertions, 16 deletions
diff --git a/configure.in b/configure.in index 84d006439f..88194b978c 100644 --- a/configure.in +++ b/configure.in @@ -158,15 +158,16 @@ AC_SUBST(HAVE_RPM) # argument will compile with non-GCC compilers. # AC_ARG_WITH(extra-gcc-checks, -[ --with-extra-gcc-checks Do additional -W checks in GCC. [default=no]], + AC_HELP_STRING( [--with-extra-gcc-checks], + [Do additional -W checks in GCC. [default=no]]), [ if test $withval != no then wireshark_extra_gcc_flags=" -Wcast-qual -Wcast-align -Wbad-function-cast -pedantic -Wstrict-prototypes -Wmissing-declarations -Wwrite-strings" fi ],) -AC_MSG_CHECKING(to see if we can add '-Wall -W$wireshark_extra_gcc_flags' to CFLAGS) -if test x$GCC != x ; then +AC_MSG_CHECKING(whether we can add '-Wall -W$wireshark_extra_gcc_flags' to CFLAGS) +if test "x$GCC" != "x" ; then CFLAGS="-D_U_=\"__attribute__((unused))\" -Wall -Wpointer-arith -W $wireshark_extra_gcc_flags $CFLAGS" AC_MSG_RESULT(yes) else @@ -174,8 +175,8 @@ else AC_MSG_RESULT(no) fi -AC_MSG_CHECKING(to see if we can add '-Wdeclaration-after-statement' to CFLAGS) -if test x$GCC == xyes ; then +AC_MSG_CHECKING(whether we can add '-Wdeclaration-after-statement' to CFLAGS) +if test "x$GCC" = "xyes" ; then # some versions of GCC support this directive rm -rf conftest* echo "int foo;" >>conftest.c @@ -191,8 +192,8 @@ else fi rm -rf conftest* -AC_MSG_CHECKING(to see if we can add '-Wno-pointer-sign' to CFLAGS) -if test x$GCC == xyes ; then +AC_MSG_CHECKING(whether we can add '-Wno-pointer-sign' to CFLAGS) +if test "x$GCC" = "xyes" ; then # some versions of GCC support this directive rm -rf conftest* echo "int foo;" >>conftest.c @@ -209,17 +210,19 @@ fi rm -rf conftest* AC_ARG_WITH(warnings-as-errors, -[ --with-warnings-as-errors Treat warnings as errors (if using gcc). [default=no]], -[ + AC_HELP_STRING( [--without-warnings-as-errors], + [Don't treat warnings as errors (only for gcc). [default=yes]]), +[ + without_warnings_as_errors="no" + if test "x$GCC" != "x" && test "x$withval" = "xno"; then + without_warnings_as_errors="yes" + fi +], if test "x$GCC" != "x"; then - if test "x$withval" != "xno"; then - with_warnings_as_errors="yes" - fi - else - with_warnings_as_errors="no" + without_warnings_as_errors="no" fi -],) -AM_CONDITIONAL(HAVE_WARNINGS_AS_ERRORS, test "x$with_warnings_as_errors" = "xyes") +) +AM_CONDITIONAL(HAVE_WARNINGS_AS_ERRORS, test "x$without_warnings_as_errors" = "xno") # # Add any platform-specific compiler flags needed. |