1.3.3 -> 1.3.4.
[obnox/wireshark/wip.git] / configure.in
index 269693316b46c49525a654cc6c128d7ab9992120..a10171812cf5d5e31d2df0b746821cd766e52b61 100644 (file)
@@ -1,24 +1,36 @@
 # $Id$
 #
-AC_PREREQ(2.52)
+AC_PREREQ(2.60)
+
+AC_INIT(wireshark, 1.3.4)
 
 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.0.99)
-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_CPP
 dnl Work around libtool bug (fixed in the version 1.5a?)
 AC_DEFUN([AC_PROVIDE_AC_LIBTOOL_DLOPEN], )
@@ -32,10 +44,10 @@ then
        AC_MSG_ERROR(I couldn't find yacc (or bison or ...); make sure it's installed and in your path)
 fi
 AM_PROG_LEX
-AC_PATH_PROG(LEXDUMMY, $LEX)
-if test "x$LEXDUMMY" = x
+AC_PATH_PROG(LEX, flex)
+if test "x$LEX" = x
 then
-       AC_MSG_ERROR(I couldn't find (f)lex; make sure it's installed and in your path)
+       AC_MSG_ERROR(I couldn't find flex; make sure it's installed and in your path)
 fi
 AC_PATH_PROG(POD2MAN, pod2man)
 if test "x$POD2MAN" = x
@@ -115,19 +127,15 @@ AC_ARG_WITH([gnutls],
                  [use gnutls library @<:@default=yes@:>@]),
   with_gnutls="$withval", with_gnutls="yes")
 if test "x$with_gnutls" = "xyes"; then
-  AM_PATH_LIBGNUTLS(1.2.0,
+  PKG_CHECK_MODULES([LIBGNUTLS], [gnutls >= 1.2.0],
         [
                 echo "gnuTLS found, enabling ssl decryption"
                 AC_DEFINE(HAVE_LIBGNUTLS, 1, [Define to use gnutls library])
                 tls_message="yes"
         ]
         , [
-                if test x$libgnutls_config_prefix != x ; then
-                       AC_MSG_ERROR([[gnuTLS not found; install gnuTLS-devel package for your system]])
-                else
-                        echo echo "gnuTLS not found, disabling ssl decryption"
-                        tls_message="no"
-                fi
+                echo echo "gnuTLS not found, disabling ssl decryption"
+                tls_message="no"
         ]
   )
 fi
@@ -139,7 +147,7 @@ AC_ARG_WITH([gcrypt],
                  [use gcrypt library @<:@default=yes@:>@]),
   with_gcrypt="$withval", with_gcrypt="yes")
 if test "x$with_gcrypt" = "xyes"; then
-  AM_PATH_LIBGCRYPT(1.1.42,
+  AM_PATH_LIBGCRYPT(1.1.92,
         [
                 echo "libgcrypt found, enabling ipsec decryption"
                 AC_DEFINE(HAVE_LIBGCRYPT, 1, [Define to use libgcrypt])
@@ -175,6 +183,22 @@ 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)
+
+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")
@@ -229,36 +253,57 @@ AC_ARG_ENABLE(extra-gcc-checks,
        then
                AC_WIRESHARK_GCC_CFLAGS_CHECK(-pedantic)
                AC_WIRESHARK_GCC_CFLAGS_CHECK(-Woverflow)
+               AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wlogical-op)
                AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wno-overlength-strings)
 #              AC_WIRESHARK_GCC_CFLAGS_CHECK(-fstrict-overflow -Wstrict-overflow=4)
 #              AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wunreachable-code)
+#              AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wunsafe-loop-optimizations)
                AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wno-long-long)
                AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wbad-function-cast)
                AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wcast-qual)
+               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)
+               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-diameter.c blocks this one
+               # epan/dissectors/packet-ncp2222.inc blocks this one
                # for now.
                #
                AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wwrite-strings)
-               AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wshorten-64-to-32)
                AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wstrict-prototypes)
                AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wmissing-declarations)
-               #Temporarily put cast-align here waiting eradication of 'cast
-               #increases required alignment of target type' on the Solaris
-               #slave.
                #
                # epan/dissectors/packet-afs.c blocks this one for now.
                #
                AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wshadow)
+               #
+               # More cleanup needed for this on LP64.
+               #
+               AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wshorten-64-to-32)
        fi
 ],)
-AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wall -W) /* -W is now known as -Wextra */
+AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wall -W) # -W is now known as -Wextra
+AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wextra) # -W is now known as -Wextra
 AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wdeclaration-after-statement)
 AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wendif-labels)
 AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wpointer-arith)
 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)
+
+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])
 
 #
 # If we're running gcc add '-D_U_="__attribute__((unused))"' to CFLAGS as well,
@@ -275,7 +320,7 @@ fi
 #
 # If we're running gcc, will 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  (lex, ans2wrs, idl2wrs, ...)
+# typically not set for "generated" code  (flex, ans2wrs, idl2wrs, ...)
 #
 warnings_as_errors_default="yes"
 AC_MSG_CHECKING(whether we should treat compiler warnings as errors)
@@ -397,6 +442,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
@@ -447,6 +495,30 @@ darwin*)
 esac
 AC_SUBST(FRAMEWORKS)
 
+#
+# If using $prefix we add "$prefix/include" to the include search path
+# and "$prefix/lib" to the library search path.
+#
+if test "x$prefix" != "x" ; then
+       AC_MSG_CHECKING(whether to use $prefix for headers and libraries)
+       if test -d $prefix/include ; then
+               AC_MSG_RESULT(yes)
+               #
+               # Arrange that we search for header files in "$prefix/include", as
+               # various packages we use may have been installed under "$prefix/include".
+               #
+               CFLAGS="$CFLAGS -I$prefix/include"
+               CPPFLAGS="$CPPFLAGS -I$prefix/include"
+
+               #
+               # Arrange that we search for libraries in "$prefix/lib".
+               #
+               AC_WIRESHARK_ADD_DASH_L(LDFLAGS, $prefix/lib)
+       else
+               AC_MSG_RESULT(no)
+       fi
+fi
+
 dnl Look in /usr/local for header files and libraries ?
 dnl XXX FIXME don't include /usr/local if it is already in the system
 dnl search path as this causes gcc 3.2 on Linux to complain about a change
@@ -604,7 +676,7 @@ if test "$GTK_OK" = "no" ; then
        wireshark_bin=""
        wireshark_man=""
        # Honor GLIB_CFLAGS
-       AM_PATH_GLIB_2_0(2.4.0, CFLAGS="$CFLAGS $GLIB_CFLAGS", AC_MSG_ERROR(GLib 2.0 or later distribution not found.), gmodule)
+       AM_PATH_GLIB_2_0(2.4.0, CFLAGS="$CFLAGS $GLIB_CFLAGS", AC_MSG_ERROR(GLib 2.4 or later distribution not found.), gmodule)
 
 else
        wireshark_bin="wireshark\$(EXEEXT)"
@@ -650,12 +722,70 @@ else
   have_plugins=no
 fi
 
+#
+# If we have <dlfcn.h>, check whether we can use dladdr to find a
+# filename (hopefully, a full pathname, but no guarantees) for
+# the executable.
+#
+if test "$ac_cv_header_dlfcn_h" = "yes"
+then
+       AC_MSG_CHECKING(whether dladdr can be used to find the pathname of an executable)
+       ac_save_CFLAGS="$CFLAGS"
+       ac_save_LIBS="$LIBS"
+       CFLAGS="$CFLAGS $GLIB_CFLAGS"
+       LIBS="$GLIB_LIBS $LIBS"
+       AC_TRY_RUN([
+#define _GNU_SOURCE    /* required on Linux, sigh */
+#include <dlfcn.h>
+
+int
+main(void)
+{
+       Dl_info info;
+
+       if (!dladdr((void *)main, &info))
+               return 1;       /* failure */
+       return 0;               /* assume success */
+}
+], ac_cv_dladdr_finds_executable_path=yes, ac_cv_dladdr_finds_executable_path=no,
+   [echo $ac_n "cross compiling; assumed OK... $ac_c"
+    ac_cv_dladdr_finds_executable_path=yes])
+       CFLAGS="$ac_save_CFLAGS"
+       LIBS="$ac_save_LIBS"
+       if test x$ac_cv_dladdr_finds_executable_path = xyes
+       then
+               AC_DEFINE(DLADDR_FINDS_EXECUTABLE_PATH, 1, [Define if dladdr can be used to find the path of the executable])
+       fi
+       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
+    else
+        want_ige_mac_integration=yes
+    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)
 
-rdps_bin="rdps\$(EXEEXT)"
-AC_SUBST(rdps_bin)
-
 
 # Enable/disable tshark
 
@@ -976,6 +1106,7 @@ AC_ARG_WITH(pcre,
 ],[
        #
        # Use libpcre if it's present, otherwise don't.
+       # XXX - Should GLib 2.14 take precedence here?
        #
        want_pcre=ifavailable
        pcre_dir=
@@ -996,7 +1127,7 @@ AC_MSG_CHECKING(whether to use liblua for the lua scripting plugin)
 
 AC_ARG_WITH(lua,
   AC_HELP_STRING( [--with-lua@<:@=DIR@:>@],
-                  [use liblua (located in directory DIR, if supplied) for the lua scripting plugin.  @<:@default=no@:>@]),
+                  [use liblua (located in directory DIR, if supplied) for the lua scripting plugin.  @<:@default=yes, if available@:>@]),
 [
        if test $withval = no
        then
@@ -1010,9 +1141,9 @@ AC_ARG_WITH(lua,
        fi
 ],[
        #
-       # Don't use liblua by default (it isn't ready yet)
+       # Use liblua by default
        #
-       want_lua=no
+       want_lua=ifavailable
        lua_dir=
 ])
 if test "x$want_lua" = "xno" ; then
@@ -1129,9 +1260,6 @@ AC_CHECK_HEADERS(sys/ioctl.h sys/param.h sys/socket.h sys/sockio.h sys/stat.h sy
 AC_CHECK_HEADERS(netinet/in.h)
 AC_CHECK_HEADERS(arpa/inet.h arpa/nameser.h)
 
-dnl iconv check
-AM_ICONV
-
 dnl SSL Check
 SSL_LIBS=''
 AC_MSG_CHECKING(whether to use SSL library)
@@ -1197,6 +1325,31 @@ else
 fi
 
 
+dnl c-ares Check
+C_ARES_LIBS=''
+AC_MSG_CHECKING(whether to use the c-ares library if available)
+
+AC_ARG_WITH(c-ares,
+  AC_HELP_STRING( [--with-c-ares@<:@=DIR@:>@],
+                  [use c-ares (located in directory DIR, if supplied). Supersedes --with-adns.   @<:@default=yes, if present@:>@]),
+[
+if   test "x$withval" = "xno";  then
+       want_c_ares=no
+elif test "x$withval" = "xyes"; then
+       want_c_ares=yes
+elif test -d "$withval"; then
+       want_c_ares=yes
+       AC_WIRESHARK_ADD_DASH_L(LDFLAGS, ${withval}/lib)
+fi
+])
+if test "x$want_c_ares" = "xno" ; then
+       AC_MSG_RESULT(no)
+else
+       AC_MSG_RESULT(yes)
+       AC_WIRESHARK_C_ARES_CHECK
+fi
+AC_SUBST(C_ARES_LIBS)
+
 dnl ADNS Check
 ADNS_LIBS=''
 AC_MSG_CHECKING(whether to use the GNU ADNS library if available)
@@ -1214,7 +1367,7 @@ elif test -d "$withval"; then
        AC_WIRESHARK_ADD_DASH_L(LDFLAGS, ${withval}/lib)
 fi
 ])
-if test "x$with_adns" = "xno" ; then
+if test "x$want_adns" = "xno" -o "x$have_good_c_ares" = "xyes" ; then
        AC_MSG_RESULT(no)
 else
        AC_MSG_RESULT(yes)
@@ -1222,12 +1375,65 @@ else
 fi
 AC_SUBST(ADNS_LIBS)
 
+dnl GEOIP Check
+GEOIP_LIBS=''
+AC_MSG_CHECKING(whether to use the GeoIP IP address mapping library if available)
+
+AC_ARG_WITH(geoip,
+  AC_HELP_STRING( [--with-geoip@<:@=DIR@:>@],
+                  [use GeoIP (located in directory DIR, if supplied).   @<:@default=yes, if present@:>@]),
+[
+if   test "x$withval" = "xno";  then
+       want_geoip=no
+elif test "x$withval" = "xyes"; then
+       want_geoip=yes
+elif test -d "$withval"; then
+       want_geoip=yes
+       AC_WIRESHARK_ADD_DASH_L(LDFLAGS, ${withval}/lib)
+fi
+])
+if test "x$want_geoip" = "xno"; then
+       AC_MSG_RESULT(no)
+else
+       AC_MSG_RESULT(yes)
+       AC_WIRESHARK_GEOIP_CHECK
+fi
+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)]),
+[
+pythondir='${libdir}/wireshark/python/${VERSION}'
+if test "x$withval" = "xno"; then
+  want_python=no
+elif test "x$withval" != "xyes"; then
+  pythondir="$withval"
+  want_python=yes
+  AC_WIRESHARK_PYTHON_CHECK
+else
+  want_python=yes
+  AC_WIRESHARK_PYTHON_CHECK
+fi
+])
+AM_CONDITIONAL(HAVE_LIBPY, test x$want_python = xyes)
+AC_SUBST(pythondir)
+
 #
 # Define WS_VAR_IMPORT appropriately for declarations of external
 # variables exported from dynamically-linked libraries.
 #
 AC_DEFINE(WS_VAR_IMPORT, extern, [Define as the string to precede external variable declarations in dynamically-linked libraries])
 
+AC_ARG_ENABLE(airpcap,
+  AC_HELP_STRING( [--enable-airpcap],
+                  [use airpcap in wireshark.  @<:@default=no@:>@]),
+  enable_airpcap=$enableval
+  if test x$enable_airpcap != xno; then
+       AC_DEFINE(HAVE_AIRPCAP, 1, [Enable AirPcap])
+  fi
+)
 #
 # Define HAVE_AIRPDCAP
 # We'll want to remove this eventually.
@@ -1237,6 +1443,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().
 
@@ -1251,13 +1460,15 @@ 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])
-])
+AC_CHECK_FUNC(getopt,
+  [GETOPT_O=""
+   AC_DEFINE(HAVE_GETOPT_H, 1, [Define to 1 if you have the <getopt.h> header file.])
+  ],
+  GETOPT_O="wsgetopt.o"
+)
 if test "$ac_cv_func_getopt" = no ; then
-  GETOPT_C="getopt.c"
-  GETOPT_O="getopt.o"
+  GETOPT_C="wsgetopt.c"
+  GETOPT_O="wsgetopt.o"
 fi
 AC_SUBST(GETOPT_C)
 AC_SUBST(GETOPT_O)
@@ -1273,15 +1484,6 @@ fi
 AC_SUBST(STRERROR_C)
 AC_SUBST(STRERROR_O)
 
-AC_CHECK_FUNC(strcasecmp, STRCASECMP_O="",
-  STRCASECMP_O="strcasecmp.o")
-if test "$ac_cv_func_strcasecmp" = no ; then
-  STRCASECMP_C="strcasecmp.c"
-  STRCASECMP_O="strcasecmp.o"
-fi
-AC_SUBST(STRCASECMP_C)
-AC_SUBST(STRCASECMP_O)
-
 AC_CHECK_FUNC(strncasecmp, STRNCASECMP_O="",
   STRNCASECMP_O="strncasecmp.o")
 if test "$ac_cv_func_strncasecmp" = no ; then
@@ -1291,26 +1493,25 @@ fi
 AC_SUBST(STRNCASECMP_C)
 AC_SUBST(STRNCASECMP_O)
 
-AC_CHECK_FUNC(mkstemp, MKSTEMP_O="",
-  MKSTEMP_O="mkstemp.o")
-if test "$ac_cv_func_mkstemp" = no ; then
-  MKSTEMP_C="mkstemp.c"
-  MKSTEMP_O="mkstemp.o"
-fi
-AC_SUBST(MKSTEMP_C)
-AC_SUBST(MKSTEMP_O)
+AC_CHECK_FUNCS(mkstemp mkdtemp)
 
-AC_CHECK_FUNC(inet_aton,
-  [INET_ATON_O=""
-   INET_ATON_LO=""],
-  [INET_ATON_O="inet_aton.o"
-   INET_ATON_LO="inet_aton.lo"
-])
-if test "$ac_cv_func_inet_aton" = no ; then
+#
+# 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)
@@ -1453,9 +1654,24 @@ then
 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)
+       CFLAGS=" -DNEW_PACKET_LIST $CFLAGS"
+else
+       AC_MSG_RESULT(no)
+fi
+
 dnl Save the cacheable configure results to config.cache before recursing
 AC_CACHE_SAVE
 
+sinclude(plugins/Custom.m4) dnl
+ifdef(_CUSTOM_AC_OUTPUT_,, define(_CUSTOM_AC_OUTPUT_, )) dnl
+
 AM_CONFIG_HEADER(config.h)
 AC_OUTPUT(
   Makefile
@@ -1464,10 +1680,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
@@ -1476,7 +1695,8 @@ AC_OUTPUT(
   asn1/ess/Makefile
   asn1/ftam/Makefile
   asn1/gnm/Makefile
-  asn1/gsmmap/Makefile
+  asn1/goose/Makefile
+  asn1/gsm_map/Makefile
   asn1/h225/Makefile
   asn1/h235/Makefile
   asn1/h245/Makefile
@@ -1490,12 +1710,13 @@ AC_OUTPUT(
   asn1/h501/Makefile
   asn1/inap/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/p7/Makefile
   asn1/pcap/Makefile
@@ -1504,8 +1725,6 @@ AC_OUTPUT(
   asn1/pkinit/Makefile
   asn1/pkix1explicit/Makefile
   asn1/pkix1implicit/Makefile
-  asn1/pkixcmp/Makefile
-  asn1/pkixcrmf/Makefile
   asn1/pkixproxy/Makefile
   asn1/pkixqualified/Makefile
   asn1/pkixtsp/Makefile
@@ -1539,13 +1758,16 @@ AC_OUTPUT(
   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/ftypes/Makefile
   epan/wslua/Makefile
+  epan/wspython/Makefile
   codecs/Makefile
   gtk/Makefile
   gtk/doxygen.cfg
@@ -1561,32 +1783,19 @@ AC_OUTPUT(
   packaging/svr4/checkinstall
   packaging/svr4/pkginfo
   plugins/Makefile
-  plugins/agentx/Makefile
-  plugins/artnet/Makefile
   plugins/asn1/Makefile
-  plugins/ciscosm/Makefile
   plugins/docsis/Makefile
-  plugins/enttec/Makefile
   plugins/ethercat/Makefile
   plugins/giop/Makefile
   plugins/gryphon/Makefile
-  plugins/infiniband/Makefile
   plugins/irda/Makefile
-  plugins/lwres/Makefile
   plugins/m2m/Makefile
   plugins/mate/Makefile
   plugins/opcua/Makefile
-  plugins/opsi/Makefile
-  plugins/pcli/Makefile
   plugins/profinet/Makefile
-  plugins/rlm/Makefile
-  plugins/rtnet/Makefile
-  plugins/rudp/Makefile
-  plugins/sbus/Makefile
   plugins/sercosiii/Makefile
   plugins/stats_tree/Makefile
   plugins/unistim/Makefile
-  plugins/v5ua/Makefile
   plugins/wimax/Makefile
   plugins/wimaxasncp/Makefile
   tools/Makefile
@@ -1594,6 +1803,7 @@ AC_OUTPUT(
   tools/lemon/Makefile
   wiretap/Makefile
   wsutil/Makefile
+  _CUSTOM_AC_OUTPUT_
   ,)
 dnl AC_CONFIG_FILES([tools/setuid-root.pl], [chmod +x tools/setuid-root.pl])
 
@@ -1618,12 +1828,18 @@ else
        pcre_message="yes"
 fi
 
-if test "x$want_lua" = "xyes" -a "x$have_plugins" = "xyes" ; then
+if test "x$want_lua" = "xyes" ; then
        lua_message="yes"
 else
        lua_message="no"
 fi
 
+if test "x$want_python" = "xyes"; then
+        python_message="yes"
+else
+        python_message="no"
+fi
+
 if test "x$want_portaudio" = "xyes" ; then
        portaudio_message="yes"
 else
@@ -1642,6 +1858,12 @@ else
        krb5_message="yes ($ac_krb5_version)"
 fi
 
+if test "x$have_good_c_ares" = "xyes" ; then
+       c_ares_message="yes"
+else
+       c_ares_message="no"
+fi
+
 if test "x$have_good_adns" = "xyes" ; then
        adns_message="yes"
 else
@@ -1654,6 +1876,12 @@ else
        libcap_message="no"
 fi
 
+if test "x$have_good_geoip" = "xyes" ; then
+       geoip_message="yes"
+else
+       geoip_message="no"
+fi
+
 echo ""
 echo "The Wireshark package has been configured with the following options."
 echo "                    Build wireshark : $enable_wireshark"
@@ -1670,7 +1898,8 @@ echo "                     Build rawshark : $enable_rawshark"
 echo ""
 echo "             Install dumpcap setuid : $setuid_message"
 echo "                        Use plugins : $have_plugins"
-echo "                   Build lua plugin : $lua_message"
+echo "                    Use lua library : $lua_message"
+echo "                 Use python binding : $python_message"
 echo "                   Build rtp_player : $portaudio_message"
 echo "                        Use threads : $enable_threads"
 echo "             Build profile binaries : $enable_profile_build"
@@ -1678,6 +1907,7 @@ echo "                   Use pcap library : $want_pcap"
 echo "                   Use zlib library : $zlib_message"
 echo "                   Use pcre library : $pcre_message"
 echo "               Use kerberos library : $krb5_message"
+echo "                 Use c-ares library : $c_ares_message"
 echo "               Use GNU ADNS library : $adns_message"
 echo "                Use SMI MIB library : $libsmi_message"
 echo "             Use GNU crypto library : $gcrypt_message"
@@ -1685,3 +1915,4 @@ echo "             Use SSL crypto library : $ssl_message"
 echo "           Use IPv6 name resolution : $enable_ipv6"
 echo "                 Use gnutls library : $tls_message"
 echo "     Use POSIX capabilities library : $libcap_message"
+echo "                  Use GeoIP library : $geoip_message"