# set GTK_BINARY_AGE and GTK_INTERFACE_AGE to 0.
m4_define([gtk_major_version], [2])
-m4_define([gtk_minor_version], [3])
-m4_define([gtk_micro_version], [5])
+m4_define([gtk_minor_version], [7])
+m4_define([gtk_micro_version], [6])
m4_define([gtk_version],
[gtk_major_version.gtk_minor_version.gtk_micro_version])
-m4_define([gtk_interface_age], [0])
+m4_define([gtk_interface_age], [3])
m4_define([gtk_binary_age],
[m4_eval(100 * gtk_minor_version + gtk_micro_version)])
# This is the X.Y used in -lgtk-FOO-X.Y
m4_define([gtk_api_version], [2.0])
# Define a string for the earliest version that this release has
-# forward/backwards binary compatibility with. This is used for module
-# locations. (Should this be backwards-compat instead?)
+# backwards binary compatibility with for all interfaces a module
+# might. Unless we add module-only API with lower stability
+# guarantees, this should be unchanged until we break binary compat
+# for GTK+.
#
#GTK_BINARY_VERSION=$GTK_MAJOR_VERSION.$GTK_MINOR_VERSION.$LT_CURRENT
-m4_define([gtk_binary_version], [2.2.0])
+m4_define([gtk_binary_version], [2.4.0])
# required versions of other packages
-m4_define([glib_required_version], [2.3.5])
-m4_define([pango_required_version], [1.3.5])
+m4_define([glib_required_version], [2.7.1])
+m4_define([pango_required_version], [1.9.0])
m4_define([atk_required_version], [1.0.1])
+m4_define([cairo_required_version], [0.6])
AC_INIT([gtk+], [gtk_version],
- [http://bugzilla.gnome.org/enter_bug.cgi?product=gtk+],
+ [http://bugzilla.gnome.org/enter_bug.cgi?product=gtk%2B],
[gtk+])
AC_CONFIG_SRCDIR([gdk/gdktypes.h])
#
# For each of the libraries we build, we define the following
+
# substituted variables:
#
# foo_PACKAGES: pkg-config packages this library requires
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE")
+AC_CANONICAL_HOST
+MATH_LIB=-lm
+AC_MSG_CHECKING([for native Win32])
+case "$host" in
+ *-*-mingw*)
+ os_win32=yes
+ MATH_LIB=
+ ;;
+ *)
+ os_win32=no
+ ;;
+esac
+AC_MSG_RESULT([$os_win32])
+
+case $host in
+ *-*-linux*)
+ os_linux=yes
+ ;;
+esac
dnl Initialize libtool
AC_PROG_CC
AM_DISABLE_STATIC
+
+if test "$os_win32" = "yes"; then
+ if test x$enable_static = xyes -o x$enable_static = x; then
+ AC_MSG_WARN([Disabling static library build, must build as DLL on Windows.])
+ enable_static=no
+ fi
+ if test x$enable_shared = xno; then
+ AC_MSG_WARN([Enabling shared library build, must build as DLL on Windows.])
+ fi
+ enable_shared=yes
+fi
+
AC_LIBTOOL_WIN32_DLL
AM_PROG_LIBTOOL
+# Make sure we use 64-bit versions of various file stuff.
+AC_SYS_LARGEFILE
+
AM_PROG_AS
+AC_PATH_PROG(NM, nm, nm)
dnl Initialize maintainer mode
AM_MAINTAINER_MODE
-AC_CANONICAL_HOST
-
AC_MSG_CHECKING([for some Win32 platform])
case "$host" in
*-*-mingw*|*-*-cygwin*)
AC_MSG_RESULT([$platform_win32])
AM_CONDITIONAL(PLATFORM_WIN32, test "$platform_win32" = "yes")
-MATH_LIB=-lm
-AC_MSG_CHECKING([for native Win32])
-case "$host" in
- *-*-mingw*)
- os_win32=yes
- MATH_LIB=
- ;;
- *)
- os_win32=no
- ;;
-esac
-AC_MSG_RESULT([$os_win32])
AM_CONDITIONAL(OS_WIN32, test "$os_win32" = "yes")
AM_CONDITIONAL(OS_UNIX, test "$os_win32" != "yes")
+AM_CONDITIONAL(OS_LINUX, test "$os_linux" = "yes")
if test "$os_win32" = "yes"; then
+ AC_CHECK_TOOL(WINDRES, windres, no)
+ if test "$WINDRES" = no; then
+ AC_MSG_ERROR([*** Could not find an implementation of windres in your PATH.])
+ fi
AC_CHECK_PROG(ms_librarian, lib.exe, yes, no)
fi
AM_CONDITIONAL(MS_LIB_AVAILABLE, test x$ms_librarian = xyes)
[AC_HELP_STRING([--enable-shm],
[support shared memory if available [default=yes]])],,
[enable_shm="yes"])
-AC_ARG_ENABLE(ansi,
- [AC_HELP_STRING([--enable-ansi],
- [turn on strict ansi [default=no]])],,
- [enable_ansi=no])
AC_ARG_ENABLE(xkb,
[AC_HELP_STRING([--enable-xkb],
[support XKB [default=maybe]])],,
[AC_HELP_STRING([--disable-rebuilds],
[disable all source autogeneration rules])],,
[enable_rebuilds=yes])
+AC_ARG_ENABLE(visibility,
+ [AC_HELP_STRING([--disable-visibility],
+ [don't use ELF visibility attributes])],,
+ [enable_visibility=yes])
AC_ARG_WITH(xinput,
[AC_HELP_STRING([--with-xinput=@<:@no/yes@:>@], [support XInput])])
[AC_HELP_STRING([--with-ie55=DIRECTORY],
[IE5.5 libs and headers (for Active IMM)])])
-GLIB_AC_DIVERT_BEFORE_HELP([
if test "$platform_win32" = yes; then
gdktarget=win32
else
gdktarget=x11
fi
-])
-AC_ARG_WITH(gdktarget, [ --with-gdktarget=[[x11/linux-fb/win32]] select GDK target [default=$gdktarget]],
+AC_ARG_WITH(gdktarget, [ --with-gdktarget=[[x11/linux-fb/win32]] select non-default GDK target],
gdktarget=$with_gdktarget)
AC_SUBST(gdktarget)
fi
fi
+if test "x$enable_visibility" = "xno"; then
+ GTK_DEBUG_FLAGS="$GTK_DEBUG_FLAGS -DDISABLE_VISIBILITY"
+fi
+
+
AC_DEFINE_UNQUOTED(GTK_COMPILED_WITH_DEBUGGING, "${enable_debug}")
PKG_CHECK_MODULES(BASE_DEPENDENCIES,
[glib-2.0 >= glib_required_version dnl
atk >= atk_required_version dnl
- pango >= pango_required_version])
+ pango >= pango_required_version dnl
+ cairo >= cairo_required_version])
if test "$os_win32" != yes; then
# libtool option to control which symbols are exported
AC_CHECK_FUNCS(lstat mkstemp flockfile)
+# _NL_TIME_FIRST_WEEKDAY is an enum and not a define
+AC_MSG_CHECKING([for _NL_TIME_FIRST_WEEKDAY])
+AC_TRY_LINK([#include <langinfo.h>], [
+char c;
+c = *((unsigned char *) nl_langinfo(_NL_TIME_FIRST_WEEKDAY));
+], gtk_ok=yes, gtk_ok=no)
+AC_MSG_RESULT($gtk_ok)
+if test "$gtk_ok" = "yes"; then
+ AC_DEFINE([HAVE__NL_TIME_FIRST_WEEKDAY], [1],
+ [Define if _NL_TIME_FIRST_WEEKDAY is available])
+fi
+
# sigsetjmp is a macro on some platforms, so AC_CHECK_FUNCS is not reliable
AC_MSG_CHECKING(for sigsetjmp)
AC_TRY_LINK([#include <setjmp.h>], [
# 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 ar az be bg bn br ca cs cy da de el en_CA en_GB es et eu fa fi fr ga gl he hi hr hu ia id it ja ko li lt lv mi mk ml mn ms ne nl nn no pl pt pt_BR ro ru sk sl sq sr sr@ije sr@Latn sv ta th tr uk uz uz@Latn vi wa yi zh_CN zh_TW"
+ALL_LINGUAS="af am ar az az_IR be bg bn br bs ca cs cy da de el en_CA en_GB es et eu fa fi fr ga gl gu he hi hr hu hy ia id is it ja ko li lt lv mi mk ml mn mr ms nb ne nl nn no nso pa pl pt pt_BR ro ru rw sk sl sq sr sr@ije sr@Latn sv ta te th tk tr uk uz uz@Latn vi wa xh yi zh_CN zh_TW"
AM_GLIB_GNU_GETTEXT
LIBS="$LIBS $INTLLIBS"
AC_OUTPUT_COMMANDS([case "$CONFIG_FILES" in *po-properties/Makefile.in*)
;;
esac
+#
+# see bug 162979
+#
+AC_MSG_CHECKING(for HP-UX)
+case $host_os in
+ hpux9* | hpux10* | hpux11*)
+ AC_MSG_RESULT(yes)
+ CFLAGS="$CFLAGS -DHPPEX -DSHMLINK"
+ ;;
+ *)
+ AC_MSG_RESULT(no)
+ ;;
+esac
+
dnl NeXTStep cc seems to need this
AC_MSG_CHECKING([for extra flags for POSIX compliance])
AC_TRY_COMPILE([#include <dirent.h>], [DIR *dir;],
# Run AM_PATH_GLIB_2_0 to make sure that GLib is installed and working
#
-GLIB_PACKAGES="gobject-2.0 gmodule-2.0"
+GLIB_PACKAGES="gobject-2.0 gmodule-no-export-2.0"
AM_PATH_GLIB_2_0(glib_required_version, :,
AC_MSG_ERROR([
*** GLIB glib_required_version or better is required. The latest version of
*** GLIB is always available from ftp://ftp.gtk.org/pub/gtk/.]),
- gobject gmodule gthread)
+ gobject gmodule-no-export gthread)
dnl
dnl Check for bind_textdomain_codeset, including -lintl if GLib brings it in.
AC_TYPE_SIGNAL
AC_FUNC_MMAP
+AC_CHECK_FUNCS(mallinfo)
AC_CHECK_FUNCS(getresuid)
AC_TYPE_UID_T
AC_MSG_RESULT($gdk_working_wctype)
AC_SUBST(GDK_WLIBS)
+# Check for uxtheme.h (for MS-Windows Engine)
+AC_MSG_CHECKING(for uxtheme.h)
+AC_TRY_CPP([#include <uxtheme.h>], gtk_uxtheme_h=yes, gtk_uxtheme_h=no)
+if test $gtk_uxtheme_h = yes; then
+ AC_DEFINE(HAVE_UXTHEME_H,1,[Have uxtheme.h include file])
+fi
+AC_MSG_RESULT($gtk_uxtheme_h)
+
##################################################
# Checks for gdk-pixbuf
AC_MSG_RESULT(yes)
AC_MSG_CHECKING(whether dynamic modules work)
## for loop is to strip newline
- tmp=`$PKG_CONFIG --variable=gmodule_supported gmodule-2.0`
+ tmp=`$PKG_CONFIG --variable=gmodule_supported gmodule-no-export-2.0`
for I in $tmp; do
dynworks=$I
done
[AC_CHECK_HEADER(tiffio.h,
TIFF='tiff'; LIBTIFF='-ltiff34 -ljpeg -lz',
AC_MSG_WARN(*** TIFF loader will not be built (TIFF header files not found) ***))],
- AC_MSG_WARN(*** TIFF plug-in will not be built (TIFF library not found) ***), -ljpeg -lz -lm)], -ljpeg -lz -lm)], -lm)
+ AC_MSG_WARN(*** TIFF loader 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_SUBST(REBUILD_PNGS)
-GDK_PIXBUF_PACKAGES="gmodule-2.0 gobject-2.0"
+GDK_PIXBUF_PACKAGES="gmodule-no-export-2.0 gobject-2.0"
GDK_PIXBUF_EXTRA_LIBS="$STATIC_LIB_DEPS $MATH_LIB"
GDK_PIXBUF_EXTRA_CFLAGS=
GDK_PIXBUF_DEP_LIBS="`$PKG_CONFIG --libs $GDK_PIXBUF_PACKAGES` $GDK_PIXBUF_EXTRA_LIBS"
AC_MSG_ERROR([Xft Pango backend found but did not find freetype libraries])
fi
else
- AC_MSG_ERROR([Pango 1.2.0 and Xft backend is required for x11 target])
+ AC_MSG_ERROR([Xft Pango backend is required for x11 target])
fi
if $PKG_CONFIG --exists xft ; then : ; else
if test $pango_omitted_x_deps = yes ; then
# Old versions of Xft didn't necessarily include -lX11 in the output
- x_libs="`pkg-config --libs xft` -lX11 $X_EXTRA_LIBS"
+ x_libs="`$PKG_CONFIG --libs xft` -lX11 $X_EXTRA_LIBS"
fi
## Strip the .la files
# Check for solaris
use_solaris_xinerama=yes
AC_CHECK_LIB(Xext, XineramaGetInfo,
- use_solaris_xinerama=yes, use_solaris_xinerama=no)
+ use_solaris_xinerama=yes,
+ use_solaris_xinerama=no,
+ -lXext $x_libs_for_checks)
if test "x$use_solaris_xinerama" = "xyes"; then
AC_CHECK_HEADER(X11/extensions/xinerama.h,
[GTK_ADD_LIB(x_extra_libs,Xext)
AC_DEFINE(HAVE_SOLARIS_XINERAMA)
- AC_DEFINE(HAVE_XINERAMA)], use_solaris_xinerama=no, -lXext $x_libs_for_checks)
+ AC_DEFINE(HAVE_XINERAMA)],
+ use_solaris_xinerama=no,[#include <X11/Xlib.h>])
fi
AC_MSG_CHECKING(for Xinerama support on Solaris)
AC_MSG_RESULT($use_solaris_xinerama);
CPPFLAGS="$gtk_save_cppflags"
+ # Check for xReply
+
+ gtk_save_cppflags="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS $X_CFLAGS"
+
+ AC_MSG_CHECKING([if <X11/extensions/XIproto.h> is needed for xReply])
+ AC_TRY_COMPILE([#include <X11/Xlibint.h>],
+ [xReply *rep;],
+ [AC_MSG_RESULT([no])],
+ [AC_TRY_COMPILE([#include <X11/extensions/XIproto.h>
+#include <X11/Xlibint.h>],
+ [xReply *rep;],
+ [AC_MSG_RESULT([yes])
+ AC_DEFINE([NEED_XIPROTO_H_FOR_XREPLY], 1,
+ [Define if <X11/extensions/XIproto.h> needed for xReply])],
+ [AC_MSG_RESULT([unknown])
+ AC_MSG_ERROR([xReply type unavailable. X11 is too old])])])
+
+ CPPFLAGS="$gtk_save_cppflags"
+
# Check for shaped window extension
AC_CHECK_LIB(Xext, XShapeCombineMask,
,
$x_libs_for_checks)
+ # Check for XInternAtoms (X11R6 specific)
+
+ AC_CHECK_LIB(X11, XInternAtoms,
+ AC_DEFINE([HAVE_XINTERNATOMS], 1,
+ [Define to 1 if you have the `XInternAtoms' function.]),
+ ,
+ $x_libs_for_checks)
+
# Generic X11R6 check needed for XIM support; we could
# probably use this to replace the above, but we'll
- # leave the separate XConvertCase check for clarity
-
+ # leave the separate checks for XConvertCase and XInternAtoms
+ # for clarity
have_x11r6=false
AC_CHECK_LIB(X11, XAddConnectionWatch,
have_x11r6=true,
GDK_EXTRA_CFLAGS="`$PKG_CONFIG --cflags xcursor` $GDK_EXTRA_CFLAGS"
GDK_EXTRA_LIBS="`$PKG_CONFIG --libs xcursor` $GDK_EXTRA_LIBS"
fi
+
+ # X SYNC check
+ AC_CHECK_LIB(Xext, XSyncQueryExtension,
+ [AC_CHECK_HEADER(X11/extensions/sync.h,
+ [GTK_ADD_LIB(x_extra_libs, Xext)
+ AC_DEFINE(HAVE_XSYNC, 1, Have the SYNC extension library)],
+ :, [#include <X11/Xlib.h>])], : ,
+ $X_LIBS -lXext -lX11 $X_EXTRA_LIBS)
+
+ # Checks for XFixes extension
+
+ have_xfixes=false
+ PKG_CHECK_MODULES(XFIXES, xfixes, have_xfixes=true, :)
+
+ if $have_xfixes ; then
+ AC_DEFINE(HAVE_XFIXES, 1, Have the XFIXES X extension)
+ GDK_EXTRA_CFLAGS="`$PKG_CONFIG --cflags xfixes` $GDK_EXTRA_CFLAGS"
+ GDK_EXTRA_LIBS="`$PKG_CONFIG --libs xfixes` $GDK_EXTRA_LIBS"
+ fi
# Xshm checks
fi
fi
- GDK_EXTRA_CFLAGS=
if test $pango_omitted_x_deps = yes ; then
GDK_EXTRA_LIBS="$X_LIBS $x_extra_libs $x_libs $GDK_EXTRA_LIBS"
else
AC_SUBST(GDK_WIN32_EXTRA_CFLAGS)
fi
- GDK_EXTRA_LIBS="$GDK_EXTRA_LIBS -lgdi32 -user32 -limm32 -lshell32 -lole32 -luuid"
+ GDK_EXTRA_LIBS="$GDK_EXTRA_LIBS -lgdi32 -user32 -limm32 -lshell32 -lole32 -Wl,-luuid"
AM_CONDITIONAL(USE_WIN32, true)
else
AM_CONDITIONAL(USE_WIN32, false)
AM_CONDITIONAL(ENABLE_FB_MANAGER, false)
fi
- GDK_EXTRA_CFLAGS=""
if test $pango_omitted_ft2_deps = yes ; then
GDK_EXTRA_LIBS="$FREETYPE_LIBS $GDK_EXTRA_LIBS"
fi
#
if test "x$gdktarget" = "xx11"; then
- PANGO_PACKAGES=pangoxft
+ PANGO_PACKAGES="pangoxft pangocairo"
# We no longer use pangox, but if we find it, we link to it
# for binary compatibility.
PANGO_PACKAGES="$PANGO_PACKAGES pangox"
fi
elif test "x$gdktarget" = "xwin32"; then
- PANGO_PACKAGES=pangowin32
+ PANGO_PACKAGES="pangowin32 pangocairo"
elif test "x$gdktarget" = "xlinux-fb"; then
- PANGO_PACKAGES=pangoft2
+ PANGO_PACKAGES="pangoft2 pangocairo"
else
- PANGO_PACKAGES=pango
+ PANGO_PACKAGES="pango pangocairo"
fi
# Check for Pango flags
AC_MSG_RESULT($PANGO_CFLAGS $PANGO_LIBS)
else
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.
+*** Pango not found. Pango built with Cairo support is required
+*** to build GTK+. See http://www.pango.org for Pango information.
])
fi
LIBS="$gtk_save_LIBS"
fi
-GTK_PACKAGES=atk
+GTK_PACKAGES="atk cairo"
GTK_EXTRA_LIBS=
GTK_EXTRA_CFLAGS=
GTK_DEP_LIBS="$GDK_EXTRA_LIBS $GTK_DEP_LIBS_FOR_X `$PKG_CONFIG --libs $GDK_PIXBUF_PACKAGES $GDK_PACKAGES $GTK_PACKAGES` $GTK_EXTRA_LIBS $GDK_PIXBUF_EXTRA_LIBS"
GTK_DEP_CFLAGS="`$PKG_CONFIG --cflags gthread-2.0 $GDK_PIXBUF_PACKAGES $GDK_PACKAGES $GTK_PACKAGES` $GDK_PIXBUF_EXTRA_CFLAGS $GDK_EXTRA_CFLAGS $GTK_EXTRA_CFLAGS"
+if test x"$os_win32" = xyes; then
+ GTK_EXTRA_CFLAGS="$msnative_struct"
+fi
+
AC_SUBST(GTK_PACKAGES)
AC_SUBST(GTK_EXTRA_LIBS)
AC_SUBST(GTK_EXTRA_CFLAGS)
AC_SUBST(GTK_DEBUG_FLAGS)
AC_SUBST(GTK_XIM_FLAGS)
+################################################################
+# Strip -export-dynamic from the link lines of various libraries
+################################################################
+
+#
+# pkg-config --libs gmodule includes the "export_dynamic" flag,
+# but this flag is only meaningful for executables. For libraries
+# the effect is undefined; what it causes on Linux is that the
+# export list from -export-symbols-regex is ignored and everything
+# is exported
+#
+# We are using gmodule-no-export now, but I'm leaving the stripping
+# code in place for now, since pango and atk still require gmodule.
+export_dynamic=`(./libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh`
+if test -n "$export_dynamic"; then
+ GDK_PIXBUF_DEP_LIBS=`echo $GDK_PIXBUF_DEP_LIBS | sed -e "s/$export_dynamic//"`
+ GDK_PIXBUF_XLIB_DEP_LIBS=`echo $GDK_PIXBUF_XLIB_DEP_LIBS | sed -e "s/$export_dynamic//"`
+ GDK_DEP_LIBS=`echo $GDK_DEP_LIBS | sed -e "s/$export_dynamic//"`
+ GTK_DEP_LIBS=`echo $GTK_DEP_LIBS | sed -e "s/$export_dynamic//"`
+fi
+
+
##################################################
# Checks for gtk-doc and docbook-tools
##################################################
-GTK_DOC_CHECK([1.0])
+GTK_DOC_CHECK([1.4])
AC_CHECK_PROG(DB2HTML, db2html, true, false)
AM_CONDITIONAL(HAVE_DOCBOOK, $DB2HTML)
AM_CONDITIONAL(ENABLE_MAN, test x$enable_man != xno)
+
##################################################
# Output commands
##################################################
m4macros/Makefile
po/Makefile.in
po-properties/Makefile.in
-build/Makefile
-build/win32/Makefile
-build/win32/dirent/Makefile
demos/Makefile
demos/gtk-demo/Makefile
demos/gtk-demo/geninclude.pl
docs/reference/gtk/Makefile
docs/reference/gtk/version.xml
docs/faq/Makefile
+docs/tools/Makefile
docs/tutorial/Makefile
gdk-pixbuf/Makefile
gdk-pixbuf/gdk_pixbuf.rc
gtk/xdgmime/Makefile
modules/Makefile
modules/input/Makefile
+modules/engines/Makefile
+modules/engines/pixbuf/Makefile
+modules/engines/ms-windows/Makefile
+modules/engines/ms-windows/Theme/Makefile
+modules/engines/ms-windows/Theme/gtk-2.0/Makefile
+perf/Makefile
contrib/Makefile
contrib/gdk-pixbuf-xlib/Makefile
contrib/gdk-pixbuf-xlib/gdk-pixbuf-xlib-2.0.pc
])
AC_OUTPUT
+
+echo "configuration:
+ target: $gdktarget"
+
+if test "x$gdktarget" = "xlinux-fb"; then
+ echo "Warning: The linux-fb GDK target is unmaintained"
+ echo " and may not work or even compile"
+fi
+