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.0.1
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(xim_inst, [ --disable-xim-inst does not use xim instantiate callback],
184 , enable_xim_inst="maybe")
185 AC_ARG_ENABLE(xkb, [ --enable-xkb support XKB [default=maybe]],
186 , enable_xkb="maybe")
187 AC_ARG_ENABLE(rebuilds, [ --disable-rebuilds disable all source autogeneration rules],,enable_rebuilds=yes)
189 AC_ARG_WITH(xinput, [ --with-xinput=[no/yes] support XInput ])
191 AC_ARG_WITH(wintab, [ --with-wintab=DIRECTORY use Wintab API with win32 backend])
192 AC_ARG_WITH(ie55, [ --with-ie55=DIRECTORY IE5.5 libs and headers (for Active IMM)])
194 GLIB_AC_DIVERT_BEFORE_HELP([
195 if test "$platform_win32" = yes; then
202 AC_ARG_WITH(gdktarget, [ --with-gdktarget=[[x11/linux-fb/win32]] select GDK target [default=$gdktarget]],
203 gdktarget=$with_gdktarget)
207 x11|linux-fb|win32) ;;
208 *) AC_MSG_ERROR([Invalid target for GDK: use x11, linux-fb or win32.]);;
211 gdktargetlib=libgdk-$gdktarget-$GTK_API_VERSION.la
212 gtktargetlib=libgtk-$gdktarget-$GTK_API_VERSION.la
214 AC_SUBST(gdktargetlib)
215 AC_SUBST(gtktargetlib)
217 AC_ARG_ENABLE(shadowfb, [ --disable-shadowfb disable shadowfb support for linux-fb],,enable_shadowfb=yes)
219 AC_ARG_ENABLE(fbmanager, [ --enable-fbmanager enable framebuffer manager support (GtkFB)],enable_fbmanager=yes,enable_fbmanager=no)
221 if test "x$enable_debug" = "xyes"; then
222 test "$cflags_set" = set || CFLAGS="$CFLAGS -g"
223 GTK_DEBUG_FLAGS="-DG_ENABLE_DEBUG"
225 if test "x$enable_debug" = "xno"; then
226 GTK_DEBUG_FLAGS="-DG_DISABLE_ASSERT -DG_DISABLE_CHECKS -DG_DISABLE_CAST_CHECKS"
228 GTK_DEBUG_FLAGS="-DG_DISABLE_CAST_CHECKS"
232 AC_DEFINE_UNQUOTED(GTK_COMPILED_WITH_DEBUGGING, "${enable_debug}")
235 # Build time sanity check...
238 # Checks for programs.
245 if test "x$GCC" = "xyes"; then
247 *[\ \ ]-Wall[\ \ ]*) ;;
248 *) CFLAGS="$CFLAGS -Wall" ;;
251 if test "x$enable_ansi" = "xyes"; then
253 *[\ \ ]-ansi[\ \ ]*) ;;
254 *) CFLAGS="$CFLAGS -ansi" ;;
258 *[\ \ ]-pedantic[\ \ ]*) ;;
259 *) CFLAGS="$CFLAGS -pedantic" ;;
263 if test "$os_win32" = "yes"; then
264 case "$CC $CFLAGS " in
265 *[[\ \ ]]-fnative-struct[[\ \ ]]*) ;;
266 *) CFLAGS="$CFLAGS -fnative-struct" ;;
272 # Honor aclocal flags
273 ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
275 ## Initial sanity check, done here so that users get told they
276 ## have the wrong dependencies as early in the process as possible.
277 ## Later on we actually use the cflags/libs from separate pkg-config
278 ## calls. Oh, also the later pkg-config calls don't include
279 ## the version requirements since those make the module lists
280 ## annoying to construct
281 PKG_CHECK_MODULES(BASE_DEPENDENCIES, glib-2.0 >= $GLIB_REQUIRED_VERSION atk >= $ATK_REQUIRED_VERSION pango >= $PANGO_REQUIRED_VERSION)
283 if test "$os_win32" != yes; then
284 # libtool option to control which symbols are exported
285 # right now, symbols starting with _ are not exported
286 LIBTOOL_EXPORT_OPTIONS='-export-symbols-regex "^[[^_]].*"'
288 # We currently use .def files on Windows (for gdk-pixbuf, gdk and gtk)
289 LIBTOOL_EXPORT_OPTIONS=
291 AC_SUBST(LIBTOOL_EXPORT_OPTIONS)
293 dnl ******************************************************
294 dnl * See whether to include shared library dependencies *
295 dnl ******************************************************
297 AC_ARG_ENABLE(explicit-deps,
298 [ --enable-explicit-deps=[yes/no/auto] use explicit dependencies in .pc files [default=auto]],
299 enable_explicit_deps="$enableval",
300 enable_explicit_deps=auto)
302 AC_MSG_CHECKING([Whether to write dependencies into .pc files])
303 case $enable_explicit_deps in
305 deplib_check_method=`(./libtool --config; echo eval echo \\$deplib_check_method) | sh`
306 if test "X$deplib_check_method" = Xnone || test "x$enable_static" = xyes ; then
307 enable_explicit_deps=yes
309 enable_explicit_deps=no
314 *) AC_MSG_ERROR([Value given to --enable-explicit-deps must be one of yes, no or auto])
317 AC_MSG_RESULT($enable_explicit_deps)
319 AM_CONDITIONAL(DISABLE_EXPLICIT_DEPS, test $enable_explicit_deps = no)
321 # define a MAINT-like variable REBUILD which is set if Perl
322 # and awk are found, so autogenerated sources can be rebuilt
324 AC_PATH_PROGS(PERL, perl5 perl)
326 # We would like indent, but don't require it.
327 AC_CHECK_PROG(INDENT, indent, indent)
330 if test "x$enable_rebuilds" = "xyes" && \
332 $PERL -e 'exit !($] >= 5.002)' > /dev/null 2>&1 ; then
337 AC_CHECK_FUNCS(lstat mkstemp flockfile)
339 # sigsetjmp is a macro on some platforms, so AC_CHECK_FUNCS is not reliable
340 AC_MSG_CHECKING(for sigsetjmp)
341 AC_TRY_LINK([#include <setjmp.h>], [
344 ], gtk_ok=yes, gtk_ok=no)
345 AC_MSG_RESULT($gtk_ok)
346 if test "$gtk_ok" = "yes"; then
347 AC_DEFINE(HAVE_SIGSETJMP)
350 AC_MSG_CHECKING(whether make is GNU Make)
353 if $ac_make --version 2>/dev/null | grep '^GNU Make ' >/dev/null ; then
354 STRIP_BEGIN='$(strip $(STRIP_DUMMY)'
361 AC_SUBST(STRIP_DUMMY)
362 AC_SUBST(STRIP_BEGIN)
366 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"
368 LIBS="$LIBS $INTLLIBS"
370 # AM_GLIB_GNU_GETTEXT above substs $DATADIRNAME
371 # this is the directory where the *.{mo,gmo} files are installed
372 gtklocaledir='${prefix}/${DATADIRNAME}/locale'
373 AC_SUBST(gtklocaledir)
375 dnl The DU4 header files don't provide library prototypes unless
376 dnl -std1 is given to the native cc.
377 AC_MSG_CHECKING([for extra flags to get ANSI library prototypes])
381 AC_TRY_RUN([#include <math.h>
382 int main (void) { return (log(1) != log(1.)); }],
383 AC_MSG_RESULT(none needed),
384 gtk_save_CFLAGS="$CFLAGS"
385 CFLAGS="$CFLAGS -std1"
386 AC_TRY_RUN([#include <math.h>
387 int main (void) { return (log(1) != log(1.)); }],
388 AC_MSG_RESULT(-std1),
390 CFLAGS="$gtk_save_CFLAGS"
392 [No ANSI prototypes found in library. (-std1 didn't work.)]),
395 AC_MSG_RESULT(none needed)
399 AC_MSG_CHECKING(for the BeOS)
410 dnl NeXTStep cc seems to need this
411 AC_MSG_CHECKING([for extra flags for POSIX compliance])
412 AC_TRY_COMPILE([#include <dirent.h>], [DIR *dir;],
413 AC_MSG_RESULT(none needed),
414 gtk_save_CFLAGS="$CFLAGS"
415 CFLAGS="$CFLAGS -posix"
416 AC_TRY_COMPILE([#include <dirent.h>], [DIR *dir;],
417 AC_MSG_RESULT(-posix),
419 CFLAGS="$gtk_save_CFLAGS"
420 AC_MSG_WARN([Could not determine POSIX flag. (-posix didn't work.)])))
423 # Run AM_PATH_GLIB_2_0 to make sure that GLib is installed and working
426 GLIB_PACKAGES="gobject-2.0 gmodule-2.0"
428 AM_PATH_GLIB_2_0($GLIB_REQUIRED_VERSION, :,
430 *** GLIB $GLIB_REQUIRED_VERSION or better is required. The latest version of
431 *** GLIB is always available from ftp://ftp.gtk.org/.]),
432 gobject gmodule gthread)
435 dnl Check for bind_textdomain_codeset, including -lintl if GLib brings it in.
438 LIBS="$LIBS $GLIB_LIBS"
439 AC_CHECK_FUNCS(bind_textdomain_codeset)
442 AC_CHECK_HEADERS(pwd.h, AC_DEFINE(HAVE_PWD_H))
443 AC_CHECK_HEADERS(sys/time.h, AC_DEFINE(HAVE_SYS_TIME_H))
444 AC_CHECK_HEADERS(unistd.h, AC_DEFINE(HAVE_UNISTD_H))
445 AC_CHECK_HEADERS(winsock.h, AC_DEFINE(HAVE_WINSOCK_H))
447 if test "${with_ie55+set}" = set && test $with_ie55 != no; then
448 AC_MSG_CHECKING([for dimm.h])
449 saved_CFLAGS="$CFLAGS"
450 CFLAGS="$CFLAGS -idirafter $with_ie55/Include"
451 AC_TRY_COMPILE([#include <windows.h>
454 /* The w32api imm.h clashes a bit with the IE5.5 dimm.h */
455 #define IMEMENUITEMINFOA hidden_IMEMENUITEMINFOA
456 #define IMEMENUITEMINFOW hidden_IMEMENUITEMINFOW
458 #undef IMEMENUITEMINFOA
459 #undef IMEMENUITEMINFOW
465 AC_MSG_CHECKING([for IE55 uuid.lib])
466 if test -f $with_ie55/Lib/uuid.lib ; then
469 AC_DEFINE(HAVE_DIMM_H)
470 IE55_UUID_LIB="$with_ie55/Lib/uuid.lib"
471 AC_SUBST(IE55_UUID_LIB)
474 CFLAGS="$saved_CFLAGS"
479 CFLAGS="$saved_CFLAGS"
482 AM_CONDITIONAL(HAVE_IE55, test x$have_ie55 = xyes)
484 if test "${with_wintab+set}" = set && test $with_wintab != no; then
485 AC_MSG_CHECKING([for wintab.h])
486 saved_CFLAGS="$CFLAGS"
487 CFLAGS="$CFLAGS -I$with_wintab/include"
488 AC_TRY_COMPILE([#include <windows.h>
489 #include <wintab.h>],
492 AC_MSG_CHECKING([for wntab32x.lib])
493 if test -f $with_wintab/lib/i386/wntab32x.lib ; then
496 AC_DEFINE(HAVE_WINTAB)
497 WINTAB_LIB="$with_wintab/lib/i386/wntab32x.lib"
501 CFLAGS="$saved_cflags"
506 CFLAGS="$saved_cflags"
509 AM_CONDITIONAL(HAVE_WINTAB, test x$have_wintab = xyes)
511 saved_cflags="$CFLAGS"
512 saved_ldflags="$LDFLAGS"
515 # Checks for header files.
518 # Checks for typedefs, structures, and compiler characteristics.
521 # Checks for library functions.
525 AC_CHECK_FUNCS(getresuid)
528 # Check if <sys/select.h> needs to be included for fd_set
529 AC_MSG_CHECKING([for fd_set])
530 AC_TRY_COMPILE([#include <sys/types.h>],
531 [fd_set readMask, writeMask;], gtk_ok=yes, gtk_ok=no)
532 if test $gtk_ok = yes; then
533 AC_MSG_RESULT([yes, found in sys/types.h])
535 AC_HEADER_EGREP(fd_mask, sys/select.h, gtk_ok=yes)
536 if test $gtk_ok = yes; then
537 AC_DEFINE(HAVE_SYS_SELECT_H)
538 AC_MSG_RESULT([yes, found in sys/select.h])
545 # `widechar' tests for gdki18n.h
546 AC_MSG_CHECKING(for wchar.h)
547 AC_TRY_CPP([#include <wchar.h>], gdk_wchar_h=yes, gdk_wchar_h=no)
548 if test $gdk_wchar_h = yes; then
549 AC_DEFINE(HAVE_WCHAR_H,1,[Have wchar.h include file])
551 AC_MSG_RESULT($gdk_wchar_h)
553 # Check for wctype.h (for iswalnum)
554 AC_MSG_CHECKING(for wctype.h)
555 AC_TRY_CPP([#include <wctype.h>], gdk_wctype_h=yes, gdk_wctype_h=no)
556 if test $gdk_wctype_h = yes; then
557 AC_DEFINE(HAVE_WCTYPE_H,1,[Have wctype.h include file])
559 AC_MSG_RESULT($gdk_wctype_h)
561 # in Solaris 2.5, `iswalnum' is in -lw
563 AC_CHECK_FUNC(iswalnum,,[AC_CHECK_LIB(w,iswalnum,GDK_WLIBS=-lw)])
566 LIBS="$LIBS $GDK_WLIBS"
567 # The following is necessary for Linux libc-5.4.38
568 AC_MSG_CHECKING(if iswalnum() and friends are properly defined)
569 AC_TRY_LINK([#include <stdlib.h>],[
570 #if (defined(HAVE_WCTYPE_H) || defined(HAVE_WCHAR_H))
571 # ifdef HAVE_WCTYPE_H
579 # define iswalnum(c) ((wchar_t)(c) <= 0xFF && isalnum(c))
581 iswalnum((wchar_t) 0);
582 ], gdk_working_wctype=yes, gdk_working_wctype=no)
585 if test $gdk_working_wctype = no; then
586 AC_DEFINE(HAVE_BROKEN_WCTYPE,1,[Is the wctype implementation broken])
589 AC_MSG_RESULT($gdk_working_wctype)
594 ##################################################
595 # Checks for gdk-pixbuf
596 ##################################################
598 AC_MSG_CHECKING(whether to build gmodulized gdk-pixbuf)
600 AC_ARG_ENABLE(modules, [ --disable-modules disable dynamic module loading],[
601 if test x$withval = xyes; then
610 if test x$with_modules = xno; then
614 AC_MSG_CHECKING(whether dynamic modules work)
615 ## for loop is to strip newline
616 tmp=`$PKG_CONFIG --variable=gmodule_supported gmodule-2.0`
621 dnl Now we check to see if our libtool supports shared lib deps
622 dnl (in a rather ugly way even)
624 pixbuf_libtool_config="${CONFIG_SHELL-/bin/sh} ./libtool --config"
625 pixbuf_deplibs_check=`$pixbuf_libtool_config | \
626 grep '^[[a-z_]]*check[[a-z_]]*_method=[['\''"]]' | \
627 sed 's/.*[['\''"]]\(.*\)[['\''"]]$/\1/'`
628 if test "x$pixbuf_deplibs_check" = "xnone" || \
629 test "x$pixbuf_deplibs_check" = "xunknown" || \
630 test "x$pixbuf_deplibs_check" = "x"; then
636 AC_DEFINE(USE_GMODULE)
643 dnl We allow people to disable image loaders explicitely, but if they don't we error
644 dnl out so that people don't accidentally build without them.
646 AC_ARG_WITH(libpng, [ --without-libpng disable PNG loader for gdk-pixbuf])
647 AC_ARG_WITH(libjpeg, [ --without-libjpeg disable JPEG loader for gdk-pixbuf])
648 AC_ARG_WITH(libtiff, [ --without-libtiff disable TIFF loader for gdk-pixbuf])
651 if test x$with_libtiff != xno && test -z "$LIBTIFF"; then
652 AC_CHECK_LIB(tiff, TIFFReadScanline,
653 [AC_CHECK_HEADER(tiffio.h,
654 TIFF='tiff'; LIBTIFF='-ltiff',
655 AC_MSG_WARN(*** TIFF loader will not be built (TIFF header files not found) ***))],
656 [AC_CHECK_LIB(tiff, TIFFWriteScanline,
657 [AC_CHECK_HEADER(tiffio.h,
658 TIFF='tiff'; LIBTIFF='-ltiff -ljpeg -lz',
659 AC_MSG_WARN(*** TIFF loader will not be built (TIFF header files not found) ***))],
660 [AC_CHECK_LIB(tiff34, TIFFFlushData,
661 [AC_CHECK_HEADER(tiffio.h,
662 TIFF='tiff'; LIBTIFF='-ltiff34 -ljpeg -lz',
663 AC_MSG_WARN(*** TIFF loader will not be built (TIFF header files not found) ***))],
664 AC_MSG_WARN(*** TIFF plug-in will not be built (TIFF library not found) ***), -ljpeg -lz -lm)], -ljpeg -lz -lm)], -lm)
667 if test x$with_libtiff != xno && test -z "$LIBTIFF"; then
669 *** Checks for TIFF loader failed. You can build without it by passing
670 *** --without-libtiff to configure but some programs using GTK+ may
671 *** not work properly])
675 if test x$with_libjpeg != xno && test -z "$LIBJPEG"; then
676 AC_CHECK_LIB(jpeg, jpeg_destroy_decompress,
679 AC_MSG_WARN(*** JPEG loader will not be built (JPEG library not found) ***))
680 if test "$jpeg_ok" = yes; then
681 AC_MSG_CHECKING([for jpeglib.h])
687 #include <jpeglib.h>],
690 AC_MSG_RESULT($jpeg_ok)
691 if test "$jpeg_ok" = yes; then
693 AC_CHECK_LIB(jpeg, jpeg_simple_progression,
694 AC_DEFINE(HAVE_PROGRESSIVE_JPEG),
695 AC_MSG_WARN(JPEG library does not support progressive saving.))
697 AC_MSG_WARN(*** JPEG loader will not be built (JPEG header file not found) ***)
702 if test x$with_libjpeg != xno && test -z "$LIBJPEG"; then
704 *** Checks for JPEG loader failed. You can build without it by passing
705 *** --without-libjpeg to configure but some programs using GTK+ may
706 *** not work properly])
710 if test x$with_libpng != xno && test -z "$LIBPNG"; then
711 AC_MSG_CHECKING(for libpng12)
712 if $PKG_CONFIG --exists libpng12 ; then
715 PNG_DEP_CFLAGS_PACKAGES=libpng12
716 LIBPNG=`$PKG_CONFIG --libs libpng12`
719 AC_CHECK_LIB(png, png_read_info,
720 [AC_CHECK_HEADER(png.h,
723 AC_MSG_WARN(*** PNG loader will not be built (PNG library not found) ***), -lz -lm)
724 if test "$png_ok" = yes; then
725 AC_MSG_CHECKING([for png_structp in png.h])
726 AC_TRY_COMPILE([#include <png.h>],
727 [png_structp pp; png_infop info; png_colorp cmap; png_create_read_struct;],
730 AC_MSG_RESULT($png_ok)
731 if test "$png_ok" = yes; then
732 PNG='png'; LIBPNG='-lpng -lz'
734 AC_MSG_WARN(*** PNG loader will not be built (PNG library is too old) ***)
737 AC_MSG_WARN(*** PNG loader will not be built (PNG header file not found) ***)
742 if test x$with_libpng != xno && test -z "$LIBPNG"; then
744 *** Checks for PNG loader failed. You can build without it by passing
745 *** --without-libpng to configure but many programs using GTK+ will
746 *** not work properly. The PNG loader is also needed if you are compiling
751 if test -z "$LIBPNG"; then
754 AC_SUBST(REBUILD_PNGS)
760 AM_CONDITIONAL(BUILD_DYNAMIC_MODULES, $dynworks)
763 # Allow building some or all gdk-pixbuf loaders included
765 AC_MSG_CHECKING(pixbuf loaders to build)
767 AC_ARG_WITH(included_loaders, [ --with-included-loaders=LOADER1,LOADER2,... build the specified loaders into gdk-pixbuf (only used if module loading disabled)])
772 ## if the option was specified, leave it; otherwise disable included loaders
773 if test x$with_included_loaders = xno; then
774 with_included_loaders=yes
778 all_loaders="png,bmp,wbmp,gif,ico,jpeg,pnm,ras,tiff,xpm,tga"
780 # If no loaders specified, include all
781 if test "x$with_included_loaders" = xyes ; then
782 included_loaders="$all_loaders"
784 included_loaders="$with_included_loaders"
787 AC_MSG_RESULT($included_loaders)
790 INCLUDED_LOADER_DEFINE=
792 IFS="${IFS= }"; gtk_save_ifs="$IFS"; IFS=","
793 for loader in $included_loaders; do
794 if echo "$all_loaders" | grep "\(^\|\,\)$loader\(\$\|\,\)" > /dev/null; then
797 AC_MSG_ERROR([the specified loader $loader does not exist])
800 INCLUDED_LOADER_OBJ="$INCLUDED_LOADER_OBJ libpixbufloader-static-$loader.la"
801 INCLUDED_LOADER_DEFINE="$INCLUDED_LOADER_DEFINE -DINCLUDE_$loader"
804 AC_SUBST(INCLUDED_LOADER_OBJ)
805 AC_SUBST(INCLUDED_LOADER_DEFINE)
811 AM_CONDITIONAL(HAVE_TIFF, test "x$LIBTIFF" != x)
812 AM_CONDITIONAL(HAVE_PNG, test "x$LIBPNG" != x)
813 AM_CONDITIONAL(HAVE_JPEG, test "x$LIBJPEG" != x)
817 if echo "$included_loaders" | grep "\(^\|\,\)tiff\(\$\|\,\)" > /dev/null; then
818 STATIC_LIB_DEPS="$STATIC_LIB_DEPS $LIBTIFF"
820 if echo "$included_loaders" | grep "\(^\|\,\)jpeg\(\$\|\,\)" > /dev/null; then
821 STATIC_LIB_DEPS="$STATIC_LIB_DEPS $LIBJPEG"
823 if echo "$included_loaders" | grep "\(^\|\,\)png\(\$\|\,\)" > /dev/null; then
824 STATIC_LIB_DEPS="$STATIC_LIB_DEPS $LIBPNG"
827 STATIC_LIB_DEPS="$LIBTIFF $LIBJPEG $LIBPNG"
830 # Checks to see if we should compile in MMX support (there will be
831 # a runtime test when the code is actually run to see if it should
832 # be used - this just checks if we can compile it.)
834 # This code is partially taken from Mesa
836 AC_MSG_CHECKING(for x86 platform)
838 i386|i486|i586|i686|i786|k6|k7)
844 AC_MSG_RESULT($use_x86_asm)
847 if test $use_x86_asm = yes; then
851 AC_MSG_CHECKING(compiler support for MMX)
852 cp $srcdir/gdk-pixbuf/pixops/scale_line_22_33_mmx.S conftest.S
853 if AC_TRY_EVAL(ac_compile); then
860 if test $use_mmx_asm = yes; then
868 AM_CONDITIONAL(USE_MMX, test x$use_mmx_asm = xyes)
870 dnl Look for a host system's gdk-pixbuf-csource if we are cross-compiling
872 AM_CONDITIONAL(CROSS_COMPILING, test $cross_compiling = yes)
874 if test $cross_compiling = yes; then
875 AC_PATH_PROG(GDK_PIXBUF_CSOURCE, gdk-pixbuf-csource, no)
876 if test x$GDK_PIXBUF_CSOURCE = xno; then
877 AC_MSG_ERROR(Could not find a gdk-pixbuf-csource in your PATH)
881 GDK_PIXBUF_PACKAGES="gmodule-2.0 gobject-2.0"
882 GDK_PIXBUF_EXTRA_LIBS="$STATIC_LIB_DEPS $MATH_LIB"
883 GDK_PIXBUF_EXTRA_CFLAGS=
884 GDK_PIXBUF_DEP_LIBS="`$PKG_CONFIG --libs $GDK_PIXBUF_PACKAGES` $GDK_PIXBUF_EXTRA_LIBS"
885 GDK_PIXBUF_DEP_CFLAGS="`$PKG_CONFIG --cflags gthread-2.0 $GDK_PIXBUF_PACKAGES $PNG_DEP_CFLAGS_PACKAGES` $GDK_PIXBUF_EXTRA_CFLAGS"
887 AC_SUBST(GDK_PIXBUF_PACKAGES)
888 AC_SUBST(GDK_PIXBUF_EXTRA_LIBS)
889 AC_SUBST(GDK_PIXBUF_EXTRA_CFLAGS)
890 AC_SUBST(GDK_PIXBUF_DEP_LIBS)
891 AC_SUBST(GDK_PIXBUF_DEP_CFLAGS)
894 ########################################
895 # Windowing system checks
896 ########################################
898 GDK_EXTRA_LIBS=$GDK_WLIBS
903 if test "x$gdktarget" = "xlinux-fb" || test "x$gdktarget" = "xx11" ; then
905 # Checks for FreeType
908 AC_PATH_PROG(FREETYPE_CONFIG, freetype-config, no)
909 if test "x$FREETYPE_CONFIG" != "xno" ; then
910 FREETYPE_CFLAGS=`$FREETYPE_CONFIG --cflags`
911 FREETYPE_LIBS=`$FREETYPE_CONFIG --libs`
913 AC_CHECK_LIB(freetype, FT_New_Face, have_freetype=true
916 if $have_freetype ; then
917 gtk_save_cppflags="$CPPFLAGS"
918 CPPFLAGS="$CPPFLAGS $FREETYPE_CFLAGS"
920 AC_MSG_CHECKING([For sufficiently new FreeType (at least 2.0.1)])
922 #include <freetype/freetype.h>
925 [(void)1;],:,have_freetype=false)
926 if $have_freetype ; then
932 CPPFLAGS="$gtk_save_cppflags"
935 AC_SUBST(FREETYPE_LIBS)
936 AC_SUBST(FREETYPE_CFLAGS)
939 if test "x$gdktarget" = "xx11"; then
940 # We start off with the libraries from Pango
942 if $PKG_CONFIG --exists pangox ; then : ; else
943 AC_MSG_ERROR([pangox Pango backend is required for x11 target])
946 ## be sure we also have Pango built with xft support
947 if $PKG_CONFIG --exists pangoxft ; then
948 PANGO_PACKAGES="pangox pangoxft"
951 if $have_freetype ; then
954 AC_MSG_ERROR([pangoxft Pango backend found but did not find freetype libraries])
957 PANGO_PACKAGES="pangox"
961 AM_CONDITIONAL(HAVE_XFT, $have_xft)
964 # If Pango included the shared library dependencies from X11 in
965 # the pkg-config output, then we use that (to avoid duplicates).
966 # but if they were omitted to avoid binary compatibility problems
967 # then we need to repeat the checks.
969 x_libs="`$PKG_CONFIG --libs $PANGO_PACKAGES`"
971 *-lX11*) pango_omitted_x_deps=no ;;
972 *) pango_omitted_x_deps=yes ;;
975 x_cflags="`$PKG_CONFIG --cflags $PANGO_PACKAGES`"
978 if test $pango_omitted_x_deps = yes ; then
981 if test x$no_x = xyes ; then
982 AC_MSG_ERROR([X development libraries not found])
985 x_libs="$X_LIBS -lX11 $X_EXTRA_LIBS"
988 # Checks for Xft/XRender
992 if test $have_xft = true ; then
993 gtk_save_cppflags="$CPPFLAGS"
994 CPPFLAGS="$CPPFLAGS $x_cflags"
997 AC_CHECK_LIB(Xrender, XRenderFindFormat,
998 [AC_CHECK_LIB(Xft, XftFontOpen,
999 [AC_CHECK_HEADER(X11/Xft/XftFreetype.h,
1001 :,-lXrender -lXext $x_libs $FREETYPE_LIBS)]
1004 CPPFLAGS="$gtk_save_cppflags"
1007 x_libs="$X_LIBS -lXft -lXrender -lXext -lX11 $FREETYPE_LIBS $X_EXTRA_LIBS"
1009 AC_MSG_ERROR([pangoxft Pango backend found, but Xft not found])
1014 ## Strip the .la files
1016 x_libs_for_checks=""
1017 for I in $x_libs ; do
1020 *) x_libs_for_checks="$x_libs_for_checks $I" ;;
1024 # Sanity check for the X11 library
1025 AC_CHECK_LIB(X11, XOpenDisplay, :,
1026 AC_MSG_ERROR([*** libX11 not found. Check 'config.log' for more details.]),
1029 if test "x$enable_shm" = "xyes"; then
1030 # Check for the Xext library (needed for XShm extention)
1031 AC_CHECK_LIB(Xext, XShmAttach,
1032 if test -z "`echo $x_libs | grep "\-lXext" 2> /dev/null`"; then
1033 x_extra_libs="-lXext"
1035 # On AIX, it is in XextSam instead, but we still need -lXext
1036 AC_CHECK_LIB(XextSam, XShmAttach,
1037 if test -z "`echo $x_libs | grep "\-lXext" 2> /dev/null`"; then
1038 x_extra_libs="-lXextSam -lXext"
1040 x_extra_libs="-lXextSam"
1041 fi, , $x_libs_for_checks),
1045 GDK_PIXBUF_XLIB_EXTRA_CFLAGS="$x_cflags"
1046 # Don't ever pull in the pangoxft libraries for gdk-pixbuf-x11
1047 GDK_PIXBUF_XLIB_EXTRA_LIBS="$x_extra_libs `$PKG_CONFIG --libs pangox`"
1049 # Check for Xinerama extension (Solaris impl or Xfree impl)
1054 use_solaris_xinerama=yes
1055 AC_CHECK_LIB(Xext, XineramaGetInfo,
1056 use_solaris_xinerama=yes, use_solaris_xinerama=no)
1057 if test "x$use_solaris_xinerama" = "xyes"; then
1058 AC_CHECK_HEADER(X11/extensions/xinerama.h,
1059 if test -z "`echo $x_extra_libs $x_libs | grep "\-lXext" 2> /dev/null`"; then
1060 x_extra_libs="-lXext $x_extra_libs"
1062 AC_DEFINE(HAVE_SOLARIS_XINERAMA)
1063 AC_DEFINE(HAVE_XINERAMA), use_solaris_xinerama=no)
1065 AC_MSG_CHECKING(for Xinerama support on Solaris)
1066 AC_MSG_RESULT($use_solaris_xinerama);
1070 use_xfree_xinerama=yes
1071 AC_CHECK_LIB(Xinerama, XineramaQueryExtension,
1072 [AC_CHECK_HEADER(extensions/Xinerama.h,
1073 x_extra_libs="-lXinerama $x_extra_libs"
1074 if test -z "`echo $x_extra_libs $x_libs | grep "\-lXext" 2> /dev/null`"; then
1075 x_extra_libs="-lXext $x_extra_libs"
1077 AC_DEFINE(HAVE_XFREE_XINERAMA)
1078 AC_DEFINE(HAVE_XINERAMA),
1079 use_xfree_xinerama=no)],
1080 use_xfree_xinerama=no)
1081 AC_MSG_CHECKING(for Xinerama support on XFree86)
1082 AC_MSG_RESULT($use_xfree_xinerama);
1086 # Check for shaped window extension
1088 AC_CHECK_LIB(Xext, XShapeCombineMask,
1089 if test -z "`echo $x_extra_libs $x_libs | grep "\-lXext" 2> /dev/null`"; then
1090 x_extra_libs="-lXext $x_extra_libs"
1092 AC_DEFINE(HAVE_SHAPE_EXT),
1096 # Check for XConvertCase (X11R6 specific)
1098 AC_CHECK_LIB(X11, XConvertCase,
1099 AC_DEFINE(HAVE_XCONVERTCASE),
1103 # Check for XIM support.
1105 AC_CHECK_LIB(X11, XUnregisterIMInstantiateCallback,
1107 enable_xim_inst="no",
1110 # On Solaris, calling XRegisterIMInstantiateCallback seems to
1111 # cause an immediate segfault, so we disable it, unless
1112 # the user specifically forces it to be on.
1114 if test x$enable_xim_inst = xmaybe ; then
1117 enable_xim_inst="no"
1120 enable_xim_inst="yes"
1125 if test "x$enable_xim" = "xyes"; then
1126 GTK_XIM_FLAGS="-DUSE_XIM"
1127 if test "x$enable_xim_inst" = "xyes"; then
1128 AC_DEFINE(USE_X11R6_XIM)
1132 # Check for XKB support.
1134 if test "x$enable_xkb" = "xyes"; then
1135 AC_MSG_WARN(XKB support explicitly enabled)
1137 elif test "x$enable_xkb" = "xmaybe"; then
1138 AC_CHECK_LIB(X11, XkbQueryExtension,
1139 AC_DEFINE(HAVE_XKB),
1143 AC_MSG_WARN(XKB support explicitly disabled)
1146 x_cflags="$X_CFLAGS"
1147 x_ldflags="$X_LDFLAGS"
1149 # set up things for XInput
1151 if test "x$with_xinput" = "xxfree" || test "x$with_xinput" = "xyes"; then
1152 AC_DEFINE(XINPUT_XFREE)
1153 x_extra_libs="-lXi $x_extra_libs"
1155 AC_DEFINE(XINPUT_NONE)
1158 AM_CONDITIONAL(XINPUT_XFREE, test x$with_xinput = xxfree)
1160 if test "x$enable_shm" = "xyes"; then
1161 # Check for shared memory
1162 AC_CHECK_HEADER(sys/ipc.h, AC_DEFINE(HAVE_IPC_H), no_sys_ipc=yes)
1163 AC_CHECK_HEADER(sys/shm.h, AC_DEFINE(HAVE_SHM_H), no_sys_shm=yes)
1165 # Check for the X shared memory extension header file
1167 AC_MSG_CHECKING(X11/extensions/XShm.h)
1168 if test "x$no_xext_lib" = "xyes"; then
1171 gtk_save_CFLAGS="$CFLAGS"
1172 CFLAGS="$CFLAGS $x_cflags"
1175 #include <sys/types.h>
1176 #include <sys/ipc.h>
1177 #include <sys/shm.h>
1178 #include <X11/Xlib.h>
1179 #include <X11/Xutil.h>
1180 #include <X11/extensions/XShm.h>
1181 ], [XShmSegmentInfo *x_shm_info;], have_xshm=yes)
1182 CFLAGS="$gtk_save_CFLAGS"
1184 AC_MSG_RESULT($have_xshm)
1185 if test $have_xshm = yes ; then
1186 AC_DEFINE(HAVE_XSHM_H)
1191 if test $pango_omitted_x_deps = yes ; then
1192 GDK_EXTRA_LIBS="$x_extra_libs $x_libs $GDK_EXTRA_LIBS"
1194 GDK_EXTRA_LIBS="$x_extra_libs $GDK_EXTRA_LIBS"
1197 AM_CONDITIONAL(USE_X11, true)
1199 AM_CONDITIONAL(USE_X11, false)
1202 if test "x$gdktarget" = "xwin32"; then
1203 # We start off with the libraries from Pango
1205 ## be sure we also have Pango built with win32 support
1206 PANGO_PACKAGES="pangowin32"
1208 if test x$have_wintab = xyes; then
1209 GDK_WIN32_EXTRA_CFLAGS="-I $with_wintab/include"
1210 AC_SUBST(GDK_WIN32_EXTRA_CFLAGS)
1213 GDK_EXTRA_LIBS="$GDK_EXTRA_LIBS -lgdi32 -user32 -limm32 -lshell32 -lole32 -luuid"
1214 AM_CONDITIONAL(USE_WIN32, true)
1216 AM_CONDITIONAL(USE_WIN32, false)
1219 AC_SUBST(xinput_progs)
1221 GDK_PIXBUF_XLIB_PACKAGES=
1222 GDK_PIXBUF_XLIB_DEP_LIBS="`$PKG_CONFIG --libs $GDK_PIXBUF_PACKAGES $GDK_PIXBUF_XLIB_PACKAGES` $GDK_PIXBUF_XLIB_EXTRA_LIBS $GDK_PIXBUF_EXTRA_LIBS"
1223 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"
1225 AC_SUBST(GDK_PIXBUF_XLIB_PACKAGES)
1226 AC_SUBST(GDK_PIXBUF_XLIB_EXTRA_LIBS)
1227 AC_SUBST(GDK_PIXBUF_XLIB_EXTRA_CFLAGS)
1228 AC_SUBST(GDK_PIXBUF_XLIB_DEP_LIBS)
1229 AC_SUBST(GDK_PIXBUF_XLIB_DEP_CFLAGS)
1231 if test "x$gdktarget" = "xlinux-fb"; then
1232 if $have_freetype ; then
1235 AC_MSG_ERROR([Using linux-fb backend but freetype was not found])
1238 ft2_libs="`$PKG_CONFIG --libs pangoft2`"
1240 *-lfreetype*) pango_omitted_ft2_deps=no ;;
1241 *) pango_omitted_ft2_deps=yes ;;
1244 CFLAGS="$CFLAGS $FREETYPE_CFLAGS"
1246 if test x$enable_shadowfb = xyes ; then
1247 AC_DEFINE(ENABLE_SHADOW_FB)
1250 if test x$enable_fbmanager = xyes ; then
1251 AC_DEFINE(ENABLE_FB_MANAGER)
1252 AM_CONDITIONAL(ENABLE_FB_MANAGER, true)
1254 AM_CONDITIONAL(ENABLE_FB_MANAGER, false)
1258 if test $pango_omitted_ft2_deps = yes ; then
1259 GDK_EXTRA_LIBS="$FREETYPE_LIBS $GDK_EXTRA_LIBS"
1262 AM_CONDITIONAL(USE_LINUX_FB, true)
1264 AM_CONDITIONAL(USE_LINUX_FB, false)
1265 AM_CONDITIONAL(ENABLE_FB_MANAGER, false)
1269 # Pick correct Pango packages to use
1272 if test "x$gdktarget" = "xx11"; then
1273 if $have_xft = true ; then
1274 PANGO_PACKAGES="pangox pangoxft"
1276 PANGO_PACKAGES=pangox
1278 elif test "x$gdktarget" = "xwin32"; then
1279 PANGO_PACKAGES=pangowin32
1280 elif test "x$gdktarget" = "xlinux-fb"; then
1281 PANGO_PACKAGES=pangoft2
1283 PANGO_PACKAGES=pango
1286 # Check for Pango flags
1288 AC_MSG_CHECKING(Pango flags)
1289 if $PKG_CONFIG --exists $PANGO_PACKAGES ; then
1290 PANGO_CFLAGS=`$PKG_CONFIG --cflags $PANGO_PACKAGES`
1291 PANGO_LIBS=`$PKG_CONFIG --libs $PANGO_PACKAGES`
1293 AC_MSG_RESULT($PANGO_CFLAGS $PANGO_LIBS)
1296 *** Pango not found. Pango is required to build GTK+.
1297 *** See http://www.pango.org for Pango information.
1298 *** For the framebuffer target, you will need to build
1299 *** Pango with freetype support.
1303 CFLAGS="$CFLAGS $PANGO_CFLAGS"
1305 if $PKG_CONFIG --uninstalled $PANGO_PACKAGES; then
1308 AC_CHECK_LIB(pango-1.0, pango_context_new, :, AC_MSG_ERROR([
1309 *** Can't link to Pango. Pango is required to build
1310 *** GTK+. For more information see http://www.pango.org]), $PANGO_LIBS)
1313 CFLAGS="$saved_cflags"
1314 LDFLAGS="$saved_ldflags"
1316 GDK_PACKAGES=$PANGO_PACKAGES
1317 GDK_DEP_LIBS="$GDK_EXTRA_LIBS `$PKG_CONFIG --libs $GDK_PIXBUF_PACKAGES $GDK_PACKAGES` $GDK_PIXBUF_EXTRA_LIBS"
1318 GDK_DEP_CFLAGS="`$PKG_CONFIG --cflags gthread-2.0 $GDK_PIXBUF_PACKAGES $GDK_PACKAGES` $GDK_PIXBUF_EXTRA_CFLAGS $GDK_EXTRA_CFLAGS"
1321 # If we aren't writing explicit dependencies, then don't put the extra libraries we need
1322 # into the pkg-config files
1324 if test $enable_explicit_deps != yes ; then
1328 AC_SUBST(GDK_PACKAGES)
1329 AC_SUBST(GDK_EXTRA_LIBS)
1330 AC_SUBST(GDK_EXTRA_CFLAGS)
1331 AC_SUBST(GDK_DEP_LIBS)
1332 AC_SUBST(GDK_DEP_CFLAGS)
1335 ########################################
1336 # Check for Accessibility Toolkit flags
1337 ########################################
1340 AC_MSG_CHECKING(ATK flags)
1341 if $PKG_CONFIG --exists $ATK_PACKAGES ; then
1342 ATK_CFLAGS=`$PKG_CONFIG --cflags $ATK_PACKAGES`
1343 ATK_LIBS=`$PKG_CONFIG --libs $ATK_PACKAGES`
1345 AC_MSG_RESULT($ATK_CFLAGS $ATK_LIBS)
1348 *** Accessibility Toolkit not found. Accessibility Toolkit is required
1353 if $PKG_CONFIG --uninstalled $ATK_PACKAGES; then
1356 AC_CHECK_LIB(atk-1.0, atk_object_get_type, : , AC_MSG_ERROR([
1357 *** Cannot link to Accessibility Toolkit. Accessibility Toolkit is required
1358 *** to build GTK+]), $ATK_LIBS $GLIB_LIBS)
1364 GTK_DEP_LIBS="$GDK_EXTRA_LIBS `$PKG_CONFIG --libs $GDK_PIXBUF_PACKAGES $GDK_PACKAGES $GTK_PACKAGES` $GTK_EXTRA_LIBS $GDK_PIXBUF_EXTRA_LIBS"
1365 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"
1367 AC_SUBST(GTK_PACKAGES)
1368 AC_SUBST(GTK_EXTRA_LIBS)
1369 AC_SUBST(GTK_EXTRA_CFLAGS)
1370 AC_SUBST(GTK_DEP_LIBS)
1371 AC_SUBST(GTK_DEP_CFLAGS)
1374 AC_SUBST(GTK_DEBUG_FLAGS)
1375 AC_SUBST(GTK_XIM_FLAGS)
1377 ##################################################
1378 # Checks for gtk-doc and docbook-tools
1379 ##################################################
1381 AC_ARG_WITH(html-dir, [ --with-html-dir=PATH path to installed docs ])
1383 if test "x$with_html_dir" = "x" ; then
1384 HTML_DIR='${datadir}/gtk-doc/html'
1386 HTML_DIR=$with_html_dir
1391 AC_CHECK_PROG(GTKDOC, gtkdoc-mkdb, true, false)
1393 gtk_doc_min_version=0.9
1395 gtk_doc_version=`gtkdoc-mkdb --version`
1396 AC_MSG_CHECKING([gtk-doc version ($gtk_doc_version) >= $gtk_doc_min_version])
1397 if perl <<EOF ; then
1398 exit (("$gtk_doc_version" =~ /^[[0-9]]+\.[[0-9]]+$/) &&
1399 ("$gtk_doc_version" >= "$gtk_doc_min_version") ? 0 : 1);
1408 AC_CHECK_PROG(DB2HTML, db2html, true, false)
1409 AM_CONDITIONAL(HAVE_DOCBOOK, $DB2HTML)
1411 dnl Make people enable the gtk-doc stuff explicitely.
1412 AC_ARG_ENABLE(gtk-doc, [ --enable-gtk-doc use gtk-doc to build documentation [default=no]], enable_gtk_doc="$enableval", enable_gtk_doc=auto)
1414 if test x$enable_gtk_doc = xyes ; then
1415 if test x$GTKDOC != xtrue ; then
1420 dnl NOTE: We need to use a separate automake conditional for this
1421 dnl to make this work with the tarballs.
1422 AM_CONDITIONAL(ENABLE_GTK_DOC, test x$enable_gtk_doc = xyes)
1425 ##################################################
1427 ##################################################
1429 AC_OUTPUT_COMMANDS([
1431 ## Generate `gdk/gdkconfig.h' in two cases
1432 ## 1. `config.status' is run either explicitly, or via configure.
1433 ## Esp. not when it is run in `Makefile' to generate makefiles and
1435 ## 2. CONFIG_OTHER is set explicitly
1437 ## Case 1 is difficult. We know that `automake' sets one of
1438 ## CONFIG_FILES or CONFIG_HEADERS to empty. This heuristic works
1439 ## only when AM_CONFIG_HEADER is set, however.
1441 if test -n "${CONFIG_FILES}" && test -n "${CONFIG_HEADERS}"; then
1442 # Both CONFIG_FILES and CONFIG_HEADERS are non-empty ==> Case 1
1443 CONFIG_OTHER=${CONFIG_OTHER:-gdk/gdkconfig.h}
1445 case "$CONFIG_OTHER" in
1447 echo creating gdk/gdkconfig.h
1448 outfile=gdkconfig.h-tmp
1449 cat > $outfile <<\_______EOF
1452 * This is a generated file. Please modify `configure.in'
1460 #endif /* __cplusplus */
1464 cat >>$outfile <<_______EOF
1469 cat >>$outfile <<_______EOF
1473 #endif /* __cplusplus */
1475 #endif /* GDKCONFIG_H */
1479 if cmp -s $outfile gdk/gdkconfig.h; then
1480 echo gdk/gdkconfig.h is unchanged
1483 mv $outfile gdk/gdkconfig.h
1487 if test "x$gdktarget" = "xx11" ; then
1489 #define GDK_WINDOWING_X11'
1490 elif test "x$gdktarget" = "xwin32" ; then
1492 #define GDK_WINDOWING_WIN32'
1493 elif test "x$gdktarget" = "xlinux-fb" ; then
1495 #define GDK_WINDOWING_FB
1496 #define GDK_NATIVE_WINDOW_POINTER'
1499 if test x$gdk_wchar_h = xyes; then
1501 #define GDK_HAVE_WCHAR_H 1'
1503 if test x$gdk_wctype_h = xyes; then
1505 #define GDK_HAVE_WCTYPE_H 1"
1507 if test x$gdk_working_wctype = xno; then
1509 #define GDK_HAVE_BROKEN_WCTYPE 1"
1515 AC_PATH_PROG(SGML2HTML, sgml2html, no)
1516 AM_CONDITIONAL(HAVE_SGML2HTML, test x$SGML2HTML != xno)
1526 gdk-pixbuf-2.0-uninstalled.pc
1527 gdk-2.0-uninstalled.pc
1528 gtk+-2.0-uninstalled.pc
1532 build/win32/Makefile
1533 build/win32/dirent/Makefile
1535 demos/gtk-demo/Makefile
1536 demos/gtk-demo/geninclude.pl
1539 docs/reference/Makefile
1540 docs/reference/gdk-pixbuf/Makefile
1541 docs/reference/gdk/Makefile
1542 docs/reference/gtk/Makefile
1544 docs/tutorial/Makefile
1546 gdk-pixbuf/makefile.mingw
1547 gdk-pixbuf/gdk_pixbuf.rc
1548 gdk-pixbuf/gdk-pixbuf-features.h
1549 gdk-pixbuf/pixops/Makefile
1550 gdk-pixbuf/pixops/makefile.mingw
1555 gdk/win32/makefile.mingw
1556 gdk/win32/rc/Makefile
1558 gdk/linux-fb/Makefile
1564 gtk/stock-icons/Makefile
1565 gtk/theme-bits/Makefile
1567 modules/input/Makefile
1569 contrib/gdk-pixbuf-xlib/Makefile
1570 contrib/gdk-pixbuf-xlib/gdk-pixbuf-xlib-2.0.pc