# set GTK_BINARY_AGE and GTK_INTERFACE_AGE to 0.
m4_define([gtk_major_version], [2])
-m4_define([gtk_minor_version], [13])
-m4_define([gtk_micro_version], [1])
+m4_define([gtk_minor_version], [15])
+m4_define([gtk_micro_version], [6])
m4_define([gtk_interface_age], [0])
m4_define([gtk_binary_age],
[m4_eval(100 * gtk_minor_version + gtk_micro_version)])
m4_define([gtk_binary_version], [2.10.0])
# required versions of other packages
-m4_define([glib_required_version], [2.15.0])
-m4_define([pango_required_version], [1.19.3])
+m4_define([glib_required_version], [2.19.7])
+m4_define([pango_required_version], [1.20])
m4_define([atk_required_version], [1.13.0])
-m4_define([cairo_required_version], [1.2.0])
+m4_define([cairo_required_version], [1.6])
AC_INIT([gtk+], [gtk_version],
MATH_LIB=-lm
AC_MSG_CHECKING([for native Win32])
+LIB_EXE_MACHINE_FLAG=X86
case "$host" in
*-*-mingw*)
os_win32=yes
+ gio_can_sniff=no
MATH_LIB=
+ case "$host" in
+ x86_64-*-*)
+ LIB_EXE_MACHINE_FLAG=X64
+ ;;
+ esac
;;
*)
os_win32=no
esac
AC_MSG_RESULT([$os_win32])
+AC_SUBST(LIB_EXE_MACHINE_FLAG)
+
case $host in
*-*-linux*)
os_linux=yes
;;
esac
+
dnl Initialize libtool
AC_PROG_CC
AM_DISABLE_STATIC
dnl Check for a working C++ compiler, but do not bail out, if none is found.
dnl We use this for an automated test for C++ header correctness.
dnl
-AC_CHECK_PROGS(CXX, [$CCC c++ g++ gcc CC cxx cc++ cl], gcc)
+AC_CHECK_TOOLS(CXX, [$CCC c++ g++ gcc CC cxx cc++ cl], gcc)
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
AC_LIBTOOL_WIN32_DLL
AM_PROG_LIBTOOL
+dnl when using libtool 2.x create libtool early, because it's used in configure
+m4_ifdef([LT_OUTPUT], [LT_OUTPUT])
+
# Make sure we use 64-bit versions of various file stuff.
AC_SYS_LARGEFILE
AC_ARG_ENABLE(xinerama,
[AC_HELP_STRING([--enable-xinerama],
[support xinerama extension if available [default=yes]])],,
- [enable_xinerama="no"])
+ [enable_xinerama="yes"])
AC_ARG_ENABLE(rebuilds,
[AC_HELP_STRING([--disable-rebuilds],
[disable all source autogeneration rules])],,
fi
changequote([,])dnl
+CPPFLAGS="$CPPFLAGS -DG_DISABLE_SINGLE_INCLUDES -DATK_DISABLE_SINGLE_INCLUDES -DGDK_PIXBUF_DISABLE_SINGLE_INCLUDES -DGTK_DISABLE_SINGLE_INCLUDES"
+
# Ensure MSVC-compatible struct packing convention is used when
# compiling for Win32 with gcc.
# What flag to depends on gcc version: gcc3 uses "-mms-bitfields", while
case $enable_explicit_deps in
auto)
export SED
- deplibs_check_method=`(./libtool --config; echo 'eval echo $deplibs_check_method') | sh`
+ deplibs_check_method=`(./libtool --config; echo 'eval echo \"$deplibs_check_method\"') | sh`
if test "x$deplibs_check_method" '!=' xpass_all || test "x$enable_static" = xyes ; then
enable_explicit_deps=yes
else
fi
# i18n stuff
-# TRANSLATORS: Please note that gtk+ has both po/ and po-properties/
-# directories. If you add a new language to ALL_LINGUAS, please make
-# sure that both po/ and po-properties/ have .po files that correspond
-# to your language. If you only add one to po/, the build will break
-# in po-properties/.
-ALL_LINGUAS="af am ang ar as az az_IR be be@latin bg bn bn_IN br bs ca ca@valencia cs cy da de dz el en_CA en_GB eo es et eu fa fi fr ga gl gu he hi hr hu hy ia id io is it ja ka kn ko ku li lt lv mi mk ml mn mr ms nb ne nl nn nso oc or pa pl pt pt_BR ro ru rw sk sl sq sr sr@Latn sr@ije sv ta te th tk tr tt uk ur uz uz@cyrillic vi wa xh yi zh_CN zh_HK zh_TW"
+ALL_LINGUAS="`grep -v '^#' "$srcdir/po/LINGUAS" | tr '\n' ' '`"
AM_GLIB_GNU_GETTEXT
LIBS="$LIBS $INTLLIBS"
AC_OUTPUT_COMMANDS([case "$CONFIG_FILES" in *po-properties/Makefile.in*)
sed -e "/POTFILES =/r po-properties/POTFILES" po-properties/Makefile.in > po-properties/Makefile
esac])
+dnl Snippet below is copied from AM_GLIB_GNU_GETTEXT to generate a first
+dnl po-properties/POTFILES during configure; see GNOME #573515.
+dnl
+dnl Generate list of files to be processed by xgettext which will
+dnl be included in po-properties/Makefile.
+test -d po-properties || mkdir po-properties
+if test "x$srcdir" != "x."; then
+ if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
+ popropsrcprefix="$srcdir/"
+ else
+ popropsrcprefix="../$srcdir/"
+ fi
+else
+ popropsrcprefix="../"
+fi
+rm -f po-properties/POTFILES
+sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $popropsrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
+< $srcdir/po-properties/POTFILES.in > po-properties/POTFILES
+dnl (End of adapted AM_GLIB_GNU_GETTEXT snippet.)
+
AM_GLIB_DEFINE_LOCALEDIR(GTK_LOCALEDIR)
dnl The DU4 header files don't provide library prototypes unless
CFLAGS="-DG_DISABLE_DEPRECATED $CFLAGS"
fi
+CFLAGS="-DGDK_PIXBUF_DISABLE_DEPRECATED $CFLAGS"
+
dnl
dnl Check for bind_textdomain_codeset, including -lintl if GLib brings it in.
[AC_HELP_STRING([--without-libjasper],
[disable JPEG2000 loader for gdk-pixbuf])])
+AC_ARG_ENABLE(gdiplus,
+ [AC_HELP_STRING([--disable-gdiplus],
+ [disable GDI+ loaders for gdk-pixbuf])])
+
+AM_CONDITIONAL(BUILD_GDIPLUS_LOADERS, [ test x$os_win32 = xyes && test x$enable_gdiplus != xno ])
+
dnl Test for libtiff
+if test x$os_win32 = xno || test x$enable_gdiplus = xno; then
if test x$with_libtiff != xno && test -z "$LIBTIFF"; then
AC_CHECK_LIB(tiff, TIFFReadRGBAImageOriented,
[AC_CHECK_HEADER(tiffio.h,
*** --without-libtiff to configure but some programs using GTK+ may
*** not work properly])
fi
+fi
dnl Test for libjpeg
+if test x$os_win32 = xno || test x$enable_gdiplus = xno; then
if test x$with_libjpeg != xno && test -z "$LIBJPEG"; then
AC_CHECK_LIB(jpeg, jpeg_destroy_decompress,
jpeg_ok=yes,
*** --without-libjpeg to configure but some programs using GTK+ may
*** not work properly])
fi
+fi
dnl Test for libpng
if test x$with_libpng != xno && test -z "$LIBPNG"; then
dnl Test for libjasper
if test x$with_libjasper != xno && test -z "$LIBJASPER"; then
- AC_CHECK_LIB(jasper, jas_init, LIBJASPER=-ljasper, [])
+ AC_CHECK_LIB(jasper, jas_init, LIBJASPER=-ljasper, [], -ljpeg)
fi
if test x$with_libjasper != xno && test -z "$LIBJASPER"; then
fi
fi
-all_loaders="png,bmp,wbmp,gif,ico,ani,jpeg,pnm,ras,tiff,xpm,xbm,tga,pcx,icns"
+# Use the traditional png loader instead of the GDI+ one on Windows,
+# because some important apps like GIMP need to read and write
+# arbitrary tEXt chunks which doesn't seem to be possible through GDI+
+
+all_loaders="ani,icns,pcx,ras,tga,png,pnm,wbmp,xbm,xpm"
if test x$with_libjasper != xno; then
all_loaders="$all_loaders,jasper"
fi
+if test x$os_win32 = xyes && test x$enable_gdiplus != xno; then
+ # Skip PNG, see comment above
+ gdip_formats="bmp emf gif ico jpeg tiff wmf"
+ for f in $gdip_formats; do
+ all_loaders="$all_loaders,gdip-$f"
+ done
+else
+ all_loaders="$all_loaders,bmp,gif,ico,jpeg,tiff"
+fi
included_loaders=""
# If no loaders specified, include all
if test "x$with_included_loaders" = xyes ; then
AC_MSG_ERROR([the specified loader $loader does not exist])
fi
+ loader_underscores=`echo $loader | sed -e 's/-/_/g'`
INCLUDED_LOADER_OBJ="$INCLUDED_LOADER_OBJ libstatic-pixbufloader-$loader.la"
- INCLUDED_LOADER_DEFINE="$INCLUDED_LOADER_DEFINE -DINCLUDE_$loader"
- eval INCLUDE_$loader=yes
+
+ # Don't bother defining separate -DINCLUDE_gdip_foo for each gdip-foo loader
+ case $loader in
+ gdip-*) ;;
+ *) INCLUDED_LOADER_DEFINE="$INCLUDED_LOADER_DEFINE -DINCLUDE_$loader_underscores";;
+ esac
+ eval INCLUDE_$loader_underscores=yes
done
+
+# Just define one -DINCLUDE_gdiplus for all the gdip-foo loaders
+# (except gdip-png, which isn't built at all)
+if test x"$INCLUDE_gdip_ico" = xyes; then
+ INCLUDED_LOADER_DEFINE="$INCLUDED_LOADER_DEFINE -DINCLUDE_gdiplus"
+fi
+
IFS="$gtk_save_ifs"
AC_SUBST(INCLUDED_LOADER_OBJ)
AC_SUBST(INCLUDED_LOADER_DEFINE)
AM_CONDITIONAL(INCLUDE_PCX, [test x"$INCLUDE_pcx" = xyes])
AM_CONDITIONAL(INCLUDE_ICNS, [test x"$INCLUDE_icns" = xyes])
AM_CONDITIONAL(INCLUDE_JASPER, [test x"$INCLUDE_jasper" = xyes])
+# As all GDI+ loaders are either built-in or not, arbitrarily just
+# check one of the variables here
+AM_CONDITIONAL(INCLUDE_GDIPLUS, [test x"$INCLUDE_gdip_ico" = xyes])
+
+if test x$gio_can_sniff = x; then
+ AC_MSG_CHECKING([if gio can sniff png])
+ gtk_save_LIBS="$LIBS"
+ gtk_save_CFLAGS="$CFLAGS"
+ LIBS="`$PKG_CONFIG --libs gio-2.0`"
+ CFLAGS="`$PKG_CONFIG --cflags gio-2.0`"
+ AC_RUN_IFELSE([AC_LANG_SOURCE([[
+ #include <gio/gio.h>
+ static const gsize data_size = 159;
+ static const guint8 data[] =
+ {
+ 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d,
+ 0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01,
+ 0x08, 0x02, 0x00, 0x00, 0x00, 0x90, 0x77, 0x53, 0xde, 0x00, 0x00, 0x00,
+ 0x01, 0x73, 0x52, 0x47, 0x42, 0x00, 0xae, 0xce, 0x1c, 0xe9, 0x00, 0x00,
+ 0x00, 0x09, 0x70, 0x48, 0x59, 0x73, 0x00, 0x00, 0x0b, 0x13, 0x00, 0x00,
+ 0x0b, 0x13, 0x01, 0x00, 0x9a, 0x9c, 0x18, 0x00, 0x00, 0x00, 0x07, 0x74,
+ 0x49, 0x4d, 0x45, 0x07, 0xd8, 0x07, 0x0f, 0x10, 0x08, 0x15, 0x61, 0xd8,
+ 0x35, 0x37, 0x00, 0x00, 0x00, 0x19, 0x74, 0x45, 0x58, 0x74, 0x43, 0x6f,
+ 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x00, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65,
+ 0x64, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x47, 0x49, 0x4d, 0x50, 0x57,
+ 0x81, 0x0e, 0x17, 0x00, 0x00, 0x00, 0x0c, 0x49, 0x44, 0x41, 0x54, 0x08,
+ 0xd7, 0x63, 0xf8, 0xff, 0xff, 0x3f, 0x00, 0x05, 0xfe, 0x02, 0xfe, 0xdc,
+ 0xcc, 0x59, 0xe7, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae,
+ 0x42, 0x60, 0x82
+ };
+ int
+ main (int argc, char **argv)
+ {
+ char *content_type;
+ char *image_png;
+ content_type = g_content_type_guess (NULL, data, data_size, NULL);
+ image_png = g_content_type_from_mime_type ("image/png");
+ return !!strcmp (content_type, image_png);
+ }]])],
+ [gio_can_sniff=yes
+ AC_DEFINE(GDK_PIXBUF_USE_GIO_MIME, 1, [Define if gio can sniff image data])],
+ [gio_can_sniff=no])
+ AC_MSG_RESULT($gio_can_sniff)
+ LIBS="$gtk_save_LIBS"
+ CFLAGS="$gtk_save_CFLAGS"
+fi
+
+#
+# Allow building some or all immodules included
+#
+AC_MSG_CHECKING(immodules to build)
+
+dnl due to an autoconf bug, commas in the first arg to
+dnl AC_HELP_STRING cause problems.
+dnl AC_HELP_STRING([--with-included-immodules=MODULE1 MODULE2 ...],
+dnl [build the specified input method modules into gtk])
+AC_ARG_WITH(included_immodules,
+[ --with-included-immodules=MODULE1,MODULE2,...
+ build the specified input methods into gtk])
+
+if $dynworks; then
+ :
+else
+ ## if the option was specified, leave it; otherwise disable included immodules
+ if test x$with_included_immodules = xno; then
+ with_included_immodules=yes
+ fi
+fi
+
+all_immodules="am-et,cedilla,cyrillic-translit"
+if test "$gdktarget" = "win32"; then
+ all_immodules="${all_immodules},ime"
+fi
+all_immodules="${all_immodules},inuktitut,ipa,multipress,thai,ti-er,ti-et,viqr"
+if test "$gdktarget" = "x11"; then
+ all_immodules="${all_immodules},xim"
+fi
+
+included_immodules=""
+# If the switch specified without listing any specific ones, include all
+if test "x$with_included_immodules" = xyes ; then
+ included_immodules="$all_immodules"
+else
+ included_immodules="$with_included_immodules"
+fi
+
+AC_MSG_RESULT($included_immodules)
+AM_CONDITIONAL(HAVE_INCLUDED_IMMMODULES, test "x$included_immodules" != x)
+
+INCLUDED_IMMODULE_OBJ=
+INCLUDED_IMMODULE_DEFINE=
+
+IFS="${IFS= }"; gtk_save_ifs="$IFS"; IFS=","
+for immodule in $included_immodules; do
+ immodule_underscores=`echo $immodule | sed -e 's/-/_/g'`
+ if echo "$all_immodules" | egrep "(^|,)$immodule(\$|,)" > /dev/null; then
+ :
+ else
+ AC_MSG_ERROR([the specified input method $immodule does not exist])
+ fi
+
+ INCLUDED_IMMODULE_OBJ="$INCLUDED_IMMODULE_OBJ ../modules/input/libstatic-im-$immodule.la"
+ INCLUDED_IMMODULE_DEFINE="$INCLUDED_IMMODULE_DEFINE -DINCLUDE_IM_$immodule_underscores"
+ eval INCLUDE_$immodule_underscores=yes
+done
+IFS="$gtk_save_ifs"
+AC_SUBST(INCLUDED_IMMODULE_OBJ)
+AC_SUBST(INCLUDED_IMMODULE_DEFINE)
+
+AM_CONDITIONAL(INCLUDE_IM_AM_ET, [test x"$INCLUDE_am_et" = xyes])
+AM_CONDITIONAL(INCLUDE_IM_CEDILLA, [test x"$INCLUDE_cedilla" = xyes])
+AM_CONDITIONAL(INCLUDE_IM_CYRILLIC_TRANSLIT, [test x"$INCLUDE_cyrillic_translit" = xyes])
+AM_CONDITIONAL(INCLUDE_IM_IME, [test x"$INCLUDE_ime" = xyes])
+AM_CONDITIONAL(INCLUDE_IM_INUKTITUT, [test x"$INCLUDE_inuktitut" = xyes])
+AM_CONDITIONAL(INCLUDE_IM_IPA, [test x"$INCLUDE_ipa" = xyes])
+AM_CONDITIONAL(INCLUDE_IM_MULTIPRESS, [test x"$INCLUDE_multipress" = xyes])
+AM_CONDITIONAL(INCLUDE_IM_THAI, [test x"$INCLUDE_thai" = xyes])
+AM_CONDITIONAL(INCLUDE_IM_TI_ER, [test x"$INCLUDE_ti_er" = xyes])
+AM_CONDITIONAL(INCLUDE_IM_TI_ET, [test x"$INCLUDE_ti_et" = xyes])
+AM_CONDITIONAL(INCLUDE_IM_VIQR, [test x"$INCLUDE_viqr" = xyes])
+AM_CONDITIONAL(INCLUDE_IM_XIM, [test x"$INCLUDE_xim" = xyes])
AC_HEADER_SYS_WAIT
if echo "$included_loaders" | egrep '(^|,)png($|,)' > /dev/null; then
STATIC_LIB_DEPS="$STATIC_LIB_DEPS $LIBPNG"
fi
+ if echo "$included_loaders" | egrep '(^|,)jasper($|,)' > /dev/null; then
+ STATIC_LIB_DEPS="$STATIC_LIB_DEPS $LIBJASPER"
+ fi
else
- STATIC_LIB_DEPS="$LIBTIFF $LIBJPEG $LIBPNG"
+ STATIC_LIB_DEPS="$LIBTIFF $LIBJPEG $LIBPNG $LIBJASPER"
fi
# Checks to see whether we should include mediaLib
AM_CONDITIONAL(USE_MMX, test x$use_mmx_asm = xyes)
REBUILD_PNGS=
-if test -z "$LIBPNG"; then
+if test -z "$LIBPNG" && test x"$os_win32" = xno -o x$enable_gdiplus = xno; then
REBUILD_PNGS=#
fi
AM_CONDITIONAL(XINPUT_XFREE, test x$with_xinput = xxfree || test x$with_xinput = xyes)
# Check for the RANDR extension
- if $PKG_CONFIG --exists "xrandr >= 1.2" ; then
+ if $PKG_CONFIG --exists "xrandr >= 1.2.99" ; then
AC_DEFINE(HAVE_RANDR, 1, [Have the Xrandr extension library])
X_PACKAGES="$X_PACKAGES xrandr"
AC_SUBST(GDK_PIXBUF_XLIB_DEP_CFLAGS)
if test "x$gdktarget" = "xdirectfb"; then
- DIRECTFB_REQUIRED_VERSION=0.9.24
+ DIRECTFB_REQUIRED_VERSION=1.0.0
AC_MSG_CHECKING(for DirectFB)
if $PKG_CONFIG --atleast-version $DIRECTFB_REQUIRED_VERSION directfb && $PKG_CONFIG --exists cairo-directfb ; then
GDK_PACKAGES="$PANGO_PACKAGES gio-2.0"
if test "x$gdktarget" = "xx11"; then
- GDK_PACKAGES="$GDK_PACKAGES $X_PACKAGES"
+ GDK_PACKAGES="$GDK_PACKAGES $X_PACKAGES cairo-xlib"
fi
GDK_DEP_LIBS="$GDK_EXTRA_LIBS `$PKG_CONFIG --libs $GDK_PIXBUF_PACKAGES $GDK_PACKAGES` $GDK_PIXBUF_EXTRA_LIBS"
GDK_DEP_CFLAGS="`$PKG_CONFIG --cflags gthread-2.0 $GDK_PIXBUF_PACKAGES $GDK_PACKAGES` $GDK_PIXBUF_EXTRA_CFLAGS $GDK_EXTRA_CFLAGS"
LIBS="$gtk_save_LIBS"
fi
-GTK_PACKAGES="atk cairo"
+GTK_PACKAGES="atk cairo gio-2.0"
+if test "x$gdktarget" = "xx11"; then
+ GTK_PACKAGES="$GTK_PACKAGES pangoft2"
+fi
GTK_EXTRA_LIBS=
GTK_EXTRA_CFLAGS=
GTK_DEP_LIBS="$GDK_EXTRA_LIBS $GTK_DEP_LIBS_FOR_X `$PKG_CONFIG --libs $GDK_PIXBUF_PACKAGES $PANGO_PACKAGES $GTK_PACKAGES_FOR_X $GTK_PACKAGES` $GTK_EXTRA_LIBS $GDK_PIXBUF_EXTRA_LIBS"
# Checks for gtk-doc and docbook-tools
##################################################
-GTK_DOC_CHECK([1.8])
+GTK_DOC_CHECK([1.11])
AC_CHECK_PROG(DB2HTML, db2html, true, false)
AM_CONDITIONAL(HAVE_DOCBOOK, $DB2HTML)
extern "C" {
#endif /* __cplusplus */
+#ifndef GSEAL
+/* introduce GSEAL() here for all of Gdk and Gtk+ without the need to modify GLib */
+# ifdef GSEAL_ENABLE
+# define GSEAL(ident) _g_sealed__ ## ident
+# else
+# define GSEAL(ident) ident
+# endif
+#endif /* !GSEAL */
+
_______EOF
cat >>$outfile <<_______EOF
#define GDK_WINDOWING_X11'
elif test "x$gdktarget" = "xwin32" ; then
gdk_windowing='
+#define GDK_NATIVE_WINDOW_POINTER
+
#define GDK_WINDOWING_WIN32'
elif test "x$gdktarget" = "xquartz" ; then
gdk_windowing='
gdk/win32/rc/gdk.rc
gdk/quartz/Makefile
gdk/directfb/Makefile
+gdk/tests/Makefile
gtk/Makefile
gtk/makefile.msc
gtk/gtkversion.h
gtk/gtk-win32.rc
gtk/theme-bits/Makefile
gtk/tests/Makefile
-gtk/xdgmime/Makefile
modules/Makefile
modules/other/Makefile
modules/other/gail/Makefile