# set GTK_BINARY_AGE and GTK_INTERFACE_AGE to 0.
m4_define([gtk_major_version], [3])
-m4_define([gtk_minor_version], [5])
-m4_define([gtk_micro_version], [5])
+m4_define([gtk_minor_version], [7])
+m4_define([gtk_micro_version], [13])
m4_define([gtk_interface_age], [0])
m4_define([gtk_binary_age],
[m4_eval(100 * gtk_minor_version + gtk_micro_version)])
[http://bugzilla.gnome.org/enter_bug.cgi?product=gtk%2B],
[gtk+])
-AC_CONFIG_HEADER([config.h])
+AC_CONFIG_HEADERS([config.h])
AC_CONFIG_SRCDIR([gdk/gdktypes.h])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_AUX_DIR([build-aux])
+AC_CANONICAL_HOST
+AC_CANONICAL_TARGET
+
# Define a string for the earliest version that this release has
# backwards binary compatibility with for all interfaces a module
# might. Unless we add module-only API with lower stability
m4_define([gtk_binary_version], [3.0.0])
# required versions of other packages
-m4_define([glib_required_version], [2.33.1])
-m4_define([pango_required_version], [1.30.0])
-m4_define([atk_required_version], [2.2.0])
+m4_define([glib_required_version], [2.35.3])
+m4_define([pango_required_version], [1.32.4])
+m4_define([atk_required_version], [2.7.5])
m4_define([cairo_required_version], [1.10.0])
-m4_define([gdk_pixbuf_required_version], [2.26.0])
+m4_define([gdk_pixbuf_required_version], [2.27.1])
m4_define([introspection_required_version], [1.32.0])
GLIB_REQUIRED_VERSION=glib_required_version
PANGO_REQUIRED_VERSION=pango_required_version
# Checks for programs.
AC_PROG_CC
+AX_PROG_CC_FOR_BUILD
AC_PROG_CC_C_O
-AC_PROG_CC_STDC
AC_PROG_MKDIR_P
AC_PROG_INSTALL
AC_PROG_MAKE_SET
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE",
[The prefix for our gettext translation domains.])
-AC_CANONICAL_HOST
-
MATH_LIB=-lm
AC_MSG_CHECKING([for native Win32])
LIB_EXE_MACHINE_FLAG=X86
[enable bundle-based relocation functions])],
[quartz_relocation=yes])
-AC_ARG_ENABLE(wayland-cairo-gl,
- AS_HELP_STRING([--enable-wayland-cairo-gl],
- [enable the use of Cairo GL in the Wayland backend]),
- [enable_wayland_cairo_gl=yes])
-
-
cairo_backends=
backend_immodules=
have_gio_unix=no
if test "x$quartz_relocation" = xyes; then
AC_DEFINE([QUARTZ_RELOCATION], [1], [Use NSBundle functions to determine load paths for libraries, translations, etc.])
fi
+ # Pull in gio-unix for GDesktopAppInfo usage, see at least
+ # gdkapplaunchcontext-x11.c
+ have_gio_unix=yes
else
AM_CONDITIONAL(USE_QUARTZ, false)
fi
AC_SUBST(DISABLE_ON_QUARTZ)
-if test "x$enable_broadway_backend" == xyes; then
+if test "x$enable_broadway_backend" = xyes; then
GDK_BACKENDS="$GDK_BACKENDS broadway"
cairo_backends="$cairo_backends cairo"
+ have_gio_unix=yes
GDK_WINDOWING="$GDK_WINDOWING
#define GDK_WINDOWING_BROADWAY"
GDK_EXTRA_LIBS="$GDK_EXTRA_LIBS -lz"
AM_CONDITIONAL(USE_BROADWAY, false)
fi
-if test "x$enable_wayland_backend" == "xyes"; then
- if test "x$enable_wayland_cairo_gl" == "xyes"; then
- # Wayland can use cairo-gl
- cairo_backends="$cairo_backends cairo-gl"
- AC_DEFINE(GDK_WAYLAND_USE_EGL, [1], [Whether to use EGL in Wayland backend])
- else
- # For the cairo image backend
- cairo_backends="$cairo_backends cairo"
- fi
+DISABLE_ON_WAYLAND=''
+if test "x$enable_wayland_backend" = "xyes"; then
+ # For the cairo image backend
+ cairo_backends="$cairo_backends cairo"
GDK_BACKENDS="$GDK_BACKENDS wayland"
have_gio_unix=yes
GDK_WINDOWING="$GDK_WINDOWING
#define GDK_WINDOWING_WAYLAND"
- WAYLAND_PACKAGES="wayland-client xkbcommon "
- if test "x$enable_wayland_cairo_gl" == "xyes"; then
- WAYLAND_PACKAGES="$WAYLAND_PACKAGES wayland-egl egl"
- fi
+ DISABLE_ON_WAYLAND='%'
+ WAYLAND_PACKAGES="wayland-client >= 1.0.0 xkbcommon >= 0.2.0 wayland-cursor"
AM_CONDITIONAL(USE_WAYLAND, true)
else
AM_CONDITIONAL(USE_WAYLAND, false)
fi
+AC_SUBST(DISABLE_ON_WAYLAND)
# strip leading space
GDK_BACKENDS=${GDK_BACKENDS#* }
fi
AC_SUBST(REBUILD)
-AC_CHECK_FUNCS(lstat mkstemp flockfile getc_unlocked)
+AC_CHECK_FUNCS(lstat mkstemp)
AC_CHECK_FUNCS(localtime_r)
# _NL_TIME_FIRST_WEEKDAY is an enum and not a define
*** GLIB is always available from ftp://ftp.gtk.org/pub/gtk/.]),
gobject gmodule-no-export)
-dnl
dnl Check for bind_textdomain_codeset, including -lintl if GLib brings it in.
dnl
gtk_save_LIBS=$LIBS
AC_MSG_RESULT([no])
fi
+#
+# Disable deprecation checks for all libraries we depend on on stable branches.
+# This is so newer versions of those libraries don't cause more warnings with
+# a stable GTK version.
+# We don't ever want to turn off deprecation warnings for master however, because
+# that's where we get rid of deprecated API we use.
+#
+if test m4_eval(gtk_minor_version % 2) = 0 ; then
+ AC_DEFINE_UNQUOTED(GLIB_DISABLE_DEPRECATION_WARNINGS, 1,
+ [Disable deprecation warnings from glib])
+fi
+
+dnl
saved_cflags="$CFLAGS"
saved_ldflags="$LDFLAGS"
AM_CONDITIONAL(CROSS_COMPILING, test $cross_compiling = yes)
-if test "x$cross_compiling" = xyes || test "x$enable_gtk2_dependency" = xyes; then
- AC_PATH_PROG(GTK_UPDATE_ICON_CACHE, gtk-update-icon-cache, no)
- if test x$GTK_UPDATE_ICON_CACHE = xno; then
- REBUILD_PNGS=#
- fi
-fi
+AS_IF([test "x$enable_gtk2_dependency" = xyes],
+ [AC_PATH_PROG(GTK_UPDATE_ICON_CACHE, gtk-update-icon-cache, no)
+ if test x$GTK_UPDATE_ICON_CACHE = xno; then
+ REBUILD_PNGS=#
+ fi],
+
+ [test "x$cross_compiling" = xyes],
+ [# If no GTK+2 dependency and cross compiling, we need to find a host gdk-pixbuf.
+ # pkg.m4 blocks all variable starting with PKG, so allow this one
+ m4_pattern_allow([PKG_CONFIG_FOR_BUILD])
+
+ AS_IF([test x$PKG_CONFIG_FOR_BUILD = x],
+ [AC_MSG_ERROR([You must define PKG_CONFIG_FOR_BUILD when cross compiling])])
-AM_CONDITIONAL(USE_EXTERNAL_ICON_CACHE, [test "x$cross_compiling" = xyes || test "x$enable_gtk2_dependency" = xyes])
+ AC_MSG_CHECKING([for native gdk-pixbuf])
+ AS_IF([AC_RUN_LOG([$PKG_CONFIG_FOR_BUILD --exists --print-errors gdk-pixbuf-2.0])],
+ [AC_MSG_RESULT([yes])],
+ [AC_MSG_ERROR([native gdk-pixbuf not found])])
+
+ NATIVE_GDKPIXBUF_CFLAGS=`$PKG_CONFIG_FOR_BUILD --cflags gdk-pixbuf-2.0`
+ NATIVE_GDKPIXBUF_LIBS=`$PKG_CONFIG_FOR_BUILD --libs gdk-pixbuf-2.0`
+ AC_SUBST(NATIVE_GDKPIXBUF_CFLAGS)
+ AC_SUBST(NATIVE_GDKPIXBUF_LIBS)]
+)
+
+AM_CONDITIONAL(USE_EXTERNAL_ICON_CACHE, [test "x$enable_gtk2_dependency" = xyes])
AC_PATH_PROG(GDK_PIXBUF_CSOURCE, gdk-pixbuf-csource, no)
AC_MSG_CHECKING([if <X11/extensions/XIproto.h> is needed for xReply])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <X11/Xlibint.h>]],
- [[xReply *rep;]])],
+ [[xReply *rep = NULL;
+ rep = rep;]])],
[AC_MSG_RESULT([no])],
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <X11/extensions/XIproto.h>
#include <X11/Xlibint.h>]],
- [[xReply *rep;]])],
+ [[xReply *rep = NULL;
+ rep = rep;]])],
[AC_MSG_RESULT([yes])
AC_DEFINE([NEED_XIPROTO_H_FOR_XREPLY], [1],
[Define if <X11/extensions/XIproto.h> needed for xReply])],
else
GDK_GIO_PACKAGE=gio-2.0
fi
+AM_CONDITIONAL(HAVE_GIO_UNIX, test "$have_gio_unix" = "yes")
# Check for Pango flags
# Check for Accessibility Toolkit flags
########################################
-ATK_PACKAGES="atk atk-bridge-2.0"
+if test x$enable_x11_backend = xyes; then
+ ATK_PACKAGES="atk atk-bridge-2.0"
+else
+ ATK_PACKAGES="atk"
+fi
+
PKG_CHECK_MODULES(ATK, $ATK_PACKAGES)
GTK_PACKAGES="atk cairo cairo-gobject gdk-pixbuf-2.0 gio-2.0"
-GTK_PRIVATE_PACKAGES="atk-bridge-2.0"
+GTK_PRIVATE_PACKAGES="$ATK_PACKAGES"
if test "x$enable_x11_backend" = xyes; then
GTK_PRIVATE_PACKAGES="$GTK_PRIVATE_PACKAGES pangoft2"
fi
$CUPS_API_MAJOR -eq 1 -a $CUPS_API_MINOR -ge 6; then
AC_DEFINE(HAVE_CUPS_API_1_6, 1,
[Define to 1 if CUPS 1.6 API is available])
-
+ have_cups_api_1_6=yes
fi
AC_SUBST(CUPS_API_MAJOR)
fi
fi
+# Check for Avahi flags
+AC_ARG_ENABLE(avahi-browsing,
+ [AS_HELP_STRING([--disable-avahi-browsing],
+ [disable avahi browsing of printers])],,
+ [enable_avahi_browsing=auto])
+
+have_avahi_browsing=no
+if test "x$enable_avahi_browsing" != "xno" -a \
+ "x$have_cups_api_1_6" = "xyes"; then
+ AC_MSG_CHECKING([avahi-gobject])
+
+ if $PKG_CONFIG --exists avahi-gobject ; then
+ AVAHI_CFLAGS=`$PKG_CONFIG --cflags avahi-gobject`
+ AC_SUBST(AVAHI_CFLAGS)
+ AVAHI_LIBS=`$PKG_CONFIG --libs avahi-gobject`
+ AC_SUBST(AVAHI_LIBS)
+ have_avahi_gobject=yes
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ fi
+
+ if test "x$have_avahi_gobject" = "xyes" ; then
+ AC_DEFINE([HAVE_AVAHI_BROWSING], [1], [Define to 1 if avahi-gobject available])
+ have_avahi_browsing=yes
+ else
+ AC_MSG_ERROR([
+*** avahi-gobject not found. avahi-gobject is required to build GTK+ with support
+*** for avahi browsed printers when using CUPS 1.6.
+])
+ fi
+else
+ if test "x$enable_avahi_browsing" = "xyes"; then
+ AC_MSG_ERROR([
+*** Avahi browsing support requested but CUPS 1.6 not found.
+])
+ fi
+fi
+
# Checks to see if we should compile with PAPI backend for GTK+
#
GTK_DOC_CHECK([1.11],[--flavour no-tmpl])
-AC_CHECK_PROG(DB2HTML, db2html, true, false)
-AM_CONDITIONAL(HAVE_DOCBOOK, $DB2HTML)
-
AC_ARG_ENABLE(man,
[AS_HELP_STRING([--enable-man],
- [regenerate man pages from Docbook [default=no]])],
- [enable_man=yes],
- [enable_man=no])
-
-if test "${enable_man}" != no; then
- dnl
- dnl Check for xsltproc
- dnl
+ [generate man pages [default=auto]])],,
+ enable_man=maybe)
+
+if test "$enable_man" != no; then
AC_PATH_PROG([XSLTPROC], [xsltproc])
if test -z "$XSLTPROC"; then
+ if test "$enable_man" = yes ; then
+ AC_MSG_ERROR([xsltproc is required for --enable-man])
+ fi
enable_man=no
fi
+fi
- dnl check for DocBook DTD and stylesheets in the local catalog.
+if test "$enable_man" != no; then
+ dnl check for DocBook DTD in the local catalog
JH_CHECK_XML_CATALOG([-//OASIS//DTD DocBook XML V4.1.2//EN],
- [DocBook XML DTD V4.1.2],,enable_man=no)
+ [DocBook XML DTD V4.1.2], [have_docbook_dtd=yes], [have_docbook_dtd=no])
+ if test "$have_docbook_dtd" != yes; then
+ if test "$enable_man" = yes ; then
+ AC_MSG_ERROR([DocBook DTD is required for --enable-man])
+ fi
+ enable_man=no
+ fi
+fi
+
+if test "$enable_man" != no; then
+ dnl check for DocBook XSL stylesheets in the local catalog
JH_CHECK_XML_CATALOG([http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl],
- [DocBook XSL Stylesheets],,enable_man=no)
+ [DocBook XSL Stylesheets], [have_docbook_style=yes],[have_docbook_style=no])
+ if test "$have_docbook_dtd" != yes; then
+ if test "$enable_man" = yes ; then
+ AC_MSG_ERROR([DocBook XSL Stylesheets are required for --enable-man])
+ fi
+ enable_man=no
+ fi
fi
-AM_CONDITIONAL(ENABLE_MAN, test x$enable_man != xno)
+AM_CONDITIONAL(ENABLE_MAN, test "$enable_man" != no)
+AC_MSG_CHECKING([whether to generate man pages])
+if test "$enable_man" != no; then
+ AC_MSG_RESULT([yes])
+else
+ AC_MSG_RESULT([no])
+fi
##################################################
# Output commands
gtk/gtkversion.h
gtk/gtk-win32.rc
gtk/a11y/Makefile
+gtk/native/Makefile
gtk/tests/Makefile
libgail-util/Makefile
modules/Makefile
echo " Included immodules: $included_immodules"
echo " PackageKit support: $build_packagekit"
echo " colord support: $have_colord"
+echo " Avahi browsing: $have_avahi_browsing"
echo " Introspection: $found_introspection"
echo " Debugging: $enable_debug"
echo " Documentation: $enable_gtk_doc"