#
# Define variables for the components of the Wireshark version number.
#
-m4_define([version_major], [1])
-m4_define([version_minor], [99])
-m4_define([version_micro], [8])
+m4_define([version_major], [2])
+m4_define([version_minor], [1])
+m4_define([version_micro], [0])
m4_define([version_micro_extra], version_micro)
m4_append([version_micro_extra], [])
#
# Checks for programs used in the main build process.
#
-AC_PROG_CC
+AC_PROG_CC_STDC
+if test "$ac_cv_prog_cc_stdc" == "no"
+then
+ AC_MSG_ERROR([The C compiler does not support standard C])
+fi
AM_PROG_CC_C_O
AC_PROG_CXX
AC_PROG_CPP
AC_PATH_PROG(PERL, perl)
# Check for Python.
-AC_PATH_PROGS(PYTHON, python, python3)
+AC_PATH_PROGS(PYTHON, python python3)
if test ! -z "$PYTHON"; then
#
# OK, we found Python; is it Python 2.5 or later?
)
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 " ]
+ PKG_CHECK_MODULES([LIBGNUTLS], [gnutls >= 2.12.0 gnutls < 3],
+ [ have_license_compatible_gnutls="yes" ] , [ echo "GnuTLS >= 2.12.0, < 3.0 not found " ]
)
fi
[ with_gcrypt="$withval"; want_gcrypt="yes" ], with_gcrypt="yes")
if test "x$with_gcrypt" = "xyes"; then
- AM_PATH_LIBGCRYPT(1.1.92,
+ AM_PATH_LIBGCRYPT(1.4.2,
[
- echo "libgcrypt found, enabling ipsec decryption"
+ echo "libgcrypt found, enabling decryption for ipsec, ssl, etc."
AC_DEFINE(HAVE_LIBGCRYPT, 1, [Define to use libgcrypt])
gcrypt_message="yes"
]
if test x$libgcrypt_config_prefix != x ; then
AC_MSG_ERROR([[libgcrypt not found; install libgcrypt-devel package for your system]])
else
- echo "libgcrypt not found, disabling ipsec decryption"
+ echo "libgcrypt not found, disabling decryption for ipsec, ssl, etc."
gcrypt_message="no"
fi
# Debian
AC_CHECK_PROG(HAVE_DPKG_BUILDPACKAGE, dpkg-buildpackage, "yes", "no")
-# Mac OS X
+# OS X
AC_CHECK_PROG(HAVE_XCODEBUILD, xcodebuild, "yes", "no")
AC_CHECK_PROG(HAVE_HDIUTIL, hdiutil, "yes", "no")
AC_CHECK_PROG(HAVE_BLESS, bless, "yes", "no")
# The following are for C and C++
#
AC_WIRESHARK_COMPILER_FLAGS_CHECK(-Wpedantic)
+ AC_WIRESHARK_COMPILER_FLAGS_CHECK(-Wno-variadic-macros)
#
# Various code blocks this one.
#
case "$host_os" in
hpux*)
#
- # HP's ANSI C compiler; flags suggested by Jost Martin.
- # "-Ae" for ANSI C plus extensions such as "long long".
- # "+O2", for optimization. XXX - works with "-g"?
+ # AC_PROG_CC_STDC should already have added whatever
+ # flags are necessary for ISO C - C99 if available,
+ # otherwise C89 - with extensions.
+ #
+ # Add +O2, for optimization, as suggested by Jost Martin.
+ # XXX - works with "-g"?
#
- # HP's ANSI C++ compiler doesn't support "-Ae", but
- # does support "+O2", at least according to the
- # documentation I can find online.
+ # +O2 is supported both by the C and C++ compiler.
#
- CFLAGS="-Ae +O2 $CFLAGS"
+ CFLAGS="+O2 $CFLAGS"
if test "$CC" = "$CC_FOR_BUILD"; then
#
# We're building the build tools with the same
CFLAGS_FOR_BUILD="-Ae +O2 $CFLAGS"
fi
CXXFLAGS="+O2 $CFLAGS"
- AC_MSG_RESULT(HP ANSI C compiler - added -Ae +O2)
+ AC_MSG_RESULT(HP C/C++ compiler - added +O2)
;;
solaris*)
#
# with a static version installed in /usr/local/lib rather than
# the system version in /usr/lib).
#
- # Also add -Wl,-rpath,@executable_path/../lib and
- # -Wl,-rpath,/usr/local/lib, so that, if we build an app
- # bundle, we can tweak all the executable images, shared
- # libraries, and plugins in the bundle to look for non-system
- # libraries in the rpath, rather than having a script tweak
- # DYLD_LIBRARY_PATH.
- #
- LDFLAGS="-Wl,-headerpad_max_install_names -Wl,-search_paths_first -Wl,-rpath,@executable_path/../lib -Wl,-rpath,@executable_path/../Frameworks -Wl,-rpath,/usr/local/lib $LDFLAGS"
- AC_MSG_RESULT([Apple linker - added -Wl,-single_module to shared library linker flags and -Wl,-headerpad_max_install_names -Wl,-search_paths_first and rpaths to all linker flags])
+ LDFLAGS="-Wl,-headerpad_max_install_names -Wl,-search_paths_first $LDFLAGS"
+ AC_MSG_RESULT([Apple linker - added -Wl,-single_module to shared library linker flags and -Wl,-headerpad_max_install_names -Wl,-search_paths_first and -Wl,-headerpad_max_install_names to all linker flags])
;;
cygwin*)
#
AC_SUBST(GTK2_MIN_VERSION)
GTK3_MIN_VERSION=3.0.0
AC_SUBST(GTK3_MIN_VERSION)
-QT_MIN_VERSION=4.6.0
+QT_MIN_VERSION=4.7.0
AC_SUBST(QT_MIN_VERSION)
# GTK+ and Qt checks; we require GTK+ $GTK2_MIN_VERSION or later or
# GTK3_MIN_VERSION or later or Qt $QT_MIN_VERSION or later.
# force all programs to be built with GTK+ or Qt.
#
# Release dates for GTK+ versions:
-# http://en.wikipedia.org/wiki/GTK+#Releases
+# https://en.wikipedia.org/wiki/GTK+#Releases
# 2.12.0: 14 Sep 2007
# 2.14.0: 04 Sep 2008
# 2.16.0: 13 Mar 2009
# 3.8.0: 25 Mar 2013
# 3.10.0: 23 Sep 2013
# 3.12.0: 25 Mar 2014
+# 3.14.0: 30 Sep 2014
+# 3.16.0: 22 Mar 2015
+# 3.18.0 22 Sep 2015
#
# Release dates for Qt versions:
-# http://en.wikipedia.org/wiki/List_of_Qt_releases
+# https://en.wikipedia.org/wiki/List_of_Qt_releases
# 4.6.0: 01 Dec 2009
# 4.7.0: 21 Sep 2010
# 4.8.0: 15 Dec 2011
# 5.1.0: 03 Jul 2013
# 5.2.0: 12 Dec 2013
# 5.3.0: 20 May 2014
+# 5.4.0: 10 Dec 2015
+# 5.5.0: 01 Jul 2015
have_qt=no
have_gtk=no
fi
if test "x$with_qt" != "xno"; then
#
- # Qt was specified; Make sure we have a C++ compiler.
+ # Qt was specified; make sure we have a C++ compiler.
#
if test -z "$CXX"; then
AC_MSG_ERROR(Need a working C++ compiler to build Wireshark with Qt)
AC_SUBST(MOC)
AC_WIRESHARK_QT_TOOL_CHECK(RCC, rcc, "$qt_version")
AC_SUBST(RCC)
+
+ #
+ # On Darwin, find where the Qt frameworks are
+ # located, and add that to the rpath, just in
+ # case this is Qt 5.5 or later and the frameworks
+ # have an install name that begins with @rpath
+ # and aren't installed in a frameworks directory
+ # that's searched by default.
+ #
+ case "$host_os" in
+ darwin*)
+ if test $qt_version -le 4
+ then
+ Qt_LDFLAGS="-Wl,-rpath,"`$PKG_CONFIG --libs QtCore | sed -e 's/-F//' -e 's/ -framework.*//'`
+ else
+ Qt_LDFLAGS="-Wl,-rpath,"`$PKG_CONFIG --libs Qt${qt_version}Core | sed -e 's/-F//' -e 's/ -framework.*//'`
+ fi
+ ;;
+ esac
+ AC_SUBST(Qt_LDFLAGS)
],
[
case "$with_qt" in
# 2.36.0: 25 Mar 2013
# 2.38.0: 23 Sep 2013
# 2.40.0: 24 Mar 2014
+# 2.42.0: 22 Sep 2014
+# 2.44.0: 23 Mar 2014
+# 2.46.0: 25 Sep 2015
+
+# Check for GResource support
+PKG_CHECK_MODULES([GRESOURCE], [gio-2.0 >= 2.32 gdk-pixbuf-2.0 >= 2.26], [have_gresource=yes], [have_gresource=no])
+AM_CONDITIONAL(HAVE_GRESOURCE, test "x$have_gresource" = "xyes")
+if test "x$have_gresource" = "xyes"; then
+ AC_DEFINE(HAVE_GRESOURCE, 1, [Defined if GLib GResource is supported])
+fi
use_glib_cflags="true"
if test "$have_gtk" = "yes" -a "$have_qt" = "yes" ; then
dnl portaudio check
-AC_MSG_CHECKING(whether to use libportaudio for the rtp_player)
+AC_MSG_CHECKING(whether to use libportaudio for the GTK+ RTP player)
AC_ARG_WITH(portaudio,
AC_HELP_STRING( [--with-portaudio@<:@=DIR@:>@],
- [use libportaudio (located in directory DIR, if supplied) for the rtp_player @<:@default=yes, if available@:>@]),
+ [use libportaudio (located in directory DIR, if supplied) for the GTK+ RTP player @<:@default=yes, if available@:>@]),
[
if test $withval = no
then
AC_MSG_RESULT(yes)
AC_WIRESHARK_LIBPORTAUDIO_CHECK
if test "x$want_portaudio" = "xno" ; then
- AC_MSG_RESULT(libportaudio not found - disabling support for the rtp_player)
+ AC_MSG_RESULT(libportaudio not found - disabling support for the GTK+ RTP player)
fi
fi
AM_CONDITIONAL(HAVE_LIBPORTAUDIO, test x$want_portaudio = xyes)
RPMBUILD_WITH_ARGS="--without gtk2 --without gtk3"
fi
if test "x$have_qt" = "xyes" ; then
- RPMBUILD_WITH_ARGS="$RPMBUILD_WITH_ARGS --with qt"
+ if test "$qt_version" -eq "5"; then
+ RPMBUILD_WITH_ARGS="$RPMBUILD_WITH_ARGS --with qt5"
+ else
+ RPMBUILD_WITH_ARGS="$RPMBUILD_WITH_ARGS --with qt"
+ fi
+else
+ RPMBUILD_WITH_ARGS="$RPMBUILD_WITH_ARGS --without qt --without qt5"
+fi
+if test "x$have_lua" = "xyes" ; then
+ RPMBUILD_WITH_ARGS="$RPMBUILD_WITH_ARGS --with lua"
else
- RPMBUILD_WITH_ARGS="$RPMBUILD_WITH_ARGS --without qt"
+ RPMBUILD_WITH_ARGS="$RPMBUILD_WITH_ARGS --without lua"
fi
AC_SUBST(RPMBUILD_WITH_ARGS)
gtk_lib_message=" (with GTK+ 2"
fi
if test "x$have_ige_mac" = "xyes"; then
- gtk_lib_message="$gtk_lib_message and Mac OS X integration)"
+ gtk_lib_message="$gtk_lib_message and OS X integration)"
else
gtk_lib_message="$gtk_lib_message)"
fi
lua_message="no"
fi
+if test "x$have_qt_multimedia_lib" = "xyes" ; then
+ qt_multimedia_message="yes"
+else
+ qt_multimedia_message="no"
+fi
+
if test "x$want_portaudio" = "xyes" ; then
portaudio_message="yes"
else
echo " Use plugins : $have_plugins"
echo " Use external capture sources : $have_extcap"
echo " Use Lua library : $lua_message"
-echo " Build rtp_player : $portaudio_message"
+echo " Build Qt RTP player : $qt_multimedia_message"
+echo " Build GTK+ RTP player : $portaudio_message"
echo " Build profile binaries : $enable_profile_build"
echo " Use pcap library : $want_pcap"
echo " Use zlib library : $zlib_message"
echo " Use GeoIP library : $geoip_message"
echo " Use nl library : $libnl_message"
echo " Use SBC codec library : $have_sbc"
+#echo " Use GResource : $have_gresource"