#
m4_define([version_major], [1])
-m4_define([version_minor], [9])
+m4_define([version_minor], [11])
m4_define([version_micro], [0])
m4_define([version_micro_extra], version_micro)
m4_append([version_micro_extra], [])
fi
fi
-AC_PATH_PROG(PYTHON, python)
-
AC_SUBST(PERL)
AC_SUBST(LEX)
AC_SUBST(POD2MAN)
AC_SUBST(POD2HTML)
-AC_SUBST(PYTHON)
-AC_SUBST(XSLTPROC)
AC_SUBST(XMLLINT)
#
AC_SYS_LARGEFILE
# GnuTLS
-# Version 3.0 switched from LGPLv2.1+ to LGPLv3+.
+# Version 3.0 switched from LGPLv2.1+ to LGPLv3+, then switched back to
+# LGPLv2.1+ in version 3.1.10
tls_message="no"
AC_ARG_WITH([gnutls],
AC_HELP_STRING( [--with-gnutls=@<:@yes/no@:>@],
[use GnuTLS library @<:@default=yes@:>@]),
with_gnutls="$withval", with_gnutls="yes")
if test "x$with_gnutls" = "xyes"; then
- PKG_CHECK_MODULES([LIBGNUTLS], [gnutls >= 1.2.0 gnutls < 3],
- [
- echo "GnuTLS found, enabling SSL decryption"
- AC_DEFINE(HAVE_LIBGNUTLS, 1, [Define to use GnuTLS library])
- tls_message="yes"
- ]
- , [
- echo "GnuTLS not found, disabling SSL decryption"
- tls_message="no"
- ]
+ have_license_compatible_gnutls="no"
+ PKG_CHECK_MODULES([LIBGNUTLS], [gnutls >= 3.1.10 ],
+ [ have_license_compatible_gnutls="yes" ], [ echo "GnuTLS >= 3.1.10 not found " ]
)
+
+ if test "x$have_license_compatible_gnutls" != "xyes"; then
+ PKG_CHECK_MODULES([LIBGNUTLS], [gnutls >= 1.2.0 gnutls < 3],
+ [ have_license_compatible_gnutls="yes" ] , [ echo "GnuTLS >= 1.2.0, < 3.0 not found " ]
+ )
+ fi
+
+ if test "x$have_license_compatible_gnutls" = "xyes"; then
+ echo "GnuTLS found, enabling SSL decryption"
+ AC_DEFINE(HAVE_LIBGNUTLS, 1, [Define to use GnuTLS library])
+ tls_message="yes"
+ else
+ echo "GnuTLS with compatible license not found, disabling SSL decryption"
+ tls_message="no"
+ fi
fi
# libgrypt
[use Qt instead of GTK+ @<:@default=no@:>@]),
with_qt="$withval", with_qt="no")
+AC_ARG_WITH(libnl,
+ AC_HELP_STRING([--with-libnl@<:@=VERSION@:>@],
+ [use libnl (force version VERSION, if supplied) @<:@default: yes, if available@:>@]),
+[
+ if test "x$withval" = "xno"
+ then
+ want_libnl=no
+ elif test "x$withval" = "xyes"
+ then
+ want_libnl=yes
+ libnl_version=any
+ elif test "x$withval" = "x1"
+ then
+ want_libnl=yes
+ libnl_version=1
+ elif test "x$withval" = "x2"
+ then
+ want_libnl=yes
+ libnl_version=2
+ elif test "x$withval" = "x3"
+ then
+ want_libnl=yes
+ libnl_version=3
+ else
+ AC_MSG_ERROR(["$withval" is not a valid argument to --with-libnl])
+ fi
+],[
+ #
+ # Use libnl if it's present, otherwise don't.
+ #
+ want_libnl=ifavailable
+ libnl_version=any
+])
+#
+# Libnl is Linux-specific.
+#
libnl_message="no"
-PKG_CHECK_MODULES(LIBNL3, [libnl-route-3.0 >= 3.0 libnl-genl-3.0] >= 3.0, [have_libnl3=yes], [have_libnl3=no])
-PKG_CHECK_MODULES(LIBNL2, libnl-2.0 >= 2.0, [have_libnl2=yes], [have_libnl2=no])
-PKG_CHECK_MODULES(LIBNL1, libnl-1 >= 1.0, [have_libnl1=yes], [have_libnl1=no])
-if (test "${have_libnl3}" = "yes"); then
- CFLAGS="$CFLAGS $LIBNL3_CFLAGS"
- LIBS="$LIBS $LIBNL3_LIBS"
- AC_DEFINE(HAVE_LIBNL, 1, [Enable libnl support])
- AC_DEFINE(HAVE_LIBNL3, 1, [libnl version 3])
- libnl_message="yes (v3)"
- enable_airpcap=no
-elif (test "${have_libnl2}" = "yes"); then
- CFLAGS="$CFLAGS $LIBNL2_CFLAGS"
- LIBS="$LIBS $LIBNL2_LIBS"
- AC_DEFINE(HAVE_LIBNL, 1, [Enable libnl support])
- AC_DEFINE(HAVE_LIBNL2, 1, [libnl version 2])
- libnl_message="yes (v2)"
- enable_airpcap=no
-elif (test "${have_libnl1}" = "yes"); then
- CFLAGS="$CFLAGS $LIBNL1_CFLAGS"
- LIBS="$LIBS $LIBNL1_LIBS"
- AC_DEFINE(HAVE_LIBNL, 1, [Enable libnl support])
- AC_DEFINE(HAVE_LIBNL1, 1, [libnl version 1])
- libnl_message="yes (v1)"
- enable_airpcap=no
-fi
-
-AC_MSG_CHECKING([if nl80211.h is new enough])
- AC_TRY_COMPILE([#include <linux/nl80211.h>],
- [int x = NL80211_FREQUENCY_ATTR_MAX_TX_POWER;
- x = NL80211_ATTR_SUPPORTED_IFTYPES;
- x = NL80211_ATTR_SUPPORTED_COMMANDS;
- x = NL80211_ATTR_WIPHY_FREQ;
- x = NL80211_CHAN_NO_HT;],
- [AC_MSG_RESULT(yes) AC_DEFINE(HAVE_NL80211, 1, [nl80211.h is new ehough])],
- [AC_MSG_RESULT(no)])
-
-AC_MSG_CHECKING([for NL80211_SET_CHANNEL])
- AC_TRY_COMPILE([#include <linux/nl80211.h>],
- [enum nl80211_commands x = NL80211_CMD_SET_CHANNEL;],
- [AC_MSG_RESULT(yes) AC_DEFINE(HAVE_NL80211_CMD_SET_CHANNEL, 1, [SET_CHANNEL is supported])],
- [AC_MSG_RESULT(no)])
+case "$host_os" in
+linux*)
+ AC_MSG_CHECKING(whether to use libnl for various network interface purposes)
+
+ if test x$want_libnl = "xno"; then
+ AC_MSG_RESULT(no)
+ else
+ AC_MSG_RESULT(yes)
+ #
+ # Test for specific libnl versions only if no version
+ # was specified by the user or if the version in question
+ # was requested by the user.
+ #
+ if test x$libnl_version = "xany" -o x$libnl_version = "x3"; then
+ PKG_CHECK_MODULES(LIBNL3, [libnl-route-3.0 >= 3.0 libnl-genl-3.0] >= 3.0, [have_libnl3=yes], [have_libnl3=no])
+ fi
+ if test x$libnl_version = "xany" -o x$libnl_version = "x2"; then
+ PKG_CHECK_MODULES(LIBNL2, libnl-2.0 >= 2.0, [have_libnl2=yes], [have_libnl2=no])
+ fi
+ if test x$libnl_version = "xany" -o x$libnl_version = "x1"; then
+ PKG_CHECK_MODULES(LIBNL1, libnl-1 >= 1.0, [have_libnl1=yes], [have_libnl1=no])
+ fi
+ if (test "${have_libnl3}" = "yes"); then
+ CFLAGS="$CFLAGS $LIBNL3_CFLAGS"
+ LIBS="$LIBS $LIBNL3_LIBS"
+ AC_DEFINE(HAVE_LIBNL, 1, [Enable libnl support])
+ AC_DEFINE(HAVE_LIBNL3, 1, [libnl version 3])
+ libnl_message="yes (v3)"
+ enable_airpcap=no
+ elif (test "${have_libnl2}" = "yes"); then
+ CFLAGS="$CFLAGS $LIBNL2_CFLAGS"
+ LIBS="$LIBS $LIBNL2_LIBS"
+ AC_DEFINE(HAVE_LIBNL, 1, [Enable libnl support])
+ AC_DEFINE(HAVE_LIBNL2, 1, [libnl version 2])
+ libnl_message="yes (v2)"
+ enable_airpcap=no
+ elif (test "${have_libnl1}" = "yes"); then
+ CFLAGS="$CFLAGS $LIBNL1_CFLAGS"
+ LIBS="$LIBS $LIBNL1_LIBS"
+ AC_DEFINE(HAVE_LIBNL, 1, [Enable libnl support])
+ AC_DEFINE(HAVE_LIBNL1, 1, [libnl version 1])
+ libnl_message="yes (v1)"
+ enable_airpcap=no
+ else
+ if test x$want_libnl = "xyes"; then
+ case "$libnl_version" in
+
+ any)
+ AC_MSG_ERROR("I couldn't find libnl even though you manually enabled it.")
+ ;;
+ *)
+ AC_MSG_ERROR("I couldn't find libnl version $libnl_version even though you manually enabled it.")
+ ;;
+ esac
+ fi
+ fi
+ fi
+
+ AC_MSG_CHECKING([if nl80211.h is new enough])
+ AC_TRY_COMPILE([#include <linux/nl80211.h>],
+ [int x = NL80211_FREQUENCY_ATTR_MAX_TX_POWER;
+ x = NL80211_ATTR_SUPPORTED_IFTYPES;
+ x = NL80211_ATTR_SUPPORTED_COMMANDS;
+ x = NL80211_ATTR_WIPHY_FREQ;
+ x = NL80211_CHAN_NO_HT;],
+ [AC_MSG_RESULT(yes) AC_DEFINE(HAVE_NL80211, 1, [nl80211.h is new enough])],
+ [AC_MSG_RESULT(no)])
+
+ AC_MSG_CHECKING([for NL80211_SET_CHANNEL])
+ AC_TRY_COMPILE([#include <linux/nl80211.h>],
+ [enum nl80211_commands x = NL80211_CMD_SET_CHANNEL;],
+ [AC_MSG_RESULT(yes) AC_DEFINE(HAVE_NL80211_CMD_SET_CHANNEL, 1, [SET_CHANNEL is supported])],
+ [AC_MSG_RESULT(no)])
+ ;;
+
+*)
+ if test x$want_libnl != "xno" -a x$want_libnl != "xifavailable"; then
+ AC_MSG_WARN([libnl is Linux-specific, ignoring --with-libnl])
+ fi
+esac
AC_ARG_WITH([gtk3],
AC_HELP_STRING( [--with-gtk3=@<:@yes/no@:>@],
# FIXME: currently the path argument to with-libsmi is being ignored
AX_LIBSMI
-# Check for xsltproc
-AC_PATH_PROG(XSLTPROC, xsltproc)
-AC_CHECK_PROG(HAVE_XSLTPROC, xsltproc, "yes", "no")
-AM_CONDITIONAL(HAVE_XSLTPROC, test x$HAVE_XSLTPROC = xyes)
+#
+# Program paths
+#
-# Check for xmllint
-AC_PATH_PROG(XMLLINT, xmllint)
-AC_CHECK_PROG(HAVE_XMLLINT, xmllint, "yes", "no")
-AM_CONDITIONAL(HAVE_XMLLINT, test x$HAVE_XMLLINT = xyes)
+# Check for a2x (convert asciidoc to another format)
+AC_PATH_PROG(A2X, a2x)
+AC_CHECK_PROG(HAVE_A2X, a2x, "yes", "no")
+AM_CONDITIONAL(HAVE_A2X, test x$HAVE_A2X = xyes)
-# Check for fop (translate .fo to e.g. pdf)
-AC_PATH_PROG(FOP, fop)
-AC_CHECK_PROG(HAVE_FOP, fop, "yes", "no")
-AM_CONDITIONAL(HAVE_FOP, test x$HAVE_FOP = xyes)
+AC_PATH_PROG(DESKTOP_FILE_INSTALL, desktop-file-install)
-#
-# Look for something to convert HTML to text (for docbook/)
-#
+# Want to control a tape drive? Use mt. Want to convert HTML to text?
+# Uhhhhh... elinks? lynx? w3m? pandoc? html2text?
AC_PATH_PROG(ELINKS, elinks)
AC_CHECK_PROG(HAVE_ELINKS, elinks, "yes", "no")
AM_CONDITIONAL(HAVE_ELINKS, test x$HAVE_ELINKS = xyes)
-## links: Fails as used in docbook/Makefile.am
-## (Rather than fixing things we'll just disable the use of links).
-##AC_PATH_PROG(LINKS, links)
-##AC_CHECK_PROG(HAVE_LINKS, links, "yes", "no")
-##AM_CONDITIONAL(HAVE_LINKS, test x$HAVE_LINKS = xyes)
+# Check for fop (translate .fo to e.g. pdf)
+AC_PATH_PROG(FOP, fop)
+AC_CHECK_PROG(HAVE_FOP, fop, "yes", "no")
+AM_CONDITIONAL(HAVE_FOP, test x$HAVE_FOP = xyes)
+# Check for lynx (html -> text)
AC_PATH_PROG(LYNX, lynx)
AC_CHECK_PROG(HAVE_LYNX, lynx, "yes", "no")
AM_CONDITIONAL(HAVE_LYNX, test x$HAVE_LYNX = xyes)
+AC_PATH_PROG(PYTHON, python)
+
+# Check for w3m (html -> text)
+AC_PATH_PROG(W3M, w3m)
+AC_CHECK_PROG(HAVE_W3M, w3m, "yes", "no")
+AM_CONDITIONAL(HAVE_W3M, test x$HAVE_W3M = xyes)
+
+# Check for xmllint
+AC_PATH_PROG(XMLLINT, xmllint)
+AC_CHECK_PROG(HAVE_XMLLINT, xmllint, "yes", "no")
+AM_CONDITIONAL(HAVE_XMLLINT, test x$HAVE_XMLLINT = xyes)
+
+# Check for xsltproc
+AC_PATH_PROG(XSLTPROC, xsltproc)
+AC_CHECK_PROG(HAVE_XSLTPROC, xsltproc, "yes", "no")
+AM_CONDITIONAL(HAVE_XSLTPROC, test x$HAVE_XSLTPROC = xyes)
-# Check for hhc (html help compiler)
-AC_PATH_PROG(HHC, hhc.exe)
-AC_CHECK_PROG(HAVE_HHC, hhc.exe, "yes", "no")
-AM_CONDITIONAL(HAVE_HHC, test x$HAVE_HHC = xyes)
# Check for packaging utilities
# For now, we check to see if the various packaging utilites are in our
#
AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wunsafe-loop-optimizations)
#
- # A ton of code blocks this one - it warns about
- # implict conversions of void * to/from arbitrary
- # pointer types, for example.
- #
- AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wc++-compat, C)
- #
# All the registration functions block these for now.
#
AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wmissing-prototypes)
AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wno-overlength-strings)
AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wwrite-strings)
AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wno-long-long)
+AC_WIRESHARK_GCC_CFLAGS_CHECK(-Wc++-compat, C)
#
# XXX - OK for C++?
AC_WIRESHARK_GCC_CFLAGS_CHECK(-fexcess-precision=fast)
fi
+CFLAGS_before_fvhidden=$CFLAGS
+AC_WIRESHARK_GCC_CFLAGS_CHECK(-fvisibility=hidden)
+if test "x$CLFAGS" = "x$CFLAGS_before_fvhidden"
+then
+ # TODO add other ways of hiding symbols
+ AC_MSG_WARN(Compiler will export all symbols from shared libraries)
+fi
+
AC_WIRESHARK_LDFLAGS_CHECK([-Wl,--as-needed])
###AC_WIRESHARK_LDFLAGS_CHECK([-Wl,-M])
###AC_WIRESHARK_LDFLAGS_CHECK([-Wl,--cref])
AC_SUBST(SYSTEMCONFIGURATION_FRAMEWORKS)
AC_SUBST(COREFOUNDATION_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".
- #
- 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
# 3.2.0: 25 Sep 2011
# 3.4.0: 26 Mar 2012
# 3.6.0: 24 Sep 2012
+# 3.8.0: 25 Mar 2013
if test "x$enable_wireshark" = "xyes"; then
if test "x$with_qt" = "xyes"; then
# 2.30.0: 27 Sep 2011
# 2.32.0: 24 Mar 2012
# 2.34.0: 24 Sep 2012
+# 2.36.0: 25 Mar 2013
have_wireshark_cxx="false"
if test "$have_gtk" = "no" ; then
# Don't use GLIB_CFLAGS
AM_PATH_GLIB_2_0($GLIB_MIN_VERSION, , AC_MSG_ERROR(GLib $GLIB_MIN_VERSION or later distribution not found.), gthread gmodule)
+ CPPFLAGS="-DGDK_PIXBUF_DISABLE_DEPRECATED $CPPFLAGS"
+ CPPFLAGS="-DGDK_DISABLE_DEPRECATED $CPPFLAGS"
+ CPPFLAGS="-DGTK_DISABLE_DEPRECATED $CPPFLAGS"
CPPFLAGS="-DGTK_DISABLE_SINGLE_INCLUDES $CPPFLAGS"
- ## 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
- CPPFLAGS="-DGTK_DISABLE_DEPRECATED $CPPFLAGS"
- fi
- # CPPFLAGS="-DGDK_DISABLE_DEPRECATED $CPPFLAGS"
- 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
+ if test ! \( $gtk_config_major_version -eq 2 -a $gtk_config_minor_version -lt 20 \) ; then
+ # Enable GSEAL when building with GTK > 2.20
# (Versions prior to 2.22 lacked some necessary accessors.)
CPPFLAGS="-DGSEAL_ENABLE $CPPFLAGS"
fi
AC_MSG_RESULT($ac_cv_dladdr_finds_executable_path)
fi
+#
+# Check whether GLib's printf supports thousands grouping. (This might
+# be different from the system's printf since GLib can optionally use
+# its own printf implementation.)
+#
+AC_MSG_CHECKING(whether GLib supports POSIX/XSI thousands grouping)
+ac_save_CFLAGS="$CFLAGS"
+ac_save_LIBS="$LIBS"
+CFLAGS="$CFLAGS $GLIB_CFLAGS"
+LIBS="$GLIB_LIBS $LIBS"
+AC_TRY_RUN([
+#include <glib.h>
+#include <locale.h>
+#include <stdio.h>
+#include <string.h>
+
+int
+main ()
+{
+ gchar *str;
+ setlocale(LC_ALL, "en_US.UTF-8");
+ str = g_strdup_printf("%'u", 123456);
+ return (strcmp (str, "123,456") != 0);
+}
+], ac_cv_glib_supports_printf_grouping=yes, ac_cv_glib_supports_printf_grouping=no,
+ [echo $ac_n "cross compiling; playing it safe... $ac_c"
+ ac_cv_glib_supports_printf_grouping=no])
+CFLAGS="$ac_save_CFLAGS"
+LIBS="$ac_save_LIBS"
+if test "$ac_cv_glib_supports_printf_grouping" = yes ; then
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_GLIB_PRINTF_GROUPING, 1, [Define if your printf() function supports thousands grouping.])
+else
+ AC_MSG_RESULT(no)
+fi
+
if test "x$have_gtk" = "xyes"
then
#
AM_CONDITIONAL(HAVE_LIBPY, test x$want_python != xno)
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])
-
#
# Define WS_MSVC_NORETURN appropriately for declarations of routines that
# never return (just like Charlie on the MTA).