From Ivan Lawrow: Added IEEE 802.15.4-2003 AES-CCM security modes
[obnox/wireshark/wip.git] / configure.in
index 3c880361ccc2810d39daea79d373c9210aa7269a..70e693d27e27ba81e4d016a105e0e612897d3ce1 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
@@ -370,7 +370,7 @@ AC_WIRESHARK_GCC_CFLAGS_CHECK(-Warray-bounds)
 AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wcast-align)
 AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wformat-security)
 AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wold-style-definition)
-
+AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wno-error=unused-but-set-variable)    ##  for now
 #
 # Use the faster pre gcc 4.5 floating point precision if available;
 # clang doesn't error out on -f options that it doesn't know about,
@@ -404,6 +404,13 @@ else
   CFLAGS="-D_U_=\"\" $CFLAGS"
 fi
 
+# If we're running GCC or CLang, always use FORTIFY_SOURCE=2
+# See: http://gcc.gnu.org/ml/gcc-patches/2004-09/msg02055.html
+# Note: FORTIFY_SOURCE is only effective for gcc -O2 (and -O1 ?)
+if test "x$GCC" = "xyes" -o "x$CC" = "xclang" ; then
+  CFLAGS="-D_FORTIFY_SOURCE=2 $CFLAGS"
+fi
+
 #
 # If the compiler supports GCC-style flags, enable a barrier "stop on
 # warning".
@@ -656,7 +663,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"
@@ -724,28 +731,12 @@ if test "$HAVE_GNU_SED" = no ; then
        esac
 fi
 
-# Enable/disable tshark
+# Enable/disable wireshark
 
 AC_ARG_ENABLE(wireshark,
   AC_HELP_STRING( [--enable-wireshark],
                   [build GTK+-based Wireshark @<:@default=yes, if GTK+ available@:>@]),
     enable_wireshark=$enableval,enable_wireshark=yes)
-if test x$enable_wireshark = xyes; then
-       CFLAGS="-DGTK_DISABLE_SINGLE_INCLUDES $CFLAGS"
-       if test "x$with_gtk3" != "xyes"; then
-               # Enable GSEAL when not building with GTK3
-               CFLAGS="-DGSEAL_ENABLE $CFLAGS"
-       fi
-fi
-
-AC_ARG_ENABLE(ui-manager,
-  AC_HELP_STRING( [--enable-ui-manager],
-                  [use ui-manager in Wireshark (experimental) @<:@default=no@:>@]),
-    enable_uimanager=$enableval,enable_uimanager=no)
-if test x$enable_uimanager = xyes; then
-       AC_DEFINE(MAIN_MENU_USE_UIMANAGER, 1, [Use GTK ui-manager])
-       CFLAGS="-DGTK_DISABLE_DEPRECATED $CFLAGS"
-fi
 
 AC_ARG_ENABLE(packet-editor,
   AC_HELP_STRING( [--enable-packet-editor],
@@ -755,14 +746,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@:>@]),
@@ -875,8 +858,25 @@ else
         wireshark_SUBDIRS="codecs 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"
+       # 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
+               # (Versions prior to 2.22 lacked some necessary accessors.)
+               CFLAGS="-DGSEAL_ENABLE $CFLAGS"
+       fi
 fi
 
+# Error out if a glib header other than a "top level" header
+#  (glib.h, glib-object.h, gio.h) or certain other headers( e.g.,gmodule.h)
+#  is used.
+CFLAGS="-DG_DISABLE_SINGLE_INCLUDES $CFLAGS"
+
+# Error out on the usage of deprecated glib functions
+CFLAGS="-DG_DISABLE_DEPRECATED $CFLAGS"
+
 #
 # Check whether GLib modules are supported, to determine whether we
 # can support plugins.
@@ -1078,23 +1078,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
 
@@ -1301,38 +1284,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)
 
@@ -1737,7 +1688,7 @@ AC_PROG_GCC_TRADITIONAL
 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.])
+   AC_DEFINE(HAVE_GETOPT, 1, [Define to 1 if you have the getopt function.])
   ],
   GETOPT_LO="wsgetopt.lo"
 )
@@ -1923,6 +1874,7 @@ AC_OUTPUT(
   asn1/cmp/Makefile
   asn1/crmf/Makefile
   asn1/cms/Makefile
+  asn1/credssp/Makefile
   asn1/dap/Makefile
   asn1/disp/Makefile
   asn1/dop/Makefile
@@ -1949,8 +1901,11 @@ 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/mms/Makefile
   asn1/mpeg-audio/Makefile
@@ -1985,10 +1940,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
@@ -2004,7 +1961,6 @@ AC_OUTPUT(
   doc/Makefile
   docbook/Makefile
   epan/Makefile
-  epan/crc/Makefile
   epan/crypt/Makefile
   epan/doxygen.cfg
   epan/dfilter/Makefile
@@ -2044,7 +2000,6 @@ AC_OUTPUT(
   plugins/wimax/Makefile
   plugins/wimaxasncp/Makefile
   tools/Makefile
-  tools/idl2wrs.sh
   tools/lemon/Makefile
   wiretap/Makefile
   wsutil/Makefile
@@ -2080,12 +2035,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
@@ -2153,7 +2102,6 @@ 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"
@@ -2166,11 +2114,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"