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], [6])
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.17.6])
35 m4_define([pango_required_version], [1.20])
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])
126 LIB_EXE_MACHINE_FLAG=X86
134 LIB_EXE_MACHINE_FLAG=X64
142 AC_MSG_RESULT([$os_win32])
144 AC_SUBST(LIB_EXE_MACHINE_FLAG)
152 dnl Initialize libtool
157 dnl Check for a working C++ compiler, but do not bail out, if none is found.
158 dnl We use this for an automated test for C++ header correctness.
160 AC_CHECK_TOOLS(CXX, [$CCC c++ g++ gcc CC cxx cc++ cl], gcc)
164 AC_TRY_COMPILE(,[class a { int b; } c;], ,CXX=)
165 AM_CONDITIONAL(HAVE_CXX, test "$CXX" != "")
167 gtk_save_cxxflags="$CXXFLAGS"
168 CXXFLAGS="$CXXFLAGS -x objective-c++"
169 AC_TRY_COMPILE([@interface Foo @end],,OBJC=yes,OBJC=no)
170 AM_CONDITIONAL(HAVE_OBJC, test "$OBJC" = "yes")
171 CXXFLAGS="$gtk_save_cxxflags"
174 if test "$os_win32" = "yes"; then
175 if test x$enable_static = xyes -o x$enable_static = x; then
176 AC_MSG_WARN([Disabling static library build, must build as DLL on Windows.])
179 if test x$enable_shared = xno; then
180 AC_MSG_WARN([Enabling shared library build, must build as DLL on Windows.])
188 # Make sure we use 64-bit versions of various file stuff.
192 AC_PATH_PROG(NM, nm, nm)
194 dnl Initialize maintainer mode
197 AC_MSG_CHECKING([for some Win32 platform])
199 *-*-mingw*|*-*-cygwin*)
206 AC_MSG_RESULT([$platform_win32])
207 AM_CONDITIONAL(PLATFORM_WIN32, test "$platform_win32" = "yes")
209 AM_CONDITIONAL(OS_WIN32, test "$os_win32" = "yes")
210 AM_CONDITIONAL(OS_UNIX, test "$os_win32" != "yes")
211 AM_CONDITIONAL(OS_LINUX, test "$os_linux" = "yes")
213 if test "$os_win32" = "yes"; then
214 AC_CHECK_TOOL(WINDRES, windres, no)
215 if test "$WINDRES" = no; then
216 AC_MSG_ERROR([*** Could not find an implementation of windres in your PATH.])
218 AC_CHECK_PROG(ms_librarian, lib.exe, yes, no)
220 AM_CONDITIONAL(MS_LIB_AVAILABLE, test x$ms_librarian = xyes)
222 m4_define([debug_default],
223 m4_if(m4_eval(gtk_minor_version % 2), [1], [yes], [minimum]))
225 dnl declare --enable-* args and collect ac_help strings
227 AC_HELP_STRING([--enable-debug=@<:@no/minimum/yes@:>@],
228 [turn on debugging @<:@default=debug_default@:>@]),,
229 enable_debug=debug_default)
231 [AC_HELP_STRING([--enable-shm],
232 [support shared memory if available [default=yes]])],,
235 [AC_HELP_STRING([--enable-xkb],
236 [support XKB [default=maybe]])],,
237 [enable_xkb="maybe"])
238 AC_ARG_ENABLE(xinerama,
239 [AC_HELP_STRING([--enable-xinerama],
240 [support xinerama extension if available [default=yes]])],,
241 [enable_xinerama="yes"])
242 AC_ARG_ENABLE(rebuilds,
243 [AC_HELP_STRING([--disable-rebuilds],
244 [disable all source autogeneration rules])],,
245 [enable_rebuilds=yes])
246 AC_ARG_ENABLE(visibility,
247 [AC_HELP_STRING([--disable-visibility],
248 [don't use ELF visibility attributes])],,
249 [enable_visibility=yes])
252 [AC_HELP_STRING([--with-xinput=@<:@no/yes@:>@], [support XInput])])
254 if test "$platform_win32" = yes; then
260 AC_ARG_WITH(gdktarget, [ --with-gdktarget=[[x11/win32/quartz/directfb]] select non-default GDK target],
261 gdktarget=$with_gdktarget)
265 x11|win32|quartz|directfb) ;;
266 *) AC_MSG_ERROR([Invalid target for GDK: use x11, quartz, directfb or win32.]);;
269 gdktargetlib=libgdk-$gdktarget-$GTK_API_VERSION.la
270 gtktargetlib=libgtk-$gdktarget-$GTK_API_VERSION.la
272 AC_SUBST(gdktargetlib)
273 AC_SUBST(gtktargetlib)
275 if test "x$enable_debug" = "xyes"; then
276 test "$cflags_set" = set || CFLAGS="$CFLAGS -g"
277 GTK_DEBUG_FLAGS="-DG_ENABLE_DEBUG -DG_ERRORCHECK_MUTEXES"
279 if test "x$enable_debug" = "xno"; then
280 GTK_DEBUG_FLAGS="-DG_DISABLE_ASSERT -DG_DISABLE_CHECKS -DG_DISABLE_CAST_CHECKS"
282 GTK_DEBUG_FLAGS="-DG_DISABLE_CAST_CHECKS"
287 if test "x$enable_visibility" = "xno"; then
288 GTK_DEBUG_FLAGS="$GTK_DEBUG_FLAGS -DDISABLE_VISIBILITY"
292 AC_DEFINE_UNQUOTED(GTK_COMPILED_WITH_DEBUGGING, "${enable_debug}",
293 [Define if debugging is enabled])
296 # Build time sanity check...
299 # Checks for programs.
306 if test "x$GCC" = "xyes"; then
308 *[\ \ ]-Wall[\ \ ]*) ;;
309 *) CFLAGS="$CFLAGS -Wall" ;;
312 if test "x$enable_ansi" = "xyes"; then
314 *[\ \ ]-ansi[\ \ ]*) ;;
315 *) CFLAGS="$CFLAGS -ansi" ;;
319 *[\ \ ]-pedantic[\ \ ]*) ;;
320 *) CFLAGS="$CFLAGS -pedantic" ;;
326 CPPFLAGS="$CPPFLAGS -DG_DISABLE_SINGLE_INCLUDES -DATK_DISABLE_SINGLE_INCLUDES -DPANGO_DISABLE_SINGLE_INCLUDES -DGDK_PIXBUF_DISABLE_SINGLE_INCLUDES -DGTK_DISABLE_SINGLE_INCLUDES"
328 # Ensure MSVC-compatible struct packing convention is used when
329 # compiling for Win32 with gcc.
330 # What flag to depends on gcc version: gcc3 uses "-mms-bitfields", while
331 # gcc2 uses "-fnative-struct".
332 if test x"$os_win32" = xyes; then
333 if test x"$GCC" = xyes; then
335 AC_MSG_CHECKING([how to get MSVC-compatible struct packing])
336 if test -z "$ac_cv_prog_CC"; then
339 our_gcc="$ac_cv_prog_CC"
341 case `$our_gcc --version | sed -e 's,\..*,.,' -e q` in
343 if $our_gcc -v --help 2>/dev/null | grep fnative-struct >/dev/null; then
344 msnative_struct='-fnative-struct'
348 if $our_gcc -v --help 2>/dev/null | grep ms-bitfields >/dev/null; then
349 msnative_struct='-mms-bitfields'
353 if test x"$msnative_struct" = x ; then
354 AC_MSG_RESULT([no way])
355 AC_MSG_WARN([produced libraries might be incompatible with MSVC-compiled code])
357 CFLAGS="$CFLAGS $msnative_struct"
358 AC_MSG_RESULT([${msnative_struct}])
363 # Honor aclocal flags
364 ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
366 ## Initial sanity check, done here so that users get told they
367 ## have the wrong dependencies as early in the process as possible.
368 ## Later on we actually use the cflags/libs from separate pkg-config
369 ## calls. Oh, also the later pkg-config calls don't include
370 ## the version requirements since those make the module lists
371 ## annoying to construct
372 PKG_CHECK_MODULES(BASE_DEPENDENCIES,
373 [glib-2.0 >= glib_required_version dnl
374 atk >= atk_required_version dnl
375 pango >= pango_required_version dnl
376 cairo >= cairo_required_version])
378 if test "$os_win32" != yes; then
379 # libtool option to control which symbols are exported
380 # right now, symbols starting with _ are not exported
381 LIBTOOL_EXPORT_OPTIONS='-export-symbols-regex "^[[^_]].*"'
383 # We currently use .def files on Windows (for gdk-pixbuf, gdk and gtk)
384 LIBTOOL_EXPORT_OPTIONS=
386 AC_SUBST(LIBTOOL_EXPORT_OPTIONS)
388 dnl ******************************************************
389 dnl * See whether to include shared library dependencies *
390 dnl ******************************************************
392 AC_ARG_ENABLE(explicit-deps,
393 [AC_HELP_STRING([--enable-explicit-deps=@<:@yes/no/auto@:>@],
394 [use explicit dependencies in .pc files [default=auto]])],,
395 [enable_explicit_deps=auto])
397 AC_MSG_CHECKING([Whether to write dependencies into .pc files])
398 case $enable_explicit_deps in
401 deplibs_check_method=`(./libtool --config; echo 'eval echo $deplibs_check_method') | sh`
402 if test "x$deplibs_check_method" '!=' xpass_all || test "x$enable_static" = xyes ; then
403 enable_explicit_deps=yes
405 enable_explicit_deps=no
410 *) AC_MSG_ERROR([Value given to --enable-explicit-deps must be one of yes, no or auto])
413 AC_MSG_RESULT($enable_explicit_deps)
415 AM_CONDITIONAL(DISABLE_EXPLICIT_DEPS, test $enable_explicit_deps = no)
417 # define a MAINT-like variable REBUILD which is set if Perl
418 # and awk are found, so autogenerated sources can be rebuilt
420 AC_PATH_PROGS(PERL, perl5 perl)
422 # We would like indent, but don't require it.
423 AC_CHECK_PROG(INDENT, indent, indent)
426 if test "x$enable_rebuilds" = "xyes" && \
428 $PERL -e 'exit !($] >= 5.002)' > /dev/null 2>&1 ; then
433 AC_CHECK_FUNCS(lstat mkstemp flockfile getc_unlocked)
434 AC_CHECK_FUNCS(localtime_r)
436 # _NL_TIME_FIRST_WEEKDAY is an enum and not a define
437 AC_MSG_CHECKING([for _NL_TIME_FIRST_WEEKDAY])
438 AC_TRY_LINK([#include <langinfo.h>], [
440 c = *((unsigned char *) nl_langinfo(_NL_TIME_FIRST_WEEKDAY));
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_TIME_FIRST_WEEKDAY], [1],
445 [Define if _NL_TIME_FIRST_WEEKDAY is available])
448 # _NL_MEASUREMENT_MEASUREMENT is an enum and not a define
449 AC_MSG_CHECKING([for _NL_MEASUREMENT_MEASUREMENT])
450 AC_TRY_LINK([#include <langinfo.h>], [
452 c = *((unsigned char *) nl_langinfo(_NL_MEASUREMENT_MEASUREMENT));
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_MEASUREMENT_MEASUREMENT], [1],
457 [Define if _NL_MEASUREMENT_MEASUREMENT is available])
460 # _NL_PAPER_HEIGHT is an enum and not a define
461 AC_MSG_CHECKING([for _NL_PAPER_HEIGHT])
462 AC_TRY_LINK([#include <langinfo.h>], [
464 c = *((unsigned char *) nl_langinfo(_NL_PAPER_HEIGHT));
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_HEIGHT], [1],
469 [Define if _NL_PAPER_HEIGHT is available])
472 # _NL_PAPER_WIDTH is an enum and not a define
473 AC_MSG_CHECKING([for _NL_PAPER_WIDTH])
474 AC_TRY_LINK([#include <langinfo.h>], [
476 c = *((unsigned char *) nl_langinfo(_NL_PAPER_WIDTH));
477 ], gtk_ok=yes, gtk_ok=no)
478 AC_MSG_RESULT($gtk_ok)
479 if test "$gtk_ok" = "yes"; then
480 AC_DEFINE([HAVE__NL_PAPER_WIDTH], [1],
481 [Define if _NL_PAPER_WIDTH is available])
484 # sigsetjmp is a macro on some platforms, so AC_CHECK_FUNCS is not reliable
485 AC_MSG_CHECKING(for sigsetjmp)
486 AC_TRY_LINK([#include <setjmp.h>], [
489 ], gtk_ok=yes, gtk_ok=no)
490 AC_MSG_RESULT($gtk_ok)
491 if test "$gtk_ok" = "yes"; then
492 AC_DEFINE(HAVE_SIGSETJMP, 1,
493 [Define to 1 if sigsetjmp is available])
497 ALL_LINGUAS="`grep -v '^#' "$srcdir/po/LINGUAS" | tr '\n' ' '`"
499 LIBS="$LIBS $INTLLIBS"
500 AC_OUTPUT_COMMANDS([case "$CONFIG_FILES" in *po-properties/Makefile.in*)
501 sed -e "/POTFILES =/r po-properties/POTFILES" po-properties/Makefile.in > po-properties/Makefile
504 AM_GLIB_DEFINE_LOCALEDIR(GTK_LOCALEDIR)
506 dnl The DU4 header files don't provide library prototypes unless
507 dnl -std1 is given to the native cc.
508 AC_MSG_CHECKING([for extra flags to get ANSI library prototypes])
512 AC_TRY_RUN([#include <math.h>
513 int main (void) { return (log(1) != log(1.)); }],
514 AC_MSG_RESULT(none needed),
515 gtk_save_CFLAGS="$CFLAGS"
516 CFLAGS="$CFLAGS -std1"
517 AC_TRY_RUN([#include <math.h>
518 int main (void) { return (log(1) != log(1.)); }],
519 AC_MSG_RESULT(-std1),
521 CFLAGS="$gtk_save_CFLAGS"
523 [No ANSI prototypes found in library. (-std1 didn't work.)]),
526 AC_MSG_RESULT(none needed)
530 AC_MSG_CHECKING(for the BeOS)
544 AC_MSG_CHECKING(for HP-UX)
546 hpux9* | hpux10* | hpux11*)
548 CFLAGS="$CFLAGS -DHPPEX -DSHMLINK"
555 dnl NeXTStep cc seems to need this
556 AC_MSG_CHECKING([for extra flags for POSIX compliance])
557 AC_TRY_COMPILE([#include <dirent.h>], [DIR *dir;],
558 AC_MSG_RESULT(none needed),
559 gtk_save_CFLAGS="$CFLAGS"
560 CFLAGS="$CFLAGS -posix"
561 AC_TRY_COMPILE([#include <dirent.h>], [DIR *dir;],
562 AC_MSG_RESULT(-posix),
564 CFLAGS="$gtk_save_CFLAGS"
565 AC_MSG_WARN([Could not determine POSIX flag. (-posix didn't work.)])))
568 # Run AM_PATH_GLIB_2_0 to make sure that GLib is installed and working
571 GLIB_PACKAGES="gobject-2.0 gmodule-no-export-2.0"
573 AM_PATH_GLIB_2_0(glib_required_version, :,
575 *** GLIB glib_required_version or better is required. The latest version of
576 *** GLIB is always available from ftp://ftp.gtk.org/pub/gtk/.]),
577 gobject gmodule-no-export gthread)
579 # See if it's safe to turn G_DISABLE_DEPRECATED on.
580 GLIB_VERSION_MAJOR_MINOR=`$PKG_CONFIG --modversion glib-2.0 | sed "s/\.@<:@^.@:>@*\$//"`
581 GLIB_REQUIRED_VERSION_MAJOR_MINOR=`echo glib_required_version | sed "s/\.@<:@^.@:>@*\$//"`
582 if test "x$GLIB_VERSION_MAJOR_MINOR" = "x$GLIB_REQUIRED_VERSION_MAJOR_MINOR"; then
583 CFLAGS="-DG_DISABLE_DEPRECATED $CFLAGS"
588 dnl Check for bind_textdomain_codeset, including -lintl if GLib brings it in.
591 LIBS="$LIBS $GLIB_LIBS"
592 AC_CHECK_FUNCS(bind_textdomain_codeset)
595 AC_CHECK_HEADERS(pwd.h,
596 AC_DEFINE(HAVE_PWD_H, 1,
597 [Define to 1 if pwd.h is available]))
598 AC_CHECK_HEADERS(sys/time.h,
599 AC_DEFINE(HAVE_SYS_TIME_H, 1,
600 [Define to 1 if time.h is available]))
601 AC_CHECK_HEADERS(unistd.h,
602 AC_DEFINE(HAVE_UNISTD_H, 1,
603 [Define to 1 if unistd.h is available]))
604 AC_CHECK_HEADERS(ftw.h,
605 AC_DEFINE(HAVE_FTW_H, 1,
606 [Define to 1 if ftw.h is available]))
608 AC_MSG_CHECKING([for GNU ftw extensions])
609 AC_TRY_COMPILE([#define _XOPEN_SOURCE 500
611 #include <ftw.h>], [int flags = FTW_ACTIONRETVAL;], gtk_ok=yes, gtk_ok=no)
612 if test $gtk_ok = yes; then
614 AC_DEFINE(HAVE_GNU_FTW, 1, [Have GNU ftw])
619 saved_cflags="$CFLAGS"
620 saved_ldflags="$LDFLAGS"
623 # Checks for header files.
626 # Checks for typedefs, structures, and compiler characteristics.
629 # Checks for library functions.
633 AC_CHECK_FUNCS(mallinfo)
634 AC_CHECK_FUNCS(getresuid)
637 # Check if <sys/select.h> needs to be included for fd_set
638 AC_MSG_CHECKING([for fd_set])
639 AC_TRY_COMPILE([#include <sys/types.h>],
640 [fd_set readMask, writeMask;], gtk_ok=yes, gtk_ok=no)
641 if test $gtk_ok = yes; then
642 AC_MSG_RESULT([yes, found in sys/types.h])
644 AC_HEADER_EGREP(fd_mask, sys/select.h, gtk_ok=yes)
645 if test $gtk_ok = yes; then
646 AC_DEFINE(HAVE_SYS_SELECT_H, 1,
647 [Define to 1 if sys/select.h is available])
648 AC_MSG_RESULT([yes, found in sys/select.h])
650 AC_DEFINE(NO_FD_SET, 1,
651 [Define to 1 if fd_set is not available])
656 # `widechar' tests for gdki18n.h
657 AC_MSG_CHECKING(for wchar.h)
658 AC_TRY_CPP([#include <wchar.h>], gdk_wchar_h=yes, gdk_wchar_h=no)
659 if test $gdk_wchar_h = yes; then
660 AC_DEFINE(HAVE_WCHAR_H, 1, [Have wchar.h include file])
662 AC_MSG_RESULT($gdk_wchar_h)
664 # Check for wctype.h (for iswalnum)
665 AC_MSG_CHECKING(for wctype.h)
666 AC_TRY_CPP([#include <wctype.h>], gdk_wctype_h=yes, gdk_wctype_h=no)
667 if test $gdk_wctype_h = yes; then
668 AC_DEFINE(HAVE_WCTYPE_H, 1, [Have wctype.h include file])
670 AC_MSG_RESULT($gdk_wctype_h)
672 # in Solaris 2.5, `iswalnum' is in -lw
674 AC_CHECK_FUNC(iswalnum,,[AC_CHECK_LIB(w,iswalnum,GDK_WLIBS=-lw)])
677 LIBS="$LIBS $GDK_WLIBS"
678 # The following is necessary for Linux libc-5.4.38
679 AC_MSG_CHECKING(if iswalnum() and friends are properly defined)
680 AC_TRY_LINK([#include <stdlib.h>],[
681 #if (defined(HAVE_WCTYPE_H) || defined(HAVE_WCHAR_H))
682 # ifdef HAVE_WCTYPE_H
690 # define iswalnum(c) ((wchar_t)(c) <= 0xFF && isalnum(c))
692 iswalnum((wchar_t) 0);
693 ], gdk_working_wctype=yes, gdk_working_wctype=no)
696 if test $gdk_working_wctype = no; then
697 AC_DEFINE(HAVE_BROKEN_WCTYPE, 1, [Is the wctype implementation broken])
700 AC_MSG_RESULT($gdk_working_wctype)
703 # Check for uxtheme.h (for MS-Windows Engine)
704 AC_MSG_CHECKING(for uxtheme.h)
705 AC_TRY_CPP([#include <uxtheme.h>], gtk_uxtheme_h=yes, gtk_uxtheme_h=no)
706 if test $gtk_uxtheme_h = yes; then
707 AC_DEFINE(HAVE_UXTHEME_H, 1, [Have uxtheme.h include file])
709 AC_MSG_RESULT($gtk_uxtheme_h)
711 # Checks for gdkspawn
712 AC_CHECK_HEADERS(crt_externs.h)
713 AC_CHECK_FUNCS(_NSGetEnviron)
716 ##################################################
717 # Checks for gdk-pixbuf
718 ##################################################
720 dnl ********************************************************
721 dnl * See whether we need to load our modules as .la files *
722 dnl ********************************************************
726 *-aix*) use_la_modules=true
729 if $use_la_modules ; then
730 AC_DEFINE(USE_LA_MODULES, 1,
731 [Whether to load modules via .la files rather than directly])
735 AC_MSG_CHECKING(whether to build gmodulized gdk-pixbuf)
737 AC_ARG_ENABLE(modules,
738 [AC_HELP_STRING([--disable-modules],
739 [disable dynamic module loading])])
743 if test x$enable_modules = xno; then
747 AC_MSG_CHECKING(whether dynamic modules work)
748 ## for loop is to strip newline
749 tmp=`$PKG_CONFIG --variable=gmodule_supported gmodule-no-export-2.0`
754 dnl Now we check to see if our libtool supports shared lib deps
755 dnl (in a rather ugly way even)
757 pixbuf_libtool_config="${CONFIG_SHELL-/bin/sh} ./libtool --config"
758 pixbuf_deplibs_check=`$pixbuf_libtool_config | \
759 grep '^[[a-z_]]*check[[a-z_]]*_method=[['\''"]]' | \
760 sed 's/.*[['\''"]]\(.*\)[['\''"]]$/\1/'`
761 if test "x$pixbuf_deplibs_check" = "xnone" || \
762 test "x$pixbuf_deplibs_check" = "xunknown" || \
763 test "x$pixbuf_deplibs_check" = "x"; then
769 AC_DEFINE(USE_GMODULE, 1,
770 [Define to 1 if gmodule works and should be used])
777 dnl We allow people to disable image loaders explicitely, but if they don't we error
778 dnl out so that people don't accidentally build without them.
781 [AC_HELP_STRING([--without-libpng],
782 [disable PNG loader for gdk-pixbuf])])
784 [AC_HELP_STRING([--without-libjpeg],
785 [disable JPEG loader for gdk-pixbuf])])
787 [AC_HELP_STRING([--without-libtiff],
788 [disable TIFF loader for gdk-pixbuf])])
789 AC_ARG_WITH(libjasper,
790 [AC_HELP_STRING([--without-libjasper],
791 [disable JPEG2000 loader for gdk-pixbuf])])
793 AC_ARG_ENABLE(gdiplus,
794 [AC_HELP_STRING([--disable-gdiplus-loaders],
795 [disable GDI+ loaders for gdk-pixbuf])])
797 AM_CONDITIONAL(BUILD_GDIPLUS_LOADERS, [ test x$os_win32 = xyes && test x$enable_gdiplus != xno ])
800 if test x$os_win32 = xno || test x$enable_gdiplus = xno; then
801 if test x$with_libtiff != xno && test -z "$LIBTIFF"; then
802 AC_CHECK_LIB(tiff, TIFFReadRGBAImageOriented,
803 [AC_CHECK_HEADER(tiffio.h,
804 TIFF='tiff'; LIBTIFF='-ltiff',
805 AC_MSG_WARN(*** TIFF loader will not be built (TIFF header files not found) ***))],
806 [AC_CHECK_LIB(tiff, TIFFWriteScanline,
807 [AC_CHECK_HEADER(tiffio.h,
808 TIFF='tiff'; LIBTIFF='-ltiff -ljpeg -lz',
809 AC_MSG_WARN(*** TIFF loader will not be built (TIFF header files not found) ***))],
810 [AC_CHECK_LIB(tiff34, TIFFFlushData,
811 [AC_CHECK_HEADER(tiffio.h,
812 TIFF='tiff'; LIBTIFF='-ltiff34 -ljpeg -lz',
813 AC_MSG_WARN(*** TIFF loader will not be built (TIFF header files not found) ***))],
814 AC_MSG_WARN(*** TIFF loader will not be built (TIFF library not found) ***), -ljpeg -lz -lm)], -ljpeg -lz -lm)], -lm)
817 if test x$with_libtiff != xno && test -z "$LIBTIFF"; then
819 *** Checks for TIFF loader failed. You can build without it by passing
820 *** --without-libtiff to configure but some programs using GTK+ may
821 *** not work properly])
826 if test x$os_win32 = xno || test x$enable_gdiplus = xno; then
827 if test x$with_libjpeg != xno && test -z "$LIBJPEG"; then
828 AC_CHECK_LIB(jpeg, jpeg_destroy_decompress,
831 AC_MSG_WARN(*** JPEG loader will not be built (JPEG library not found) ***))
832 if test "$jpeg_ok" = yes; then
833 AC_MSG_CHECKING([for jpeglib.h])
839 #include <jpeglib.h>],
842 AC_MSG_RESULT($jpeg_ok)
843 if test "$jpeg_ok" = yes; then
845 AC_CHECK_LIB(jpeg, jpeg_simple_progression,
846 AC_DEFINE(HAVE_PROGRESSIVE_JPEG, 1,
847 [Define to 1 is libjpeg supports progressive JPEG]),
848 AC_MSG_WARN(JPEG library does not support progressive saving.))
850 AC_MSG_WARN(*** JPEG loader will not be built (JPEG header file not found) ***)
855 if test x$with_libjpeg != xno && test -z "$LIBJPEG"; then
857 *** Checks for JPEG loader failed. You can build without it by passing
858 *** --without-libjpeg to configure but some programs using GTK+ may
859 *** not work properly])
864 if test x$with_libpng != xno && test -z "$LIBPNG"; then
865 AC_MSG_CHECKING(for libpng12)
866 if $PKG_CONFIG --exists libpng12 ; then
869 PNG_DEP_CFLAGS_PACKAGES=libpng12
870 LIBPNG=`$PKG_CONFIG --libs libpng12`
873 AC_CHECK_LIB(png, png_read_info,
874 [AC_CHECK_HEADER(png.h,
877 AC_MSG_WARN(*** PNG loader will not be built (PNG library not found) ***), -lz -lm)
878 if test "$png_ok" = yes; then
879 AC_MSG_CHECKING([for png_structp in png.h])
880 AC_TRY_COMPILE([#include <png.h>],
881 [png_structp pp; png_infop info; png_colorp cmap; png_create_read_struct;],
884 AC_MSG_RESULT($png_ok)
885 if test "$png_ok" = yes; then
886 PNG='png'; LIBPNG='-lpng -lz'
888 AC_MSG_WARN(*** PNG loader will not be built (PNG library is too old) ***)
891 AC_MSG_WARN(*** PNG loader will not be built (PNG header file not found) ***)
896 if test x$with_libpng != xno && test -z "$LIBPNG"; then
898 *** Checks for PNG loader failed. You can build without it by passing
899 *** --without-libpng to configure but many programs using GTK+ will
900 *** not work properly. The PNG loader is also needed if you are compiling
904 dnl Test for libjasper
905 if test x$with_libjasper != xno && test -z "$LIBJASPER"; then
906 AC_CHECK_LIB(jasper, jas_init, LIBJASPER=-ljasper, [], -ljpeg)
909 if test x$with_libjasper != xno && test -z "$LIBJASPER"; then
911 *** Checks for JPEG2000 loader failed. You can build without it by passing
912 *** --without-libjasper to configure])
920 AM_CONDITIONAL(BUILD_DYNAMIC_MODULES, $dynworks)
923 # Allow building some or all gdk-pixbuf loaders included
925 AC_MSG_CHECKING(pixbuf loaders to build)
927 dnl due to an autoconf bug, commas in the first arg to
928 dnl AC_HELP_STRING cause problems.
929 dnl AC_HELP_STRING([--with-included-loaders=LOADER1 LOADER2 ...],
930 dnl [build the specified loaders into gdk-pixbuf])
931 AC_ARG_WITH(included_loaders,
932 [ --with-included-loaders=LOADER1,LOADER2,...
933 build the specified loaders into gdk-pixbuf])
938 ## if the option was specified, leave it; otherwise disable included loaders
939 if test x$with_included_loaders = xno; then
940 with_included_loaders=yes
944 # Use the traditional png loader instead of the GDI+ one on Windows,
945 # because some important apps like GIMP need to read and write
946 # arbitrary tEXt chunks which doesn't seem to be possible through GDI+
948 all_loaders="ani,icns,pcx,ras,tga,png,pnm,wbmp,xbm,xpm"
949 if test x$with_libjasper != xno; then
950 all_loaders="$all_loaders,jasper"
952 if test x$os_win32 = xyes && test x$enable_gdiplus != xno; then
953 # Skip PNG, see comment above
954 gdip_formats="bmp emf gif ico jpeg tiff wmf"
955 for f in $gdip_formats; do
956 all_loaders="$all_loaders,gdip-$f"
959 all_loaders="$all_loaders,bmp,gif,ico,jpeg,tiff"
962 # If no loaders specified, include all
963 if test "x$with_included_loaders" = xyes ; then
964 included_loaders="$all_loaders"
966 included_loaders="$with_included_loaders"
969 AC_MSG_RESULT($included_loaders)
972 INCLUDED_LOADER_DEFINE=
974 IFS="${IFS= }"; gtk_save_ifs="$IFS"; IFS=","
975 for loader in $included_loaders; do
976 if echo "$all_loaders" | egrep "(^|,)$loader(\$|,)" > /dev/null; then
979 AC_MSG_ERROR([the specified loader $loader does not exist])
982 loader_underscores=`echo $loader | sed -e 's/-/_/g'`
983 INCLUDED_LOADER_OBJ="$INCLUDED_LOADER_OBJ libstatic-pixbufloader-$loader.la"
985 # Don't bother defining separate -DINCLUDE_gdip_foo for each gdip-foo loader
988 *) INCLUDED_LOADER_DEFINE="$INCLUDED_LOADER_DEFINE -DINCLUDE_$loader_underscores";;
990 eval INCLUDE_$loader_underscores=yes
993 # Just define one -DINCLUDE_gdiplus for all the gdip-foo loaders
994 # (except gdip-png, which isn't built at all)
995 if test x"$INCLUDE_gdip_ico" = xyes; then
996 INCLUDED_LOADER_DEFINE="$INCLUDED_LOADER_DEFINE -DINCLUDE_gdiplus"
1000 AC_SUBST(INCLUDED_LOADER_OBJ)
1001 AC_SUBST(INCLUDED_LOADER_DEFINE)
1003 AM_CONDITIONAL(INCLUDE_PNG, [test x"$INCLUDE_png" = xyes])
1004 AM_CONDITIONAL(INCLUDE_BMP, [test x"$INCLUDE_bmp" = xyes])
1005 AM_CONDITIONAL(INCLUDE_WBMP, [test x"$INCLUDE_wbmp" = xyes])
1006 AM_CONDITIONAL(INCLUDE_GIF, [test x"$INCLUDE_gif" = xyes])
1007 AM_CONDITIONAL(INCLUDE_ICO, [test x"$INCLUDE_ico" = xyes])
1008 AM_CONDITIONAL(INCLUDE_ANI, [test x"$INCLUDE_ani" = xyes])
1009 AM_CONDITIONAL(INCLUDE_JPEG, [test x"$INCLUDE_jpeg" = xyes])
1010 AM_CONDITIONAL(INCLUDE_PNM, [test x"$INCLUDE_pnm" = xyes])
1011 AM_CONDITIONAL(INCLUDE_RAS, [test x"$INCLUDE_ras" = xyes])
1012 AM_CONDITIONAL(INCLUDE_TIFF, [test x"$INCLUDE_tiff" = xyes])
1013 AM_CONDITIONAL(INCLUDE_XPM, [test x"$INCLUDE_xpm" = xyes])
1014 AM_CONDITIONAL(INCLUDE_XBM, [test x"$INCLUDE_xbm" = xyes])
1015 AM_CONDITIONAL(INCLUDE_TGA, [test x"$INCLUDE_tga" = xyes])
1016 AM_CONDITIONAL(INCLUDE_PCX, [test x"$INCLUDE_pcx" = xyes])
1017 AM_CONDITIONAL(INCLUDE_ICNS, [test x"$INCLUDE_icns" = xyes])
1018 AM_CONDITIONAL(INCLUDE_JASPER, [test x"$INCLUDE_jasper" = xyes])
1019 # As all GDI+ loaders are either built-in or not, arbitrarily just
1020 # check one of the variables here
1021 AM_CONDITIONAL(INCLUDE_GDIPLUS, [test x"$INCLUDE_gdip_ico" = xyes])
1023 if test x$gio_can_sniff = x; then
1024 AC_MSG_CHECKING([if gio can sniff png])
1025 gtk_save_LIBS="$LIBS"
1026 gtk_save_CFLAGS="$CFLAGS"
1027 LIBS="`$PKG_CONFIG --libs gio-2.0`"
1028 CFLAGS="`$PKG_CONFIG --cflags gio-2.0`"
1029 AC_RUN_IFELSE([AC_LANG_SOURCE([[
1030 #include <gio/gio.h>
1031 static const gsize data_size = 159;
1032 static const guint8 data[] =
1034 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d,
1035 0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01,
1036 0x08, 0x02, 0x00, 0x00, 0x00, 0x90, 0x77, 0x53, 0xde, 0x00, 0x00, 0x00,
1037 0x01, 0x73, 0x52, 0x47, 0x42, 0x00, 0xae, 0xce, 0x1c, 0xe9, 0x00, 0x00,
1038 0x00, 0x09, 0x70, 0x48, 0x59, 0x73, 0x00, 0x00, 0x0b, 0x13, 0x00, 0x00,
1039 0x0b, 0x13, 0x01, 0x00, 0x9a, 0x9c, 0x18, 0x00, 0x00, 0x00, 0x07, 0x74,
1040 0x49, 0x4d, 0x45, 0x07, 0xd8, 0x07, 0x0f, 0x10, 0x08, 0x15, 0x61, 0xd8,
1041 0x35, 0x37, 0x00, 0x00, 0x00, 0x19, 0x74, 0x45, 0x58, 0x74, 0x43, 0x6f,
1042 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x00, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65,
1043 0x64, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x47, 0x49, 0x4d, 0x50, 0x57,
1044 0x81, 0x0e, 0x17, 0x00, 0x00, 0x00, 0x0c, 0x49, 0x44, 0x41, 0x54, 0x08,
1045 0xd7, 0x63, 0xf8, 0xff, 0xff, 0x3f, 0x00, 0x05, 0xfe, 0x02, 0xfe, 0xdc,
1046 0xcc, 0x59, 0xe7, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae,
1050 main (int argc, char **argv)
1054 content_type = g_content_type_guess (NULL, data, data_size, NULL);
1055 image_png = g_content_type_for_mime_type ("image/png");
1056 return !!strcmp (content_type, image_png);
1059 AC_DEFINE(GDK_PIXBUF_USE_GIO_MIME, 1, [Define if gio can sniff image data])],
1061 AC_MSG_RESULT($gio_can_sniff)
1062 LIBS="$gtk_save_LIBS"
1063 CFLAGS="$gtk_save_CFLAGS"
1067 # Allow building some or all immodules included
1069 AC_MSG_CHECKING(immodules to build)
1071 dnl due to an autoconf bug, commas in the first arg to
1072 dnl AC_HELP_STRING cause problems.
1073 dnl AC_HELP_STRING([--with-included-immodules=MODULE1 MODULE2 ...],
1074 dnl [build the specified input method modules into gtk])
1075 AC_ARG_WITH(included_immodules,
1076 [ --with-included-immodules=MODULE1,MODULE2,...
1077 build the specified input methods into gtk])
1082 ## if the option was specified, leave it; otherwise disable included immodules
1083 if test x$with_included_immodules = xno; then
1084 with_included_immodules=yes
1088 all_immodules="am-et,cedilla,cyrillic-translit"
1089 if test "$gdktarget" = "win32"; then
1090 all_immodules="${all_immodules},ime"
1092 all_immodules="${all_immodules},inuktitut,ipa,multipress,thai,ti-er,ti-et,viqr"
1093 if test "$gdktarget" = "x11"; then
1094 all_immodules="${all_immodules},xim"
1097 included_immodules=""
1098 # If the switch specified without listing any specific ones, include all
1099 if test "x$with_included_immodules" = xyes ; then
1100 included_immodules="$all_immodules"
1102 included_immodules="$with_included_immodules"
1105 AC_MSG_RESULT($included_immodules)
1106 AM_CONDITIONAL(HAVE_INCLUDED_IMMMODULES, test "x$included_immodules" != x)
1108 INCLUDED_IMMODULE_OBJ=
1109 INCLUDED_IMMODULE_DEFINE=
1111 IFS="${IFS= }"; gtk_save_ifs="$IFS"; IFS=","
1112 for immodule in $included_immodules; do
1113 immodule_underscores=`echo $immodule | sed -e 's/-/_/g'`
1114 if echo "$all_immodules" | egrep "(^|,)$immodule(\$|,)" > /dev/null; then
1117 AC_MSG_ERROR([the specified input method $immodule does not exist])
1120 INCLUDED_IMMODULE_OBJ="$INCLUDED_IMMODULE_OBJ ../modules/input/libstatic-im-$immodule.la"
1121 INCLUDED_IMMODULE_DEFINE="$INCLUDED_IMMODULE_DEFINE -DINCLUDE_IM_$immodule_underscores"
1122 eval INCLUDE_$immodule_underscores=yes
1125 AC_SUBST(INCLUDED_IMMODULE_OBJ)
1126 AC_SUBST(INCLUDED_IMMODULE_DEFINE)
1128 AM_CONDITIONAL(INCLUDE_IM_AM_ET, [test x"$INCLUDE_am_et" = xyes])
1129 AM_CONDITIONAL(INCLUDE_IM_CEDILLA, [test x"$INCLUDE_cedilla" = xyes])
1130 AM_CONDITIONAL(INCLUDE_IM_CYRILLIC_TRANSLIT, [test x"$INCLUDE_cyrillic_translit" = xyes])
1131 AM_CONDITIONAL(INCLUDE_IM_IME, [test x"$INCLUDE_ime" = xyes])
1132 AM_CONDITIONAL(INCLUDE_IM_INUKTITUT, [test x"$INCLUDE_inuktitut" = xyes])
1133 AM_CONDITIONAL(INCLUDE_IM_IPA, [test x"$INCLUDE_ipa" = xyes])
1134 AM_CONDITIONAL(INCLUDE_IM_MULTIPRESS, [test x"$INCLUDE_multipress" = xyes])
1135 AM_CONDITIONAL(INCLUDE_IM_THAI, [test x"$INCLUDE_thai" = xyes])
1136 AM_CONDITIONAL(INCLUDE_IM_TI_ER, [test x"$INCLUDE_ti_er" = xyes])
1137 AM_CONDITIONAL(INCLUDE_IM_TI_ET, [test x"$INCLUDE_ti_et" = xyes])
1138 AM_CONDITIONAL(INCLUDE_IM_VIQR, [test x"$INCLUDE_viqr" = xyes])
1139 AM_CONDITIONAL(INCLUDE_IM_XIM, [test x"$INCLUDE_xim" = xyes])
1145 AM_CONDITIONAL(HAVE_TIFF, test "x$LIBTIFF" != x)
1146 AM_CONDITIONAL(HAVE_PNG, test "x$LIBPNG" != x)
1147 AM_CONDITIONAL(HAVE_JPEG, test "x$LIBJPEG" != x)
1148 AM_CONDITIONAL(HAVE_JASPER, test "x$LIBJASPER" != x)
1152 if echo "$included_loaders" | egrep '(^|,)tiff($|,)' > /dev/null; then
1153 STATIC_LIB_DEPS="$STATIC_LIB_DEPS $LIBTIFF"
1155 if echo "$included_loaders" | egrep '(^|,)jpeg($|,)' > /dev/null; then
1156 STATIC_LIB_DEPS="$STATIC_LIB_DEPS $LIBJPEG"
1158 if echo "$included_loaders" | egrep '(^|,)png($|,)' > /dev/null; then
1159 STATIC_LIB_DEPS="$STATIC_LIB_DEPS $LIBPNG"
1162 STATIC_LIB_DEPS="$LIBTIFF $LIBJPEG $LIBPNG"
1165 # Checks to see whether we should include mediaLib
1168 AC_CHECK_HEADER(sys/systeminfo.h,
1169 AC_DEFINE(HAVE_SYS_SYSTEMINFO_H, 1,
1170 [Define to 1 if sys/systeminfo.h is available]))
1171 AC_CHECK_HEADER(sys/sysinfo.h,
1172 AC_DEFINE(HAVE_SYS_SYSINFO_H, 1,
1173 [Define to 1 if sys/sysinfo.h is available]))
1175 AC_MSG_CHECKING(for mediaLib 2.3)
1177 # Check for a mediaLib 2.3 function since that is what the GTK+ mediaLib
1179 AC_CHECK_LIB(mlib, mlib_ImageSetStruct, use_mlib=yes, use_mlib=no)
1180 if test $use_mlib = yes; then
1181 AC_DEFINE(USE_MEDIALIB, 1,
1182 [Define to 1 if medialib is available and should be used])
1185 AC_MSG_CHECKING(for mediaLib 2.5)
1186 # Check for a mediaLib 2.5 function since that is what is needed for
1187 # gdk_rgb_convert integration.
1188 AC_CHECK_LIB(mlib, mlib_VideoColorRGBint_to_BGRAint, use_mlib25=yes, use_mlib25=no)
1189 if test $use_mlib25 = yes; then
1190 AC_DEFINE(USE_MEDIALIB25, 1,
1191 [Define to 1 if medialib 2.5 is available])
1194 AM_CONDITIONAL(USE_MEDIALIB, test $use_mlib = yes)
1195 AM_CONDITIONAL(USE_MEDIALIB25, test $use_mlib25 = yes)
1197 # Checks to see if we should compile in MMX support (there will be
1198 # a runtime test when the code is actually run to see if it should
1199 # be used - this just checks if we can compile it.)
1201 # This code is partially taken from Mesa
1203 AC_MSG_CHECKING(for x86 platform)
1205 i386|i486|i586|i686|i786|k6|k7)
1211 AC_MSG_RESULT($use_x86_asm)
1214 if test $use_x86_asm = yes; then
1218 AC_MSG_CHECKING(compiler support for MMX)
1219 cp $srcdir/gdk-pixbuf/pixops/scale_line_22_33_mmx.S conftest.S
1220 if AC_TRY_EVAL(ac_compile); then
1227 if test $use_mmx_asm = yes; then
1228 AC_DEFINE(USE_MMX, 1,
1229 [Define to 1 if XXM is available and should be used])
1236 AM_CONDITIONAL(USE_MMX, test x$use_mmx_asm = xyes)
1239 if test -z "$LIBPNG" && test x"$os_win32" = xno -o x$enable_gdiplus = xno; then
1243 dnl Look for a host system's gdk-pixbuf-csource if we are cross-compiling
1245 AM_CONDITIONAL(CROSS_COMPILING, test $cross_compiling = yes)
1247 if test $cross_compiling = yes; then
1248 AC_PATH_PROG(GDK_PIXBUF_CSOURCE, gdk-pixbuf-csource, no)
1249 AC_PATH_PROG(GTK_UPDATE_ICON_CACHE, gtk-update-icon-cache, no)
1250 if test x$GTK_UPDATE_ICON_CACHE = xno; then
1255 if test ! -f $srcdir/gtk/gtkbuiltincache.h &&
1256 test "x$REBUILD_PNGS" = "x#" ; then
1258 *** gtkbuiltincache.h is not in the tree, and cannot be built
1259 *** because you don't have libpng, or (when cross-compiling) you
1260 *** don't have a prebuilt gtk-update-icon-cache on the build system.])
1263 AC_SUBST(REBUILD_PNGS)
1265 GDK_PIXBUF_PACKAGES="gmodule-no-export-2.0 gobject-2.0 gio-2.0"
1266 GDK_PIXBUF_EXTRA_LIBS="$STATIC_LIB_DEPS $MATH_LIB $MEDIA_LIB"
1267 GDK_PIXBUF_EXTRA_CFLAGS=
1268 GDK_PIXBUF_DEP_LIBS="`$PKG_CONFIG --libs $GDK_PIXBUF_PACKAGES` $GDK_PIXBUF_EXTRA_LIBS"
1269 GDK_PIXBUF_DEP_CFLAGS="`$PKG_CONFIG --cflags gthread-2.0 $GDK_PIXBUF_PACKAGES $PNG_DEP_CFLAGS_PACKAGES` $GDK_PIXBUF_EXTRA_CFLAGS"
1271 ########################################
1272 # Windowing system checks
1273 ########################################
1275 GDK_PIXBUF_XLIB_PACKAGES=
1276 GDK_PIXBUF_XLIB_EXTRA_CFLAGS=
1277 GDK_PIXBUF_XLIB_EXTRA_LIBS=
1279 X_PACKAGES=fontconfig
1280 GDK_EXTRA_LIBS="$GDK_WLIBS"
1283 # GTK+ uses some X calls, so needs to link against X directly
1284 GTK_DEP_PACKAGES_FOR_X=
1287 if test "x$gdktarget" = "xx11"; then
1289 # We use fontconfig very peripherally when decoding the default
1292 if $PKG_CONFIG --exists fontconfig; then : ; else
1294 *** fontconfig (http://www.fontconfig.org) is required by the X11 backend.])
1298 # Check for basic X packages; we use pkg-config if available
1300 if $PKG_CONFIG --exists x11 xext xrender; then
1302 X_PACKAGES="$X_PACKAGES x11 xext xrender"
1303 x_libs="`$PKG_CONFIG --libs x11 xext xrender`"
1304 X_CFLAGS="`$PKG_CONFIG --cflags x11 xext xrender`"
1306 # Strip out any .la files that pkg-config might give us (this happens
1307 # with -uninstalled.pc files)
1309 for I in $x_libs ; do
1312 *) x_libs_for_checks="$x_libs_for_checks $I" ;;
1316 GDK_PIXBUF_XLIB_PACKAGES="x11"
1317 GTK_PACKAGES_FOR_X="x11"
1319 have_base_x_pc=false
1321 if test x$no_x = xyes ; then
1322 AC_MSG_ERROR([X development libraries not found])
1325 x_cflags="$X_CFLAGS"
1326 x_libs_for_checks="$X_LIBS -lXext -lXrender -lX11 $X_EXTRA_LIBS"
1328 GDK_PIXBUF_XLIB_EXTRA_CFLAGS="$x_cflags"
1329 GDK_PIXBUF_XLIB_EXTRA_LIBS="$X_LIBS -lX11 $X_EXTRA_LIBS"
1330 GTK_DEP_LIBS_FOR_X="$X_LIBS -lXrender -lX11 $X_EXTRA_LIBS"
1333 # Extra libraries found during checks (-lXinerama, etc), not from pkg-config.
1336 gtk_save_cppflags="$CPPFLAGS"
1337 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
1340 LIBS="$x_libs_for_checks $LIBS"
1342 # Sanity check for the X11 and Xext libraries. While everything we need from
1343 # Xext is optional, the chances a system has *none* of these things is so
1344 # small that we just unconditionally require it.
1345 AC_CHECK_FUNC(XOpenDisplay, :,
1346 AC_MSG_ERROR([*** libX11 not found. Check 'config.log' for more details.]))
1347 AC_CHECK_FUNC(XextFindDisplay, :,
1348 AC_MSG_ERROR([*** libXext not found. Check 'config.log' for more details.]))
1349 AC_CHECK_FUNC(XRenderQueryExtension, :,
1350 AC_MSG_ERROR([*** libXrender not found. Check 'config.log' for more details.]))
1354 AC_MSG_CHECKING([if <X11/extensions/XIproto.h> is needed for xReply])
1355 AC_TRY_COMPILE([#include <X11/Xlibint.h>],
1357 [AC_MSG_RESULT([no])],
1358 [AC_TRY_COMPILE([#include <X11/extensions/XIproto.h>
1359 #include <X11/Xlibint.h>],
1361 [AC_MSG_RESULT([yes])
1362 AC_DEFINE([NEED_XIPROTO_H_FOR_XREPLY], 1,
1363 [Define if <X11/extensions/XIproto.h> needed for xReply])],
1364 [AC_MSG_RESULT([unknown])
1365 AC_MSG_ERROR([xReply type unavailable. X11 is too old])])])
1367 # Check for XConvertCase, XInternAtoms (X11R6 specific)
1369 AC_CHECK_FUNCS(XConvertCase XInternAtoms)
1371 # Generic X11R6 check needed for XIM support; we could
1372 # probably use this to replace the above, but we'll
1373 # leave the separate checks for XConvertCase and XInternAtoms
1377 AC_CHECK_FUNC(XAddConnectionWatch,
1380 if $have_x11r6; then
1381 AC_DEFINE(HAVE_X11R6, 1, [Define if we have X11R6])
1383 AM_CONDITIONAL(HAVE_X11R6, $have_x11r6)
1385 # Check for XKB support.
1387 if test "x$enable_xkb" = "xyes"; then
1388 AC_MSG_WARN(XKB support explicitly enabled)
1389 AC_DEFINE(HAVE_XKB, 1, [Define to use XKB extension])
1390 elif test "x$enable_xkb" = "xmaybe"; then
1391 AC_CHECK_FUNC(XkbQueryExtension,
1392 AC_DEFINE(HAVE_XKB, 1, [Define to use XKB extension]))
1394 AC_MSG_WARN(XKB support explicitly disabled)
1397 # Check for shaped window extension
1399 AC_CHECK_FUNC(XShapeCombineMask,
1400 AC_DEFINE(HAVE_SHAPE_EXT, 1,
1401 [Define to 1 if the XShape extension is available]))
1404 gtk_save_CFLAGS="$CFLAGS"
1405 CFLAGS="$CFLAGS $x_cflags"
1407 AC_CHECK_FUNC(XSyncQueryExtension,
1408 [AC_CHECK_HEADER(X11/extensions/sync.h,
1409 AC_DEFINE(HAVE_XSYNC, 1, [Have the SYNC extension library]),
1410 :, [#include <X11/Xlib.h>])])
1412 CFLAGS="$gtk_save_CFLAGS"
1416 if test "x$enable_shm" = "xyes"; then
1417 # Check for the XShm extension, normally in Xext
1418 AC_CHECK_FUNC(XShmAttach,
1420 # On AIX, it is in XextSam instead
1421 [AC_CHECK_LIB(XextSam, XShmAttach,
1422 [GTK_ADD_LIB(x_extra_libs,XextSam)])])
1425 if test "x$enable_shm" = "xyes"; then
1426 # Check for shared memory
1427 AC_CHECK_HEADER(sys/ipc.h,
1428 AC_DEFINE(HAVE_IPC_H, 1,
1429 [Define to 1 if ipc.h is available]),
1431 AC_CHECK_HEADER(sys/shm.h,
1432 AC_DEFINE(HAVE_SHM_H, 1,
1433 [Define to 1 if shm.h is available]),
1436 # Check for the X shared memory extension header file
1438 AC_MSG_CHECKING(X11/extensions/XShm.h)
1439 if test "x$no_xext_lib" = "xyes"; then
1442 gtk_save_CFLAGS="$CFLAGS"
1443 CFLAGS="$CFLAGS $x_cflags"
1446 #include <sys/types.h>
1447 #include <sys/ipc.h>
1448 #include <sys/shm.h>
1449 #include <X11/Xlib.h>
1450 #include <X11/Xutil.h>
1451 #include <X11/extensions/XShm.h>
1452 ], [XShmSegmentInfo *x_shm_info;], have_xshm=yes)
1453 CFLAGS="$gtk_save_CFLAGS"
1455 AC_MSG_RESULT($have_xshm)
1456 if test $have_xshm = yes ; then
1457 AC_DEFINE(HAVE_XSHM_H, 1,
1458 [Define to 1 if xshm.h is available])
1462 if test "x$enable_xinerama" = "xyes"; then
1463 # Check for Xinerama extension (Solaris impl or Xfree impl)
1464 gtk_save_cppflags="$CPPFLAGS"
1465 CPPFLAGS="$CPPFLAGS $x_cflags"
1470 AC_MSG_CHECKING(for Xinerama support on Solaris)
1472 have_solaris_xinerama=false
1473 AC_CHECK_FUNC(XineramaGetInfo,
1474 [AC_CHECK_HEADER(X11/extensions/xinerama.h,
1475 [have_solaris_xinerama=true], :,
1476 [#include <X11/Xlib.h>])])
1478 if $have_solaris_xinerama ; then
1479 AC_DEFINE(HAVE_SOLARIS_XINERAMA, 1,
1480 [Define to 1 if solaris xinerama is available])
1481 AC_DEFINE(HAVE_XINERAMA, 1,
1482 [Define to 1 if xinerama is available])
1490 AC_MSG_CHECKING(for Xinerama support on XFree86)
1492 have_xfree_xinerama=false
1493 if $PKG_CONFIG --exists xinerama ; then
1494 have_xfree_xinerama=true
1495 X_PACKAGES="$X_PACKAGES xinerama"
1497 AC_CHECK_LIB(Xinerama, XineramaQueryExtension,
1498 [AC_CHECK_HEADER(X11/extensions/Xinerama.h,
1499 [GTK_ADD_LIB(x_extra_libs,Xinerama)
1500 have_xfree_xinerama=true], :,
1501 [#include <X11/Xlib.h>])])
1504 if $have_xfree_xinerama ; then
1505 AC_DEFINE(HAVE_XFREE_XINERAMA, 1,
1506 [Define to 1 if XFree Xinerama is available])
1507 AC_DEFINE(HAVE_XINERAMA, 1,
1508 [Define to 1 is Xinerama is available])
1517 # set up things for XInput
1519 if test "x$with_xinput" = "xxfree" || test "x$with_xinput" = "xyes"; then
1520 AC_DEFINE(XINPUT_XFREE, 1,
1521 [Define to 1 if XFree XInput should be used])
1523 if $PKG_CONFIG --exists xi ; then
1524 X_PACKAGES="$X_PACKAGES xi"
1526 GTK_ADD_LIB(x_extra_libs, Xi)
1529 AC_DEFINE(XINPUT_NONE, 1,
1530 [Define to 1 if no XInput should be used])
1533 AM_CONDITIONAL(XINPUT_XFREE, test x$with_xinput = xxfree || test x$with_xinput = xyes)
1535 # Check for the RANDR extension
1536 if $PKG_CONFIG --exists "xrandr >= 1.2" ; then
1537 AC_DEFINE(HAVE_RANDR, 1, [Have the Xrandr extension library])
1539 X_PACKAGES="$X_PACKAGES xrandr"
1542 # Checks for Xcursor library
1544 if $PKG_CONFIG --exists xcursor ; then
1545 AC_DEFINE(HAVE_XCURSOR, 1, [Have the Xcursor library])
1547 X_PACKAGES="$X_PACKAGES xcursor"
1550 # Checks for XFixes extension
1552 if $PKG_CONFIG --exists xfixes ; then
1553 AC_DEFINE(HAVE_XFIXES, 1, [Have the XFIXES X extension])
1555 X_PACKAGES="$X_PACKAGES xfixes"
1556 GTK_PACKAGES_FOR_X="$GTK_PACKAGES_FOR_X xfixes"
1559 # Checks for Xcomposite extension
1561 if $PKG_CONFIG --exists xcomposite ; then
1562 AC_DEFINE(HAVE_XCOMPOSITE, 1, [Have the XCOMPOSITE X extension])
1564 X_PACKAGES="$X_PACKAGES xcomposite"
1565 GTK_PACKAGES_FOR_X="$GTK_PACKAGES_FOR_X xcomposite"
1568 # Checks for Xdamage extension
1570 if $PKG_CONFIG --exists xdamage ; then
1571 AC_DEFINE(HAVE_XDAMAGE, 1, [Have the XDAMAGE X extension])
1573 X_PACKAGES="$X_PACKAGES xdamage"
1574 GTK_PACKAGES_FOR_X="$GTK_PACKAGES_FOR_X xdamage"
1577 if $have_base_x_pc ; then
1578 GDK_EXTRA_LIBS="$x_extra_libs"
1580 GDK_EXTRA_LIBS="$X_LIBS $x_extra_libs -lXext -lX11 $GDK_EXTRA_LIBS"
1583 CPPFLAGS="$gtk_save_cppflags"
1584 LIBS="$gtk_save_libs"
1586 AM_CONDITIONAL(USE_X11, true)
1588 AM_CONDITIONAL(XINPUT_XFREE, false)
1589 AM_CONDITIONAL(USE_X11, false)
1590 AM_CONDITIONAL(HAVE_X11R6, false)
1593 if test "x$gdktarget" = "xwin32"; then
1594 GDK_EXTRA_LIBS="$GDK_EXTRA_LIBS -lgdi32 -limm32 -lshell32 -lole32 -Wl,-luuid"
1595 AM_CONDITIONAL(USE_WIN32, true)
1597 AM_CONDITIONAL(USE_WIN32, false)
1600 if test "x$gdktarget" = "xquartz"; then
1601 GDK_EXTRA_LIBS="$GDK_EXTRA_LIBS -framework Cocoa"
1602 AM_CONDITIONAL(USE_QUARTZ, true)
1604 AM_CONDITIONAL(USE_QUARTZ, false)
1607 GDK_PIXBUF_XLIB_DEP_LIBS="`$PKG_CONFIG --libs $GDK_PIXBUF_PACKAGES $GDK_PIXBUF_XLIB_PACKAGES` $GDK_PIXBUF_XLIB_EXTRA_LIBS $GDK_PIXBUF_EXTRA_LIBS"
1608 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"
1610 AC_SUBST(GDK_PIXBUF_XLIB_PACKAGES)
1611 AC_SUBST(GDK_PIXBUF_XLIB_EXTRA_LIBS)
1612 AC_SUBST(GDK_PIXBUF_XLIB_EXTRA_CFLAGS)
1613 AC_SUBST(GDK_PIXBUF_XLIB_DEP_LIBS)
1614 AC_SUBST(GDK_PIXBUF_XLIB_DEP_CFLAGS)
1616 if test "x$gdktarget" = "xdirectfb"; then
1617 DIRECTFB_REQUIRED_VERSION=0.9.24
1618 AC_MSG_CHECKING(for DirectFB)
1620 if $PKG_CONFIG --atleast-version $DIRECTFB_REQUIRED_VERSION directfb && $PKG_CONFIG --exists cairo-directfb ; then
1621 AC_MSG_RESULT(found)
1622 GDK_EXTRA_CFLAGS="`$PKG_CONFIG --cflags cairo-directfb` $GDK_EXTRA_CFLAGS"
1623 GDK_EXTRA_LIBS="`$PKG_CONFIG --libs cairo-directfb` $GDK_EXTRA_LIBS"
1626 *** DirectFB $DIRECTFB_REQUIRED_VERSION or newer and the cairo backend
1627 *** are required. The latest version of DirectFB is always available
1628 *** from http://www.directfb.org/.
1632 AM_CONDITIONAL(USE_DIRECTFB, true)
1634 AM_CONDITIONAL(USE_DIRECTFB, false)
1638 # Check for Pango flags
1640 if test "x$gdktarget" = "xwin32"; then
1641 PANGO_PACKAGES="pangowin32 pangocairo"
1643 PANGO_PACKAGES="pango pangocairo"
1646 AC_MSG_CHECKING(Pango flags)
1647 if $PKG_CONFIG --exists $PANGO_PACKAGES ; then
1648 PANGO_CFLAGS=`$PKG_CONFIG --cflags $PANGO_PACKAGES`
1649 PANGO_LIBS=`$PKG_CONFIG --libs $PANGO_PACKAGES`
1651 AC_MSG_RESULT($PANGO_CFLAGS $PANGO_LIBS)
1654 *** Pango not found. Pango built with Cairo support is required
1655 *** to build GTK+. See http://www.pango.org for Pango information.
1659 CFLAGS="$CFLAGS $PANGO_CFLAGS"
1661 if $PKG_CONFIG --uninstalled $PANGO_PACKAGES; then
1664 gtk_save_LIBS="$LIBS"
1665 LIBS="$PANGO_LIBS $LIBS"
1666 AC_TRY_LINK_FUNC(pango_context_new, :, AC_MSG_ERROR([
1667 *** Can't link to Pango. Pango is required to build
1668 *** GTK+. For more information see http://www.pango.org]))
1669 LIBS="$gtk_save_LIBS"
1672 CFLAGS="$saved_cflags"
1673 LDFLAGS="$saved_ldflags"
1675 GDK_PACKAGES="$PANGO_PACKAGES gio-2.0"
1676 if test "x$gdktarget" = "xx11"; then
1677 GDK_PACKAGES="$GDK_PACKAGES $X_PACKAGES"
1679 GDK_DEP_LIBS="$GDK_EXTRA_LIBS `$PKG_CONFIG --libs $GDK_PIXBUF_PACKAGES $GDK_PACKAGES` $GDK_PIXBUF_EXTRA_LIBS"
1680 GDK_DEP_CFLAGS="`$PKG_CONFIG --cflags gthread-2.0 $GDK_PIXBUF_PACKAGES $GDK_PACKAGES` $GDK_PIXBUF_EXTRA_CFLAGS $GDK_EXTRA_CFLAGS"
1683 # If we aren't writing explicit dependencies, then don't put the extra libraries we need
1684 # into the pkg-config files
1686 if test $enable_explicit_deps != yes ; then
1687 GDK_PACKAGES="$PANGO_PACKAGES"
1691 AC_SUBST(GDK_PACKAGES)
1692 AC_SUBST(GDK_EXTRA_LIBS)
1693 AC_SUBST(GDK_EXTRA_CFLAGS)
1694 AC_SUBST(GDK_DEP_LIBS)
1695 AC_SUBST(GDK_DEP_CFLAGS)
1698 ########################################
1699 # Check for Accessibility Toolkit flags
1700 ########################################
1703 AC_MSG_CHECKING(ATK flags)
1704 if $PKG_CONFIG --exists $ATK_PACKAGES ; then
1705 ATK_CFLAGS=`$PKG_CONFIG --cflags $ATK_PACKAGES`
1706 ATK_LIBS=`$PKG_CONFIG --libs $ATK_PACKAGES`
1708 AC_MSG_RESULT($ATK_CFLAGS $ATK_LIBS)
1711 *** Accessibility Toolkit not found. Accessibility Toolkit is required
1716 if $PKG_CONFIG --uninstalled $ATK_PACKAGES; then
1719 gtk_save_LIBS="$LIBS"
1720 LIBS="$ATK_LIBS $LIBS"
1721 AC_TRY_LINK_FUNC(atk_object_get_type, : , AC_MSG_ERROR([
1722 *** Cannot link to Accessibility Toolkit. Accessibility Toolkit is required
1723 *** to build GTK+]))
1724 LIBS="$gtk_save_LIBS"
1727 GTK_PACKAGES="atk cairo gio-2.0"
1728 if test "x$gdktarget" = "xx11"; then
1729 GTK_PACKAGES="$GTK_PACKAGES pangoft2"
1733 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"
1734 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"
1736 if test x"$os_win32" = xyes; then
1737 GTK_EXTRA_CFLAGS="$msnative_struct"
1740 GLIB_PREFIX="`$PKG_CONFIG --variable=prefix glib-2.0`"
1741 ATK_PREFIX="`$PKG_CONFIG --variable=prefix atk`"
1742 PANGO_PREFIX="`$PKG_CONFIG --variable=prefix pango`"
1743 CAIRO_PREFIX="`pkg-config --variable=prefix cairo`"
1745 if test $enable_explicit_deps != yes ; then
1746 GDK_PIXBUF_EXTRA_LIBS=
1749 AC_SUBST(GDK_PIXBUF_PACKAGES)
1750 AC_SUBST(GDK_PIXBUF_EXTRA_LIBS)
1751 AC_SUBST(GDK_PIXBUF_EXTRA_CFLAGS)
1752 AC_SUBST(GDK_PIXBUF_DEP_LIBS)
1753 AC_SUBST(GDK_PIXBUF_DEP_CFLAGS)
1755 AC_SUBST(GTK_PACKAGES)
1756 AC_SUBST(GTK_EXTRA_LIBS)
1757 AC_SUBST(GTK_EXTRA_CFLAGS)
1758 AC_SUBST(GTK_DEP_LIBS)
1759 AC_SUBST(GTK_DEP_CFLAGS)
1761 AC_SUBST(GLIB_PREFIX)
1762 AC_SUBST(ATK_PREFIX)
1763 AC_SUBST(PANGO_PREFIX)
1764 AC_SUBST(CAIRO_PREFIX)
1766 AC_SUBST(GTK_DEBUG_FLAGS)
1767 AC_SUBST(GTK_XIM_FLAGS)
1769 ########################
1770 # Checks needed for gail
1771 ########################
1774 dnl Checks for inet libraries:
1775 AC_SEARCH_LIBS(gethostent, nsl)
1776 AC_SEARCH_LIBS(setsockopt, socket)
1777 AC_SEARCH_LIBS(connect, inet)
1779 dnl check for the sockaddr_un.sun_len member
1780 AC_CHECK_MEMBER([struct sockaddr_un.sun_len],
1781 [struct_sockaddr_un_sun_len=true],
1782 [struct_sockaddr_un_suin_len=false],
1783 [#include <sys/types.h>
1784 #include <sys/un.h>]
1786 case $struct_sockaddr_un_sun_len in
1788 AC_DEFINE_UNQUOTED(HAVE_SOCKADDR_UN_SUN_LEN, 1,
1789 [Have the sockaddr_un.sun_len member])
1795 GAIL_INET_LIBS="$LIBS"
1796 AC_SUBST([GAIL_INET_LIBS])
1800 ################################################################
1801 # Printing system checks
1802 ################################################################
1805 [AC_HELP_STRING([--disable-cups]
1806 [disable cups print backend])],,
1809 if test "x$enable_cups" = "xauto"
1811 AC_PATH_PROG(CUPS_CONFIG, cups-config, no)
1812 if test "x$CUPS_CONFIG" != "xno"; then
1813 CUPS_CFLAGS=`$CUPS_CONFIG --cflags | sed 's/-O[0-9]*//' | sed 's/-m[^\t]*//g'`
1814 CUPS_LIBS=`$CUPS_CONFIG --libs`
1816 CUPS_API_VERSION=`$CUPS_CONFIG --api-version`
1817 CUPS_API_MAJOR=`echo $ECHO_N $CUPS_API_VERSION | awk -F. '{print $1}'`
1818 CUPS_API_MINOR=`echo $ECHO_N $CUPS_API_VERSION | awk -F. '{print $2}'`
1820 if test $CUPS_API_MAJOR -gt 1 -o \
1821 $CUPS_API_MAJOR -eq 1 -a $CUPS_API_MINOR -ge 2; then
1822 AC_DEFINE(HAVE_CUPS_API_1_2, 1,
1823 [Define to 1 if CUPS 1.2 API is available])
1826 AC_SUBST(CUPS_API_MAJOR)
1827 AC_SUBST(CUPS_API_MINOR)
1828 AC_SUBST(CUPS_CFLAGS)
1831 AC_CHECK_HEADER(cups/cups.h,,AC_MSG_ERROR([[*** Sorry, cups-config present but cups/cups.h missing.]]))
1833 AM_CONDITIONAL(HAVE_CUPS, test "x$CUPS_CONFIG" != "xno")
1835 gtk_save_cflags="$CFLAGS"
1836 CFLAGS="$CUPS_CFLAGS"
1837 AC_TRY_COMPILE([#include <cups/http.h>],
1838 [http_t http; char *s = http.authstring;],
1839 [AC_DEFINE(HAVE_HTTP_AUTHSTRING, [],
1840 [Define if cups http_t authstring field is accessible])],)
1841 CFLAGS="$gtk_save_cflags"
1843 AC_SUBST(HAVE_HTTP_AUTHSTRING)
1845 gtk_save_libs="$LIBS"
1847 AC_CHECK_FUNCS(httpGetAuthString)
1848 LIBS="$gtk_save_libs"
1851 AM_CONDITIONAL(HAVE_CUPS, false)
1854 gtk_save_cppflags="$CPPFLAGS"
1855 CPPFLAGS="$CPPFLAGS $GTK_DEP_CFLAGS"
1857 AC_CHECK_HEADER(cairo-pdf.h,,AC_MSG_ERROR([
1858 *** Can't find cairo-pdf.h. You must build Cairo with the pdf
1859 *** backend enabled.]))
1861 if test "$os_win32" != "yes"; then
1862 AC_CHECK_HEADER(cairo-ps.h,,AC_MSG_ERROR([
1863 *** Can't find cairo-ps.h. You must build Cairo with the
1864 *** postscript backend enabled.]))
1867 CPPFLAGS="$gtk_save_cppflags"
1870 AC_ARG_ENABLE(test-print-backend,
1871 [AC_HELP_STRING([--enable-test-print-backend],
1872 [build test print backend])],,
1873 [enable_test_print_backend=no])
1874 AM_CONDITIONAL(TEST_PRINT_BACKEND, test "x$enable_test_print_backend" != "xno")
1877 ################################################################
1878 # Strip -export-dynamic from the link lines of various libraries
1879 ################################################################
1882 # pkg-config --libs gmodule includes the "export_dynamic" flag,
1883 # but this flag is only meaningful for executables. For libraries
1884 # the effect is undefined; what it causes on Linux is that the
1885 # export list from -export-symbols-regex is ignored and everything
1888 # We are using gmodule-no-export now, but I'm leaving the stripping
1889 # code in place for now, since pango and atk still require gmodule.
1891 export_dynamic=`(./libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh`
1892 if test -n "$export_dynamic"; then
1893 GDK_PIXBUF_DEP_LIBS=`echo $GDK_PIXBUF_DEP_LIBS | sed -e "s/$export_dynamic//"`
1894 GDK_PIXBUF_XLIB_DEP_LIBS=`echo $GDK_PIXBUF_XLIB_DEP_LIBS | sed -e "s/$export_dynamic//"`
1895 GDK_DEP_LIBS=`echo $GDK_DEP_LIBS | sed -e "s/$export_dynamic//"`
1896 GTK_DEP_LIBS=`echo $GTK_DEP_LIBS | sed -e "s/$export_dynamic//"`
1900 ##################################################
1901 # Checks for gtk-doc and docbook-tools
1902 ##################################################
1904 GTK_DOC_CHECK([1.8])
1906 AC_CHECK_PROG(DB2HTML, db2html, true, false)
1907 AM_CONDITIONAL(HAVE_DOCBOOK, $DB2HTML)
1910 [AC_HELP_STRING([--enable-man],
1911 [regenerate man pages from Docbook [default=no]])],enable_man=yes,
1914 if test "${enable_man}" != no; then
1916 dnl Check for xsltproc
1918 AC_PATH_PROG([XSLTPROC], [xsltproc])
1919 if test -z "$XSLTPROC"; then
1923 dnl check for DocBook DTD and stylesheets in the local catalog.
1924 JH_CHECK_XML_CATALOG([-//OASIS//DTD DocBook XML V4.1.2//EN],
1925 [DocBook XML DTD V4.1.2],,enable_man=no)
1926 JH_CHECK_XML_CATALOG([http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl],
1927 [DocBook XSL Stylesheets],,enable_man=no)
1930 AM_CONDITIONAL(ENABLE_MAN, test x$enable_man != xno)
1933 ##################################################
1935 ##################################################
1937 AC_CONFIG_COMMANDS([gdk/gdkconfig.h], [
1938 outfile=gdkconfig.h-tmp
1939 cat > $outfile <<\_______EOF
1942 * This is a generated file. Please modify `configure.in'
1950 #endif /* __cplusplus */
1953 /* introduce GSEAL() here for all of Gdk and Gtk+ without the need to modify GLib */
1954 # ifdef GSEAL_ENABLE
1955 # define GSEAL(ident) _g_sealed__ ## ident
1957 # define GSEAL(ident) ident
1963 cat >>$outfile <<_______EOF
1968 cat >>$outfile <<_______EOF
1972 #endif /* __cplusplus */
1974 #endif /* GDKCONFIG_H */
1978 if cmp -s $outfile gdk/gdkconfig.h; then
1979 AC_MSG_NOTICE([gdk/gdkconfig.h is unchanged])
1982 mv $outfile gdk/gdkconfig.h
1985 if test "x$gdktarget" = "xx11" ; then
1987 #define GDK_WINDOWING_X11'
1988 elif test "x$gdktarget" = "xwin32" ; then
1990 #define GDK_NATIVE_WINDOW_POINTER
1992 #define GDK_WINDOWING_WIN32'
1993 elif test "x$gdktarget" = "xquartz" ; then
1995 #define GDK_WINDOWING_QUARTZ'
1996 elif test "x$gdktarget" = "xdirectfb" ; then
1998 #define GDK_WINDOWING_DIRECTFB'
2001 if test x$gdk_wchar_h = xyes; then
2003 #define GDK_HAVE_WCHAR_H 1'
2005 if test x$gdk_wctype_h = xyes; then
2007 #define GDK_HAVE_WCTYPE_H 1"
2009 if test x$gdk_working_wctype = xno; then
2011 #define GDK_HAVE_BROKEN_WCTYPE 1"
2024 gtk+-unix-print-2.0.pc
2026 gdk-pixbuf-2.0-uninstalled.pc
2027 gdk-2.0-uninstalled.pc
2028 gtk+-2.0-uninstalled.pc
2032 po-properties/Makefile.in
2034 demos/gtk-demo/Makefile
2035 demos/gtk-demo/geninclude.pl
2038 docs/reference/Makefile
2039 docs/reference/gdk-pixbuf/Makefile
2040 docs/reference/gdk-pixbuf/version.xml
2041 docs/reference/gdk/Makefile
2042 docs/reference/gdk/version.xml
2043 docs/reference/gtk/Makefile
2044 docs/reference/gtk/version.xml
2045 docs/reference/libgail-util/Makefile
2048 docs/tutorial/Makefile
2050 gdk-pixbuf/gdk_pixbuf.rc
2051 gdk-pixbuf/gdk-pixbuf-features.h
2052 gdk-pixbuf/pixops/Makefile
2056 gdk/win32/rc/Makefile
2059 gdk/directfb/Makefile
2065 gtk/theme-bits/Makefile
2068 modules/other/Makefile
2069 modules/other/gail/Makefile
2070 modules/other/gail/libgail-util/Makefile
2071 modules/other/gail/tests/Makefile
2072 modules/engines/Makefile
2073 modules/engines/pixbuf/Makefile
2074 modules/engines/ms-windows/Makefile
2075 modules/engines/ms-windows/Theme/Makefile
2076 modules/engines/ms-windows/Theme/gtk-2.0/Makefile
2077 modules/input/Makefile
2078 modules/printbackends/Makefile
2079 modules/printbackends/cups/Makefile
2080 modules/printbackends/lpr/Makefile
2081 modules/printbackends/file/Makefile
2082 modules/printbackends/test/Makefile
2085 contrib/gdk-pixbuf-xlib/Makefile
2086 contrib/gdk-pixbuf-xlib/gdk-pixbuf-xlib-2.0.pc
2091 echo "configuration: