#
AC_PREREQ(2.60)
-AC_INIT(wireshark, 1.5.0)
+AC_INIT(wireshark, 1.7.0)
dnl Check for CPU / vendor / OS
dnl The user is encouraged to use either `AC_CANONICAL_BUILD', or
AC_LIBTOOL_DLOPEN
AC_PROG_LIBTOOL
AC_PATH_PROG(PERL, perl)
+#
+# XXX - should autogen.sh check for YACC/Bison and Flex? A user building
+# from a distribution tarball shouldn't have to have YACC/Bison or Flex,
+# as the tarball should contain the results of running YACC/Bison on .y
+# files and running Flex on .l files, but a user building from SVN
+# will have to run YACC/Bison and Flex to process those files.
+#
+# On the other hand, what about users who use a distribution tarball to
+# do development? They *shouldn't* - that's what the SVN repository is
+# for - but they might. They'd get errors if they modify a .y or .l
+# file and try to do a build - but the error should tell them that they
+# need to get YACC/Bison and/or Flex.
+#
+# Then again, getting them shouldn't be too big of a burden.
+#
+# XXX - is the same true of pod2man and pod2html, or are they needed
+# even when building from a distribution tarball?
+#
+#
AC_PROG_YACC
AC_PATH_PROG(YACCDUMMY, $YACC)
if test "x$YACCDUMMY" = x
AC_SUBST(XSLTPROC)
AC_SUBST(XMLLINT)
+#
+# Set "ac_supports_gcc_flags" if the compiler is known to support GCC-style
+# flags such as -pedantic, -W warning flags and -f feature flags. Currently,
+# we assume GCC and clang do; other compilers should be added here.
+#
+# This is done to avoid getting tripped up by compilers that support
+# those flags but give them a different meaning.
+#
+if test "x$GCC" = "xyes" -o "x$CC" = "xclang" ; then
+ ac_supports_gcc_flags=yes
+fi
+
+#
+# Set "ac_supports_W_linker_passthrough" if the compiler is known to
+# support "-Wl,{options}" to pass options through to the linker.
+# Currently, we assume GCC, xlc, and clang do; other compilers should
+# be added here.
+#
+if test "x$GCC" = "xyes" -o "x$CC" = "xxlc" -o "x$CC" = "xclang" ; then
+ ac_supports_W_linker_passthrough=yes
+fi
+
+#
+# Set "ac_supports_attribute_unused" if the compiler is known to
+# support "__attribute__(unused)".
+# Currently, we assume GCC and clang do; other compilers should
+# be added here.
+#
+# XXX - do this with a compiler test?
+#
+if test "x$GCC" = "xyes" -o "x$CC" = "xclang" ; then
+ ac_supports_W_linker_passthrough=yes
+fi
+
if test "x$CC_FOR_BUILD" = x
then
CC_FOR_BUILD=$CC
AC_CHECK_PROG(HAVE_DOXYGEN, doxygen, "yes", "no")
AM_CONDITIONAL(HAVE_DOXYGEN, test x$HAVE_DOXYGEN = xyes)
+#
+# Try to arrange for large file support.
+#
+AC_SYS_LARGEFILE
+
# gnu tls
tls_message="no"
AC_ARG_WITH([gnutls],
)
fi
+AC_ARG_WITH([gtk3],
+ AC_HELP_STRING( [--with-gtk3=@<:@yes/no@:>@],
+ [use GTK+ 3.0 instead of 2.0 @<:@default=no@:>@]),
+ with_gtk3="$withval", with_gtk="no")
+
+
# libsmi
# FIXME: currently the path argument to with-libsmi is being ignored
AX_LIBSMI
AC_WIRESHARK_GCC_CFLAGS_CHECK(-Waddress)
AC_WIRESHARK_GCC_CFLAGS_CHECK(-Warray-bounds)
AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wattributes)
- AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wdeclaration-after-statement)
AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wdiv-by-zero)
AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wformat-security)
AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wignored-qualifiers)
# for now.
#
AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wwrite-strings)
+ #
+ # GLib blocks this for now.
+ #
AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wstrict-prototypes)
+ #
+ # All the registration functions block these for now.
+ #
+ AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wmissing-prototypes)
AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wmissing-declarations)
#
# epan/dissectors/packet-afs.c blocks this one for now.
AC_WIRESHARK_GCC_CFLAGS_CHECK(-Warray-bounds)
AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wcast-align)
AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wformat-security)
-# Use the faster pre gcc 4.5 floating point precision
+AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wold-style-definition)
+AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wdeclaration-after-statement)
+
+#
+# Use the faster pre gcc 4.5 floating point precision if available;
+# clang doesn't error out on -f options that it doesn't know about,
+# it just warns and ignores them, so this check doesn't cause us
+# to omit -fexcess-precision=fast, which produces a pile of
+# annoying warnings.
+#
+if test "x$CC" != "xclang" ; then
AC_WIRESHARK_GCC_CFLAGS_CHECK(-fexcess-precision=fast)
+fi
-AC_WIRESHARK_GCC_LDFLAGS_CHECK([-Wl,--as-needed])
-# AC_WIRESHARK_GCC_LDFLAGS_CHECK([-flto])
-# AC_WIRESHARK_GCC_LDFLAGS_CHECK([-fwhopr])
-# AC_WIRESHARK_GCC_LDFLAGS_CHECK([-fwhole-program])
+AC_WIRESHARK_LDFLAGS_CHECK([-Wl,--as-needed])
+###AC_WIRESHARK_LDFLAGS_CHECK([-Wl,-M])
+###AC_WIRESHARK_LDFLAGS_CHECK([-Wl,--cref])
+# AC_WIRESHARK_LDFLAGS_CHECK([-flto])
+# AC_WIRESHARK_LDFLAGS_CHECK([-fwhopr])
+# AC_WIRESHARK_LDFLAGS_CHECK([-fwhole-program])
#
-# If we're running gcc add '-D_U_="__attribute__((unused))"' to CFLAGS as well,
-# so we can use _U_ to flag unused function arguments and not get warnings
-# about them. Otherwise, add '-D_U_=""', so that _U_ used to flag an unused
-# function argument will compile with non-GCC compilers.
+# If we're running GCC or clang, add '-D_U_="__attribute__((unused))"' to
+# CFLAGS as well, so we can use _U_ to flag unused function arguments and
+# not get warnings about them. Otherwise, add '-D_U_=""', so that _U_ used
+# to flag an unused function argument will compile with non-GCC, non-clang
+# compilers.
#
-if test "x$GCC" = "xyes" ; then
+# XXX - other compilers?
+#
+if test "x$GCC" = "xyes" -o "x$CC" = "xclang" ; then
CFLAGS="-D_U_=\"__attribute__((unused))\" $CFLAGS"
else
CFLAGS="-D_U_=\"\" $CFLAGS"
fi
#
-# If we're running gcc, will enable a barrier "stop on warning".
+# If the compiler supports GCC-style flags, enable a barrier "stop on
+# warning".
# This barrier is set for a very large part of the code. However, it is
# typically not set for "generated" code (flex, ans2wrs, idl2wrs, ...)
#
AC_MSG_CHECKING(whether we should treat compiler warnings as errors)
AC_ARG_ENABLE(warnings-as-errors,
AC_HELP_STRING( [--enable-warnings-as-errors],
- [Treat warnings as errors (only for gcc). @<:@default=yes@:>@]),
+ [Treat warnings as errors (only for GCC or clang). @<:@default=yes@:>@]),
[
- if test "x$GCC" = "xyes" -a "x$enableval" == "xyes" -a "x$wireshark_extra_gcc_flags" != "xyes"; then
+ if test "x$ac_supports_gcc_flags" = "xyes" -a "x$enableval" = "xyes" -a "x$wireshark_extra_gcc_flags" != "xyes"; then
with_warnings_as_errors="yes"
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
fi
],
- if test "x$GCC" = "xyes" -a "x$wireshark_extra_gcc_flags" = "x" -a "x$warnings_as_errors_default" = "xyes"; then
+ if test "x$ac_supports_gcc_flags" = "xyes" -a "x$wireshark_extra_gcc_flags" = "x" -a "x$warnings_as_errors_default" = "xyes"; then
with_warnings_as_errors="yes"
AC_MSG_RESULT(yes)
else
#
# See comments above about Apple's lovely C compiler.
#
- CFLAGS="-no-cpp-precomp $CFLAGS"
- AC_MSG_RESULT(Apple GCC - added -no-cpp-precomp)
+ # NOTE: to AC_PROG_CC, "GCC" means "any compiler that
+ # defines __GNUC__"; clang defines __GNUC__, so that
+ # means we think clang is GCC.
+ #
+ # clang whines about -no-cpp-precomp being unused
+ # so we check whether this is really clang, and
+ # only add -no-cpp-precomp if it's not.
+ #
+ if test "x$CC" != "xclang" ; then
+ CFLAGS="-no-cpp-precomp $CFLAGS"
+ AC_MSG_RESULT(Apple GCC - added -no-cpp-precomp)
+ else
+ #
+ # Clang, clang, clang went the trolley....
+ #
+ AC_MSG_RESULT(none needed)
+ fi
;;
*)
AC_MSG_RESULT(none needed)
# apparently-legal code won't compile with its precompiled
# headers.
#
- CFLAGS="-no-cpp-precomp $CFLAGS"
- AC_MSG_RESULT(Apple GCC - added -no-cpp-precomp)
+ # On the other hand, if it's called "clang", it's not a
+ # GCC derivative, and it whines if you pass it
+ # -no-cpp-precomp.
+ #
+ # XXX - is there any version of autoconf we support
+ # where it uses another way to decide if the compiler
+ # is GCC or not?
+ #
+ if test "x$CC" != "xclang" ; then
+ CFLAGS="-no-cpp-precomp $CFLAGS"
+ AC_MSG_RESULT(Apple CC - added -no-cpp-precomp)
+ else
+ #
+ # Clang, clang, clang went the trolley....
+ #
+ AC_MSG_RESULT(none needed)
+ fi
;;
*)
AC_MSG_RESULT(none needed)
[build GTK+-based wireshark. @<:@default=yes, if GTK+ available@:>@]),
enable_wireshark=$enableval,enable_wireshark=yes)
+AC_ARG_ENABLE(packet-editor,
+ AC_HELP_STRING( [--enable-packet-editor],
+ [add support for packet editor in wireshark. @<:@default=no@:>@]),
+ enable_packet_editor=$enableval,enable_packet_editor=no)
+if test x$enable_packet_editor = xyes; then
+ AC_DEFINE(WANT_PACKET_EDITOR, 1, [Support for packet editor])
+fi
+
AC_ARG_ENABLE(threads,
AC_HELP_STRING( [--enable-threads],
[use threads in wireshark. @<:@default=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 "x$GCC" = "xyes" ; then
+ if test "x$GCC" = "xyes" -o "x$CLANG" = "xyes" ; then
AC_MSG_RESULT(yes)
CFLAGS=" -pg $CFLAGS"
else
AC_MSG_RESULT(no)
- echo "Building profile binaries currently only supported for GCC."
+ echo "Building profile binaries currently only supported for GCC and clang."
fi
else
AC_MSG_RESULT(no)
# programs to be built with GTK+.
#
if test "x$enable_wireshark" = "xyes"; then
+if test "x$with_gtk3" = "xyes"; then
+ AM_PATH_GTK_3_0(3.0.0,
+ [
+ CFLAGS="$CFLAGS $GTK_CFLAGS"
+ CXXFLAGS="$CXXFLAGS $GTK_CFLAGS"
+ AC_DEFINE(HAVE_GTK, 1, [Define to 1 if compiling with GTK])
+ ], GTK_OK=no, gthread)
+
+else
AM_PATH_GTK_2_0(2.4.0,
[
CFLAGS="$CFLAGS $GTK_CFLAGS"
CXXFLAGS="$CXXFLAGS $GTK_CFLAGS"
AC_DEFINE(HAVE_GTK, 1, [Define to 1 if compiling with GTK])
], GTK_OK=no, gthread)
+fi
else
GTK_OK=no
fi
[
CFLAGS="$CFLAGS $GLIB_CFLAGS"
CXXFLAGS="$CXXFLAGS $GLIB_CFLAGS"
- ], AC_MSG_ERROR(GLib 2.4 or later distribution not found.), gmodule)
+ ], AC_MSG_ERROR(GLib 2.4 or later distribution not found.), gthread gmodule)
else
#
# We have GTK+, and thus will be building Wireshark unless the
wireshark_man="wireshark.1"
wireshark_SUBDIRS="codecs gtk"
# Don't use GLIB_CFLAGS
- AM_PATH_GLIB_2_0(2.4.0, , AC_MSG_ERROR(GLib 2.4 or later distribution not found.), gmodule)
+ AM_PATH_GLIB_2_0(2.4.0, , AC_MSG_ERROR(GLib 2.4 or later distribution not found.), gthread gmodule)
fi
#
fi
dnl zlib check
-AC_MSG_CHECKING(whether to use zlib for reading compressed capture files)
+AC_MSG_CHECKING(whether to use zlib for gzip compression and decompression)
AC_ARG_WITH(zlib,
AC_HELP_STRING([--with-zlib@<:@=DIR@:>@],
- [use zlib (located in directory DIR, if supplied) to read compressed data. @<:@default=yes, if available@:>@]),
+ [use zlib (located in directory DIR, if supplied) for gzip compression and decompression . @<:@default=yes, if available@:>@]),
[
if test $withval = no
then
AC_MSG_RESULT(yes)
AC_WIRESHARK_ZLIB_CHECK
if test "x$want_zlib" = "xno" ; then
- AC_MSG_RESULT(zlib not found - disabling compressed capture file support)
+ AC_MSG_RESULT(zlib not found - disabling gzip compression and decompression)
+ else
+ if test "x$ac_cv_func_inflatePrime" = "xno" ; then
+ AC_MSG_RESULT(inflatePrime not found in zlib - disabling gzipped capture file support)
+ fi
fi
fi
-if test "x$want_zlib" != "xno" ; then
- AC_CHECK_LIB(z, gzclearerr,
- [
- AC_DEFINE(HAVE_GZCLEARERR, 1, [Define if we have gzclearerr])
- ])
-fi
-
dnl pcre check
AC_MSG_CHECKING(whether to use libpcre for regular expressions in dfilters)
if test "x$withval" = "xyes"; then
AC_MSG_ERROR([No dumpcap group specified.])
elif test "x$withval" != "xno"; then
+ if test "x$enable_dumpcap" = "xno" ; then
+ AC_MSG_ERROR(dumpcap group install works only with dumpcap but dumpcap is disabled)
+ fi
AC_MSG_RESULT($withval)
DUMPCAP_GROUP="$withval"
fi
#
AC_DEFINE(WS_VAR_IMPORT, extern, [Define as the string to precede external variable declarations in dynamically-linked libraries])
+#
+# Define WS_MSVC_NORETURN appropriately for declarations of routines that
+# never return (just like Charlie on the MTA).
+#
+# Note that MSVC++ expects __declspec(noreturn) to precede the function
+# name and GCC, as far as I know, expects __attribute__((noreturn)) to
+# follow the function name, so we need two different flavors of
+# noreturn tag.
+#
+AC_DEFINE(WS_MSVC_NORETURN,, [Define as the string to precede declarations of routines that never return])
+
AC_ARG_ENABLE(airpcap,
AC_HELP_STRING( [--enable-airpcap],
[use airpcap in wireshark. @<:@default=yes@:>@]),
fi
AC_SUBST(ENABLE_STATIC)
-AC_ARG_ENABLE(new-packet-list,
- AC_HELP_STRING( [--enable-new-packet-list],
- [use new packet list feature. @<:@default=yes@:>@]),
- new_packet_list=$enableval,new_packet_list=yes)
-AC_MSG_CHECKING(if new packet list is used);
-if test "x$new_packet_list" = "xyes" ; then
- AC_MSG_RESULT(yes)
- AC_DEFINE(NEW_PACKET_LIST, 1,
- [Use the new packet list code])
-else
- AC_MSG_RESULT(no)
-fi
-
dnl Save the cacheable configure results to config.cache before recursing
AC_CACHE_SAVE
asn1/ftam/Makefile
asn1/gnm/Makefile
asn1/goose/Makefile
+ asn1/gprscdr/Makefile
asn1/gsm_map/Makefile
asn1/h225/Makefile
asn1/h235/Makefile
asn1/nbap/Makefile
asn1/ns_cert_exts/Makefile
asn1/ocsp/Makefile
+ asn1/p1/Makefile
+ asn1/p22/Makefile
asn1/p7/Makefile
+ asn1/p772/Makefile
asn1/pcap/Makefile
asn1/pkcs1/Makefile
asn1/pkcs12/Makefile
asn1/rtse/Makefile
asn1/rua/Makefile
asn1/s1ap/Makefile
- asn1/s4406/Makefile
asn1/sabp/Makefile
asn1/smrse/Makefile
asn1/snmp/Makefile
asn1/t125/Makefile
asn1/t38/Makefile
asn1/tcap/Makefile
+ asn1/tetra/Makefile
asn1/ulp/Makefile
asn1/wlancertextn/Makefile
asn1/x2ap/Makefile
- asn1/x411/Makefile
- asn1/x420/Makefile
asn1/x509af/Makefile
asn1/x509ce/Makefile
asn1/x509if/Makefile
if test "x$have_good_adns" = "xyes" ; then
adns_message="yes"
else
- adns_message="no"
+ if test "x$have_good_c_ares" = "xyes" ; then
+ adns_message="no (using c-ares instead)"
+ else
+ adns_message="no"
+ fi
fi
if test "x$have_good_libcap" = "xyes" ; then