1 # require autoconf 2.52
4 # Process this file with autoconf to produce a configure script.
5 AC_INIT(gdk/gdktypes.h)
8 # For each of the libraries we build, we define the following
9 # substituted variables:
11 # foo_PACKAGES: pkg-config packages this library requires
12 # foo_EXTRA_LIBS: Libraries this module requires not pulled in by pkg-config
13 # foo_EXTRA_CFLAGS: cflags this module requires not pulled in by pkg-config
14 # foo_DEP_LIBS: All libraries this module requires
15 # foo_DEP_CFLAGS: All cflags this module requires
18 # Save this value here, since automake will set cflags later
19 cflags_set=${CFLAGS+set}
21 dnl we to AC_DIVERT_PUSH/AC_DIVERT_POP these variable definitions so they
22 dnl are available for $ac_help expansion (don't we all *love* autoconf?)
23 GLIB_AC_DIVERT_BEFORE_HELP([
26 # GTK_MICRO_VERSION += 1;
27 # GTK_INTERFACE_AGE += 1;
28 # GTK_BINARY_AGE += 1;
29 # if any functions have been added, set GTK_INTERFACE_AGE to 0.
30 # if backwards compatibility has been broken,
31 # set GTK_BINARY_AGE and GTK_INTERFACE_AGE to 0.
38 GTK_VERSION=$GTK_MAJOR_VERSION.$GTK_MINOR_VERSION.$GTK_MICRO_VERSION
39 dnl This is the X.Y used in -lgtk-FOO-X.Y
43 AC_SUBST(GTK_MAJOR_VERSION)
44 AC_SUBST(GTK_MINOR_VERSION)
45 AC_SUBST(GTK_MICRO_VERSION)
46 AC_SUBST(GTK_INTERFACE_AGE)
47 AC_SUBST(GTK_BINARY_AGE)
48 AC_SUBST(GTK_API_VERSION)
52 #LT_RELEASE=$GTK_MAJOR_VERSION.$GTK_MINOR_VERSION
53 #LT_CURRENT=`expr $GTK_MICRO_VERSION - $GTK_INTERFACE_AGE`
54 #LT_REVISION=$GTK_INTERFACE_AGE
55 #LT_AGE=`expr $GTK_BINARY_AGE - $GTK_INTERFACE_AGE`
56 #LT_CURRENT_MINUS_AGE=`expr $LT_CURRENT - $LT_AGE`
58 LT_RELEASE=$GTK_MAJOR_VERSION.0
59 LT_CURRENT=`expr 100 '*' $GTK_MINOR_VERSION + $GTK_MICRO_VERSION - $GTK_INTERFACE_AGE`
60 LT_REVISION=$GTK_INTERFACE_AGE
61 LT_AGE=`expr $GTK_BINARY_AGE - $GTK_INTERFACE_AGE`
62 LT_CURRENT_MINUS_AGE=`expr $LT_CURRENT - $LT_AGE`
67 AC_SUBST(LT_CURRENT_MINUS_AGE)
69 # Define a string for the earliest version that this release has
70 # forward/backwards binary compatibility with. This is used for module
71 # locations. (Should this be backwards-compat instead?)
73 #GTK_BINARY_VERSION=$GTK_MAJOR_VERSION.$GTK_MINOR_VERSION.$LT_CURRENT
74 GTK_BINARY_VERSION=$GTK_MAJOR_VERSION.0.$LT_CURRENT
75 AC_SUBST(GTK_BINARY_VERSION)
78 # gdk-pixbuf gets versioned separately, and for now, using standard
79 # libtool versioning, not GTK+-style versioning
81 GDK_PIXBUF_MAJOR=$GTK_MAJOR_VERSION
82 GDK_PIXBUF_MINOR=$GTK_MINOR_VERSION
83 GDK_PIXBUF_MICRO=$GTK_MICRO_VERSION
84 GDK_PIXBUF_VERSION="${GDK_PIXBUF_MAJOR}.${GDK_PIXBUF_MINOR}.${GDK_PIXBUF_MICRO}"
85 AC_SUBST(GDK_PIXBUF_MAJOR)
86 AC_SUBST(GDK_PIXBUF_MINOR)
87 AC_SUBST(GDK_PIXBUF_MICRO)
88 AC_SUBST(GDK_PIXBUF_VERSION)
90 ## Versions of dependencies
91 GLIB_REQUIRED_VERSION=2.1.3
92 PANGO_REQUIRED_VERSION=1.0.1
93 ATK_REQUIRED_VERSION=1.0.1
100 AC_SUBST(GETTEXT_PACKAGE)
101 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE")
103 # Save this value here, since automake will set cflags later
104 cflags_set=${CFLAGS+set}
106 dnl Initialize automake stuff
107 AM_INIT_AUTOMAKE($PACKAGE, $VERSION, no-define)
109 # Specify a configuration file
110 AM_CONFIG_HEADER(config.h)
112 dnl Initialize libtool
118 dnl XXXX Hack: Set AS and ASFLAGS so that automake 1.5 will be happy
123 dnl XXXX Hack: Set CCAS and CCASFLAGS so that automake 1.6 will be happy
125 CCASFLAGS="\${CFLAGS}"
129 dnl Initialize maintainer mode
134 AC_MSG_CHECKING([for some Win32 platform])
136 *-*-mingw*|*-*-cygwin*)
143 AC_MSG_RESULT([$platform_win32])
144 AM_CONDITIONAL(PLATFORM_WIN32, test "$platform_win32" = "yes")
147 AC_MSG_CHECKING([for native Win32])
157 AC_MSG_RESULT([$os_win32])
158 AM_CONDITIONAL(OS_WIN32, test "$os_win32" = "yes")
160 if test "$os_win32" = "yes"; then
161 AC_CHECK_PROG(ms_librarian, lib.exe, yes, no)
163 AM_CONDITIONAL(MS_LIB_AVAILABLE, test x$ms_librarian = xyes)
165 dnl figure debugging default, prior to $ac_help setup
167 GLIB_AC_DIVERT_BEFORE_HELP([
168 if test `expr $GTK_MINOR_VERSION \% 2` = 1 ; then
171 debug_default=minimum
175 dnl declare --enable-* args and collect ac_help strings
176 AC_ARG_ENABLE(debug, [ --enable-debug=[no/minimum/yes] turn on debugging [default=$debug_default]],,enable_debug=$debug_default)
177 AC_ARG_ENABLE(shm, [ --enable-shm support shared memory if available [default=yes]],
178 echo $enable_shm, enable_shm="yes")
179 AC_ARG_ENABLE(ansi, [ --enable-ansi turn on strict ansi [default=no]],
181 AC_ARG_ENABLE(xim, [ --enable-xim support XIM [default=yes]],
183 AC_ARG_ENABLE(xkb, [ --enable-xkb support XKB [default=maybe]],
184 , enable_xkb="maybe")
185 AC_ARG_ENABLE(rebuilds, [ --disable-rebuilds disable all source autogeneration rules],,enable_rebuilds=yes)
187 AC_ARG_WITH(xinput, [ --with-xinput=[no/yes] support XInput ])
189 AC_ARG_WITH(wintab, [ --with-wintab=DIRECTORY use Wintab API with win32 backend])
190 AC_ARG_WITH(ie55, [ --with-ie55=DIRECTORY IE5.5 libs and headers (for Active IMM)])
192 GLIB_AC_DIVERT_BEFORE_HELP([
193 if test "$platform_win32" = yes; then
200 AC_ARG_WITH(gdktarget, [ --with-gdktarget=[[x11/linux-fb/win32]] select GDK target [default=$gdktarget]],
201 gdktarget=$with_gdktarget)
205 x11|linux-fb|win32) ;;
206 *) AC_MSG_ERROR([Invalid target for GDK: use x11, linux-fb or win32.]);;
209 gdktargetlib=libgdk-$gdktarget-$GTK_API_VERSION.la
210 gtktargetlib=libgtk-$gdktarget-$GTK_API_VERSION.la
212 AC_SUBST(gdktargetlib)
213 AC_SUBST(gtktargetlib)
215 AC_ARG_ENABLE(shadowfb, [ --disable-shadowfb disable shadowfb support for linux-fb],,enable_shadowfb=yes)
217 AC_ARG_ENABLE(fbmanager, [ --enable-fbmanager enable framebuffer manager support (GtkFB)],enable_fbmanager=yes,enable_fbmanager=no)
219 if test "x$enable_debug" = "xyes"; then
220 test "$cflags_set" = set || CFLAGS="$CFLAGS -g"
221 GTK_DEBUG_FLAGS="-DG_ENABLE_DEBUG"
223 if test "x$enable_debug" = "xno"; then
224 GTK_DEBUG_FLAGS="-DG_DISABLE_ASSERT -DG_DISABLE_CHECKS -DG_DISABLE_CAST_CHECKS"
226 GTK_DEBUG_FLAGS="-DG_DISABLE_CAST_CHECKS"
230 AC_DEFINE_UNQUOTED(GTK_COMPILED_WITH_DEBUGGING, "${enable_debug}")
233 # Build time sanity check...
236 # Checks for programs.
243 if test "x$GCC" = "xyes"; then
245 *[\ \ ]-Wall[\ \ ]*) ;;
246 *) CFLAGS="$CFLAGS -Wall" ;;
249 if test "x$enable_ansi" = "xyes"; then
251 *[\ \ ]-ansi[\ \ ]*) ;;
252 *) CFLAGS="$CFLAGS -ansi" ;;
256 *[\ \ ]-pedantic[\ \ ]*) ;;
257 *) CFLAGS="$CFLAGS -pedantic" ;;
263 # Ensure MSVC-compatible struct packing convention is used when
264 # compiling for Win32 with gcc.
265 # What flag to depends on gcc version: gcc3 uses "-mms-bitfields", while
266 # gcc2 uses "-fnative-struct".
267 if test x"$os_win32" = xyes; then
268 if test x"$GCC" = xyes; then
270 AC_MSG_CHECKING([how to get MSVC-compatible struct packing])
271 if test -z "$ac_cv_prog_CC"; then
274 our_gcc="$ac_cv_prog_CC"
276 case `$our_gcc --version | sed -e 's,\..*,.,' -e q` in
278 if $our_gcc -v --help 2>/dev/null | grep fnative-struct >/dev/null; then
279 msnative_struct='-fnative-struct'
283 if $our_gcc -v --help 2>/dev/null | grep ms-bitfields >/dev/null; then
284 msnative_struct='-mms-bitfields'
288 if test x"$msnative_struct" = x ; then
289 AC_MSG_RESULT([no way])
290 AC_MSG_WARN([produced libraries might be incompatible with MSVC-compiled code])
292 CFLAGS="$CFLAGS $msnative_struct"
293 AC_MSG_RESULT([${msnative_struct}])
298 # Honor aclocal flags
299 ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
301 ## Initial sanity check, done here so that users get told they
302 ## have the wrong dependencies as early in the process as possible.
303 ## Later on we actually use the cflags/libs from separate pkg-config
304 ## calls. Oh, also the later pkg-config calls don't include
305 ## the version requirements since those make the module lists
306 ## annoying to construct
307 PKG_CHECK_MODULES(BASE_DEPENDENCIES, glib-2.0 >= $GLIB_REQUIRED_VERSION atk >= $ATK_REQUIRED_VERSION pango >= $PANGO_REQUIRED_VERSION)
309 if test "$os_win32" != yes; then
310 # libtool option to control which symbols are exported
311 # right now, symbols starting with _ are not exported
312 LIBTOOL_EXPORT_OPTIONS='-export-symbols-regex "^[[^_]].*"'
314 # We currently use .def files on Windows (for gdk-pixbuf, gdk and gtk)
315 LIBTOOL_EXPORT_OPTIONS=
317 AC_SUBST(LIBTOOL_EXPORT_OPTIONS)
319 dnl ******************************************************
320 dnl * See whether to include shared library dependencies *
321 dnl ******************************************************
323 AC_ARG_ENABLE(explicit-deps,
324 [ --enable-explicit-deps=[yes/no/auto] use explicit dependencies in .pc files [default=auto]],
325 enable_explicit_deps="$enableval",
326 enable_explicit_deps=auto)
328 AC_MSG_CHECKING([Whether to write dependencies into .pc files])
329 case $enable_explicit_deps in
331 deplib_check_method=`(./libtool --config; echo eval echo \\$deplib_check_method) | sh`
332 if test "X$deplib_check_method" = Xnone || test "x$enable_static" = xyes ; then
333 enable_explicit_deps=yes
335 enable_explicit_deps=no
340 *) AC_MSG_ERROR([Value given to --enable-explicit-deps must be one of yes, no or auto])
343 AC_MSG_RESULT($enable_explicit_deps)
345 AM_CONDITIONAL(DISABLE_EXPLICIT_DEPS, test $enable_explicit_deps = no)
347 # define a MAINT-like variable REBUILD which is set if Perl
348 # and awk are found, so autogenerated sources can be rebuilt
350 AC_PATH_PROGS(PERL, perl5 perl)
352 # We would like indent, but don't require it.
353 AC_CHECK_PROG(INDENT, indent, indent)
356 if test "x$enable_rebuilds" = "xyes" && \
358 $PERL -e 'exit !($] >= 5.002)' > /dev/null 2>&1 ; then
363 AC_CHECK_FUNCS(lstat mkstemp flockfile)
365 # sigsetjmp is a macro on some platforms, so AC_CHECK_FUNCS is not reliable
366 AC_MSG_CHECKING(for sigsetjmp)
367 AC_TRY_LINK([#include <setjmp.h>], [
370 ], gtk_ok=yes, gtk_ok=no)
371 AC_MSG_RESULT($gtk_ok)
372 if test "$gtk_ok" = "yes"; then
373 AC_DEFINE(HAVE_SIGSETJMP)
376 AC_MSG_CHECKING(whether make is GNU Make)
379 if $ac_make --version 2>/dev/null | grep '^GNU Make ' >/dev/null ; then
380 STRIP_BEGIN='$(strip $(STRIP_DUMMY)'
387 AC_SUBST(STRIP_DUMMY)
388 AC_SUBST(STRIP_BEGIN)
392 ALL_LINGUAS="az be bg ca cs cy da de el en_GB en@IPA es et eu fa fi fr ga gl he hi 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"
394 LIBS="$LIBS $INTLLIBS"
396 # AM_GLIB_GNU_GETTEXT above substs $DATADIRNAME
397 # this is the directory where the *.{mo,gmo} files are installed
398 gtklocaledir='${prefix}/${DATADIRNAME}/locale'
399 AC_SUBST(gtklocaledir)
401 dnl The DU4 header files don't provide library prototypes unless
402 dnl -std1 is given to the native cc.
403 AC_MSG_CHECKING([for extra flags to get ANSI library prototypes])
407 AC_TRY_RUN([#include <math.h>
408 int main (void) { return (log(1) != log(1.)); }],
409 AC_MSG_RESULT(none needed),
410 gtk_save_CFLAGS="$CFLAGS"
411 CFLAGS="$CFLAGS -std1"
412 AC_TRY_RUN([#include <math.h>
413 int main (void) { return (log(1) != log(1.)); }],
414 AC_MSG_RESULT(-std1),
416 CFLAGS="$gtk_save_CFLAGS"
418 [No ANSI prototypes found in library. (-std1 didn't work.)]),
421 AC_MSG_RESULT(none needed)
425 AC_MSG_CHECKING(for the BeOS)
436 dnl NeXTStep cc seems to need this
437 AC_MSG_CHECKING([for extra flags for POSIX compliance])
438 AC_TRY_COMPILE([#include <dirent.h>], [DIR *dir;],
439 AC_MSG_RESULT(none needed),
440 gtk_save_CFLAGS="$CFLAGS"
441 CFLAGS="$CFLAGS -posix"
442 AC_TRY_COMPILE([#include <dirent.h>], [DIR *dir;],
443 AC_MSG_RESULT(-posix),
445 CFLAGS="$gtk_save_CFLAGS"
446 AC_MSG_WARN([Could not determine POSIX flag. (-posix didn't work.)])))
449 # Run AM_PATH_GLIB_2_0 to make sure that GLib is installed and working
452 GLIB_PACKAGES="gobject-2.0 gmodule-2.0"
454 AM_PATH_GLIB_2_0($GLIB_REQUIRED_VERSION, :,
456 *** GLIB $GLIB_REQUIRED_VERSION or better is required. The latest version of
457 *** GLIB is always available from ftp://ftp.gtk.org/.]),
458 gobject gmodule gthread)
461 dnl Check for bind_textdomain_codeset, including -lintl if GLib brings it in.
464 LIBS="$LIBS $GLIB_LIBS"
465 AC_CHECK_FUNCS(bind_textdomain_codeset)
468 AC_CHECK_HEADERS(pwd.h, AC_DEFINE(HAVE_PWD_H))
469 AC_CHECK_HEADERS(sys/time.h, AC_DEFINE(HAVE_SYS_TIME_H))
470 AC_CHECK_HEADERS(unistd.h, AC_DEFINE(HAVE_UNISTD_H))
472 if test "${with_ie55+set}" = set && test $with_ie55 != no; then
473 AC_MSG_CHECKING([for dimm.h])
474 saved_CFLAGS="$CFLAGS"
475 CFLAGS="$CFLAGS -idirafter $with_ie55/Include"
476 AC_TRY_COMPILE([#include <windows.h>
479 /* The w32api imm.h clashes a bit with the IE5.5 dimm.h */
480 #define IMEMENUITEMINFOA hidden_IMEMENUITEMINFOA
481 #define IMEMENUITEMINFOW hidden_IMEMENUITEMINFOW
483 #undef IMEMENUITEMINFOA
484 #undef IMEMENUITEMINFOW
490 AC_MSG_CHECKING([for IE55 uuid.lib])
491 if test -f $with_ie55/Lib/uuid.lib ; then
494 AC_DEFINE(HAVE_DIMM_H)
495 IE55_UUID_LIB="$with_ie55/Lib/uuid.lib"
496 AC_SUBST(IE55_UUID_LIB)
499 CFLAGS="$saved_CFLAGS"
504 CFLAGS="$saved_CFLAGS"
507 AM_CONDITIONAL(HAVE_IE55, test x$have_ie55 = xyes)
509 if test "${with_wintab+set}" = set && test $with_wintab != no; then
510 AC_MSG_CHECKING([for wintab.h])
511 saved_CFLAGS="$CFLAGS"
512 CFLAGS="$CFLAGS -I$with_wintab/include"
513 AC_TRY_COMPILE([#include <windows.h>
514 #include <wintab.h>],
517 AC_MSG_CHECKING([for wntab32x.lib])
518 if test -f $with_wintab/lib/i386/wntab32x.lib ; then
521 AC_DEFINE(HAVE_WINTAB)
522 WINTAB_LIB="$with_wintab/lib/i386/wntab32x.lib"
526 CFLAGS="$saved_cflags"
531 CFLAGS="$saved_cflags"
534 AM_CONDITIONAL(HAVE_WINTAB, test x$have_wintab = xyes)
536 saved_cflags="$CFLAGS"
537 saved_ldflags="$LDFLAGS"
540 # Checks for header files.
543 # Checks for typedefs, structures, and compiler characteristics.
546 # Checks for library functions.
550 AC_CHECK_FUNCS(getresuid)
553 # Check if <sys/select.h> needs to be included for fd_set
554 AC_MSG_CHECKING([for fd_set])
555 AC_TRY_COMPILE([#include <sys/types.h>],
556 [fd_set readMask, writeMask;], gtk_ok=yes, gtk_ok=no)
557 if test $gtk_ok = yes; then
558 AC_MSG_RESULT([yes, found in sys/types.h])
560 AC_HEADER_EGREP(fd_mask, sys/select.h, gtk_ok=yes)
561 if test $gtk_ok = yes; then
562 AC_DEFINE(HAVE_SYS_SELECT_H)
563 AC_MSG_RESULT([yes, found in sys/select.h])
570 # `widechar' tests for gdki18n.h
571 AC_MSG_CHECKING(for wchar.h)
572 AC_TRY_CPP([#include <wchar.h>], gdk_wchar_h=yes, gdk_wchar_h=no)
573 if test $gdk_wchar_h = yes; then
574 AC_DEFINE(HAVE_WCHAR_H,1,[Have wchar.h include file])
576 AC_MSG_RESULT($gdk_wchar_h)
578 # Check for wctype.h (for iswalnum)
579 AC_MSG_CHECKING(for wctype.h)
580 AC_TRY_CPP([#include <wctype.h>], gdk_wctype_h=yes, gdk_wctype_h=no)
581 if test $gdk_wctype_h = yes; then
582 AC_DEFINE(HAVE_WCTYPE_H,1,[Have wctype.h include file])
584 AC_MSG_RESULT($gdk_wctype_h)
586 # in Solaris 2.5, `iswalnum' is in -lw
588 AC_CHECK_FUNC(iswalnum,,[AC_CHECK_LIB(w,iswalnum,GDK_WLIBS=-lw)])
591 LIBS="$LIBS $GDK_WLIBS"
592 # The following is necessary for Linux libc-5.4.38
593 AC_MSG_CHECKING(if iswalnum() and friends are properly defined)
594 AC_TRY_LINK([#include <stdlib.h>],[
595 #if (defined(HAVE_WCTYPE_H) || defined(HAVE_WCHAR_H))
596 # ifdef HAVE_WCTYPE_H
604 # define iswalnum(c) ((wchar_t)(c) <= 0xFF && isalnum(c))
606 iswalnum((wchar_t) 0);
607 ], gdk_working_wctype=yes, gdk_working_wctype=no)
610 if test $gdk_working_wctype = no; then
611 AC_DEFINE(HAVE_BROKEN_WCTYPE,1,[Is the wctype implementation broken])
614 AC_MSG_RESULT($gdk_working_wctype)
618 ##################################################
619 # Checks for gdk-pixbuf
620 ##################################################
622 dnl ********************************************************
623 dnl * See whether we need to load our modules as .la files *
624 dnl ********************************************************
628 *-aix*) use_la_modules=true
631 if $use_la_modules ; then
632 AC_DEFINE(USE_LA_MODULES, 1, [Whether to load modules via .la files rather than directly])
636 AC_MSG_CHECKING(whether to build gmodulized gdk-pixbuf)
638 AC_ARG_ENABLE(modules, [ --disable-modules disable dynamic module loading],[
639 if test x$withval = xyes; then
648 if test x$with_modules = xno; then
652 AC_MSG_CHECKING(whether dynamic modules work)
653 ## for loop is to strip newline
654 tmp=`$PKG_CONFIG --variable=gmodule_supported gmodule-2.0`
659 dnl Now we check to see if our libtool supports shared lib deps
660 dnl (in a rather ugly way even)
662 pixbuf_libtool_config="${CONFIG_SHELL-/bin/sh} ./libtool --config"
663 pixbuf_deplibs_check=`$pixbuf_libtool_config | \
664 grep '^[[a-z_]]*check[[a-z_]]*_method=[['\''"]]' | \
665 sed 's/.*[['\''"]]\(.*\)[['\''"]]$/\1/'`
666 if test "x$pixbuf_deplibs_check" = "xnone" || \
667 test "x$pixbuf_deplibs_check" = "xunknown" || \
668 test "x$pixbuf_deplibs_check" = "x"; then
674 AC_DEFINE(USE_GMODULE)
681 dnl We allow people to disable image loaders explicitely, but if they don't we error
682 dnl out so that people don't accidentally build without them.
684 AC_ARG_WITH(libpng, [ --without-libpng disable PNG loader for gdk-pixbuf])
685 AC_ARG_WITH(libjpeg, [ --without-libjpeg disable JPEG loader for gdk-pixbuf])
686 AC_ARG_WITH(libtiff, [ --without-libtiff disable TIFF loader for gdk-pixbuf])
689 if test x$with_libtiff != xno && test -z "$LIBTIFF"; then
690 AC_CHECK_LIB(tiff, TIFFReadScanline,
691 [AC_CHECK_HEADER(tiffio.h,
692 TIFF='tiff'; LIBTIFF='-ltiff',
693 AC_MSG_WARN(*** TIFF loader will not be built (TIFF header files not found) ***))],
694 [AC_CHECK_LIB(tiff, TIFFWriteScanline,
695 [AC_CHECK_HEADER(tiffio.h,
696 TIFF='tiff'; LIBTIFF='-ltiff -ljpeg -lz',
697 AC_MSG_WARN(*** TIFF loader will not be built (TIFF header files not found) ***))],
698 [AC_CHECK_LIB(tiff34, TIFFFlushData,
699 [AC_CHECK_HEADER(tiffio.h,
700 TIFF='tiff'; LIBTIFF='-ltiff34 -ljpeg -lz',
701 AC_MSG_WARN(*** TIFF loader will not be built (TIFF header files not found) ***))],
702 AC_MSG_WARN(*** TIFF plug-in will not be built (TIFF library not found) ***), -ljpeg -lz -lm)], -ljpeg -lz -lm)], -lm)
705 if test x$with_libtiff != xno && test -z "$LIBTIFF"; then
707 *** Checks for TIFF loader failed. You can build without it by passing
708 *** --without-libtiff to configure but some programs using GTK+ may
709 *** not work properly])
713 if test x$with_libjpeg != xno && test -z "$LIBJPEG"; then
714 AC_CHECK_LIB(jpeg, jpeg_destroy_decompress,
717 AC_MSG_WARN(*** JPEG loader will not be built (JPEG library not found) ***))
718 if test "$jpeg_ok" = yes; then
719 AC_MSG_CHECKING([for jpeglib.h])
725 #include <jpeglib.h>],
728 AC_MSG_RESULT($jpeg_ok)
729 if test "$jpeg_ok" = yes; then
731 AC_CHECK_LIB(jpeg, jpeg_simple_progression,
732 AC_DEFINE(HAVE_PROGRESSIVE_JPEG),
733 AC_MSG_WARN(JPEG library does not support progressive saving.))
735 AC_MSG_WARN(*** JPEG loader will not be built (JPEG header file not found) ***)
740 if test x$with_libjpeg != xno && test -z "$LIBJPEG"; then
742 *** Checks for JPEG loader failed. You can build without it by passing
743 *** --without-libjpeg to configure but some programs using GTK+ may
744 *** not work properly])
748 if test x$with_libpng != xno && test -z "$LIBPNG"; then
749 AC_MSG_CHECKING(for libpng12)
750 if $PKG_CONFIG --exists libpng12 ; then
753 PNG_DEP_CFLAGS_PACKAGES=libpng12
754 LIBPNG=`$PKG_CONFIG --libs libpng12`
757 AC_CHECK_LIB(png, png_read_info,
758 [AC_CHECK_HEADER(png.h,
761 AC_MSG_WARN(*** PNG loader will not be built (PNG library not found) ***), -lz -lm)
762 if test "$png_ok" = yes; then
763 AC_MSG_CHECKING([for png_structp in png.h])
764 AC_TRY_COMPILE([#include <png.h>],
765 [png_structp pp; png_infop info; png_colorp cmap; png_create_read_struct;],
768 AC_MSG_RESULT($png_ok)
769 if test "$png_ok" = yes; then
770 PNG='png'; LIBPNG='-lpng -lz'
772 AC_MSG_WARN(*** PNG loader will not be built (PNG library is too old) ***)
775 AC_MSG_WARN(*** PNG loader will not be built (PNG header file not found) ***)
780 if test x$with_libpng != xno && test -z "$LIBPNG"; then
782 *** Checks for PNG loader failed. You can build without it by passing
783 *** --without-libpng to configure but many programs using GTK+ will
784 *** not work properly. The PNG loader is also needed if you are compiling
789 if test -z "$LIBPNG"; then
792 AC_SUBST(REBUILD_PNGS)
798 AM_CONDITIONAL(BUILD_DYNAMIC_MODULES, $dynworks)
801 # Allow building some or all gdk-pixbuf loaders included
803 AC_MSG_CHECKING(pixbuf loaders to build)
805 AC_ARG_WITH(included_loaders, [ --with-included-loaders=LOADER1,LOADER2,... build the specified loaders into gdk-pixbuf (only used if module loading disabled)])
810 ## if the option was specified, leave it; otherwise disable included loaders
811 if test x$with_included_loaders = xno; then
812 with_included_loaders=yes
816 all_loaders="png,bmp,wbmp,gif,ico,ani,jpeg,pnm,ras,tiff,xpm,tga"
818 # If no loaders specified, include all
819 if test "x$with_included_loaders" = xyes ; then
820 included_loaders="$all_loaders"
822 included_loaders="$with_included_loaders"
825 AC_MSG_RESULT($included_loaders)
828 INCLUDED_LOADER_DEFINE=
830 IFS="${IFS= }"; gtk_save_ifs="$IFS"; IFS=","
831 for loader in $included_loaders; do
832 if echo "$all_loaders" | egrep "(^|,)$loader(\$|,)" > /dev/null; then
835 AC_MSG_ERROR([the specified loader $loader does not exist])
838 INCLUDED_LOADER_OBJ="$INCLUDED_LOADER_OBJ libpixbufloader-static-$loader.la"
839 INCLUDED_LOADER_DEFINE="$INCLUDED_LOADER_DEFINE -DINCLUDE_$loader"
842 AC_SUBST(INCLUDED_LOADER_OBJ)
843 AC_SUBST(INCLUDED_LOADER_DEFINE)
849 AM_CONDITIONAL(HAVE_TIFF, test "x$LIBTIFF" != x)
850 AM_CONDITIONAL(HAVE_PNG, test "x$LIBPNG" != x)
851 AM_CONDITIONAL(HAVE_JPEG, test "x$LIBJPEG" != x)
855 if echo "$included_loaders" | egrep '(^|,)tiff($|,)' > /dev/null; then
856 STATIC_LIB_DEPS="$STATIC_LIB_DEPS $LIBTIFF"
858 if echo "$included_loaders" | egrep '(^|,)jpeg($|,)' > /dev/null; then
859 STATIC_LIB_DEPS="$STATIC_LIB_DEPS $LIBJPEG"
861 if echo "$included_loaders" | egrep '(^|,)png($|,)' > /dev/null; then
862 STATIC_LIB_DEPS="$STATIC_LIB_DEPS $LIBPNG"
865 STATIC_LIB_DEPS="$LIBTIFF $LIBJPEG $LIBPNG"
868 # Checks to see if we should compile in MMX support (there will be
869 # a runtime test when the code is actually run to see if it should
870 # be used - this just checks if we can compile it.)
872 # This code is partially taken from Mesa
874 AC_MSG_CHECKING(for x86 platform)
876 i386|i486|i586|i686|i786|k6|k7)
882 AC_MSG_RESULT($use_x86_asm)
885 if test $use_x86_asm = yes; then
889 AC_MSG_CHECKING(compiler support for MMX)
890 cp $srcdir/gdk-pixbuf/pixops/scale_line_22_33_mmx.S conftest.S
891 if AC_TRY_EVAL(ac_compile); then
898 if test $use_mmx_asm = yes; then
906 AM_CONDITIONAL(USE_MMX, test x$use_mmx_asm = xyes)
908 dnl Look for a host system's gdk-pixbuf-csource if we are cross-compiling
910 AM_CONDITIONAL(CROSS_COMPILING, test $cross_compiling = yes)
912 if test $cross_compiling = yes; then
913 AC_PATH_PROG(GDK_PIXBUF_CSOURCE, gdk-pixbuf-csource, no)
914 if test x$GDK_PIXBUF_CSOURCE = xno; then
915 AC_MSG_ERROR(Could not find a gdk-pixbuf-csource in your PATH)
919 GDK_PIXBUF_PACKAGES="gmodule-2.0 gobject-2.0"
920 GDK_PIXBUF_EXTRA_LIBS="$STATIC_LIB_DEPS $MATH_LIB"
921 GDK_PIXBUF_EXTRA_CFLAGS=
922 GDK_PIXBUF_DEP_LIBS="`$PKG_CONFIG --libs $GDK_PIXBUF_PACKAGES` $GDK_PIXBUF_EXTRA_LIBS"
923 GDK_PIXBUF_DEP_CFLAGS="`$PKG_CONFIG --cflags gthread-2.0 $GDK_PIXBUF_PACKAGES $PNG_DEP_CFLAGS_PACKAGES` $GDK_PIXBUF_EXTRA_CFLAGS"
925 AC_SUBST(GDK_PIXBUF_PACKAGES)
926 AC_SUBST(GDK_PIXBUF_EXTRA_LIBS)
927 AC_SUBST(GDK_PIXBUF_EXTRA_CFLAGS)
928 AC_SUBST(GDK_PIXBUF_DEP_LIBS)
929 AC_SUBST(GDK_PIXBUF_DEP_CFLAGS)
932 ########################################
933 # Windowing system checks
934 ########################################
936 GDK_EXTRA_LIBS=$GDK_WLIBS
941 if test "x$gdktarget" = "xlinux-fb" || test "x$gdktarget" = "xx11" ; then
943 # Checks for FreeType
946 AC_PATH_PROG(FREETYPE_CONFIG, freetype-config, no)
947 if test "x$FREETYPE_CONFIG" != "xno" ; then
948 FREETYPE_CFLAGS=`$FREETYPE_CONFIG --cflags`
949 FREETYPE_LIBS=`$FREETYPE_CONFIG --libs`
951 AC_CHECK_LIB(freetype, FT_New_Face, have_freetype=true
954 if $have_freetype ; then
955 gtk_save_cppflags="$CPPFLAGS"
956 CPPFLAGS="$CPPFLAGS $FREETYPE_CFLAGS"
958 AC_MSG_CHECKING([For sufficiently new FreeType (at least 2.0.1)])
960 #include <freetype/freetype.h>
963 [(void)1;],:,have_freetype=false)
964 if $have_freetype ; then
970 CPPFLAGS="$gtk_save_cppflags"
973 AC_SUBST(FREETYPE_LIBS)
974 AC_SUBST(FREETYPE_CFLAGS)
977 if test "x$gdktarget" = "xx11"; then
978 # We start off with the libraries from Pango
980 if $PKG_CONFIG --exists pangox ; then : ; else
981 AC_MSG_ERROR([pangox Pango backend is required for x11 target])
984 ## be sure we also have Pango built with xft support
985 if $PKG_CONFIG --exists pangoxft ; then
986 PANGO_PACKAGES="pangoxft pangox"
989 if $have_freetype ; then
992 AC_MSG_ERROR([pangoxft Pango backend found but did not find freetype libraries])
995 PANGO_PACKAGES="pangox"
999 AM_CONDITIONAL(HAVE_XFT, $have_xft)
1001 if $PKG_CONFIG --exists xft ; then
1002 AC_DEFINE(HAVE_XFT2, 1, [Define if we have Xft, version 2])
1006 # If Pango included the shared library dependencies from X11 in
1007 # the pkg-config output, then we use that (to avoid duplicates).
1008 # but if they were omitted to avoid binary compatibility problems
1009 # then we need to repeat the checks.
1011 x_libs="`$PKG_CONFIG --libs $PANGO_PACKAGES`"
1013 *-lX11*) pango_omitted_x_deps=no ;;
1014 *) pango_omitted_x_deps=yes ;;
1017 x_cflags="`$PKG_CONFIG --cflags $PANGO_PACKAGES`"
1020 if test $pango_omitted_x_deps = yes ; then
1023 if test x$no_x = xyes ; then
1024 AC_MSG_ERROR([X development libraries not found])
1027 x_libs="$X_LIBS -lX11 $X_EXTRA_LIBS"
1030 # Checks for Xft/XRender
1032 if test $have_xft = true ; then
1035 if pkg-config --exists pangoxft '>=' 1.1.0 ; then
1036 x_libs="`pkg-config --libs xft` -lX11 $FREETYPE_LIBS $X_EXTRA_LIBS"
1039 gtk_save_cppflags="$CPPFLAGS"
1040 CPPFLAGS="$CPPFLAGS $x_cflags"
1042 AC_CHECK_LIB(Xrender, XRenderFindFormat,
1043 [AC_CHECK_LIB(Xft, XftFontOpen,
1044 [AC_CHECK_HEADER(X11/Xft/XftFreetype.h,
1046 :,-lXrender -lXext $x_libs $FREETYPE_LIBS)]
1050 x_libs="$X_LIBS -lXft -lXrender -lXext -lX11 $FREETYPE_LIBS $X_EXTRA_LIBS"
1053 CPPFLAGS="$gtk_save_cppflags"
1059 AC_MSG_ERROR([pangoxft Pango backend found, but Xft not found])
1064 ## Strip the .la files
1066 x_libs_for_checks=""
1067 for I in $x_libs ; do
1070 *) x_libs_for_checks="$x_libs_for_checks $I" ;;
1074 # Sanity check for the X11 library
1075 AC_CHECK_LIB(X11, XOpenDisplay, :,
1076 AC_MSG_ERROR([*** libX11 not found. Check 'config.log' for more details.]),
1079 if test "x$enable_shm" = "xyes"; then
1080 # Check for the Xext library (needed for XShm extention)
1081 AC_CHECK_LIB(Xext, XShmAttach,
1082 if test -z "`echo $x_libs | grep "\-lXext" 2> /dev/null`"; then
1083 x_extra_libs="-lXext"
1085 # On AIX, it is in XextSam instead, but we still need -lXext
1086 AC_CHECK_LIB(XextSam, XShmAttach,
1087 if test -z "`echo $x_libs | grep "\-lXext" 2> /dev/null`"; then
1088 x_extra_libs="-lXextSam -lXext"
1090 x_extra_libs="-lXextSam"
1091 fi, , $x_libs_for_checks),
1095 GDK_PIXBUF_XLIB_EXTRA_CFLAGS="$x_cflags"
1096 # Don't ever pull in the pangoxft libraries for gdk-pixbuf-x11
1097 GDK_PIXBUF_XLIB_EXTRA_LIBS="$x_extra_libs $x_libs"
1099 # Check for Xinerama extension (Solaris impl or Xfree impl)
1101 gtk_save_cppflags="$CPPFLAGS"
1102 CPPFLAGS="$CPPFLAGS $x_cflags"
1107 use_solaris_xinerama=yes
1108 AC_CHECK_LIB(Xext, XineramaGetInfo,
1109 use_solaris_xinerama=yes, use_solaris_xinerama=no)
1110 if test "x$use_solaris_xinerama" = "xyes"; then
1111 AC_CHECK_HEADER(X11/extensions/xinerama.h,
1112 if test -z "`echo $x_extra_libs $x_libs | grep "\-lXext" 2> /dev/null`"; then
1113 x_extra_libs="-lXext $x_extra_libs"
1115 AC_DEFINE(HAVE_SOLARIS_XINERAMA)
1116 AC_DEFINE(HAVE_XINERAMA), use_solaris_xinerama=no, -lXext $x_libs_for_checks)
1118 AC_MSG_CHECKING(for Xinerama support on Solaris)
1119 AC_MSG_RESULT($use_solaris_xinerama);
1123 use_xfree_xinerama=yes
1124 AC_CHECK_LIB(Xinerama, XineramaQueryExtension,
1125 [AC_CHECK_HEADER(X11/extensions/Xinerama.h,
1126 x_extra_libs="-lXinerama $x_extra_libs"
1127 if test -z "`echo $x_extra_libs $x_libs | grep "\-lXext" 2> /dev/null`"; then
1128 x_extra_libs="-lXext $x_extra_libs"
1130 AC_DEFINE(HAVE_XFREE_XINERAMA)
1131 AC_DEFINE(HAVE_XINERAMA),
1132 use_xfree_xinerama=no,
1133 [#include <X11/Xlib.h>])],
1134 use_xfree_xinerama=no, -lXext $x_libs_for_checks)
1135 AC_MSG_CHECKING(for Xinerama support on XFree86)
1136 AC_MSG_RESULT($use_xfree_xinerama);
1140 CPPFLAGS="$gtk_save_cppflags"
1142 # Check for shaped window extension
1144 AC_CHECK_LIB(Xext, XShapeCombineMask,
1145 if test -z "`echo $x_extra_libs $x_libs | grep "\-lXext" 2> /dev/null`"; then
1146 x_extra_libs="-lXext $x_extra_libs"
1148 AC_DEFINE(HAVE_SHAPE_EXT),
1152 # Check for XConvertCase (X11R6 specific)
1154 AC_CHECK_LIB(X11, XConvertCase,
1155 AC_DEFINE(HAVE_XCONVERTCASE),
1159 # Check for XIM support.
1161 if test "x$enable_xim" = "xyes"; then
1162 GTK_XIM_FLAGS="-DUSE_XIM"
1165 # Check for XKB support.
1167 if test "x$enable_xkb" = "xyes"; then
1168 AC_MSG_WARN(XKB support explicitly enabled)
1170 elif test "x$enable_xkb" = "xmaybe"; then
1171 AC_CHECK_LIB(X11, XkbQueryExtension,
1172 AC_DEFINE(HAVE_XKB),
1176 AC_MSG_WARN(XKB support explicitly disabled)
1179 x_cflags="$X_CFLAGS"
1180 x_ldflags="$X_LDFLAGS"
1182 # set up things for XInput
1184 if test "x$with_xinput" = "xxfree" || test "x$with_xinput" = "xyes"; then
1185 AC_DEFINE(XINPUT_XFREE)
1186 x_extra_libs="-lXi $x_extra_libs"
1188 AC_DEFINE(XINPUT_NONE)
1191 AM_CONDITIONAL(XINPUT_XFREE, test x$with_xinput = xxfree)
1193 # Check for the RANDR extension
1195 AC_CHECK_LIB(Xrandr, XRRUpdateConfiguration,
1196 [AC_CHECK_HEADER(X11/extensions/Xrandr.h,
1197 # RANDR requires RENDER
1198 if test -z "`echo $x_extra_libs $x_libs | grep "\-lXrender" 2> /dev/null`"; then
1199 x_extra_libs="-lXrender $x_extra_libs"
1201 x_extra_libs="-lXrandr $x_extra_libs"
1202 AC_DEFINE(HAVE_RANDR, 1, Have the Xrandr extension library),
1203 :, [#include <X11/Xlib.h>])], : ,
1204 $X_LIBS -lXrandr -lXrender -lX11 $X_EXTRA_LIBS)
1208 if test "x$enable_shm" = "xyes"; then
1209 # Check for shared memory
1210 AC_CHECK_HEADER(sys/ipc.h, AC_DEFINE(HAVE_IPC_H), no_sys_ipc=yes)
1211 AC_CHECK_HEADER(sys/shm.h, AC_DEFINE(HAVE_SHM_H), no_sys_shm=yes)
1213 # Check for the X shared memory extension header file
1215 AC_MSG_CHECKING(X11/extensions/XShm.h)
1216 if test "x$no_xext_lib" = "xyes"; then
1219 gtk_save_CFLAGS="$CFLAGS"
1220 CFLAGS="$CFLAGS $x_cflags"
1223 #include <sys/types.h>
1224 #include <sys/ipc.h>
1225 #include <sys/shm.h>
1226 #include <X11/Xlib.h>
1227 #include <X11/Xutil.h>
1228 #include <X11/extensions/XShm.h>
1229 ], [XShmSegmentInfo *x_shm_info;], have_xshm=yes)
1230 CFLAGS="$gtk_save_CFLAGS"
1232 AC_MSG_RESULT($have_xshm)
1233 if test $have_xshm = yes ; then
1234 AC_DEFINE(HAVE_XSHM_H)
1239 if test $pango_omitted_x_deps = yes ; then
1240 GDK_EXTRA_LIBS="$x_extra_libs $x_libs $GDK_EXTRA_LIBS"
1242 GDK_EXTRA_LIBS="$x_extra_libs $GDK_EXTRA_LIBS"
1245 AM_CONDITIONAL(USE_X11, true)
1247 AM_CONDITIONAL(HAVE_XFT, false)
1248 AM_CONDITIONAL(XINPUT_XFREE, false)
1249 AM_CONDITIONAL(USE_X11, false)
1252 if test "x$gdktarget" = "xwin32"; then
1253 # We start off with the libraries from Pango
1255 ## be sure we also have Pango built with win32 support
1256 PANGO_PACKAGES="pangowin32"
1258 if test x$have_wintab = xyes; then
1259 GDK_WIN32_EXTRA_CFLAGS="-I $with_wintab/include"
1260 AC_SUBST(GDK_WIN32_EXTRA_CFLAGS)
1263 GDK_EXTRA_LIBS="$GDK_EXTRA_LIBS -lgdi32 -user32 -limm32 -lshell32 -lole32 -luuid"
1264 AM_CONDITIONAL(USE_WIN32, true)
1266 AM_CONDITIONAL(USE_WIN32, false)
1269 AC_SUBST(xinput_progs)
1271 GDK_PIXBUF_XLIB_PACKAGES=
1272 GDK_PIXBUF_XLIB_DEP_LIBS="`$PKG_CONFIG --libs $GDK_PIXBUF_PACKAGES $GDK_PIXBUF_XLIB_PACKAGES` $GDK_PIXBUF_XLIB_EXTRA_LIBS $GDK_PIXBUF_EXTRA_LIBS"
1273 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"
1275 AC_SUBST(GDK_PIXBUF_XLIB_PACKAGES)
1276 AC_SUBST(GDK_PIXBUF_XLIB_EXTRA_LIBS)
1277 AC_SUBST(GDK_PIXBUF_XLIB_EXTRA_CFLAGS)
1278 AC_SUBST(GDK_PIXBUF_XLIB_DEP_LIBS)
1279 AC_SUBST(GDK_PIXBUF_XLIB_DEP_CFLAGS)
1281 if test "x$gdktarget" = "xlinux-fb"; then
1282 if $have_freetype ; then
1285 AC_MSG_ERROR([Using linux-fb backend but freetype was not found])
1288 ft2_libs="`$PKG_CONFIG --libs pangoft2`"
1290 *-lfreetype*) pango_omitted_ft2_deps=no ;;
1291 *) pango_omitted_ft2_deps=yes ;;
1294 CFLAGS="$CFLAGS $FREETYPE_CFLAGS"
1296 if test x$enable_shadowfb = xyes ; then
1297 AC_DEFINE(ENABLE_SHADOW_FB)
1300 if test x$enable_fbmanager = xyes ; then
1301 AC_DEFINE(ENABLE_FB_MANAGER)
1302 AM_CONDITIONAL(ENABLE_FB_MANAGER, true)
1304 AM_CONDITIONAL(ENABLE_FB_MANAGER, false)
1308 if test $pango_omitted_ft2_deps = yes ; then
1309 GDK_EXTRA_LIBS="$FREETYPE_LIBS $GDK_EXTRA_LIBS"
1312 AM_CONDITIONAL(USE_LINUX_FB, true)
1314 AM_CONDITIONAL(USE_LINUX_FB, false)
1315 AM_CONDITIONAL(ENABLE_FB_MANAGER, false)
1319 # Pick correct Pango packages to use
1322 if test "x$gdktarget" = "xx11"; then
1323 if $have_xft = true ; then
1324 PANGO_PACKAGES="pangoxft pangox"
1326 PANGO_PACKAGES=pangox
1328 elif test "x$gdktarget" = "xwin32"; then
1329 PANGO_PACKAGES=pangowin32
1330 elif test "x$gdktarget" = "xlinux-fb"; then
1331 PANGO_PACKAGES=pangoft2
1333 PANGO_PACKAGES=pango
1336 # Check for Pango flags
1338 AC_MSG_CHECKING(Pango flags)
1339 if $PKG_CONFIG --exists $PANGO_PACKAGES ; then
1340 PANGO_CFLAGS=`$PKG_CONFIG --cflags $PANGO_PACKAGES`
1341 PANGO_LIBS=`$PKG_CONFIG --libs $PANGO_PACKAGES`
1343 AC_MSG_RESULT($PANGO_CFLAGS $PANGO_LIBS)
1346 *** Pango not found. Pango is required to build GTK+.
1347 *** See http://www.pango.org for Pango information.
1348 *** For the framebuffer target, you will need to build
1349 *** Pango with freetype support.
1353 CFLAGS="$CFLAGS $PANGO_CFLAGS"
1355 if $PKG_CONFIG --uninstalled $PANGO_PACKAGES; then
1358 AC_CHECK_LIB(pango-1.0, pango_context_new, :, AC_MSG_ERROR([
1359 *** Can't link to Pango. Pango is required to build
1360 *** GTK+. For more information see http://www.pango.org]), $PANGO_LIBS)
1363 CFLAGS="$saved_cflags"
1364 LDFLAGS="$saved_ldflags"
1366 GDK_PACKAGES=$PANGO_PACKAGES
1367 GDK_DEP_LIBS="$GDK_EXTRA_LIBS `$PKG_CONFIG --libs $GDK_PIXBUF_PACKAGES $GDK_PACKAGES` $GDK_PIXBUF_EXTRA_LIBS"
1368 GDK_DEP_CFLAGS="`$PKG_CONFIG --cflags gthread-2.0 $GDK_PIXBUF_PACKAGES $GDK_PACKAGES` $GDK_PIXBUF_EXTRA_CFLAGS $GDK_EXTRA_CFLAGS"
1371 # If we aren't writing explicit dependencies, then don't put the extra libraries we need
1372 # into the pkg-config files
1374 if test $enable_explicit_deps != yes ; then
1378 AC_SUBST(GDK_PACKAGES)
1379 AC_SUBST(GDK_EXTRA_LIBS)
1380 AC_SUBST(GDK_EXTRA_CFLAGS)
1381 AC_SUBST(GDK_DEP_LIBS)
1382 AC_SUBST(GDK_DEP_CFLAGS)
1385 ########################################
1386 # Check for Accessibility Toolkit flags
1387 ########################################
1390 AC_MSG_CHECKING(ATK flags)
1391 if $PKG_CONFIG --exists $ATK_PACKAGES ; then
1392 ATK_CFLAGS=`$PKG_CONFIG --cflags $ATK_PACKAGES`
1393 ATK_LIBS=`$PKG_CONFIG --libs $ATK_PACKAGES`
1395 AC_MSG_RESULT($ATK_CFLAGS $ATK_LIBS)
1398 *** Accessibility Toolkit not found. Accessibility Toolkit is required
1403 if $PKG_CONFIG --uninstalled $ATK_PACKAGES; then
1406 AC_CHECK_LIB(atk-1.0, atk_object_get_type, : , AC_MSG_ERROR([
1407 *** Cannot link to Accessibility Toolkit. Accessibility Toolkit is required
1408 *** to build GTK+]), $ATK_LIBS $GLIB_LIBS)
1414 GTK_DEP_LIBS="$GDK_EXTRA_LIBS `$PKG_CONFIG --libs $GDK_PIXBUF_PACKAGES $GDK_PACKAGES $GTK_PACKAGES` $GTK_EXTRA_LIBS $GDK_PIXBUF_EXTRA_LIBS"
1415 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"
1417 AC_SUBST(GTK_PACKAGES)
1418 AC_SUBST(GTK_EXTRA_LIBS)
1419 AC_SUBST(GTK_EXTRA_CFLAGS)
1420 AC_SUBST(GTK_DEP_LIBS)
1421 AC_SUBST(GTK_DEP_CFLAGS)
1424 AC_SUBST(GTK_DEBUG_FLAGS)
1425 AC_SUBST(GTK_XIM_FLAGS)
1427 ##################################################
1428 # Checks for gtk-doc and docbook-tools
1429 ##################################################
1431 AC_ARG_WITH(html-dir, [ --with-html-dir=PATH path to installed docs ])
1433 if test "x$with_html_dir" = "x" ; then
1434 HTML_DIR='${datadir}/gtk-doc/html'
1436 HTML_DIR=$with_html_dir
1441 AC_CHECK_PROG(GTKDOC, gtkdoc-mkdb, true, false)
1443 gtk_doc_min_version=0.10
1445 gtk_doc_version=`gtkdoc-mkdb --version`
1446 AC_MSG_CHECKING([gtk-doc version ($gtk_doc_version) >= $gtk_doc_min_version])
1448 IFS="${IFS= }"; gtk_save_IFS="$IFS"; IFS="."
1449 set $gtk_doc_version
1450 for min in $gtk_doc_min_version ; do
1452 if test -z $min ; then break; fi
1453 if test -z $cur ; then GTKDOC=false; break; fi
1454 if test $cur -gt $min ; then break ; fi
1455 if test $cur -lt $min ; then GTKDOC=false; break ; fi
1466 AC_CHECK_PROG(DB2HTML, db2html, true, false)
1467 AM_CONDITIONAL(HAVE_DOCBOOK, $DB2HTML)
1469 dnl Make people enable the gtk-doc stuff explicitely.
1470 AC_ARG_ENABLE(gtk-doc, [ --enable-gtk-doc use gtk-doc to build documentation [default=no]], enable_gtk_doc="$enableval", enable_gtk_doc=auto)
1472 if test x$enable_gtk_doc = xyes ; then
1473 if test x$GTKDOC != xtrue ; then
1478 dnl NOTE: We need to use a separate automake conditional for this
1479 dnl to make this work with the tarballs.
1480 AM_CONDITIONAL(ENABLE_GTK_DOC, test x$enable_gtk_doc = xyes)
1483 ##################################################
1485 ##################################################
1487 AC_OUTPUT_COMMANDS([
1489 ## Generate `gdk/gdkconfig.h' in two cases
1490 ## 1. `config.status' is run either explicitly, or via configure.
1491 ## Esp. not when it is run in `Makefile' to generate makefiles and
1493 ## 2. CONFIG_OTHER is set explicitly
1495 ## Case 1 is difficult. We know that `automake' sets one of
1496 ## CONFIG_FILES or CONFIG_HEADERS to empty. This heuristic works
1497 ## only when AM_CONFIG_HEADER is set, however.
1499 if test -n "${CONFIG_FILES}" && test -n "${CONFIG_HEADERS}"; then
1500 # Both CONFIG_FILES and CONFIG_HEADERS are non-empty ==> Case 1
1501 CONFIG_OTHER=${CONFIG_OTHER:-gdk/gdkconfig.h}
1503 case "$CONFIG_OTHER" in
1505 echo creating gdk/gdkconfig.h
1506 outfile=gdkconfig.h-tmp
1507 cat > $outfile <<\_______EOF
1510 * This is a generated file. Please modify `configure.in'
1518 #endif /* __cplusplus */
1522 cat >>$outfile <<_______EOF
1527 cat >>$outfile <<_______EOF
1531 #endif /* __cplusplus */
1533 #endif /* GDKCONFIG_H */
1537 if cmp -s $outfile gdk/gdkconfig.h; then
1538 echo gdk/gdkconfig.h is unchanged
1541 mv $outfile gdk/gdkconfig.h
1545 if test "x$gdktarget" = "xx11" ; then
1547 #define GDK_WINDOWING_X11'
1548 elif test "x$gdktarget" = "xwin32" ; then
1550 #define GDK_WINDOWING_WIN32'
1551 elif test "x$gdktarget" = "xlinux-fb" ; then
1553 #define GDK_WINDOWING_FB
1554 #define GDK_NATIVE_WINDOW_POINTER'
1557 if test x$gdk_wchar_h = xyes; then
1559 #define GDK_HAVE_WCHAR_H 1'
1561 if test x$gdk_wctype_h = xyes; then
1563 #define GDK_HAVE_WCTYPE_H 1"
1565 if test x$gdk_working_wctype = xno; then
1567 #define GDK_HAVE_BROKEN_WCTYPE 1"
1573 AC_PATH_PROG(SGML2HTML, sgml2html, no)
1574 AM_CONDITIONAL(HAVE_SGML2HTML, test x$SGML2HTML != xno)
1584 gdk-pixbuf-2.0-uninstalled.pc
1585 gdk-2.0-uninstalled.pc
1586 gtk+-2.0-uninstalled.pc
1590 build/win32/Makefile
1591 build/win32/dirent/Makefile
1593 demos/gtk-demo/Makefile
1594 demos/gtk-demo/geninclude.pl
1597 docs/reference/Makefile
1598 docs/reference/gdk-pixbuf/Makefile
1599 docs/reference/gdk-pixbuf/version.xml
1600 docs/reference/gdk/Makefile
1601 docs/reference/gdk/version.xml
1602 docs/reference/gtk/Makefile
1603 docs/reference/gtk/version.xml
1605 docs/tutorial/Makefile
1607 gdk-pixbuf/makefile.mingw
1608 gdk-pixbuf/gdk_pixbuf.rc
1609 gdk-pixbuf/gdk-pixbuf-features.h
1610 gdk-pixbuf/pixops/Makefile
1611 gdk-pixbuf/pixops/makefile.mingw
1616 gdk/win32/makefile.mingw
1617 gdk/win32/rc/Makefile
1619 gdk/linux-fb/Makefile
1625 gtk/stock-icons/Makefile
1626 gtk/theme-bits/Makefile
1628 modules/input/Makefile
1630 contrib/gdk-pixbuf-xlib/Makefile
1631 contrib/gdk-pixbuf-xlib/gdk-pixbuf-xlib-2.0.pc