1 # Process this file with autoconf to produce a configure script.
2 # require autoconf 2.54
6 # GTK_MICRO_VERSION += 1;
7 # GTK_INTERFACE_AGE += 1;
9 # if any functions have been added, set GTK_INTERFACE_AGE to 0.
10 # if backwards compatibility has been broken,
11 # set GTK_BINARY_AGE and GTK_INTERFACE_AGE to 0.
13 m4_define([gtk_major_version], [2])
14 m4_define([gtk_minor_version], [13])
15 m4_define([gtk_micro_version], [1])
16 m4_define([gtk_interface_age], [0])
17 m4_define([gtk_binary_age],
18 [m4_eval(100 * gtk_minor_version + gtk_micro_version)])
19 m4_define([gtk_version],
20 [gtk_major_version.gtk_minor_version.gtk_micro_version])
21 # This is the X.Y used in -lgtk-FOO-X.Y
22 m4_define([gtk_api_version], [2.0])
24 # Define a string for the earliest version that this release has
25 # backwards binary compatibility with for all interfaces a module
26 # might. Unless we add module-only API with lower stability
27 # guarantees, this should be unchanged until we break binary compat
30 #GTK_BINARY_VERSION=$GTK_MAJOR_VERSION.$GTK_MINOR_VERSION.$LT_CURRENT
31 m4_define([gtk_binary_version], [2.10.0])
33 # required versions of other packages
34 m4_define([glib_required_version], [2.15.0])
35 m4_define([pango_required_version], [1.19.3])
36 m4_define([atk_required_version], [1.13.0])
37 m4_define([cairo_required_version], [1.6])
40 AC_INIT([gtk+], [gtk_version],
41 [http://bugzilla.gnome.org/enter_bug.cgi?product=gtk%2B],
44 AC_CONFIG_SRCDIR([gdk/gdktypes.h])
46 # Save this value here, since automake will set cflags later
47 cflags_set=${CFLAGS+set}
49 AM_INIT_AUTOMAKE(no-define)
50 AM_CONFIG_HEADER(config.h)
53 # For each of the libraries we build, we define the following
55 # substituted variables:
57 # foo_PACKAGES: pkg-config packages this library requires
58 # foo_EXTRA_LIBS: Libraries this module requires not pulled in by pkg-config
59 # foo_EXTRA_CFLAGS: cflags this module requires not pulled in by pkg-config
60 # foo_DEP_LIBS: All libraries this module requires
61 # foo_DEP_CFLAGS: All cflags this module requires
64 GTK_MAJOR_VERSION=gtk_major_version
65 GTK_MINOR_VERSION=gtk_minor_version
66 GTK_MICRO_VERSION=gtk_micro_version
67 GTK_INTERFACE_AGE=gtk_interface_age
68 GTK_BINARY_AGE=gtk_binary_age
69 GTK_VERSION=gtk_version
70 GTK_API_VERSION=gtk_api_version
71 GTK_BINARY_VERSION=gtk_binary_version
72 AC_SUBST(GTK_MAJOR_VERSION)
73 AC_SUBST(GTK_MINOR_VERSION)
74 AC_SUBST(GTK_MICRO_VERSION)
75 AC_SUBST(GTK_INTERFACE_AGE)
76 AC_SUBST(GTK_BINARY_AGE)
77 AC_SUBST(GTK_API_VERSION)
79 AC_SUBST(GTK_BINARY_VERSION)
82 #LT_RELEASE=$GTK_MAJOR_VERSION.$GTK_MINOR_VERSION
83 #LT_CURRENT=`expr $GTK_MICRO_VERSION - $GTK_INTERFACE_AGE`
84 #LT_REVISION=$GTK_INTERFACE_AGE
85 #LT_AGE=`expr $GTK_BINARY_AGE - $GTK_INTERFACE_AGE`
86 #LT_CURRENT_MINUS_AGE=`expr $LT_CURRENT - $LT_AGE`
88 m4_define([lt_current], [m4_eval(100 * gtk_minor_version + gtk_micro_version - gtk_interface_age)])
89 m4_define([lt_revision], [gtk_interface_age])
90 m4_define([lt_age], [m4_eval(gtk_binary_age - gtk_interface_age)])
91 LT_VERSION_INFO="lt_current:lt_revision:lt_age"
92 LT_CURRENT_MINUS_AGE=m4_eval(lt_current - lt_age)
93 AC_SUBST(LT_VERSION_INFO)
94 AC_SUBST(LT_CURRENT_MINUS_AGE)
96 m4_define([gail_lt_current],[18])
97 m4_define([gail_lt_revision],[1])
98 m4_define([gail_lt_age],[0])
99 m4_define([gail_lt_version_info],[gail_lt_current:gail_lt_revision:gail_lt_age])
100 m4_define([gail_lt_current_minus_age],[m4_eval(gail_lt_current - gail_lt_age)])
101 AC_SUBST([GAIL_LT_VERSION_INFO],[gail_lt_version_info])
102 AC_SUBST([GAIL_LT_CURRENT_MINUS_AGE],[gail_lt_current_minus_age])
105 # gdk-pixbuf gets versioned separately, and for now, using standard
106 # libtool versioning, not GTK+-style versioning
108 GDK_PIXBUF_MAJOR=gtk_major_version
109 GDK_PIXBUF_MINOR=gtk_minor_version
110 GDK_PIXBUF_MICRO=gtk_micro_version
111 GDK_PIXBUF_VERSION="${GDK_PIXBUF_MAJOR}.${GDK_PIXBUF_MINOR}.${GDK_PIXBUF_MICRO}"
112 AC_SUBST(GDK_PIXBUF_MAJOR)
113 AC_SUBST(GDK_PIXBUF_MINOR)
114 AC_SUBST(GDK_PIXBUF_MICRO)
115 AC_SUBST(GDK_PIXBUF_VERSION)
117 GETTEXT_PACKAGE=gtk20
118 AC_SUBST(GETTEXT_PACKAGE)
119 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE",
120 [The prefix for our gettext translation domains.])
125 AC_MSG_CHECKING([for native Win32])
135 AC_MSG_RESULT([$os_win32])
142 dnl Initialize libtool
147 dnl Check for a working C++ compiler, but do not bail out, if none is found.
148 dnl We use this for an automated test for C++ header correctness.
150 AC_CHECK_TOOLS(CXX, [$CCC c++ g++ gcc CC cxx cc++ cl], gcc)
154 AC_TRY_COMPILE(,[class a { int b; } c;], ,CXX=)
155 AM_CONDITIONAL(HAVE_CXX, test "$CXX" != "")
157 gtk_save_cxxflags="$CXXFLAGS"
158 CXXFLAGS="$CXXFLAGS -x objective-c++"
159 AC_TRY_COMPILE([@interface Foo @end],,OBJC=yes,OBJC=no)
160 AM_CONDITIONAL(HAVE_OBJC, test "$OBJC" = "yes")
161 CXXFLAGS="$gtk_save_cxxflags"
164 if test "$os_win32" = "yes"; then
165 if test x$enable_static = xyes -o x$enable_static = x; then
166 AC_MSG_WARN([Disabling static library build, must build as DLL on Windows.])
169 if test x$enable_shared = xno; then
170 AC_MSG_WARN([Enabling shared library build, must build as DLL on Windows.])
178 # Make sure we use 64-bit versions of various file stuff.
182 AC_PATH_PROG(NM, nm, nm)
184 dnl Initialize maintainer mode
187 AC_MSG_CHECKING([for some Win32 platform])
189 *-*-mingw*|*-*-cygwin*)
196 AC_MSG_RESULT([$platform_win32])
197 AM_CONDITIONAL(PLATFORM_WIN32, test "$platform_win32" = "yes")
199 AM_CONDITIONAL(OS_WIN32, test "$os_win32" = "yes")
200 AM_CONDITIONAL(OS_UNIX, test "$os_win32" != "yes")
201 AM_CONDITIONAL(OS_LINUX, test "$os_linux" = "yes")
203 if test "$os_win32" = "yes"; then
204 AC_CHECK_TOOL(WINDRES, windres, no)
205 if test "$WINDRES" = no; then
206 AC_MSG_ERROR([*** Could not find an implementation of windres in your PATH.])
208 AC_CHECK_PROG(ms_librarian, lib.exe, yes, no)
210 AM_CONDITIONAL(MS_LIB_AVAILABLE, test x$ms_librarian = xyes)
212 m4_define([debug_default],
213 m4_if(m4_eval(gtk_minor_version % 2), [1], [yes], [minimum]))
215 dnl declare --enable-* args and collect ac_help strings
217 AC_HELP_STRING([--enable-debug=@<:@no/minimum/yes@:>@],
218 [turn on debugging @<:@default=debug_default@:>@]),,
219 enable_debug=debug_default)
221 [AC_HELP_STRING([--enable-shm],
222 [support shared memory if available [default=yes]])],,
225 [AC_HELP_STRING([--enable-xkb],
226 [support XKB [default=maybe]])],,
227 [enable_xkb="maybe"])
228 AC_ARG_ENABLE(xinerama,
229 [AC_HELP_STRING([--enable-xinerama],
230 [support xinerama extension if available [default=yes]])],,
231 [enable_xinerama="no"])
232 AC_ARG_ENABLE(rebuilds,
233 [AC_HELP_STRING([--disable-rebuilds],
234 [disable all source autogeneration rules])],,
235 [enable_rebuilds=yes])
236 AC_ARG_ENABLE(visibility,
237 [AC_HELP_STRING([--disable-visibility],
238 [don't use ELF visibility attributes])],,
239 [enable_visibility=yes])
242 [AC_HELP_STRING([--with-xinput=@<:@no/yes@:>@], [support XInput])])
244 if test "$platform_win32" = yes; then
250 AC_ARG_WITH(gdktarget, [ --with-gdktarget=[[x11/win32/quartz/directfb]] select non-default GDK target],
251 gdktarget=$with_gdktarget)
255 x11|win32|quartz|directfb) ;;
256 *) AC_MSG_ERROR([Invalid target for GDK: use x11, quartz, directfb or win32.]);;
259 gdktargetlib=libgdk-$gdktarget-$GTK_API_VERSION.la
260 gtktargetlib=libgtk-$gdktarget-$GTK_API_VERSION.la
262 AC_SUBST(gdktargetlib)
263 AC_SUBST(gtktargetlib)
265 if test "x$enable_debug" = "xyes"; then
266 test "$cflags_set" = set || CFLAGS="$CFLAGS -g"
267 GTK_DEBUG_FLAGS="-DG_ENABLE_DEBUG -DG_ERRORCHECK_MUTEXES"
269 if test "x$enable_debug" = "xno"; then
270 GTK_DEBUG_FLAGS="-DG_DISABLE_ASSERT -DG_DISABLE_CHECKS -DG_DISABLE_CAST_CHECKS"
272 GTK_DEBUG_FLAGS="-DG_DISABLE_CAST_CHECKS"
277 if test "x$enable_visibility" = "xno"; then
278 GTK_DEBUG_FLAGS="$GTK_DEBUG_FLAGS -DDISABLE_VISIBILITY"
282 AC_DEFINE_UNQUOTED(GTK_COMPILED_WITH_DEBUGGING, "${enable_debug}",
283 [Define if debugging is enabled])
286 # Build time sanity check...
289 # Checks for programs.
296 if test "x$GCC" = "xyes"; then
298 *[\ \ ]-Wall[\ \ ]*) ;;
299 *) CFLAGS="$CFLAGS -Wall" ;;
302 if test "x$enable_ansi" = "xyes"; then
304 *[\ \ ]-ansi[\ \ ]*) ;;
305 *) CFLAGS="$CFLAGS -ansi" ;;
309 *[\ \ ]-pedantic[\ \ ]*) ;;
310 *) CFLAGS="$CFLAGS -pedantic" ;;
316 # Ensure MSVC-compatible struct packing convention is used when
317 # compiling for Win32 with gcc.
318 # What flag to depends on gcc version: gcc3 uses "-mms-bitfields", while
319 # gcc2 uses "-fnative-struct".
320 if test x"$os_win32" = xyes; then
321 if test x"$GCC" = xyes; then
323 AC_MSG_CHECKING([how to get MSVC-compatible struct packing])
324 if test -z "$ac_cv_prog_CC"; then
327 our_gcc="$ac_cv_prog_CC"
329 case `$our_gcc --version | sed -e 's,\..*,.,' -e q` in
331 if $our_gcc -v --help 2>/dev/null | grep fnative-struct >/dev/null; then
332 msnative_struct='-fnative-struct'
336 if $our_gcc -v --help 2>/dev/null | grep ms-bitfields >/dev/null; then
337 msnative_struct='-mms-bitfields'
341 if test x"$msnative_struct" = x ; then
342 AC_MSG_RESULT([no way])
343 AC_MSG_WARN([produced libraries might be incompatible with MSVC-compiled code])
345 CFLAGS="$CFLAGS $msnative_struct"
346 AC_MSG_RESULT([${msnative_struct}])
351 # Honor aclocal flags
352 ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
354 ## Initial sanity check, done here so that users get told they
355 ## have the wrong dependencies as early in the process as possible.
356 ## Later on we actually use the cflags/libs from separate pkg-config
357 ## calls. Oh, also the later pkg-config calls don't include
358 ## the version requirements since those make the module lists
359 ## annoying to construct
360 PKG_CHECK_MODULES(BASE_DEPENDENCIES,
361 [glib-2.0 >= glib_required_version dnl
362 atk >= atk_required_version dnl
363 pango >= pango_required_version dnl
364 cairo >= cairo_required_version])
366 if test "$os_win32" != yes; then
367 # libtool option to control which symbols are exported
368 # right now, symbols starting with _ are not exported
369 LIBTOOL_EXPORT_OPTIONS='-export-symbols-regex "^[[^_]].*"'
371 # We currently use .def files on Windows (for gdk-pixbuf, gdk and gtk)
372 LIBTOOL_EXPORT_OPTIONS=
374 AC_SUBST(LIBTOOL_EXPORT_OPTIONS)
376 dnl ******************************************************
377 dnl * See whether to include shared library dependencies *
378 dnl ******************************************************
380 AC_ARG_ENABLE(explicit-deps,
381 [AC_HELP_STRING([--enable-explicit-deps=@<:@yes/no/auto@:>@],
382 [use explicit dependencies in .pc files [default=auto]])],,
383 [enable_explicit_deps=auto])
385 AC_MSG_CHECKING([Whether to write dependencies into .pc files])
386 case $enable_explicit_deps in
389 deplibs_check_method=`(./libtool --config; echo 'eval echo $deplibs_check_method') | sh`
390 if test "x$deplibs_check_method" '!=' xpass_all || test "x$enable_static" = xyes ; then
391 enable_explicit_deps=yes
393 enable_explicit_deps=no
398 *) AC_MSG_ERROR([Value given to --enable-explicit-deps must be one of yes, no or auto])
401 AC_MSG_RESULT($enable_explicit_deps)
403 AM_CONDITIONAL(DISABLE_EXPLICIT_DEPS, test $enable_explicit_deps = no)
405 # define a MAINT-like variable REBUILD which is set if Perl
406 # and awk are found, so autogenerated sources can be rebuilt
408 AC_PATH_PROGS(PERL, perl5 perl)
410 # We would like indent, but don't require it.
411 AC_CHECK_PROG(INDENT, indent, indent)
414 if test "x$enable_rebuilds" = "xyes" && \
416 $PERL -e 'exit !($] >= 5.002)' > /dev/null 2>&1 ; then
421 AC_CHECK_FUNCS(lstat mkstemp flockfile getc_unlocked)
422 AC_CHECK_FUNCS(localtime_r)
424 # _NL_TIME_FIRST_WEEKDAY is an enum and not a define
425 AC_MSG_CHECKING([for _NL_TIME_FIRST_WEEKDAY])
426 AC_TRY_LINK([#include <langinfo.h>], [
428 c = *((unsigned char *) nl_langinfo(_NL_TIME_FIRST_WEEKDAY));
429 ], gtk_ok=yes, gtk_ok=no)
430 AC_MSG_RESULT($gtk_ok)
431 if test "$gtk_ok" = "yes"; then
432 AC_DEFINE([HAVE__NL_TIME_FIRST_WEEKDAY], [1],
433 [Define if _NL_TIME_FIRST_WEEKDAY is available])
436 # _NL_MEASUREMENT_MEASUREMENT is an enum and not a define
437 AC_MSG_CHECKING([for _NL_MEASUREMENT_MEASUREMENT])
438 AC_TRY_LINK([#include <langinfo.h>], [
440 c = *((unsigned char *) nl_langinfo(_NL_MEASUREMENT_MEASUREMENT));
441 ], gtk_ok=yes, gtk_ok=no)
442 AC_MSG_RESULT($gtk_ok)
443 if test "$gtk_ok" = "yes"; then
444 AC_DEFINE([HAVE__NL_MEASUREMENT_MEASUREMENT], [1],
445 [Define if _NL_MEASUREMENT_MEASUREMENT is available])
448 # _NL_PAPER_HEIGHT is an enum and not a define
449 AC_MSG_CHECKING([for _NL_PAPER_HEIGHT])
450 AC_TRY_LINK([#include <langinfo.h>], [
452 c = *((unsigned char *) nl_langinfo(_NL_PAPER_HEIGHT));
453 ], gtk_ok=yes, gtk_ok=no)
454 AC_MSG_RESULT($gtk_ok)
455 if test "$gtk_ok" = "yes"; then
456 AC_DEFINE([HAVE__NL_PAPER_HEIGHT], [1],
457 [Define if _NL_PAPER_HEIGHT is available])
460 # _NL_PAPER_WIDTH is an enum and not a define
461 AC_MSG_CHECKING([for _NL_PAPER_WIDTH])
462 AC_TRY_LINK([#include <langinfo.h>], [
464 c = *((unsigned char *) nl_langinfo(_NL_PAPER_WIDTH));
465 ], gtk_ok=yes, gtk_ok=no)
466 AC_MSG_RESULT($gtk_ok)
467 if test "$gtk_ok" = "yes"; then
468 AC_DEFINE([HAVE__NL_PAPER_WIDTH], [1],
469 [Define if _NL_PAPER_WIDTH is available])
472 # sigsetjmp is a macro on some platforms, so AC_CHECK_FUNCS is not reliable
473 AC_MSG_CHECKING(for sigsetjmp)
474 AC_TRY_LINK([#include <setjmp.h>], [
477 ], gtk_ok=yes, gtk_ok=no)
478 AC_MSG_RESULT($gtk_ok)
479 if test "$gtk_ok" = "yes"; then
480 AC_DEFINE(HAVE_SIGSETJMP, 1,
481 [Define to 1 if sigsetjmp is available])
485 # TRANSLATORS: Please note that gtk+ has both po/ and po-properties/
486 # directories. If you add a new language to ALL_LINGUAS, please make
487 # sure that both po/ and po-properties/ have .po files that correspond
488 # to your language. If you only add one to po/, the build will break
490 ALL_LINGUAS="af am ang ar as az az_IR be be@latin bg bn bn_IN br bs ca ca@valencia cs cy da de dz el en_CA en_GB eo es et eu fa fi fr ga gl gu he hi hr hu hy ia id io is it ja ka kn ko ku li lt lv mi mk ml mn mr ms nb ne nl nn nso oc or pa pl pt pt_BR ro ru rw si sk sl sq sr sr@Latn sr@ije sv ta te th tk tr tt uk ur uz uz@cyrillic vi wa xh yi zh_CN zh_HK zh_TW"
492 LIBS="$LIBS $INTLLIBS"
493 AC_OUTPUT_COMMANDS([case "$CONFIG_FILES" in *po-properties/Makefile.in*)
494 sed -e "/POTFILES =/r po-properties/POTFILES" po-properties/Makefile.in > po-properties/Makefile
497 AM_GLIB_DEFINE_LOCALEDIR(GTK_LOCALEDIR)
499 dnl The DU4 header files don't provide library prototypes unless
500 dnl -std1 is given to the native cc.
501 AC_MSG_CHECKING([for extra flags to get ANSI library prototypes])
505 AC_TRY_RUN([#include <math.h>
506 int main (void) { return (log(1) != log(1.)); }],
507 AC_MSG_RESULT(none needed),
508 gtk_save_CFLAGS="$CFLAGS"
509 CFLAGS="$CFLAGS -std1"
510 AC_TRY_RUN([#include <math.h>
511 int main (void) { return (log(1) != log(1.)); }],
512 AC_MSG_RESULT(-std1),
514 CFLAGS="$gtk_save_CFLAGS"
516 [No ANSI prototypes found in library. (-std1 didn't work.)]),
519 AC_MSG_RESULT(none needed)
523 AC_MSG_CHECKING(for the BeOS)
537 AC_MSG_CHECKING(for HP-UX)
539 hpux9* | hpux10* | hpux11*)
541 CFLAGS="$CFLAGS -DHPPEX -DSHMLINK"
548 dnl NeXTStep cc seems to need this
549 AC_MSG_CHECKING([for extra flags for POSIX compliance])
550 AC_TRY_COMPILE([#include <dirent.h>], [DIR *dir;],
551 AC_MSG_RESULT(none needed),
552 gtk_save_CFLAGS="$CFLAGS"
553 CFLAGS="$CFLAGS -posix"
554 AC_TRY_COMPILE([#include <dirent.h>], [DIR *dir;],
555 AC_MSG_RESULT(-posix),
557 CFLAGS="$gtk_save_CFLAGS"
558 AC_MSG_WARN([Could not determine POSIX flag. (-posix didn't work.)])))
561 # Run AM_PATH_GLIB_2_0 to make sure that GLib is installed and working
564 GLIB_PACKAGES="gobject-2.0 gmodule-no-export-2.0"
566 AM_PATH_GLIB_2_0(glib_required_version, :,
568 *** GLIB glib_required_version or better is required. The latest version of
569 *** GLIB is always available from ftp://ftp.gtk.org/pub/gtk/.]),
570 gobject gmodule-no-export gthread)
572 # See if it's safe to turn G_DISABLE_DEPRECATED on.
573 GLIB_VERSION_MAJOR_MINOR=`$PKG_CONFIG --modversion glib-2.0 | sed "s/\.@<:@^.@:>@*\$//"`
574 GLIB_REQUIRED_VERSION_MAJOR_MINOR=`echo glib_required_version | sed "s/\.@<:@^.@:>@*\$//"`
575 if test "x$GLIB_VERSION_MAJOR_MINOR" = "x$GLIB_REQUIRED_VERSION_MAJOR_MINOR"; then
576 CFLAGS="-DG_DISABLE_DEPRECATED $CFLAGS"
581 dnl Check for bind_textdomain_codeset, including -lintl if GLib brings it in.
584 LIBS="$LIBS $GLIB_LIBS"
585 AC_CHECK_FUNCS(bind_textdomain_codeset)
588 AC_CHECK_HEADERS(pwd.h,
589 AC_DEFINE(HAVE_PWD_H, 1,
590 [Define to 1 if pwd.h is available]))
591 AC_CHECK_HEADERS(sys/time.h,
592 AC_DEFINE(HAVE_SYS_TIME_H, 1,
593 [Define to 1 if time.h is available]))
594 AC_CHECK_HEADERS(unistd.h,
595 AC_DEFINE(HAVE_UNISTD_H, 1,
596 [Define to 1 if unistd.h is available]))
597 AC_CHECK_HEADERS(ftw.h,
598 AC_DEFINE(HAVE_FTW_H, 1,
599 [Define to 1 if ftw.h is available]))
601 AC_MSG_CHECKING([for GNU ftw extensions])
602 AC_TRY_COMPILE([#define _XOPEN_SOURCE 500
604 #include <ftw.h>], [int flags = FTW_ACTIONRETVAL;], gtk_ok=yes, gtk_ok=no)
605 if test $gtk_ok = yes; then
607 AC_DEFINE(HAVE_GNU_FTW, 1, [Have GNU ftw])
612 saved_cflags="$CFLAGS"
613 saved_ldflags="$LDFLAGS"
616 # Checks for header files.
619 # Checks for typedefs, structures, and compiler characteristics.
622 # Checks for library functions.
626 AC_CHECK_FUNCS(mallinfo)
627 AC_CHECK_FUNCS(getresuid)
630 # Check if <sys/select.h> needs to be included for fd_set
631 AC_MSG_CHECKING([for fd_set])
632 AC_TRY_COMPILE([#include <sys/types.h>],
633 [fd_set readMask, writeMask;], gtk_ok=yes, gtk_ok=no)
634 if test $gtk_ok = yes; then
635 AC_MSG_RESULT([yes, found in sys/types.h])
637 AC_HEADER_EGREP(fd_mask, sys/select.h, gtk_ok=yes)
638 if test $gtk_ok = yes; then
639 AC_DEFINE(HAVE_SYS_SELECT_H, 1,
640 [Define to 1 if sys/select.h is available])
641 AC_MSG_RESULT([yes, found in sys/select.h])
643 AC_DEFINE(NO_FD_SET, 1,
644 [Define to 1 if fd_set is not available])
649 # `widechar' tests for gdki18n.h
650 AC_MSG_CHECKING(for wchar.h)
651 AC_TRY_CPP([#include <wchar.h>], gdk_wchar_h=yes, gdk_wchar_h=no)
652 if test $gdk_wchar_h = yes; then
653 AC_DEFINE(HAVE_WCHAR_H, 1, [Have wchar.h include file])
655 AC_MSG_RESULT($gdk_wchar_h)
657 # Check for wctype.h (for iswalnum)
658 AC_MSG_CHECKING(for wctype.h)
659 AC_TRY_CPP([#include <wctype.h>], gdk_wctype_h=yes, gdk_wctype_h=no)
660 if test $gdk_wctype_h = yes; then
661 AC_DEFINE(HAVE_WCTYPE_H, 1, [Have wctype.h include file])
663 AC_MSG_RESULT($gdk_wctype_h)
665 # in Solaris 2.5, `iswalnum' is in -lw
667 AC_CHECK_FUNC(iswalnum,,[AC_CHECK_LIB(w,iswalnum,GDK_WLIBS=-lw)])
670 LIBS="$LIBS $GDK_WLIBS"
671 # The following is necessary for Linux libc-5.4.38
672 AC_MSG_CHECKING(if iswalnum() and friends are properly defined)
673 AC_TRY_LINK([#include <stdlib.h>],[
674 #if (defined(HAVE_WCTYPE_H) || defined(HAVE_WCHAR_H))
675 # ifdef HAVE_WCTYPE_H
683 # define iswalnum(c) ((wchar_t)(c) <= 0xFF && isalnum(c))
685 iswalnum((wchar_t) 0);
686 ], gdk_working_wctype=yes, gdk_working_wctype=no)
689 if test $gdk_working_wctype = no; then
690 AC_DEFINE(HAVE_BROKEN_WCTYPE, 1, [Is the wctype implementation broken])
693 AC_MSG_RESULT($gdk_working_wctype)
696 # Check for uxtheme.h (for MS-Windows Engine)
697 AC_MSG_CHECKING(for uxtheme.h)
698 AC_TRY_CPP([#include <uxtheme.h>], gtk_uxtheme_h=yes, gtk_uxtheme_h=no)
699 if test $gtk_uxtheme_h = yes; then
700 AC_DEFINE(HAVE_UXTHEME_H, 1, [Have uxtheme.h include file])
702 AC_MSG_RESULT($gtk_uxtheme_h)
704 # Checks for gdkspawn
705 AC_CHECK_HEADERS(crt_externs.h)
706 AC_CHECK_FUNCS(_NSGetEnviron)
709 ##################################################
710 # Checks for gdk-pixbuf
711 ##################################################
713 dnl ********************************************************
714 dnl * See whether we need to load our modules as .la files *
715 dnl ********************************************************
719 *-aix*) use_la_modules=true
722 if $use_la_modules ; then
723 AC_DEFINE(USE_LA_MODULES, 1,
724 [Whether to load modules via .la files rather than directly])
728 AC_MSG_CHECKING(whether to build gmodulized gdk-pixbuf)
730 AC_ARG_ENABLE(modules,
731 [AC_HELP_STRING([--disable-modules],
732 [disable dynamic module loading])])
736 if test x$enable_modules = xno; then
740 AC_MSG_CHECKING(whether dynamic modules work)
741 ## for loop is to strip newline
742 tmp=`$PKG_CONFIG --variable=gmodule_supported gmodule-no-export-2.0`
747 dnl Now we check to see if our libtool supports shared lib deps
748 dnl (in a rather ugly way even)
750 pixbuf_libtool_config="${CONFIG_SHELL-/bin/sh} ./libtool --config"
751 pixbuf_deplibs_check=`$pixbuf_libtool_config | \
752 grep '^[[a-z_]]*check[[a-z_]]*_method=[['\''"]]' | \
753 sed 's/.*[['\''"]]\(.*\)[['\''"]]$/\1/'`
754 if test "x$pixbuf_deplibs_check" = "xnone" || \
755 test "x$pixbuf_deplibs_check" = "xunknown" || \
756 test "x$pixbuf_deplibs_check" = "x"; then
762 AC_DEFINE(USE_GMODULE, 1,
763 [Define to 1 if gmodule works and should be used])
770 dnl We allow people to disable image loaders explicitely, but if they don't we error
771 dnl out so that people don't accidentally build without them.
774 [AC_HELP_STRING([--without-libpng],
775 [disable PNG loader for gdk-pixbuf])])
777 [AC_HELP_STRING([--without-libjpeg],
778 [disable JPEG loader for gdk-pixbuf])])
780 [AC_HELP_STRING([--without-libtiff],
781 [disable TIFF loader for gdk-pixbuf])])
782 AC_ARG_WITH(libjasper,
783 [AC_HELP_STRING([--without-libjasper],
784 [disable JPEG2000 loader for gdk-pixbuf])])
786 AC_ARG_ENABLE(gdiplus,
787 [AC_HELP_STRING([--disable-gdiplus-loaders],
788 [disable GDI+ loaders for gdk-pixbuf])])
790 AM_CONDITIONAL(BUILD_GDIPLUS_LOADERS, [ test x$os_win32 = xyes && test x$enable_gdiplus != xno ])
793 if test x$os_win32 = xno || test x$enable_gdiplus = xno; then
794 if test x$with_libtiff != xno && test -z "$LIBTIFF"; then
795 AC_CHECK_LIB(tiff, TIFFReadRGBAImageOriented,
796 [AC_CHECK_HEADER(tiffio.h,
797 TIFF='tiff'; LIBTIFF='-ltiff',
798 AC_MSG_WARN(*** TIFF loader will not be built (TIFF header files not found) ***))],
799 [AC_CHECK_LIB(tiff, TIFFWriteScanline,
800 [AC_CHECK_HEADER(tiffio.h,
801 TIFF='tiff'; LIBTIFF='-ltiff -ljpeg -lz',
802 AC_MSG_WARN(*** TIFF loader will not be built (TIFF header files not found) ***))],
803 [AC_CHECK_LIB(tiff34, TIFFFlushData,
804 [AC_CHECK_HEADER(tiffio.h,
805 TIFF='tiff'; LIBTIFF='-ltiff34 -ljpeg -lz',
806 AC_MSG_WARN(*** TIFF loader will not be built (TIFF header files not found) ***))],
807 AC_MSG_WARN(*** TIFF loader will not be built (TIFF library not found) ***), -ljpeg -lz -lm)], -ljpeg -lz -lm)], -lm)
810 if test x$with_libtiff != xno && test -z "$LIBTIFF"; then
812 *** Checks for TIFF loader failed. You can build without it by passing
813 *** --without-libtiff to configure but some programs using GTK+ may
814 *** not work properly])
819 if test x$os_win32 = xno || test x$enable_gdiplus = xno; then
820 if test x$with_libjpeg != xno && test -z "$LIBJPEG"; then
821 AC_CHECK_LIB(jpeg, jpeg_destroy_decompress,
824 AC_MSG_WARN(*** JPEG loader will not be built (JPEG library not found) ***))
825 if test "$jpeg_ok" = yes; then
826 AC_MSG_CHECKING([for jpeglib.h])
832 #include <jpeglib.h>],
835 AC_MSG_RESULT($jpeg_ok)
836 if test "$jpeg_ok" = yes; then
838 AC_CHECK_LIB(jpeg, jpeg_simple_progression,
839 AC_DEFINE(HAVE_PROGRESSIVE_JPEG, 1,
840 [Define to 1 is libjpeg supports progressive JPEG]),
841 AC_MSG_WARN(JPEG library does not support progressive saving.))
843 AC_MSG_WARN(*** JPEG loader will not be built (JPEG header file not found) ***)
848 if test x$with_libjpeg != xno && test -z "$LIBJPEG"; then
850 *** Checks for JPEG loader failed. You can build without it by passing
851 *** --without-libjpeg to configure but some programs using GTK+ may
852 *** not work properly])
857 if test x$with_libpng != xno && test -z "$LIBPNG"; then
858 AC_MSG_CHECKING(for libpng12)
859 if $PKG_CONFIG --exists libpng12 ; then
862 PNG_DEP_CFLAGS_PACKAGES=libpng12
863 LIBPNG=`$PKG_CONFIG --libs libpng12`
866 AC_CHECK_LIB(png, png_read_info,
867 [AC_CHECK_HEADER(png.h,
870 AC_MSG_WARN(*** PNG loader will not be built (PNG library not found) ***), -lz -lm)
871 if test "$png_ok" = yes; then
872 AC_MSG_CHECKING([for png_structp in png.h])
873 AC_TRY_COMPILE([#include <png.h>],
874 [png_structp pp; png_infop info; png_colorp cmap; png_create_read_struct;],
877 AC_MSG_RESULT($png_ok)
878 if test "$png_ok" = yes; then
879 PNG='png'; LIBPNG='-lpng -lz'
881 AC_MSG_WARN(*** PNG loader will not be built (PNG library is too old) ***)
884 AC_MSG_WARN(*** PNG loader will not be built (PNG header file not found) ***)
889 if test x$with_libpng != xno && test -z "$LIBPNG"; then
891 *** Checks for PNG loader failed. You can build without it by passing
892 *** --without-libpng to configure but many programs using GTK+ will
893 *** not work properly. The PNG loader is also needed if you are compiling
897 dnl Test for libjasper
898 if test x$with_libjasper != xno && test -z "$LIBJASPER"; then
899 AC_CHECK_LIB(jasper, jas_init, LIBJASPER=-ljasper, [])
902 if test x$with_libjasper != xno && test -z "$LIBJASPER"; then
904 *** Checks for JPEG2000 loader failed. You can build without it by passing
905 *** --without-libjasper to configure])
913 AM_CONDITIONAL(BUILD_DYNAMIC_MODULES, $dynworks)
916 # Allow building some or all gdk-pixbuf loaders included
918 AC_MSG_CHECKING(pixbuf loaders to build)
920 dnl due to an autoconf bug, commas in the first arg to
921 dnl AC_HELP_STRING cause problems.
922 dnl AC_HELP_STRING([--with-included-loaders=LOADER1 LOADER2 ...],
923 dnl [build the specified loaders into gdk-pixbuf])
924 AC_ARG_WITH(included_loaders,
925 [ --with-included-loaders=LOADER1,LOADER2,...
926 build the specified loaders into gdk-pixbuf])
931 ## if the option was specified, leave it; otherwise disable included loaders
932 if test x$with_included_loaders = xno; then
933 with_included_loaders=yes
937 # Use the traditional png loader instead of the GDI+ one on Windows,
938 # because some important apps like GIMP need to read and write
939 # arbitrary tEXt chunks which doesn't seem to be possible through GDI+
941 all_loaders="ani,icns,pcx,ras,tga,png,pnm,wbmp,xbm,xpm"
942 if test x$with_libjasper != xno; then
943 all_loaders="$all_loaders,jasper"
945 if test x$os_win32 = xyes && test x$enable_gdiplus != xno; then
946 # Skip PNG, see comment above
947 gdip_formats="bmp emf gif ico jpeg tiff wmf"
948 for f in $gdip_formats; do
949 all_loaders="$all_loaders,gdip-$f"
952 all_loaders="$all_loaders,bmp,gif,ico,jpeg,tiff"
955 # If no loaders specified, include all
956 if test "x$with_included_loaders" = xyes ; then
957 included_loaders="$all_loaders"
959 included_loaders="$with_included_loaders"
962 AC_MSG_RESULT($included_loaders)
965 INCLUDED_LOADER_DEFINE=
967 IFS="${IFS= }"; gtk_save_ifs="$IFS"; IFS=","
968 for loader in $included_loaders; do
969 if echo "$all_loaders" | egrep "(^|,)$loader(\$|,)" > /dev/null; then
972 AC_MSG_ERROR([the specified loader $loader does not exist])
975 loader_underscores=`echo $loader | sed -e 's/-/_/g'`
976 INCLUDED_LOADER_OBJ="$INCLUDED_LOADER_OBJ libstatic-pixbufloader-$loader.la"
978 # Don't bother defining separate -DINCLUDE_gdip_foo for each gdip-foo loader
981 *) INCLUDED_LOADER_DEFINE="$INCLUDED_LOADER_DEFINE -DINCLUDE_$loader_underscores";;
983 eval INCLUDE_$loader_underscores=yes
986 # Just define one -DINCLUDE_gdiplus for all the gdip-foo loaders
987 # (except gdip-png, which isn't built at all)
988 if test x"$INCLUDE_gdip_ico" = xyes; then
989 INCLUDED_LOADER_DEFINE="$INCLUDED_LOADER_DEFINE -DINCLUDE_gdiplus"
993 AC_SUBST(INCLUDED_LOADER_OBJ)
994 AC_SUBST(INCLUDED_LOADER_DEFINE)
996 AM_CONDITIONAL(INCLUDE_PNG, [test x"$INCLUDE_png" = xyes])
997 AM_CONDITIONAL(INCLUDE_BMP, [test x"$INCLUDE_bmp" = xyes])
998 AM_CONDITIONAL(INCLUDE_WBMP, [test x"$INCLUDE_wbmp" = xyes])
999 AM_CONDITIONAL(INCLUDE_GIF, [test x"$INCLUDE_gif" = xyes])
1000 AM_CONDITIONAL(INCLUDE_ICO, [test x"$INCLUDE_ico" = xyes])
1001 AM_CONDITIONAL(INCLUDE_ANI, [test x"$INCLUDE_ani" = xyes])
1002 AM_CONDITIONAL(INCLUDE_JPEG, [test x"$INCLUDE_jpeg" = xyes])
1003 AM_CONDITIONAL(INCLUDE_PNM, [test x"$INCLUDE_pnm" = xyes])
1004 AM_CONDITIONAL(INCLUDE_RAS, [test x"$INCLUDE_ras" = xyes])
1005 AM_CONDITIONAL(INCLUDE_TIFF, [test x"$INCLUDE_tiff" = xyes])
1006 AM_CONDITIONAL(INCLUDE_XPM, [test x"$INCLUDE_xpm" = xyes])
1007 AM_CONDITIONAL(INCLUDE_XBM, [test x"$INCLUDE_xbm" = xyes])
1008 AM_CONDITIONAL(INCLUDE_TGA, [test x"$INCLUDE_tga" = xyes])
1009 AM_CONDITIONAL(INCLUDE_PCX, [test x"$INCLUDE_pcx" = xyes])
1010 AM_CONDITIONAL(INCLUDE_ICNS, [test x"$INCLUDE_icns" = xyes])
1011 AM_CONDITIONAL(INCLUDE_JASPER, [test x"$INCLUDE_jasper" = xyes])
1012 # As all GDI+ loaders are either built-in or not, arbitrarily just
1013 # check one of the variables here
1014 AM_CONDITIONAL(INCLUDE_GDIPLUS, [test x"$INCLUDE_gdip_ico" = xyes])
1017 # Allow building some or all immodules included
1019 AC_MSG_CHECKING(immodules to build)
1021 dnl due to an autoconf bug, commas in the first arg to
1022 dnl AC_HELP_STRING cause problems.
1023 dnl AC_HELP_STRING([--with-included-immodules=MODULE1 MODULE2 ...],
1024 dnl [build the specified input method modules into gtk])
1025 AC_ARG_WITH(included_immodules,
1026 [ --with-included-immodules=MODULE1,MODULE2,...
1027 build the specified input methods into gtk])
1032 ## if the option was specified, leave it; otherwise disable included immodules
1033 if test x$with_included_immodules = xno; then
1034 with_included_immodules=yes
1038 all_immodules="am-et,cedilla,cyrillic-translit"
1039 if test "$gdktarget" = "win32"; then
1040 all_immodules="${all_immodules},ime"
1042 all_immodules="${all_immodules},inuktitut,ipa,multipress,thai,ti-er,ti-et,viqr"
1043 if test "$gdktarget" = "x11"; then
1044 all_immodules="${all_immodules},xim"
1047 included_immodules=""
1048 # If the switch specified without listing any specific ones, include all
1049 if test "x$with_included_immodules" = xyes ; then
1050 included_immodules="$all_immodules"
1052 included_immodules="$with_included_immodules"
1055 AC_MSG_RESULT($included_immodules)
1056 AM_CONDITIONAL(HAVE_INCLUDED_IMMMODULES, test "x$included_immodules" != x)
1058 INCLUDED_IMMODULE_OBJ=
1059 INCLUDED_IMMODULE_DEFINE=
1061 IFS="${IFS= }"; gtk_save_ifs="$IFS"; IFS=","
1062 for immodule in $included_immodules; do
1063 immodule_underscores=`echo $immodule | sed -e 's/-/_/g'`
1064 if echo "$all_immodules" | egrep "(^|,)$immodule(\$|,)" > /dev/null; then
1067 AC_MSG_ERROR([the specified input method $immodule does not exist])
1070 INCLUDED_IMMODULE_OBJ="$INCLUDED_IMMODULE_OBJ ../modules/input/libstatic-im-$immodule.la"
1071 INCLUDED_IMMODULE_DEFINE="$INCLUDED_IMMODULE_DEFINE -DINCLUDE_IM_$immodule_underscores"
1072 eval INCLUDE_$immodule_underscores=yes
1075 AC_SUBST(INCLUDED_IMMODULE_OBJ)
1076 AC_SUBST(INCLUDED_IMMODULE_DEFINE)
1078 AM_CONDITIONAL(INCLUDE_IM_AM_ET, [test x"$INCLUDE_am_et" = xyes])
1079 AM_CONDITIONAL(INCLUDE_IM_CEDILLA, [test x"$INCLUDE_cedilla" = xyes])
1080 AM_CONDITIONAL(INCLUDE_IM_CYRILLIC_TRANSLIT, [test x"$INCLUDE_cyrillic_translit" = xyes])
1081 AM_CONDITIONAL(INCLUDE_IM_IME, [test x"$INCLUDE_ime" = xyes])
1082 AM_CONDITIONAL(INCLUDE_IM_INUKTITUT, [test x"$INCLUDE_inuktitut" = xyes])
1083 AM_CONDITIONAL(INCLUDE_IM_IPA, [test x"$INCLUDE_ipa" = xyes])
1084 AM_CONDITIONAL(INCLUDE_IM_MULTIPRESS, [test x"$INCLUDE_multipress" = xyes])
1085 AM_CONDITIONAL(INCLUDE_IM_THAI, [test x"$INCLUDE_thai" = xyes])
1086 AM_CONDITIONAL(INCLUDE_IM_TI_ER, [test x"$INCLUDE_ti_er" = xyes])
1087 AM_CONDITIONAL(INCLUDE_IM_TI_ET, [test x"$INCLUDE_ti_et" = xyes])
1088 AM_CONDITIONAL(INCLUDE_IM_VIQR, [test x"$INCLUDE_viqr" = xyes])
1089 AM_CONDITIONAL(INCLUDE_IM_XIM, [test x"$INCLUDE_xim" = xyes])
1095 AM_CONDITIONAL(HAVE_TIFF, test "x$LIBTIFF" != x)
1096 AM_CONDITIONAL(HAVE_PNG, test "x$LIBPNG" != x)
1097 AM_CONDITIONAL(HAVE_JPEG, test "x$LIBJPEG" != x)
1098 AM_CONDITIONAL(HAVE_JASPER, test "x$LIBJASPER" != x)
1102 if echo "$included_loaders" | egrep '(^|,)tiff($|,)' > /dev/null; then
1103 STATIC_LIB_DEPS="$STATIC_LIB_DEPS $LIBTIFF"
1105 if echo "$included_loaders" | egrep '(^|,)jpeg($|,)' > /dev/null; then
1106 STATIC_LIB_DEPS="$STATIC_LIB_DEPS $LIBJPEG"
1108 if echo "$included_loaders" | egrep '(^|,)png($|,)' > /dev/null; then
1109 STATIC_LIB_DEPS="$STATIC_LIB_DEPS $LIBPNG"
1112 STATIC_LIB_DEPS="$LIBTIFF $LIBJPEG $LIBPNG"
1115 # Checks to see whether we should include mediaLib
1118 AC_CHECK_HEADER(sys/systeminfo.h,
1119 AC_DEFINE(HAVE_SYS_SYSTEMINFO_H, 1,
1120 [Define to 1 if sys/systeminfo.h is available]))
1121 AC_CHECK_HEADER(sys/sysinfo.h,
1122 AC_DEFINE(HAVE_SYS_SYSINFO_H, 1,
1123 [Define to 1 if sys/sysinfo.h is available]))
1125 AC_MSG_CHECKING(for mediaLib 2.3)
1127 # Check for a mediaLib 2.3 function since that is what the GTK+ mediaLib
1129 AC_CHECK_LIB(mlib, mlib_ImageSetStruct, use_mlib=yes, use_mlib=no)
1130 if test $use_mlib = yes; then
1131 AC_DEFINE(USE_MEDIALIB, 1,
1132 [Define to 1 if medialib is available and should be used])
1135 AC_MSG_CHECKING(for mediaLib 2.5)
1136 # Check for a mediaLib 2.5 function since that is what is needed for
1137 # gdk_rgb_convert integration.
1138 AC_CHECK_LIB(mlib, mlib_VideoColorRGBint_to_BGRAint, use_mlib25=yes, use_mlib25=no)
1139 if test $use_mlib25 = yes; then
1140 AC_DEFINE(USE_MEDIALIB25, 1,
1141 [Define to 1 if medialib 2.5 is available])
1144 AM_CONDITIONAL(USE_MEDIALIB, test $use_mlib = yes)
1145 AM_CONDITIONAL(USE_MEDIALIB25, test $use_mlib25 = yes)
1147 # Checks to see if we should compile in MMX support (there will be
1148 # a runtime test when the code is actually run to see if it should
1149 # be used - this just checks if we can compile it.)
1151 # This code is partially taken from Mesa
1153 AC_MSG_CHECKING(for x86 platform)
1155 i386|i486|i586|i686|i786|k6|k7)
1161 AC_MSG_RESULT($use_x86_asm)
1164 if test $use_x86_asm = yes; then
1168 AC_MSG_CHECKING(compiler support for MMX)
1169 cp $srcdir/gdk-pixbuf/pixops/scale_line_22_33_mmx.S conftest.S
1170 if AC_TRY_EVAL(ac_compile); then
1177 if test $use_mmx_asm = yes; then
1178 AC_DEFINE(USE_MMX, 1,
1179 [Define to 1 if XXM is available and should be used])
1186 AM_CONDITIONAL(USE_MMX, test x$use_mmx_asm = xyes)
1189 if test -z "$LIBPNG" && test x"$os_win32" = xno -o x$enable_gdiplus = xno; then
1193 dnl Look for a host system's gdk-pixbuf-csource if we are cross-compiling
1195 AM_CONDITIONAL(CROSS_COMPILING, test $cross_compiling = yes)
1197 if test $cross_compiling = yes; then
1198 AC_PATH_PROG(GDK_PIXBUF_CSOURCE, gdk-pixbuf-csource, no)
1199 AC_PATH_PROG(GTK_UPDATE_ICON_CACHE, gtk-update-icon-cache, no)
1200 if test x$GTK_UPDATE_ICON_CACHE = xno; then
1205 if test ! -f $srcdir/gtk/gtkbuiltincache.h &&
1206 test "x$REBUILD_PNGS" = "x#" ; then
1208 *** gtkbuiltincache.h is not in the tree, and cannot be built
1209 *** because you don't have libpng, or (when cross-compiling) you
1210 *** don't have a prebuilt gtk-update-icon-cache on the build system.])
1213 AC_SUBST(REBUILD_PNGS)
1215 GDK_PIXBUF_PACKAGES="gmodule-no-export-2.0 gobject-2.0 gio-2.0"
1216 GDK_PIXBUF_EXTRA_LIBS="$STATIC_LIB_DEPS $MATH_LIB $MEDIA_LIB"
1217 GDK_PIXBUF_EXTRA_CFLAGS=
1218 GDK_PIXBUF_DEP_LIBS="`$PKG_CONFIG --libs $GDK_PIXBUF_PACKAGES` $GDK_PIXBUF_EXTRA_LIBS"
1219 GDK_PIXBUF_DEP_CFLAGS="`$PKG_CONFIG --cflags gthread-2.0 $GDK_PIXBUF_PACKAGES $PNG_DEP_CFLAGS_PACKAGES` $GDK_PIXBUF_EXTRA_CFLAGS"
1221 ########################################
1222 # Windowing system checks
1223 ########################################
1225 GDK_PIXBUF_XLIB_PACKAGES=
1226 GDK_PIXBUF_XLIB_EXTRA_CFLAGS=
1227 GDK_PIXBUF_XLIB_EXTRA_LIBS=
1229 X_PACKAGES=fontconfig
1230 GDK_EXTRA_LIBS="$GDK_WLIBS"
1233 # GTK+ uses some X calls, so needs to link against X directly
1234 GTK_DEP_PACKAGES_FOR_X=
1237 if test "x$gdktarget" = "xx11"; then
1239 # We use fontconfig very peripherally when decoding the default
1242 if $PKG_CONFIG --exists fontconfig; then : ; else
1244 *** fontconfig (http://www.fontconfig.org) is required by the X11 backend.])
1248 # Check for basic X packages; we use pkg-config if available
1250 if $PKG_CONFIG --exists x11 xext xrender; then
1252 X_PACKAGES="$X_PACKAGES x11 xext xrender"
1253 x_libs="`$PKG_CONFIG --libs x11 xext xrender`"
1254 X_CFLAGS="`$PKG_CONFIG --cflags x11 xext xrender`"
1256 # Strip out any .la files that pkg-config might give us (this happens
1257 # with -uninstalled.pc files)
1259 for I in $x_libs ; do
1262 *) x_libs_for_checks="$x_libs_for_checks $I" ;;
1266 GDK_PIXBUF_XLIB_PACKAGES="x11"
1267 GTK_PACKAGES_FOR_X="x11"
1269 have_base_x_pc=false
1271 if test x$no_x = xyes ; then
1272 AC_MSG_ERROR([X development libraries not found])
1275 x_cflags="$X_CFLAGS"
1276 x_libs_for_checks="$X_LIBS -lXext -lXrender -lX11 $X_EXTRA_LIBS"
1278 GDK_PIXBUF_XLIB_EXTRA_CFLAGS="$x_cflags"
1279 GDK_PIXBUF_XLIB_EXTRA_LIBS="$X_LIBS -lX11 $X_EXTRA_LIBS"
1280 GTK_DEP_LIBS_FOR_X="$X_LIBS -lXrender -lX11 $X_EXTRA_LIBS"
1283 # Extra libraries found during checks (-lXinerama, etc), not from pkg-config.
1286 gtk_save_cppflags="$CPPFLAGS"
1287 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
1290 LIBS="$x_libs_for_checks $LIBS"
1292 # Sanity check for the X11 and Xext libraries. While everything we need from
1293 # Xext is optional, the chances a system has *none* of these things is so
1294 # small that we just unconditionally require it.
1295 AC_CHECK_FUNC(XOpenDisplay, :,
1296 AC_MSG_ERROR([*** libX11 not found. Check 'config.log' for more details.]))
1297 AC_CHECK_FUNC(XextFindDisplay, :,
1298 AC_MSG_ERROR([*** libXext not found. Check 'config.log' for more details.]))
1299 AC_CHECK_FUNC(XRenderQueryExtension, :,
1300 AC_MSG_ERROR([*** libXrender not found. Check 'config.log' for more details.]))
1304 AC_MSG_CHECKING([if <X11/extensions/XIproto.h> is needed for xReply])
1305 AC_TRY_COMPILE([#include <X11/Xlibint.h>],
1307 [AC_MSG_RESULT([no])],
1308 [AC_TRY_COMPILE([#include <X11/extensions/XIproto.h>
1309 #include <X11/Xlibint.h>],
1311 [AC_MSG_RESULT([yes])
1312 AC_DEFINE([NEED_XIPROTO_H_FOR_XREPLY], 1,
1313 [Define if <X11/extensions/XIproto.h> needed for xReply])],
1314 [AC_MSG_RESULT([unknown])
1315 AC_MSG_ERROR([xReply type unavailable. X11 is too old])])])
1317 # Check for XConvertCase, XInternAtoms (X11R6 specific)
1319 AC_CHECK_FUNCS(XConvertCase XInternAtoms)
1321 # Generic X11R6 check needed for XIM support; we could
1322 # probably use this to replace the above, but we'll
1323 # leave the separate checks for XConvertCase and XInternAtoms
1327 AC_CHECK_FUNC(XAddConnectionWatch,
1330 if $have_x11r6; then
1331 AC_DEFINE(HAVE_X11R6, 1, [Define if we have X11R6])
1333 AM_CONDITIONAL(HAVE_X11R6, $have_x11r6)
1335 # Check for XKB support.
1337 if test "x$enable_xkb" = "xyes"; then
1338 AC_MSG_WARN(XKB support explicitly enabled)
1339 AC_DEFINE(HAVE_XKB, 1, [Define to use XKB extension])
1340 elif test "x$enable_xkb" = "xmaybe"; then
1341 AC_CHECK_FUNC(XkbQueryExtension,
1342 AC_DEFINE(HAVE_XKB, 1, [Define to use XKB extension]))
1344 AC_MSG_WARN(XKB support explicitly disabled)
1347 # Check for shaped window extension
1349 AC_CHECK_FUNC(XShapeCombineMask,
1350 AC_DEFINE(HAVE_SHAPE_EXT, 1,
1351 [Define to 1 if the XShape extension is available]))
1354 gtk_save_CFLAGS="$CFLAGS"
1355 CFLAGS="$CFLAGS $x_cflags"
1357 AC_CHECK_FUNC(XSyncQueryExtension,
1358 [AC_CHECK_HEADER(X11/extensions/sync.h,
1359 AC_DEFINE(HAVE_XSYNC, 1, [Have the SYNC extension library]),
1360 :, [#include <X11/Xlib.h>])])
1362 CFLAGS="$gtk_save_CFLAGS"
1366 if test "x$enable_shm" = "xyes"; then
1367 # Check for the XShm extension, normally in Xext
1368 AC_CHECK_FUNC(XShmAttach,
1370 # On AIX, it is in XextSam instead
1371 [AC_CHECK_LIB(XextSam, XShmAttach,
1372 [GTK_ADD_LIB(x_extra_libs,XextSam)])])
1375 if test "x$enable_shm" = "xyes"; then
1376 # Check for shared memory
1377 AC_CHECK_HEADER(sys/ipc.h,
1378 AC_DEFINE(HAVE_IPC_H, 1,
1379 [Define to 1 if ipc.h is available]),
1381 AC_CHECK_HEADER(sys/shm.h,
1382 AC_DEFINE(HAVE_SHM_H, 1,
1383 [Define to 1 if shm.h is available]),
1386 # Check for the X shared memory extension header file
1388 AC_MSG_CHECKING(X11/extensions/XShm.h)
1389 if test "x$no_xext_lib" = "xyes"; then
1392 gtk_save_CFLAGS="$CFLAGS"
1393 CFLAGS="$CFLAGS $x_cflags"
1396 #include <sys/types.h>
1397 #include <sys/ipc.h>
1398 #include <sys/shm.h>
1399 #include <X11/Xlib.h>
1400 #include <X11/Xutil.h>
1401 #include <X11/extensions/XShm.h>
1402 ], [XShmSegmentInfo *x_shm_info;], have_xshm=yes)
1403 CFLAGS="$gtk_save_CFLAGS"
1405 AC_MSG_RESULT($have_xshm)
1406 if test $have_xshm = yes ; then
1407 AC_DEFINE(HAVE_XSHM_H, 1,
1408 [Define to 1 if xshm.h is available])
1412 if test "x$enable_xinerama" = "xyes"; then
1413 # Check for Xinerama extension (Solaris impl or Xfree impl)
1414 gtk_save_cppflags="$CPPFLAGS"
1415 CPPFLAGS="$CPPFLAGS $x_cflags"
1420 AC_MSG_CHECKING(for Xinerama support on Solaris)
1422 have_solaris_xinerama=false
1423 AC_CHECK_FUNC(XineramaGetInfo,
1424 [AC_CHECK_HEADER(X11/extensions/xinerama.h,
1425 [have_solaris_xinerama=true], :,
1426 [#include <X11/Xlib.h>])])
1428 if $have_solaris_xinerama ; then
1429 AC_DEFINE(HAVE_SOLARIS_XINERAMA, 1,
1430 [Define to 1 if solaris xinerama is available])
1431 AC_DEFINE(HAVE_XINERAMA, 1,
1432 [Define to 1 if xinerama is available])
1440 AC_MSG_CHECKING(for Xinerama support on XFree86)
1442 have_xfree_xinerama=false
1443 if $PKG_CONFIG --exists xinerama ; then
1444 have_xfree_xinerama=true
1445 X_PACKAGES="$X_PACKAGES xinerama"
1447 AC_CHECK_LIB(Xinerama, XineramaQueryExtension,
1448 [AC_CHECK_HEADER(X11/extensions/Xinerama.h,
1449 [GTK_ADD_LIB(x_extra_libs,Xinerama)
1450 have_xfree_xinerama=true], :,
1451 [#include <X11/Xlib.h>])])
1454 if $have_xfree_xinerama ; then
1455 AC_DEFINE(HAVE_XFREE_XINERAMA, 1,
1456 [Define to 1 if XFree Xinerama is available])
1457 AC_DEFINE(HAVE_XINERAMA, 1,
1458 [Define to 1 is Xinerama is available])
1467 # set up things for XInput
1469 if test "x$with_xinput" = "xxfree" || test "x$with_xinput" = "xyes"; then
1470 AC_DEFINE(XINPUT_XFREE, 1,
1471 [Define to 1 if XFree XInput should be used])
1473 if $PKG_CONFIG --exists xi ; then
1474 X_PACKAGES="$X_PACKAGES xi"
1476 GTK_ADD_LIB(x_extra_libs, Xi)
1479 AC_DEFINE(XINPUT_NONE, 1,
1480 [Define to 1 if no XInput should be used])
1483 AM_CONDITIONAL(XINPUT_XFREE, test x$with_xinput = xxfree || test x$with_xinput = xyes)
1485 # Check for the RANDR extension
1486 if $PKG_CONFIG --exists "xrandr >= 1.2" ; then
1487 AC_DEFINE(HAVE_RANDR, 1, [Have the Xrandr extension library])
1489 X_PACKAGES="$X_PACKAGES xrandr"
1492 # Checks for Xcursor library
1494 if $PKG_CONFIG --exists xcursor ; then
1495 AC_DEFINE(HAVE_XCURSOR, 1, [Have the Xcursor library])
1497 X_PACKAGES="$X_PACKAGES xcursor"
1500 # Checks for XFixes extension
1502 if $PKG_CONFIG --exists xfixes ; then
1503 AC_DEFINE(HAVE_XFIXES, 1, [Have the XFIXES X extension])
1505 X_PACKAGES="$X_PACKAGES xfixes"
1506 GTK_PACKAGES_FOR_X="$GTK_PACKAGES_FOR_X xfixes"
1509 # Checks for Xcomposite extension
1511 if $PKG_CONFIG --exists xcomposite ; then
1512 AC_DEFINE(HAVE_XCOMPOSITE, 1, [Have the XCOMPOSITE X extension])
1514 X_PACKAGES="$X_PACKAGES xcomposite"
1515 GTK_PACKAGES_FOR_X="$GTK_PACKAGES_FOR_X xcomposite"
1518 # Checks for Xdamage extension
1520 if $PKG_CONFIG --exists xdamage ; then
1521 AC_DEFINE(HAVE_XDAMAGE, 1, [Have the XDAMAGE X extension])
1523 X_PACKAGES="$X_PACKAGES xdamage"
1524 GTK_PACKAGES_FOR_X="$GTK_PACKAGES_FOR_X xdamage"
1527 if $have_base_x_pc ; then
1528 GDK_EXTRA_LIBS="$x_extra_libs"
1530 GDK_EXTRA_LIBS="$X_LIBS $x_extra_libs -lXext -lX11 $GDK_EXTRA_LIBS"
1533 CPPFLAGS="$gtk_save_cppflags"
1534 LIBS="$gtk_save_libs"
1536 AM_CONDITIONAL(USE_X11, true)
1538 AM_CONDITIONAL(XINPUT_XFREE, false)
1539 AM_CONDITIONAL(USE_X11, false)
1540 AM_CONDITIONAL(HAVE_X11R6, false)
1543 if test "x$gdktarget" = "xwin32"; then
1544 GDK_EXTRA_LIBS="$GDK_EXTRA_LIBS -lgdi32 -limm32 -lshell32 -lole32 -Wl,-luuid"
1545 AM_CONDITIONAL(USE_WIN32, true)
1547 AM_CONDITIONAL(USE_WIN32, false)
1550 if test "x$gdktarget" = "xquartz"; then
1551 GDK_EXTRA_LIBS="$GDK_EXTRA_LIBS -framework Cocoa"
1552 AM_CONDITIONAL(USE_QUARTZ, true)
1554 AM_CONDITIONAL(USE_QUARTZ, false)
1557 GDK_PIXBUF_XLIB_DEP_LIBS="`$PKG_CONFIG --libs $GDK_PIXBUF_PACKAGES $GDK_PIXBUF_XLIB_PACKAGES` $GDK_PIXBUF_XLIB_EXTRA_LIBS $GDK_PIXBUF_EXTRA_LIBS"
1558 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"
1560 AC_SUBST(GDK_PIXBUF_XLIB_PACKAGES)
1561 AC_SUBST(GDK_PIXBUF_XLIB_EXTRA_LIBS)
1562 AC_SUBST(GDK_PIXBUF_XLIB_EXTRA_CFLAGS)
1563 AC_SUBST(GDK_PIXBUF_XLIB_DEP_LIBS)
1564 AC_SUBST(GDK_PIXBUF_XLIB_DEP_CFLAGS)
1566 if test "x$gdktarget" = "xdirectfb"; then
1567 DIRECTFB_REQUIRED_VERSION=0.9.24
1568 AC_MSG_CHECKING(for DirectFB)
1570 if $PKG_CONFIG --atleast-version $DIRECTFB_REQUIRED_VERSION directfb && $PKG_CONFIG --exists cairo-directfb ; then
1571 AC_MSG_RESULT(found)
1572 GDK_EXTRA_CFLAGS="`$PKG_CONFIG --cflags cairo-directfb` $GDK_EXTRA_CFLAGS"
1573 GDK_EXTRA_LIBS="`$PKG_CONFIG --libs cairo-directfb` $GDK_EXTRA_LIBS"
1576 *** DirectFB $DIRECTFB_REQUIRED_VERSION or newer and the cairo backend
1577 *** are required. The latest version of DirectFB is always available
1578 *** from http://www.directfb.org/.
1582 AM_CONDITIONAL(USE_DIRECTFB, true)
1584 AM_CONDITIONAL(USE_DIRECTFB, false)
1588 # Check for Pango flags
1590 if test "x$gdktarget" = "xwin32"; then
1591 PANGO_PACKAGES="pangowin32 pangocairo"
1593 PANGO_PACKAGES="pango pangocairo"
1596 AC_MSG_CHECKING(Pango flags)
1597 if $PKG_CONFIG --exists $PANGO_PACKAGES ; then
1598 PANGO_CFLAGS=`$PKG_CONFIG --cflags $PANGO_PACKAGES`
1599 PANGO_LIBS=`$PKG_CONFIG --libs $PANGO_PACKAGES`
1601 AC_MSG_RESULT($PANGO_CFLAGS $PANGO_LIBS)
1604 *** Pango not found. Pango built with Cairo support is required
1605 *** to build GTK+. See http://www.pango.org for Pango information.
1609 CFLAGS="$CFLAGS $PANGO_CFLAGS"
1611 if $PKG_CONFIG --uninstalled $PANGO_PACKAGES; then
1614 gtk_save_LIBS="$LIBS"
1615 LIBS="$PANGO_LIBS $LIBS"
1616 AC_TRY_LINK_FUNC(pango_context_new, :, AC_MSG_ERROR([
1617 *** Can't link to Pango. Pango is required to build
1618 *** GTK+. For more information see http://www.pango.org]))
1619 LIBS="$gtk_save_LIBS"
1622 CFLAGS="$saved_cflags"
1623 LDFLAGS="$saved_ldflags"
1625 GDK_PACKAGES="$PANGO_PACKAGES gio-2.0"
1626 if test "x$gdktarget" = "xx11"; then
1627 GDK_PACKAGES="$GDK_PACKAGES $X_PACKAGES"
1629 GDK_DEP_LIBS="$GDK_EXTRA_LIBS `$PKG_CONFIG --libs $GDK_PIXBUF_PACKAGES $GDK_PACKAGES` $GDK_PIXBUF_EXTRA_LIBS"
1630 GDK_DEP_CFLAGS="`$PKG_CONFIG --cflags gthread-2.0 $GDK_PIXBUF_PACKAGES $GDK_PACKAGES` $GDK_PIXBUF_EXTRA_CFLAGS $GDK_EXTRA_CFLAGS"
1633 # If we aren't writing explicit dependencies, then don't put the extra libraries we need
1634 # into the pkg-config files
1636 if test $enable_explicit_deps != yes ; then
1637 GDK_PACKAGES="$PANGO_PACKAGES"
1641 AC_SUBST(GDK_PACKAGES)
1642 AC_SUBST(GDK_EXTRA_LIBS)
1643 AC_SUBST(GDK_EXTRA_CFLAGS)
1644 AC_SUBST(GDK_DEP_LIBS)
1645 AC_SUBST(GDK_DEP_CFLAGS)
1648 ########################################
1649 # Check for Accessibility Toolkit flags
1650 ########################################
1653 AC_MSG_CHECKING(ATK flags)
1654 if $PKG_CONFIG --exists $ATK_PACKAGES ; then
1655 ATK_CFLAGS=`$PKG_CONFIG --cflags $ATK_PACKAGES`
1656 ATK_LIBS=`$PKG_CONFIG --libs $ATK_PACKAGES`
1658 AC_MSG_RESULT($ATK_CFLAGS $ATK_LIBS)
1661 *** Accessibility Toolkit not found. Accessibility Toolkit is required
1666 if $PKG_CONFIG --uninstalled $ATK_PACKAGES; then
1669 gtk_save_LIBS="$LIBS"
1670 LIBS="$ATK_LIBS $LIBS"
1671 AC_TRY_LINK_FUNC(atk_object_get_type, : , AC_MSG_ERROR([
1672 *** Cannot link to Accessibility Toolkit. Accessibility Toolkit is required
1673 *** to build GTK+]))
1674 LIBS="$gtk_save_LIBS"
1677 GTK_PACKAGES="atk cairo gio-2.0"
1680 GTK_DEP_LIBS="$GDK_EXTRA_LIBS $GTK_DEP_LIBS_FOR_X `$PKG_CONFIG --libs $GDK_PIXBUF_PACKAGES $PANGO_PACKAGES $GTK_PACKAGES_FOR_X $GTK_PACKAGES` $GTK_EXTRA_LIBS $GDK_PIXBUF_EXTRA_LIBS"
1681 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"
1683 if test x"$os_win32" = xyes; then
1684 GTK_EXTRA_CFLAGS="$msnative_struct"
1687 GLIB_PREFIX="`$PKG_CONFIG --variable=prefix glib-2.0`"
1688 ATK_PREFIX="`$PKG_CONFIG --variable=prefix atk`"
1689 PANGO_PREFIX="`$PKG_CONFIG --variable=prefix pango`"
1690 CAIRO_PREFIX="`pkg-config --variable=prefix cairo`"
1692 if test $enable_explicit_deps != yes ; then
1693 GDK_PIXBUF_EXTRA_LIBS=
1696 AC_SUBST(GDK_PIXBUF_PACKAGES)
1697 AC_SUBST(GDK_PIXBUF_EXTRA_LIBS)
1698 AC_SUBST(GDK_PIXBUF_EXTRA_CFLAGS)
1699 AC_SUBST(GDK_PIXBUF_DEP_LIBS)
1700 AC_SUBST(GDK_PIXBUF_DEP_CFLAGS)
1702 AC_SUBST(GTK_PACKAGES)
1703 AC_SUBST(GTK_EXTRA_LIBS)
1704 AC_SUBST(GTK_EXTRA_CFLAGS)
1705 AC_SUBST(GTK_DEP_LIBS)
1706 AC_SUBST(GTK_DEP_CFLAGS)
1708 AC_SUBST(GLIB_PREFIX)
1709 AC_SUBST(ATK_PREFIX)
1710 AC_SUBST(PANGO_PREFIX)
1711 AC_SUBST(CAIRO_PREFIX)
1713 AC_SUBST(GTK_DEBUG_FLAGS)
1714 AC_SUBST(GTK_XIM_FLAGS)
1716 ########################
1717 # Checks needed for gail
1718 ########################
1721 dnl Checks for inet libraries:
1722 AC_SEARCH_LIBS(gethostent, nsl)
1723 AC_SEARCH_LIBS(setsockopt, socket)
1724 AC_SEARCH_LIBS(connect, inet)
1726 dnl check for the sockaddr_un.sun_len member
1727 AC_CHECK_MEMBER([struct sockaddr_un.sun_len],
1728 [struct_sockaddr_un_sun_len=true],
1729 [struct_sockaddr_un_suin_len=false],
1730 [#include <sys/types.h>
1731 #include <sys/un.h>]
1733 case $struct_sockaddr_un_sun_len in
1735 AC_DEFINE_UNQUOTED(HAVE_SOCKADDR_UN_SUN_LEN, 1,
1736 [Have the sockaddr_un.sun_len member])
1742 GAIL_INET_LIBS="$LIBS"
1743 AC_SUBST([GAIL_INET_LIBS])
1747 ################################################################
1748 # Printing system checks
1749 ################################################################
1752 [AC_HELP_STRING([--disable-cups]
1753 [disable cups print backend])],,
1756 if test "x$enable_cups" = "xauto"
1758 AC_PATH_PROG(CUPS_CONFIG, cups-config, no)
1759 if test "x$CUPS_CONFIG" != "xno"; then
1760 CUPS_CFLAGS=`$CUPS_CONFIG --cflags | sed 's/-O[0-9]*//' | sed 's/-m[^\t]*//g'`
1761 CUPS_LIBS=`$CUPS_CONFIG --libs`
1763 CUPS_API_VERSION=`$CUPS_CONFIG --api-version`
1764 CUPS_API_MAJOR=`echo $ECHO_N $CUPS_API_VERSION | awk -F. '{print $1}'`
1765 CUPS_API_MINOR=`echo $ECHO_N $CUPS_API_VERSION | awk -F. '{print $2}'`
1767 if test $CUPS_API_MAJOR -gt 1 -o \
1768 $CUPS_API_MAJOR -eq 1 -a $CUPS_API_MINOR -ge 2; then
1769 AC_DEFINE(HAVE_CUPS_API_1_2, 1,
1770 [Define to 1 if CUPS 1.2 API is available])
1773 AC_SUBST(CUPS_API_MAJOR)
1774 AC_SUBST(CUPS_API_MINOR)
1775 AC_SUBST(CUPS_CFLAGS)
1778 AC_CHECK_HEADER(cups/cups.h,,AC_MSG_ERROR([[*** Sorry, cups-config present but cups/cups.h missing.]]))
1780 AM_CONDITIONAL(HAVE_CUPS, test "x$CUPS_CONFIG" != "xno")
1782 gtk_save_cflags="$CFLAGS"
1783 CFLAGS="$CUPS_CFLAGS"
1784 AC_TRY_COMPILE([#include <cups/http.h>],
1785 [http_t http; char *s = http.authstring;],
1786 [AC_DEFINE(HAVE_HTTP_AUTHSTRING, [],
1787 [Define if cups http_t authstring field is accessible])],)
1788 CFLAGS="$gtk_save_cflags"
1790 AC_SUBST(HAVE_HTTP_AUTHSTRING)
1792 gtk_save_libs="$LIBS"
1794 AC_CHECK_FUNCS(httpGetAuthString)
1795 LIBS="$gtk_save_libs"
1798 AM_CONDITIONAL(HAVE_CUPS, false)
1801 gtk_save_cppflags="$CPPFLAGS"
1802 CPPFLAGS="$CPPFLAGS $GTK_DEP_CFLAGS"
1804 AC_CHECK_HEADER(cairo-pdf.h,,AC_MSG_ERROR([
1805 *** Can't find cairo-pdf.h. You must build Cairo with the pdf
1806 *** backend enabled.]))
1808 if test "$os_win32" != "yes"; then
1809 AC_CHECK_HEADER(cairo-ps.h,,AC_MSG_ERROR([
1810 *** Can't find cairo-ps.h. You must build Cairo with the
1811 *** postscript backend enabled.]))
1814 CPPFLAGS="$gtk_save_cppflags"
1817 AC_ARG_ENABLE(test-print-backend,
1818 [AC_HELP_STRING([--enable-test-print-backend],
1819 [build test print backend])],,
1820 [enable_test_print_backend=no])
1821 AM_CONDITIONAL(TEST_PRINT_BACKEND, test "x$enable_test_print_backend" != "xno")
1824 ################################################################
1825 # Strip -export-dynamic from the link lines of various libraries
1826 ################################################################
1829 # pkg-config --libs gmodule includes the "export_dynamic" flag,
1830 # but this flag is only meaningful for executables. For libraries
1831 # the effect is undefined; what it causes on Linux is that the
1832 # export list from -export-symbols-regex is ignored and everything
1835 # We are using gmodule-no-export now, but I'm leaving the stripping
1836 # code in place for now, since pango and atk still require gmodule.
1838 export_dynamic=`(./libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh`
1839 if test -n "$export_dynamic"; then
1840 GDK_PIXBUF_DEP_LIBS=`echo $GDK_PIXBUF_DEP_LIBS | sed -e "s/$export_dynamic//"`
1841 GDK_PIXBUF_XLIB_DEP_LIBS=`echo $GDK_PIXBUF_XLIB_DEP_LIBS | sed -e "s/$export_dynamic//"`
1842 GDK_DEP_LIBS=`echo $GDK_DEP_LIBS | sed -e "s/$export_dynamic//"`
1843 GTK_DEP_LIBS=`echo $GTK_DEP_LIBS | sed -e "s/$export_dynamic//"`
1847 ##################################################
1848 # Checks for gtk-doc and docbook-tools
1849 ##################################################
1851 GTK_DOC_CHECK([1.8])
1853 AC_CHECK_PROG(DB2HTML, db2html, true, false)
1854 AM_CONDITIONAL(HAVE_DOCBOOK, $DB2HTML)
1857 [AC_HELP_STRING([--enable-man],
1858 [regenerate man pages from Docbook [default=no]])],enable_man=yes,
1861 if test "${enable_man}" != no; then
1863 dnl Check for xsltproc
1865 AC_PATH_PROG([XSLTPROC], [xsltproc])
1866 if test -z "$XSLTPROC"; then
1870 dnl check for DocBook DTD and stylesheets in the local catalog.
1871 JH_CHECK_XML_CATALOG([-//OASIS//DTD DocBook XML V4.1.2//EN],
1872 [DocBook XML DTD V4.1.2],,enable_man=no)
1873 JH_CHECK_XML_CATALOG([http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl],
1874 [DocBook XSL Stylesheets],,enable_man=no)
1877 AM_CONDITIONAL(ENABLE_MAN, test x$enable_man != xno)
1880 ##################################################
1882 ##################################################
1884 AC_CONFIG_COMMANDS([gdk/gdkconfig.h], [
1885 outfile=gdkconfig.h-tmp
1886 cat > $outfile <<\_______EOF
1889 * This is a generated file. Please modify `configure.in'
1897 #endif /* __cplusplus */
1901 cat >>$outfile <<_______EOF
1906 cat >>$outfile <<_______EOF
1910 #endif /* __cplusplus */
1912 #endif /* GDKCONFIG_H */
1916 if cmp -s $outfile gdk/gdkconfig.h; then
1917 AC_MSG_NOTICE([gdk/gdkconfig.h is unchanged])
1920 mv $outfile gdk/gdkconfig.h
1923 if test "x$gdktarget" = "xx11" ; then
1925 #define GDK_WINDOWING_X11'
1926 elif test "x$gdktarget" = "xwin32" ; then
1928 #define GDK_WINDOWING_WIN32'
1929 elif test "x$gdktarget" = "xquartz" ; then
1931 #define GDK_WINDOWING_QUARTZ'
1932 elif test "x$gdktarget" = "xdirectfb" ; then
1934 #define GDK_WINDOWING_DIRECTFB'
1937 if test x$gdk_wchar_h = xyes; then
1939 #define GDK_HAVE_WCHAR_H 1'
1941 if test x$gdk_wctype_h = xyes; then
1943 #define GDK_HAVE_WCTYPE_H 1"
1945 if test x$gdk_working_wctype = xno; then
1947 #define GDK_HAVE_BROKEN_WCTYPE 1"
1960 gtk+-unix-print-2.0.pc
1962 gdk-pixbuf-2.0-uninstalled.pc
1963 gdk-2.0-uninstalled.pc
1964 gtk+-2.0-uninstalled.pc
1968 po-properties/Makefile.in
1970 demos/gtk-demo/Makefile
1971 demos/gtk-demo/geninclude.pl
1974 docs/reference/Makefile
1975 docs/reference/gdk-pixbuf/Makefile
1976 docs/reference/gdk-pixbuf/version.xml
1977 docs/reference/gdk/Makefile
1978 docs/reference/gdk/version.xml
1979 docs/reference/gtk/Makefile
1980 docs/reference/gtk/version.xml
1981 docs/reference/libgail-util/Makefile
1984 docs/tutorial/Makefile
1986 gdk-pixbuf/gdk_pixbuf.rc
1987 gdk-pixbuf/gdk-pixbuf-features.h
1988 gdk-pixbuf/pixops/Makefile
1992 gdk/win32/rc/Makefile
1995 gdk/directfb/Makefile
2000 gtk/theme-bits/Makefile
2002 gtk/xdgmime/Makefile
2004 modules/other/Makefile
2005 modules/other/gail/Makefile
2006 modules/other/gail/libgail-util/Makefile
2007 modules/other/gail/tests/Makefile
2008 modules/engines/Makefile
2009 modules/engines/pixbuf/Makefile
2010 modules/engines/ms-windows/Makefile
2011 modules/engines/ms-windows/Theme/Makefile
2012 modules/engines/ms-windows/Theme/gtk-2.0/Makefile
2013 modules/input/Makefile
2014 modules/printbackends/Makefile
2015 modules/printbackends/cups/Makefile
2016 modules/printbackends/lpr/Makefile
2017 modules/printbackends/file/Makefile
2018 modules/printbackends/test/Makefile
2021 contrib/gdk-pixbuf-xlib/Makefile
2022 contrib/gdk-pixbuf-xlib/gdk-pixbuf-xlib-2.0.pc
2027 echo "configuration: