From Dirk via bug #5771: Add heuristic dissector for images and HTTP
[obnox/wireshark/wip.git] / configure.in
index 47a713b0cd1737322b66f42fb64f56400b7e7c11..f0041af9c37abea450043962e91c5908fe3e8601 100644 (file)
@@ -2,30 +2,61 @@
 #
 AC_PREREQ(2.60)
 
+AC_INIT(wireshark, 1.5.1)
+
 dnl Check for CPU / vendor / OS
 dnl The user is encouraged to use either `AC_CANONICAL_BUILD', or
 dnl `AC_CANONICAL_HOST', or `AC_CANONICAL_TARGET', depending on the
 dnl needs.  Using `AC_CANONICAL_TARGET' is enough to run the two other
 dnl macros.
+dnl
+dnl As nothing in the Wireshark is itself a build tool (we are not,
+dnl for example, a compiler that generates machine code), we probably
+dnl don't need AC_CANONICAL_TARGET, so, in theory, we should be able
+dnl to use AC_CANONICAL_BUILD and AC_CANONICAL_HOST - or perhaps just
+dnl AC_CANONICAL_HOST - instead.  Note that we do have tools, such as
+dnl lemon, that need to be built for the build machine, not for the
+dnl host machine, so we might need both.
+dnl
+dnl This has to be done *after* AC_INIT, otherwise autogen.sh fails.
 
-dnl AC_CANONICAL_HOST
 dnl AC_CANONICAL_BUILD
-dnl AC_CANONICAL_TARGET
+dnl AC_CANONICAL_HOST
+AC_CANONICAL_TARGET
 
-AC_INIT(wireshark, 1.3.0)
-AM_INIT_AUTOMAKE([1.9 tar-ustar])
+AM_INIT_AUTOMAKE([1.9 tar-ustar dist-bzip2 no-dist-gzip])
 
 AM_DISABLE_STATIC
 
 dnl Checks for programs.
 AC_PROG_CC
 AM_PROG_CC_C_O
+AC_PROG_CXX
 AC_PROG_CPP
 dnl Work around libtool bug (fixed in the version 1.5a?)
 AC_DEFUN([AC_PROVIDE_AC_LIBTOOL_DLOPEN], )
 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
@@ -86,14 +117,12 @@ else
        fi
 fi
 
-AC_PATH_PROG(LEX, flex)
 AC_PATH_PROG(PYTHON, python)
 
 AC_SUBST(PERL)
+AC_SUBST(LEX)
 AC_SUBST(POD2MAN)
 AC_SUBST(POD2HTML)
-AC_SUBST(LEX)
-AC_SUBST(FLEX_PATH)
 AC_SUBST(PYTHON)
 AC_SUBST(XSLTPROC)
 AC_SUBST(XMLLINT)
@@ -123,7 +152,7 @@ if test "x$with_gnutls" = "xyes"; then
                 tls_message="yes"
         ]
         , [
-                echo echo "gnuTLS not found, disabling ssl decryption"
+                echo "gnuTLS not found, disabling ssl decryption"
                 tls_message="no"
         ]
   )
@@ -153,6 +182,12 @@ if test "x$with_gcrypt" = "xyes"; then
   )
 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
@@ -172,6 +207,24 @@ AC_PATH_PROG(FOP, fop)
 AC_CHECK_PROG(HAVE_FOP, fop, "yes", "no")
 AM_CONDITIONAL(HAVE_FOP, test x$HAVE_FOP = xyes)
 
+#
+# Look for something to convert HTML to text (for docbook/)
+#
+AC_PATH_PROG(ELINKS, elinks)
+AC_CHECK_PROG(HAVE_ELINKS, elinks, "yes", "no")
+AM_CONDITIONAL(HAVE_ELINKS, test x$HAVE_ELINKS = xyes)
+
+## links: Fails as used in docbook/Makefile.am
+## (Rather than fixing things we'll just disable the use of links).
+##AC_PATH_PROG(LINKS, links)
+##AC_CHECK_PROG(HAVE_LINKS, links, "yes", "no")
+##AM_CONDITIONAL(HAVE_LINKS, test x$HAVE_LINKS = xyes)
+
+AC_PATH_PROG(LYNX, lynx)
+AC_CHECK_PROG(HAVE_LYNX, lynx, "yes", "no")
+AM_CONDITIONAL(HAVE_LYNX, test x$HAVE_LYNX = xyes)
+
+
 # Check for hhc (html help compiler)
 AC_PATH_PROG(HHC, hhc.exe)
 AC_CHECK_PROG(HAVE_HHC, hhc.exe, "yes", "no")
@@ -244,6 +297,8 @@ AC_ARG_ENABLE(extra-gcc-checks,
                AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wpragmas)
                AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wredundant-decls)
                AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wvla)
+               AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wc++-compat)
+               AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wjump-misses-init)
                #
                # epan/dissectors/packet-ncp2222.inc blocks this one
                # for now.
@@ -270,8 +325,15 @@ AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wno-pointer-sign)
 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(-fexcess-precision=fast)
 
 AC_WIRESHARK_GCC_LDFLAGS_CHECK([-Wl,--as-needed])
+###AC_WIRESHARK_GCC_LDFLAGS_CHECK([-Wl,-M])
+###AC_WIRESHARK_GCC_LDFLAGS_CHECK([-Wl,--cref])
+# AC_WIRESHARK_GCC_LDFLAGS_CHECK([-flto])
+# AC_WIRESHARK_GCC_LDFLAGS_CHECK([-fwhopr])
+# AC_WIRESHARK_GCC_LDFLAGS_CHECK([-fwhole-program])
 
 #
 # If we're running gcc add '-D_U_="__attribute__((unused))"' to CFLAGS as well,
@@ -410,6 +472,9 @@ cygwin*)
 esac
 AC_SUBST(LDFLAGS_SHAREDLIB)
 
+# Control silent compiling
+m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([no])])
+
 #
 # On OS X, if we find the headers for Core Foundation, Launch Services,
 # and Core Services, add -framework options to link with Application
@@ -423,8 +488,9 @@ case "$host_os" in
 darwin*)
        AC_MSG_CHECKING([whether we can build with Core Foundation, Launch Services, and Core Services])
        ac_save_LIBS="$LIBS"
-       ac_frameworks="-framework ApplicationServices -framework CoreFoundation -framework CoreServices"
-       LIBS="$LIBS $ac_frameworks"
+       ac_coreservices_frameworks="-framework CoreServices"
+       ac_launchservices_frameworks="-framework ApplicationServices -framework CoreFoundation $ac_coreservices_frameworks"
+       LIBS="$LIBS $ac_launchservices_frameworks $ac_coreservices_frameworks"
        AC_TRY_LINK(
           [
 #       include <CoreFoundation/CFBase.h>
@@ -450,7 +516,8 @@ darwin*)
           [echo $ac_n "cross compiling; assumed OK... $ac_c"])
        if test "$ac_cv_can_use_osx_frameworks" = yes ; then
                AC_DEFINE(HAVE_OS_X_FRAMEWORKS, 1, [Define to 1 if you have OS X frameworks])
-               FRAMEWORKS="$ac_frameworks"
+               CORESERVICES_FRAMEWORKS="$ac_coreservices_frameworks"
+               LAUNCHSERVICES_FRAMEWORKS="$ac_launchservices_frameworks"
                AC_MSG_RESULT(yes)
        else
                AC_MSG_RESULT(no)
@@ -458,7 +525,8 @@ darwin*)
        LIBS="$ac_save_LIBS"
        ;;
 esac
-AC_SUBST(FRAMEWORKS)
+AC_SUBST(CORESERVICES_FRAMEWORKS)
+AC_SUBST(LAUNCHSERVICES_FRAMEWORKS)
 
 #
 # If using $prefix we add "$prefix/include" to the include search path
@@ -495,20 +563,24 @@ AC_ARG_ENABLE(usr-local,
 
 AC_MSG_CHECKING(whether to use /usr/local for headers and libraries)
 if test "x$ac_cv_enable_usr_local" = "xyes" ; then
-       AC_MSG_RESULT(yes)
-       #
-       # Arrange that we search for header files in the source directory
-       # and in its "wiretap" subdirectory, as well as in "/usr/local/include",
-       # as various packages we use ("libpcap", "zlib", "adns", "pcre")
-       # may have been installed under "/usr/local/include".
-       #
-       CFLAGS="$CFLAGS -I/usr/local/include"
-       CPPFLAGS="$CPPFLAGS -I/usr/local/include"
+       if test -d "/usr/local"; then
+               AC_MSG_RESULT(yes)
+               #
+               # Arrange that we search for header files in the source directory
+               # and in its "wiretap" subdirectory, as well as in "/usr/local/include",
+               # as various packages we use ("libpcap", "zlib", "adns", "pcre")
+               # may have been installed under "/usr/local/include".
+               #
+               CFLAGS="$CFLAGS -I/usr/local/include"
+               CPPFLAGS="$CPPFLAGS -I/usr/local/include"
 
-       #
-       # Arrange that we search for libraries in "/usr/local/lib".
-       #
-       AC_WIRESHARK_ADD_DASH_L(LDFLAGS, /usr/local/lib)
+               #
+               # Arrange that we search for libraries in "/usr/local/lib".
+               #
+               AC_WIRESHARK_ADD_DASH_L(LDFLAGS, /usr/local/lib)
+       else
+               AC_MSG_RESULT(no)
+       fi
 else
        AC_MSG_RESULT(no)
 fi
@@ -607,19 +679,48 @@ datafiledir=`(
 )`
 AC_DEFINE_UNQUOTED(DATAFILE_DIR,"$datafiledir", [Directory for data])
 
+# Create DOC_DIR #define for config.h
+docdir=`(
+    test "x$prefix" = xNONE && prefix=$ac_default_prefix
+    test "x$exec_prefix" = xNONE && exec_prefix=${prefix}
+    # Ugly hack, but I don't see how this problem can be solved
+    # properly that DOC_DIR had a value starting with
+    # "${prefix}/" instead of e.g. "/usr/local/"
+    eval eval echo "$docdir"
+)`
+AC_DEFINE_UNQUOTED(DOC_DIR, "$docdir", [Directory for docs])
+
 # GTK checks; we require GTK+ 2.4 or later.
 # We don't add $GLIB_LIBS to LIBS, because we don't want to force all
 # programs to be built with GTK+.
 #
 if test "x$enable_wireshark" = "xyes"; then
-       AM_PATH_GTK_2_0(2.4.0, CFLAGS="$CFLAGS $GTK_CFLAGS", GTK_OK=no, gthread)
+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
 
-# GLib checks
-# This doesn't add GLIB_CFLAGS to CFLAGS, because AM_PATH_GTK will add
-# GTK_CFLAGS to CFLAGS, and GTK_CFLAGS is a superset of CFLAGS.
+# GLib checks; we require GLib 2.4 or later, and require gmodule
+# support, as we need that for dynamically loading plugins.
+# If we found GTK+, this doesn't add GLIB_CFLAGS to CFLAGS, because
+# AM_PATH_GTK will add GTK_CFLAGS to CFLAGS, and GTK_CFLAGS is a
+# superset of GLIB_CFLAGS.  If we didn't find GTK+, it does add
+# GLIB_CFLAGS to CFLAGS.
 # However, this means that both @GLIB_LIBS@ and @GTK_LIBS@ will be
 # set when generating the Makefile, so we can make programs that require
 # only GLib link with @GLIB_LIBS@ and make programs that require GTK+
@@ -640,17 +741,46 @@ if test "$GTK_OK" = "no" ; then
        fi
        wireshark_bin=""
        wireshark_man=""
-       # Honor GLIB_CFLAGS
-       AM_PATH_GLIB_2_0(2.4.0, CFLAGS="$CFLAGS $GLIB_CFLAGS", AC_MSG_ERROR(GLib 2.4 or later distribution not found.), gmodule)
-
+       # Use GLIB_CFLAGS
+       AM_PATH_GLIB_2_0(2.4.0,
+       [
+               CFLAGS="$CFLAGS $GLIB_CFLAGS"
+               CXXFLAGS="$CXXFLAGS $GLIB_CFLAGS"
+       ], AC_MSG_ERROR(GLib 2.4 or later distribution not found.), gmodule)
 else
+       #
+       # We have GTK+, and thus will be building Wireshark unless the
+       # user explicitly disabled it.
+       #
        wireshark_bin="wireshark\$(EXEEXT)"
        wireshark_man="wireshark.1"
         wireshark_SUBDIRS="codecs gtk"
-       # Honor GLIB_CFLAGS
+       # 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)
 fi
 
+#
+# Check whether GLib includes GRegex support.
+# We just assume that everybody builds GLib 2.14.0 and later
+# with GRegex support; it's possible to compile GLib without
+# GRegex but it doesn't look as if anyone does.
+#
+AC_MSG_CHECKING(for GLIB - version >= 2.14.0)
+if test x$PKG_CONFIG != xno ; then
+    ## don't try to run the test against uninstalled libtool libs
+    if $PKG_CONFIG --uninstalled $pkg_config_args; then
+       echo "Will use uninstalled version of GLib found in PKG_CONFIG_PATH"
+       enable_glibtest=no
+    fi
+
+    if $PKG_CONFIG --atleast-version 2.14.0 glib-2.0; then
+       have_gregex=yes
+    else
+       have_gregex=no
+    fi
+    AC_MSG_RESULT($have_gregex)
+fi
+
 #
 # Check whether GLib modules are supported, to determine whether we
 # can support plugins.
@@ -724,30 +854,36 @@ main(void)
        AC_MSG_RESULT($ac_cv_dladdr_finds_executable_path)
 fi
 
-dnl IGE Mac integration check
-AC_MSG_CHECKING(whether to use IGE Mac integration functions)
-
-AC_ARG_WITH(ige-mac-integration,
-  AC_HELP_STRING( [--with-ige-mac-integration],
-                  [use IGE Mac integration. (@<:@default=yes, if available@:>@]),
-[
-    if test $withval = no
-    then
-        want_ige_mac_integration=no
+if test "x$no_gtk" != "xyes"
+then
+    #
+    # We have GTK+; do we want the OS X integration functions and,
+    # if so, do we have them and, if so, which versions do we have,
+    # the old Carbon-based ones or the new Cocoa-based ones?
+    #
+    AC_MSG_CHECKING(whether to use OS X integration functions)
+
+    AC_ARG_WITH(osx-integration,
+      AC_HELP_STRING( [--with-osx-integration],
+                      [use OS X integration functions (@<:@default=yes, if available@:>@]),
+    [
+        if test $withval = no
+        then
+            want_osx_integration=no
+        else
+            want_osx_integration=yes
+        fi
+    ],[
+        want_osx_integration=yes
+    ])
+    if test "x$want_osx_integration" = "xno"; then
+        AC_MSG_RESULT(no)
     else
-        want_ige_mac_integration=yes
+        AC_MSG_RESULT(yes)
+        AC_WIRESHARK_OSX_INTEGRATION_CHECK
     fi
-],[
-    want_ige_mac_integration=yes
-])
-if test "x$want_ige_mac_integration" = "xno" -o "x$no_gtk" = "xyes" ; then
-    AC_MSG_RESULT(no)
-else
-    AC_MSG_RESULT(yes)
-    AC_WIRESHARK_IGE_MAC_INTEGRATION_CHECK
 fi
 
-
 AC_SUBST(wireshark_bin)
 AC_SUBST(wireshark_man)
 
@@ -873,10 +1009,13 @@ AC_ARG_ENABLE(dftest,
 
 if test "x$enable_dftest" = "xyes" ; then
        dftest_bin="dftest\$(EXEEXT)"
+       dftest_man="dftest.1"
 else
        dftest_bin=""
+       dftest_man=""
 fi
 AC_SUBST(dftest_bin)
+AC_SUBST(dftest_man)
 
 
 # Enable/disable randpkt
@@ -888,10 +1027,13 @@ AC_ARG_ENABLE(randpkt,
 
 if test "x$enable_randpkt" = "xyes" ; then
        randpkt_bin="randpkt\$(EXEEXT)"
+       randpkt_man="randpkt.1"
 else
        randpkt_bin=""
+       randpkt_man=""
 fi
 AC_SUBST(randpkt_bin)
+AC_SUBST(randpkt_man)
 
 
 
@@ -998,7 +1140,8 @@ dnl pcap remote check
 AC_MSG_CHECKING(whether to use libpcap remote capturing feature)
 
 AC_ARG_WITH(pcap-remote,
-[  --with-pcap-remote        use libpcap remote capturing (requires libpcap)],
+    AC_HELP_STRING([--with-pcap-remote],
+                   [use libpcap remote capturing (requires libpcap)]),
 [
     if test $withval = no
     then
@@ -1020,8 +1163,8 @@ dnl zlib check
 AC_MSG_CHECKING(whether to use zlib for reading compressed capture files)
 
 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@:>@]),
+  AC_HELP_STRING([--with-zlib@<:@=DIR@:>@],
+                 [use zlib (located in directory DIR, if supplied) to read compressed data.  @<:@default=yes, if available@:>@]),
 [
        if test $withval = no
        then
@@ -1050,13 +1193,19 @@ else
        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)
 
 AC_ARG_WITH(pcre,
   AC_HELP_STRING( [--with-pcre@<:@=DIR@:>@],
-                  [use libpcre (located in directory DIR, if supplied) to use in dfilter regular expressions.  @<:@default=yes, if available@:>@]),
+                  [use libpcre (located in directory DIR, if supplied) to use in dfilter regular expressions. Not needed if you have GLib 2.14 or later. @<:@default=yes, if available and GLib < 2.14@:>@]),
 [
        if test $withval = no
        then
@@ -1070,9 +1219,13 @@ AC_ARG_WITH(pcre,
        fi
 ],[
        #
-       # Use libpcre if it's present, otherwise don't.
+       # Use libpcre if it's present and GRegex isn't, otherwise don't.
        #
-       want_pcre=ifavailable
+       if test $have_gregex = yes ; then
+               want_pcre=no
+       else
+               want_pcre=ifavailable
+       fi
        pcre_dir=
 ])
 if test "x$want_pcre" = "xno" ; then
@@ -1173,6 +1326,28 @@ else
 fi
 
 
+dnl Check if dumpcap should be installed with filesystem capabilities
+AC_PATH_PROG(SETCAP, setcap)
+AC_ARG_ENABLE(setcap-install,
+  AC_HELP_STRING( [--enable-setcap-install],
+                  [install dumpcap with cap_net_admin and cap_net_raw @<:@default=no@:>@]),
+    enable_setcap_install=$enableval,enable_setcap_install=no)
+
+AC_MSG_CHECKING(whether to install dumpcap with cap_net_admin and cap_net_raw capabilities)
+if test "x$enable_setcap_install" = "xno" ; then
+       AC_MSG_RESULT(no)
+else
+       if test "x$SETCAP" = "x" ; then
+               AC_MSG_RESULT(no. Setcap not found)
+       elif test "x$enable_dumpcap" = "xno" ; then
+               AC_MSG_ERROR(Setcap install works only with dumpcap but dumpcap is disabled)
+       else
+               AC_MSG_RESULT(yes)
+       fi
+fi
+
+AM_CONDITIONAL(SETCAP_INSTALL, test x$enable_setcap_install = xyes)
+
 dnl Check if dumpcap should be installed setuid
 AC_ARG_ENABLE(setuid-install,
   AC_HELP_STRING( [--enable-setuid-install],
@@ -1183,7 +1358,10 @@ AC_MSG_CHECKING(whether to install dumpcap setuid)
 if test "x$enable_setuid_install" = "xno" ; then
        AC_MSG_RESULT(no)
 else
-       if test "x$enable_dumpcap" = "xno" ; then
+       if test "x$enable_setcap_install" = "xyes" ; then
+               enable_setuid_install=no
+               AC_MSG_RESULT(no; using setcap instead)
+       elif test "x$enable_dumpcap" = "xno" ; then
                AC_MSG_ERROR(Setuid install works only with dumpcap but dumpcap is disabled)
        else
                AC_MSG_RESULT(yes)
@@ -1193,6 +1371,22 @@ fi
 AM_CONDITIONAL(SETUID_INSTALL, test x$enable_setuid_install = xyes)
 AC_CHECK_FUNCS(setresuid setresgid)
 
+dnl ...but our Network Operations group is named "no"!
+DUMPCAP_GROUP=''
+AC_ARG_WITH(dumpcap-group,
+  AC_HELP_STRING( [--with-dumpcap-group=GROUP],
+                  [restrict dumpcap to GROUP]),
+[
+  if test "x$withval" = "xyes"; then
+      AC_MSG_ERROR([No dumpcap group specified.])
+  elif test "x$withval" != "xno"; then
+      AC_MSG_RESULT($withval)
+      DUMPCAP_GROUP="$withval"
+  fi
+])
+AC_SUBST(DUMPCAP_GROUP)
+AM_CONDITIONAL(HAVE_DUMPCAP_GROUP, test x$DUMPCAP_GROUP != x)
+
 dnl libcap (not libpcap) check
 LIBCAP_LIBS=''
 AC_MSG_CHECKING(whether to use the libcap capabilities library)
@@ -1367,7 +1561,7 @@ AC_SUBST(GEOIP_LIBS)
 dnl Python devel Check
 AC_ARG_WITH(python,
     AC_HELP_STRING( [--with-python@<:@=DIR@:>@],
-                    [use python interpretor (installed in DIR, if supplied). @<:@default=no@:>@ (EXPERIMENTAL)]),
+                    [use python interpreter (installed in DIR, if supplied). @<:@default=yes@:>@ (EXPERIMENTAL)]),
 [
 pythondir='${libdir}/wireshark/python/${VERSION}'
 if test "x$withval" = "xno"; then
@@ -1390,9 +1584,20 @@ AC_SUBST(pythondir)
 #
 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=no@:>@]),
+                  [use airpcap in wireshark.  @<:@default=yes@:>@]),
   enable_airpcap=$enableval
   if test x$enable_airpcap != xno; then
        AC_DEFINE(HAVE_AIRPCAP, 1, [Enable AirPcap])
@@ -1407,6 +1612,9 @@ AC_DEFINE(HAVE_AIRPDCAP, 1, [Enable AirPDcap (WPA/WPA2 decryption)])
 dnl Checks for typedefs, structures, and compiler characteristics.
 # AC_C_CONST
 
+# Check how we can get the time zone abbreviation
+AC_WIRESHARK_TIMEZONE_ABBREV
+
 # We need to know whether "struct sockaddr" has an "sa_len" member
 # for get_interface_list().
 
@@ -1419,61 +1627,48 @@ AC_C_BIGENDIAN
 # XXX - do we need this?
 AC_PROG_GCC_TRADITIONAL
 
-GETOPT_C=""
-GETOPT_O=""
-AC_CHECK_FUNC(getopt, GETOPT_O="",
-  [GETOPT_O="getopt.o"
-   AC_DEFINE(NEED_GETOPT_H, 1, [Define if getopt.h needs to be included])
-])
+GETOPT_LO=""
+AC_CHECK_FUNC(getopt,
+  [GETOPT_LO=""
+   AC_DEFINE(HAVE_GETOPT_H, 1, [Define to 1 if you have the <getopt.h> header file.])
+  ],
+  GETOPT_LO="wsgetopt.lo"
+)
 if test "$ac_cv_func_getopt" = no ; then
-  GETOPT_C="getopt.c"
-  GETOPT_O="getopt.o"
+  GETOPT_LO="wsgetopt.lo"
 fi
-AC_SUBST(GETOPT_C)
-AC_SUBST(GETOPT_O)
+AM_CONDITIONAL(NEED_GETOPT_LO, test "x$ac_cv_func_getopt" = "xno")
+AC_SUBST(GETOPT_LO)
 
-AC_CHECK_FUNC(strerror, STRERROR_O="",
-  [STRERROR_O="strerror.o"
+AC_CHECK_FUNC(strerror, STRERROR_LO="",
+  [STRERROR_LO="strerror.lo"
    AC_DEFINE(NEED_STRERROR_H, 1, [Define if strerror.h needs to be included])
 ])
 if test "$ac_cv_func_strerror" = no ; then
-  STRERROR_C="strerror.c"
-  STRERROR_O="strerror.o"
+  STRERROR_LO="strerror.lo"
 fi
-AC_SUBST(STRERROR_C)
-AC_SUBST(STRERROR_O)
+AM_CONDITIONAL(NEED_STRERROR_LO, test "x$ac_cv_func_strerror" = "xno")
+AC_SUBST(STRERROR_LO)
 
-AC_CHECK_FUNC(strncasecmp, STRNCASECMP_O="",
-  STRNCASECMP_O="strncasecmp.o")
+AC_CHECK_FUNC(strncasecmp, STRNCASECMP_LO="",
+  STRNCASECMP_LO="strncasecmp.lo")
 if test "$ac_cv_func_strncasecmp" = no ; then
-  STRNCASECMP_C="strncasecmp.c"
-  STRNCASECMP_O="strncasecmp.o"
+  STRNCASECMP_LO="strncasecmp.lo"
 fi
-AC_SUBST(STRNCASECMP_C)
-AC_SUBST(STRNCASECMP_O)
+AM_CONDITIONAL(NEED_STRNCASECMP_LO, test "x$ac_cv_func_strncasecmp" = "xno")
+AC_SUBST(STRNCASECMP_LO)
 
 AC_CHECK_FUNCS(mkstemp mkdtemp)
 
-#
-# XXX - if inet_aton isn't found, the build fails, with a complaint from
-# libtool about inet_aton.lo not being a valid libtool object.  We
-# probably have to handle it - and all the other replacement functions that
-# get built into libwireshark - differently.
-#
 AC_SEARCH_LIBS(inet_aton, [socket nsl], have_inet_aton=yes,
     have_inet_aton=no)
 if test "$have_inet_aton" = no; then
-  INET_ATON_C="inet_aton.c"
-  INET_ATON_O="inet_aton.o"
   INET_ATON_LO="inet_aton.lo"
   AC_DEFINE(NEED_INET_ATON_H, 1, [Define if inet/aton.h needs to be included])
 else
-  INET_ATON_C=""
-  INET_ATON_O=""
   INET_ATON_LO=""
 fi
-AC_SUBST(INET_ATON_C)
-AC_SUBST(INET_ATON_O)
+AM_CONDITIONAL(NEED_INET_ATON_LO, test "x$have_inet_aton" = "xno")
 AC_SUBST(INET_ATON_LO)
 
 AC_SEARCH_LIBS(inet_pton, [socket nsl], [
@@ -1498,16 +1693,11 @@ have_inet_pton=no], [AC_MSG_RESULT(cross compiling, assume it is broken);
 have_inet_pton=no])],
 have_inet_pton=no)
 if test "$have_inet_pton" = no; then
-  INET_PTON_C="inet_pton.c"
-  INET_PTON_O="inet_pton.o"
   INET_PTON_LO="inet_pton.lo"
 else
-  INET_PTON_C=""
-  INET_PTON_O=""
   INET_PTON_LO=""
 fi
-AC_SUBST(INET_PTON_C)
-AC_SUBST(INET_PTON_O)
+AM_CONDITIONAL(NEED_INET_PTON_LO, test "x$have_inet_pton" = "xno")
 AC_SUBST(INET_PTON_LO)
 
 AC_SEARCH_LIBS(inet_ntop, [socket nsl], [
@@ -1533,31 +1723,28 @@ extern const char *inet_ntop(int, const void *, char *, socklen_t);],, [
       AC_DEFINE(HAVE_INET_NTOP_PROTO, 1,
       [Define if inet_ntop() prototype exists])], [
       AC_MSG_RESULT(no)])])
-  INET_NTOP_O=""
   INET_NTOP_LO=""], [
-  INET_NTOP_C="inet_ntop.c"
-  INET_NTOP_O="inet_ntop.o"
   INET_NTOP_LO="inet_ntop.lo"
   AC_DEFINE(NEED_INET_V6DEFS_H, 1,
   [Define if inet/v6defs.h needs to be included])])
-AC_SUBST(INET_NTOP_C)
-AC_SUBST(INET_NTOP_O)
+AM_CONDITIONAL(NEED_INET_NTOP_LO, test "x$INET_NTOP_LO" != "x")
 AC_SUBST(INET_NTOP_LO)
 
-AC_CHECK_FUNC(strptime, STRPTIME_O="",
-  [STRPTIME_O="strptime.o"
+AC_CHECK_FUNC(strptime, STRPTIME_LO="",
+  [STRPTIME_LO="strptime.lo"
    AC_DEFINE(NEED_STRPTIME_H, 1, [Define if strptime.h needs to be included])
 ])
 if test "$ac_cv_func_strptime" = no ; then
-  STRPTIME_C="strptime.c"
-  STRPTIME_O="strptime.o"
+  STRPTIME_LO="strptime.lo"
 fi
 AC_SUBST(STRPTIME_C)
-AC_SUBST(STRPTIME_O)
+AM_CONDITIONAL(NEED_STRPTIME_LO, test "x$ac_cv_func_strptime" = "no")
+AC_SUBST(STRPTIME_LO)
 
 AC_CHECK_FUNCS(getprotobynumber gethostbyname2)
 AC_CHECK_FUNCS(issetugid)
 AC_CHECK_FUNCS(mmap mprotect sysconf)
+AC_CHECK_FUNCS(strtoll)
 
 dnl blank for now, but will be used in future
 AC_SUBST(wireshark_SUBDIRS)
@@ -1627,11 +1814,13 @@ AC_OUTPUT(
   asn1/acp133/Makefile
   asn1/acse/Makefile
   asn1/ansi_map/Makefile
-  asn1/ansi-tcap/Makefile
+  asn1/ansi_tcap/Makefile
   asn1/camel/Makefile
   asn1/cdt/Makefile
   asn1/charging_ase/Makefile
   asn1/cmip/Makefile
+  asn1/cmp/Makefile
+  asn1/crmf/Makefile
   asn1/cms/Makefile
   asn1/dap/Makefile
   asn1/disp/Makefile
@@ -1641,7 +1830,8 @@ AC_OUTPUT(
   asn1/ftam/Makefile
   asn1/gnm/Makefile
   asn1/goose/Makefile
-  asn1/gsmmap/Makefile
+  asn1/gprscdr/Makefile
+  asn1/gsm_map/Makefile
   asn1/h225/Makefile
   asn1/h235/Makefile
   asn1/h245/Makefile
@@ -1653,25 +1843,31 @@ AC_OUTPUT(
   asn1/h450-ros/Makefile
   asn1/h460/Makefile
   asn1/h501/Makefile
+  asn1/HI2Operations/Makefile
+  asn1/hnbap/Makefile
+  asn1/idmp/Makefile
   asn1/inap/Makefile
+  asn1/kerberos/Makefile
   asn1/ldap/Makefile
-  asn1/logotype-cert-extn/Makefile
+  asn1/logotypecertextn/Makefile
   asn1/lte-rrc/Makefile
   asn1/mms/Makefile
   asn1/mpeg-audio/Makefile
   asn1/mpeg-pes/Makefile
   asn1/nbap/Makefile
-  asn1/ns-cert-exts/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/pkinit/Makefile
+  asn1/pkixac/Makefile
   asn1/pkix1explicit/Makefile
   asn1/pkix1implicit/Makefile
-  asn1/pkixcmp/Makefile
-  asn1/pkixcrmf/Makefile
   asn1/pkixproxy/Makefile
   asn1/pkixqualified/Makefile
   asn1/pkixtsp/Makefile
@@ -1685,32 +1881,35 @@ AC_OUTPUT(
   asn1/rrc/Makefile
   asn1/rrlp/Makefile
   asn1/rtse/Makefile
+  asn1/rua/Makefile
   asn1/s1ap/Makefile
-  asn1/s4406/Makefile
   asn1/sabp/Makefile
   asn1/smrse/Makefile
   asn1/snmp/Makefile
   asn1/spnego/Makefile
+  asn1/sv/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
   asn1/x509sat/Makefile
   asn1/x721/Makefile
   doc/Makefile
+  docbook/Makefile
   epan/Makefile
   epan/crc/Makefile
   epan/crypt/Makefile
   epan/doxygen.cfg
   epan/dfilter/Makefile
   epan/dissectors/Makefile
+  epan/dissectors/dcerpc/Makefile
+  epan/dissectors/pidl/Makefile
   epan/ftypes/Makefile
   epan/wslua/Makefile
   epan/wspython/Makefile
@@ -1734,6 +1933,7 @@ AC_OUTPUT(
   plugins/ethercat/Makefile
   plugins/giop/Makefile
   plugins/gryphon/Makefile
+  plugins/interlink/Makefile
   plugins/irda/Makefile
   plugins/m2m/Makefile
   plugins/mate/Makefile
@@ -1756,12 +1956,25 @@ dnl AC_CONFIG_FILES([tools/setuid-root.pl], [chmod +x tools/setuid-root.pl])
 
 # Pretty messages
 
+if test "x$enable_setcap_install" = "xyes" ; then
+       setcap_message="yes"
+else
+       setcap_message="no"
+fi
+
+
 if test "x$enable_setuid_install" = "xyes" ; then
        setuid_message="yes"
 else
        setuid_message="no"
 fi
 
+if test "x$DUMPCAP_GROUP" = "x" ; then
+       dumpcap_group_message="(none)"
+else
+       dumpcap_group_message="$DUMPCAP_GROUP"
+fi
+
 if test "x$want_zlib" = "xno" ; then
        zlib_message="no"
 else
@@ -1769,7 +1982,12 @@ else
 fi
 
 if test "x$want_pcre" = "xno" ; then
-       pcre_message="no"
+       if test $have_gregex = yes
+       then
+               pcre_message="no (using GRegex instead)"
+       else
+               pcre_message="no"
+       fi
 else
        pcre_message="yes"
 fi
@@ -1813,7 +2031,11 @@ fi
 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
@@ -1842,7 +2064,9 @@ echo "                      Build randpkt : $enable_randpkt"
 echo "                       Build dftest : $enable_dftest"
 echo "                     Build rawshark : $enable_rawshark"
 echo ""
+echo "  Install dumpcap with capabilities : $setcap_message"
 echo "             Install dumpcap setuid : $setuid_message"
+echo "                  Use dumpcap group : $dumpcap_group_message"
 echo "                        Use plugins : $have_plugins"
 echo "                    Use lua library : $lua_message"
 echo "                 Use python binding : $python_message"