Remove GTK+ and PortAudio from Autotools.

Change-Id: I2126832da7542fc4f8147e26718abeede299717f
Reviewed-on: https://code.wireshark.org/review/26942
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Gerald Combs <gerald@wireshark.org>
This commit is contained in:
Gerald Combs 2018-04-14 09:33:47 -07:00
parent d1ee982115
commit 392de520cf
3 changed files with 18 additions and 339 deletions

View File

@ -51,7 +51,7 @@ noinst_PROGRAMS = \
@dftest_bin@ \
@fuzzshark_bin@
EXTRA_PROGRAMS = wireshark-gtk wireshark tshark tfshark capinfos captype \
EXTRA_PROGRAMS = wireshark tshark tfshark capinfos captype \
editcap mergecap dftest randpkt text2pcap dumpcap reordercap \
mmdbresolve rawshark sharkd fuzzshark
@ -401,10 +401,6 @@ EPAN_EXTRA_LIBS = \
@LIBSMI_LIBS@
# Libraries and plugin flags with which to link wireshark.
#
# GTK_CFLAGS/GTK_LIBS is a strict superset of GLIB_CFLAGS/GLIB_LIBS
# (see configure.ac for pkg-config modules used).
#
wireshark_common_ldadd = \
capchild/libcapchild.a \
caputils/libcaputils.a \
@ -436,20 +432,6 @@ wireshark_LDADD += $(SPEEXDSP_LIBS)
endif
endif # HAVE_Qt
if HAVE_GTK
wireshark_gtk_SOURCES = $(WIRESHARK_COMMON_SRC)
wireshark_gtk_CPPFLAGS = $(AM_CPPFLAGS) $(GTK_CFLAGS)
wireshark_gtk_LDFLAGS = $(AM_LDFLAGS)
wireshark_gtk_LDADD = \
ui/gtk/libgtkui.a \
$(wireshark_common_ldadd) \
$(GTK_LIBS) \
@PORTAUDIO_LIBS@
endif
fuzzshark_SOURCES = \
tools/oss-fuzzshark/fuzzshark.c \
tools/oss-fuzzshark/StandaloneFuzzTargetMain.c \
@ -799,7 +781,6 @@ EXTRA_DIST = \
text2pcap.h \
services \
wireshark.desktop \
wireshark-gtk.desktop \
wireshark-mime-package.xml \
wireshark.appdata.xml \
wireshark.pc.in \
@ -843,7 +824,6 @@ DIST_SUBDIRS = \
epan \
ui \
ui/cli \
ui/gtk \
ui/qt \
help \
packaging \
@ -903,7 +883,7 @@ if BUILDING_WIRESHARK
$(MKDIR_P) $(DESTDIR)$(datadir)/appdata
$(INSTALL_DATA) $(srcdir)/wireshark.appdata.xml $(DESTDIR)$(datadir)/appdata/wireshark.appdata.xml
$(MKDIR_P) $(DESTDIR)$(datadir)/applications
$(INSTALL_DATA) $(srcdir)/wireshark.desktop $(srcdir)/wireshark-gtk.desktop $(DESTDIR)$(datadir)/applications
$(INSTALL_DATA) $(srcdir)/wireshark.desktop $(DESTDIR)$(datadir)/applications
for size in 16 24 32 48 64 128 256; \
do \
$(MKDIR_P) $(DESTDIR)$(datadir)/icons/hicolor/$${size}x$${size}/apps ; \
@ -919,7 +899,6 @@ uninstall-local:
if BUILDING_WIRESHARK
rm -f $(DESTDIR)$(datadir)/appdata/wireshark.appdata.xml
rm -f $(DESTDIR)$(datadir)/applications/wireshark.desktop
rm -f $(DESTDIR)$(datadir)/applications/wireshark-gtk.desktop
rm -f $(DESTDIR)$(datadir)/mime/packages/wireshark.xml
for size in 16 24 32 48 64 128 256; \
do \
@ -938,9 +917,6 @@ uninstall-hook: update-databases-and-caches-uninstall
# update-desktop-database and update-mime-database may be needed on
# freedesktop.org desktops.
#
# gtk-update-icon-cache may be needed only if we're installing a GTK+
# version of Wireshark.
#
# Only ldconfig may be needed if we're not building Wireshark
# (that being the only desktop app).
#
@ -950,7 +926,6 @@ update-databases-and-caches-common:
if BUILDING_WIRESHARK
@echo "You may need to run \"update-desktop-database $(datadir)/applications\""
@echo "You may need to run \"update-mime-database $(datadir)/mime\""
@echo "You may need to run \"gtk-update-icon-cache -f -t $(datadir)/icons/hicolor\""
endif
@echo "-------------------------------------------------------------------------------"
@ -967,9 +942,7 @@ test-programs:
checkapi_local:
$(PERL) $(top_srcdir)/tools/checkAPIs.pl -build \
-sourcedir=$(srcdir) \
$(TSHARK_TAP_SRC) \
$(wireshark_gtk_SOURCES)
# $(EXTRA_wireshark_gtk_SOURCES)
$(TSHARK_TAP_SRC)
checkapi: checkapi_local
cd wiretap && $(MAKE) checkapi
@ -977,7 +950,6 @@ checkapi: checkapi_local
cd capchild && $(MAKE) checkapi
cd caputils && $(MAKE) checkapi
cd ui && $(MAKE) checkapi
cd ui/gtk && $(MAKE) checkapi
cd ui/cli && $(MAKE) checkapi
cd epan && $(MAKE) checkapi
cd epan/crypt && $(MAKE) checkapi

View File

@ -711,122 +711,6 @@ AC_DEFUN([AC_WIRESHARK_LIBLUA_CHECK],[
AC_WIRESHARK_POP_FLAGS
])
#
# AC_WIRESHARK_LIBPORTAUDIO_CHECK
#
AC_DEFUN([AC_WIRESHARK_LIBPORTAUDIO_CHECK],[
AC_WIRESHARK_PUSH_FLAGS
wireshark_save_LIBS="$LIBS"
if test "x$portaudio_dir" != "x"
then
#
# The user specified a directory in which libportaudio
# resides, so add the "include" subdirectory of that directory to
# the include file search path and the "lib" subdirectory
# of that directory to the library search path.
#
# XXX - if there's also a libportaudio in a directory that's
# already in CPPFLAGS or LDFLAGS, this won't make us find
# the version in the specified directory, as the compiler
# and/or linker will search that other directory before it
# searches the specified directory.
#
CPPFLAGS="$CPPFLAGS -I$portaudio_dir/include"
LDFLAGS="$LDFLAGS -L$portaudio_dir/lib"
fi
LIBS="-lportaudio $LIBS"
#
# Make sure we have "portaudio.h". If we don't, it means we probably
# don't have libportaudio, so don't use it.
#
AC_CHECK_HEADERS(portaudio.h,,
[
if test "x$portaudio_dir" != "x"
then
#
# The user used "--with-portaudio=" to specify a directory
# containing libportaudio, but we didn't find the header file
# there; that either means they didn't specify the
# right directory or are confused about whether libportaudio
# is, in fact, installed. Report the error and give up.
#
AC_MSG_ERROR([libportaudio header not found in directory specified in --with-portaudio])
else
if test "x$want_portaudio" = "xyes"
then
#
# The user tried to force us to use the library, but we
# couldn't find the header file; report an error.
#
AC_MSG_ERROR(Header file portaudio.h not found.)
else
#
# We couldn't find the header file; don't use the
# library, as it's probably not present.
#
want_portaudio=no
fi
fi
])
#
# Check whether we have the right version of portaudio
#
if test "x$want_portaudio" != "xno"
then
AC_CHECK_TYPE(PortAudioStream,
AC_DEFINE(PORTAUDIO_API_1, 1, [Define if we are using version of of the Portaudio library API]),
,
[#include <portaudio.h>])
fi
if test "x$want_portaudio" != "xno"
then
#
# Well, we at least have the portaudio header file.
#
# let's check if the libs are there
#
PORTAUDIO_LIBS=""
PORTAUDIO_INCLUDES=""
AC_CHECK_LIB(portaudio, Pa_Initialize,
[
if test "x$portaudio_dir" != "x"
then
#
# Put the "-I" and "-L" flags for portaudio
# into PORTAUDIO_INCLUDES and PORTAUDIO_LIBS,
# respectively.
#
PORTAUDIO_LIBS="-L$portaudio_dir/lib -lportaudio"
PORTAUDIO_INCLUDES="-I$portaudio_dir/include"
else
PORTAUDIO_LIBS="-lportaudio"
fi
AC_DEFINE(HAVE_LIBPORTAUDIO, 1, [Define to use libportaudio library])
want_portaudio=yes
],[
# User requested --with-portaudio but it isn't available
if test "x$want_portaudio" = "xyes"
then
AC_MSG_ERROR(Linking with libportaudio failed.)
fi
want_portaudio=no
])
AC_SUBST(PORTAUDIO_LIBS)
AC_SUBST(PORTAUDIO_INCLUDES)
fi
LIBS="$wireshark_save_LIBS"
AC_WIRESHARK_POP_FLAGS
])
#
# AC_WIRESHARK_C_ARES_CHECK
#

View File

@ -1085,7 +1085,7 @@ esac
# Enable/disable wireshark
AC_ARG_ENABLE(wireshark,
AC_HELP_STRING( [--enable-wireshark],
[build the Wireshark GUI (with Gtk+, Qt, or both) @<:@default=yes@:>@]),
[build the Wireshark GUI using Qt5 @<:@default=yes@:>@]),
enable_wireshark=$enableval,enable_wireshark=yes)
AM_CONDITIONAL(BUILDING_WIRESHARK, test x$enable_wireshark = xyes)
@ -1130,27 +1130,21 @@ GLIB_CFLAGS="$GLIB_CONFIG $GLIB_CFLAGS"
AC_SUBST(GLIB_CFLAGS)
AC_SUBST(GLIB_LIBS)
GTK2_MIN_VERSION=2.12.0
AC_SUBST(GTK2_MIN_VERSION)
GTK3_MIN_VERSION=3.0.0
AC_SUBST(GTK3_MIN_VERSION)
QT_MIN_VERSION=5.2.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.
# Qt checks. We require Qt $QT_MIN_VERSION or later.
#
# We only do those if we're going to be building Wireshark;
# otherwise, we don't have any GUI to build, so we don't use
# GTK+ or Qt.
# Qt.
#
# We don't add $GTK_LIBS or $Qt_LIBS to LIBS, because we don't want to
# force all programs to be built with GTK+ or Qt.
# We don't add $Qt_LIBS to LIBS, because we don't want to
# force all programs to be built with Qt.
#
# For a list of library versions and their support across different platforms,
# see https://wiki.wireshark.org/Development/Support_library_version_tracking
have_qt=no
have_gtk=no
if test "x$enable_wireshark" = "xyes"; then
if test "x$with_qt" != "xno"; then
#
@ -1284,115 +1278,27 @@ if test "x$enable_wireshark" = "xyes"; then
esac
])
fi
for want_gtk_version in $with_gtk; do
AS_CASE([$want_gtk_version],
[3], [PKG_WIRESHARK_CHECK_SYSTEM_MODULES([GTK],
[gtk+-3.0 >= $GTK3_MIN_VERSION glib-2.0 >= $GLIB_MIN_VERSION gthread-2.0 >= $GLIB_MIN_VERSION gmodule-2.0 >= $GLIB_MIN_VERSION],
[
have_gtk=yes
GTK_VERSION=`$PKG_CONFIG --modversion gtk+-3.0`
GUI_CONFIGURE_FLAGS="$GUI_CONFIGURE_FLAGS --with-gtk=3"
],
[
:
])],
[2], [PKG_WIRESHARK_CHECK_SYSTEM_MODULES([GTK],
[gtk+-2.0 >= $GTK2_MIN_VERSION glib-2.0 >= $GLIB_MIN_VERSION gthread-2.0 >= $GLIB_MIN_VERSION gmodule-2.0 >= $GLIB_MIN_VERSION],
[
have_gtk=yes
GTK_VERSION=`$PKG_CONFIG --modversion gtk+-2.0`
GUI_CONFIGURE_FLAGS="$GUI_CONFIGURE_FLAGS --with-gtk=2"
],
[
:
])],
[fail3], [AC_MSG_ERROR([GTK+ 3 was requested but is not installed for development])],
[fail2], [AC_MSG_ERROR([GTK+ 2 was requested but is not installed for development])],
[fail], [AC_MSG_ERROR([GTK+ was requested but is not installed for development])])
AS_IF([test "x$have_gtk" = xyes], [break])
done
if test "$have_gtk" = "yes" ; then
# If we're building with GTK, complain and then add flags for it
#
AC_MSG_WARN([The GTK+ UI is deprecated and will be removed in a future release.])
# GLib flags
#
GTK_CONFIG="$GLIB_CONFIG"
gtk_major_version=`echo $GTK_VERSION | cut -d. -f1`
gtk_minor_version=`echo $GTK_VERSION | cut -d. -f2`
AX_APPEND_FLAG([-DGDK_DISABLE_DEPRECATED], [GTK_CONFIG])
if test \( $gtk_major_version -eq 3 -a $gtk_minor_version -ge 10 \) ; then
## Allow use of deprecated & disable deprecated warnings if Gtk >= 3.10;
## The deprecations in Gtk 3.10 will not be fixed ...
AX_APPEND_FLAG([-DGDK_DISABLE_DEPRECATION_WARNINGS], [GTK_CONFIG])
else
AX_APPEND_FLAG([-DGTK_DISABLE_DEPRECATED], [GTK_CONFIG])
fi
AX_APPEND_FLAG([-DGTK_DISABLE_SINGLE_INCLUDES], [GTK_CONFIG])
if test ! \( $gtk_major_version -eq 2 -a $gtk_minor_version -lt 20 \) ; then
# Enable GSEAL when building with GTK > 2.20
# (Versions prior to 2.22 lacked some necessary accessors.)
AX_APPEND_FLAG([-DGSEAL_ENABLE], [GTK_CONFIG])
fi
GTK_CFLAGS="$GTK_CONFIG $GTK_CFLAGS"
fi
fi
AC_SUBST(GTK_CFLAGS)
AC_SUBST(GTK_LIBS)
AC_SUBST(GUI_CONFIGURE_FLAGS)
# Check for GTK GUI support for GResource pixbufs
have_gresource_pixbuf=no
if test "x$have_gtk" = "xyes"; then
AC_MSG_CHECKING(whether GDK-Pixbuf can load data using GResource)
PKG_CHECK_EXISTS([gio-2.0 >= 2.32 gdk-pixbuf-2.0 >= 2.26],
[
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_GDK_GRESOURCE, 1, [Defined if GResource is supported])
have_gresource_pixbuf=yes
],
[AC_MSG_RESULT(no)])
fi
AM_CONDITIONAL(HAVE_GRESOURCE_PIXBUF, test "x$have_gresource_pixbuf" = "xyes")
if test "$have_gtk" = "yes" -a "$have_qt" = "yes" ; then
# We have both GTK and Qt and thus will be building both wireshark
# and wireshark-gtk.
wireshark_bin="wireshark\$(EXEEXT) wireshark-gtk\$(EXEEXT)"
wireshark_man="wireshark.1"
wireshark_SUBDIRS="ui/qt ui/gtk"
elif test "$have_gtk" = "no" -a "$have_qt" = "yes" ; then
# We don't have GTK+ but we have Qt.
if test "$have_qt" = "yes" ; then
# We have Qt.
wireshark_bin="wireshark\$(EXEEXT)"
wireshark_man="wireshark.1"
wireshark_SUBDIRS="ui/qt"
elif test "$have_gtk" = "yes" -a "$have_qt" = "no" ; then
# We have GTK+ but not Qt.
wireshark_bin="wireshark-gtk\$(EXEEXT)"
wireshark_man="wireshark.1"
wireshark_SUBDIRS="ui/gtk"
elif test "$have_gtk" = "no" -a "$have_qt" = "no" ; then
# We have neither GTK+ nor Qt.
else
# We do not have Qt.
#
# If they didn't explicitly say "--disable-wireshark",
# fail (so that, unless they explicitly indicated that
# they don't want Wireshark, we stop so they know they
# won't be getting Wireshark unless they fix the GTK+/Qt
# won't be getting Wireshark unless they fix the Qt
# problem).
#
if test "x$enable_wireshark" = "xyes"; then
if test "$with_qt" != "no" -a "$with_gtk" != "no" ; then
if test "$with_qt" != "no" ; then
case "$host_os" in
darwin*)
#
@ -1402,7 +1308,7 @@ elif test "$have_gtk" = "no" -a "$have_qt" = "no" ; then
# install .pc files on macOS, so
# pkg-config can't find it.
#
AC_MSG_ERROR([Neither Qt nor GTK+ are installed for development, or Qt is installed but doesn't work with the configure script, so Wireshark can't be compiled; try using CMake, instead])
AC_MSG_ERROR([Qt was not installed for development, or Qt is installed but doesn't work with the configure script, so Wireshark can't be compiled; try using CMake, instead])
;;
*)
@ -1411,35 +1317,11 @@ elif test "$have_gtk" = "no" -a "$have_qt" = "no" ; then
# for use by applications, not
# for development.
#
AC_MSG_ERROR([Neither Qt nor GTK+ are installed for development, so Wireshark can't be compiled])
AC_MSG_ERROR([Qt was not installed for development, so Wireshark can't be compiled])
;;
esac
elif test "$with_qt" != "no" -a "$with_gtk" = "no" ; then
case "$host_os" in
darwin*)
#
# This is probably macOS, and the
# problem could be that this is a
# later version of Qt that doesn't
# install .pc files on macOS, so
# pkg-config can't find it.
#
AC_MSG_ERROR([Qt is not installed or may not work with the configure script, and GTK+ was not requested, so Wireshark cannot be compiled; try using CMake, instead])
;;
*)
#
# Qt might be installed, but only
# for use by applications, not
# for development.
#
AC_MSG_ERROR([Qt is not installed for development and GTK+ was not requested, so Wireshark can't be compiled])
;;
esac
elif test "$with_qt" = "no" -a "$with_gtk" != "no" ; then
AC_MSG_ERROR([Qt was not requested and GTK+ is not installed for development, so Wireshark can't be compiled])
elif test "$with_qt" = "no" -a "$with_gtk" = "no" ; then
AC_MSG_ERROR([Neither Qt nor GTK+ were requested, so Wireshark can't be compiled])
else
AC_MSG_ERROR([Qt was not requested so Wireshark can't be compiled])
fi
fi
wireshark_bin=""
@ -1482,7 +1364,6 @@ AC_SUBST(wireshark_bin)
AC_SUBST(wireshark_man)
AC_SUBST(wireshark_SUBDIRS)
AM_CONDITIONAL(HAVE_Qt, test "$have_qt" = "yes")
AM_CONDITIONAL(HAVE_GTK, test "$have_gtk" = "yes")
# Enable/disable tshark
AC_ARG_ENABLE(tshark,
@ -1944,43 +1825,6 @@ AM_CONDITIONAL(HAVE_LIBLUA, test x$have_lua = xyes)
AC_SUBST(LUA_LIBS)
AC_SUBST(LUA_CFLAGS)
dnl portaudio check
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 GTK+ RTP player @<:@default=yes, if available@:>@]),
[
if test $withval = no
then
want_portaudio=no
elif test $withval = yes
then
want_portaudio=yes
else
want_portaudio=yes
portaudio_dir=$withval
fi
],[
#
# Use libportaudio by default
#
want_portaudio=ifavailable
portaudio_dir=
])
if test "x$want_portaudio" = "xno" ; then
AC_MSG_RESULT(no)
else
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 GTK+ RTP player)
fi
fi
AM_CONDITIONAL(HAVE_LIBPORTAUDIO, test x$want_portaudio = xyes)
dnl Check if dumpcap should be installed with filesystem capabilities
AC_PATH_PROG(SETCAP, setcap)
AC_ARG_ENABLE(setcap-install,
@ -2613,15 +2457,6 @@ then
fi
# Gather which GUI we're building for rpmbuild
if test "x$have_gtk" = "xyes"; then
if test "x$gtk_major_version" = "x3"; then
RPMBUILD_WITH_ARGS="--with gtk3 --without gtk2"
else
RPMBUILD_WITH_ARGS="--without gtk3 --with gtk2"
fi
else
RPMBUILD_WITH_ARGS="--without gtk2 --without gtk3"
fi
if test "x$have_qt" = "xyes" ; then
RPMBUILD_WITH_ARGS="$RPMBUILD_WITH_ARGS --with qt5"
else
@ -2830,10 +2665,6 @@ AC_OUTPUT
# Pretty messages
if test "x$have_gtk" = "xyes"; then
gtk_lib_message=" (with GTK+ v$GTK_VERSION)"
fi
if test "x$have_qt" = "xyes" ; then
enable_wireshark_qt="yes"
qt_lib_message=" (with Qt$qt_version v$QT_VERSION)"
@ -2877,12 +2708,6 @@ else
qt_multimedia_message="no"
fi
if test "x$want_portaudio" = "xyes" ; then
portaudio_message="yes"
else
portaudio_message="no"
fi
if test "x$want_krb5" = "xno" ; then
krb5_message="no"
else
@ -2949,7 +2774,6 @@ echo ""
echo "The Wireshark package has been configured with the following options:"
echo " GLib version : v$GLIB_VERSION"
echo " Build wireshark : $enable_wireshark_qt$qt_lib_message"
echo " Build wireshark-gtk : $have_gtk""$gtk_lib_message"
echo " Build tshark : $enable_tshark"
echo " Build tfshark : $enable_tfshark"
echo " Build capinfos : $enable_capinfos"
@ -2979,7 +2803,6 @@ echo " Use dumpcap group : $dumpcap_group_message"
echo " Use plugins : $have_plugins"
echo " Use Lua library : $lua_message"
echo " Build Qt RTP player : $qt_multimedia_message"
echo " Build GTK+ RTP player : $portaudio_message"
echo " Use pcap library : $want_pcap"
echo " Use zlib library : $zlib_message"
echo " Use kerberos library : $krb5_message"