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,
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(UI_MANAGER, 1, [Use GTK ui-manager])
- CFLAGS="-DGTK_DISABLE_DEPRECATED $CFLAGS"
+ AC_DEFINE(MAIN_MENU_USE_UIMANAGER, 1, [Use GTK ui-manager])
fi
AC_ARG_ENABLE(packet-editor,
# Wireshark unless they fix the GTK+ problem).
#
if test "x$enable_wireshark" = "xyes"; then
- AC_MSG_ERROR([GTK+ 2.12 or later isn't available, so Wireshark can't be compiled])
+ if test "x$with_gtk3" = "xyes"; then
+ AC_MSG_ERROR([GTK+ 3.0 or later isn't available, so Wireshark can't be compiled])
+ else
+ AC_MSG_ERROR([GTK+ 2.12 or later isn't available, so Wireshark can't be compiled])
+ fi
fi
wireshark_bin=""
wireshark_man=""
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"
+ if test x$enable_uimanager = xyes; 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
+ # (Versions prior to 2.22 lacked some necessary accessors.)
+ CFLAGS="-DGSEAL_ENABLE $CFLAGS"
+ fi
fi
#
ac_save_CFLAGS="$CFLAGS"
ac_save_LIBS="$LIBS"
CFLAGS="$CFLAGS $GLIB_CFLAGS"
+# Error out on the usage of deprecated glib functions
+CFLAGS="$CFLAGS -DG_DISABLE_DEPRECATED"
LIBS="$GLIB_LIBS $LIBS"
AC_TRY_RUN([
#include <glib.h>
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"
)