# Otherwise, add '-D_U_=""', so that _U_ used to flag an unused function
# 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_ARG_ENABLE(extra-gcc-checks,
+ AC_HELP_STRING( [--enable-extra-gcc-checks],
+ [Do additional -W checks in GCC. @<:@default=no@:>@]),
[
- if test $withval != no
+ if test $enableval != 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 -Wpointer-arith -W$wireshark_extra_gcc_flags' to CFLAGS)
-if test x$GCC != x ; then
+AC_MSG_CHECKING(whether we can add '-Wall -Wpointer-arith -W$wireshark_extra_gcc_flags' to CFLAGS)
+if test "x$GCC" = "xyes" ; then
CFLAGS="-D_U_=\"__attribute__((unused))\" -Wall -Wpointer-arith -W$wireshark_extra_gcc_flags $CFLAGS"
AC_MSG_RESULT(yes)
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
rm -rf conftest*
AC_MSG_CHECKING(to see if we can add '-Wno-pointer-sign' to CFLAGS)
-if test x$GCC == xyes ; then
+if test "x$GCC" = "xyes" ; then
# some versions of GCC support this directive
rm -rf conftest*
echo "int foo;" >>conftest.c
rm -rf conftest*
AC_MSG_CHECKING(whether we should treat compiler warnings as errors)
-AC_ARG_WITH(warnings-as-errors,
- AC_HELP_STRING( [--with-warnings-as-errors],
- [Treat warnings as errors (only for gcc). [default=yes]]),
+AC_ARG_ENABLE(warnings-as-errors,
+ AC_HELP_STRING( [--enable-warnings-as-errors],
+ [Treat warnings as errors (only for gcc). @<:@default=yes@:>@]),
[
- if test "x$GCC" != "x" && test "x$withval" == "xyes"; then
+ if test "x$GCC" = "xyes" && test "x$enableval" == "xyes"; then
with_warnings_as_errors="yes"
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
fi
],
- if test "x$GCC" != "x" && test "x$wireshark_extra_gcc_flags" = "x"; then
+ if test "x$GCC" = "xyes" && test "x$wireshark_extra_gcc_flags" = "x"; then
with_warnings_as_errors="yes"
AC_MSG_RESULT(yes)
else
# Add any platform-specific compiler flags needed.
#
AC_MSG_CHECKING(for platform-specific compiler flags)
-if test "x$GCC" = x
-then
+if test "x$GCC" = "xyes" ; then
+ #
+ # GCC - do any platform-specific tweaking necessary.
+ #
+ case "$host_os" in
+ darwin*)
+ #
+ # See comments above about Apple's lovely C compiler.
+ #
+ CFLAGS="-no-cpp-precomp $CFLAGS"
+ AC_MSG_RESULT(Apple GCC - added -no-cpp-precomp)
+ ;;
+ *)
+ AC_MSG_RESULT(none needed)
+ ;;
+ esac
+else
#
# Not GCC - assume it's the vendor's compiler.
#
AC_MSG_RESULT(none needed)
;;
esac
-else
- case "$host_os" in
- darwin*)
- #
- # See comments above about Apple's lovely C compiler.
- #
- CFLAGS="-no-cpp-precomp $CFLAGS"
- AC_MSG_RESULT(Apple GCC - added -no-cpp-precomp)
- ;;
- *)
- AC_MSG_RESULT(none needed)
- ;;
- esac
fi
-
#
# Add any platform-specific linker flags needed.
#
AC_SUBST(LDFLAGS_SHAREDLIB)
AC_ARG_ENABLE(profile-build,
-[ --enable-profile-build build profile-ready binaries. [default=no]],enable_profile_build=$enableval,enable_profile_build=no)
+ AC_HELP_STRING( [--enable-profile-build],
+ [build profile-ready binaries. @<:@default=no@:>@]),
+ enable_profile_build=$enableval,enable_profile_build=no)
+
AM_CONDITIONAL(USE_PROFILE_BUILD, test x$enable_profile_build = xyes)
AC_MSG_CHECKING(if profile builds must be generated)
if test "x$enable_profile_build" = "xyes" ; then
- if test -n "$GCC" ; then
+ if test "x$GCC" = "xyes" ; then
AC_MSG_RESULT(yes)
CFLAGS=" -pg $CFLAGS"
else
fi
AC_ARG_ENABLE(gtk2,
-[ --disable-gtk2 build Glib1/Gtk1+-based wireshark/tshark. [default=no]],enable_gtk2=$enableval,enable_gtk2=yes)
+ AC_HELP_STRING( [--disable-gtk2],
+ [build Glib1/Gtk1+-based wireshark/tshark. @<:@default=no@:>@]),
+ enable_gtk2=$enableval,enable_gtk2=yes)
if test "x$enable_gtk2" = "xyes" ; then
AM_PATH_GLIB_2_0(2.0.0, CFLAGS="$CFLAGS $GLIB_CFLAGS" LIBS="$LIBS $GLIB_LIBS", , gmodule)
dnl Look in /usr/local for header files and libraries ?
AC_ARG_ENABLE(usr-local,
-[ --enable-usr-local look for headers and libs in /usr/local tree. [default=yes]],enable_usr_local=$enableval,enable_usr_local=yes)
+ AC_HELP_STRING( [--enable-usr-local],
+ [look for headers and libs in /usr/local tree. @<:@default=yes@:>@]),
+ enable_usr_local=$enableval,enable_usr_local=yes)
AC_MSG_CHECKING(whether to use /usr/local for headers and libraries)
if test "x$enable_usr_local" = "xyes" ; then
# there's no benefit to not looking for the header.
#
AC_ARG_WITH(pcap,
-[ --with-pcap=DIR libpcap is located in directory DIR.],
+ AC_HELP_STRING( [--with-pcap=DIR],
+ [libpcap is located in directory DIR.]),
[
if test $withval != yes -a $withval != no
then
AC_MSG_CHECKING(whether to use zlib for reading compressed capture files)
AC_ARG_WITH(zlib,
-[ --with-zlib[=DIR] use zlib (located in directory DIR, if supplied) to read compressed data. [default=yes, if present]],
+ AC_HELP_STRING( [--with-zlib@<:@=DIR@:>@],
+ [use zlib (located in directory DIR, if supplied) to read compressed data. @<:@default=yes, if present@:>@]),
[
if test $withval = no
then