1 # Process this file with autoconf to produce a configure script.
2 AC_INIT(gdk/gdktypes.h)
5 # For each of the libraries we build, we define the following
6 # substituted variables:
8 # foo_PACKAGES: pkg-config packages this library requires
9 # foo_EXTRA_LIBS: Libraries this module requires not pulled in by pkg-config
10 # foo_EXTRA_CFLAGS: cflags this module requires not pulled in by pkg-config
11 # foo_DEP_LIBS: All libraries this module requires
12 # foo_DEP_CFLAGS: All cflags this module requires
15 # Save this value here, since automake will set cflags later
16 cflags_set=${CFLAGS+set}
18 dnl we to AC_DIVERT_PUSH/AC_DIVERT_POP these variable definitions so they
19 dnl are available for $ac_help expansion (don't we all *love* autoconf?)
20 GLIB_AC_DIVERT_BEFORE_HELP([
23 # GTK_MICRO_VERSION += 1;
24 # GTK_INTERFACE_AGE += 1;
25 # GTK_BINARY_AGE += 1;
26 # if any functions have been added, set GTK_INTERFACE_AGE to 0.
27 # if backwards compatibility has been broken,
28 # set GTK_BINARY_AGE and GTK_INTERFACE_AGE to 0.
35 GTK_VERSION=$GTK_MAJOR_VERSION.$GTK_MINOR_VERSION.$GTK_MICRO_VERSION
36 dnl This is the X.Y used in -lgtk-FOO-X.Y
40 AC_SUBST(GTK_MAJOR_VERSION)
41 AC_SUBST(GTK_MINOR_VERSION)
42 AC_SUBST(GTK_MICRO_VERSION)
43 AC_SUBST(GTK_INTERFACE_AGE)
44 AC_SUBST(GTK_BINARY_AGE)
45 AC_SUBST(GTK_API_VERSION)
49 #LT_RELEASE=$GTK_MAJOR_VERSION.$GTK_MINOR_VERSION
50 #LT_CURRENT=`expr $GTK_MICRO_VERSION - $GTK_INTERFACE_AGE`
51 #LT_REVISION=$GTK_INTERFACE_AGE
52 #LT_AGE=`expr $GTK_BINARY_AGE - $GTK_INTERFACE_AGE`
53 #LT_CURRENT_MINUS_AGE=`expr $LT_CURRENT - $LT_AGE`
55 LT_RELEASE=$GTK_MAJOR_VERSION.0
56 LT_CURRENT=`expr 100 '*' $GTK_MINOR_VERSION + $GTK_MICRO_VERSION - $GTK_INTERFACE_AGE`
57 LT_REVISION=$GTK_INTERFACE_AGE
58 LT_AGE=`expr $GTK_BINARY_AGE - $GTK_INTERFACE_AGE`
59 LT_CURRENT_MINUS_AGE=`expr $LT_CURRENT - $LT_AGE`
64 AC_SUBST(LT_CURRENT_MINUS_AGE)
66 # Define a string for the earliest version that this release has
67 # forward/backwards binary compatibility with. This is used for module
68 # locations. (Should this be backwards-compat instead?)
70 #GTK_BINARY_VERSION=$GTK_MAJOR_VERSION.$GTK_MINOR_VERSION.$LT_CURRENT
71 GTK_BINARY_VERSION=$GTK_MAJOR_VERSION.0.$LT_CURRENT
72 AC_SUBST(GTK_BINARY_VERSION)
75 # gdk-pixbuf gets versioned separately, and for now, using standard
76 # libtool versioning, not GTK+-style versioning
78 GDK_PIXBUF_MAJOR=$GTK_MAJOR_VERSION
79 GDK_PIXBUF_MINOR=$GTK_MINOR_VERSION
80 GDK_PIXBUF_MICRO=$GTK_MICRO_VERSION
81 GDK_PIXBUF_VERSION="${GDK_PIXBUF_MAJOR}.${GDK_PIXBUF_MINOR}.${GDK_PIXBUF_MICRO}"
82 AC_SUBST(GDK_PIXBUF_MAJOR)
83 AC_SUBST(GDK_PIXBUF_MINOR)
84 AC_SUBST(GDK_PIXBUF_MICRO)
85 AC_SUBST(GDK_PIXBUF_VERSION)
87 ## Versions of dependencies
88 GLIB_REQUIRED_VERSION=2.0.1
89 PANGO_REQUIRED_VERSION=1.0.1
90 ATK_REQUIRED_VERSION=1.0.1
97 AC_SUBST(GETTEXT_PACKAGE)
98 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE")
100 # Save this value here, since automake will set cflags later
101 cflags_set=${CFLAGS+set}
103 dnl Initialize automake stuff
104 AM_INIT_AUTOMAKE($PACKAGE, $VERSION, no-define)
106 # Specify a configuration file
107 AM_CONFIG_HEADER(config.h)
109 dnl Initialize libtool
115 dnl XXXX Hack: Set AS and ASFLAGS so that automake 1.5 will be happy
120 dnl XXXX Hack: Set CCAS and CCASFLAGS so that automake 1.6 will be happy
122 CCASFLAGS="\${CFLAGS}"
126 dnl Initialize maintainer mode
131 AC_MSG_CHECKING([for some Win32 platform])
133 *-*-mingw*|*-*-cygwin*)
140 AC_MSG_RESULT([$platform_win32])
141 AM_CONDITIONAL(PLATFORM_WIN32, test "$platform_win32" = "yes")
144 AC_MSG_CHECKING([for native Win32])
154 AC_MSG_RESULT([$os_win32])
155 AM_CONDITIONAL(OS_WIN32, test "$os_win32" = "yes")
157 if test "$os_win32" = "yes"; then
158 AC_CHECK_PROG(ms_librarian, lib.exe, yes, no)
160 AM_CONDITIONAL(MS_LIB_AVAILABLE, test x$ms_librarian = xyes)
162 dnl figure debugging default, prior to $ac_help setup
164 GLIB_AC_DIVERT_BEFORE_HELP([
165 if test `expr $GTK_MINOR_VERSION \% 2` = 1 ; then
168 debug_default=minimum
172 dnl declare --enable-* args and collect ac_help strings
173 AC_ARG_ENABLE(debug, [ --enable-debug=[no/minimum/yes] turn on debugging [default=$debug_default]],,enable_debug=$debug_default)
174 AC_ARG_ENABLE(shm, [ --enable-shm support shared memory if available [default=yes]],
175 echo $enable_shm, enable_shm="yes")
176 AC_ARG_ENABLE(ansi, [ --enable-ansi turn on strict ansi [default=no]],
178 AC_ARG_ENABLE(xim, [ --enable-xim support XIM [default=yes]],
180 AC_ARG_ENABLE(xim_inst, [ --disable-xim-inst does not use xim instantiate callback],
181 , enable_xim_inst="maybe")
182 AC_ARG_ENABLE(xkb, [ --enable-xkb support XKB [default=maybe]],
183 , enable_xkb="maybe")
184 AC_ARG_ENABLE(rebuilds, [ --disable-rebuilds disable all source autogeneration rules],,enable_rebuilds=yes)
186 AC_ARG_WITH(xinput, [ --with-xinput=[no/yes] support XInput ])
188 AC_ARG_WITH(wintab, [ --with-wintab=DIRECTORY use Wintab API with win32 backend])
189 AC_ARG_WITH(ie55, [ --with-ie55=DIRECTORY IE5.5 libs and headers (for Active IMM)])
191 GLIB_AC_DIVERT_BEFORE_HELP([
192 if test "$platform_win32" = yes; then
199 AC_ARG_WITH(gdktarget, [ --with-gdktarget=[[x11/linux-fb/win32]] select GDK target [default=$gdktarget]],
200 gdktarget=$with_gdktarget)
204 x11|linux-fb|win32) ;;
205 *) AC_MSG_ERROR([Invalid target for GDK: use x11, linux-fb or win32.]);;
208 gdktargetlib=libgdk-$gdktarget-$GTK_API_VERSION.la
209 gtktargetlib=libgtk-$gdktarget-$GTK_API_VERSION.la
211 AC_SUBST(gdktargetlib)
212 AC_SUBST(gtktargetlib)
214 AC_ARG_ENABLE(shadowfb, [ --disable-shadowfb disable shadowfb support for linux-fb],,enable_shadowfb=yes)
216 AC_ARG_ENABLE(fbmanager, [ --enable-fbmanager enable framebuffer manager support (GtkFB)],enable_fbmanager=yes,enable_fbmanager=no)
218 if test "x$enable_debug" = "xyes"; then
219 test "$cflags_set" = set || CFLAGS="$CFLAGS -g"
220 GTK_DEBUG_FLAGS="-DG_ENABLE_DEBUG"
222 if test "x$enable_debug" = "xno"; then
223 GTK_DEBUG_FLAGS="-DG_DISABLE_ASSERT -DG_DISABLE_CHECKS -DG_DISABLE_CAST_CHECKS"
225 GTK_DEBUG_FLAGS="-DG_DISABLE_CAST_CHECKS"
229 AC_DEFINE_UNQUOTED(GTK_COMPILED_WITH_DEBUGGING, "${enable_debug}")
232 # Build time sanity check...
235 # Checks for programs.
242 if test "x$GCC" = "xyes"; then
244 *[\ \ ]-Wall[\ \ ]*) ;;
245 *) CFLAGS="$CFLAGS -Wall" ;;
248 if test "x$enable_ansi" = "xyes"; then
250 *[\ \ ]-ansi[\ \ ]*) ;;
251 *) CFLAGS="$CFLAGS -ansi" ;;
255 *[\ \ ]-pedantic[\ \ ]*) ;;
256 *) CFLAGS="$CFLAGS -pedantic" ;;
260 if test "$os_win32" = "yes"; then
261 case "$CC $CFLAGS " in
262 *[[\ \ ]]-fnative-struct[[\ \ ]]*) ;;
263 *) CFLAGS="$CFLAGS -fnative-struct" ;;
269 # Honor aclocal flags
270 ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
272 ## Initial sanity check, done here so that users get told they
273 ## have the wrong dependencies as early in the process as possible.
274 ## Later on we actually use the cflags/libs from separate pkg-config
275 ## calls. Oh, also the later pkg-config calls don't include
276 ## the version requirements since those make the module lists
277 ## annoying to construct
278 PKG_CHECK_MODULES(BASE_DEPENDENCIES, glib-2.0 >= $GLIB_REQUIRED_VERSION atk >= $ATK_REQUIRED_VERSION pango >= $PANGO_REQUIRED_VERSION)
280 if test "$os_win32" != yes; then
281 # libtool option to control which symbols are exported
282 # right now, symbols starting with _ are not exported
283 LIBTOOL_EXPORT_OPTIONS='-export-symbols-regex "^[[^_]].*"'
285 # We currently use .def files on Windows (for gdk-pixbuf, gdk and gtk)
286 LIBTOOL_EXPORT_OPTIONS=
288 AC_SUBST(LIBTOOL_EXPORT_OPTIONS)
290 dnl ******************************************************
291 dnl * See whether to include shared library dependencies *
292 dnl ******************************************************
294 AC_ARG_ENABLE(explicit-deps,
295 [ --enable-explicit-deps=[yes/no/auto] use explicit dependencies in .pc files [default=auto]],
296 enable_explicit_deps="$enableval",
297 enable_explicit_deps=auto)
299 AC_MSG_CHECKING([Whether to write dependencies into .pc files])
300 case $enable_explicit_deps in
302 deplib_check_method=`(./libtool --config; echo eval echo \\$deplib_check_method) | sh`
303 if test "X$deplib_check_method" = Xnone || test "x$enable_static" = xyes ; then
304 enable_explicit_deps=yes
306 enable_explicit_deps=no
311 *) AC_MSG_ERROR([Value given to --enable-explicit-deps must be one of yes, no or auto])
314 AC_MSG_RESULT($enable_explicit_deps)
316 AM_CONDITIONAL(DISABLE_EXPLICIT_DEPS, test $enable_explicit_deps = no)
318 # define a MAINT-like variable REBUILD which is set if Perl
319 # and awk are found, so autogenerated sources can be rebuilt
321 AC_CHECK_PROGS(PERL, perl5 perl)
323 # We would like indent, but don't require it.
324 AC_CHECK_PROG(INDENT, indent, indent)
327 if test "x$enable_rebuilds" = "xyes" && \
329 $PERL -e 'exit !($] >= 5.002)' > /dev/null 2>&1 ; then
334 AC_CHECK_FUNCS(lstat mkstemp)
336 # sigsetjmp is a macro on some platforms, so AC_CHECK_FUNCS is not reliable
337 AC_MSG_CHECKING(for sigsetjmp)
338 AC_TRY_LINK([#include <setjmp.h>], [
341 ], gtk_ok=yes, gtk_ok=no)
342 AC_MSG_RESULT($gtk_ok)
343 if test "$gtk_ok" = "yes"; then
344 AC_DEFINE(HAVE_SIGSETJMP)
347 AC_MSG_CHECKING(whether make is GNU Make)
350 if $ac_make --version 2>/dev/null | grep '^GNU Make ' >/dev/null ; then
351 STRIP_BEGIN='$(strip $(STRIP_DUMMY)'
358 AC_SUBST(STRIP_DUMMY)
359 AC_SUBST(STRIP_BEGIN)
363 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"
365 LIBS="$LIBS $INTLLIBS"
367 # AM_GLIB_GNU_GETTEXT above substs $DATADIRNAME
368 # this is the directory where the *.{mo,gmo} files are installed
369 gtklocaledir='${prefix}/${DATADIRNAME}/locale'
370 AC_SUBST(gtklocaledir)
372 dnl The DU4 header files don't provide library prototypes unless
373 dnl -std1 is given to the native cc.
374 AC_MSG_CHECKING([for extra flags to get ANSI library prototypes])
378 AC_TRY_RUN([#include <math.h>
379 int main (void) { return (log(1) != log(1.)); }],
380 AC_MSG_RESULT(none needed),
381 gtk_save_CFLAGS="$CFLAGS"
382 CFLAGS="$CFLAGS -std1"
383 AC_TRY_RUN([#include <math.h>
384 int main (void) { return (log(1) != log(1.)); }],
385 AC_MSG_RESULT(-std1),
387 CFLAGS="$gtk_save_CFLAGS"
389 [No ANSI prototypes found in library. (-std1 didn't work.)]),
392 AC_MSG_RESULT(none needed)
396 AC_MSG_CHECKING(for the BeOS)
407 dnl NeXTStep cc seems to need this
408 AC_MSG_CHECKING([for extra flags for POSIX compliance])
409 AC_TRY_COMPILE([#include <dirent.h>], [DIR *dir;],
410 AC_MSG_RESULT(none needed),
411 gtk_save_CFLAGS="$CFLAGS"
412 CFLAGS="$CFLAGS -posix"
413 AC_TRY_COMPILE([#include <dirent.h>], [DIR *dir;],
414 AC_MSG_RESULT(-posix),
416 CFLAGS="$gtk_save_CFLAGS"
417 AC_MSG_WARN([Could not determine POSIX flag. (-posix didn't work.)])))
420 # Run AM_PATH_GLIB_2_0 to make sure that GLib is installed and working
423 GLIB_PACKAGES="gobject-2.0 gmodule-2.0"
425 AM_PATH_GLIB_2_0($GLIB_REQUIRED_VERSION, :,
427 *** GLIB $GLIB_REQUIRED_VERSION or better is required. The latest version of
428 *** GLIB is always available from ftp://ftp.gtk.org/.]),
429 gobject gmodule gthread)
432 dnl Check for bind_textdomain_codeset, including -lintl if GLib brings it in.
435 LIBS="$LIBS $GLIB_LIBS"
436 AC_CHECK_FUNCS(bind_textdomain_codeset)
439 AC_CHECK_HEADERS(pwd.h, AC_DEFINE(HAVE_PWD_H))
440 AC_CHECK_HEADERS(sys/time.h, AC_DEFINE(HAVE_SYS_TIME_H))
441 AC_CHECK_HEADERS(unistd.h, AC_DEFINE(HAVE_UNISTD_H))
442 AC_CHECK_HEADERS(winsock.h, AC_DEFINE(HAVE_WINSOCK_H))
444 if test "${with_ie55+set}" = set && test $with_ie55 != no; then
445 AC_MSG_CHECKING([for dimm.h])
446 saved_CFLAGS="$CFLAGS"
447 CFLAGS="$CFLAGS -idirafter $with_ie55/Include"
448 AC_TRY_COMPILE([#include <windows.h>
451 /* The w32api imm.h clashes a bit with the IE5.5 dimm.h */
452 #define IMEMENUITEMINFOA hidden_IMEMENUITEMINFOA
453 #define IMEMENUITEMINFOW hidden_IMEMENUITEMINFOW
455 #undef IMEMENUITEMINFOA
456 #undef IMEMENUITEMINFOW
462 AC_MSG_CHECKING([for IE55 uuid.lib])
463 if test -f $with_ie55/Lib/uuid.lib ; then
466 AC_DEFINE(HAVE_DIMM_H)
467 IE55_UUID_LIB="$with_ie55/Lib/uuid.lib"
468 AC_SUBST(IE55_UUID_LIB)
471 CFLAGS="$saved_CFLAGS"
476 CFLAGS="$saved_CFLAGS"
479 AM_CONDITIONAL(HAVE_IE55, test x$have_ie55 = xyes)
481 if test "${with_wintab+set}" = set && test $with_wintab != no; then
482 AC_MSG_CHECKING([for wintab.h])
483 saved_CFLAGS="$CFLAGS"
484 CFLAGS="$CFLAGS -I$with_wintab/include"
485 AC_TRY_COMPILE([#include <windows.h>
486 #include <wintab.h>],
489 AC_MSG_CHECKING([for wntab32x.lib])
490 if test -f $with_wintab/lib/i386/wntab32x.lib ; then
493 AC_DEFINE(HAVE_WINTAB)
494 WINTAB_LIB="$with_wintab/lib/i386/wntab32x.lib"
498 CFLAGS="$saved_cflags"
503 CFLAGS="$saved_cflags"
506 AM_CONDITIONAL(HAVE_WINTAB, test x$have_wintab = xyes)
508 saved_cflags="$CFLAGS"
509 saved_ldflags="$LDFLAGS"
512 # Checks for header files.
515 # Checks for typedefs, structures, and compiler characteristics.
518 # Checks for library functions.
522 AC_CHECK_FUNCS(getresuid)
525 # Check if <sys/select.h> needs to be included for fd_set
526 AC_MSG_CHECKING([for fd_set])
527 AC_TRY_COMPILE([#include <sys/types.h>],
528 [fd_set readMask, writeMask;], gtk_ok=yes, gtk_ok=no)
529 if test $gtk_ok = yes; then
530 AC_MSG_RESULT([yes, found in sys/types.h])
532 AC_HEADER_EGREP(fd_mask, sys/select.h, gtk_ok=yes)
533 if test $gtk_ok = yes; then
534 AC_DEFINE(HAVE_SYS_SELECT_H)
535 AC_MSG_RESULT([yes, found in sys/select.h])
542 # `widechar' tests for gdki18n.h
543 AC_MSG_CHECKING(for wchar.h)
544 AC_TRY_CPP([#include <wchar.h>], gdk_wchar_h=yes, gdk_wchar_h=no)
545 if test $gdk_wchar_h = yes; then
546 AC_DEFINE(HAVE_WCHAR_H,1,[Have wchar.h include file])
548 AC_MSG_RESULT($gdk_wchar_h)
550 # Check for wctype.h (for iswalnum)
551 AC_MSG_CHECKING(for wctype.h)
552 AC_TRY_CPP([#include <wctype.h>], gdk_wctype_h=yes, gdk_wctype_h=no)
553 if test $gdk_wctype_h = yes; then
554 AC_DEFINE(HAVE_WCTYPE_H,1,[Have wctype.h include file])
556 AC_MSG_RESULT($gdk_wctype_h)
558 # in Solaris 2.5, `iswalnum' is in -lw
560 AC_CHECK_FUNC(iswalnum,,[AC_CHECK_LIB(w,iswalnum,GDK_WLIBS=-lw)])
563 LIBS="$LIBS $GDK_WLIBS"
564 # The following is necessary for Linux libc-5.4.38
565 AC_MSG_CHECKING(if iswalnum() and friends are properly defined)
566 AC_TRY_LINK([#include <stdlib.h>],[
567 #if (defined(HAVE_WCTYPE_H) || defined(HAVE_WCHAR_H))
568 # ifdef HAVE_WCTYPE_H
576 # define iswalnum(c) ((wchar_t)(c) <= 0xFF && isalnum(c))
578 iswalnum((wchar_t) 0);
579 ], gdk_working_wctype=yes, gdk_working_wctype=no)
582 if test $gdk_working_wctype = no; then
583 AC_DEFINE(HAVE_BROKEN_WCTYPE,1,[Is the wctype implementation broken])
586 AC_MSG_RESULT($gdk_working_wctype)
591 ##################################################
592 # Checks for gdk-pixbuf
593 ##################################################
595 AC_MSG_CHECKING(whether to build gmodulized gdk-pixbuf)
597 AC_ARG_ENABLE(modules, [ --disable-modules disable dynamic module loading],[
598 if test x$withval = xyes; then
607 if test x$with_modules = xno; then
611 AC_MSG_CHECKING(whether dynamic modules work)
612 ## for loop is to strip newline
613 tmp=`$PKG_CONFIG --variable=gmodule_supported gmodule-2.0`
618 dnl Now we check to see if our libtool supports shared lib deps
619 dnl (in a rather ugly way even)
621 pixbuf_libtool_config="${CONFIG_SHELL-/bin/sh} ./libtool --config"
622 pixbuf_deplibs_check=`$pixbuf_libtool_config | \
623 grep '^[[a-z_]]*check[[a-z_]]*_method=[['\''"]]' | \
624 sed 's/.*[['\''"]]\(.*\)[['\''"]]$/\1/'`
625 if test "x$pixbuf_deplibs_check" = "xnone" || \
626 test "x$pixbuf_deplibs_check" = "xunknown" || \
627 test "x$pixbuf_deplibs_check" = "x"; then
633 AC_DEFINE(USE_GMODULE)
640 dnl We allow people to disable image loaders explicitely, but if they don't we error
641 dnl out so that people don't accidentally build without them.
643 AC_ARG_WITH(libpng, [ --without-libpng disable PNG loader for gdk-pixbuf])
644 AC_ARG_WITH(libmng, [ --without-libmng disable MNG loader for gdk-pixbuf])
645 AC_ARG_WITH(libjpeg, [ --without-libjpeg disable JPEG loader for gdk-pixbuf])
646 AC_ARG_WITH(libtiff, [ --without-libtiff disable TIFF loader for gdk-pixbuf])
649 if test x$with_libtiff != xno && test -z "$LIBTIFF"; then
650 AC_CHECK_LIB(tiff, TIFFReadScanline,
651 [AC_CHECK_HEADER(tiffio.h,
652 TIFF='tiff'; LIBTIFF='-ltiff',
653 AC_MSG_WARN(*** TIFF loader will not be built (TIFF header files not found) ***))],
654 [AC_CHECK_LIB(tiff, TIFFWriteScanline,
655 [AC_CHECK_HEADER(tiffio.h,
656 TIFF='tiff'; LIBTIFF='-ltiff -ljpeg -lz',
657 AC_MSG_WARN(*** TIFF loader will not be built (TIFF header files not found) ***))],
658 [AC_CHECK_LIB(tiff34, TIFFFlushData,
659 [AC_CHECK_HEADER(tiffio.h,
660 TIFF='tiff'; LIBTIFF='-ltiff34 -ljpeg -lz',
661 AC_MSG_WARN(*** TIFF loader will not be built (TIFF header files not found) ***))],
662 AC_MSG_WARN(*** TIFF plug-in will not be built (TIFF library not found) ***), -ljpeg -lz -lm)], -ljpeg -lz -lm)], -lm)
665 if test x$with_libtiff != xno && test -z "$LIBTIFF"; then
667 *** Checks for TIFF loader failed. You can build without it by passing
668 *** --without-libtiff to configure but some programs using GTK+ may
669 *** not work properly])
673 if test x$with_libjpeg != xno && test -z "$LIBJPEG"; then
674 AC_CHECK_LIB(jpeg, jpeg_destroy_decompress,
677 AC_MSG_WARN(*** JPEG loader will not be built (JPEG library not found) ***))
678 if test "$jpeg_ok" = yes; then
679 AC_MSG_CHECKING([for jpeglib.h])
685 #include <jpeglib.h>],
688 AC_MSG_RESULT($jpeg_ok)
689 if test "$jpeg_ok" = yes; then
691 AC_CHECK_LIB(jpeg, jpeg_simple_progression,
692 AC_DEFINE(HAVE_PROGRESSIVE_JPEG),
693 AC_MSG_WARN(JPEG library does not support progressive saving.))
695 AC_MSG_WARN(*** JPEG loader will not be built (JPEG header file not found) ***)
700 if test x$with_libjpeg != xno && test -z "$LIBJPEG"; then
702 *** Checks for JPEG loader failed. You can build without it by passing
703 *** --without-libjpeg to configure but some programs using GTK+ may
704 *** not work properly])
708 if test x$with_libpng != xno && test -z "$LIBPNG"; then
709 AC_MSG_CHECKING(for libpng12)
710 if $PKG_CONFIG --exists libpng12 ; then
713 PNG_DEP_CFLAGS_PACKAGES=libpng12
714 LIBPNG=`$PKG_CONFIG --libs libpng12`
717 AC_CHECK_LIB(png, png_read_info,
718 [AC_CHECK_HEADER(png.h,
721 AC_MSG_WARN(*** PNG loader will not be built (PNG library not found) ***), -lz -lm)
722 if test "$png_ok" = yes; then
723 AC_MSG_CHECKING([for png_structp in png.h])
724 AC_TRY_COMPILE([#include <png.h>],
725 [png_structp pp; png_infop info; png_colorp cmap; png_create_read_struct;],
728 AC_MSG_RESULT($png_ok)
729 if test "$png_ok" = yes; then
730 PNG='png'; LIBPNG='-lpng -lz'
732 AC_MSG_WARN(*** PNG loader will not be built (PNG library is too old) ***)
735 AC_MSG_WARN(*** PNG loader will not be built (PNG header file not found) ***)
740 if test x$with_libpng != xno && test -z "$LIBPNG"; then
742 *** Checks for PNG loader failed. You can build without it by passing
743 *** --without-libpng to configure but many programs using GTK+ will
744 *** not work properly. The PNG loader is also needed if you are compiling
749 if test x$with_libmng != xno && test -z "$LIBMNG"; then
750 AC_CHECK_LIB(mng, mng_initialize,
751 [AC_CHECK_HEADER(libmng.h,
754 AC_MSG_WARN(*** MNG loader will not be built (MNG library not found) ***), -lz -lm)
755 AC_MSG_RESULT($mng_ok)
756 if test "$mng_ok" = yes; then
757 MNG='mng'; LIBMNG='-lmng -lz'
759 AC_MSG_WARN(*** MNG loader will not be built (MNG header file not found) ***)
768 AM_CONDITIONAL(BUILD_DYNAMIC_MODULES, $dynworks)
771 # Allow building some or all gdk-pixbuf loaders included
773 AC_MSG_CHECKING(pixbuf loaders to build)
775 AC_ARG_WITH(included_loaders, [ --with-included-loaders=LOADER1,LOADER2,... build the specified loaders into gdk-pixbuf (only used if module loading disabled)])
780 ## if the option was specified, leave it; otherwise disable included loaders
781 if test x$with_included_loaders = xno; then
782 with_included_loaders=yes
786 all_loaders="png,mng,bmp,wbmp,gif,ico,jpeg,pnm,ras,tiff,xpm,tga"
788 # If no loaders specified, include all
789 if test "x$with_included_loaders" = xyes ; then
790 included_loaders="$all_loaders"
792 included_loaders="$with_included_loaders"
795 AC_MSG_RESULT($included_loaders)
798 INCLUDED_LOADER_DEFINE=
800 IFS="${IFS= }"; gtk_save_ifs="$IFS"; IFS=","
801 for loader in $included_loaders; do
802 if echo "$all_loaders" | grep "\(^\|\,\)$loader\(\$\|\,\)" > /dev/null; then
805 AC_MSG_ERROR([the specified loader $loader does not exist])
808 INCLUDED_LOADER_OBJ="$INCLUDED_LOADER_OBJ libpixbufloader-static-$loader.la"
809 INCLUDED_LOADER_DEFINE="$INCLUDED_LOADER_DEFINE -DINCLUDE_$loader"
812 AC_SUBST(INCLUDED_LOADER_OBJ)
813 AC_SUBST(INCLUDED_LOADER_DEFINE)
819 AM_CONDITIONAL(HAVE_TIFF, test "x$LIBTIFF" != x)
820 AM_CONDITIONAL(HAVE_PNG, test "x$LIBPNG" != x)
821 AM_CONDITIONAL(HAVE_MNG, test "x$LIBMNG" != x)
822 AM_CONDITIONAL(HAVE_JPEG, test "x$LIBJPEG" != x)
826 if echo "$included_loaders" | grep "\(^\|\,\)tiff\(\$\|\,\)" > /dev/null; then
827 STATIC_LIB_DEPS="$STATIC_LIB_DEPS $LIBTIFF"
829 if echo "$included_loaders" | grep "\(^\|\,\)jpeg\(\$\|\,\)" > /dev/null; then
830 STATIC_LIB_DEPS="$STATIC_LIB_DEPS $LIBJPEG"
832 if echo "$included_loaders" | grep "\(^\|\,\)png\(\$\|\,\)" > /dev/null; then
833 STATIC_LIB_DEPS="$STATIC_LIB_DEPS $LIBPNG"
835 if echo "$included_loaders" | grep "\(^\|\,\)mng\(\$\|\,\)" > /dev/null; then
836 STATIC_LIB_DEPS="$STATIC_LIB_DEPS $LIBMNG"
839 STATIC_LIB_DEPS="$LIBTIFF $LIBJPEG $LIBPNG $LIBMNG"
842 # Checks to see if we should compile in MMX support (there will be
843 # a runtime test when the code is actually run to see if it should
844 # be used - this just checks if we can compile it.)
846 # This code is partially taken from Mesa
848 AC_MSG_CHECKING(for x86 platform)
850 i386|i486|i586|i686|i786|k6|k7)
856 AC_MSG_RESULT($use_x86_asm)
859 if test $use_x86_asm = yes; then
863 AC_MSG_CHECKING(compiler support for MMX)
864 cp $srcdir/gdk-pixbuf/pixops/scale_line_22_33_mmx.S conftest.S
865 if AC_TRY_EVAL(ac_compile); then
872 if test $use_mmx_asm = yes; then
880 AM_CONDITIONAL(USE_MMX, test x$use_mmx_asm = xyes)
882 dnl Look for a host system's gdk-pixbuf-csource if we are cross-compiling
884 AM_CONDITIONAL(CROSS_COMPILING, test $build != $host)
886 if test $CROSS_COMPILING; then
887 AC_PATH_PROG(GDK_PIXBUF_CSOURCE, gdk-pixbuf-csource, no)
888 if test x$GDK_PIXBUF_CSOURCE = xno; then
889 AC_MSG_ERROR(Could not find a gdk-pixbuf-csource in your PATH)
893 GDK_PIXBUF_PACKAGES="gmodule-2.0 gobject-2.0"
894 GDK_PIXBUF_EXTRA_LIBS="$STATIC_LIB_DEPS $MATH_LIB"
895 GDK_PIXBUF_EXTRA_CFLAGS=
896 GDK_PIXBUF_DEP_LIBS="`$PKG_CONFIG --libs $GDK_PIXBUF_PACKAGES` $GDK_PIXBUF_EXTRA_LIBS"
897 GDK_PIXBUF_DEP_CFLAGS="`$PKG_CONFIG --cflags gthread-2.0 $GDK_PIXBUF_PACKAGES $PNG_DEP_CFLAGS_PACKAGES` $GDK_PIXBUF_EXTRA_CFLAGS"
899 AC_SUBST(GDK_PIXBUF_PACKAGES)
900 AC_SUBST(GDK_PIXBUF_EXTRA_LIBS)
901 AC_SUBST(GDK_PIXBUF_EXTRA_CFLAGS)
902 AC_SUBST(GDK_PIXBUF_DEP_LIBS)
903 AC_SUBST(GDK_PIXBUF_DEP_CFLAGS)
906 ########################################
907 # Windowing system checks
908 ########################################
910 GDK_EXTRA_LIBS=$GDK_WLIBS
915 if test "x$gdktarget" = "xlinux-fb" || test "x$gdktarget" = "xx11" ; then
917 # Checks for FreeType
920 AC_PATH_PROG(FREETYPE_CONFIG, freetype-config, no)
921 if test "x$FREETYPE_CONFIG" != "xno" ; then
922 FREETYPE_CFLAGS=`$FREETYPE_CONFIG --cflags`
923 FREETYPE_LIBS=`$FREETYPE_CONFIG --libs`
925 AC_CHECK_LIB(freetype, FT_New_Face, have_freetype=true
928 if $have_freetype ; then
929 gtk_save_cppflags="$CPPFLAGS"
930 CPPFLAGS="$CPPFLAGS $FREETYPE_CFLAGS"
932 AC_MSG_CHECKING([For sufficiently new FreeType (at least 2.0.1)])
934 #include <freetype/freetype.h>
937 [(void)1;],:,have_freetype=false)
938 if $have_freetype ; then
944 CPPFLAGS="$gtk_save_cppflags"
947 AC_SUBST(FREETYPE_LIBS)
948 AC_SUBST(FREETYPE_CFLAGS)
951 if test "x$gdktarget" = "xx11"; then
952 # We start off with the libraries from Pango
954 if $PKG_CONFIG --exists pangox ; then : ; else
955 AC_MSG_ERROR([pangox Pango backend is required for x11 target])
958 ## be sure we also have Pango built with xft support
959 if $PKG_CONFIG --exists pangoxft ; then
960 PANGO_PACKAGES="pangox pangoxft"
963 if $have_freetype ; then
966 AC_MSG_ERROR([pangoxft Pango backend found but did not find freetype libraries])
969 PANGO_PACKAGES="pangox"
973 AM_CONDITIONAL(HAVE_XFT, $have_xft)
976 # If Pango included the shared library dependencies from X11 in
977 # the pkg-config output, then we use that (to avoid duplicates).
978 # but if they were omitted to avoid binary compatibility problems
979 # then we need to repeat the checks.
981 x_libs="`$PKG_CONFIG --libs $PANGO_PACKAGES`"
983 *-lX11*) pango_omitted_x_deps=no ;;
984 *) pango_omitted_x_deps=yes ;;
987 x_cflags="`$PKG_CONFIG --cflags $PANGO_PACKAGES`"
990 if test $pango_omitted_x_deps = yes ; then
993 if test x$no_x = xyes ; then
994 AC_MSG_ERROR([X development libraries not found])
997 x_libs="$X_LIBS -lX11 $X_EXTRA_LIBS"
1000 # Checks for Xft/XRender
1004 if test $have_xft = true ; then
1005 gtk_save_cppflags="$CPPFLAGS"
1006 CPPFLAGS="$CPPFLAGS $x_cflags"
1009 AC_CHECK_LIB(Xrender, XRenderFindFormat,
1010 [AC_CHECK_LIB(Xft, XftFontOpen,
1011 [AC_CHECK_HEADER(X11/Xft/XftFreetype.h,
1013 :,-lXrender -lXext $x_libs $FREETYPE_LIBS)]
1016 CPPFLAGS="$gtk_save_cppflags"
1019 x_libs="$X_LIBS -lXft -lXrender -lXext -lX11 $FREETYPE_LIBS $X_EXTRA_LIBS"
1021 AC_MSG_ERROR([pangoxft Pango backend found, but Xft not found])
1026 ## Strip the .la files
1028 x_libs_for_checks=""
1029 for I in $x_libs ; do
1032 *) x_libs_for_checks="$x_libs_for_checks $I" ;;
1036 # Sanity check for the X11 library
1037 AC_CHECK_LIB(X11, XOpenDisplay, :,
1038 AC_MSG_ERROR([*** libX11 not found. Check 'config.log' for more details.]),
1041 if test "x$enable_shm" = "xyes"; then
1042 # Check for the Xext library (needed for XShm extention)
1043 AC_CHECK_LIB(Xext, XShmAttach,
1044 if test -z "`echo $x_libs | grep "\-lXext" 2> /dev/null`"; then
1045 x_extra_libs="-lXext"
1047 # On AIX, it is in XextSam instead, but we still need -lXext
1048 AC_CHECK_LIB(XextSam, XShmAttach,
1049 if test -z "`echo $x_libs | grep "\-lXext" 2> /dev/null`"; then
1050 x_extra_libs="-lXextSam -lXext"
1052 x_extra_libs="-lXextSam"
1053 fi, , $x_libs_for_checks),
1057 GDK_PIXBUF_XLIB_EXTRA_CFLAGS="$x_cflags"
1058 # Don't ever pull in the pangoxft libraries for gdk-pixbuf-x11
1059 GDK_PIXBUF_XLIB_EXTRA_LIBS="$x_extra_libs `$PKG_CONFIG --libs pangox`"
1061 # Check for Xinerama extension (Solaris impl or Xfree impl)
1066 use_solaris_xinerama=yes
1067 AC_CHECK_LIB(Xext, XineramaGetInfo,
1068 use_solaris_xinerama=yes, use_solaris_xinerama=no)
1069 if test "x$use_solaris_xinerama" = "xyes"; then
1070 AC_CHECK_HEADER(X11/extensions/xinerama.h,
1071 if test -z "`echo $x_extra_libs $x_libs | grep "\-lXext" 2> /dev/null`"; then
1072 x_extra_libs="-lXext $x_extra_libs"
1074 AC_DEFINE(HAVE_SOLARIS_XINERAMA)
1075 AC_DEFINE(HAVE_XINERAMA), use_solaris_xinerama=no)
1077 AC_MSG_CHECKING(for Xinerama support on Solaris)
1078 AC_MSG_RESULT($use_solaris_xinerama);
1082 use_xfree_xinerama=yes
1083 AC_CHECK_LIB(Xinerama, XineramaQueryExtension,
1084 [AC_CHECK_HEADER(extensions/Xinerama.h,
1085 x_extra_libs="-lXinerama $x_extra_libs"
1086 if test -z "`echo $x_extra_libs $x_libs | grep "\-lXext" 2> /dev/null`"; then
1087 x_extra_libs="-lXext $x_extra_libs"
1089 AC_DEFINE(HAVE_XFREE_XINERAMA)
1090 AC_DEFINE(HAVE_XINERAMA),
1091 use_xfree_xinerama=no)],
1092 use_xfree_xinerama=no)
1093 AC_MSG_CHECKING(for Xinerama support on XFree86)
1094 AC_MSG_RESULT($use_xfree_xinerama);
1098 # Check for shaped window extension
1100 AC_CHECK_LIB(Xext, XShapeCombineMask,
1101 if test -z "`echo $x_extra_libs $x_libs | grep "\-lXext" 2> /dev/null`"; then
1102 x_extra_libs="-lXext $x_extra_libs"
1104 AC_DEFINE(HAVE_SHAPE_EXT),
1108 # Check for XConvertCase (X11R6 specific)
1110 AC_CHECK_LIB(X11, XConvertCase,
1111 AC_DEFINE(HAVE_XCONVERTCASE),
1115 # Check for XIM support.
1117 AC_CHECK_LIB(X11, XUnregisterIMInstantiateCallback,
1119 enable_xim_inst="no",
1122 # On Solaris, calling XRegisterIMInstantiateCallback seems to
1123 # cause an immediate segfault, so we disable it, unless
1124 # the user specifically forces it to be on.
1126 if test x$enable_xim_inst = xmaybe ; then
1129 enable_xim_inst="no"
1132 enable_xim_inst="yes"
1137 if test "x$enable_xim" = "xyes"; then
1138 GTK_XIM_FLAGS="-DUSE_XIM"
1139 if test "x$enable_xim_inst" = "xyes"; then
1140 AC_DEFINE(USE_X11R6_XIM)
1144 # Check for XKB support.
1146 if test "x$enable_xkb" = "xyes"; then
1147 AC_MSG_WARN(XKB support explicitly enabled)
1149 elif test "x$enable_xkb" = "xmaybe"; then
1150 AC_CHECK_LIB(X11, XkbQueryExtension,
1151 AC_DEFINE(HAVE_XKB),
1155 AC_MSG_WARN(XKB support explicitly disabled)
1158 x_cflags="$X_CFLAGS"
1159 x_ldflags="$X_LDFLAGS"
1161 # set up things for XInput
1163 if test "x$with_xinput" = "xxfree" || test "x$with_xinput" = "xyes"; then
1164 AC_DEFINE(XINPUT_XFREE)
1165 x_extra_libs="-lXi $x_extra_libs"
1167 AC_DEFINE(XINPUT_NONE)
1170 AM_CONDITIONAL(XINPUT_XFREE, test x$with_xinput = xxfree)
1172 if test "x$enable_shm" = "xyes"; then
1173 # Check for shared memory
1174 AC_CHECK_HEADER(sys/ipc.h, AC_DEFINE(HAVE_IPC_H), no_sys_ipc=yes)
1175 AC_CHECK_HEADER(sys/shm.h, AC_DEFINE(HAVE_SHM_H), no_sys_shm=yes)
1177 # Check for the X shared memory extension header file
1179 AC_MSG_CHECKING(X11/extensions/XShm.h)
1180 if test "x$no_xext_lib" = "xyes"; then
1183 gtk_save_CFLAGS="$CFLAGS"
1184 CFLAGS="$CFLAGS $x_cflags"
1187 #include <sys/types.h>
1188 #include <sys/ipc.h>
1189 #include <sys/shm.h>
1190 #include <X11/Xlib.h>
1191 #include <X11/Xutil.h>
1192 #include <X11/extensions/XShm.h>
1193 ], [XShmSegmentInfo *x_shm_info;], have_xshm=yes)
1194 CFLAGS="$gtk_save_CFLAGS"
1196 AC_MSG_RESULT($have_xshm)
1197 if test $have_xshm = yes ; then
1198 AC_DEFINE(HAVE_XSHM_H)
1203 if test $pango_omitted_x_deps = yes ; then
1204 GDK_EXTRA_LIBS="$x_extra_libs $x_libs $GDK_EXTRA_LIBS"
1206 GDK_EXTRA_LIBS="$x_extra_libs $GDK_EXTRA_LIBS"
1209 AM_CONDITIONAL(USE_X11, true)
1211 AM_CONDITIONAL(USE_X11, false)
1214 if test "x$gdktarget" = "xwin32"; then
1215 # We start off with the libraries from Pango
1217 ## be sure we also have Pango built with win32 support
1218 PANGO_PACKAGES="pangowin32"
1220 if test x$have_wintab = xyes; then
1221 GDK_WIN32_EXTRA_CFLAGS="-I $with_wintab/include"
1222 AC_SUBST(GDK_WIN32_EXTRA_CFLAGS)
1225 GDK_EXTRA_LIBS="$GDK_EXTRA_LIBS -lgdi32 -user32 -limm32 -lshell32 -lole32 -luuid"
1226 AM_CONDITIONAL(USE_WIN32, true)
1228 AM_CONDITIONAL(USE_WIN32, false)
1231 AC_SUBST(xinput_progs)
1233 GDK_PIXBUF_XLIB_PACKAGES=
1234 GDK_PIXBUF_XLIB_DEP_LIBS="`$PKG_CONFIG --libs $GDK_PIXBUF_PACKAGES $GDK_PIXBUF_XLIB_PACKAGES` $GDK_PIXBUF_XLIB_EXTRA_LIBS $GDK_PIXBUF_EXTRA_LIBS"
1235 GDK_PIXBUF_XLIB_DEP_CFLAGS="`$PKG_CONFIG --cflags gthread-2.0 $GDK_PIXBUF_PACKAGES $GDK_PIXBUF_XLIB_PACKAGES` $GDK_PIXBUF_EXTRA_CFLAGS $GDK_PIXBUF_XLIB_EXTRA_CFLAGS"
1237 AC_SUBST(GDK_PIXBUF_XLIB_PACKAGES)
1238 AC_SUBST(GDK_PIXBUF_XLIB_EXTRA_LIBS)
1239 AC_SUBST(GDK_PIXBUF_XLIB_EXTRA_CFLAGS)
1240 AC_SUBST(GDK_PIXBUF_XLIB_DEP_LIBS)
1241 AC_SUBST(GDK_PIXBUF_XLIB_DEP_CFLAGS)
1243 if test "x$gdktarget" = "xlinux-fb"; then
1244 if $have_freetype ; then
1247 AC_MSG_ERROR([Using linux-fb backend but freetype was not found])
1250 ft2_libs="`$PKG_CONFIG --libs pangoft2`"
1252 *-lfreetype*) pango_omitted_ft2_deps=no ;;
1253 *) pango_omitted_ft2_deps=yes ;;
1256 CFLAGS="$CFLAGS $FREETYPE_CFLAGS"
1258 if test x$enable_shadowfb = xyes ; then
1259 AC_DEFINE(ENABLE_SHADOW_FB)
1262 if test x$enable_fbmanager = xyes ; then
1263 AC_DEFINE(ENABLE_FB_MANAGER)
1264 AM_CONDITIONAL(ENABLE_FB_MANAGER, true)
1266 AM_CONDITIONAL(ENABLE_FB_MANAGER, false)
1270 if test $pango_omitted_ft2_deps = yes ; then
1271 GDK_EXTRA_LIBS="$FREETYPE_LIBS $GDK_EXTRA_LIBS"
1274 AM_CONDITIONAL(USE_LINUX_FB, true)
1276 AM_CONDITIONAL(USE_LINUX_FB, false)
1277 AM_CONDITIONAL(ENABLE_FB_MANAGER, false)
1281 # Pick correct Pango packages to use
1284 if test "x$gdktarget" = "xx11"; then
1285 if $have_xft = true ; then
1286 PANGO_PACKAGES="pangox pangoxft"
1288 PANGO_PACKAGES=pangox
1290 elif test "x$gdktarget" = "xwin32"; then
1291 PANGO_PACKAGES=pangowin32
1292 elif test "x$gdktarget" = "xlinux-fb"; then
1293 PANGO_PACKAGES=pangoft2
1295 PANGO_PACKAGES=pango
1298 # Check for Pango flags
1300 AC_MSG_CHECKING(Pango flags)
1301 if $PKG_CONFIG --exists $PANGO_PACKAGES ; then
1302 PANGO_CFLAGS=`$PKG_CONFIG --cflags $PANGO_PACKAGES`
1303 PANGO_LIBS=`$PKG_CONFIG --libs $PANGO_PACKAGES`
1305 AC_MSG_RESULT($PANGO_CFLAGS $PANGO_LIBS)
1308 *** Pango not found. Pango is required to build GTK+.
1309 *** See http://www.pango.org for Pango information.
1310 *** For the framebuffer target, you will need to build
1311 *** Pango with freetype support.
1315 CFLAGS="$CFLAGS $PANGO_CFLAGS"
1317 if $PKG_CONFIG --uninstalled $PANGO_PACKAGES; then
1320 AC_CHECK_LIB(pango-1.0, pango_context_new, :, AC_MSG_ERROR([
1321 *** Can't link to Pango. Pango is required to build
1322 *** GTK+. For more information see http://www.pango.org]), $PANGO_LIBS)
1325 CFLAGS="$saved_cflags"
1326 LDFLAGS="$saved_ldflags"
1328 GDK_PACKAGES=$PANGO_PACKAGES
1329 GDK_DEP_LIBS="$GDK_EXTRA_LIBS `$PKG_CONFIG --libs $GDK_PIXBUF_PACKAGES $GDK_PACKAGES` $GDK_PIXBUF_EXTRA_LIBS"
1330 GDK_DEP_CFLAGS="`$PKG_CONFIG --cflags gthread-2.0 $GDK_PIXBUF_PACKAGES $GDK_PACKAGES` $GDK_PIXBUF_EXTRA_CFLAGS $GDK_EXTRA_CFLAGS"
1333 # If we aren't writing explicit dependencies, then don't put the extra libraries we need
1334 # into the pkg-config files
1336 if test $enable_explicit_deps != yes ; then
1340 AC_SUBST(GDK_PACKAGES)
1341 AC_SUBST(GDK_EXTRA_LIBS)
1342 AC_SUBST(GDK_EXTRA_CFLAGS)
1343 AC_SUBST(GDK_DEP_LIBS)
1344 AC_SUBST(GDK_DEP_CFLAGS)
1347 ########################################
1348 # Check for Accessibility Toolkit flags
1349 ########################################
1352 AC_MSG_CHECKING(ATK flags)
1353 if $PKG_CONFIG --exists $ATK_PACKAGES ; then
1354 ATK_CFLAGS=`$PKG_CONFIG --cflags $ATK_PACKAGES`
1355 ATK_LIBS=`$PKG_CONFIG --libs $ATK_PACKAGES`
1357 AC_MSG_RESULT($ATK_CFLAGS $ATK_LIBS)
1360 *** Accessibility Toolkit not found. Accessibility Toolkit is required
1365 if $PKG_CONFIG --uninstalled $ATK_PACKAGES; then
1368 AC_CHECK_LIB(atk-1.0, atk_object_get_type, : , AC_MSG_ERROR([
1369 *** Cannot link to Accessibility Toolkit. Accessibility Toolkit is required
1370 *** to build GTK+]), $ATK_LIBS $GLIB_LIBS)
1376 GTK_DEP_LIBS="$GDK_EXTRA_LIBS `$PKG_CONFIG --libs $GDK_PIXBUF_PACKAGES $GDK_PACKAGES $GTK_PACKAGES` $GTK_EXTRA_LIBS $GDK_PIXBUF_EXTRA_LIBS"
1377 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"
1379 AC_SUBST(GTK_PACKAGES)
1380 AC_SUBST(GTK_EXTRA_LIBS)
1381 AC_SUBST(GTK_EXTRA_CFLAGS)
1382 AC_SUBST(GTK_DEP_LIBS)
1383 AC_SUBST(GTK_DEP_CFLAGS)
1386 AC_SUBST(GTK_DEBUG_FLAGS)
1387 AC_SUBST(GTK_XIM_FLAGS)
1389 ##################################################
1390 # Checks for gtk-doc and docbook-tools
1391 ##################################################
1393 AC_ARG_WITH(html-dir, [ --with-html-dir=PATH path to installed docs ])
1395 if test "x$with_html_dir" = "x" ; then
1396 HTML_DIR='${datadir}/gtk-doc/html'
1398 HTML_DIR=$with_html_dir
1403 AC_CHECK_PROG(GTKDOC, gtkdoc-mkdb, true, false)
1405 gtk_doc_min_version=0.9
1407 gtk_doc_version=`gtkdoc-mkdb --version`
1408 AC_MSG_CHECKING([gtk-doc version ($gtk_doc_version) >= $gtk_doc_min_version])
1409 if perl <<EOF ; then
1410 exit (("$gtk_doc_version" =~ /^[[0-9]]+\.[[0-9]]+$/) &&
1411 ("$gtk_doc_version" >= "$gtk_doc_min_version") ? 0 : 1);
1420 AC_CHECK_PROG(DB2HTML, db2html, true, false)
1421 AM_CONDITIONAL(HAVE_DOCBOOK, $DB2HTML)
1423 dnl Make people enable the gtk-doc stuff explicitely.
1424 AC_ARG_ENABLE(gtk-doc, [ --enable-gtk-doc use gtk-doc to build documentation [default=no]], enable_gtk_doc="$enableval", enable_gtk_doc=auto)
1426 if test x$enable_gtk_doc = xyes ; then
1427 if test x$GTKDOC != xtrue ; then
1432 dnl NOTE: We need to use a separate automake conditional for this
1433 dnl to make this work with the tarballs.
1434 AM_CONDITIONAL(ENABLE_GTK_DOC, test x$enable_gtk_doc = xyes)
1437 ##################################################
1439 ##################################################
1441 AC_OUTPUT_COMMANDS([
1443 ## Generate `gdk/gdkconfig.h' in two cases
1444 ## 1. `config.status' is run either explicitly, or via configure.
1445 ## Esp. not when it is run in `Makefile' to generate makefiles and
1447 ## 2. CONFIG_OTHER is set explicitly
1449 ## Case 1 is difficult. We know that `automake' sets one of
1450 ## CONFIG_FILES or CONFIG_HEADERS to empty. This heuristic works
1451 ## only when AM_CONFIG_HEADER is set, however.
1453 if test -n "${CONFIG_FILES}" && test -n "${CONFIG_HEADERS}"; then
1454 # Both CONFIG_FILES and CONFIG_HEADERS are non-empty ==> Case 1
1455 CONFIG_OTHER=${CONFIG_OTHER:-gdk/gdkconfig.h}
1457 case "$CONFIG_OTHER" in
1459 echo creating gdk/gdkconfig.h
1460 outfile=gdkconfig.h-tmp
1461 cat > $outfile <<\_______EOF
1464 * This is a generated file. Please modify `configure.in'
1472 #endif /* __cplusplus */
1476 cat >>$outfile <<_______EOF
1481 cat >>$outfile <<_______EOF
1485 #endif /* __cplusplus */
1487 #endif /* GDKCONFIG_H */
1491 if cmp -s $outfile gdk/gdkconfig.h; then
1492 echo gdk/gdkconfig.h is unchanged
1495 mv $outfile gdk/gdkconfig.h
1499 if test "x$gdktarget" = "xx11" ; then
1501 #define GDK_WINDOWING_X11'
1502 elif test "x$gdktarget" = "xwin32" ; then
1504 #define GDK_WINDOWING_WIN32'
1505 elif test "x$gdktarget" = "xlinux-fb" ; then
1507 #define GDK_WINDOWING_FB
1508 #define GDK_NATIVE_WINDOW_POINTER'
1511 if test x$gdk_wchar_h = xyes; then
1513 #define GDK_HAVE_WCHAR_H 1'
1515 if test x$gdk_wctype_h = xyes; then
1517 #define GDK_HAVE_WCTYPE_H 1"
1519 if test x$gdk_working_wctype = xno; then
1521 #define GDK_HAVE_BROKEN_WCTYPE 1"
1527 AC_PATH_PROG(SGML2HTML, sgml2html, no)
1528 AM_CONDITIONAL(HAVE_SGML2HTML, test x$SGML2HTML != xno)
1538 gdk-pixbuf-2.0-uninstalled.pc
1539 gdk-2.0-uninstalled.pc
1540 gtk+-2.0-uninstalled.pc
1544 build/win32/Makefile
1545 build/win32/dirent/Makefile
1547 demos/gtk-demo/Makefile
1550 docs/reference/Makefile
1551 docs/reference/gdk-pixbuf/Makefile
1552 docs/reference/gdk/Makefile
1553 docs/reference/gtk/Makefile
1555 docs/tutorial/Makefile
1557 gdk-pixbuf/makefile.mingw
1558 gdk-pixbuf/gdk_pixbuf.rc
1559 gdk-pixbuf/gdk-pixbuf-features.h
1560 gdk-pixbuf/pixops/Makefile
1561 gdk-pixbuf/pixops/makefile.mingw
1566 gdk/win32/makefile.mingw
1567 gdk/win32/rc/Makefile
1569 gdk/linux-fb/Makefile
1575 gtk/stock-icons/Makefile
1576 gtk/theme-bits/Makefile
1578 modules/input/Makefile
1580 contrib/gdk-pixbuf-xlib/Makefile
1581 contrib/gdk-pixbuf-xlib/gdk-pixbuf-xlib-2.0.pc