Revisit https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3161
[obnox/wireshark/wip.git] / configure.in
index 804538fbd2def54e7c8cb05b18cfc2d346b29693..85f49c3997fff768d4fcfb6d31b97ba2ec60e469 100644 (file)
@@ -2,7 +2,7 @@
 #
 AC_PREREQ(2.60)
 
-AC_INIT(wireshark, 1.7.0)
+AC_INIT(wireshark, 1.7.1)
 
 dnl Check for CPU / vendor / OS
 dnl The user is encouraged to use either `AC_CANONICAL_BUILD', or
@@ -224,7 +224,7 @@ 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")
+  with_gtk3="$withval", with_gtk3="no")
 
 
 # libsmi
@@ -327,6 +327,7 @@ AC_ARG_ENABLE(extra-gcc-checks,
                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(-Wdiv-by-zero)
                AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wformat-security)
@@ -663,7 +664,7 @@ if test "x$ac_cv_enable_usr_local" = "xyes" ; then
                #
                # 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")
+               # as various packages we use ("libpcap", "zlib", "adns")
                # may have been installed under "/usr/local/include".
                #
                CFLAGS="$CFLAGS -I/usr/local/include"
@@ -731,7 +732,7 @@ if test "$HAVE_GNU_SED" = no ; then
        esac
 fi
 
-# Enable/disable tshark
+# Enable/disable wireshark
 
 AC_ARG_ENABLE(wireshark,
   AC_HELP_STRING( [--enable-wireshark],
@@ -746,14 +747,6 @@ 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=yes@:>@]),
-    enable_threads=$enableval,enable_threads=yes)
-if test x$enable_threads = xyes; then
-       AC_DEFINE(USE_THREADS, 1, [Support for threads])
-fi
-
 AC_ARG_ENABLE(profile-build,
   AC_HELP_STRING( [--enable-profile-build],
                  [build profile-ready binaries @<:@default=no@:>@]),
@@ -800,32 +793,28 @@ AC_DEFINE_UNQUOTED(DOC_DIR, "$docdir", [Directory for docs])
 # 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)
+       if test "x$with_gtk3" = "xyes"; then
+               AM_PATH_GTK_3_0(3.0.0,
+               [
+                       CFLAGS="$CFLAGS $GTK_CFLAGS"
+                       CXXFLAGS="$CXXFLAGS $GTK_CFLAGS"
+                       have_gtk=yes
+                       AC_DEFINE(HAVE_GTK, 1,
+                           [Define to 1 if compiling with GTK])
+               ], have_gtk=no)
 
+       else
+               AM_PATH_GTK_2_0(2.12.0,
+               [
+                       CFLAGS="$CFLAGS $GTK_CFLAGS"
+                       CXXFLAGS="$CXXFLAGS $GTK_CFLAGS"
+                       have_gtk=yes
+                       AC_DEFINE(HAVE_GTK, 1,
+                           [Define to 1 if compiling with GTK])
+               ], have_gtk=no)
+       fi
 else
-       AM_PATH_GTK_2_0(2.12.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
-
-AC_ARG_ENABLE(ui-manager,
-  AC_HELP_STRING( [--enable-ui-manager],
-                  [use ui-manager in Wireshark (experimental) @<:@default=yes@:>@]),
-    enable_uimanager=$enableval,enable_uimanager=yes)
-if test x$enable_uimanager = xyes -o x$with_gtk3 = xyes; then
-       AC_DEFINE(MAIN_MENU_USE_UIMANAGER, 1, [Use GTK ui-manager])
+       have_gtk=no
 fi
 
 # GLib checks; we require GLib 2.14 or later, and require gmodule
@@ -841,7 +830,7 @@ fi
 # We don't add $GLIB_LIBS to LIBS, because we don't want to force all
 # programs to be built with GLib.
 #
-if test "$GTK_OK" = "no" ; then
+if test "$have_gtk" = "no" ; then
        #
        # We don't have GTK+.
        # If they didn't explicitly say "--disable-wireshark", fail (so
@@ -871,12 +860,16 @@ else
        #
        wireshark_bin="wireshark\$(EXEEXT)"
        wireshark_man="wireshark.1"
-        wireshark_SUBDIRS="codecs gtk"
+        wireshark_SUBDIRS="codecs ui/gtk"
        # Don't use GLIB_CFLAGS
        AM_PATH_GLIB_2_0(2.14.0, , AC_MSG_ERROR(GLib 2.14 or later distribution not found.), gthread gmodule)
 
        CFLAGS="-DGTK_DISABLE_SINGLE_INCLUDES $CFLAGS"
-       CFLAGS="-DGTK_DISABLE_DEPRECATED $CFLAGS"
+       ## Define GTK_DISABLE_DEPRECATED only if GTK lt 3.2
+       ## GTK 3.2 deprecates GtkVBox & GtkHBox which are currently used extensively by Wireshark.
+       if test $gtk_config_major_version -eq 2 -o $gtk_config_minor_version -lt 2; then
+               CFLAGS="-DGTK_DISABLE_DEPRECATED $CFLAGS"
+       fi
        # CFLAGS="-DGDK_DISABLE_DEPRECATED $CFLAGS"
        if test $gtk_config_major_version -eq 2 -a $gtk_config_minor_version -ge 20; then
                # Enable GSEAL when building with GTK > 2.20 and < 3.0
@@ -966,7 +959,7 @@ main(void)
        AC_MSG_RESULT($ac_cv_dladdr_finds_executable_path)
 fi
 
-if test "x$no_gtk" != "xyes"
+if test "x$have_gtk" = "xyes"
 then
     #
     # We have GTK+; do we want the OS X integration functions and,
@@ -1094,23 +1087,6 @@ fi
 AC_SUBST(text2pcap_bin)
 AC_SUBST(text2pcap_man)
 
-# Enable/disable idl2wrs
-
-AC_ARG_ENABLE(idl2wrs,
-  AC_HELP_STRING( [--enable-idl2wrs],
-                  [build idl2wrs @<:@default=yes@:>@]),
-    enable_idl2wrs=$enableval,enable_idl2wrs=yes)
-
-if test "x$enable_idl2wrs" = "xyes" ; then
-       idl2wrs_bin="idl2wrs"
-       idl2wrs_man="idl2wrs.1"
-else
-       idl2wrs_bin=""
-       idl2wrs_man=""
-fi
-AC_SUBST(idl2wrs_bin)
-AC_SUBST(idl2wrs_man)
-
 
 # Enable/disable dftest
 
@@ -1317,38 +1293,6 @@ else
        fi
 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. Not needed if you have GLib 2.14 or later @<:@default=no@:>@]),
-[
-       if test $withval = no
-       then
-               want_pcre=no
-       elif test $withval = yes
-       then
-               want_pcre=yes
-       else
-               want_pcre=yes
-               pcre_dir=$withval
-       fi
-],[
-       want_pcre=no
-       pcre_dir=
-])
-if test "x$want_pcre" = "xno" ; then
-        AC_MSG_RESULT(no)
-else
-        AC_MSG_RESULT(yes)
-        AC_WIRESHARK_LIBPCRE_CHECK
-       if test "x$want_pcre" = "xno" ; then
-               AC_MSG_RESULT(libpcre not found)
-       fi
-fi
-
-
 dnl Lua check
 AC_MSG_CHECKING(whether to use liblua for the Lua scripting plugin)
 
@@ -1676,7 +1620,7 @@ AC_MSG_CHECKING(whether to use the Python interpreter for scripting)
 
 AC_ARG_WITH(python,
     AC_HELP_STRING( [--with-python@<:@=DIR@:>@],
-                    [use Python interpreter (installed in DIR, if supplied) @<:@default=yes, if available@:>@ (EXPERIMENTAL)]),
+                    [use Python interpreter (installed in DIR, if supplied) @<:@default=no@:>@ (EXPERIMENTAL)]),
 [
        pythondir='${libdir}/wireshark/python/${VERSION}'
        if test "x$withval" = "xno"
@@ -1690,12 +1634,11 @@ AC_ARG_WITH(python,
                pythondir="$withval"
        fi
 ],[
+       # By default (user didn't explicitly enable Python), don't enable
+       # Python support.
        #
-       # Use the embeddable Python interpreter if it's present,
-       # otherwise don't.
-       #
-       want_pythin=ifavailable
-       pythondir='${libdir}/wireshark/python/${VERSION}'
+       want_python=no
+       #pythondir='${libdir}/wireshark/python/${VERSION}'
 ])
 if test "x$want_python" = "xno" ; then
         AC_MSG_RESULT(no)
@@ -1932,6 +1875,7 @@ AC_OUTPUT(
   asn1/acse/Makefile
   asn1/ansi_map/Makefile
   asn1/ansi_tcap/Makefile
+  asn1/c1222/Makefile
   asn1/camel/Makefile
   asn1/cdt/Makefile
   asn1/charging_ase/Makefile
@@ -1939,6 +1883,7 @@ AC_OUTPUT(
   asn1/cmp/Makefile
   asn1/crmf/Makefile
   asn1/cms/Makefile
+  asn1/credssp/Makefile
   asn1/dap/Makefile
   asn1/disp/Makefile
   asn1/dop/Makefile
@@ -1965,9 +1910,13 @@ AC_OUTPUT(
   asn1/idmp/Makefile
   asn1/inap/Makefile
   asn1/kerberos/Makefile
+  asn1/lcsap/Makefile
   asn1/ldap/Makefile
   asn1/logotypecertextn/Makefile
+  asn1/lpp/Makefile
+  asn1/lppa/Makefile
   asn1/lte-rrc/Makefile
+  asn1/m3ap/Makefile
   asn1/mms/Makefile
   asn1/mpeg-audio/Makefile
   asn1/mpeg-pes/Makefile
@@ -2001,10 +1950,12 @@ AC_OUTPUT(
   asn1/rua/Makefile
   asn1/s1ap/Makefile
   asn1/sabp/Makefile
+  asn1/sbc-ap/Makefile
   asn1/smrse/Makefile
   asn1/snmp/Makefile
   asn1/spnego/Makefile
   asn1/sv/Makefile
+  asn1/t124/Makefile
   asn1/t125/Makefile
   asn1/t38/Makefile
   asn1/tcap/Makefile
@@ -2020,7 +1971,6 @@ AC_OUTPUT(
   doc/Makefile
   docbook/Makefile
   epan/Makefile
-  epan/crc/Makefile
   epan/crypt/Makefile
   epan/doxygen.cfg
   epan/dfilter/Makefile
@@ -2031,8 +1981,11 @@ AC_OUTPUT(
   epan/wslua/Makefile
   epan/wspython/Makefile
   codecs/Makefile
-  gtk/Makefile
-  gtk/doxygen.cfg
+  ui/Makefile
+  ui/doxygen.cfg
+  ui/gtk/Makefile
+  ui/gtk/doxygen.cfg
+  ui/cli/Makefile
   help/Makefile
   packaging/Makefile
   packaging/macosx/Info.plist
@@ -2060,7 +2013,6 @@ AC_OUTPUT(
   plugins/wimax/Makefile
   plugins/wimaxasncp/Makefile
   tools/Makefile
-  tools/idl2wrs.sh
   tools/lemon/Makefile
   wiretap/Makefile
   wsutil/Makefile
@@ -2071,13 +2023,25 @@ dnl AC_CONFIG_FILES([tools/setuid-root.pl], [chmod +x tools/setuid-root.pl])
 
 # Pretty messages
 
+if test "x$have_gtk" = "xyes"; then
+       if test "x$with_gtk3" = "xyes"; then
+               gui_lib_message=" (with GTK+ 3"
+       else
+               gui_lib_message=" (with GTK+ 2"
+       fi
+       if test "x$have_ige_mac" = "xyes"; then
+               gui_lib_message="$gui_lib_message and Mac OS X integration)"
+       else
+               gui_lib_message="$gui_lib_message)"
+       fi
+fi
+
 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
@@ -2096,12 +2060,6 @@ else
        zlib_message="yes"
 fi
 
-if test "x$want_pcre" = "xno" ; then
-       pcre_message="no (using GRegex instead)"
-else
-       pcre_message="yes"
-fi
-
 if test "x$want_lua" = "xyes" ; then
        lua_message="yes"
 else
@@ -2162,14 +2120,13 @@ fi
 
 echo ""
 echo "The Wireshark package has been configured with the following options."
-echo "                    Build wireshark : $enable_wireshark"
+echo "                    Build wireshark : $enable_wireshark""$gui_lib_message"
 echo "                       Build tshark : $enable_tshark"
 echo "                     Build capinfos : $enable_capinfos"
 echo "                      Build editcap : $enable_editcap"
 echo "                      Build dumpcap : $enable_dumpcap"
 echo "                     Build mergecap : $enable_mergecap"
 echo "                    Build text2pcap : $enable_text2pcap"
-echo "                      Build idl2wrs : $enable_idl2wrs"
 echo "                      Build randpkt : $enable_randpkt"
 echo "                       Build dftest : $enable_dftest"
 echo "                     Build rawshark : $enable_rawshark"
@@ -2182,11 +2139,9 @@ echo "                        Use plugins : $have_plugins"
 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"
 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"