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], [16])
15 m4_define([gtk_micro_version], [1])
16 m4_define([gtk_interface_age], [1])
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.19.7])
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.])
187 dnl when using libtool 2.x create libtool early, because it's used in configure
188 m4_ifdef([LT_OUTPUT], [LT_OUTPUT])
191 # Make sure we use 64-bit versions of various file stuff.
195 AC_PATH_PROG(NM, nm, nm)
197 dnl Initialize maintainer mode
200 AC_MSG_CHECKING([for some Win32 platform])
202 *-*-mingw*|*-*-cygwin*)
209 AC_MSG_RESULT([$platform_win32])
210 AM_CONDITIONAL(PLATFORM_WIN32, test "$platform_win32" = "yes")
212 AM_CONDITIONAL(OS_WIN32, test "$os_win32" = "yes")
213 AM_CONDITIONAL(OS_UNIX, test "$os_win32" != "yes")
214 AM_CONDITIONAL(OS_LINUX, test "$os_linux" = "yes")
216 if test "$os_win32" = "yes"; then
217 AC_CHECK_TOOL(WINDRES, windres, no)
218 if test "$WINDRES" = no; then
219 AC_MSG_ERROR([*** Could not find an implementation of windres in your PATH.])
221 AC_CHECK_PROG(ms_librarian, lib.exe, yes, no)
223 AM_CONDITIONAL(MS_LIB_AVAILABLE, test x$ms_librarian = xyes)
225 m4_define([debug_default],
226 m4_if(m4_eval(gtk_minor_version % 2), [1], [yes], [minimum]))
228 dnl declare --enable-* args and collect ac_help strings
230 AC_HELP_STRING([--enable-debug=@<:@no/minimum/yes@:>@],
231 [turn on debugging @<:@default=debug_default@:>@]),,
232 enable_debug=debug_default)
234 [AC_HELP_STRING([--enable-shm],
235 [support shared memory if available [default=yes]])],,
238 [AC_HELP_STRING([--enable-xkb],
239 [support XKB [default=maybe]])],,
240 [enable_xkb="maybe"])
241 AC_ARG_ENABLE(xinerama,
242 [AC_HELP_STRING([--enable-xinerama],
243 [support xinerama extension if available [default=yes]])],,
244 [enable_xinerama="yes"])
245 AC_ARG_ENABLE(rebuilds,
246 [AC_HELP_STRING([--disable-rebuilds],
247 [disable all source autogeneration rules])],,
248 [enable_rebuilds=yes])
249 AC_ARG_ENABLE(visibility,
250 [AC_HELP_STRING([--disable-visibility],
251 [don't use ELF visibility attributes])],,
252 [enable_visibility=yes])
255 [AC_HELP_STRING([--with-xinput=@<:@no/yes@:>@], [support XInput])])
257 if test "$platform_win32" = yes; then
263 AC_ARG_WITH(gdktarget, [ --with-gdktarget=[[x11/win32/quartz/directfb]] select non-default GDK target],
264 gdktarget=$with_gdktarget)
268 x11|win32|quartz|directfb) ;;
269 *) AC_MSG_ERROR([Invalid target for GDK: use x11, quartz, directfb or win32.]);;
272 gdktargetlib=libgdk-$gdktarget-$GTK_API_VERSION.la
273 gtktargetlib=libgtk-$gdktarget-$GTK_API_VERSION.la
275 AC_SUBST(gdktargetlib)
276 AC_SUBST(gtktargetlib)
278 if test "x$enable_debug" = "xyes"; then
279 test "$cflags_set" = set || CFLAGS="$CFLAGS -g"
280 GTK_DEBUG_FLAGS="-DG_ENABLE_DEBUG -DG_ERRORCHECK_MUTEXES"
282 if test "x$enable_debug" = "xno"; then
283 GTK_DEBUG_FLAGS="-DG_DISABLE_ASSERT -DG_DISABLE_CHECKS -DG_DISABLE_CAST_CHECKS"
285 GTK_DEBUG_FLAGS="-DG_DISABLE_CAST_CHECKS"
290 if test "x$enable_visibility" = "xno"; then
291 GTK_DEBUG_FLAGS="$GTK_DEBUG_FLAGS -DDISABLE_VISIBILITY"
295 AC_DEFINE_UNQUOTED(GTK_COMPILED_WITH_DEBUGGING, "${enable_debug}",
296 [Define if debugging is enabled])
299 # Build time sanity check...
302 # Checks for programs.
309 if test "x$GCC" = "xyes"; then
311 *[\ \ ]-Wall[\ \ ]*) ;;
312 *) CFLAGS="$CFLAGS -Wall" ;;
315 if test "x$enable_ansi" = "xyes"; then
317 *[\ \ ]-ansi[\ \ ]*) ;;
318 *) CFLAGS="$CFLAGS -ansi" ;;
322 *[\ \ ]-pedantic[\ \ ]*) ;;
323 *) CFLAGS="$CFLAGS -pedantic" ;;
329 CPPFLAGS="$CPPFLAGS -DG_DISABLE_SINGLE_INCLUDES -DATK_DISABLE_SINGLE_INCLUDES -DGDK_PIXBUF_DISABLE_SINGLE_INCLUDES -DGTK_DISABLE_SINGLE_INCLUDES"
331 # Ensure MSVC-compatible struct packing convention is used when
332 # compiling for Win32 with gcc.
333 # What flag to depends on gcc version: gcc3 uses "-mms-bitfields", while
334 # gcc2 uses "-fnative-struct".
335 if test x"$os_win32" = xyes; then
336 if test x"$GCC" = xyes; then
338 AC_MSG_CHECKING([how to get MSVC-compatible struct packing])
339 if test -z "$ac_cv_prog_CC"; then
342 our_gcc="$ac_cv_prog_CC"
344 case `$our_gcc --version | sed -e 's,\..*,.,' -e q` in
346 if $our_gcc -v --help 2>/dev/null | grep fnative-struct >/dev/null; then
347 msnative_struct='-fnative-struct'
351 if $our_gcc -v --help 2>/dev/null | grep ms-bitfields >/dev/null; then
352 msnative_struct='-mms-bitfields'
356 if test x"$msnative_struct" = x ; then
357 AC_MSG_RESULT([no way])
358 AC_MSG_WARN([produced libraries might be incompatible with MSVC-compiled code])
360 CFLAGS="$CFLAGS $msnative_struct"
361 AC_MSG_RESULT([${msnative_struct}])
366 # Honor aclocal flags
367 ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
369 ## Initial sanity check, done here so that users get told they
370 ## have the wrong dependencies as early in the process as possible.
371 ## Later on we actually use the cflags/libs from separate pkg-config
372 ## calls. Oh, also the later pkg-config calls don't include
373 ## the version requirements since those make the module lists
374 ## annoying to construct
375 PKG_CHECK_MODULES(BASE_DEPENDENCIES,
376 [glib-2.0 >= glib_required_version dnl
377 atk >= atk_required_version dnl
378 pango >= pango_required_version dnl
379 cairo >= cairo_required_version])
381 if test "$os_win32" != yes; then
382 # libtool option to control which symbols are exported
383 # right now, symbols starting with _ are not exported
384 LIBTOOL_EXPORT_OPTIONS='-export-symbols-regex "^[[^_]].*"'
386 # We currently use .def files on Windows (for gdk-pixbuf, gdk and gtk)
387 LIBTOOL_EXPORT_OPTIONS=
389 AC_SUBST(LIBTOOL_EXPORT_OPTIONS)
391 dnl ******************************************************
392 dnl * See whether to include shared library dependencies *
393 dnl ******************************************************
395 AC_ARG_ENABLE(explicit-deps,
396 [AC_HELP_STRING([--enable-explicit-deps=@<:@yes/no/auto@:>@],
397 [use explicit dependencies in .pc files [default=auto]])],,
398 [enable_explicit_deps=auto])
400 AC_MSG_CHECKING([Whether to write dependencies into .pc files])
401 case $enable_explicit_deps in
404 deplibs_check_method=`(./libtool --config; echo 'eval echo \"$deplibs_check_method\"') | sh`
405 if test "x$deplibs_check_method" '!=' xpass_all || test "x$enable_static" = xyes ; then
406 enable_explicit_deps=yes
408 enable_explicit_deps=no
413 *) AC_MSG_ERROR([Value given to --enable-explicit-deps must be one of yes, no or auto])
416 AC_MSG_RESULT($enable_explicit_deps)
418 AM_CONDITIONAL(DISABLE_EXPLICIT_DEPS, test $enable_explicit_deps = no)
420 # define a MAINT-like variable REBUILD which is set if Perl
421 # and awk are found, so autogenerated sources can be rebuilt
423 AC_PATH_PROGS(PERL, perl5 perl)
425 # We would like indent, but don't require it.
426 AC_CHECK_PROG(INDENT, indent, indent)
429 if test "x$enable_rebuilds" = "xyes" && \
431 $PERL -e 'exit !($] >= 5.002)' > /dev/null 2>&1 ; then
436 AC_CHECK_FUNCS(lstat mkstemp flockfile getc_unlocked)
437 AC_CHECK_FUNCS(localtime_r)
439 # _NL_TIME_FIRST_WEEKDAY is an enum and not a define
440 AC_MSG_CHECKING([for _NL_TIME_FIRST_WEEKDAY])
441 AC_TRY_LINK([#include <langinfo.h>], [
443 c = *((unsigned char *) nl_langinfo(_NL_TIME_FIRST_WEEKDAY));
444 ], gtk_ok=yes, gtk_ok=no)
445 AC_MSG_RESULT($gtk_ok)
446 if test "$gtk_ok" = "yes"; then
447 AC_DEFINE([HAVE__NL_TIME_FIRST_WEEKDAY], [1],
448 [Define if _NL_TIME_FIRST_WEEKDAY is available])
451 # _NL_MEASUREMENT_MEASUREMENT is an enum and not a define
452 AC_MSG_CHECKING([for _NL_MEASUREMENT_MEASUREMENT])
453 AC_TRY_LINK([#include <langinfo.h>], [
455 c = *((unsigned char *) nl_langinfo(_NL_MEASUREMENT_MEASUREMENT));
456 ], gtk_ok=yes, gtk_ok=no)
457 AC_MSG_RESULT($gtk_ok)
458 if test "$gtk_ok" = "yes"; then
459 AC_DEFINE([HAVE__NL_MEASUREMENT_MEASUREMENT], [1],
460 [Define if _NL_MEASUREMENT_MEASUREMENT is available])
463 # _NL_PAPER_HEIGHT is an enum and not a define
464 AC_MSG_CHECKING([for _NL_PAPER_HEIGHT])
465 AC_TRY_LINK([#include <langinfo.h>], [
467 c = *((unsigned char *) nl_langinfo(_NL_PAPER_HEIGHT));
468 ], gtk_ok=yes, gtk_ok=no)
469 AC_MSG_RESULT($gtk_ok)
470 if test "$gtk_ok" = "yes"; then
471 AC_DEFINE([HAVE__NL_PAPER_HEIGHT], [1],
472 [Define if _NL_PAPER_HEIGHT is available])
475 # _NL_PAPER_WIDTH is an enum and not a define
476 AC_MSG_CHECKING([for _NL_PAPER_WIDTH])
477 AC_TRY_LINK([#include <langinfo.h>], [
479 c = *((unsigned char *) nl_langinfo(_NL_PAPER_WIDTH));
480 ], gtk_ok=yes, gtk_ok=no)
481 AC_MSG_RESULT($gtk_ok)
482 if test "$gtk_ok" = "yes"; then
483 AC_DEFINE([HAVE__NL_PAPER_WIDTH], [1],
484 [Define if _NL_PAPER_WIDTH is available])
487 # sigsetjmp is a macro on some platforms, so AC_CHECK_FUNCS is not reliable
488 AC_MSG_CHECKING(for sigsetjmp)
489 AC_TRY_LINK([#include <setjmp.h>], [
492 ], gtk_ok=yes, gtk_ok=no)
493 AC_MSG_RESULT($gtk_ok)
494 if test "$gtk_ok" = "yes"; then
495 AC_DEFINE(HAVE_SIGSETJMP, 1,
496 [Define to 1 if sigsetjmp is available])
500 ALL_LINGUAS="`grep -v '^#' "$srcdir/po/LINGUAS" | tr '\n' ' '`"
502 LIBS="$LIBS $INTLLIBS"
503 AC_OUTPUT_COMMANDS([case "$CONFIG_FILES" in *po-properties/Makefile.in*)
504 sed -e "/POTFILES =/r po-properties/POTFILES" po-properties/Makefile.in > po-properties/Makefile
507 dnl Snippet below is copied from AM_GLIB_GNU_GETTEXT to generate a first
508 dnl po-properties/POTFILES during configure; see GNOME #573515.
510 dnl Generate list of files to be processed by xgettext which will
511 dnl be included in po-properties/Makefile.
512 test -d po-properties || mkdir po-properties
513 if test "x$srcdir" != "x."; then
514 if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
515 popropsrcprefix="$srcdir/"
517 popropsrcprefix="../$srcdir/"
520 popropsrcprefix="../"
522 rm -f po-properties/POTFILES
523 sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $popropsrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
524 < $srcdir/po-properties/POTFILES.in > po-properties/POTFILES
525 dnl (End of adapted AM_GLIB_GNU_GETTEXT snippet.)
527 AM_GLIB_DEFINE_LOCALEDIR(GTK_LOCALEDIR)
529 dnl The DU4 header files don't provide library prototypes unless
530 dnl -std1 is given to the native cc.
531 AC_MSG_CHECKING([for extra flags to get ANSI library prototypes])
535 AC_TRY_RUN([#include <math.h>
536 int main (void) { return (log(1) != log(1.)); }],
537 AC_MSG_RESULT(none needed),
538 gtk_save_CFLAGS="$CFLAGS"
539 CFLAGS="$CFLAGS -std1"
540 AC_TRY_RUN([#include <math.h>
541 int main (void) { return (log(1) != log(1.)); }],
542 AC_MSG_RESULT(-std1),
544 CFLAGS="$gtk_save_CFLAGS"
546 [No ANSI prototypes found in library. (-std1 didn't work.)]),
549 AC_MSG_RESULT(none needed)
553 AC_MSG_CHECKING(for the BeOS)
567 AC_MSG_CHECKING(for HP-UX)
569 hpux9* | hpux10* | hpux11*)
571 CFLAGS="$CFLAGS -DHPPEX -DSHMLINK"
578 dnl NeXTStep cc seems to need this
579 AC_MSG_CHECKING([for extra flags for POSIX compliance])
580 AC_TRY_COMPILE([#include <dirent.h>], [DIR *dir;],
581 AC_MSG_RESULT(none needed),
582 gtk_save_CFLAGS="$CFLAGS"
583 CFLAGS="$CFLAGS -posix"
584 AC_TRY_COMPILE([#include <dirent.h>], [DIR *dir;],
585 AC_MSG_RESULT(-posix),
587 CFLAGS="$gtk_save_CFLAGS"
588 AC_MSG_WARN([Could not determine POSIX flag. (-posix didn't work.)])))
591 # Run AM_PATH_GLIB_2_0 to make sure that GLib is installed and working
594 GLIB_PACKAGES="gobject-2.0 gmodule-no-export-2.0"
596 AM_PATH_GLIB_2_0(glib_required_version, :,
598 *** GLIB glib_required_version or better is required. The latest version of
599 *** GLIB is always available from ftp://ftp.gtk.org/pub/gtk/.]),
600 gobject gmodule-no-export gthread)
602 # See if it's safe to turn G_DISABLE_DEPRECATED on.
603 GLIB_VERSION_MAJOR_MINOR=`$PKG_CONFIG --modversion glib-2.0 | sed "s/\.@<:@^.@:>@*\$//"`
604 GLIB_REQUIRED_VERSION_MAJOR_MINOR=`echo glib_required_version | sed "s/\.@<:@^.@:>@*\$//"`
605 if test "x$GLIB_VERSION_MAJOR_MINOR" = "x$GLIB_REQUIRED_VERSION_MAJOR_MINOR"; then
606 CFLAGS="-DG_DISABLE_DEPRECATED $CFLAGS"
609 CFLAGS="-DGDK_PIXBUF_DISABLE_DEPRECATED $CFLAGS"
613 dnl Check for bind_textdomain_codeset, including -lintl if GLib brings it in.
616 LIBS="$LIBS $GLIB_LIBS"
617 AC_CHECK_FUNCS(bind_textdomain_codeset)
620 AC_CHECK_HEADERS(pwd.h,
621 AC_DEFINE(HAVE_PWD_H, 1,
622 [Define to 1 if pwd.h is available]))
623 AC_CHECK_HEADERS(sys/time.h,
624 AC_DEFINE(HAVE_SYS_TIME_H, 1,
625 [Define to 1 if time.h is available]))
626 AC_CHECK_HEADERS(unistd.h,
627 AC_DEFINE(HAVE_UNISTD_H, 1,
628 [Define to 1 if unistd.h is available]))
629 AC_CHECK_HEADERS(ftw.h,
630 AC_DEFINE(HAVE_FTW_H, 1,
631 [Define to 1 if ftw.h is available]))
633 AC_MSG_CHECKING([for GNU ftw extensions])
634 AC_TRY_COMPILE([#define _XOPEN_SOURCE 500
636 #include <ftw.h>], [int flags = FTW_ACTIONRETVAL;], gtk_ok=yes, gtk_ok=no)
637 if test $gtk_ok = yes; then
639 AC_DEFINE(HAVE_GNU_FTW, 1, [Have GNU ftw])
644 saved_cflags="$CFLAGS"
645 saved_ldflags="$LDFLAGS"
648 # Checks for header files.
651 # Checks for typedefs, structures, and compiler characteristics.
654 # Checks for library functions.
658 AC_CHECK_FUNCS(mallinfo)
659 AC_CHECK_FUNCS(getresuid)
662 # Check if <sys/select.h> needs to be included for fd_set
663 AC_MSG_CHECKING([for fd_set])
664 AC_TRY_COMPILE([#include <sys/types.h>],
665 [fd_set readMask, writeMask;], gtk_ok=yes, gtk_ok=no)
666 if test $gtk_ok = yes; then
667 AC_MSG_RESULT([yes, found in sys/types.h])
669 AC_HEADER_EGREP(fd_mask, sys/select.h, gtk_ok=yes)
670 if test $gtk_ok = yes; then
671 AC_DEFINE(HAVE_SYS_SELECT_H, 1,
672 [Define to 1 if sys/select.h is available])
673 AC_MSG_RESULT([yes, found in sys/select.h])
675 AC_DEFINE(NO_FD_SET, 1,
676 [Define to 1 if fd_set is not available])
681 # `widechar' tests for gdki18n.h
682 AC_MSG_CHECKING(for wchar.h)
683 AC_TRY_CPP([#include <wchar.h>], gdk_wchar_h=yes, gdk_wchar_h=no)
684 if test $gdk_wchar_h = yes; then
685 AC_DEFINE(HAVE_WCHAR_H, 1, [Have wchar.h include file])
687 AC_MSG_RESULT($gdk_wchar_h)
689 # Check for wctype.h (for iswalnum)
690 AC_MSG_CHECKING(for wctype.h)
691 AC_TRY_CPP([#include <wctype.h>], gdk_wctype_h=yes, gdk_wctype_h=no)
692 if test $gdk_wctype_h = yes; then
693 AC_DEFINE(HAVE_WCTYPE_H, 1, [Have wctype.h include file])
695 AC_MSG_RESULT($gdk_wctype_h)
697 # in Solaris 2.5, `iswalnum' is in -lw
699 AC_CHECK_FUNC(iswalnum,,[AC_CHECK_LIB(w,iswalnum,GDK_WLIBS=-lw)])
702 LIBS="$LIBS $GDK_WLIBS"
703 # The following is necessary for Linux libc-5.4.38
704 AC_MSG_CHECKING(if iswalnum() and friends are properly defined)
705 AC_TRY_LINK([#include <stdlib.h>],[
706 #if (defined(HAVE_WCTYPE_H) || defined(HAVE_WCHAR_H))
707 # ifdef HAVE_WCTYPE_H
715 # define iswalnum(c) ((wchar_t)(c) <= 0xFF && isalnum(c))
717 iswalnum((wchar_t) 0);
718 ], gdk_working_wctype=yes, gdk_working_wctype=no)
721 if test $gdk_working_wctype = no; then
722 AC_DEFINE(HAVE_BROKEN_WCTYPE, 1, [Is the wctype implementation broken])
725 AC_MSG_RESULT($gdk_working_wctype)
728 # Check for uxtheme.h (for MS-Windows Engine)
729 AC_MSG_CHECKING(for uxtheme.h)
730 AC_TRY_CPP([#include <uxtheme.h>], gtk_uxtheme_h=yes, gtk_uxtheme_h=no)
731 if test $gtk_uxtheme_h = yes; then
732 AC_DEFINE(HAVE_UXTHEME_H, 1, [Have uxtheme.h include file])
734 AC_MSG_RESULT($gtk_uxtheme_h)
736 # Checks for gdkspawn
737 AC_CHECK_HEADERS(crt_externs.h)
738 AC_CHECK_FUNCS(_NSGetEnviron)
741 ##################################################
742 # Checks for gdk-pixbuf
743 ##################################################
745 dnl ********************************************************
746 dnl * See whether we need to load our modules as .la files *
747 dnl ********************************************************
751 *-aix*) use_la_modules=true
754 if $use_la_modules ; then
755 AC_DEFINE(USE_LA_MODULES, 1,
756 [Whether to load modules via .la files rather than directly])
760 AC_MSG_CHECKING(whether to build gmodulized gdk-pixbuf)
762 AC_ARG_ENABLE(modules,
763 [AC_HELP_STRING([--disable-modules],
764 [disable dynamic module loading])])
768 if test x$enable_modules = xno; then
772 AC_MSG_CHECKING(whether dynamic modules work)
773 ## for loop is to strip newline
774 tmp=`$PKG_CONFIG --variable=gmodule_supported gmodule-no-export-2.0`
779 dnl Now we check to see if our libtool supports shared lib deps
780 dnl (in a rather ugly way even)
782 pixbuf_libtool_config="${CONFIG_SHELL-/bin/sh} ./libtool --config"
783 pixbuf_deplibs_check=`$pixbuf_libtool_config | \
784 grep '^[[a-z_]]*check[[a-z_]]*_method=[['\''"]]' | \
785 sed 's/.*[['\''"]]\(.*\)[['\''"]]$/\1/'`
786 if test "x$pixbuf_deplibs_check" = "xnone" || \
787 test "x$pixbuf_deplibs_check" = "xunknown" || \
788 test "x$pixbuf_deplibs_check" = "x"; then
794 AC_DEFINE(USE_GMODULE, 1,
795 [Define to 1 if gmodule works and should be used])
802 dnl We allow people to disable image loaders explicitely, but if they don't we error
803 dnl out so that people don't accidentally build without them.
806 [AC_HELP_STRING([--without-libpng],
807 [disable PNG loader for gdk-pixbuf])])
809 [AC_HELP_STRING([--without-libjpeg],
810 [disable JPEG loader for gdk-pixbuf])])
812 [AC_HELP_STRING([--without-libtiff],
813 [disable TIFF loader for gdk-pixbuf])])
814 AC_ARG_WITH(libjasper,
815 [AC_HELP_STRING([--without-libjasper],
816 [disable JPEG2000 loader for gdk-pixbuf])])
818 AC_ARG_ENABLE(gdiplus,
819 [AC_HELP_STRING([--disable-gdiplus],
820 [disable GDI+ loaders for gdk-pixbuf])])
822 AM_CONDITIONAL(BUILD_GDIPLUS_LOADERS, [ test x$os_win32 = xyes && test x$enable_gdiplus != xno ])
825 if test x$os_win32 = xno || test x$enable_gdiplus = xno; then
826 if test x$with_libtiff != xno && test -z "$LIBTIFF"; then
827 AC_CHECK_LIB(tiff, TIFFReadRGBAImageOriented,
828 [AC_CHECK_HEADER(tiffio.h,
829 TIFF='tiff'; LIBTIFF='-ltiff',
830 AC_MSG_WARN(*** TIFF loader will not be built (TIFF header files not found) ***))],
831 [AC_CHECK_LIB(tiff, TIFFWriteScanline,
832 [AC_CHECK_HEADER(tiffio.h,
833 TIFF='tiff'; LIBTIFF='-ltiff -ljpeg -lz',
834 AC_MSG_WARN(*** TIFF loader will not be built (TIFF header files not found) ***))],
835 [AC_CHECK_LIB(tiff34, TIFFFlushData,
836 [AC_CHECK_HEADER(tiffio.h,
837 TIFF='tiff'; LIBTIFF='-ltiff34 -ljpeg -lz',
838 AC_MSG_WARN(*** TIFF loader will not be built (TIFF header files not found) ***))],
839 AC_MSG_WARN(*** TIFF loader will not be built (TIFF library not found) ***), -ljpeg -lz -lm)], -ljpeg -lz -lm)], -lm)
842 if test x$with_libtiff != xno && test -z "$LIBTIFF"; then
844 *** Checks for TIFF loader failed. You can build without it by passing
845 *** --without-libtiff to configure but some programs using GTK+ may
846 *** not work properly])
851 if test x$os_win32 = xno || test x$enable_gdiplus = xno; then
852 if test x$with_libjpeg != xno && test -z "$LIBJPEG"; then
853 AC_CHECK_LIB(jpeg, jpeg_destroy_decompress,
856 AC_MSG_WARN(*** JPEG loader will not be built (JPEG library not found) ***))
857 if test "$jpeg_ok" = yes; then
858 AC_MSG_CHECKING([for jpeglib.h])
864 #include <jpeglib.h>],
867 AC_MSG_RESULT($jpeg_ok)
868 if test "$jpeg_ok" = yes; then
870 AC_CHECK_LIB(jpeg, jpeg_simple_progression,
871 AC_DEFINE(HAVE_PROGRESSIVE_JPEG, 1,
872 [Define to 1 is libjpeg supports progressive JPEG]),
873 AC_MSG_WARN(JPEG library does not support progressive saving.))
875 AC_MSG_WARN(*** JPEG loader will not be built (JPEG header file not found) ***)
880 if test x$with_libjpeg != xno && test -z "$LIBJPEG"; then
882 *** Checks for JPEG loader failed. You can build without it by passing
883 *** --without-libjpeg to configure but some programs using GTK+ may
884 *** not work properly])
889 if test x$with_libpng != xno && test -z "$LIBPNG"; then
890 AC_MSG_CHECKING(for libpng12)
891 if $PKG_CONFIG --exists libpng12 ; then
894 PNG_DEP_CFLAGS_PACKAGES=libpng12
895 LIBPNG=`$PKG_CONFIG --libs libpng12`
898 AC_CHECK_LIB(png, png_read_info,
899 [AC_CHECK_HEADER(png.h,
902 AC_MSG_WARN(*** PNG loader will not be built (PNG library not found) ***), -lz -lm)
903 if test "$png_ok" = yes; then
904 AC_MSG_CHECKING([for png_structp in png.h])
905 AC_TRY_COMPILE([#include <png.h>],
906 [png_structp pp; png_infop info; png_colorp cmap; png_create_read_struct;],
909 AC_MSG_RESULT($png_ok)
910 if test "$png_ok" = yes; then
911 PNG='png'; LIBPNG='-lpng -lz'
913 AC_MSG_WARN(*** PNG loader will not be built (PNG library is too old) ***)
916 AC_MSG_WARN(*** PNG loader will not be built (PNG header file not found) ***)
921 if test x$with_libpng != xno && test -z "$LIBPNG"; then
923 *** Checks for PNG loader failed. You can build without it by passing
924 *** --without-libpng to configure but many programs using GTK+ will
925 *** not work properly. The PNG loader is also needed if you are compiling
929 dnl Test for libjasper
930 if test x$with_libjasper != xno && test -z "$LIBJASPER"; then
931 AC_CHECK_LIB(jasper, jas_init, LIBJASPER=-ljasper, [], -ljpeg)
934 if test x$with_libjasper != xno && test -z "$LIBJASPER"; then
936 *** Checks for JPEG2000 loader failed. You can build without it by passing
937 *** --without-libjasper to configure])
945 AM_CONDITIONAL(BUILD_DYNAMIC_MODULES, $dynworks)
948 # Allow building some or all gdk-pixbuf loaders included
950 AC_MSG_CHECKING(pixbuf loaders to build)
952 dnl due to an autoconf bug, commas in the first arg to
953 dnl AC_HELP_STRING cause problems.
954 dnl AC_HELP_STRING([--with-included-loaders=LOADER1 LOADER2 ...],
955 dnl [build the specified loaders into gdk-pixbuf])
956 AC_ARG_WITH(included_loaders,
957 [ --with-included-loaders=LOADER1,LOADER2,...
958 build the specified loaders into gdk-pixbuf])
963 ## if the option was specified, leave it; otherwise disable included loaders
964 if test x$with_included_loaders = xno; then
965 with_included_loaders=yes
969 # Use the traditional png loader instead of the GDI+ one on Windows,
970 # because some important apps like GIMP need to read and write
971 # arbitrary tEXt chunks which doesn't seem to be possible through GDI+
973 all_loaders="ani,icns,pcx,ras,tga,png,pnm,wbmp,xbm,xpm"
974 if test x$with_libjasper != xno; then
975 all_loaders="$all_loaders,jasper"
977 if test x$os_win32 = xyes && test x$enable_gdiplus != xno; then
978 # Skip PNG, see comment above
979 gdip_formats="bmp emf gif ico jpeg tiff wmf"
980 for f in $gdip_formats; do
981 all_loaders="$all_loaders,gdip-$f"
984 all_loaders="$all_loaders,bmp,gif,ico,jpeg,tiff"
987 # If no loaders specified, include all
988 if test "x$with_included_loaders" = xyes ; then
989 included_loaders="$all_loaders"
991 included_loaders="$with_included_loaders"
994 AC_MSG_RESULT($included_loaders)
997 INCLUDED_LOADER_DEFINE=
999 IFS="${IFS= }"; gtk_save_ifs="$IFS"; IFS=","
1000 for loader in $included_loaders; do
1001 if echo "$all_loaders" | egrep "(^|,)$loader(\$|,)" > /dev/null; then
1004 AC_MSG_ERROR([the specified loader $loader does not exist])
1007 loader_underscores=`echo $loader | sed -e 's/-/_/g'`
1008 INCLUDED_LOADER_OBJ="$INCLUDED_LOADER_OBJ libstatic-pixbufloader-$loader.la"
1010 # Don't bother defining separate -DINCLUDE_gdip_foo for each gdip-foo loader
1013 *) INCLUDED_LOADER_DEFINE="$INCLUDED_LOADER_DEFINE -DINCLUDE_$loader_underscores";;
1015 eval INCLUDE_$loader_underscores=yes
1018 # Just define one -DINCLUDE_gdiplus for all the gdip-foo loaders
1019 # (except gdip-png, which isn't built at all)
1020 if test x"$INCLUDE_gdip_ico" = xyes; then
1021 INCLUDED_LOADER_DEFINE="$INCLUDED_LOADER_DEFINE -DINCLUDE_gdiplus"
1025 AC_SUBST(INCLUDED_LOADER_OBJ)
1026 AC_SUBST(INCLUDED_LOADER_DEFINE)
1028 AM_CONDITIONAL(INCLUDE_PNG, [test x"$INCLUDE_png" = xyes])
1029 AM_CONDITIONAL(INCLUDE_BMP, [test x"$INCLUDE_bmp" = xyes])
1030 AM_CONDITIONAL(INCLUDE_WBMP, [test x"$INCLUDE_wbmp" = xyes])
1031 AM_CONDITIONAL(INCLUDE_GIF, [test x"$INCLUDE_gif" = xyes])
1032 AM_CONDITIONAL(INCLUDE_ICO, [test x"$INCLUDE_ico" = xyes])
1033 AM_CONDITIONAL(INCLUDE_ANI, [test x"$INCLUDE_ani" = xyes])
1034 AM_CONDITIONAL(INCLUDE_JPEG, [test x"$INCLUDE_jpeg" = xyes])
1035 AM_CONDITIONAL(INCLUDE_PNM, [test x"$INCLUDE_pnm" = xyes])
1036 AM_CONDITIONAL(INCLUDE_RAS, [test x"$INCLUDE_ras" = xyes])
1037 AM_CONDITIONAL(INCLUDE_TIFF, [test x"$INCLUDE_tiff" = xyes])
1038 AM_CONDITIONAL(INCLUDE_XPM, [test x"$INCLUDE_xpm" = xyes])
1039 AM_CONDITIONAL(INCLUDE_XBM, [test x"$INCLUDE_xbm" = xyes])
1040 AM_CONDITIONAL(INCLUDE_TGA, [test x"$INCLUDE_tga" = xyes])
1041 AM_CONDITIONAL(INCLUDE_PCX, [test x"$INCLUDE_pcx" = xyes])
1042 AM_CONDITIONAL(INCLUDE_ICNS, [test x"$INCLUDE_icns" = xyes])
1043 AM_CONDITIONAL(INCLUDE_JASPER, [test x"$INCLUDE_jasper" = xyes])
1044 # As all GDI+ loaders are either built-in or not, arbitrarily just
1045 # check one of the variables here
1046 AM_CONDITIONAL(INCLUDE_GDIPLUS, [test x"$INCLUDE_gdip_ico" = xyes])
1048 if test x$gio_can_sniff = x; then
1049 AC_MSG_CHECKING([if gio can sniff png])
1050 gtk_save_LIBS="$LIBS"
1051 gtk_save_CFLAGS="$CFLAGS"
1052 LIBS="`$PKG_CONFIG --libs gio-2.0`"
1053 CFLAGS="`$PKG_CONFIG --cflags gio-2.0`"
1054 AC_RUN_IFELSE([AC_LANG_SOURCE([[
1055 #include <gio/gio.h>
1056 static const gsize data_size = 159;
1057 static const guint8 data[] =
1059 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d,
1060 0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01,
1061 0x08, 0x02, 0x00, 0x00, 0x00, 0x90, 0x77, 0x53, 0xde, 0x00, 0x00, 0x00,
1062 0x01, 0x73, 0x52, 0x47, 0x42, 0x00, 0xae, 0xce, 0x1c, 0xe9, 0x00, 0x00,
1063 0x00, 0x09, 0x70, 0x48, 0x59, 0x73, 0x00, 0x00, 0x0b, 0x13, 0x00, 0x00,
1064 0x0b, 0x13, 0x01, 0x00, 0x9a, 0x9c, 0x18, 0x00, 0x00, 0x00, 0x07, 0x74,
1065 0x49, 0x4d, 0x45, 0x07, 0xd8, 0x07, 0x0f, 0x10, 0x08, 0x15, 0x61, 0xd8,
1066 0x35, 0x37, 0x00, 0x00, 0x00, 0x19, 0x74, 0x45, 0x58, 0x74, 0x43, 0x6f,
1067 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x00, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65,
1068 0x64, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x47, 0x49, 0x4d, 0x50, 0x57,
1069 0x81, 0x0e, 0x17, 0x00, 0x00, 0x00, 0x0c, 0x49, 0x44, 0x41, 0x54, 0x08,
1070 0xd7, 0x63, 0xf8, 0xff, 0xff, 0x3f, 0x00, 0x05, 0xfe, 0x02, 0xfe, 0xdc,
1071 0xcc, 0x59, 0xe7, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae,
1075 main (int argc, char **argv)
1079 content_type = g_content_type_guess (NULL, data, data_size, NULL);
1080 image_png = g_content_type_from_mime_type ("image/png");
1081 return !!strcmp (content_type, image_png);
1084 AC_DEFINE(GDK_PIXBUF_USE_GIO_MIME, 1, [Define if gio can sniff image data])],
1086 AC_MSG_RESULT($gio_can_sniff)
1087 LIBS="$gtk_save_LIBS"
1088 CFLAGS="$gtk_save_CFLAGS"
1092 # Allow building some or all immodules included
1094 AC_MSG_CHECKING(immodules to build)
1096 dnl due to an autoconf bug, commas in the first arg to
1097 dnl AC_HELP_STRING cause problems.
1098 dnl AC_HELP_STRING([--with-included-immodules=MODULE1 MODULE2 ...],
1099 dnl [build the specified input method modules into gtk])
1100 AC_ARG_WITH(included_immodules,
1101 [ --with-included-immodules=MODULE1,MODULE2,...
1102 build the specified input methods into gtk])
1107 ## if the option was specified, leave it; otherwise disable included immodules
1108 if test x$with_included_immodules = xno; then
1109 with_included_immodules=yes
1113 all_immodules="am-et,cedilla,cyrillic-translit"
1114 if test "$gdktarget" = "win32"; then
1115 all_immodules="${all_immodules},ime"
1117 all_immodules="${all_immodules},inuktitut,ipa,multipress,thai,ti-er,ti-et,viqr"
1118 if test "$gdktarget" = "x11"; then
1119 all_immodules="${all_immodules},xim"
1122 included_immodules=""
1123 # If the switch specified without listing any specific ones, include all
1124 if test "x$with_included_immodules" = xyes ; then
1125 included_immodules="$all_immodules"
1127 included_immodules="$with_included_immodules"
1130 AC_MSG_RESULT($included_immodules)
1131 AM_CONDITIONAL(HAVE_INCLUDED_IMMMODULES, test "x$included_immodules" != x)
1133 INCLUDED_IMMODULE_OBJ=
1134 INCLUDED_IMMODULE_DEFINE=
1136 IFS="${IFS= }"; gtk_save_ifs="$IFS"; IFS=","
1137 for immodule in $included_immodules; do
1138 immodule_underscores=`echo $immodule | sed -e 's/-/_/g'`
1139 if echo "$all_immodules" | egrep "(^|,)$immodule(\$|,)" > /dev/null; then
1142 AC_MSG_ERROR([the specified input method $immodule does not exist])
1145 INCLUDED_IMMODULE_OBJ="$INCLUDED_IMMODULE_OBJ ../modules/input/libstatic-im-$immodule.la"
1146 INCLUDED_IMMODULE_DEFINE="$INCLUDED_IMMODULE_DEFINE -DINCLUDE_IM_$immodule_underscores"
1147 eval INCLUDE_$immodule_underscores=yes
1150 AC_SUBST(INCLUDED_IMMODULE_OBJ)
1151 AC_SUBST(INCLUDED_IMMODULE_DEFINE)
1153 AM_CONDITIONAL(INCLUDE_IM_AM_ET, [test x"$INCLUDE_am_et" = xyes])
1154 AM_CONDITIONAL(INCLUDE_IM_CEDILLA, [test x"$INCLUDE_cedilla" = xyes])
1155 AM_CONDITIONAL(INCLUDE_IM_CYRILLIC_TRANSLIT, [test x"$INCLUDE_cyrillic_translit" = xyes])
1156 AM_CONDITIONAL(INCLUDE_IM_IME, [test x"$INCLUDE_ime" = xyes])
1157 AM_CONDITIONAL(INCLUDE_IM_INUKTITUT, [test x"$INCLUDE_inuktitut" = xyes])
1158 AM_CONDITIONAL(INCLUDE_IM_IPA, [test x"$INCLUDE_ipa" = xyes])
1159 AM_CONDITIONAL(INCLUDE_IM_MULTIPRESS, [test x"$INCLUDE_multipress" = xyes])
1160 AM_CONDITIONAL(INCLUDE_IM_THAI, [test x"$INCLUDE_thai" = xyes])
1161 AM_CONDITIONAL(INCLUDE_IM_TI_ER, [test x"$INCLUDE_ti_er" = xyes])
1162 AM_CONDITIONAL(INCLUDE_IM_TI_ET, [test x"$INCLUDE_ti_et" = xyes])
1163 AM_CONDITIONAL(INCLUDE_IM_VIQR, [test x"$INCLUDE_viqr" = xyes])
1164 AM_CONDITIONAL(INCLUDE_IM_XIM, [test x"$INCLUDE_xim" = xyes])
1170 AM_CONDITIONAL(HAVE_TIFF, test "x$LIBTIFF" != x)
1171 AM_CONDITIONAL(HAVE_PNG, test "x$LIBPNG" != x)
1172 AM_CONDITIONAL(HAVE_JPEG, test "x$LIBJPEG" != x)
1173 AM_CONDITIONAL(HAVE_JASPER, test "x$LIBJASPER" != x)
1177 if echo "$included_loaders" | egrep '(^|,)tiff($|,)' > /dev/null; then
1178 STATIC_LIB_DEPS="$STATIC_LIB_DEPS $LIBTIFF"
1180 if echo "$included_loaders" | egrep '(^|,)jpeg($|,)' > /dev/null; then
1181 STATIC_LIB_DEPS="$STATIC_LIB_DEPS $LIBJPEG"
1183 if echo "$included_loaders" | egrep '(^|,)png($|,)' > /dev/null; then
1184 STATIC_LIB_DEPS="$STATIC_LIB_DEPS $LIBPNG"
1186 if echo "$included_loaders" | egrep '(^|,)jasper($|,)' > /dev/null; then
1187 STATIC_LIB_DEPS="$STATIC_LIB_DEPS $LIBJASPER"
1190 STATIC_LIB_DEPS="$LIBTIFF $LIBJPEG $LIBPNG $LIBJASPER"
1193 # Checks to see whether we should include mediaLib
1196 AC_CHECK_HEADER(sys/systeminfo.h,
1197 AC_DEFINE(HAVE_SYS_SYSTEMINFO_H, 1,
1198 [Define to 1 if sys/systeminfo.h is available]))
1199 AC_CHECK_HEADER(sys/sysinfo.h,
1200 AC_DEFINE(HAVE_SYS_SYSINFO_H, 1,
1201 [Define to 1 if sys/sysinfo.h is available]))
1203 AC_MSG_CHECKING(for mediaLib 2.3)
1205 # Check for a mediaLib 2.3 function since that is what the GTK+ mediaLib
1207 AC_CHECK_LIB(mlib, mlib_ImageSetStruct, use_mlib=yes, use_mlib=no)
1208 if test $use_mlib = yes; then
1209 AC_DEFINE(USE_MEDIALIB, 1,
1210 [Define to 1 if medialib is available and should be used])
1213 AC_MSG_CHECKING(for mediaLib 2.5)
1214 # Check for a mediaLib 2.5 function since that is what is needed for
1215 # gdk_rgb_convert integration.
1216 AC_CHECK_LIB(mlib, mlib_VideoColorRGBint_to_BGRAint, use_mlib25=yes, use_mlib25=no)
1217 if test $use_mlib25 = yes; then
1218 AC_DEFINE(USE_MEDIALIB25, 1,
1219 [Define to 1 if medialib 2.5 is available])
1222 AM_CONDITIONAL(USE_MEDIALIB, test $use_mlib = yes)
1223 AM_CONDITIONAL(USE_MEDIALIB25, test $use_mlib25 = yes)
1225 # Checks to see if we should compile in MMX support (there will be
1226 # a runtime test when the code is actually run to see if it should
1227 # be used - this just checks if we can compile it.)
1229 # This code is partially taken from Mesa
1231 AC_MSG_CHECKING(for x86 platform)
1233 i386|i486|i586|i686|i786|k6|k7)
1239 AC_MSG_RESULT($use_x86_asm)
1242 if test $use_x86_asm = yes; then
1246 AC_MSG_CHECKING(compiler support for MMX)
1247 cp $srcdir/gdk-pixbuf/pixops/scale_line_22_33_mmx.S conftest.S
1248 if AC_TRY_EVAL(ac_compile); then
1255 if test $use_mmx_asm = yes; then
1256 AC_DEFINE(USE_MMX, 1,
1257 [Define to 1 if XXM is available and should be used])
1264 AM_CONDITIONAL(USE_MMX, test x$use_mmx_asm = xyes)
1267 if test -z "$LIBPNG" && test x"$os_win32" = xno -o x$enable_gdiplus = xno; then
1271 dnl Look for a host system's gdk-pixbuf-csource if we are cross-compiling
1273 AM_CONDITIONAL(CROSS_COMPILING, test $cross_compiling = yes)
1275 if test $cross_compiling = yes; then
1276 AC_PATH_PROG(GDK_PIXBUF_CSOURCE, gdk-pixbuf-csource, no)
1277 AC_PATH_PROG(GTK_UPDATE_ICON_CACHE, gtk-update-icon-cache, no)
1278 if test x$GTK_UPDATE_ICON_CACHE = xno; then
1283 if test ! -f $srcdir/gtk/gtkbuiltincache.h &&
1284 test "x$REBUILD_PNGS" = "x#" ; then
1286 *** gtkbuiltincache.h is not in the tree, and cannot be built
1287 *** because you don't have libpng, or (when cross-compiling) you
1288 *** don't have a prebuilt gtk-update-icon-cache on the build system.])
1291 AC_SUBST(REBUILD_PNGS)
1293 GDK_PIXBUF_PACKAGES="gmodule-no-export-2.0 gobject-2.0 gio-2.0"
1294 GDK_PIXBUF_EXTRA_LIBS="$STATIC_LIB_DEPS $MATH_LIB $MEDIA_LIB"
1295 GDK_PIXBUF_EXTRA_CFLAGS=
1296 GDK_PIXBUF_DEP_LIBS="`$PKG_CONFIG --libs $GDK_PIXBUF_PACKAGES` $GDK_PIXBUF_EXTRA_LIBS"
1297 GDK_PIXBUF_DEP_CFLAGS="`$PKG_CONFIG --cflags gthread-2.0 $GDK_PIXBUF_PACKAGES $PNG_DEP_CFLAGS_PACKAGES` $GDK_PIXBUF_EXTRA_CFLAGS"
1299 ########################################
1300 # Windowing system checks
1301 ########################################
1303 GDK_PIXBUF_XLIB_PACKAGES=
1304 GDK_PIXBUF_XLIB_EXTRA_CFLAGS=
1305 GDK_PIXBUF_XLIB_EXTRA_LIBS=
1307 X_PACKAGES=fontconfig
1308 GDK_EXTRA_LIBS="$GDK_WLIBS"
1311 # GTK+ uses some X calls, so needs to link against X directly
1312 GTK_DEP_PACKAGES_FOR_X=
1315 if test "x$gdktarget" = "xx11"; then
1317 # We use fontconfig very peripherally when decoding the default
1320 if $PKG_CONFIG --exists fontconfig; then : ; else
1322 *** fontconfig (http://www.fontconfig.org) is required by the X11 backend.])
1326 # Check for basic X packages; we use pkg-config if available
1328 if $PKG_CONFIG --exists x11 xext xrender; then
1330 X_PACKAGES="$X_PACKAGES x11 xext xrender"
1331 x_libs="`$PKG_CONFIG --libs x11 xext xrender`"
1332 X_CFLAGS="`$PKG_CONFIG --cflags x11 xext xrender`"
1334 # Strip out any .la files that pkg-config might give us (this happens
1335 # with -uninstalled.pc files)
1337 for I in $x_libs ; do
1340 *) x_libs_for_checks="$x_libs_for_checks $I" ;;
1344 GDK_PIXBUF_XLIB_PACKAGES="x11"
1345 GTK_PACKAGES_FOR_X="x11"
1347 have_base_x_pc=false
1349 if test x$no_x = xyes ; then
1350 AC_MSG_ERROR([X development libraries not found])
1353 x_cflags="$X_CFLAGS"
1354 x_libs_for_checks="$X_LIBS -lXext -lXrender -lX11 $X_EXTRA_LIBS"
1356 GDK_PIXBUF_XLIB_EXTRA_CFLAGS="$x_cflags"
1357 GDK_PIXBUF_XLIB_EXTRA_LIBS="$X_LIBS -lX11 $X_EXTRA_LIBS"
1358 GTK_DEP_LIBS_FOR_X="$X_LIBS -lXrender -lX11 $X_EXTRA_LIBS"
1361 # Extra libraries found during checks (-lXinerama, etc), not from pkg-config.
1364 gtk_save_cppflags="$CPPFLAGS"
1365 CPPFLAGS="$CPPFLAGS $X_CFLAGS"
1368 LIBS="$x_libs_for_checks $LIBS"
1370 # Sanity check for the X11 and Xext libraries. While everything we need from
1371 # Xext is optional, the chances a system has *none* of these things is so
1372 # small that we just unconditionally require it.
1373 AC_CHECK_FUNC(XOpenDisplay, :,
1374 AC_MSG_ERROR([*** libX11 not found. Check 'config.log' for more details.]))
1375 AC_CHECK_FUNC(XextFindDisplay, :,
1376 AC_MSG_ERROR([*** libXext not found. Check 'config.log' for more details.]))
1377 AC_CHECK_FUNC(XRenderQueryExtension, :,
1378 AC_MSG_ERROR([*** libXrender not found. Check 'config.log' for more details.]))
1382 AC_MSG_CHECKING([if <X11/extensions/XIproto.h> is needed for xReply])
1383 AC_TRY_COMPILE([#include <X11/Xlibint.h>],
1385 [AC_MSG_RESULT([no])],
1386 [AC_TRY_COMPILE([#include <X11/extensions/XIproto.h>
1387 #include <X11/Xlibint.h>],
1389 [AC_MSG_RESULT([yes])
1390 AC_DEFINE([NEED_XIPROTO_H_FOR_XREPLY], 1,
1391 [Define if <X11/extensions/XIproto.h> needed for xReply])],
1392 [AC_MSG_RESULT([unknown])
1393 AC_MSG_ERROR([xReply type unavailable. X11 is too old])])])
1395 # Check for XConvertCase, XInternAtoms (X11R6 specific)
1397 AC_CHECK_FUNCS(XConvertCase XInternAtoms)
1399 # Generic X11R6 check needed for XIM support; we could
1400 # probably use this to replace the above, but we'll
1401 # leave the separate checks for XConvertCase and XInternAtoms
1405 AC_CHECK_FUNC(XAddConnectionWatch,
1408 if $have_x11r6; then
1409 AC_DEFINE(HAVE_X11R6, 1, [Define if we have X11R6])
1411 AM_CONDITIONAL(HAVE_X11R6, $have_x11r6)
1413 # Check for XKB support.
1415 if test "x$enable_xkb" = "xyes"; then
1416 AC_MSG_WARN(XKB support explicitly enabled)
1417 AC_DEFINE(HAVE_XKB, 1, [Define to use XKB extension])
1418 elif test "x$enable_xkb" = "xmaybe"; then
1419 AC_CHECK_FUNC(XkbQueryExtension,
1420 AC_DEFINE(HAVE_XKB, 1, [Define to use XKB extension]))
1422 AC_MSG_WARN(XKB support explicitly disabled)
1425 # Check for shaped window extension
1427 AC_CHECK_FUNC(XShapeCombineMask,
1428 AC_DEFINE(HAVE_SHAPE_EXT, 1,
1429 [Define to 1 if the XShape extension is available]))
1432 gtk_save_CFLAGS="$CFLAGS"
1433 CFLAGS="$CFLAGS $x_cflags"
1435 AC_CHECK_FUNC(XSyncQueryExtension,
1436 [AC_CHECK_HEADER(X11/extensions/sync.h,
1437 AC_DEFINE(HAVE_XSYNC, 1, [Have the SYNC extension library]),
1438 :, [#include <X11/Xlib.h>])])
1440 CFLAGS="$gtk_save_CFLAGS"
1444 if test "x$enable_shm" = "xyes"; then
1445 # Check for the XShm extension, normally in Xext
1446 AC_CHECK_FUNC(XShmAttach,
1448 # On AIX, it is in XextSam instead
1449 [AC_CHECK_LIB(XextSam, XShmAttach,
1450 [GTK_ADD_LIB(x_extra_libs,XextSam)])])
1453 if test "x$enable_shm" = "xyes"; then
1454 # Check for shared memory
1455 AC_CHECK_HEADER(sys/ipc.h,
1456 AC_DEFINE(HAVE_IPC_H, 1,
1457 [Define to 1 if ipc.h is available]),
1459 AC_CHECK_HEADER(sys/shm.h,
1460 AC_DEFINE(HAVE_SHM_H, 1,
1461 [Define to 1 if shm.h is available]),
1464 # Check for the X shared memory extension header file
1466 AC_MSG_CHECKING(X11/extensions/XShm.h)
1467 if test "x$no_xext_lib" = "xyes"; then
1470 gtk_save_CFLAGS="$CFLAGS"
1471 CFLAGS="$CFLAGS $x_cflags"
1474 #include <sys/types.h>
1475 #include <sys/ipc.h>
1476 #include <sys/shm.h>
1477 #include <X11/Xlib.h>
1478 #include <X11/Xutil.h>
1479 #include <X11/extensions/XShm.h>
1480 ], [XShmSegmentInfo *x_shm_info;], have_xshm=yes)
1481 CFLAGS="$gtk_save_CFLAGS"
1483 AC_MSG_RESULT($have_xshm)
1484 if test $have_xshm = yes ; then
1485 AC_DEFINE(HAVE_XSHM_H, 1,
1486 [Define to 1 if xshm.h is available])
1490 if test "x$enable_xinerama" = "xyes"; then
1491 # Check for Xinerama extension (Solaris impl or Xfree impl)
1492 gtk_save_cppflags="$CPPFLAGS"
1493 CPPFLAGS="$CPPFLAGS $x_cflags"
1498 AC_MSG_CHECKING(for Xinerama support on Solaris)
1500 have_solaris_xinerama=false
1501 AC_CHECK_FUNC(XineramaGetInfo,
1502 [AC_CHECK_HEADER(X11/extensions/xinerama.h,
1503 [have_solaris_xinerama=true], :,
1504 [#include <X11/Xlib.h>])])
1506 if $have_solaris_xinerama ; then
1507 AC_DEFINE(HAVE_SOLARIS_XINERAMA, 1,
1508 [Define to 1 if solaris xinerama is available])
1509 AC_DEFINE(HAVE_XINERAMA, 1,
1510 [Define to 1 if xinerama is available])
1518 AC_MSG_CHECKING(for Xinerama support on XFree86)
1520 have_xfree_xinerama=false
1521 if $PKG_CONFIG --exists xinerama ; then
1522 have_xfree_xinerama=true
1523 X_PACKAGES="$X_PACKAGES xinerama"
1525 AC_CHECK_LIB(Xinerama, XineramaQueryExtension,
1526 [AC_CHECK_HEADER(X11/extensions/Xinerama.h,
1527 [GTK_ADD_LIB(x_extra_libs,Xinerama)
1528 have_xfree_xinerama=true], :,
1529 [#include <X11/Xlib.h>])])
1532 if $have_xfree_xinerama ; then
1533 AC_DEFINE(HAVE_XFREE_XINERAMA, 1,
1534 [Define to 1 if XFree Xinerama is available])
1535 AC_DEFINE(HAVE_XINERAMA, 1,
1536 [Define to 1 is Xinerama is available])
1545 # set up things for XInput
1547 if test "x$with_xinput" = "xxfree" || test "x$with_xinput" = "xyes"; then
1548 AC_DEFINE(XINPUT_XFREE, 1,
1549 [Define to 1 if XFree XInput should be used])
1551 if $PKG_CONFIG --exists xi ; then
1552 X_PACKAGES="$X_PACKAGES xi"
1554 GTK_ADD_LIB(x_extra_libs, Xi)
1557 AC_DEFINE(XINPUT_NONE, 1,
1558 [Define to 1 if no XInput should be used])
1561 AM_CONDITIONAL(XINPUT_XFREE, test x$with_xinput = xxfree || test x$with_xinput = xyes)
1563 # Check for the RANDR extension
1564 if $PKG_CONFIG --exists "xrandr >= 1.2.99" ; then
1565 AC_DEFINE(HAVE_RANDR, 1, [Have the Xrandr extension library])
1567 X_PACKAGES="$X_PACKAGES xrandr"
1570 # Checks for Xcursor library
1572 if $PKG_CONFIG --exists xcursor ; then
1573 AC_DEFINE(HAVE_XCURSOR, 1, [Have the Xcursor library])
1575 X_PACKAGES="$X_PACKAGES xcursor"
1578 # Checks for XFixes extension
1580 if $PKG_CONFIG --exists xfixes ; then
1581 AC_DEFINE(HAVE_XFIXES, 1, [Have the XFIXES X extension])
1583 X_PACKAGES="$X_PACKAGES xfixes"
1584 GTK_PACKAGES_FOR_X="$GTK_PACKAGES_FOR_X xfixes"
1587 # Checks for Xcomposite extension
1589 if $PKG_CONFIG --exists xcomposite ; then
1590 AC_DEFINE(HAVE_XCOMPOSITE, 1, [Have the XCOMPOSITE X extension])
1592 X_PACKAGES="$X_PACKAGES xcomposite"
1593 GTK_PACKAGES_FOR_X="$GTK_PACKAGES_FOR_X xcomposite"
1596 # Checks for Xdamage extension
1598 if $PKG_CONFIG --exists xdamage ; then
1599 AC_DEFINE(HAVE_XDAMAGE, 1, [Have the XDAMAGE X extension])
1601 X_PACKAGES="$X_PACKAGES xdamage"
1602 GTK_PACKAGES_FOR_X="$GTK_PACKAGES_FOR_X xdamage"
1605 if $have_base_x_pc ; then
1606 GDK_EXTRA_LIBS="$x_extra_libs"
1608 GDK_EXTRA_LIBS="$X_LIBS $x_extra_libs -lXext -lX11 $GDK_EXTRA_LIBS"
1611 CPPFLAGS="$gtk_save_cppflags"
1612 LIBS="$gtk_save_libs"
1614 AM_CONDITIONAL(USE_X11, true)
1616 AM_CONDITIONAL(XINPUT_XFREE, false)
1617 AM_CONDITIONAL(USE_X11, false)
1618 AM_CONDITIONAL(HAVE_X11R6, false)
1621 if test "x$gdktarget" = "xwin32"; then
1622 GDK_EXTRA_LIBS="$GDK_EXTRA_LIBS -lgdi32 -limm32 -lshell32 -lole32 -Wl,-luuid"
1623 AM_CONDITIONAL(USE_WIN32, true)
1625 AM_CONDITIONAL(USE_WIN32, false)
1628 if test "x$gdktarget" = "xquartz"; then
1629 GDK_EXTRA_LIBS="$GDK_EXTRA_LIBS -framework Cocoa"
1630 AM_CONDITIONAL(USE_QUARTZ, true)
1632 AM_CONDITIONAL(USE_QUARTZ, false)
1635 GDK_PIXBUF_XLIB_DEP_LIBS="`$PKG_CONFIG --libs $GDK_PIXBUF_PACKAGES $GDK_PIXBUF_XLIB_PACKAGES` $GDK_PIXBUF_XLIB_EXTRA_LIBS $GDK_PIXBUF_EXTRA_LIBS"
1636 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"
1638 AC_SUBST(GDK_PIXBUF_XLIB_PACKAGES)
1639 AC_SUBST(GDK_PIXBUF_XLIB_EXTRA_LIBS)
1640 AC_SUBST(GDK_PIXBUF_XLIB_EXTRA_CFLAGS)
1641 AC_SUBST(GDK_PIXBUF_XLIB_DEP_LIBS)
1642 AC_SUBST(GDK_PIXBUF_XLIB_DEP_CFLAGS)
1644 if test "x$gdktarget" = "xdirectfb"; then
1645 DIRECTFB_REQUIRED_VERSION=1.0.0
1646 AC_MSG_CHECKING(for DirectFB)
1648 if $PKG_CONFIG --atleast-version $DIRECTFB_REQUIRED_VERSION directfb && $PKG_CONFIG --exists cairo-directfb ; then
1649 AC_MSG_RESULT(found)
1650 GDK_EXTRA_CFLAGS="`$PKG_CONFIG --cflags cairo-directfb` $GDK_EXTRA_CFLAGS"
1651 GDK_EXTRA_LIBS="`$PKG_CONFIG --libs cairo-directfb` $GDK_EXTRA_LIBS"
1654 *** DirectFB $DIRECTFB_REQUIRED_VERSION or newer and the cairo backend
1655 *** are required. The latest version of DirectFB is always available
1656 *** from http://www.directfb.org/.
1660 AM_CONDITIONAL(USE_DIRECTFB, true)
1662 AM_CONDITIONAL(USE_DIRECTFB, false)
1666 # Check for Pango flags
1668 if test "x$gdktarget" = "xwin32"; then
1669 PANGO_PACKAGES="pangowin32 pangocairo"
1671 PANGO_PACKAGES="pango pangocairo"
1674 AC_MSG_CHECKING(Pango flags)
1675 if $PKG_CONFIG --exists $PANGO_PACKAGES ; then
1676 PANGO_CFLAGS=`$PKG_CONFIG --cflags $PANGO_PACKAGES`
1677 PANGO_LIBS=`$PKG_CONFIG --libs $PANGO_PACKAGES`
1679 AC_MSG_RESULT($PANGO_CFLAGS $PANGO_LIBS)
1682 *** Pango not found. Pango built with Cairo support is required
1683 *** to build GTK+. See http://www.pango.org for Pango information.
1687 CFLAGS="$CFLAGS $PANGO_CFLAGS"
1689 if $PKG_CONFIG --uninstalled $PANGO_PACKAGES; then
1692 gtk_save_LIBS="$LIBS"
1693 LIBS="$PANGO_LIBS $LIBS"
1694 AC_TRY_LINK_FUNC(pango_context_new, :, AC_MSG_ERROR([
1695 *** Can't link to Pango. Pango is required to build
1696 *** GTK+. For more information see http://www.pango.org]))
1697 LIBS="$gtk_save_LIBS"
1700 CFLAGS="$saved_cflags"
1701 LDFLAGS="$saved_ldflags"
1703 GDK_PACKAGES="$PANGO_PACKAGES gio-2.0"
1704 if test "x$gdktarget" = "xx11"; then
1705 GDK_PACKAGES="$GDK_PACKAGES $X_PACKAGES cairo-xlib"
1707 GDK_DEP_LIBS="$GDK_EXTRA_LIBS `$PKG_CONFIG --libs $GDK_PIXBUF_PACKAGES $GDK_PACKAGES` $GDK_PIXBUF_EXTRA_LIBS"
1708 GDK_DEP_CFLAGS="`$PKG_CONFIG --cflags gthread-2.0 $GDK_PIXBUF_PACKAGES $GDK_PACKAGES` $GDK_PIXBUF_EXTRA_CFLAGS $GDK_EXTRA_CFLAGS"
1711 # If we aren't writing explicit dependencies, then don't put the extra libraries we need
1712 # into the pkg-config files
1714 if test $enable_explicit_deps != yes ; then
1715 GDK_PACKAGES="$PANGO_PACKAGES"
1719 AC_SUBST(GDK_PACKAGES)
1720 AC_SUBST(GDK_EXTRA_LIBS)
1721 AC_SUBST(GDK_EXTRA_CFLAGS)
1722 AC_SUBST(GDK_DEP_LIBS)
1723 AC_SUBST(GDK_DEP_CFLAGS)
1726 ########################################
1727 # Check for Accessibility Toolkit flags
1728 ########################################
1731 AC_MSG_CHECKING(ATK flags)
1732 if $PKG_CONFIG --exists $ATK_PACKAGES ; then
1733 ATK_CFLAGS=`$PKG_CONFIG --cflags $ATK_PACKAGES`
1734 ATK_LIBS=`$PKG_CONFIG --libs $ATK_PACKAGES`
1736 AC_MSG_RESULT($ATK_CFLAGS $ATK_LIBS)
1739 *** Accessibility Toolkit not found. Accessibility Toolkit is required
1744 if $PKG_CONFIG --uninstalled $ATK_PACKAGES; then
1747 gtk_save_LIBS="$LIBS"
1748 LIBS="$ATK_LIBS $LIBS"
1749 AC_TRY_LINK_FUNC(atk_object_get_type, : , AC_MSG_ERROR([
1750 *** Cannot link to Accessibility Toolkit. Accessibility Toolkit is required
1751 *** to build GTK+]))
1752 LIBS="$gtk_save_LIBS"
1755 GTK_PACKAGES="atk cairo gio-2.0"
1756 if test "x$gdktarget" = "xx11"; then
1757 GTK_PACKAGES="$GTK_PACKAGES pangoft2"
1761 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"
1762 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"
1764 if test x"$os_win32" = xyes; then
1765 GTK_EXTRA_CFLAGS="$msnative_struct"
1768 GLIB_PREFIX="`$PKG_CONFIG --variable=prefix glib-2.0`"
1769 ATK_PREFIX="`$PKG_CONFIG --variable=prefix atk`"
1770 PANGO_PREFIX="`$PKG_CONFIG --variable=prefix pango`"
1771 CAIRO_PREFIX="`pkg-config --variable=prefix cairo`"
1773 if test $enable_explicit_deps != yes ; then
1774 GDK_PIXBUF_EXTRA_LIBS=
1777 AC_SUBST(GDK_PIXBUF_PACKAGES)
1778 AC_SUBST(GDK_PIXBUF_EXTRA_LIBS)
1779 AC_SUBST(GDK_PIXBUF_EXTRA_CFLAGS)
1780 AC_SUBST(GDK_PIXBUF_DEP_LIBS)
1781 AC_SUBST(GDK_PIXBUF_DEP_CFLAGS)
1783 AC_SUBST(GTK_PACKAGES)
1784 AC_SUBST(GTK_EXTRA_LIBS)
1785 AC_SUBST(GTK_EXTRA_CFLAGS)
1786 AC_SUBST(GTK_DEP_LIBS)
1787 AC_SUBST(GTK_DEP_CFLAGS)
1789 AC_SUBST(GLIB_PREFIX)
1790 AC_SUBST(ATK_PREFIX)
1791 AC_SUBST(PANGO_PREFIX)
1792 AC_SUBST(CAIRO_PREFIX)
1794 AC_SUBST(GTK_DEBUG_FLAGS)
1795 AC_SUBST(GTK_XIM_FLAGS)
1797 ########################
1798 # Checks needed for gail
1799 ########################
1802 dnl Checks for inet libraries:
1803 AC_SEARCH_LIBS(gethostent, nsl)
1804 AC_SEARCH_LIBS(setsockopt, socket)
1805 AC_SEARCH_LIBS(connect, inet)
1807 dnl check for the sockaddr_un.sun_len member
1808 AC_CHECK_MEMBER([struct sockaddr_un.sun_len],
1809 [struct_sockaddr_un_sun_len=true],
1810 [struct_sockaddr_un_suin_len=false],
1811 [#include <sys/types.h>
1812 #include <sys/un.h>]
1814 case $struct_sockaddr_un_sun_len in
1816 AC_DEFINE_UNQUOTED(HAVE_SOCKADDR_UN_SUN_LEN, 1,
1817 [Have the sockaddr_un.sun_len member])
1823 GAIL_INET_LIBS="$LIBS"
1824 AC_SUBST([GAIL_INET_LIBS])
1828 ################################################################
1829 # Printing system checks
1830 ################################################################
1833 [AC_HELP_STRING([--disable-cups]
1834 [disable cups print backend])],,
1837 if test "x$enable_cups" = "xauto"
1839 AC_PATH_PROG(CUPS_CONFIG, cups-config, no)
1840 if test "x$CUPS_CONFIG" != "xno"; then
1841 CUPS_CFLAGS=`$CUPS_CONFIG --cflags | sed 's/-O[0-9]*//' | sed 's/-m[^\t]*//g'`
1842 CUPS_LIBS=`$CUPS_CONFIG --libs`
1844 CUPS_API_VERSION=`$CUPS_CONFIG --api-version`
1845 CUPS_API_MAJOR=`echo $ECHO_N $CUPS_API_VERSION | awk -F. '{print $1}'`
1846 CUPS_API_MINOR=`echo $ECHO_N $CUPS_API_VERSION | awk -F. '{print $2}'`
1848 if test $CUPS_API_MAJOR -gt 1 -o \
1849 $CUPS_API_MAJOR -eq 1 -a $CUPS_API_MINOR -ge 2; then
1850 AC_DEFINE(HAVE_CUPS_API_1_2, 1,
1851 [Define to 1 if CUPS 1.2 API is available])
1854 AC_SUBST(CUPS_API_MAJOR)
1855 AC_SUBST(CUPS_API_MINOR)
1856 AC_SUBST(CUPS_CFLAGS)
1859 AC_CHECK_HEADER(cups/cups.h,,AC_MSG_ERROR([[*** Sorry, cups-config present but cups/cups.h missing.]]))
1861 AM_CONDITIONAL(HAVE_CUPS, test "x$CUPS_CONFIG" != "xno")
1863 gtk_save_cflags="$CFLAGS"
1864 CFLAGS="$CUPS_CFLAGS"
1865 AC_TRY_COMPILE([#include <cups/http.h>],
1866 [http_t http; char *s = http.authstring;],
1867 [AC_DEFINE(HAVE_HTTP_AUTHSTRING, [],
1868 [Define if cups http_t authstring field is accessible])],)
1869 CFLAGS="$gtk_save_cflags"
1871 AC_SUBST(HAVE_HTTP_AUTHSTRING)
1873 gtk_save_libs="$LIBS"
1875 AC_CHECK_FUNCS(httpGetAuthString)
1876 LIBS="$gtk_save_libs"
1879 AM_CONDITIONAL(HAVE_CUPS, false)
1882 gtk_save_cppflags="$CPPFLAGS"
1883 CPPFLAGS="$CPPFLAGS $GTK_DEP_CFLAGS"
1885 AC_CHECK_HEADER(cairo-pdf.h,,AC_MSG_ERROR([
1886 *** Can't find cairo-pdf.h. You must build Cairo with the pdf
1887 *** backend enabled.]))
1889 if test "$os_win32" != "yes"; then
1890 AC_CHECK_HEADER(cairo-ps.h,,AC_MSG_ERROR([
1891 *** Can't find cairo-ps.h. You must build Cairo with the
1892 *** postscript backend enabled.]))
1895 CPPFLAGS="$gtk_save_cppflags"
1898 AC_ARG_ENABLE(test-print-backend,
1899 [AC_HELP_STRING([--enable-test-print-backend],
1900 [build test print backend])],,
1901 [enable_test_print_backend=no])
1902 AM_CONDITIONAL(TEST_PRINT_BACKEND, test "x$enable_test_print_backend" != "xno")
1905 ################################################################
1906 # Strip -export-dynamic from the link lines of various libraries
1907 ################################################################
1910 # pkg-config --libs gmodule includes the "export_dynamic" flag,
1911 # but this flag is only meaningful for executables. For libraries
1912 # the effect is undefined; what it causes on Linux is that the
1913 # export list from -export-symbols-regex is ignored and everything
1916 # We are using gmodule-no-export now, but I'm leaving the stripping
1917 # code in place for now, since pango and atk still require gmodule.
1919 export_dynamic=`(./libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh`
1920 if test -n "$export_dynamic"; then
1921 GDK_PIXBUF_DEP_LIBS=`echo $GDK_PIXBUF_DEP_LIBS | sed -e "s/$export_dynamic//"`
1922 GDK_PIXBUF_XLIB_DEP_LIBS=`echo $GDK_PIXBUF_XLIB_DEP_LIBS | sed -e "s/$export_dynamic//"`
1923 GDK_DEP_LIBS=`echo $GDK_DEP_LIBS | sed -e "s/$export_dynamic//"`
1924 GTK_DEP_LIBS=`echo $GTK_DEP_LIBS | sed -e "s/$export_dynamic//"`
1928 ##################################################
1929 # Checks for gtk-doc and docbook-tools
1930 ##################################################
1932 GTK_DOC_CHECK([1.11])
1934 AC_CHECK_PROG(DB2HTML, db2html, true, false)
1935 AM_CONDITIONAL(HAVE_DOCBOOK, $DB2HTML)
1938 [AC_HELP_STRING([--enable-man],
1939 [regenerate man pages from Docbook [default=no]])],enable_man=yes,
1942 if test "${enable_man}" != no; then
1944 dnl Check for xsltproc
1946 AC_PATH_PROG([XSLTPROC], [xsltproc])
1947 if test -z "$XSLTPROC"; then
1951 dnl check for DocBook DTD and stylesheets in the local catalog.
1952 JH_CHECK_XML_CATALOG([-//OASIS//DTD DocBook XML V4.1.2//EN],
1953 [DocBook XML DTD V4.1.2],,enable_man=no)
1954 JH_CHECK_XML_CATALOG([http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl],
1955 [DocBook XSL Stylesheets],,enable_man=no)
1958 AM_CONDITIONAL(ENABLE_MAN, test x$enable_man != xno)
1961 ##################################################
1963 ##################################################
1965 AC_CONFIG_COMMANDS([gdk/gdkconfig.h], [
1966 outfile=gdkconfig.h-tmp
1967 cat > $outfile <<\_______EOF
1970 * This is a generated file. Please modify `configure.in'
1978 #endif /* __cplusplus */
1981 /* introduce GSEAL() here for all of Gdk and Gtk+ without the need to modify GLib */
1982 # ifdef GSEAL_ENABLE
1983 # define GSEAL(ident) _g_sealed__ ## ident
1985 # define GSEAL(ident) ident
1991 cat >>$outfile <<_______EOF
1996 cat >>$outfile <<_______EOF
2000 #endif /* __cplusplus */
2002 #endif /* GDKCONFIG_H */
2006 if cmp -s $outfile gdk/gdkconfig.h; then
2007 AC_MSG_NOTICE([gdk/gdkconfig.h is unchanged])
2010 mv $outfile gdk/gdkconfig.h
2013 if test "x$gdktarget" = "xx11" ; then
2015 #define GDK_WINDOWING_X11'
2016 elif test "x$gdktarget" = "xwin32" ; then
2018 #define GDK_NATIVE_WINDOW_POINTER
2020 #define GDK_WINDOWING_WIN32'
2021 elif test "x$gdktarget" = "xquartz" ; then
2023 #define GDK_WINDOWING_QUARTZ'
2024 elif test "x$gdktarget" = "xdirectfb" ; then
2026 #define GDK_WINDOWING_DIRECTFB'
2029 if test x$gdk_wchar_h = xyes; then
2031 #define GDK_HAVE_WCHAR_H 1'
2033 if test x$gdk_wctype_h = xyes; then
2035 #define GDK_HAVE_WCTYPE_H 1"
2037 if test x$gdk_working_wctype = xno; then
2039 #define GDK_HAVE_BROKEN_WCTYPE 1"
2052 gtk+-unix-print-2.0.pc
2054 gdk-pixbuf-2.0-uninstalled.pc
2055 gdk-2.0-uninstalled.pc
2056 gtk+-2.0-uninstalled.pc
2060 po-properties/Makefile.in
2062 demos/gtk-demo/Makefile
2063 demos/gtk-demo/geninclude.pl
2066 docs/reference/Makefile
2067 docs/reference/gdk-pixbuf/Makefile
2068 docs/reference/gdk-pixbuf/version.xml
2069 docs/reference/gdk/Makefile
2070 docs/reference/gdk/version.xml
2071 docs/reference/gtk/Makefile
2072 docs/reference/gtk/version.xml
2073 docs/reference/libgail-util/Makefile
2076 docs/tutorial/Makefile
2078 gdk-pixbuf/gdk_pixbuf.rc
2079 gdk-pixbuf/gdk-pixbuf-features.h
2080 gdk-pixbuf/pixops/Makefile
2084 gdk/win32/rc/Makefile
2087 gdk/directfb/Makefile
2093 gtk/theme-bits/Makefile
2096 modules/other/Makefile
2097 modules/other/gail/Makefile
2098 modules/other/gail/libgail-util/Makefile
2099 modules/other/gail/tests/Makefile
2100 modules/engines/Makefile
2101 modules/engines/pixbuf/Makefile
2102 modules/engines/ms-windows/Makefile
2103 modules/engines/ms-windows/Theme/Makefile
2104 modules/engines/ms-windows/Theme/gtk-2.0/Makefile
2105 modules/input/Makefile
2106 modules/printbackends/Makefile
2107 modules/printbackends/cups/Makefile
2108 modules/printbackends/lpr/Makefile
2109 modules/printbackends/file/Makefile
2110 modules/printbackends/test/Makefile
2113 contrib/gdk-pixbuf-xlib/Makefile
2114 contrib/gdk-pixbuf-xlib/gdk-pixbuf-xlib-2.0.pc
2119 echo "configuration: