Minor cleanup mostly related to proto_reg_handoff
[obnox/wireshark/wip.git] / configure.in
index d2838b456139a3bb06c3bee6564806812cd7e1b0..7d37b20c8fe155483001f156788e35263239876c 100644 (file)
@@ -12,13 +12,14 @@ dnl AC_CANONICAL_HOST
 dnl AC_CANONICAL_BUILD
 dnl AC_CANONICAL_TARGET
 
-AC_INIT(wireshark, 1.1.1)
+AC_INIT(wireshark, 1.1.2)
 AM_INIT_AUTOMAKE([1.9 tar-ustar])
 
 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], )
@@ -259,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,
@@ -628,7 +630,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)"
@@ -674,6 +676,30 @@ else
   have_plugins=no
 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)
 
@@ -1243,6 +1269,9 @@ else
 fi
 AC_SUBST(C_ARES_LIBS)
 
+dnl ADNS Check
+ADNS_LIBS=''
+AC_MSG_CHECKING(whether to use the GNU ADNS library if available)
 
 AC_ARG_WITH(adns,
   AC_HELP_STRING( [--with-adns@<:@=DIR@:>@],
@@ -1265,6 +1294,31 @@ 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)
+
 #
 # Define WS_VAR_IMPORT appropriately for declarations of external
 # variables exported from dynamically-linked libraries.
@@ -1343,17 +1397,23 @@ fi
 AC_SUBST(MKSTEMP_C)
 AC_SUBST(MKSTEMP_O)
 
-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)
@@ -1499,6 +1559,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
@@ -1519,6 +1582,7 @@ AC_OUTPUT(
   asn1/ess/Makefile
   asn1/ftam/Makefile
   asn1/gnm/Makefile
+  asn1/goose/Makefile
   asn1/gsmmap/Makefile
   asn1/h225/Makefile
   asn1/h235/Makefile
@@ -1637,6 +1701,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])
 
@@ -1703,6 +1768,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"
@@ -1735,3 +1806,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"