# GLIB_CFLAGS: cflags for compiling libraries and example progs
# GLIB_LIBS: libraries for linking example programs
# GLIB_DEPLIBS: libraries for linking libraries against
-# glib_cflags: cflags to store in gtk-config
-# glib_libs: libs to store in gtk-config
-# glib_thread_cflags: cflags to store in gtk-config for gtk-config gthread
-# glib_thread_libs: libs to store in gtk-config for gtk-config gthread
+
+
+## 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}
#
GTK_MAJOR_VERSION=1
GTK_MINOR_VERSION=3
-GTK_MICRO_VERSION=1
+GTK_MICRO_VERSION=2
GTK_INTERFACE_AGE=0
GTK_BINARY_AGE=0
GTK_VERSION=$GTK_MAJOR_VERSION.$GTK_MINOR_VERSION.$GTK_MICRO_VERSION
, enable_xim="yes")
AC_ARG_ENABLE(xim_inst, [ --disable-xim-inst does not use xim instantiate callback],
, enable_xim_inst="maybe")
+AC_ARG_ENABLE(xkb, [ --enable-xkb support XKB [default=maybe]],
+ , enable_xkb="maybe")
AC_ARG_ENABLE(rebuilds, [ --disable-rebuilds disable all source autogeneration rules],,enable_rebuilds=yes)
AC_ARG_WITH(locale, [ --with-locale=LOCALE locale name you want to use ])
GTK_DEBUG_FLAGS="-DG_ENABLE_DEBUG"
else
if test "x$enable_debug" = "xno"; then
- GTK_DEBUG_FLAGS="-DG_DISABLE_ASSERT -DG_DISABLE_CHECKS -DGTK_NO_CHECK_CASTS"
+ GTK_DEBUG_FLAGS="-DG_DISABLE_ASSERT -DG_DISABLE_CHECKS -DG_DISABLE_CAST_CHECKS"
else
- GTK_DEBUG_FLAGS="-DGTK_NO_CHECK_CASTS"
+ GTK_DEBUG_FLAGS="-DG_DISABLE_CAST_CHECKS"
fi
fi
# Honor aclocal flags
ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
+# libtool option to control which symbols are exported
+# right now, symbols starting with _ are not exported
+LIBTOOL_EXPORT_OPTIONS='-export-symbols-regex "^[[^_]].*"'
+AC_SUBST(LIBTOOL_EXPORT_OPTIONS)
+
# define a MAINT-like variable REBUILD which is set if Perl
# and awk are found, so autogenerated sources can be rebuilt
fi
AC_SUBST(REBUILD)
-AC_CHECK_FUNCS(lstat mkstemp sigsetjmp)
+AC_CHECK_FUNCS(lstat mkstemp sigsetjmp bind_textdomain_codeset)
AC_MSG_CHECKING(whether make is GNU Make)
STRIP_BEGIN=
AC_SUBST(STRIP_END)
# i18n stuff
-ALL_LINGUAS="ca cs da de el es et eu fi fr ga gl he hr hu it ja ko lt nl no pl pt pt_BR ro ru sk sl sp sr sv tr uk wa zh_TW.Big5 zh_CN.GB2312"
+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 no pl pt pt_BR ro ru sk sl sp sr sv tr uk wa zh_TW zh_CN"
AM_GTK_GNU_GETTEXT
LIBS="$LIBS $INTLLIBS"
CFLAGS="$gtk_save_CFLAGS"
AC_MSG_WARN([Could not determine POSIX flag. (-posix didn't work.)])))
+
+#
+# Find pkg-config
+#
+AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
+if test x$PKG_CONFIG = xno ; then
+ AC_MSG_ERROR([*** pkg-config not found. See http://pkgconfig.sourceforge.net])
+fi
+
+if ! pkg-config --atleast-pkgconfig-version 0.5 ; then
+ AC_MSG_ERROR([*** pkg-config too old; version 0.5 or better required.])
+fi
+
if test x$with_glib = xyes ; then
AC_MSG_ERROR([
*** Directory must be specified for --with-glib])
fi
if test x$with_glib = x ; then
+
# Look for separately installed glib
- AM_PATH_GLIB_2_0(1.3.1,,
- AC_MSG_ERROR([
-*** GLIB 1.3.1 or better is required. The latest version of GLIB
-*** is always available from ftp://ftp.gtk.org/.]),
- gobject gmodule gthread)
-
- # we do not want to make all gtk progs to link to thread libraries.
- glib_cflags=`$GLIB_CONFIG_2_0 glib gobject gmodule --cflags`
- glib_thread_cflags="$GLIB_CFLAGS"
- glib_libs=`$GLIB_CONFIG_2_0 glib gobject gmodule --libs`
- glib_thread_libs="$GLIB_LIBS"
- GLIB_LIBS="$glib_libs"
- GLIB_DEPLIBS="$glib_libs"
+ GLIB_PACKAGES="gobject-2.0 gmodule-2.0 gthread-2.0"
+ GLIB_REQUIRED_VERSION=1.3.2
+
+ AC_MSG_CHECKING(GLib flags)
+ if $PKG_CONFIG --atleast-version $GLIB_REQUIRED_VERSION glib-2.0 ; then
+ GLIB_CFLAGS=`$PKG_CONFIG --cflags $GLIB_PACKAGES`
+ GLIB_LIBS=`$PKG_CONFIG --libs $GLIB_PACKAGES`
+ GLIB_DEPLIBS=$GLIB_LIBS
+
+ AC_MSG_RESULT($GLIB_CFLAGS $GLIB_LIBS)
+ else
+ AC_MSG_ERROR([
+*** GLIB $GLIB_REQUIRED_VERSION or newer is required. The latest version of GLIB
+*** is always available from ftp://ftp.gtk.org/.
+ ])
+ fi
+
else
# Use uninstalled glib (assume they got the version right)
- GLIB_CONFIG_2_0=$with_glib/glib-config-2.0
- if test -x $GLIB_CONFIG_2_0 ; then
+ if test -e glib-2.0.pc ; then
:
else
AC_MSG_ERROR([GLIB directory ($with_glib) not present or not configured])
fi
- # For use in gtk-config
- glib_cflags=`$GLIB_CONFIG_2_0 --cflags gmodule`
- glib_thread_cflags=`$GLIB_CONFIG_2_0 --cflags gmodule gthread`
- glib_libs=`$GLIB_CONFIG_2_0 --libs gmodule`
- glib_thread_libs=`$GLIB_CONFIG_2_0 --libs gmodule gthread`
-
- glib_release=`$GLIB_CONFIG_2_0 --version | sed 's%\\.[[0-9]]*$%%'`
-
# canonicalize relative paths
case $with_glib in
/*)
GLIB_CFLAGS="-I$glib_dir -I$glib_dir/gmodule"
GLIB_LIBS="$glib_dir/libglib-1.3.la $glib_dir/gmodule/libgmodule-1.3.la"
GLIB_DEPLIBS=
-
- AC_SUBST(GLIB_CFLAGS)
- AC_SUBST(GLIB_LIBS)
fi
-AC_SUBST(glib_cflags)
-AC_SUBST(glib_libs)
-AC_SUBST(glib_thread_cflags)
-AC_SUBST(glib_thread_libs)
+CFLAGS="$CFLAGS $GLIB_CFLAGS"
+AC_SUBST(GLIB_CFLAGS)
+AC_SUBST(GLIB_LIBS)
AC_SUBST(GLIB_DEPLIBS)
AC_CHECK_HEADERS(dirent.h, AC_DEFINE(HAVE_DIRENT_H))
,
$x_libs)
+ #
+ # Checks for FreeType
+ #
+ FREETYPE_LIBS=
+ FREETYPE_CFLAGS=
+ 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)
+ fi
+ AC_SUBST(FREETYPE_CFLAGS)
+
+ #
+ # Checks for Xft/XRender
+ #
+ have_xft=false
+ XFT_LIBS=""
+ XFT_CFLAGS=""
+ if test $have_freetype = true ; then
+ AC_CHECK_LIB(Xrender, XRenderFindFormat,
+ AC_CHECK_LIB(Xft, XftFontOpen, have_xft=true, :, -lXrender -lXext $X_LIBS $FREETYPE_LIBS)
+ ,:,-lXext $X_LIBS)
+
+ if $have_xft = 'true' ; then
+ X_LIBS="-lXft -lXrender -lXext $FREETYPE_LIBS $X_LIBS"
+ AC_DEFINE(HAVE_XFT)
+ fi
+ fi
+
+ AC_SUBST(XFT_LIBS)
+ AM_CONDITIONAL(HAVE_XFT, $have_xft)
+
# Check for XIM support.
AC_CHECK_LIB(X11, XUnregisterIMInstantiateCallback,
fi
fi
+ # Check for XKB support.
+
+ if test "x$enable_xkb" = "xyes"; then
+ AC_MSG_WARN(XKB support explicitly enabled)
+ AC_DEFINE(HAVE_XKB)
+ elif test "x$enable_xkb" = "xmaybe"; then
+ AC_CHECK_LIB(X11, XkbQueryExtension,
+ AC_DEFINE(HAVE_XKB),
+ ,
+ $x_libs)
+ else
+ AC_MSG_WARN(XKB support explicitly disabled)
+ fi
+
x_cflags="$X_CFLAGS"
x_ldflags="$X_LDFLAGS $X_LIBS"
x_ldflags=
x_libs=
xinput_progs=
+
+ AC_PATH_PROG(FREETYPE_CONFIG, freetype-config, no)
+ if test x$FREETYPE_CONFIG = xno ; then
+ AC_MSG_ERROR([*** freetype-config not found])
+ fi
+
+ FREETYPE_CFLAGS="`$FREETYPE_CONFIG --cflags`"
+ FREETYPE_LIBS="`$FREETYPE_CONFIG --libs`"
+ CFLAGS="$CFLAGS $FREETYPE_CFLAGS"
AM_CONDITIONAL(USE_LINUX_FB, true)
else
AM_CONDITIONAL(USE_LINUX_FB, false)
fi
+AC_SUBST(FREETYPE_LIBS)
+AC_SUBST(FREETYPE_CFLAGS)
#
-# Check for Pango
+# Pick correct Pango packages to use
#
-AC_PATH_PROG(PANGO_CONFIG, pango-config, no)
-if test x$PANGO_CONFIG = xno ; then
- AC_MSG_ERROR([*** pango-config not found])
-fi
if test "x$gdktarget" = "xx11"; then
- PANGO_CFLAGS="`$PANGO_CONFIG --cflags pangox`"
- PANGO_LIBS="`$PANGO_CONFIG --libs pangox`"
+ if $have_xft = true ; then
+ PANGO_PACKAGES="pangox pangoxft"
+ else
+ PANGO_PACKAGES=pangox
+ fi
+elif test "x$gdktarget" = "xlinux-fb"; then
+ PANGO_PACKAGES=pangoft2
+else
+ PANGO_PACKAGES=pango
+fi
+
+AC_SUBST(PANGO_PACKAGES)
+
+# Check for Pango flags
+
+AC_MSG_CHECKING(Pango flags)
+if $PKG_CONFIG --exists $PANGO_PACKAGES ; then
+ PANGO_CFLAGS=`$PKG_CONFIG --cflags $PANGO_PACKAGES`
+ PANGO_LIBS=`$PKG_CONFIG --libs $PANGO_PACKAGES`
+
+ AC_MSG_RESULT($PANGO_CFLAGS $PANGO_LIBS)
else
- PANGO_CFLAGS="`$PANGO_CONFIG --cflags pango`"
- PANGO_LIBS="`$PANGO_CONFIG --libs pango`"
+ AC_MSG_ERROR([
+*** Pango not found. Pango is required to build GTK+.
+*** See http://www.pango.org for Pango information.
+*** For the framebuffer target, you will need to build
+*** Pango with freetype support.
+])
fi
+
CFLAGS="$CFLAGS $PANGO_CFLAGS"
AC_SUBST(PANGO_LIBS)
AC_SUBST(PANGO_CFLAGS)
AC_CHECK_LIB(pango, pango_context_new, :, AC_MSG_ERROR([
-*** Pango not found. Pango is required to build
+*** Can't link to Pango. Pango is required to build
*** GTK+. For more information see http://www.pango.org]), $PANGO_LIBS $x_ldflags $x_libs)
CFLAGS="$saved_cflags"
if $dynworks; then
AC_DEFINE(USE_GMODULE)
- GMODULE_LIBS="`$GLIB_CONFIG_2_0 --libs gmodule`"
- GMODULE_FLAGS="`$GLIB_CONFIG_2_0 --cflags gmodule`"
- AC_SUBST(GMODULE_LIBS)
- AC_SUBST(GMODULE_FLAGS)
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
gtk+.spec
docs/gtk-config.1
Makefile
-gtk-config-2.0
gdk-pixbuf-2.0.pc
gdk-2.0.pc
gtk+-2.0.pc
build/Makefile
build/win32/Makefile
demos/Makefile
+demos/gtk-demo/Makefile
+tests/Makefile
docs/Makefile
docs/reference/Makefile
docs/reference/gdk-pixbuf/Makefile
gdk/x11/Makefile
gdk/win32/Makefile
gdk/win32/makefile.mingw
+gdk/win32/rc/Makefile
+gdk/win32/rc/gdk.rc
gdk/nanox/Makefile
gdk/linux-fb/Makefile
gtk/Makefile
gtk/makefile.mingw
+gtk/makefile.msc
gtk/gtkcompat.h
+gtk/gtk-win32.rc
gtk/stock-icons/Makefile
modules/Makefile
-modules/linux-fb/Makefile
+modules/input/Makefile
contrib/Makefile
contrib/gdk-pixbuf-xlib/Makefile
contrib/gdk-pixbuf-xlib/gdk-pixbuf-xlib-2.0.pc