Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5608 :
[metze/wireshark/wip.git] / configure.in
index e171b7cdc6ff981fbf7798bf9c1802f61a694c36..d59ff6f7d2c1e8cb9febd72f4b3198a5a4094f6b 100644 (file)
@@ -737,7 +737,6 @@ AC_ARG_ENABLE(ui-manager,
     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,
@@ -870,8 +869,12 @@ else
        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 $gtk_config_major_version -eq 2 -a $gtk_config_minor_version -ge 22; then
-               # Enable GSEAL when building with GTK > 2.22 and < 3.0
+       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
@@ -885,6 +888,8 @@ AC_MSG_CHECKING(whether GLib supports loadable modules)
 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>
@@ -1737,7 +1742,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"
 )