python binding for wireshark (first commit)
[obnox/wireshark/wip.git] / configure.in
index 9a432a6b0317154ba138fd8b8f60eae00b8a3ff0..8d3c3a132633df6b3d7e5e508fa1f61985a7fffa 100644 (file)
@@ -12,7 +12,7 @@ dnl AC_CANONICAL_HOST
 dnl AC_CANONICAL_BUILD
 dnl AC_CANONICAL_TARGET
 
-AC_INIT(wireshark, 1.1.2)
+AC_INIT(wireshark, 1.3.0)
 AM_INIT_AUTOMAKE([1.9 tar-ustar])
 
 AM_DISABLE_STATIC
@@ -241,16 +241,16 @@ AC_ARG_ENABLE(extra-gcc-checks,
                # 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
@@ -260,6 +260,7 @@ 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)
 
 #
 # If we're running gcc add '-D_U_="__attribute__((unused))"' to CFLAGS as well,
@@ -675,6 +676,43 @@ 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)
 
@@ -702,9 +740,6 @@ fi
 AC_SUBST(wireshark_bin)
 AC_SUBST(wireshark_man)
 
-rdps_bin="rdps\$(EXEEXT)"
-AC_SUBST(rdps_bin)
-
 
 # Enable/disable tshark
 
@@ -1293,12 +1328,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.
@@ -1533,6 +1621,9 @@ AC_SUBST(ENABLE_STATIC)
 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
@@ -1544,6 +1635,7 @@ AC_OUTPUT(
   asn1/ansi-tcap/Makefile
   asn1/camel/Makefile
   asn1/cdt/Makefile
+  asn1/charging_ase/Makefile
   asn1/cmip/Makefile
   asn1/cms/Makefile
   asn1/dap/Makefile
@@ -1569,6 +1661,7 @@ AC_OUTPUT(
   asn1/inap/Makefile
   asn1/ldap/Makefile
   asn1/logotype-cert-extn/Makefile
+  asn1/lte-rrc/Makefile
   asn1/mms/Makefile
   asn1/mpeg-audio/Makefile
   asn1/mpeg-pes/Makefile
@@ -1618,12 +1711,14 @@ AC_OUTPUT(
   asn1/x721/Makefile
   doc/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
@@ -1639,32 +1734,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
@@ -1672,6 +1754,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])
 
@@ -1696,12 +1779,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
@@ -1738,6 +1827,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"
@@ -1754,7 +1849,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 "                     python binding : $python_message"
 echo "                   Build rtp_player : $portaudio_message"
 echo "                        Use threads : $enable_threads"
 echo "             Build profile binaries : $enable_profile_build"
@@ -1770,3 +1866,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"