# foo_DEP_CFLAGS: All cflags this module requires
-## We could have pkg-config uniquify the ldflags and cflags by calling
-## it once with both the GLib and Pango package names, but we don't,
-## someone should fix that.
-
-
# Save this value here, since automake will set cflags later
cflags_set=${CFLAGS+set}
# if backwards compatibility has been broken,
# set GTK_BINARY_AGE and GTK_INTERFACE_AGE to 0.
#
-GTK_MAJOR_VERSION=1
-GTK_MINOR_VERSION=3
-GTK_MICRO_VERSION=12
+GTK_MAJOR_VERSION=2
+GTK_MINOR_VERSION=0
+GTK_MICRO_VERSION=0
GTK_INTERFACE_AGE=0
GTK_BINARY_AGE=0
GTK_VERSION=$GTK_MAJOR_VERSION.$GTK_MINOR_VERSION.$GTK_MICRO_VERSION
-dnl
+dnl This is the X.Y used in -lgtk-FOO-X.Y
+GTK_API_VERSION=2.0
])dnl
AC_SUBST(GTK_MAJOR_VERSION)
AC_SUBST(GTK_MICRO_VERSION)
AC_SUBST(GTK_INTERFACE_AGE)
AC_SUBST(GTK_BINARY_AGE)
+AC_SUBST(GTK_API_VERSION)
AC_SUBST(GTK_VERSION)
# libtool versioning
AC_SUBST(GDK_PIXBUF_VERSION)
## Versions of dependencies
-GLIB_REQUIRED_VERSION=1.3.12
-PANGO_REQUIRED_VERSION=0.23
-ATK_REQUIRED_VERSION=0.8
+GLIB_REQUIRED_VERSION=2.0.0
+PANGO_REQUIRED_VERSION=1.0.0
+ATK_REQUIRED_VERSION=1.0.0
# For automake.
VERSION=$GTK_VERSION
dnl Initialize libtool
AC_PROG_CC
+AM_DISABLE_STATIC
AC_LIBTOOL_WIN32_DLL
AM_PROG_LIBTOOL
*) AC_MSG_ERROR([Invalid target for GDK: use x11, linux-fb or win32.]);;
esac
-gdktargetlib=libgdk-$gdktarget-1.3.la
-gtktargetlib=libgtk-$gdktarget-1.3.la
+gdktargetlib=libgdk-$gdktarget-$GTK_API_VERSION.la
+gtktargetlib=libgtk-$gdktarget-$GTK_API_VERSION.la
AC_SUBST(gdktargetlib)
AC_SUBST(gtktargetlib)
fi
AC_SUBST(LIBTOOL_EXPORT_OPTIONS)
+dnl ******************************************************
+dnl * See whether to include shared library dependencies *
+dnl ******************************************************
+
+AC_ARG_ENABLE(explicit-deps,
+ [ --enable-explicit-deps=[yes/no/auto] use explicit dependencies in .pc files [default=auto]],
+ enable_explicit_deps="$enableval",
+ enable_explicit_deps=auto)
+
+AC_MSG_CHECKING([Whether to write dependencies into .pc files])
+case $enable_explicit_deps in
+ auto)
+ deplib_check_method=`(./libtool --config; echo eval echo \\$deplib_check_method) | sh`
+ if test "X$deplib_check_method" == Xnone || test "x$enable_static" = xyes ; then
+ enable_explicit_deps=yes
+ else
+ enable_explicit_deps=no
+ fi
+ ;;
+ yes|no)
+ ;;
+ *) AC_MSG_ERROR([Value given to --enable-explicit-deps must be one of yes, no or auto])
+ ;;
+esac
+AC_MSG_RESULT($enable_explicit_deps)
+
+AM_CONDITIONAL(DISABLE_EXPLICIT_DEPS, test $enable_explicit_deps = no)
+
# define a MAINT-like variable REBUILD which is set if Perl
# and awk are found, so autogenerated sources can be rebuilt
-AC_PROG_AWK
AC_CHECK_PROGS(PERL, perl5 perl)
# We would like indent, but don't require it.
REBUILD=\#
if test "x$enable_rebuilds" = "xyes" && \
test -n "$PERL" && \
- $PERL -e 'exit !($] >= 5.002)' > /dev/null 2>&1 && \
- test -n "$AWK" ; then
+ $PERL -e 'exit !($] >= 5.002)' > /dev/null 2>&1 ; then
REBUILD=
fi
AC_SUBST(REBUILD)
AC_SUBST(STRIP_END)
# i18n stuff
-ALL_LINGUAS="az ca cs da de el en_GB en@IPA es et eu fa fi fr ga gl he hr hu ia it ja ko lt nl nn no pl pt pt_BR ro ru sk sl sp sr sv tr uk vi wa zh_TW zh_CN"
+ALL_LINGUAS="az ca cs cy da de el en_GB en@IPA es et eu fa fi fr ga gl he hr hu ia it ja ko lt ms nl nn no pl pt pt_BR ro ru sk sl sp sr sv tr uk vi wa zh_TW zh_CN"
AM_GLIB_GNU_GETTEXT
LIBS="$LIBS $INTLLIBS"
AC_MSG_CHECKING(whether to build gmodulized gdk-pixbuf)
-AC_ARG_ENABLE(modules, [ --disable-modules Disables dynamic module loading],[
+AC_ARG_ENABLE(modules, [ --disable-modules disable dynamic module loading],[
if test x$withval = xyes; then
with_modules=yes
else
AC_MSG_RESULT(no)
fi
+dnl We allow people to disable image loaders explicitely, but if they don't we error
+dnl out so that people don't accidentally build without them.
+
+AC_ARG_WITH(libpng, [ --without-libpng disable PNG loader for gdk-pixbuf])
+AC_ARG_WITH(libjpeg, [ --without-libjpeg disable JPEG loader for gdk-pixbuf])
+AC_ARG_WITH(libtiff, [ --without-libtiff disable TIFF loader for gdk-pixbuf])
+
dnl Test for libtiff
- if test -z "$LIBTIFF"; then
+ if test x$with_libtiff != xno && test -z "$LIBTIFF"; then
AC_CHECK_LIB(tiff, TIFFReadScanline,
[AC_CHECK_HEADER(tiffio.h,
TIFF='tiff'; LIBTIFF='-ltiff',
AC_MSG_WARN(*** TIFF plug-in will not be built (TIFF library not found) ***), -ljpeg -lz -lm)], -ljpeg -lz -lm)], -lm)
fi
+ if test x$with_libtiff != xno && test -z "$LIBTIFF"; then
+ AC_MSG_ERROR([
+*** Checks for TIFF loader failed. You can build without it by passing
+*** --without-libtiff to configure but some programs using GTK+ may
+*** not work properly])
+ fi
+
dnl Test for libjpeg
- if test -z "$LIBJPEG"; then
+ if test x$with_libjpeg != xno && test -z "$LIBJPEG"; then
AC_CHECK_LIB(jpeg, jpeg_destroy_decompress,
jpeg_ok=yes,
jpeg_ok=no
fi
fi
+ if test x$with_libjpeg != xno && test -z "$LIBJPEG"; then
+ AC_MSG_ERROR([
+*** Checks for JPEG loader failed. You can build without it by passing
+*** --without-libjpeg to configure but some programs using GTK+ may
+*** not work properly])
+ fi
+
dnl Test for libpng
- if test -z "$LIBPNG"; then
+ if test x$with_libpng != xno && test -z "$LIBPNG"; then
AC_CHECK_LIB(png, png_read_info,
[AC_CHECK_HEADER(png.h,
png_ok=yes,
fi
fi
+ if test x$with_libpng != xno && test -z "$LIBPNG"; then
+ AC_MSG_ERROR([
+*** Checks for PNG loader failed. You can build without it by passing
+*** --without-libpng to configure but many programs using GTK+ will
+*** not work properly. The PNG loader is also needed if you are compiling
+*** from CVS.])
+ fi
+
AC_SUBST(LIBTIFF)
AC_SUBST(LIBJPEG)
AC_SUBST(LIBPNG)
#
AC_MSG_CHECKING(pixbuf loaders to build)
-AC_ARG_WITH(included_loaders, [ --with-included-loaders=LOADER1,LOADER2,... Build the specified loaders into gdk-pixbuf (only used if module loading disabled)])
+AC_ARG_WITH(included_loaders, [ --with-included-loaders=LOADER1,LOADER2,... build the specified loaders into gdk-pixbuf (only used if module loading disabled)])
if $dynworks; then
:
GDK_EXTRA_LIBS=$GDK_WLIBS
GDK_EXTRA_CFLAGS=
+FREETYPE_LIBS=
+FREETYPE_CFLAGS=
+if test "x$gdktarget" = "xlinux-fb" || test "x$gdktarget" = "x11" ; then
+ #
+ # Checks for FreeType
+ #
+ have_freetype=false
+ AC_PATH_PROG(FREETYPE_CONFIG, freetype-config, no)
+ if test "x$FREETYPE_CONFIG" != "xno" ; then
+ FREETYPE_CFLAGS=`$FREETYPE_CONFIG --cflags`
+ FREETYPE_LIBS=`$FREETYPE_CONFIG --libs`
+
+ AC_CHECK_LIB(freetype, FT_New_Face, have_freetype=true
+ ,:,$FREETYPE_LIBS)
+
+ if $have_freetype ; then
+ gtk_save_cppflags="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS $FREETYPE_CFLAGS"
+
+ AC_MSG_CHECKING([For sufficiently new FreeType (at least 2.0.1)])
+ AC_TRY_COMPILE([
+#include <freetype/freetype.h>
+#include FT_ERRORS_H
+ ],
+ [(void)1;],:,have_freetype=yes)
+ if test x$have_freetype = xyes ; then
+ AC_MSG_RESULT(yes)
+ else
+ AC_MSG_RESULT(no)
+ fi
+
+ CPPFLAGS="$gtk_save_cppflags"
+ fi
+ fi
+ AC_SUBST(FREETYPE_LIBS)
+ AC_SUBST(FREETYPE_CFLAGS)
+fi
+
if test "x$gdktarget" = "xx11"; then
# We start off with the libraries from Pango
+ if $PKG_CONFIG --exists pangox ; then : ; else
+ AC_MSG_ERROR([pangox Pango backend is required for x11 target])
+ fi
+
## be sure we also have Pango built with xft support
if $PKG_CONFIG --exists pangoxft ; then
PANGO_PACKAGES="pangox pangoxft"
have_xft=true
AC_DEFINE(HAVE_XFT)
+ if x$have_freetype != xyes ; then
+ AC_MSG_ERROR([pangoxft Pango backend found but did not find freetype libraries])
+ fi
else
PANGO_PACKAGES="pangox"
have_xft=false
AM_CONDITIONAL(HAVE_XFT, $have_xft)
+ #
+ # If Pango included the shared library dependencies from X11 in
+ # the pkg-config output, then we use that (to avoid duplicates).
+ # but if they were omitted to avoid binary compatibility problems
+ # then we need to repeat the checks.
+ #
x_libs="`$PKG_CONFIG --libs $PANGO_PACKAGES`"
+ case x_libs in
+ *-lX11*) pango_omitted_x_deps=no ;;
+ *) pango_omitted_x_deps=yes ;;
+ esac
+
x_cflags="`$PKG_CONFIG --cflags $PANGO_PACKAGES`"
x_extra_libs=
+ if test $pango_omitted_x_deps = yes ; then
+ AC_PATH_XTRA
+
+ if test x$no_x = xyes ; then
+ AC_MSG_ERROR([X development libraries not found])
+ fi
+
+ x_libs="$X_LIBS -lX11 $X_EXTRA_LIBS"
+
+ #
+ # Checks for Xft/XRender
+ #
+ XFT_LIBS=""
+ XFT_CFLAGS=""
+ if test $have_xft = true ; then
+ gtk_save_cppflags="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS $x_cflags"
+ have_xft=false
+
+ AC_CHECK_LIB(Xrender, XRenderFindFormat,
+ [AC_CHECK_LIB(Xft, XftFontOpen,
+ [AC_CHECK_HEADER(X11/Xft/XftFreetype.h,
+ have_xft=true,:)],
+ :,-lXrender -lXext $x_libs $FREETYPE_LIBS)]
+ ,:,-lXext $x_libs)
+
+ CPPFLAGS="$gtk_save_cppflags"
+
+ if $have_xft ; then
+ x_libs="$X_LIBS -lXft -lXrender -lXext -lX11 $FREETYPE_LIBS $X_EXTRA_LIBS"
+ else
+ AC_MSG_ERROR([pangoxft Pango backend found, but Xft not found])
+ fi
+ fi
+ fi
+
## Strip the .la files
x_libs_for_checks=""
fi
GDK_EXTRA_CFLAGS=
- GDK_EXTRA_LIBS="$x_extra_libs"
+ if test $pango_omitted_x_deps = yes ; then
+ GDK_EXTRA_LIBS="$x_extra_libs $x_libs $GDK_EXTRA_LIBS"
+ else
+ GDK_EXTRA_LIBS="$x_extra_libs $GDK_EXTRA_LIBS"
+ fi
AM_CONDITIONAL(USE_X11, true)
else
AC_SUBST(GDK_PIXBUF_XLIB_DEP_CFLAGS)
if test "x$gdktarget" = "xlinux-fb"; then
- AC_PATH_PROG(FREETYPE_CONFIG, freetype-config, no)
- if test x$FREETYPE_CONFIG = xno ; then
- AC_MSG_ERROR([*** freetype-config not found])
+ if test x$have_freetype != xyes ; then
+ AC_MSG_ERROR([Using linux-fb backend but freetype was not found])
fi
- FREETYPE_CFLAGS="`$FREETYPE_CONFIG --cflags`"
- FREETYPE_LIBS="`$FREETYPE_CONFIG --libs`"
+ ft2_libs="`$PKG_CONFIG --libs pangoft2`"
+ case ft2_libs in
+ *-lfreetype*) pango_omitted_ft2_deps=no ;;
+ *) pango_omitted_ft2_deps=yes ;;
+ esac
+
CFLAGS="$CFLAGS $FREETYPE_CFLAGS"
if test x$enable_shadowfb = xyes ; then
AM_CONDITIONAL(ENABLE_FB_MANAGER, false)
fi
- GDK_EXTRA_CFLAGS="$FREETYPE_CFLAGS"
- GDK_EXTRA_LIBS="$FREETYPE_LIBS $GDK_EXTRA_LIBS"
+ GDK_EXTRA_CFLAGS=""
+ if test $pango_omitted_ft2_deps = yes ; then
+ GDK_EXTRA_LIBS="$FREETYPE_LIBS $GDK_EXTRA_LIBS"
+ fi
AM_CONDITIONAL(USE_LINUX_FB, true)
else
GDK_DEP_LIBS="$GDK_EXTRA_LIBS `$PKG_CONFIG --libs $GDK_PIXBUF_PACKAGES $GDK_PACKAGES` $GDK_PIXBUF_EXTRA_LIBS"
GDK_DEP_CFLAGS="`$PKG_CONFIG --cflags $GDK_PIXBUF_PACKAGES $GDK_PACKAGES` $GDK_PIXBUF_EXTRA_CFLAGS $GDK_EXTRA_CFLAGS"
+#
+# If we aren't writing explicit dependencies, then don't put the extra libraries we need
+# into the pkg-config files
+#
+if test $enable_explicit_deps != yes ; then
+ GDK_EXTRA_LIBS=
+fi
+
AC_SUBST(GDK_PACKAGES)
AC_SUBST(GDK_EXTRA_LIBS)
AC_SUBST(GDK_EXTRA_CFLAGS)
if $PKG_CONFIG --uninstalled $ATK_PACKAGES; then
:
else
- AC_CHECK_LIB(atk, atk_object_get_type, : , AC_MSG_ERROR([
+ AC_CHECK_LIB(atk-1.0, atk_object_get_type, : , AC_MSG_ERROR([
*** Cannot link to Accessibility Toolkit. Accessibility Toolkit is required
*** to build GTK+]), $ATK_LIBS $GLIB_LIBS)
fi
AC_CHECK_PROG(GTKDOC, gtkdoc-mkdb, true, false)
-gtk_doc_min_version=0.6
+gtk_doc_min_version=0.9
if $GTKDOC ; then
gtk_doc_version=`gtkdoc-mkdb --version`
AC_MSG_CHECKING([gtk-doc version ($gtk_doc_version) >= $gtk_doc_min_version])
AC_CHECK_PROG(DB2HTML, db2html, true, false)
AM_CONDITIONAL(HAVE_DOCBOOK, $DB2HTML)
-dnl Let people disable the gtk-doc stuff.
-AC_ARG_ENABLE(gtk-doc, [ --enable-gtk-doc Use gtk-doc to build documentation [default=auto]], enable_gtk_doc="$enableval", enable_gtk_doc=auto)
+dnl Make people enable the gtk-doc stuff explicitely.
+AC_ARG_ENABLE(gtk-doc, [ --enable-gtk-doc use gtk-doc to build documentation [default=no]], enable_gtk_doc="$enableval", enable_gtk_doc=auto)
-if test x$enable_gtk_doc = xauto ; then
- if test x$GTKDOC = xtrue ; then
- enable_gtk_doc=yes
- else
+if test x$enable_gtk_doc = xyes ; then
+ if test x$GTKDOC != xtrue ; then
enable_gtk_doc=no
fi
fi
])
AC_PATH_PROG(SGML2HTML, sgml2html, no)
-AM_CONDITIONAL(HAVE_SGML2HTML, ! test x$SGML2HTML = xno)
+AM_CONDITIONAL(HAVE_SGML2HTML, test x$SGML2HTML != xno)
AC_OUTPUT([
config.h.win32
docs/tutorial/Makefile
gdk-pixbuf/Makefile
gdk-pixbuf/makefile.mingw
+gdk-pixbuf/gdk_pixbuf.rc
gdk-pixbuf/gdk-pixbuf-features.h
gdk-pixbuf/pixops/Makefile
gdk-pixbuf/pixops/makefile.mingw
gtk/gtkversion.h
gtk/gtk-win32.rc
gtk/stock-icons/Makefile
+gtk/theme-bits/Makefile
modules/Makefile
modules/input/Makefile
contrib/Makefile