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], [19])
15 m4_define([gtk_micro_version], [2])
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.21.3])
35 m4_define([pango_required_version], [1.20])
36 m4_define([atk_required_version], [1.29.2])
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 AC_CONFIG_MACRO_DIR([m4])
48 # Save this value here, since automake will set cflags later
49 cflags_set=${CFLAGS+set}
51 AM_INIT_AUTOMAKE([no-define -Wno-portability])
52 AM_CONFIG_HEADER(config.h)
54 # Support silent build rules, requires at least automake-1.11. Enable
55 # by either passing --enable-silent-rules to configure or passing V=0
57 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([no])])
60 # For each of the libraries we build, we define the following
62 # substituted variables:
64 # foo_PACKAGES: pkg-config packages this library requires
65 # foo_EXTRA_LIBS: Libraries this module requires not pulled in by pkg-config
66 # foo_EXTRA_CFLAGS: cflags this module requires not pulled in by pkg-config
67 # foo_DEP_LIBS: All libraries this module requires
68 # foo_DEP_CFLAGS: All cflags this module requires
71 GTK_MAJOR_VERSION=gtk_major_version
72 GTK_MINOR_VERSION=gtk_minor_version
73 GTK_MICRO_VERSION=gtk_micro_version
74 GTK_INTERFACE_AGE=gtk_interface_age
75 GTK_BINARY_AGE=gtk_binary_age
76 GTK_VERSION=gtk_version
77 GTK_API_VERSION=gtk_api_version
78 GTK_BINARY_VERSION=gtk_binary_version
79 AC_SUBST(GTK_MAJOR_VERSION)
80 AC_SUBST(GTK_MINOR_VERSION)
81 AC_SUBST(GTK_MICRO_VERSION)
82 AC_SUBST(GTK_INTERFACE_AGE)
83 AC_SUBST(GTK_BINARY_AGE)
84 AC_SUBST(GTK_API_VERSION)
86 AC_SUBST(GTK_BINARY_VERSION)
89 #LT_RELEASE=$GTK_MAJOR_VERSION.$GTK_MINOR_VERSION
90 #LT_CURRENT=`expr $GTK_MICRO_VERSION - $GTK_INTERFACE_AGE`
91 #LT_REVISION=$GTK_INTERFACE_AGE
92 #LT_AGE=`expr $GTK_BINARY_AGE - $GTK_INTERFACE_AGE`
93 #LT_CURRENT_MINUS_AGE=`expr $LT_CURRENT - $LT_AGE`
95 m4_define([lt_current], [m4_eval(100 * gtk_minor_version + gtk_micro_version - gtk_interface_age)])
96 m4_define([lt_revision], [gtk_interface_age])
97 m4_define([lt_age], [m4_eval(gtk_binary_age - gtk_interface_age)])
98 LT_VERSION_INFO="lt_current:lt_revision:lt_age"
99 LT_CURRENT_MINUS_AGE=m4_eval(lt_current - lt_age)
100 AC_SUBST(LT_VERSION_INFO)
101 AC_SUBST(LT_CURRENT_MINUS_AGE)
103 m4_define([gail_lt_current],[18])
104 m4_define([gail_lt_revision],[1])
105 m4_define([gail_lt_age],[0])
106 m4_define([gail_lt_version_info],[gail_lt_current:gail_lt_revision:gail_lt_age])
107 m4_define([gail_lt_current_minus_age],[m4_eval(gail_lt_current - gail_lt_age)])
108 AC_SUBST([GAIL_LT_VERSION_INFO],[gail_lt_version_info])
109 AC_SUBST([GAIL_LT_CURRENT_MINUS_AGE],[gail_lt_current_minus_age])
112 # gdk-pixbuf gets versioned separately, and for now, using standard
113 # libtool versioning, not GTK+-style versioning
115 GDK_PIXBUF_MAJOR=gtk_major_version
116 GDK_PIXBUF_MINOR=gtk_minor_version
117 GDK_PIXBUF_MICRO=gtk_micro_version
118 GDK_PIXBUF_VERSION="${GDK_PIXBUF_MAJOR}.${GDK_PIXBUF_MINOR}.${GDK_PIXBUF_MICRO}"
119 AC_SUBST(GDK_PIXBUF_MAJOR)
120 AC_SUBST(GDK_PIXBUF_MINOR)
121 AC_SUBST(GDK_PIXBUF_MICRO)
122 AC_SUBST(GDK_PIXBUF_VERSION)
124 GETTEXT_PACKAGE=gtk20
125 AC_SUBST(GETTEXT_PACKAGE)
126 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE",
127 [The prefix for our gettext translation domains.])
132 AC_MSG_CHECKING([for native Win32])
133 LIB_EXE_MACHINE_FLAG=X86
141 LIB_EXE_MACHINE_FLAG=X64
149 AC_MSG_RESULT([$os_win32])
151 AC_SUBST(LIB_EXE_MACHINE_FLAG)
159 dnl Initialize libtool
164 dnl Check for a working C++ compiler, but do not bail out, if none is found.
165 dnl We use this for an automated test for C++ header correctness.
167 AC_CHECK_TOOLS(CXX, [$CCC c++ g++ gcc CC cxx cc++ cl], gcc)
171 AC_TRY_COMPILE(,[class a { int b; } c;], ,CXX=)
172 AM_CONDITIONAL(HAVE_CXX, test "$CXX" != "")
174 gtk_save_cxxflags="$CXXFLAGS"
175 CXXFLAGS="$CXXFLAGS -x objective-c++"
176 AC_TRY_COMPILE([@interface Foo @end],,OBJC=yes,OBJC=no)
177 AM_CONDITIONAL(HAVE_OBJC, test "$OBJC" = "yes")
178 CXXFLAGS="$gtk_save_cxxflags"
181 if test "$os_win32" = "yes"; then
182 if test x$enable_static = xyes -o x$enable_static = x; then
183 AC_MSG_WARN([Disabling static library build, must build as DLL on Windows.])
186 if test x$enable_shared = xno; then
187 AC_MSG_WARN([Enabling shared library build, must build as DLL on Windows.])
194 dnl when using libtool 2.x create libtool early, because it's used in configure
195 m4_ifdef([LT_OUTPUT], [LT_OUTPUT])
198 # Make sure we use 64-bit versions of various file stuff.
202 AC_PATH_PROG(NM, nm, nm)
204 dnl Initialize maintainer mode
207 AC_MSG_CHECKING([for some Win32 platform])
209 *-*-mingw*|*-*-cygwin*)
216 AC_MSG_RESULT([$platform_win32])
217 AM_CONDITIONAL(PLATFORM_WIN32, test "$platform_win32" = "yes")
219 AM_CONDITIONAL(OS_WIN32, test "$os_win32" = "yes")
220 AM_CONDITIONAL(OS_UNIX, test "$os_win32" != "yes")
221 AM_CONDITIONAL(OS_LINUX, test "$os_linux" = "yes")
223 if test "$os_win32" = "yes"; then
224 AC_CHECK_TOOL(WINDRES, windres, no)
225 if test "$WINDRES" = no; then
226 AC_MSG_ERROR([*** Could not find an implementation of windres in your PATH.])
228 AC_CHECK_PROG(ms_librarian, lib.exe, yes, no)
230 AM_CONDITIONAL(MS_LIB_AVAILABLE, test x$ms_librarian = xyes)
232 m4_define([debug_default],
233 m4_if(m4_eval(gtk_minor_version % 2), [1], [yes], [minimum]))
235 dnl declare --enable-* args and collect ac_help strings
237 AC_HELP_STRING([--enable-debug=@<:@no/minimum/yes@:>@],
238 [turn on debugging @<:@default=debug_default@:>@]),,
239 enable_debug=debug_default)
241 [AC_HELP_STRING([--enable-shm],
242 [support shared memory if available [default=yes]])],,
245 [AC_HELP_STRING([--enable-xkb],
246 [support XKB [default=maybe]])],,
247 [enable_xkb="maybe"])
248 AC_ARG_ENABLE(xinerama,
249 [AC_HELP_STRING([--enable-xinerama],
250 [support xinerama extension if available [default=yes]])],,
251 [enable_xinerama="yes"])
252 AC_ARG_ENABLE(rebuilds,
253 [AC_HELP_STRING([--disable-rebuilds],
254 [disable all source autogeneration rules])],,
255 [enable_rebuilds=yes])
256 AC_ARG_ENABLE(visibility,
257 [AC_HELP_STRING([--disable-visibility],
258 [don't use ELF visibility attributes])],,
259 [enable_visibility=yes])
262 [AC_HELP_STRING([--with-xinput=@<:@no/yes@:>@], [support XInput])])
264 if test "$platform_win32" = yes; then
270 AC_ARG_WITH(gdktarget, [ --with-gdktarget=[[x11/win32/quartz/directfb]] select non-default GDK target],
271 gdktarget=$with_gdktarget)
275 x11|win32|quartz|directfb) ;;
276 *) AC_MSG_ERROR([Invalid target for GDK: use x11, quartz, directfb or win32.]);;
279 gdktargetlib=libgdk-$gdktarget-$GTK_API_VERSION.la
280 gtktargetlib=libgtk-$gdktarget-$GTK_API_VERSION.la
282 AC_SUBST(gdktargetlib)
283 AC_SUBST(gtktargetlib)
285 if test "x$enable_debug" = "xyes"; then
286 test "$cflags_set" = set || CFLAGS="$CFLAGS -g"
287 GTK_DEBUG_FLAGS="-DG_ENABLE_DEBUG -DG_ERRORCHECK_MUTEXES"
289 if test "x$enable_debug" = "xno"; then
290 GTK_DEBUG_FLAGS="-DG_DISABLE_ASSERT -DG_DISABLE_CHECKS -DG_DISABLE_CAST_CHECKS"
292 GTK_DEBUG_FLAGS="-DG_DISABLE_CAST_CHECKS"
297 if test "x$enable_visibility" = "xno"; then
298 GTK_DEBUG_FLAGS="$GTK_DEBUG_FLAGS -DDISABLE_VISIBILITY"
302 AC_DEFINE_UNQUOTED(GTK_COMPILED_WITH_DEBUGGING, "${enable_debug}",
303 [Define if debugging is enabled])
306 # Build time sanity check...
309 # Checks for programs.
317 if test "x$GCC" = "xyes"; then
319 *[\ \ ]-Wall[\ \ ]*) ;;
320 *) CFLAGS="$CFLAGS -Wall" ;;
323 if test "x$enable_ansi" = "xyes"; then
325 *[\ \ ]-ansi[\ \ ]*) ;;
326 *) CFLAGS="$CFLAGS -ansi" ;;
330 *[\ \ ]-pedantic[\ \ ]*) ;;
331 *) CFLAGS="$CFLAGS -pedantic" ;;
337 CPPFLAGS="$CPPFLAGS -DG_DISABLE_SINGLE_INCLUDES -DATK_DISABLE_SINGLE_INCLUDES -DGDK_PIXBUF_DISABLE_SINGLE_INCLUDES -DGTK_DISABLE_SINGLE_INCLUDES"
339 # Ensure MSVC-compatible struct packing convention is used when
340 # compiling for Win32 with gcc.
341 # What flag to depends on gcc version: gcc3 uses "-mms-bitfields", while
342 # gcc2 uses "-fnative-struct".
343 if test x"$os_win32" = xyes; then
344 if test x"$GCC" = xyes; then
346 AC_MSG_CHECKING([how to get MSVC-compatible struct packing])
347 if test -z "$ac_cv_prog_CC"; then
350 our_gcc="$ac_cv_prog_CC"
352 case `$our_gcc --version | sed -e 's,\..*,.,' -e q` in
354 if $our_gcc -v --help 2>/dev/null | grep fnative-struct >/dev/null; then
355 msnative_struct='-fnative-struct'
359 if $our_gcc -v --help 2>/dev/null | grep ms-bitfields >/dev/null; then
360 msnative_struct='-mms-bitfields'
364 if test x"$msnative_struct" = x ; then
365 AC_MSG_RESULT([no way])
366 AC_MSG_WARN([produced libraries might be incompatible with MSVC-compiled code])
368 CFLAGS="$CFLAGS $msnative_struct"
369 AC_MSG_RESULT([${msnative_struct}])
374 # Honor aclocal flags
375 ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
377 ## Initial sanity check, done here so that users get told they
378 ## have the wrong dependencies as early in the process as possible.
379 ## Later on we actually use the cflags/libs from separate pkg-config
380 ## calls. Oh, also the later pkg-config calls don't include
381 ## the version requirements since those make the module lists
382 ## annoying to construct
383 PKG_CHECK_MODULES(BASE_DEPENDENCIES,
384 [glib-2.0 >= glib_required_version dnl
385 atk >= atk_required_version dnl
386 pango >= pango_required_version dnl
387 cairo >= cairo_required_version])
389 ## In addition to checking that cairo is present, we also need to
390 ## check that the correct cairo backend is there. E.g. if the GDK
391 ## target is win32 we need the cairo-win32 backend and so on.
392 cairo_backend=$gdktarget
394 # GDK calls the xlib backend "x11," cairo calls it "xlib." Other
395 # backend names are identical.
396 if test "x$cairo_backend" = "xx11"; then
399 PKG_CHECK_MODULES(CAIRO_BACKEND,
400 [cairo-$cairo_backend >= cairo_required_version])
402 if test "$os_win32" != yes; then
403 # libtool option to control which symbols are exported
404 # right now, symbols starting with _ are not exported
405 LIBTOOL_EXPORT_OPTIONS='-export-symbols-regex "^[[^_]].*"'
407 # We currently use .def files on Windows (for gdk-pixbuf, gdk and gtk)
408 LIBTOOL_EXPORT_OPTIONS=
410 AC_SUBST(LIBTOOL_EXPORT_OPTIONS)
412 dnl ******************************************************
413 dnl * See whether to include shared library dependencies *
414 dnl ******************************************************
416 AC_ARG_ENABLE(explicit-deps,
417 [AC_HELP_STRING([--enable-explicit-deps=@<:@yes/no/auto@:>@],
418 [use explicit dependencies in .pc files [default=auto]])],,
419 [enable_explicit_deps=auto])
421 AC_MSG_CHECKING([Whether to write dependencies into .pc files])
422 case $enable_explicit_deps in
425 deplibs_check_method=`(./libtool --config; echo 'eval echo \"$deplibs_check_method\"') | sh`
426 if test "x$deplibs_check_method" '!=' xpass_all || test "x$enable_static" = xyes ; then
427 enable_explicit_deps=yes
429 enable_explicit_deps=no
434 *) AC_MSG_ERROR([Value given to --enable-explicit-deps must be one of yes, no or auto])
437 AC_MSG_RESULT($enable_explicit_deps)
439 AM_CONDITIONAL(DISABLE_EXPLICIT_DEPS, test $enable_explicit_deps = no)
441 # define a MAINT-like variable REBUILD which is set if Perl
442 # and awk are found, so autogenerated sources can be rebuilt
444 AC_PATH_PROGS(PERL, perl5 perl)
446 # We would like indent, but don't require it.
447 AC_CHECK_PROG(INDENT, indent, indent)
450 if test "x$enable_rebuilds" = "xyes" && \
452 $PERL -e 'exit !($] >= 5.002)' > /dev/null 2>&1 ; then
457 AC_CHECK_FUNCS(lstat mkstemp flockfile getc_unlocked)
458 AC_CHECK_FUNCS(localtime_r)
460 # _NL_TIME_FIRST_WEEKDAY is an enum and not a define
461 AC_MSG_CHECKING([for _NL_TIME_FIRST_WEEKDAY])
462 AC_TRY_LINK([#include <langinfo.h>], [
464 c = *((unsigned char *) nl_langinfo(_NL_TIME_FIRST_WEEKDAY));
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_TIME_FIRST_WEEKDAY], [1],
469 [Define if _NL_TIME_FIRST_WEEKDAY is available])
472 # _NL_MEASUREMENT_MEASUREMENT is an enum and not a define
473 AC_MSG_CHECKING([for _NL_MEASUREMENT_MEASUREMENT])
474 AC_TRY_LINK([#include <langinfo.h>], [
476 c = *((unsigned char *) nl_langinfo(_NL_MEASUREMENT_MEASUREMENT));
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_MEASUREMENT_MEASUREMENT], [1],
481 [Define if _NL_MEASUREMENT_MEASUREMENT is available])
484 # _NL_PAPER_HEIGHT is an enum and not a define
485 AC_MSG_CHECKING([for _NL_PAPER_HEIGHT])
486 AC_TRY_LINK([#include <langinfo.h>], [
488 c = *((unsigned char *) nl_langinfo(_NL_PAPER_HEIGHT));
489 ], gtk_ok=yes, gtk_ok=no)
490 AC_MSG_RESULT($gtk_ok)
491 if test "$gtk_ok" = "yes"; then
492 AC_DEFINE([HAVE__NL_PAPER_HEIGHT], [1],
493 [Define if _NL_PAPER_HEIGHT is available])
496 # _NL_PAPER_WIDTH is an enum and not a define
497 AC_MSG_CHECKING([for _NL_PAPER_WIDTH])
498 AC_TRY_LINK([#include <langinfo.h>], [
500 c = *((unsigned char *) nl_langinfo(_NL_PAPER_WIDTH));
501 ], gtk_ok=yes, gtk_ok=no)
502 AC_MSG_RESULT($gtk_ok)
503 if test "$gtk_ok" = "yes"; then
504 AC_DEFINE([HAVE__NL_PAPER_WIDTH], [1],
505 [Define if _NL_PAPER_WIDTH is available])
508 # sigsetjmp is a macro on some platforms, so AC_CHECK_FUNCS is not reliable
509 AC_MSG_CHECKING(for sigsetjmp)
510 AC_TRY_LINK([#include <setjmp.h>], [
513 ], gtk_ok=yes, gtk_ok=no)
514 AC_MSG_RESULT($gtk_ok)
515 if test "$gtk_ok" = "yes"; then
516 AC_DEFINE(HAVE_SIGSETJMP, 1,
517 [Define to 1 if sigsetjmp is available])
521 ALL_LINGUAS="`grep -v '^#' "$srcdir/po/LINGUAS" | tr '\n' ' '`"
523 LIBS="$LIBS $INTLLIBS"
524 AC_OUTPUT_COMMANDS([case "$CONFIG_FILES" in *po-properties/Makefile.in*)
525 sed -e "/POTFILES =/r po-properties/POTFILES" po-properties/Makefile.in > po-properties/Makefile
528 dnl Snippet below is copied from AM_GLIB_GNU_GETTEXT to generate a first
529 dnl po-properties/POTFILES during configure; see GNOME #573515.
531 dnl Generate list of files to be processed by xgettext which will
532 dnl be included in po-properties/Makefile.
533 test -d po-properties || mkdir po-properties
534 if test "x$srcdir" != "x."; then
535 if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
536 popropsrcprefix="$srcdir/"
538 popropsrcprefix="../$srcdir/"
541 popropsrcprefix="../"
543 rm -f po-properties/POTFILES
544 sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $popropsrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
545 < $srcdir/po-properties/POTFILES.in > po-properties/POTFILES
546 dnl (End of adapted AM_GLIB_GNU_GETTEXT snippet.)
548 AM_GLIB_DEFINE_LOCALEDIR(GTK_LOCALEDIR)
550 dnl The DU4 header files don't provide library prototypes unless
551 dnl -std1 is given to the native cc.
552 AC_MSG_CHECKING([for extra flags to get ANSI library prototypes])
556 AC_TRY_RUN([#include <math.h>
557 int main (void) { return (log(1) != log(1.)); }],
558 AC_MSG_RESULT(none needed),
559 gtk_save_CFLAGS="$CFLAGS"
560 CFLAGS="$CFLAGS -std1"
561 AC_TRY_RUN([#include <math.h>
562 int main (void) { return (log(1) != log(1.)); }],
563 AC_MSG_RESULT(-std1),
565 CFLAGS="$gtk_save_CFLAGS"
567 [No ANSI prototypes found in library. (-std1 didn't work.)]),
570 AC_MSG_RESULT(none needed)
574 AC_MSG_CHECKING(for the BeOS)
588 AC_MSG_CHECKING(for HP-UX)
590 hpux9* | hpux10* | hpux11*)
592 CFLAGS="$CFLAGS -DHPPEX -DSHMLINK"
599 dnl NeXTStep cc seems to need this
600 AC_MSG_CHECKING([for extra flags for POSIX compliance])
601 AC_TRY_COMPILE([#include <dirent.h>], [DIR *dir;],
602 AC_MSG_RESULT(none needed),
603 gtk_save_CFLAGS="$CFLAGS"
604 CFLAGS="$CFLAGS -posix"
605 AC_TRY_COMPILE([#include <dirent.h>], [DIR *dir;],
606 AC_MSG_RESULT(-posix),
608 CFLAGS="$gtk_save_CFLAGS"
609 AC_MSG_WARN([Could not determine POSIX flag. (-posix didn't work.)])))
612 # Run AM_PATH_GLIB_2_0 to make sure that GLib is installed and working
615 GLIB_PACKAGES="gobject-2.0 gmodule-no-export-2.0"
617 AM_PATH_GLIB_2_0(glib_required_version, :,
619 *** GLIB glib_required_version or better is required. The latest version of
620 *** GLIB is always available from ftp://ftp.gtk.org/pub/gtk/.]),
621 gobject gmodule-no-export gthread)
623 # See if it's safe to turn G_DISABLE_DEPRECATED on.
624 GLIB_VERSION_MAJOR_MINOR=`$PKG_CONFIG --modversion glib-2.0 | sed "s/\.@<:@^.@:>@*\$//"`
625 GLIB_REQUIRED_VERSION_MAJOR_MINOR=`echo glib_required_version | sed "s/\.@<:@^.@:>@*\$//"`
626 if test "x$GLIB_VERSION_MAJOR_MINOR" = "x$GLIB_REQUIRED_VERSION_MAJOR_MINOR"; then
627 CFLAGS="-DG_DISABLE_DEPRECATED $CFLAGS"
630 CFLAGS="-DGDK_PIXBUF_DISABLE_DEPRECATED $CFLAGS"
634 dnl Check for bind_textdomain_codeset, including -lintl if GLib brings it in.
637 LIBS="$LIBS $GLIB_LIBS"
638 AC_CHECK_FUNCS(bind_textdomain_codeset)
641 AC_CHECK_HEADERS(pwd.h,
642 AC_DEFINE(HAVE_PWD_H, 1,
643 [Define to 1 if pwd.h is available]))
644 AC_CHECK_HEADERS(sys/time.h,
645 AC_DEFINE(HAVE_SYS_TIME_H, 1,
646 [Define to 1 if time.h is available]))
647 AC_CHECK_HEADERS(unistd.h,
648 AC_DEFINE(HAVE_UNISTD_H, 1,
649 [Define to 1 if unistd.h is available]))
650 AC_CHECK_HEADERS(ftw.h,
651 AC_DEFINE(HAVE_FTW_H, 1,
652 [Define to 1 if ftw.h is available]))
654 AC_MSG_CHECKING([for GNU ftw extensions])
655 AC_TRY_COMPILE([#define _XOPEN_SOURCE 500
657 #include <ftw.h>], [int flags = FTW_ACTIONRETVAL;], gtk_ok=yes, gtk_ok=no)
658 if test $gtk_ok = yes; then
660 AC_DEFINE(HAVE_GNU_FTW, 1, [Have GNU ftw])
665 saved_cflags="$CFLAGS"
666 saved_ldflags="$LDFLAGS"
669 # Checks for header files.
672 # Checks for typedefs, structures, and compiler characteristics.
675 # Checks for library functions.
679 AC_CHECK_FUNCS(mallinfo)
680 AC_CHECK_FUNCS(getresuid)
683 # Check if <sys/select.h> needs to be included for fd_set
684 AC_MSG_CHECKING([for fd_set])
685 AC_TRY_COMPILE([#include <sys/types.h>],
686 [fd_set readMask, writeMask;], gtk_ok=yes, gtk_ok=no)
687 if test $gtk_ok = yes; then
688 AC_MSG_RESULT([yes, found in sys/types.h])
690 AC_HEADER_EGREP(fd_mask, sys/select.h, gtk_ok=yes)
691 if test $gtk_ok = yes; then
692 AC_DEFINE(HAVE_SYS_SELECT_H, 1,
693 [Define to 1 if sys/select.h is available])
694 AC_MSG_RESULT([yes, found in sys/select.h])
696 AC_DEFINE(NO_FD_SET, 1,
697 [Define to 1 if fd_set is not available])
702 # `widechar' tests for gdki18n.h
703 AC_MSG_CHECKING(for wchar.h)
704 AC_TRY_CPP([#include <wchar.h>], gdk_wchar_h=yes, gdk_wchar_h=no)
705 if test $gdk_wchar_h = yes; then
706 AC_DEFINE(HAVE_WCHAR_H, 1, [Have wchar.h include file])
708 AC_MSG_RESULT($gdk_wchar_h)
710 # Check for wctype.h (for iswalnum)
711 AC_MSG_CHECKING(for wctype.h)
712 AC_TRY_CPP([#include <wctype.h>], gdk_wctype_h=yes, gdk_wctype_h=no)
713 if test $gdk_wctype_h = yes; then
714 AC_DEFINE(HAVE_WCTYPE_H, 1, [Have wctype.h include file])
716 AC_MSG_RESULT($gdk_wctype_h)
718 # in Solaris 2.5, `iswalnum' is in -lw
720 AC_CHECK_FUNC(iswalnum,,[AC_CHECK_LIB(w,iswalnum,GDK_WLIBS=-lw)])
723 LIBS="$LIBS $GDK_WLIBS"
724 # The following is necessary for Linux libc-5.4.38
725 AC_MSG_CHECKING(if iswalnum() and friends are properly defined)
726 AC_TRY_LINK([#include <stdlib.h>],[
727 #if (defined(HAVE_WCTYPE_H) || defined(HAVE_WCHAR_H))
728 # ifdef HAVE_WCTYPE_H
736 # define iswalnum(c) ((wchar_t)(c) <= 0xFF && isalnum(c))
738 iswalnum((wchar_t) 0);
739 ], gdk_working_wctype=yes, gdk_working_wctype=no)
742 if test $gdk_working_wctype = no; then
743 AC_DEFINE(HAVE_BROKEN_WCTYPE, 1, [Is the wctype implementation broken])
746 AC_MSG_RESULT($gdk_working_wctype)
749 # Check for uxtheme.h (for MS-Windows Engine)
750 AC_MSG_CHECKING(for uxtheme.h)
751 AC_TRY_CPP([#include <uxtheme.h>], gtk_uxtheme_h=yes, gtk_uxtheme_h=no)
752 if test $gtk_uxtheme_h = yes; then
753 AC_DEFINE(HAVE_UXTHEME_H, 1, [Have uxtheme.h include file])
755 AC_MSG_RESULT($gtk_uxtheme_h)
757 # Checks for gdkspawn
758 AC_CHECK_HEADERS(crt_externs.h)
759 AC_CHECK_FUNCS(_NSGetEnviron)
762 ##################################################
763 # Checks for gdk-pixbuf
764 ##################################################
766 dnl ********************************************************
767 dnl * See whether we need to load our modules as .la files *
768 dnl ********************************************************
772 *-aix*) use_la_modules=true
775 if $use_la_modules ; then
776 AC_DEFINE(USE_LA_MODULES, 1,
777 [Whether to load modules via .la files rather than directly])
781 AC_MSG_CHECKING(whether to build gmodulized gdk-pixbuf)
783 AC_ARG_ENABLE(modules,
784 [AC_HELP_STRING([--disable-modules],
785 [disable dynamic module loading])])
789 if test x$enable_modules = xno; then
793 AC_MSG_CHECKING(whether dynamic modules work)
794 ## for loop is to strip newline
795 tmp=`$PKG_CONFIG --variable=gmodule_supported gmodule-no-export-2.0`
800 dnl Now we check to see if our libtool supports shared lib deps
801 dnl (in a rather ugly way even)
803 pixbuf_libtool_config="${CONFIG_SHELL-/bin/sh} ./libtool --config"
804 pixbuf_deplibs_check=`$pixbuf_libtool_config | \
805 grep '^[[a-z_]]*check[[a-z_]]*_method=[['\''"]]' | \
806 sed 's/.*[['\''"]]\(.*\)[['\''"]]$/\1/'`
807 if test "x$pixbuf_deplibs_check" = "xnone" || \
808 test "x$pixbuf_deplibs_check" = "xunknown" || \
809 test "x$pixbuf_deplibs_check" = "x"; then
815 AC_DEFINE(USE_GMODULE, 1,
816 [Define to 1 if gmodule works and should be used])
823 dnl We allow people to disable image loaders explicitely, but if they don't we error
824 dnl out so that people don't accidentally build without them.
827 [AC_HELP_STRING([--without-libpng],
828 [disable PNG loader for gdk-pixbuf])])
830 [AC_HELP_STRING([--without-libjpeg],
831 [disable JPEG loader for gdk-pixbuf])])
833 [AC_HELP_STRING([--without-libtiff],
834 [disable TIFF loader for gdk-pixbuf])])
835 AC_ARG_WITH(libjasper,
836 [AC_HELP_STRING([--with-libjasper],
837 [enable JPEG2000 loader for gdk-pixbuf])])
839 AC_ARG_ENABLE(gdiplus,
840 [AC_HELP_STRING([--enable-gdiplus],
841 [enble GDI+ loaders for gdk-pixbuf (currently known to be broken)])],,
844 AM_CONDITIONAL(BUILD_GDIPLUS_LOADERS, [ test x$os_win32 = xyes && test x$enable_gdiplus != xno ])
847 if test x$os_win32 = xno || test x$enable_gdiplus = xno; then
848 if test x$with_libtiff != xno && test -z "$LIBTIFF"; then
849 AC_CHECK_LIB(tiff, TIFFReadRGBAImageOriented,
850 [AC_CHECK_HEADER(tiffio.h,
851 TIFF='tiff'; LIBTIFF='-ltiff',
852 AC_MSG_WARN(*** TIFF loader will not be built (TIFF header files not found) ***))],
853 [AC_CHECK_LIB(tiff, TIFFWriteScanline,
854 [AC_CHECK_HEADER(tiffio.h,
855 TIFF='tiff'; LIBTIFF='-ltiff -ljpeg -lz',
856 AC_MSG_WARN(*** TIFF loader will not be built (TIFF header files not found) ***))],
857 [AC_CHECK_LIB(tiff34, TIFFFlushData,
858 [AC_CHECK_HEADER(tiffio.h,
859 TIFF='tiff'; LIBTIFF='-ltiff34 -ljpeg -lz',
860 AC_MSG_WARN(*** TIFF loader will not be built (TIFF header files not found) ***))],
861 AC_MSG_WARN(*** TIFF loader will not be built (TIFF library not found) ***), -ljpeg -lz -lm)], -ljpeg -lz -lm)], -lm)
864 if test x$with_libtiff != xno && test -z "$LIBTIFF"; then
866 *** Checks for TIFF loader failed. You can build without it by passing
867 *** --without-libtiff to configure but some programs using GTK+ may
868 *** not work properly])
873 if test x$os_win32 = xno || test x$enable_gdiplus = xno; then
874 if test x$with_libjpeg != xno && test -z "$LIBJPEG"; then
875 AC_CHECK_LIB(jpeg, jpeg_destroy_decompress,
878 AC_MSG_WARN(*** JPEG loader will not be built (JPEG library not found) ***))
879 if test "$jpeg_ok" = yes; then
880 AC_MSG_CHECKING([for jpeglib.h])
886 #include <jpeglib.h>],
889 AC_MSG_RESULT($jpeg_ok)
890 if test "$jpeg_ok" = yes; then
892 AC_CHECK_LIB(jpeg, jpeg_simple_progression,
893 AC_DEFINE(HAVE_PROGRESSIVE_JPEG, 1,
894 [Define to 1 is libjpeg supports progressive JPEG]),
895 AC_MSG_WARN(JPEG library does not support progressive saving.))
897 AC_MSG_WARN(*** JPEG loader will not be built (JPEG header file not found) ***)
902 if test x$with_libjpeg != xno && test -z "$LIBJPEG"; then
904 *** Checks for JPEG loader failed. You can build without it by passing
905 *** --without-libjpeg to configure but some programs using GTK+ may
906 *** not work properly])
911 if test x$with_libpng != xno && test -z "$LIBPNG"; then
912 AC_MSG_CHECKING(for libpng12)
913 if $PKG_CONFIG --exists libpng12 ; then
916 PNG_DEP_CFLAGS_PACKAGES=libpng12
917 LIBPNG=`$PKG_CONFIG --libs libpng12`
920 AC_CHECK_LIB(png, png_read_info,
921 [AC_CHECK_HEADER(png.h,
924 AC_MSG_WARN(*** PNG loader will not be built (PNG library not found) ***), -lz -lm)
925 if test "$png_ok" = yes; then
926 AC_MSG_CHECKING([for png_structp in png.h])
927 AC_TRY_COMPILE([#include <png.h>],
928 [png_structp pp; png_infop info; png_colorp cmap; png_create_read_struct;],
931 AC_MSG_RESULT($png_ok)
932 if test "$png_ok" = yes; then
933 PNG='png'; LIBPNG='-lpng -lz'
935 AC_MSG_WARN(*** PNG loader will not be built (PNG library is too old) ***)
938 AC_MSG_WARN(*** PNG loader will not be built (PNG header file not found) ***)
943 if test x$with_libpng != xno && test -z "$LIBPNG"; then
945 *** Checks for PNG loader failed. You can build without it by passing
946 *** --without-libpng to configure but many programs using GTK+ will
947 *** not work properly. The PNG loader is also needed if you are compiling
951 dnl Test for libjasper
952 if test x$with_libjasper = xyes && test -z "$LIBJASPER"; then
953 AC_CHECK_LIB(jasper, jas_init, LIBJASPER=-ljasper, [], -ljpeg)
956 if test x$with_libjasper = xyes && test -z "$LIBJASPER"; then
958 *** Checks for JPEG2000 loader failed. You can build without it by passing
959 *** --without-libjasper to configure])
967 AM_CONDITIONAL(BUILD_DYNAMIC_MODULES, $dynworks)
970 # Allow building some or all gdk-pixbuf loaders included
972 AC_MSG_CHECKING(pixbuf loaders to build)
974 dnl due to an autoconf bug, commas in the first arg to
975 dnl AC_HELP_STRING cause problems.
976 dnl AC_HELP_STRING([--with-included-loaders=LOADER1 LOADER2 ...],
977 dnl [build the specified loaders into gdk-pixbuf])
978 AC_ARG_WITH(included_loaders,
979 [ --with-included-loaders=LOADER1,LOADER2,...
980 build the specified loaders into gdk-pixbuf])
985 ## if the option was specified, leave it; otherwise disable included loaders
986 if test x$with_included_loaders = xno; then
987 with_included_loaders=yes
991 # Use the traditional png loader instead of the GDI+ one on Windows,
992 # because some important apps like GIMP need to read and write
993 # arbitrary tEXt chunks which doesn't seem to be possible through GDI+
995 all_loaders="ani,icns,pcx,ras,tga,png,pnm,wbmp,xbm,xpm,qtif"
996 if test x$with_libjasper != xno; then
997 all_loaders="$all_loaders,jasper"
999 if test x$os_win32 = xyes && test x$enable_gdiplus != xno; then
1000 # Skip PNG, see comment above
1001 gdip_formats="bmp emf gif ico jpeg tiff wmf"
1002 for f in $gdip_formats; do
1003 all_loaders="$all_loaders,gdip-$f"
1006 all_loaders="$all_loaders,bmp,gif,ico,jpeg,tiff"
1009 # If no loaders specified, include all
1010 if test "x$with_included_loaders" = xyes ; then
1011 included_loaders="$all_loaders"
1013 included_loaders="$with_included_loaders"
1016 AC_MSG_RESULT($included_loaders)
1018 INCLUDED_LOADER_OBJ=
1019 INCLUDED_LOADER_DEFINE=
1021 IFS="${IFS= }"; gtk_save_ifs="$IFS"; IFS=","
1022 for loader in $included_loaders; do
1023 if echo "$all_loaders" | egrep "(^|,)$loader(\$|,)" > /dev/null; then
1026 AC_MSG_ERROR([the specified loader $loader does not exist])
1029 loader_underscores=`echo $loader | sed -e 's/-/_/g'`
1030 INCLUDED_LOADER_OBJ="$INCLUDED_LOADER_OBJ libstatic-pixbufloader-$loader.la"
1032 # Don't bother defining separate -DINCLUDE_gdip_foo for each gdip-foo loader
1035 *) INCLUDED_LOADER_DEFINE="$INCLUDED_LOADER_DEFINE -DINCLUDE_$loader_underscores";;
1037 eval INCLUDE_$loader_underscores=yes
1040 # Just define one -DINCLUDE_gdiplus for all the gdip-foo loaders
1041 # (except gdip-png, which isn't built at all)
1042 if test x"$INCLUDE_gdip_ico" = xyes; then
1043 INCLUDED_LOADER_DEFINE="$INCLUDED_LOADER_DEFINE -DINCLUDE_gdiplus"
1047 AC_SUBST(INCLUDED_LOADER_OBJ)
1048 AC_SUBST(INCLUDED_LOADER_DEFINE)
1050 AM_CONDITIONAL(INCLUDE_PNG, [test x"$INCLUDE_png" = xyes])
1051 AM_CONDITIONAL(INCLUDE_BMP, [test x"$INCLUDE_bmp" = xyes])
1052 AM_CONDITIONAL(INCLUDE_WBMP, [test x"$INCLUDE_wbmp" = xyes])
1053 AM_CONDITIONAL(INCLUDE_GIF, [test x"$INCLUDE_gif" = xyes])
1054 AM_CONDITIONAL(INCLUDE_ICO, [test x"$INCLUDE_ico" = xyes])
1055 AM_CONDITIONAL(INCLUDE_ANI, [test x"$INCLUDE_ani" = xyes])
1056 AM_CONDITIONAL(INCLUDE_JPEG, [test x"$INCLUDE_jpeg" = xyes])
1057 AM_CONDITIONAL(INCLUDE_PNM, [test x"$INCLUDE_pnm" = xyes])
1058 AM_CONDITIONAL(INCLUDE_RAS, [test x"$INCLUDE_ras" = xyes])
1059 AM_CONDITIONAL(INCLUDE_TIFF, [test x"$INCLUDE_tiff" = xyes])
1060 AM_CONDITIONAL(INCLUDE_XPM, [test x"$INCLUDE_xpm" = xyes])
1061 AM_CONDITIONAL(INCLUDE_XBM, [test x"$INCLUDE_xbm" = xyes])
1062 AM_CONDITIONAL(INCLUDE_TGA, [test x"$INCLUDE_tga" = xyes])
1063 AM_CONDITIONAL(INCLUDE_PCX, [test x"$INCLUDE_pcx" = xyes])
1064 AM_CONDITIONAL(INCLUDE_ICNS, [test x"$INCLUDE_icns" = xyes])
1065 AM_CONDITIONAL(INCLUDE_JASPER, [test x"$INCLUDE_jasper" = xyes])
1066 AM_CONDITIONAL(INCLUDE_QTIF, [test x"$INCLUDE_qtif" = xyes])
1067 # As all GDI+ loaders are either built-in or not, arbitrarily just
1068 # check one of the variables here
1069 AM_CONDITIONAL(INCLUDE_GDIPLUS, [test x"$INCLUDE_gdip_ico" = xyes])
1071 if test x$gio_can_sniff = x; then
1072 AC_MSG_CHECKING([if gio can sniff png])
1073 gtk_save_LIBS="$LIBS"
1074 gtk_save_CFLAGS="$CFLAGS"
1075 LIBS="`$PKG_CONFIG --libs gio-2.0`"
1076 CFLAGS="`$PKG_CONFIG --cflags gio-2.0`"
1077 AC_RUN_IFELSE([AC_LANG_SOURCE([[
1078 #include <gio/gio.h>
1079 static const gsize data_size = 159;
1080 static const guint8 data[] =
1082 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d,
1083 0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01,
1084 0x08, 0x02, 0x00, 0x00, 0x00, 0x90, 0x77, 0x53, 0xde, 0x00, 0x00, 0x00,
1085 0x01, 0x73, 0x52, 0x47, 0x42, 0x00, 0xae, 0xce, 0x1c, 0xe9, 0x00, 0x00,
1086 0x00, 0x09, 0x70, 0x48, 0x59, 0x73, 0x00, 0x00, 0x0b, 0x13, 0x00, 0x00,
1087 0x0b, 0x13, 0x01, 0x00, 0x9a, 0x9c, 0x18, 0x00, 0x00, 0x00, 0x07, 0x74,
1088 0x49, 0x4d, 0x45, 0x07, 0xd8, 0x07, 0x0f, 0x10, 0x08, 0x15, 0x61, 0xd8,
1089 0x35, 0x37, 0x00, 0x00, 0x00, 0x19, 0x74, 0x45, 0x58, 0x74, 0x43, 0x6f,
1090 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x00, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65,
1091 0x64, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x47, 0x49, 0x4d, 0x50, 0x57,
1092 0x81, 0x0e, 0x17, 0x00, 0x00, 0x00, 0x0c, 0x49, 0x44, 0x41, 0x54, 0x08,
1093 0xd7, 0x63, 0xf8, 0xff, 0xff, 0x3f, 0x00, 0x05, 0xfe, 0x02, 0xfe, 0xdc,
1094 0xcc, 0x59, 0xe7, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae,
1098 main (int argc, char **argv)
1102 content_type = g_content_type_guess (NULL, data, data_size, NULL);
1103 image_png = g_content_type_from_mime_type ("image/png");
1104 return !!strcmp (content_type, image_png);
1107 AC_DEFINE(GDK_PIXBUF_USE_GIO_MIME, 1, [Define if gio can sniff image data])],
1109 AC_MSG_RESULT($gio_can_sniff)
1110 LIBS="$gtk_save_LIBS"
1111 CFLAGS="$gtk_save_CFLAGS"
1115 # Allow building some or all immodules included
1117 AC_MSG_CHECKING(immodules to build)
1119 dnl due to an autoconf bug, commas in the first arg to
1120 dnl AC_HELP_STRING cause problems.
1121 dnl AC_HELP_STRING([--with-included-immodules=MODULE1 MODULE2 ...],
1122 dnl [build the specified input method modules into gtk])
1123 AC_ARG_WITH(included_immodules,
1124 [ --with-included-immodules=MODULE1,MODULE2,...
1125 build the specified input methods into gtk])
1130 ## if the option was specified, leave it; otherwise disable included immodules
1131 if test x$with_included_immodules = xno; then
1132 with_included_immodules=yes
1136 all_immodules="am-et,cedilla,cyrillic-translit"
1137 if test "$gdktarget" = "win32"; then
1138 all_immodules="${all_immodules},ime"
1140 all_immodules="${all_immodules},inuktitut,ipa,multipress,thai,ti-er,ti-et,viqr"
1141 if test "$gdktarget" = "x11"; then
1142 all_immodules="${all_immodules},xim"
1145 included_immodules=""
1146 # If the switch specified without listing any specific ones, include all
1147 if test "x$with_included_immodules" = xyes ; then
1148 included_immodules="$all_immodules"
1150 included_immodules="$with_included_immodules"
1153 AC_MSG_RESULT($included_immodules)
1154 AM_CONDITIONAL(HAVE_INCLUDED_IMMMODULES, test "x$included_immodules" != x)
1156 INCLUDED_IMMODULE_OBJ=
1157 INCLUDED_IMMODULE_DEFINE=
1159 IFS="${IFS= }"; gtk_save_ifs="$IFS"; IFS=","
1160 for immodule in $included_immodules; do
1161 immodule_underscores=`echo $immodule | sed -e 's/-/_/g'`
1162 if echo "$all_immodules" | egrep "(^|,)$immodule(\$|,)" > /dev/null; then
1165 AC_MSG_ERROR([the specified input method $immodule does not exist])
1168 INCLUDED_IMMODULE_OBJ="$INCLUDED_IMMODULE_OBJ ../modules/input/libstatic-im-$immodule.la"
1169 INCLUDED_IMMODULE_DEFINE="$INCLUDED_IMMODULE_DEFINE -DINCLUDE_IM_$immodule_underscores"
1170 eval INCLUDE_$immodule_underscores=yes
1173 AC_SUBST(INCLUDED_IMMODULE_OBJ)
1174 AC_SUBST(INCLUDED_IMMODULE_DEFINE)
1176 AM_CONDITIONAL(INCLUDE_IM_AM_ET, [test x"$INCLUDE_am_et" = xyes])
1177 AM_CONDITIONAL(INCLUDE_IM_CEDILLA, [test x"$INCLUDE_cedilla" = xyes])
1178 AM_CONDITIONAL(INCLUDE_IM_CYRILLIC_TRANSLIT, [test x"$INCLUDE_cyrillic_translit" = xyes])
1179 AM_CONDITIONAL(INCLUDE_IM_IME, [test x"$INCLUDE_ime" = xyes])
1180 AM_CONDITIONAL(INCLUDE_IM_INUKTITUT, [test x"$INCLUDE_inuktitut" = xyes])
1181 AM_CONDITIONAL(INCLUDE_IM_IPA, [test x"$INCLUDE_ipa" = xyes])
1182 AM_CONDITIONAL(INCLUDE_IM_MULTIPRESS, [test x"$INCLUDE_multipress" = xyes])
1183 AM_CONDITIONAL(INCLUDE_IM_THAI, [test x"$INCLUDE_thai" = xyes])
1184 AM_CONDITIONAL(INCLUDE_IM_TI_ER, [test x"$INCLUDE_ti_er" = xyes])
1185 AM_CONDITIONAL(INCLUDE_IM_TI_ET, [test x"$INCLUDE_ti_et" = xyes])
1186 AM_CONDITIONAL(INCLUDE_IM_VIQR, [test x"$INCLUDE_viqr" = xyes])
1187 AM_CONDITIONAL(INCLUDE_IM_XIM, [test x"$INCLUDE_xim" = xyes])
1193 AM_CONDITIONAL(HAVE_TIFF, test "x$LIBTIFF" != x)
1194 AM_CONDITIONAL(HAVE_PNG, test "x$LIBPNG" != x)
1195 AM_CONDITIONAL(HAVE_JPEG, test "x$LIBJPEG" != x)
1196 AM_CONDITIONAL(HAVE_JASPER, test "x$LIBJASPER" != x)
1200 if echo "$included_loaders" | egrep '(^|,)tiff($|,)' > /dev/null; then
1201 STATIC_LIB_DEPS="$STATIC_LIB_DEPS $LIBTIFF"
1203 if echo "$included_loaders" | egrep '(^|,)jpeg($|,)' > /dev/null; then
1204 STATIC_LIB_DEPS="$STATIC_LIB_DEPS $LIBJPEG"
1206 if echo "$included_loaders" | egrep '(^|,)png($|,)' > /dev/null; then
1207 STATIC_LIB_DEPS="$STATIC_LIB_DEPS $LIBPNG"
1209 if echo "$included_loaders" | egrep '(^|,)jasper($|,)' > /dev/null; then
1210 STATIC_LIB_DEPS="$STATIC_LIB_DEPS $LIBJASPER"
1213 STATIC_LIB_DEPS="$LIBTIFF $LIBJPEG $LIBPNG $LIBJASPER"
1216 # Checks to see whether we should include mediaLib
1219 AC_CHECK_HEADER(sys/systeminfo.h,
1220 AC_DEFINE(HAVE_SYS_SYSTEMINFO_H, 1,
1221 [Define to 1 if sys/systeminfo.h is available]))
1222 AC_CHECK_HEADER(sys/sysinfo.h,
1223 AC_DEFINE(HAVE_SYS_SYSINFO_H, 1,
1224 [Define to 1 if sys/sysinfo.h is available]))
1226 AC_MSG_CHECKING(for mediaLib 2.3)
1228 # Check for a mediaLib 2.3 function since that is what the GTK+ mediaLib
1230 AC_CHECK_LIB(mlib, mlib_ImageSetStruct, use_mlib=yes, use_mlib=no)
1231 if test $use_mlib = yes; then
1232 AC_DEFINE(USE_MEDIALIB, 1,
1233 [Define to 1 if medialib is available and should be used])
1236 AC_MSG_CHECKING(for mediaLib 2.5)
1237 # Check for a mediaLib 2.5 function since that is what is needed for
1238 # gdk_rgb_convert integration.
1239 AC_CHECK_LIB(mlib, mlib_VideoColorRGBint_to_BGRAint, use_mlib25=yes, use_mlib25=no)
1240 if test $use_mlib25 = yes; then
1241 AC_DEFINE(USE_MEDIALIB25, 1,
1242 [Define to 1 if medialib 2.5 is available])
1245 AM_CONDITIONAL(USE_MEDIALIB, test $use_mlib = yes)
1246 AM_CONDITIONAL(USE_MEDIALIB25, test $use_mlib25 = yes)
1248 # Checks to see if we should compile in MMX support (there will be
1249 # a runtime test when the code is actually run to see if it should
1250 # be used - this just checks if we can compile it.)
1252 # This code is partially taken from Mesa
1254 AC_MSG_CHECKING(for x86 platform)
1256 i386|i486|i586|i686|i786|k6|k7)
1262 AC_MSG_RESULT($use_x86_asm)
1265 if test $use_x86_asm = yes; then
1269 AC_MSG_CHECKING(compiler support for MMX)
1270 cp $srcdir/gdk-pixbuf/pixops/scale_line_22_33_mmx.S conftest.S
1271 if AC_TRY_EVAL(ac_compile); then
1278 if test $use_mmx_asm = yes; then
1279 AC_DEFINE(USE_MMX, 1,
1280 [Define to 1 if XXM is available and should be used])
1287 AM_CONDITIONAL(USE_MMX, test x$use_mmx_asm = xyes)
1290 if test -z "$LIBPNG" && test x"$os_win32" = xno -o x$enable_gdiplus = xno; then
1294 dnl Look for a host system's gdk-pixbuf-csource if we are cross-compiling
1296 AM_CONDITIONAL(CROSS_COMPILING, test $cross_compiling = yes)
1298 if test $cross_compiling = yes; then
1299 AC_PATH_PROG(GDK_PIXBUF_CSOURCE, gdk-pixbuf-csource, no)
1300 AC_PATH_PROG(GTK_UPDATE_ICON_CACHE, gtk-update-icon-cache, no)
1301 if test x$GTK_UPDATE_ICON_CACHE = xno; then
1306 if test ! -f $srcdir/gtk/gtkbuiltincache.h &&
1307 test "x$REBUILD_PNGS" = "x#" ; then
1309 *** gtkbuiltincache.h is not in the tree, and cannot be built
1310 *** because you don't have libpng, or (when cross-compiling) you
1311 *** don't have a prebuilt gtk-update-icon-cache on the build system.])
1314 AC_SUBST(REBUILD_PNGS)
1316 GDK_PIXBUF_PACKAGES="gmodule-no-export-2.0 gobject-2.0 gio-2.0"
1317 GDK_PIXBUF_EXTRA_LIBS="$STATIC_LIB_DEPS $MATH_LIB $MEDIA_LIB"
1318 GDK_PIXBUF_EXTRA_CFLAGS=
1319 GDK_PIXBUF_DEP_LIBS="`$PKG_CONFIG --libs $GDK_PIXBUF_PACKAGES` $GDK_PIXBUF_EXTRA_LIBS"
1320 GDK_PIXBUF_DEP_CFLAGS="`$PKG_CONFIG --cflags gthread-2.0 $GDK_PIXBUF_PACKAGES $PNG_DEP_CFLAGS_PACKAGES` $GDK_PIXBUF_EXTRA_CFLAGS"
1322 ########################################
1323 # Windowing system checks
1324 ########################################
1326 GDK_PIXBUF_XLIB_PACKAGES=
1327 GDK_PIXBUF_XLIB_EXTRA_CFLAGS=
1328 GDK_PIXBUF_XLIB_EXTRA_LIBS=
1330 GDK_EXTRA_LIBS="$GDK_WLIBS"
1333 # GTK+ uses some X calls, so needs to link against X directly
1334 GTK_DEP_PACKAGES_FOR_X=
1337 if test "x$gdktarget" = "xx11"; then
1338 X_PACKAGES=fontconfig
1341 # We use fontconfig very peripherally when decoding the default
1344 if $PKG_CONFIG --exists fontconfig; then : ; else
1346 *** fontconfig (http://www.fontconfig.org) is required by the X11 backend.])
1350 # Check for basic X packages; we use pkg-config if available
1352 if $PKG_CONFIG --exists x11 xext xrender; then
1354 X_PACKAGES="$X_PACKAGES x11 xext xrender"
1355 x_libs="`$PKG_CONFIG --libs x11 xext xrender`"
1356 X_CFLAGS="`$PKG_CONFIG --cflags x11 xext xrender`"
1358 # Strip out any .la files that pkg-config might give us (this happens
1359 # with -uninstalled.pc files)
1361 for I in $x_libs ; do
1364 *) x_libs_for_checks="$x_libs_for_checks $I" ;;
1368 GDK_PIXBUF_XLIB_PACKAGES="x11"
1369 GTK_PACKAGES_FOR_X="x11"
1371 have_base_x_pc=false
1373 if test x$no_x = xyes ; then
1374 AC_MSG_ERROR([X development libraries not found])
1377 x_cflags="$X_CFLAGS"
1378 x_libs_for_checks="$X_LIBS -lXext -lXrender -lX11 $X_EXTRA_LIBS"
1380 GDK_PIXBUF_XLIB_EXTRA_CFLAGS="$x_cflags"
1381 GDK_PIXBUF_XLIB_EXTRA_LIBS="$X_LIBS -lX11 $X_EXTRA_LIBS"
1382 GTK_DEP_LIBS_FOR_X="$X_LIBS -lXrender -lX11 $X_EXTRA_LIBS"
1385 # Extra libraries found during checks (-lXinerama, etc), not from pkg-config.
1388 gtk_save_cppflags="$CPPFLAGS"
1389 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
1392 LIBS="$x_libs_for_checks $LIBS"
1394 # Sanity check for the X11 and Xext libraries. While everything we need from
1395 # Xext is optional, the chances a system has *none* of these things is so
1396 # small that we just unconditionally require it.
1397 AC_CHECK_FUNC(XOpenDisplay, :,
1398 AC_MSG_ERROR([*** libX11 not found. Check 'config.log' for more details.]))
1399 AC_CHECK_FUNC(XextFindDisplay, :,
1400 AC_MSG_ERROR([*** libXext not found. Check 'config.log' for more details.]))
1401 AC_CHECK_FUNC(XRenderQueryExtension, :,
1402 AC_MSG_ERROR([*** libXrender not found. Check 'config.log' for more details.]))
1406 AC_MSG_CHECKING([if <X11/extensions/XIproto.h> is needed for xReply])
1407 AC_TRY_COMPILE([#include <X11/Xlibint.h>],
1409 [AC_MSG_RESULT([no])],
1410 [AC_TRY_COMPILE([#include <X11/extensions/XIproto.h>
1411 #include <X11/Xlibint.h>],
1413 [AC_MSG_RESULT([yes])
1414 AC_DEFINE([NEED_XIPROTO_H_FOR_XREPLY], 1,
1415 [Define if <X11/extensions/XIproto.h> needed for xReply])],
1416 [AC_MSG_RESULT([unknown])
1417 AC_MSG_ERROR([xReply type unavailable. X11 is too old])])])
1419 # Check for XConvertCase, XInternAtoms (X11R6 specific)
1421 AC_CHECK_FUNCS(XConvertCase XInternAtoms)
1423 # Generic X11R6 check needed for XIM support; we could
1424 # probably use this to replace the above, but we'll
1425 # leave the separate checks for XConvertCase and XInternAtoms
1429 AC_CHECK_FUNC(XAddConnectionWatch,
1432 if $have_x11r6; then
1433 AC_DEFINE(HAVE_X11R6, 1, [Define if we have X11R6])
1435 AM_CONDITIONAL(HAVE_X11R6, $have_x11r6)
1437 # Check for XKB support.
1439 if test "x$enable_xkb" = "xyes"; then
1440 AC_MSG_WARN(XKB support explicitly enabled)
1441 AC_DEFINE(HAVE_XKB, 1, [Define to use XKB extension])
1442 elif test "x$enable_xkb" = "xmaybe"; then
1443 AC_CHECK_FUNC(XkbQueryExtension,
1444 AC_DEFINE(HAVE_XKB, 1, [Define to use XKB extension]))
1446 AC_MSG_WARN(XKB support explicitly disabled)
1449 # Check for shaped window extension
1451 AC_CHECK_FUNC(XShapeCombineMask, :,
1452 [AC_MSG_ERROR([Shape extension not found, check your development headers])])
1455 gtk_save_CFLAGS="$CFLAGS"
1456 CFLAGS="$CFLAGS $x_cflags"
1458 AC_CHECK_FUNC(XSyncQueryExtension,
1459 [AC_CHECK_HEADER(X11/extensions/sync.h,
1460 AC_DEFINE(HAVE_XSYNC, 1, [Have the SYNC extension library]),
1461 :, [#include <X11/Xlib.h>])])
1463 CFLAGS="$gtk_save_CFLAGS"
1467 if test "x$enable_shm" = "xyes"; then
1468 # Check for the XShm extension, normally in Xext
1469 AC_CHECK_FUNC(XShmAttach,
1471 # On AIX, it is in XextSam instead
1472 [AC_CHECK_LIB(XextSam, XShmAttach,
1473 [GTK_ADD_LIB(x_extra_libs,XextSam)])])
1476 if test "x$enable_shm" = "xyes"; then
1477 # Check for shared memory
1478 AC_CHECK_HEADER(sys/ipc.h,
1479 AC_DEFINE(HAVE_IPC_H, 1,
1480 [Define to 1 if ipc.h is available]),
1482 AC_CHECK_HEADER(sys/shm.h,
1483 AC_DEFINE(HAVE_SHM_H, 1,
1484 [Define to 1 if shm.h is available]),
1487 # Check for the X shared memory extension header file
1489 AC_MSG_CHECKING(X11/extensions/XShm.h)
1490 if test "x$no_xext_lib" = "xyes"; then
1493 gtk_save_CFLAGS="$CFLAGS"
1494 CFLAGS="$CFLAGS $x_cflags"
1497 #include <sys/types.h>
1498 #include <sys/ipc.h>
1499 #include <sys/shm.h>
1500 #include <X11/Xlib.h>
1501 #include <X11/Xutil.h>
1502 #include <X11/extensions/XShm.h>
1503 ], [XShmSegmentInfo *x_shm_info;], have_xshm=yes)
1504 CFLAGS="$gtk_save_CFLAGS"
1506 AC_MSG_RESULT($have_xshm)
1507 if test $have_xshm = yes ; then
1508 AC_DEFINE(HAVE_XSHM_H, 1,
1509 [Define to 1 if xshm.h is available])
1513 if test "x$enable_xinerama" = "xyes"; then
1514 # Check for Xinerama extension (Solaris impl or Xfree impl)
1515 gtk_save_cppflags="$CPPFLAGS"
1516 CPPFLAGS="$CPPFLAGS $x_cflags"
1519 AC_MSG_CHECKING(for Xinerama support on XFree86)
1521 have_xfree_xinerama=false
1522 if $PKG_CONFIG --exists xinerama ; then
1523 have_xfree_xinerama=true
1524 X_PACKAGES="$X_PACKAGES xinerama"
1526 AC_CHECK_LIB(Xinerama, XineramaQueryExtension,
1527 [AC_CHECK_HEADER(X11/extensions/Xinerama.h,
1528 [GTK_ADD_LIB(x_extra_libs,Xinerama)
1529 have_xfree_xinerama=true], :,
1530 [#include <X11/Xlib.h>])])
1533 if $have_xfree_xinerama ; then
1534 AC_DEFINE(HAVE_XFREE_XINERAMA, 1,
1535 [Define to 1 if XFree Xinerama is available])
1536 AC_DEFINE(HAVE_XINERAMA, 1,
1537 [Define to 1 is Xinerama is available])
1545 AC_MSG_CHECKING(for Xinerama support on Solaris)
1547 have_solaris_xinerama=false
1548 AC_CHECK_FUNC(XineramaGetInfo,
1549 [AC_CHECK_HEADER(X11/extensions/xinerama.h,
1550 [have_solaris_xinerama=true], :,
1551 [#include <X11/Xlib.h>])])
1553 if $have_solaris_xinerama ; then
1554 AC_DEFINE(HAVE_SOLARIS_XINERAMA, 1,
1555 [Define to 1 if solaris xinerama is available])
1556 AC_DEFINE(HAVE_XINERAMA, 1,
1557 [Define to 1 if xinerama is available])
1569 # set up things for XInput
1571 if test "x$with_xinput" = "xxfree" || test "x$with_xinput" = "xyes"; then
1572 AC_DEFINE(XINPUT_XFREE, 1,
1573 [Define to 1 if XFree XInput should be used])
1575 if $PKG_CONFIG --exists xi ; then
1576 X_PACKAGES="$X_PACKAGES xi"
1578 GTK_ADD_LIB(x_extra_libs, Xi)
1581 AC_DEFINE(XINPUT_NONE, 1,
1582 [Define to 1 if no XInput should be used])
1585 AM_CONDITIONAL(XINPUT_XFREE, test x$with_xinput = xxfree || test x$with_xinput = xyes)
1587 # Check for the RANDR extension
1588 if $PKG_CONFIG --exists "xrandr >= 1.2.99" ; then
1589 AC_DEFINE(HAVE_RANDR, 1, [Have the Xrandr extension library])
1591 X_PACKAGES="$X_PACKAGES xrandr"
1594 # Checks for Xcursor library
1596 if $PKG_CONFIG --exists xcursor ; then
1597 AC_DEFINE(HAVE_XCURSOR, 1, [Have the Xcursor library])
1599 X_PACKAGES="$X_PACKAGES xcursor"
1602 # Checks for XFixes extension
1604 if $PKG_CONFIG --exists xfixes ; then
1605 AC_DEFINE(HAVE_XFIXES, 1, [Have the XFIXES X extension])
1607 X_PACKAGES="$X_PACKAGES xfixes"
1608 GTK_PACKAGES_FOR_X="$GTK_PACKAGES_FOR_X xfixes"
1611 # Checks for Xcomposite extension
1613 if $PKG_CONFIG --exists xcomposite ; then
1614 AC_DEFINE(HAVE_XCOMPOSITE, 1, [Have the XCOMPOSITE X extension])
1616 X_PACKAGES="$X_PACKAGES xcomposite"
1617 GTK_PACKAGES_FOR_X="$GTK_PACKAGES_FOR_X xcomposite"
1620 # Checks for Xdamage extension
1622 if $PKG_CONFIG --exists xdamage ; then
1623 AC_DEFINE(HAVE_XDAMAGE, 1, [Have the XDAMAGE X extension])
1625 X_PACKAGES="$X_PACKAGES xdamage"
1626 GTK_PACKAGES_FOR_X="$GTK_PACKAGES_FOR_X xdamage"
1629 if $have_base_x_pc ; then
1630 GDK_EXTRA_LIBS="$x_extra_libs"
1632 GDK_EXTRA_LIBS="$X_LIBS $x_extra_libs -lXext -lX11 $GDK_EXTRA_LIBS"
1635 CPPFLAGS="$gtk_save_cppflags"
1636 LIBS="$gtk_save_libs"
1638 AM_CONDITIONAL(USE_X11, true)
1642 AM_CONDITIONAL(XINPUT_XFREE, false)
1643 AM_CONDITIONAL(USE_X11, false)
1644 AM_CONDITIONAL(HAVE_X11R6, false)
1647 if test "x$gdktarget" = "xwin32"; then
1648 GDK_EXTRA_LIBS="$GDK_EXTRA_LIBS -lgdi32 -limm32 -lshell32 -lole32 -Wl,-luuid"
1649 AM_CONDITIONAL(USE_WIN32, true)
1651 AM_CONDITIONAL(USE_WIN32, false)
1654 if test "x$gdktarget" = "xquartz"; then
1655 GDK_EXTRA_LIBS="$GDK_EXTRA_LIBS -framework Cocoa"
1656 AM_CONDITIONAL(USE_QUARTZ, true)
1658 AM_CONDITIONAL(USE_QUARTZ, false)
1661 GDK_PIXBUF_XLIB_DEP_LIBS="`$PKG_CONFIG --libs $GDK_PIXBUF_PACKAGES $GDK_PIXBUF_XLIB_PACKAGES` $GDK_PIXBUF_XLIB_EXTRA_LIBS $GDK_PIXBUF_EXTRA_LIBS"
1662 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"
1664 AC_SUBST(GDK_PIXBUF_XLIB_PACKAGES)
1665 AC_SUBST(GDK_PIXBUF_XLIB_EXTRA_LIBS)
1666 AC_SUBST(GDK_PIXBUF_XLIB_EXTRA_CFLAGS)
1667 AC_SUBST(GDK_PIXBUF_XLIB_DEP_LIBS)
1668 AC_SUBST(GDK_PIXBUF_XLIB_DEP_CFLAGS)
1670 if test "x$gdktarget" = "xdirectfb"; then
1671 DIRECTFB_REQUIRED_VERSION=1.0.0
1672 AC_MSG_CHECKING(for DirectFB)
1674 PKG_CHECK_MODULES(DIRECTFB, [directfb >= $DIRECTFB_REQUIRED_VERSION])
1675 AM_CONDITIONAL(USE_DIRECTFB, true)
1677 AM_CONDITIONAL(USE_DIRECTFB, false)
1681 # Check for Pango flags
1683 if test "x$gdktarget" = "xwin32"; then
1684 PANGO_PACKAGES="pangowin32 pangocairo"
1686 PANGO_PACKAGES="pango pangocairo"
1689 AC_MSG_CHECKING(Pango flags)
1690 if $PKG_CONFIG --exists $PANGO_PACKAGES ; then
1691 PANGO_CFLAGS=`$PKG_CONFIG --cflags $PANGO_PACKAGES`
1692 PANGO_LIBS=`$PKG_CONFIG --libs $PANGO_PACKAGES`
1694 AC_MSG_RESULT($PANGO_CFLAGS $PANGO_LIBS)
1697 *** Pango not found. Pango built with Cairo support is required
1698 *** to build GTK+. See http://www.pango.org for Pango information.
1702 CFLAGS="$CFLAGS $PANGO_CFLAGS"
1704 if $PKG_CONFIG --uninstalled $PANGO_PACKAGES; then
1707 gtk_save_LIBS="$LIBS"
1708 LIBS="$PANGO_LIBS $LIBS"
1709 AC_TRY_LINK_FUNC(pango_context_new, :, AC_MSG_ERROR([
1710 *** Can't link to Pango. Pango is required to build
1711 *** GTK+. For more information see http://www.pango.org]))
1712 LIBS="$gtk_save_LIBS"
1715 CFLAGS="$saved_cflags"
1716 LDFLAGS="$saved_ldflags"
1718 GDK_PACKAGES="$PANGO_PACKAGES gio-2.0 $X_PACKAGES cairo-$cairo_backend"
1719 GDK_DEP_LIBS="$GDK_EXTRA_LIBS `$PKG_CONFIG --libs $GDK_PIXBUF_PACKAGES $GDK_PACKAGES` $GDK_PIXBUF_EXTRA_LIBS"
1720 GDK_DEP_CFLAGS="`$PKG_CONFIG --cflags gthread-2.0 $GDK_PIXBUF_PACKAGES $GDK_PACKAGES` $GDK_PIXBUF_EXTRA_CFLAGS $GDK_EXTRA_CFLAGS"
1722 # If we aren't writing explicit dependencies, then don't put the extra libraries we need
1723 # into the pkg-config files
1725 if test $enable_explicit_deps != yes ; then
1726 GDK_PACKAGES="$PANGO_PACKAGES"
1730 AC_SUBST(GDK_PACKAGES)
1731 AC_SUBST(GDK_EXTRA_LIBS)
1732 AC_SUBST(GDK_EXTRA_CFLAGS)
1733 AC_SUBST(GDK_DEP_LIBS)
1734 AC_SUBST(GDK_DEP_CFLAGS)
1737 ########################################
1738 # Check for Accessibility Toolkit flags
1739 ########################################
1742 AC_MSG_CHECKING(ATK flags)
1743 if $PKG_CONFIG --exists $ATK_PACKAGES ; then
1744 ATK_CFLAGS=`$PKG_CONFIG --cflags $ATK_PACKAGES`
1745 ATK_LIBS=`$PKG_CONFIG --libs $ATK_PACKAGES`
1747 AC_MSG_RESULT($ATK_CFLAGS $ATK_LIBS)
1750 *** Accessibility Toolkit not found. Accessibility Toolkit is required
1755 if $PKG_CONFIG --uninstalled $ATK_PACKAGES; then
1758 gtk_save_LIBS="$LIBS"
1759 LIBS="$ATK_LIBS $LIBS"
1760 AC_TRY_LINK_FUNC(atk_object_get_type, : , AC_MSG_ERROR([
1761 *** Cannot link to Accessibility Toolkit. Accessibility Toolkit is required
1762 *** to build GTK+]))
1763 LIBS="$gtk_save_LIBS"
1766 GTK_PACKAGES="atk cairo gio-2.0"
1767 if test "x$gdktarget" = "xx11"; then
1768 GTK_PACKAGES="$GTK_PACKAGES pangoft2"
1772 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"
1773 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"
1775 if test x"$os_win32" = xyes; then
1776 GTK_EXTRA_CFLAGS="$msnative_struct"
1779 GLIB_PREFIX="`$PKG_CONFIG --variable=prefix glib-2.0`"
1780 ATK_PREFIX="`$PKG_CONFIG --variable=prefix atk`"
1781 PANGO_PREFIX="`$PKG_CONFIG --variable=prefix pango`"
1782 CAIRO_PREFIX="`pkg-config --variable=prefix cairo`"
1784 if test $enable_explicit_deps != yes ; then
1785 GDK_PIXBUF_EXTRA_LIBS=
1788 AC_SUBST(GDK_PIXBUF_PACKAGES)
1789 AC_SUBST(GDK_PIXBUF_EXTRA_LIBS)
1790 AC_SUBST(GDK_PIXBUF_EXTRA_CFLAGS)
1791 AC_SUBST(GDK_PIXBUF_DEP_LIBS)
1792 AC_SUBST(GDK_PIXBUF_DEP_CFLAGS)
1794 AC_SUBST(GTK_PACKAGES)
1795 AC_SUBST(GTK_EXTRA_LIBS)
1796 AC_SUBST(GTK_EXTRA_CFLAGS)
1797 AC_SUBST(GTK_DEP_LIBS)
1798 AC_SUBST(GTK_DEP_CFLAGS)
1800 AC_SUBST(GLIB_PREFIX)
1801 AC_SUBST(ATK_PREFIX)
1802 AC_SUBST(PANGO_PREFIX)
1803 AC_SUBST(CAIRO_PREFIX)
1805 AC_SUBST(GTK_DEBUG_FLAGS)
1806 AC_SUBST(GTK_XIM_FLAGS)
1808 ########################
1809 # Checks needed for gail
1810 ########################
1813 dnl Checks for inet libraries:
1814 AC_SEARCH_LIBS(gethostent, nsl)
1815 AC_SEARCH_LIBS(setsockopt, socket)
1816 AC_SEARCH_LIBS(connect, inet)
1818 dnl check for the sockaddr_un.sun_len member
1819 AC_CHECK_MEMBER([struct sockaddr_un.sun_len],
1820 [struct_sockaddr_un_sun_len=true],
1821 [struct_sockaddr_un_suin_len=false],
1822 [#include <sys/types.h>
1823 #include <sys/un.h>]
1825 case $struct_sockaddr_un_sun_len in
1827 AC_DEFINE_UNQUOTED(HAVE_SOCKADDR_UN_SUN_LEN, 1,
1828 [Have the sockaddr_un.sun_len member])
1834 GAIL_INET_LIBS="$LIBS"
1835 AC_SUBST([GAIL_INET_LIBS])
1839 ################################################################
1840 # Printing system checks
1841 ################################################################
1844 [AC_HELP_STRING([--disable-cups]
1845 [disable cups print backend])],,
1848 if test "x$enable_cups" = "xno"; then
1849 AM_CONDITIONAL(HAVE_CUPS, false)
1851 AC_PATH_PROG(CUPS_CONFIG, cups-config, no)
1852 if test "x$CUPS_CONFIG" = "xno"; then
1853 if test "x$enable_cups" = "xauto"; then
1854 AM_CONDITIONAL(HAVE_CUPS, false)
1861 CUPS_CFLAGS=`$CUPS_CONFIG --cflags | sed 's/-O[0-9]*//' | sed 's/-m[^\t]*//g'`
1862 CUPS_LIBS=`$CUPS_CONFIG --libs`
1864 CUPS_API_VERSION=`$CUPS_CONFIG --api-version`
1865 CUPS_API_MAJOR=`echo $ECHO_N $CUPS_API_VERSION | awk -F. '{print $1}'`
1866 CUPS_API_MINOR=`echo $ECHO_N $CUPS_API_VERSION | awk -F. '{print $2}'`
1868 if test $CUPS_API_MAJOR -gt 1 -o \
1869 $CUPS_API_MAJOR -eq 1 -a $CUPS_API_MINOR -ge 2; then
1870 AC_DEFINE(HAVE_CUPS_API_1_2, 1,
1871 [Define to 1 if CUPS 1.2 API is available])
1874 AC_SUBST(CUPS_API_MAJOR)
1875 AC_SUBST(CUPS_API_MINOR)
1876 AC_SUBST(CUPS_CFLAGS)
1879 AC_CHECK_HEADER(cups/cups.h,,AC_MSG_ERROR([[*** Sorry, cups-config present but cups/cups.h missing.]]))
1881 AM_CONDITIONAL(HAVE_CUPS, true)
1883 gtk_save_cflags="$CFLAGS"
1884 CFLAGS="$CUPS_CFLAGS"
1885 AC_TRY_COMPILE([#include <cups/http.h>],
1886 [http_t http; char *s = http.authstring;],
1887 [AC_DEFINE(HAVE_HTTP_AUTHSTRING, [],
1888 [Define if cups http_t authstring field is accessible])],)
1889 CFLAGS="$gtk_save_cflags"
1891 AC_SUBST(HAVE_HTTP_AUTHSTRING)
1893 gtk_save_libs="$LIBS"
1895 AC_CHECK_FUNCS(httpGetAuthString)
1896 LIBS="$gtk_save_libs"
1900 # Checks to see if we should compile with PAPI backend for GTK+
1904 [AC_HELP_STRING([--disable-papi]
1905 [disable papi print backend])],,
1908 if test "x$enable_papi" = "xno"; then
1909 AM_CONDITIONAL(HAVE_PAPI, false)
1911 AC_MSG_CHECKING(libpapi)
1912 AC_CHECK_LIB(papi, papiServiceCreate, have_papi=yes, have_papi=no)
1913 if test $have_papi = yes; then
1914 AC_DEFINE([HAVE_PAPI], [], [Define to 1 if libpapi available])
1916 AM_CONDITIONAL(HAVE_PAPI, test $have_papi = yes)
1917 if test "x$enable_papi" = "xyes" -a "x$have_papi" = "xno"; then
1924 AM_CONDITIONAL(HAVE_PAPI_CUPS, test "x$have_papi" = "xyes" -a "x$CUPS_CONFIG" != "xno")
1926 gtk_save_cppflags="$CPPFLAGS"
1927 CPPFLAGS="$CPPFLAGS $GTK_DEP_CFLAGS $GDK_DEP_CFLAGS"
1929 AC_CHECK_HEADER(cairo-pdf.h,,AC_MSG_ERROR([
1930 *** Can't find cairo-pdf.h. You must build Cairo with the pdf
1931 *** backend enabled.]))
1933 if test "$os_win32" != "yes"; then
1934 AC_CHECK_HEADER(cairo-ps.h,,AC_MSG_ERROR([
1935 *** Can't find cairo-ps.h. You must build Cairo with the
1936 *** postscript backend enabled.]))
1938 AC_CHECK_HEADER(cairo-svg.h,,AC_MSG_ERROR([
1939 *** Can't find cairo-svg.h. You must build Cairo with the
1940 *** svg backend enabled.]))
1943 CPPFLAGS="$gtk_save_cppflags"
1946 AC_ARG_ENABLE(test-print-backend,
1947 [AC_HELP_STRING([--enable-test-print-backend],
1948 [build test print backend])],,
1949 [enable_test_print_backend=no])
1950 AM_CONDITIONAL(TEST_PRINT_BACKEND, test "x$enable_test_print_backend" != "xno")
1953 ################################################################
1954 # Strip -export-dynamic from the link lines of various libraries
1955 ################################################################
1958 # pkg-config --libs gmodule includes the "export_dynamic" flag,
1959 # but this flag is only meaningful for executables. For libraries
1960 # the effect is undefined; what it causes on Linux is that the
1961 # export list from -export-symbols-regex is ignored and everything
1964 # We are using gmodule-no-export now, but I'm leaving the stripping
1965 # code in place for now, since pango and atk still require gmodule.
1967 export_dynamic=`(./libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh`
1968 if test -n "$export_dynamic"; then
1969 GDK_PIXBUF_DEP_LIBS=`echo $GDK_PIXBUF_DEP_LIBS | sed -e "s/$export_dynamic//"`
1970 GDK_PIXBUF_XLIB_DEP_LIBS=`echo $GDK_PIXBUF_XLIB_DEP_LIBS | sed -e "s/$export_dynamic//"`
1971 GDK_DEP_LIBS=`echo $GDK_DEP_LIBS | sed -e "s/$export_dynamic//"`
1972 GTK_DEP_LIBS=`echo $GTK_DEP_LIBS | sed -e "s/$export_dynamic//"`
1975 ##################################################
1976 # GObject introspection
1977 ##################################################
1979 GOBJECT_INTROSPECTION_CHECK([0.6.4])
1981 ##################################################
1982 # Checks for gtk-doc and docbook-tools
1983 ##################################################
1985 GTK_DOC_CHECK([1.11])
1987 AC_CHECK_PROG(DB2HTML, db2html, true, false)
1988 AM_CONDITIONAL(HAVE_DOCBOOK, $DB2HTML)
1991 [AC_HELP_STRING([--enable-man],
1992 [regenerate man pages from Docbook [default=no]])],enable_man=yes,
1995 if test "${enable_man}" != no; then
1997 dnl Check for xsltproc
1999 AC_PATH_PROG([XSLTPROC], [xsltproc])
2000 if test -z "$XSLTPROC"; then
2004 dnl check for DocBook DTD and stylesheets in the local catalog.
2005 JH_CHECK_XML_CATALOG([-//OASIS//DTD DocBook XML V4.1.2//EN],
2006 [DocBook XML DTD V4.1.2],,enable_man=no)
2007 JH_CHECK_XML_CATALOG([http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl],
2008 [DocBook XSL Stylesheets],,enable_man=no)
2011 AM_CONDITIONAL(ENABLE_MAN, test x$enable_man != xno)
2014 ##################################################
2016 ##################################################
2018 AC_CONFIG_COMMANDS([gdk/gdkconfig.h], [
2019 outfile=gdkconfig.h-tmp
2020 cat > $outfile <<\_______EOF
2023 * This is a generated file. Please modify `configure.in'
2031 #endif /* __cplusplus */
2034 /* introduce GSEAL() here for all of Gdk and Gtk+ without the need to modify GLib */
2035 # ifdef GSEAL_ENABLE
2036 # define GSEAL(ident) _g_sealed__ ## ident
2038 # define GSEAL(ident) ident
2044 cat >>$outfile <<_______EOF
2049 cat >>$outfile <<_______EOF
2053 #endif /* __cplusplus */
2055 #endif /* GDKCONFIG_H */
2059 if cmp -s $outfile gdk/gdkconfig.h; then
2060 AC_MSG_NOTICE([gdk/gdkconfig.h is unchanged])
2063 mv $outfile gdk/gdkconfig.h
2066 if test "x$gdktarget" = "xx11" ; then
2068 #define GDK_WINDOWING_X11'
2069 elif test "x$gdktarget" = "xwin32" ; then
2071 #define GDK_NATIVE_WINDOW_POINTER
2073 #define GDK_WINDOWING_WIN32'
2074 elif test "x$gdktarget" = "xquartz" ; then
2076 #define GDK_WINDOWING_QUARTZ'
2077 elif test "x$gdktarget" = "xdirectfb" ; then
2079 #define GDK_WINDOWING_DIRECTFB'
2082 if test x$gdk_wchar_h = xyes; then
2084 #define GDK_HAVE_WCHAR_H 1'
2086 if test x$gdk_wctype_h = xyes; then
2088 #define GDK_HAVE_WCTYPE_H 1"
2090 if test x$gdk_working_wctype = xno; then
2092 #define GDK_HAVE_BROKEN_WCTYPE 1"
2105 gtk+-unix-print-2.0.pc
2107 gdk-pixbuf-2.0-uninstalled.pc
2108 gdk-2.0-uninstalled.pc
2109 gtk+-2.0-uninstalled.pc
2113 po-properties/Makefile.in
2115 demos/gtk-demo/Makefile
2116 demos/gtk-demo/geninclude.pl
2119 docs/reference/Makefile
2120 docs/reference/gdk-pixbuf/Makefile
2121 docs/reference/gdk-pixbuf/version.xml
2122 docs/reference/gdk/Makefile
2123 docs/reference/gdk/version.xml
2124 docs/reference/gtk/Makefile
2125 docs/reference/gtk/version.xml
2126 docs/reference/libgail-util/Makefile
2129 docs/tutorial/Makefile
2131 gdk-pixbuf/gdk_pixbuf.rc
2132 gdk-pixbuf/gdk-pixbuf-features.h
2133 gdk-pixbuf/pixops/Makefile
2137 gdk/win32/rc/Makefile
2140 gdk/directfb/Makefile
2146 gtk/theme-bits/Makefile
2149 modules/other/Makefile
2150 modules/other/gail/Makefile
2151 modules/other/gail/libgail-util/Makefile
2152 modules/other/gail/tests/Makefile
2153 modules/engines/Makefile
2154 modules/engines/pixbuf/Makefile
2155 modules/engines/ms-windows/Makefile
2156 modules/engines/ms-windows/Theme/Makefile
2157 modules/engines/ms-windows/Theme/gtk-2.0/Makefile
2158 modules/input/Makefile
2159 modules/printbackends/Makefile
2160 modules/printbackends/cups/Makefile
2161 modules/printbackends/lpr/Makefile
2162 modules/printbackends/file/Makefile
2163 modules/printbackends/papi/Makefile
2164 modules/printbackends/test/Makefile
2167 contrib/gdk-pixbuf-xlib/Makefile
2168 contrib/gdk-pixbuf-xlib/gdk-pixbuf-xlib-2.0.pc
2173 echo "configuration: