]> Pileus Git - ~andy/gtk/blob - configure.in
GdkPixbuf loader for QTIF format
[~andy/gtk] / configure.in
1 # Process this file with autoconf to produce a configure script.
2 # require autoconf 2.54
3 AC_PREREQ(2.54)
4
5 # Making releases:
6 #   GTK_MICRO_VERSION += 1;
7 #   GTK_INTERFACE_AGE += 1;
8 #   GTK_BINARY_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.
12
13 m4_define([gtk_major_version], [2])
14 m4_define([gtk_minor_version], [19])
15 m4_define([gtk_micro_version], [0])
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])
23
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
28 # for GTK+.
29 #
30 #GTK_BINARY_VERSION=$GTK_MAJOR_VERSION.$GTK_MINOR_VERSION.$LT_CURRENT
31 m4_define([gtk_binary_version], [2.10.0])
32
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.13.0])
37 m4_define([cairo_required_version], [1.6])
38
39
40 AC_INIT([gtk+], [gtk_version],
41         [http://bugzilla.gnome.org/enter_bug.cgi?product=gtk%2B],
42         [gtk+])
43
44 AC_CONFIG_SRCDIR([gdk/gdktypes.h])
45
46 # Save this value here, since automake will set cflags later
47 cflags_set=${CFLAGS+set}
48
49 AM_INIT_AUTOMAKE(no-define)
50 AM_CONFIG_HEADER(config.h)
51
52 # Support silent build rules, requires at least automake-1.11. Enable
53 # by either passing --enable-silent-rules to configure or passing V=0
54 # to make
55 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([no])])
56
57 #
58 # For each of the libraries we build, we define the following
59  
60 # substituted variables:
61 #
62 # foo_PACKAGES:     pkg-config packages this library requires
63 # foo_EXTRA_LIBS:   Libraries this module requires not pulled in by pkg-config
64 # foo_EXTRA_CFLAGS: cflags this module requires not pulled in by pkg-config
65 # foo_DEP_LIBS:     All libraries this module requires
66 # foo_DEP_CFLAGS:   All cflags this module requires
67
68
69 GTK_MAJOR_VERSION=gtk_major_version
70 GTK_MINOR_VERSION=gtk_minor_version
71 GTK_MICRO_VERSION=gtk_micro_version
72 GTK_INTERFACE_AGE=gtk_interface_age
73 GTK_BINARY_AGE=gtk_binary_age
74 GTK_VERSION=gtk_version
75 GTK_API_VERSION=gtk_api_version
76 GTK_BINARY_VERSION=gtk_binary_version
77 AC_SUBST(GTK_MAJOR_VERSION)
78 AC_SUBST(GTK_MINOR_VERSION)
79 AC_SUBST(GTK_MICRO_VERSION)
80 AC_SUBST(GTK_INTERFACE_AGE)
81 AC_SUBST(GTK_BINARY_AGE)
82 AC_SUBST(GTK_API_VERSION)
83 AC_SUBST(GTK_VERSION)
84 AC_SUBST(GTK_BINARY_VERSION)
85
86 # libtool versioning
87 #LT_RELEASE=$GTK_MAJOR_VERSION.$GTK_MINOR_VERSION
88 #LT_CURRENT=`expr $GTK_MICRO_VERSION - $GTK_INTERFACE_AGE`
89 #LT_REVISION=$GTK_INTERFACE_AGE
90 #LT_AGE=`expr $GTK_BINARY_AGE - $GTK_INTERFACE_AGE`
91 #LT_CURRENT_MINUS_AGE=`expr $LT_CURRENT - $LT_AGE`
92
93 m4_define([lt_current], [m4_eval(100 * gtk_minor_version + gtk_micro_version - gtk_interface_age)])
94 m4_define([lt_revision], [gtk_interface_age])
95 m4_define([lt_age], [m4_eval(gtk_binary_age - gtk_interface_age)])
96 LT_VERSION_INFO="lt_current:lt_revision:lt_age"
97 LT_CURRENT_MINUS_AGE=m4_eval(lt_current - lt_age)
98 AC_SUBST(LT_VERSION_INFO)
99 AC_SUBST(LT_CURRENT_MINUS_AGE)
100
101 m4_define([gail_lt_current],[18])
102 m4_define([gail_lt_revision],[1])
103 m4_define([gail_lt_age],[0])
104 m4_define([gail_lt_version_info],[gail_lt_current:gail_lt_revision:gail_lt_age])
105 m4_define([gail_lt_current_minus_age],[m4_eval(gail_lt_current - gail_lt_age)])
106 AC_SUBST([GAIL_LT_VERSION_INFO],[gail_lt_version_info])
107 AC_SUBST([GAIL_LT_CURRENT_MINUS_AGE],[gail_lt_current_minus_age])
108
109 #
110 # gdk-pixbuf gets versioned separately, and for now, using standard
111 # libtool versioning, not GTK+-style versioning
112 #
113 GDK_PIXBUF_MAJOR=gtk_major_version
114 GDK_PIXBUF_MINOR=gtk_minor_version
115 GDK_PIXBUF_MICRO=gtk_micro_version
116 GDK_PIXBUF_VERSION="${GDK_PIXBUF_MAJOR}.${GDK_PIXBUF_MINOR}.${GDK_PIXBUF_MICRO}"
117 AC_SUBST(GDK_PIXBUF_MAJOR)
118 AC_SUBST(GDK_PIXBUF_MINOR)
119 AC_SUBST(GDK_PIXBUF_MICRO)
120 AC_SUBST(GDK_PIXBUF_VERSION)
121
122 GETTEXT_PACKAGE=gtk20
123 AC_SUBST(GETTEXT_PACKAGE)
124 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE",
125                    [The prefix for our gettext translation domains.])
126
127 AC_CANONICAL_HOST
128
129 MATH_LIB=-lm
130 AC_MSG_CHECKING([for native Win32])
131 LIB_EXE_MACHINE_FLAG=X86
132 case "$host" in
133   *-*-mingw*)
134     os_win32=yes
135     gio_can_sniff=no
136     MATH_LIB=
137     case "$host" in
138     x86_64-*-*)
139       LIB_EXE_MACHINE_FLAG=X64
140       ;;
141     esac
142     ;;
143   *)
144     os_win32=no
145     ;;
146 esac
147 AC_MSG_RESULT([$os_win32])
148
149 AC_SUBST(LIB_EXE_MACHINE_FLAG)
150
151 case $host in
152   *-*-linux*)
153     os_linux=yes
154     ;;
155 esac
156
157 dnl Initialize libtool
158 AC_PROG_CC
159 AM_DISABLE_STATIC
160
161 dnl 
162 dnl Check for a working C++ compiler, but do not bail out, if none is found.
163 dnl We use this for an automated test for C++ header correctness.
164 dnl 
165 AC_CHECK_TOOLS(CXX, [$CCC c++ g++ gcc CC cxx cc++ cl], gcc)
166 AC_LANG_SAVE
167 AC_LANG_CPLUSPLUS
168
169 AC_TRY_COMPILE(,[class a { int b; } c;], ,CXX=)
170 AM_CONDITIONAL(HAVE_CXX, test "$CXX" != "")
171
172 gtk_save_cxxflags="$CXXFLAGS"
173 CXXFLAGS="$CXXFLAGS -x objective-c++"
174 AC_TRY_COMPILE([@interface Foo @end],,OBJC=yes,OBJC=no)
175 AM_CONDITIONAL(HAVE_OBJC, test "$OBJC" = "yes")
176 CXXFLAGS="$gtk_save_cxxflags"
177 AC_LANG_RESTORE
178
179 if test "$os_win32" = "yes"; then
180   if test x$enable_static = xyes -o x$enable_static = x; then
181     AC_MSG_WARN([Disabling static library build, must build as DLL on Windows.])
182     enable_static=no
183   fi
184   if test x$enable_shared = xno; then
185     AC_MSG_WARN([Enabling shared library build, must build as DLL on Windows.])
186   fi
187   enable_shared=yes
188 fi
189
190 AC_LIBTOOL_WIN32_DLL
191 AM_PROG_LIBTOOL
192 dnl when using libtool 2.x create libtool early, because it's used in configure
193 m4_ifdef([LT_OUTPUT], [LT_OUTPUT])
194
195
196 # Make sure we use 64-bit versions of various file stuff.
197 AC_SYS_LARGEFILE
198
199 AM_PROG_AS
200 AC_PATH_PROG(NM, nm, nm)
201
202 dnl Initialize maintainer mode
203 AM_MAINTAINER_MODE
204
205 AC_MSG_CHECKING([for some Win32 platform])
206 case "$host" in
207   *-*-mingw*|*-*-cygwin*)
208     platform_win32=yes
209     ;;
210   *)
211     platform_win32=no
212     ;;
213 esac
214 AC_MSG_RESULT([$platform_win32])
215 AM_CONDITIONAL(PLATFORM_WIN32, test "$platform_win32" = "yes")
216
217 AM_CONDITIONAL(OS_WIN32, test "$os_win32" = "yes")
218 AM_CONDITIONAL(OS_UNIX, test "$os_win32" != "yes")
219 AM_CONDITIONAL(OS_LINUX, test "$os_linux" = "yes")
220
221 if test "$os_win32" = "yes"; then
222   AC_CHECK_TOOL(WINDRES, windres, no)
223   if test "$WINDRES" = no; then
224     AC_MSG_ERROR([*** Could not find an implementation of windres in your PATH.])
225   fi
226   AC_CHECK_PROG(ms_librarian, lib.exe, yes, no)
227 fi
228 AM_CONDITIONAL(MS_LIB_AVAILABLE, test x$ms_librarian = xyes)
229
230 m4_define([debug_default],
231           m4_if(m4_eval(gtk_minor_version % 2), [1], [yes], [minimum]))
232
233 dnl declare --enable-* args and collect ac_help strings
234 AC_ARG_ENABLE(debug,
235               AC_HELP_STRING([--enable-debug=@<:@no/minimum/yes@:>@],
236                              [turn on debugging @<:@default=debug_default@:>@]),,
237               enable_debug=debug_default)
238 AC_ARG_ENABLE(shm,
239               [AC_HELP_STRING([--enable-shm],
240                               [support shared memory if available [default=yes]])],,
241               [enable_shm="yes"])
242 AC_ARG_ENABLE(xkb,
243               [AC_HELP_STRING([--enable-xkb],
244                               [support XKB [default=maybe]])],,
245               [enable_xkb="maybe"])
246 AC_ARG_ENABLE(xinerama,
247               [AC_HELP_STRING([--enable-xinerama],
248                               [support xinerama extension if available [default=yes]])],,
249               [enable_xinerama="yes"])
250 AC_ARG_ENABLE(rebuilds,
251               [AC_HELP_STRING([--disable-rebuilds],
252                               [disable all source autogeneration rules])],,
253               [enable_rebuilds=yes])
254 AC_ARG_ENABLE(visibility,
255               [AC_HELP_STRING([--disable-visibility],
256                               [don't use ELF visibility attributes])],,
257               [enable_visibility=yes])
258
259 AC_ARG_WITH(xinput,
260             [AC_HELP_STRING([--with-xinput=@<:@no/yes@:>@], [support XInput])])
261
262 if test "$platform_win32" = yes; then
263   gdktarget=win32
264 else
265   gdktarget=x11
266 fi
267
268 AC_ARG_WITH(gdktarget, [  --with-gdktarget=[[x11/win32/quartz/directfb]] select non-default GDK target],
269         gdktarget=$with_gdktarget)
270
271 AC_SUBST(gdktarget)
272 case $gdktarget in
273   x11|win32|quartz|directfb) ;;
274   *) AC_MSG_ERROR([Invalid target for GDK: use x11, quartz, directfb or win32.]);;
275 esac
276
277 gdktargetlib=libgdk-$gdktarget-$GTK_API_VERSION.la
278 gtktargetlib=libgtk-$gdktarget-$GTK_API_VERSION.la
279
280 AC_SUBST(gdktargetlib)
281 AC_SUBST(gtktargetlib)
282
283 if test "x$enable_debug" = "xyes"; then
284   test "$cflags_set" = set || CFLAGS="$CFLAGS -g"
285   GTK_DEBUG_FLAGS="-DG_ENABLE_DEBUG -DG_ERRORCHECK_MUTEXES" 
286 else
287   if test "x$enable_debug" = "xno"; then
288     GTK_DEBUG_FLAGS="-DG_DISABLE_ASSERT -DG_DISABLE_CHECKS -DG_DISABLE_CAST_CHECKS"
289   else
290     GTK_DEBUG_FLAGS="-DG_DISABLE_CAST_CHECKS"
291   fi
292 fi
293
294
295 if test "x$enable_visibility" = "xno"; then
296   GTK_DEBUG_FLAGS="$GTK_DEBUG_FLAGS -DDISABLE_VISIBILITY"
297 fi
298
299
300 AC_DEFINE_UNQUOTED(GTK_COMPILED_WITH_DEBUGGING, "${enable_debug}",
301                    [Define if debugging is enabled])
302
303                         
304 # Build time sanity check...
305 AM_SANITY_CHECK
306
307 # Checks for programs.
308 AC_ISC_POSIX
309 AM_PROG_CC_STDC
310 AM_PROG_CC_C_O
311 AC_PROG_INSTALL
312 AC_PROG_MAKE_SET
313
314 changequote(,)dnl
315 if test "x$GCC" = "xyes"; then
316   case " $CFLAGS " in
317   *[\ \ ]-Wall[\ \      ]*) ;;
318   *) CFLAGS="$CFLAGS -Wall" ;;
319   esac
320
321   if test "x$enable_ansi" = "xyes"; then
322     case " $CFLAGS " in
323     *[\ \       ]-ansi[\ \      ]*) ;;
324     *) CFLAGS="$CFLAGS -ansi" ;;
325     esac
326
327     case " $CFLAGS " in
328     *[\ \       ]-pedantic[\ \  ]*) ;;
329     *) CFLAGS="$CFLAGS -pedantic" ;;
330     esac
331   fi
332 fi
333 changequote([,])dnl
334
335 CPPFLAGS="$CPPFLAGS -DG_DISABLE_SINGLE_INCLUDES -DATK_DISABLE_SINGLE_INCLUDES -DGDK_PIXBUF_DISABLE_SINGLE_INCLUDES -DGTK_DISABLE_SINGLE_INCLUDES"
336
337 # Ensure MSVC-compatible struct packing convention is used when
338 # compiling for Win32 with gcc.
339 # What flag to depends on gcc version: gcc3 uses "-mms-bitfields", while
340 # gcc2 uses "-fnative-struct".
341 if test x"$os_win32" = xyes; then
342   if test x"$GCC" = xyes; then
343     msnative_struct=''
344     AC_MSG_CHECKING([how to get MSVC-compatible struct packing])
345     if test -z "$ac_cv_prog_CC"; then
346       our_gcc="$CC"
347     else
348       our_gcc="$ac_cv_prog_CC"
349     fi
350     case `$our_gcc --version | sed -e 's,\..*,.,' -e q` in
351       2.)
352         if $our_gcc -v --help 2>/dev/null | grep fnative-struct >/dev/null; then
353           msnative_struct='-fnative-struct'
354         fi
355         ;;
356       *)
357         if $our_gcc -v --help 2>/dev/null | grep ms-bitfields >/dev/null; then
358           msnative_struct='-mms-bitfields'
359         fi
360         ;;
361     esac
362     if test x"$msnative_struct" = x ; then
363       AC_MSG_RESULT([no way])
364       AC_MSG_WARN([produced libraries might be incompatible with MSVC-compiled code])
365     else
366       CFLAGS="$CFLAGS $msnative_struct"
367       AC_MSG_RESULT([${msnative_struct}])
368     fi
369   fi
370 fi
371
372 # Honor aclocal flags
373 ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
374
375 ## Initial sanity check, done here so that users get told they 
376 ## have the wrong dependencies as early in the process as possible.
377 ## Later on we actually use the cflags/libs from separate pkg-config
378 ## calls. Oh, also the later pkg-config calls don't include 
379 ## the version requirements since those make the module lists 
380 ## annoying to construct
381 PKG_CHECK_MODULES(BASE_DEPENDENCIES,
382   [glib-2.0 >= glib_required_version dnl
383    atk >= atk_required_version dnl
384    pango >= pango_required_version dnl
385    cairo >= cairo_required_version])
386
387 ## In addition to checking that cairo is present, we also need to
388 ## check that the correct cairo backend is there. E.g. if the GDK
389 ## target is win32 we need the cairo-win32 backend and so on.
390 cairo_backend=$gdktarget
391
392 # GDK calls the xlib backend "x11," cairo calls it "xlib." Other
393 # backend names are identical.
394 if test "x$cairo_backend" = "xx11"; then
395    cairo_backend=xlib
396 fi
397 PKG_CHECK_MODULES(CAIRO_BACKEND,
398   [cairo-$cairo_backend >= cairo_required_version])
399
400 if test "$os_win32" != yes; then
401     # libtool option to control which symbols are exported
402     # right now, symbols starting with _ are not exported
403     LIBTOOL_EXPORT_OPTIONS='-export-symbols-regex "^[[^_]].*"'
404 else
405     # We currently use .def files on Windows (for gdk-pixbuf, gdk and gtk)
406     LIBTOOL_EXPORT_OPTIONS=
407 fi
408 AC_SUBST(LIBTOOL_EXPORT_OPTIONS)
409
410 dnl ******************************************************
411 dnl * See whether to include shared library dependencies *
412 dnl ******************************************************
413
414 AC_ARG_ENABLE(explicit-deps, 
415               [AC_HELP_STRING([--enable-explicit-deps=@<:@yes/no/auto@:>@],
416                               [use explicit dependencies in .pc files [default=auto]])],,
417               [enable_explicit_deps=auto])
418
419 AC_MSG_CHECKING([Whether to write dependencies into .pc files])
420 case $enable_explicit_deps in
421   auto)
422     export SED
423     deplibs_check_method=`(./libtool --config; echo 'eval echo \"$deplibs_check_method\"') | sh`
424     if test "x$deplibs_check_method" '!=' xpass_all || test "x$enable_static" = xyes ; then
425       enable_explicit_deps=yes  
426     else
427       enable_explicit_deps=no  
428     fi
429   ;;
430   yes|no) 
431   ;;
432   *) AC_MSG_ERROR([Value given to --enable-explicit-deps must be one of yes, no or auto])
433   ;;
434 esac
435 AC_MSG_RESULT($enable_explicit_deps)
436
437 AM_CONDITIONAL(DISABLE_EXPLICIT_DEPS, test $enable_explicit_deps = no)
438
439 # define a MAINT-like variable REBUILD which is set if Perl
440 # and awk are found, so autogenerated sources can be rebuilt
441
442 AC_PATH_PROGS(PERL, perl5 perl)
443
444 # We would like indent, but don't require it.
445 AC_CHECK_PROG(INDENT, indent, indent)
446
447 REBUILD=\#
448 if test "x$enable_rebuilds" = "xyes" && \
449      test -n "$PERL" && \
450      $PERL -e 'exit !($] >= 5.002)' > /dev/null 2>&1 ; then
451   REBUILD=
452 fi
453 AC_SUBST(REBUILD)
454
455 AC_CHECK_FUNCS(lstat mkstemp flockfile getc_unlocked)
456 AC_CHECK_FUNCS(localtime_r)
457
458 # _NL_TIME_FIRST_WEEKDAY is an enum and not a define
459 AC_MSG_CHECKING([for _NL_TIME_FIRST_WEEKDAY])
460 AC_TRY_LINK([#include <langinfo.h>], [
461 char c;
462 c = *((unsigned char *)  nl_langinfo(_NL_TIME_FIRST_WEEKDAY));
463 ], gtk_ok=yes, gtk_ok=no)
464 AC_MSG_RESULT($gtk_ok)
465 if test "$gtk_ok" = "yes"; then
466   AC_DEFINE([HAVE__NL_TIME_FIRST_WEEKDAY], [1],
467             [Define if _NL_TIME_FIRST_WEEKDAY is available])
468 fi
469
470 # _NL_MEASUREMENT_MEASUREMENT is an enum and not a define
471 AC_MSG_CHECKING([for _NL_MEASUREMENT_MEASUREMENT])
472 AC_TRY_LINK([#include <langinfo.h>], [
473 char c;
474 c = *((unsigned char *)  nl_langinfo(_NL_MEASUREMENT_MEASUREMENT));
475 ], gtk_ok=yes, gtk_ok=no)
476 AC_MSG_RESULT($gtk_ok)
477 if test "$gtk_ok" = "yes"; then
478   AC_DEFINE([HAVE__NL_MEASUREMENT_MEASUREMENT], [1],
479             [Define if _NL_MEASUREMENT_MEASUREMENT is available])
480 fi
481
482 # _NL_PAPER_HEIGHT is an enum and not a define
483 AC_MSG_CHECKING([for _NL_PAPER_HEIGHT])
484 AC_TRY_LINK([#include <langinfo.h>], [
485 char c;
486 c = *((unsigned char *)  nl_langinfo(_NL_PAPER_HEIGHT));
487 ], gtk_ok=yes, gtk_ok=no)
488 AC_MSG_RESULT($gtk_ok)
489 if test "$gtk_ok" = "yes"; then
490   AC_DEFINE([HAVE__NL_PAPER_HEIGHT], [1],
491             [Define if _NL_PAPER_HEIGHT is available])
492 fi
493
494 # _NL_PAPER_WIDTH is an enum and not a define
495 AC_MSG_CHECKING([for _NL_PAPER_WIDTH])
496 AC_TRY_LINK([#include <langinfo.h>], [
497 char c;
498 c = *((unsigned char *)  nl_langinfo(_NL_PAPER_WIDTH));
499 ], gtk_ok=yes, gtk_ok=no)
500 AC_MSG_RESULT($gtk_ok)
501 if test "$gtk_ok" = "yes"; then
502   AC_DEFINE([HAVE__NL_PAPER_WIDTH], [1],
503             [Define if _NL_PAPER_WIDTH is available])
504 fi
505         
506 # sigsetjmp is a macro on some platforms, so AC_CHECK_FUNCS is not reliable
507 AC_MSG_CHECKING(for sigsetjmp)
508 AC_TRY_LINK([#include <setjmp.h>], [
509 sigjmp_buf env;
510 sigsetjmp(env, 0);
511 ], gtk_ok=yes, gtk_ok=no)
512 AC_MSG_RESULT($gtk_ok)
513 if test "$gtk_ok" = "yes"; then
514   AC_DEFINE(HAVE_SIGSETJMP, 1,
515             [Define to 1 if sigsetjmp is available])
516 fi
517
518 # i18n stuff
519 ALL_LINGUAS="`grep -v '^#' "$srcdir/po/LINGUAS" | tr '\n' ' '`"
520 AM_GLIB_GNU_GETTEXT
521 LIBS="$LIBS $INTLLIBS"
522 AC_OUTPUT_COMMANDS([case "$CONFIG_FILES" in *po-properties/Makefile.in*)
523         sed -e "/POTFILES =/r po-properties/POTFILES" po-properties/Makefile.in > po-properties/Makefile
524       esac])
525
526 dnl Snippet below is copied from AM_GLIB_GNU_GETTEXT to generate a first
527 dnl po-properties/POTFILES during configure; see GNOME #573515.
528 dnl
529 dnl Generate list of files to be processed by xgettext which will
530 dnl be included in po-properties/Makefile.
531 test -d po-properties || mkdir po-properties
532 if test "x$srcdir" != "x."; then
533   if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
534     popropsrcprefix="$srcdir/"
535   else
536     popropsrcprefix="../$srcdir/"
537   fi
538 else
539   popropsrcprefix="../"
540 fi
541 rm -f po-properties/POTFILES
542 sed -e "/^#/d" -e "/^\$/d" -e "s,.*,    $popropsrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
543 < $srcdir/po-properties/POTFILES.in > po-properties/POTFILES
544 dnl (End of adapted AM_GLIB_GNU_GETTEXT snippet.)
545
546 AM_GLIB_DEFINE_LOCALEDIR(GTK_LOCALEDIR)
547
548 dnl The DU4 header files don't provide library prototypes unless 
549 dnl -std1 is given to the native cc.
550 AC_MSG_CHECKING([for extra flags to get ANSI library prototypes])
551
552 gtk_save_LIBS=$LIBS
553 LIBS="$LIBS -lm"
554 AC_TRY_RUN([#include <math.h>
555              int main (void) { return (log(1) != log(1.)); }],
556      AC_MSG_RESULT(none needed),
557      gtk_save_CFLAGS="$CFLAGS"
558      CFLAGS="$CFLAGS -std1"
559      AC_TRY_RUN([#include <math.h>
560                  int main (void) { return (log(1) != log(1.)); }],
561          AC_MSG_RESULT(-std1),
562          AC_MSG_RESULT()
563          CFLAGS="$gtk_save_CFLAGS"
564          AC_MSG_WARN(
565                 [No ANSI prototypes found in library. (-std1 didn't work.)]),
566          true
567      ),
568      AC_MSG_RESULT(none needed)
569 )
570 LIBS=$gtk_save_LIBS
571
572 AC_MSG_CHECKING(for the BeOS)
573 case $host in
574   *-*-beos*)
575     AC_MSG_RESULT(yes)
576     MATH_LIB=
577   ;;
578   *)
579     AC_MSG_RESULT(no)
580   ;;
581 esac
582
583 #
584 # see bug 162979
585 #
586 AC_MSG_CHECKING(for HP-UX)
587 case $host_os in
588   hpux9* | hpux10* | hpux11*)
589     AC_MSG_RESULT(yes)
590     CFLAGS="$CFLAGS -DHPPEX -DSHMLINK"
591   ;;
592   *)
593     AC_MSG_RESULT(no)
594   ;;
595 esac
596
597 dnl NeXTStep cc seems to need this
598 AC_MSG_CHECKING([for extra flags for POSIX compliance])
599 AC_TRY_COMPILE([#include <dirent.h>], [DIR *dir;],
600   AC_MSG_RESULT(none needed),
601   gtk_save_CFLAGS="$CFLAGS"
602   CFLAGS="$CFLAGS -posix"
603   AC_TRY_COMPILE([#include <dirent.h>], [DIR *dir;],
604     AC_MSG_RESULT(-posix),
605     AC_MSG_RESULT()
606     CFLAGS="$gtk_save_CFLAGS"
607     AC_MSG_WARN([Could not determine POSIX flag. (-posix didn't work.)])))
608
609 #
610 # Run AM_PATH_GLIB_2_0 to make sure that GLib is installed and working
611
612
613 GLIB_PACKAGES="gobject-2.0 gmodule-no-export-2.0"
614
615 AM_PATH_GLIB_2_0(glib_required_version, :,
616   AC_MSG_ERROR([
617 *** GLIB glib_required_version or better is required. The latest version of 
618 *** GLIB is always available from ftp://ftp.gtk.org/pub/gtk/.]),
619   gobject gmodule-no-export gthread)
620
621 # See if it's safe to turn G_DISABLE_DEPRECATED on.
622 GLIB_VERSION_MAJOR_MINOR=`$PKG_CONFIG --modversion glib-2.0 | sed "s/\.@<:@^.@:>@*\$//"`
623 GLIB_REQUIRED_VERSION_MAJOR_MINOR=`echo glib_required_version | sed "s/\.@<:@^.@:>@*\$//"`
624 if test "x$GLIB_VERSION_MAJOR_MINOR" = "x$GLIB_REQUIRED_VERSION_MAJOR_MINOR"; then
625   CFLAGS="-DG_DISABLE_DEPRECATED $CFLAGS"
626 fi
627
628 CFLAGS="-DGDK_PIXBUF_DISABLE_DEPRECATED $CFLAGS"
629
630
631 dnl
632 dnl Check for bind_textdomain_codeset, including -lintl if GLib brings it in.
633 dnl
634 gtk_save_LIBS=$LIBS
635 LIBS="$LIBS $GLIB_LIBS"
636 AC_CHECK_FUNCS(bind_textdomain_codeset)
637 LIBS=$gtk_save_LIBS
638
639 AC_CHECK_HEADERS(pwd.h,
640                  AC_DEFINE(HAVE_PWD_H, 1,
641                            [Define to 1 if pwd.h is available]))
642 AC_CHECK_HEADERS(sys/time.h,
643                  AC_DEFINE(HAVE_SYS_TIME_H, 1,
644                            [Define to 1 if time.h is available]))
645 AC_CHECK_HEADERS(unistd.h,
646                  AC_DEFINE(HAVE_UNISTD_H, 1,
647                            [Define to 1 if unistd.h is available]))
648 AC_CHECK_HEADERS(ftw.h,
649                  AC_DEFINE(HAVE_FTW_H, 1,
650                            [Define to 1 if ftw.h is available]))
651
652 AC_MSG_CHECKING([for GNU ftw extensions])
653 AC_TRY_COMPILE([#define _XOPEN_SOURCE 500
654 #define _GNU_SOURCE
655 #include <ftw.h>], [int flags = FTW_ACTIONRETVAL;], gtk_ok=yes, gtk_ok=no)
656 if test $gtk_ok = yes; then
657     AC_MSG_RESULT([yes])
658     AC_DEFINE(HAVE_GNU_FTW, 1, [Have GNU ftw])
659 else
660     AC_MSG_RESULT([no])
661 fi
662
663 saved_cflags="$CFLAGS"
664 saved_ldflags="$LDFLAGS"
665
666
667 # Checks for header files.
668 AC_HEADER_STDC
669
670 # Checks for typedefs, structures, and compiler characteristics.
671 AC_C_CONST
672
673 # Checks for library functions.
674 AC_TYPE_SIGNAL
675 AC_FUNC_MMAP
676
677 AC_CHECK_FUNCS(mallinfo)
678 AC_CHECK_FUNCS(getresuid)
679 AC_TYPE_UID_T
680
681 # Check if <sys/select.h> needs to be included for fd_set
682 AC_MSG_CHECKING([for fd_set])
683 AC_TRY_COMPILE([#include <sys/types.h>],
684         [fd_set readMask, writeMask;], gtk_ok=yes, gtk_ok=no)
685 if test $gtk_ok = yes; then
686     AC_MSG_RESULT([yes, found in sys/types.h])
687 else
688     AC_HEADER_EGREP(fd_mask, sys/select.h, gtk_ok=yes)
689     if test $gtk_ok = yes; then
690         AC_DEFINE(HAVE_SYS_SELECT_H, 1,
691                   [Define to 1 if sys/select.h is available])
692         AC_MSG_RESULT([yes, found in sys/select.h])
693     else
694         AC_DEFINE(NO_FD_SET, 1,
695                   [Define to 1 if fd_set is not available])
696         AC_MSG_RESULT(no)
697     fi
698 fi
699
700 # `widechar' tests for gdki18n.h
701 AC_MSG_CHECKING(for wchar.h)
702 AC_TRY_CPP([#include <wchar.h>], gdk_wchar_h=yes, gdk_wchar_h=no)
703 if test $gdk_wchar_h = yes; then
704    AC_DEFINE(HAVE_WCHAR_H, 1, [Have wchar.h include file])
705 fi
706 AC_MSG_RESULT($gdk_wchar_h)
707
708 # Check for wctype.h (for iswalnum)
709 AC_MSG_CHECKING(for wctype.h)
710 AC_TRY_CPP([#include <wctype.h>], gdk_wctype_h=yes, gdk_wctype_h=no)
711 if test $gdk_wctype_h = yes; then
712    AC_DEFINE(HAVE_WCTYPE_H, 1, [Have wctype.h include file])
713 fi
714 AC_MSG_RESULT($gdk_wctype_h)
715
716 # in Solaris 2.5, `iswalnum' is in -lw
717 GDK_WLIBS=
718 AC_CHECK_FUNC(iswalnum,,[AC_CHECK_LIB(w,iswalnum,GDK_WLIBS=-lw)])
719
720 oLIBS="$LIBS"
721 LIBS="$LIBS $GDK_WLIBS"
722 # The following is necessary for Linux libc-5.4.38
723 AC_MSG_CHECKING(if iswalnum() and friends are properly defined)
724 AC_TRY_LINK([#include <stdlib.h>],[
725 #if (defined(HAVE_WCTYPE_H) || defined(HAVE_WCHAR_H))
726 #  ifdef HAVE_WCTYPE_H
727 #    include <wctype.h>
728 #  else
729 #    ifdef HAVE_WCHAR_H
730 #      include <wchar.h>
731 #    endif
732 #  endif
733 #else
734 #  define iswalnum(c) ((wchar_t)(c) <= 0xFF && isalnum(c))
735 #endif
736 iswalnum((wchar_t) 0);
737 ], gdk_working_wctype=yes, gdk_working_wctype=no)
738 LIBS="$oLIBS"
739
740 if test $gdk_working_wctype = no; then
741    AC_DEFINE(HAVE_BROKEN_WCTYPE, 1, [Is the wctype implementation broken])
742    GDK_WLIBS=
743 fi
744 AC_MSG_RESULT($gdk_working_wctype)
745 AC_SUBST(GDK_WLIBS)
746
747 # Check for uxtheme.h (for MS-Windows Engine)
748 AC_MSG_CHECKING(for uxtheme.h)
749 AC_TRY_CPP([#include <uxtheme.h>], gtk_uxtheme_h=yes, gtk_uxtheme_h=no)
750 if test $gtk_uxtheme_h = yes; then
751    AC_DEFINE(HAVE_UXTHEME_H, 1, [Have uxtheme.h include file])
752 fi
753 AC_MSG_RESULT($gtk_uxtheme_h)
754
755 # Checks for gdkspawn
756 AC_CHECK_HEADERS(crt_externs.h)
757 AC_CHECK_FUNCS(_NSGetEnviron)
758
759
760 ##################################################
761 # Checks for gdk-pixbuf
762 ##################################################
763
764 dnl ********************************************************
765 dnl * See whether we need to load our modules as .la files *
766 dnl ********************************************************
767
768 use_la_modules=false
769 case $host in
770   *-aix*) use_la_modules=true
771 esac
772
773 if $use_la_modules ; then
774    AC_DEFINE(USE_LA_MODULES, 1,
775              [Whether to load modules via .la files rather than directly])
776 fi
777
778
779 AC_MSG_CHECKING(whether to build gmodulized gdk-pixbuf)
780
781 AC_ARG_ENABLE(modules,
782               [AC_HELP_STRING([--disable-modules],
783                               [disable dynamic module loading])])
784
785 dynworks=false
786 deps=
787 if test x$enable_modules = xno; then
788     AC_MSG_RESULT(no)
789 else
790     AC_MSG_RESULT(yes)
791     AC_MSG_CHECKING(whether dynamic modules work)
792     ## for loop is to strip newline 
793     tmp=`$PKG_CONFIG --variable=gmodule_supported gmodule-no-export-2.0`
794     for I in $tmp; do
795         dynworks=$I
796     done
797
798     dnl Now we check to see if our libtool supports shared lib deps
799     dnl (in a rather ugly way even)
800     if $dynworks; then
801         pixbuf_libtool_config="${CONFIG_SHELL-/bin/sh} ./libtool --config"
802         pixbuf_deplibs_check=`$pixbuf_libtool_config | \
803             grep '^[[a-z_]]*check[[a-z_]]*_method=[['\''"]]' | \
804             sed 's/.*[['\''"]]\(.*\)[['\''"]]$/\1/'`
805         if test "x$pixbuf_deplibs_check" = "xnone" || \
806            test "x$pixbuf_deplibs_check" = "xunknown" || \
807            test "x$pixbuf_deplibs_check" = "x"; then
808             dynworks=false
809         fi
810     fi
811
812     if $dynworks; then
813         AC_DEFINE(USE_GMODULE, 1,
814                   [Define to 1 if gmodule works and should be used])
815         AC_MSG_RESULT(yes)
816     else
817         AC_MSG_RESULT(no)
818     fi
819 fi
820
821 dnl We allow people to disable image loaders explicitely, but if they don't we error
822 dnl out so that people don't accidentally build without them.
823
824 AC_ARG_WITH(libpng,
825             [AC_HELP_STRING([--without-libpng],
826                             [disable PNG loader for gdk-pixbuf])])
827 AC_ARG_WITH(libjpeg,
828             [AC_HELP_STRING([--without-libjpeg],
829                             [disable JPEG loader for gdk-pixbuf])])
830 AC_ARG_WITH(libtiff,
831             [AC_HELP_STRING([--without-libtiff],
832                             [disable TIFF loader for gdk-pixbuf])])
833 AC_ARG_WITH(libjasper,
834             [AC_HELP_STRING([--with-libjasper],
835                             [enable JPEG2000 loader for gdk-pixbuf])])
836
837 AC_ARG_ENABLE(gdiplus,
838             [AC_HELP_STRING([--enable-gdiplus],
839                             [enble GDI+ loaders for gdk-pixbuf (currently known to be broken)])],,
840             [enable_gdiplus=no])
841
842 AM_CONDITIONAL(BUILD_GDIPLUS_LOADERS, [ test x$os_win32 = xyes && test x$enable_gdiplus != xno ])
843
844 dnl Test for libtiff
845 if test x$os_win32 = xno || test x$enable_gdiplus = xno; then
846   if test x$with_libtiff != xno && test -z "$LIBTIFF"; then
847     AC_CHECK_LIB(tiff, TIFFReadRGBAImageOriented,
848       [AC_CHECK_HEADER(tiffio.h,
849         TIFF='tiff'; LIBTIFF='-ltiff',
850         AC_MSG_WARN(*** TIFF loader will not be built (TIFF header files not found) ***))],
851       [AC_CHECK_LIB(tiff, TIFFWriteScanline,
852         [AC_CHECK_HEADER(tiffio.h,
853           TIFF='tiff'; LIBTIFF='-ltiff -ljpeg -lz',
854           AC_MSG_WARN(*** TIFF loader will not be built (TIFF header files not found) ***))],
855         [AC_CHECK_LIB(tiff34, TIFFFlushData,
856           [AC_CHECK_HEADER(tiffio.h,
857             TIFF='tiff'; LIBTIFF='-ltiff34 -ljpeg -lz',
858             AC_MSG_WARN(*** TIFF loader will not be built (TIFF header files not found) ***))],
859         AC_MSG_WARN(*** TIFF loader will not be built (TIFF library not found) ***), -ljpeg -lz -lm)], -ljpeg -lz -lm)], -lm)
860   fi
861
862   if test x$with_libtiff != xno && test -z "$LIBTIFF"; then
863      AC_MSG_ERROR([
864 *** Checks for TIFF loader failed. You can build without it by passing 
865 *** --without-libtiff to configure but some programs using GTK+ may
866 *** not work properly])
867   fi
868 fi
869
870 dnl Test for libjpeg
871 if test x$os_win32 = xno || test x$enable_gdiplus = xno; then
872   if test x$with_libjpeg != xno && test -z "$LIBJPEG"; then
873     AC_CHECK_LIB(jpeg, jpeg_destroy_decompress,
874       jpeg_ok=yes,
875       jpeg_ok=no
876       AC_MSG_WARN(*** JPEG loader will not be built (JPEG library not found) ***))
877     if test "$jpeg_ok" = yes; then
878       AC_MSG_CHECKING([for jpeglib.h])
879       AC_TRY_CPP(
880 [#include <stdio.h>
881 #undef PACKAGE
882 #undef VERSION
883 #undef HAVE_STDLIB_H
884 #include <jpeglib.h>],
885         jpeg_ok=yes,
886         jpeg_ok=no)
887       AC_MSG_RESULT($jpeg_ok)
888       if test "$jpeg_ok" = yes; then
889         LIBJPEG='-ljpeg'
890         AC_CHECK_LIB(jpeg, jpeg_simple_progression,     
891           AC_DEFINE(HAVE_PROGRESSIVE_JPEG, 1,
892                     [Define to 1 is libjpeg supports progressive JPEG]),
893           AC_MSG_WARN(JPEG library does not support progressive saving.))
894       else
895           AC_MSG_WARN(*** JPEG loader will not be built (JPEG header file not found) ***)
896       fi
897     fi
898   fi
899
900   if test x$with_libjpeg != xno && test -z "$LIBJPEG"; then
901      AC_MSG_ERROR([
902 *** Checks for JPEG loader failed. You can build without it by passing 
903 *** --without-libjpeg to configure but some programs using GTK+ may
904 *** not work properly])
905   fi
906 fi
907
908 dnl Test for libpng
909   if test x$with_libpng != xno && test -z "$LIBPNG"; then
910     AC_MSG_CHECKING(for libpng12)
911     if $PKG_CONFIG --exists libpng12 ; then
912         AC_MSG_RESULT(yes)
913         PNG='png'
914         PNG_DEP_CFLAGS_PACKAGES=libpng12
915         LIBPNG=`$PKG_CONFIG --libs libpng12`
916     else
917       AC_MSG_RESULT(no)
918       AC_CHECK_LIB(png, png_read_info,
919         [AC_CHECK_HEADER(png.h,
920           png_ok=yes,
921           png_ok=no)],
922         AC_MSG_WARN(*** PNG loader will not be built (PNG library not found) ***), -lz -lm)
923       if test "$png_ok" = yes; then
924         AC_MSG_CHECKING([for png_structp in png.h])
925         AC_TRY_COMPILE([#include <png.h>],
926           [png_structp pp; png_infop info; png_colorp cmap; png_create_read_struct;],
927           png_ok=yes,
928           png_ok=no)
929         AC_MSG_RESULT($png_ok)
930         if test "$png_ok" = yes; then
931           PNG='png'; LIBPNG='-lpng -lz'
932         else
933           AC_MSG_WARN(*** PNG loader will not be built (PNG library is too old) ***)
934         fi
935       else
936        AC_MSG_WARN(*** PNG loader will not be built (PNG header file not found) ***)
937       fi
938     fi
939   fi
940
941   if test x$with_libpng != xno && test -z "$LIBPNG"; then
942      AC_MSG_ERROR([
943 *** Checks for PNG loader failed. You can build without it by passing 
944 *** --without-libpng to configure but many programs using GTK+ will
945 *** not work properly. The PNG loader is also needed if you are compiling
946 *** from CVS.])
947   fi
948
949 dnl Test for libjasper
950   if test x$with_libjasper = xyes && test -z "$LIBJASPER"; then
951     AC_CHECK_LIB(jasper, jas_init, LIBJASPER=-ljasper, [], -ljpeg)
952   fi
953
954   if test x$with_libjasper = xyes && test -z "$LIBJASPER"; then
955      AC_MSG_ERROR([
956 *** Checks for JPEG2000 loader failed. You can build without it by passing 
957 *** --without-libjasper to configure])
958   fi
959
960 AC_SUBST(LIBTIFF)
961 AC_SUBST(LIBJPEG)
962 AC_SUBST(LIBPNG)
963 AC_SUBST(LIBJASPER)
964
965 AM_CONDITIONAL(BUILD_DYNAMIC_MODULES, $dynworks)
966
967 #
968 # Allow building some or all gdk-pixbuf loaders included
969 #
970 AC_MSG_CHECKING(pixbuf loaders to build)
971
972 dnl due to an autoconf bug, commas in the first arg to
973 dnl AC_HELP_STRING cause problems.
974 dnl AC_HELP_STRING([--with-included-loaders=LOADER1 LOADER2 ...],
975 dnl                [build the specified loaders into gdk-pixbuf])
976 AC_ARG_WITH(included_loaders,
977 [  --with-included-loaders=LOADER1,LOADER2,...
978                           build the specified loaders into gdk-pixbuf])
979
980 if $dynworks; then 
981    :
982 else
983    ## if the option was specified, leave it; otherwise disable included loaders
984    if test x$with_included_loaders = xno; then
985            with_included_loaders=yes
986    fi
987 fi
988
989 # Use the traditional png loader instead of the GDI+ one on Windows,
990 # because some important apps like GIMP need to read and write
991 # arbitrary tEXt chunks which doesn't seem to be possible through GDI+
992
993 all_loaders="ani,icns,pcx,ras,tga,png,pnm,wbmp,xbm,xpm,qtif"
994 if test x$with_libjasper != xno; then
995   all_loaders="$all_loaders,jasper"
996 fi
997 if test x$os_win32 = xyes && test x$enable_gdiplus != xno; then
998   # Skip PNG, see comment above
999   gdip_formats="bmp emf gif ico jpeg tiff wmf"
1000   for f in $gdip_formats; do
1001     all_loaders="$all_loaders,gdip-$f"
1002   done
1003 else
1004   all_loaders="$all_loaders,bmp,gif,ico,jpeg,tiff"
1005 fi
1006 included_loaders=""
1007 # If no loaders specified, include all
1008 if test "x$with_included_loaders" = xyes ; then
1009   included_loaders="$all_loaders"
1010 else
1011   included_loaders="$with_included_loaders"
1012 fi
1013
1014 AC_MSG_RESULT($included_loaders)
1015
1016 INCLUDED_LOADER_OBJ=
1017 INCLUDED_LOADER_DEFINE=
1018
1019 IFS="${IFS=     }"; gtk_save_ifs="$IFS"; IFS=","
1020 for loader in $included_loaders; do
1021  if echo "$all_loaders" | egrep "(^|,)$loader(\$|,)" > /dev/null; then
1022    :
1023  else
1024    AC_MSG_ERROR([the specified loader $loader does not exist])
1025  fi
1026
1027  loader_underscores=`echo $loader | sed -e 's/-/_/g'`
1028  INCLUDED_LOADER_OBJ="$INCLUDED_LOADER_OBJ libstatic-pixbufloader-$loader.la"
1029
1030  # Don't bother defining separate -DINCLUDE_gdip_foo for each gdip-foo loader
1031  case $loader in
1032    gdip-*) ;;
1033    *) INCLUDED_LOADER_DEFINE="$INCLUDED_LOADER_DEFINE -DINCLUDE_$loader_underscores";;
1034  esac
1035  eval INCLUDE_$loader_underscores=yes
1036 done
1037
1038 # Just define one -DINCLUDE_gdiplus for all the gdip-foo loaders
1039 # (except gdip-png, which isn't built at all)
1040 if test x"$INCLUDE_gdip_ico" = xyes; then
1041   INCLUDED_LOADER_DEFINE="$INCLUDED_LOADER_DEFINE -DINCLUDE_gdiplus"
1042 fi
1043
1044 IFS="$gtk_save_ifs"
1045 AC_SUBST(INCLUDED_LOADER_OBJ)
1046 AC_SUBST(INCLUDED_LOADER_DEFINE)
1047
1048 AM_CONDITIONAL(INCLUDE_PNG, [test x"$INCLUDE_png" = xyes])
1049 AM_CONDITIONAL(INCLUDE_BMP, [test x"$INCLUDE_bmp" = xyes])
1050 AM_CONDITIONAL(INCLUDE_WBMP, [test x"$INCLUDE_wbmp" = xyes])
1051 AM_CONDITIONAL(INCLUDE_GIF, [test x"$INCLUDE_gif" = xyes])
1052 AM_CONDITIONAL(INCLUDE_ICO, [test x"$INCLUDE_ico" = xyes])
1053 AM_CONDITIONAL(INCLUDE_ANI, [test x"$INCLUDE_ani" = xyes])
1054 AM_CONDITIONAL(INCLUDE_JPEG, [test x"$INCLUDE_jpeg" = xyes])
1055 AM_CONDITIONAL(INCLUDE_PNM, [test x"$INCLUDE_pnm" = xyes])
1056 AM_CONDITIONAL(INCLUDE_RAS, [test x"$INCLUDE_ras" = xyes])
1057 AM_CONDITIONAL(INCLUDE_TIFF, [test x"$INCLUDE_tiff" = xyes])
1058 AM_CONDITIONAL(INCLUDE_XPM, [test x"$INCLUDE_xpm" = xyes])
1059 AM_CONDITIONAL(INCLUDE_XBM, [test x"$INCLUDE_xbm" = xyes])
1060 AM_CONDITIONAL(INCLUDE_TGA, [test x"$INCLUDE_tga" = xyes])
1061 AM_CONDITIONAL(INCLUDE_PCX, [test x"$INCLUDE_pcx" = xyes])
1062 AM_CONDITIONAL(INCLUDE_ICNS, [test x"$INCLUDE_icns" = xyes])
1063 AM_CONDITIONAL(INCLUDE_JASPER, [test x"$INCLUDE_jasper" = xyes])
1064 AM_CONDITIONAL(INCLUDE_QTIF, [test x"$INCLUDE_qtif" = xyes])
1065 # As all GDI+ loaders are either built-in or not, arbitrarily just
1066 # check one of the variables here
1067 AM_CONDITIONAL(INCLUDE_GDIPLUS, [test x"$INCLUDE_gdip_ico" = xyes])
1068
1069 if test x$gio_can_sniff = x; then
1070   AC_MSG_CHECKING([if gio can sniff png])
1071   gtk_save_LIBS="$LIBS"
1072   gtk_save_CFLAGS="$CFLAGS"
1073   LIBS="`$PKG_CONFIG --libs gio-2.0`"
1074   CFLAGS="`$PKG_CONFIG --cflags gio-2.0`"
1075   AC_RUN_IFELSE([AC_LANG_SOURCE([[
1076   #include <gio/gio.h>
1077   static const gsize data_size = 159;
1078   static const guint8 data[] = 
1079   {
1080     0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 
1081     0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 
1082     0x08, 0x02, 0x00, 0x00, 0x00, 0x90, 0x77, 0x53, 0xde, 0x00, 0x00, 0x00, 
1083     0x01, 0x73, 0x52, 0x47, 0x42, 0x00, 0xae, 0xce, 0x1c, 0xe9, 0x00, 0x00, 
1084     0x00, 0x09, 0x70, 0x48, 0x59, 0x73, 0x00, 0x00, 0x0b, 0x13, 0x00, 0x00, 
1085     0x0b, 0x13, 0x01, 0x00, 0x9a, 0x9c, 0x18, 0x00, 0x00, 0x00, 0x07, 0x74, 
1086     0x49, 0x4d, 0x45, 0x07, 0xd8, 0x07, 0x0f, 0x10, 0x08, 0x15, 0x61, 0xd8, 
1087     0x35, 0x37, 0x00, 0x00, 0x00, 0x19, 0x74, 0x45, 0x58, 0x74, 0x43, 0x6f, 
1088     0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x00, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 
1089     0x64, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x47, 0x49, 0x4d, 0x50, 0x57, 
1090     0x81, 0x0e, 0x17, 0x00, 0x00, 0x00, 0x0c, 0x49, 0x44, 0x41, 0x54, 0x08, 
1091     0xd7, 0x63, 0xf8, 0xff, 0xff, 0x3f, 0x00, 0x05, 0xfe, 0x02, 0xfe, 0xdc, 
1092     0xcc, 0x59, 0xe7, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 
1093     0x42, 0x60, 0x82
1094   };
1095   int
1096   main (int argc, char **argv)
1097   {
1098     char *content_type;
1099     char *image_png;
1100     content_type = g_content_type_guess (NULL, data, data_size, NULL);  
1101     image_png = g_content_type_from_mime_type ("image/png");
1102     return !!strcmp (content_type, image_png);
1103   }]])],
1104     [gio_can_sniff=yes
1105      AC_DEFINE(GDK_PIXBUF_USE_GIO_MIME, 1, [Define if gio can sniff image data])],
1106     [gio_can_sniff=no])
1107   AC_MSG_RESULT($gio_can_sniff)
1108   LIBS="$gtk_save_LIBS"
1109   CFLAGS="$gtk_save_CFLAGS"
1110 fi
1111
1112 #
1113 # Allow building some or all immodules included
1114 #
1115 AC_MSG_CHECKING(immodules to build)
1116
1117 dnl due to an autoconf bug, commas in the first arg to
1118 dnl AC_HELP_STRING cause problems.
1119 dnl AC_HELP_STRING([--with-included-immodules=MODULE1 MODULE2 ...],
1120 dnl                [build the specified input method modules into gtk])
1121 AC_ARG_WITH(included_immodules,
1122 [  --with-included-immodules=MODULE1,MODULE2,...
1123                           build the specified input methods into gtk])
1124
1125 if $dynworks; then 
1126    :
1127 else
1128    ## if the option was specified, leave it; otherwise disable included immodules
1129    if test x$with_included_immodules = xno; then
1130            with_included_immodules=yes
1131    fi
1132 fi
1133
1134 all_immodules="am-et,cedilla,cyrillic-translit"
1135 if test "$gdktarget" = "win32"; then
1136    all_immodules="${all_immodules},ime"
1137 fi
1138 all_immodules="${all_immodules},inuktitut,ipa,multipress,thai,ti-er,ti-et,viqr"
1139 if test "$gdktarget" = "x11"; then
1140    all_immodules="${all_immodules},xim"
1141 fi
1142
1143 included_immodules=""
1144 # If the switch specified without listing any specific ones, include all
1145 if test "x$with_included_immodules" = xyes ; then
1146   included_immodules="$all_immodules"
1147 else
1148   included_immodules="$with_included_immodules"
1149 fi
1150
1151 AC_MSG_RESULT($included_immodules)
1152 AM_CONDITIONAL(HAVE_INCLUDED_IMMMODULES, test "x$included_immodules" != x)
1153
1154 INCLUDED_IMMODULE_OBJ=
1155 INCLUDED_IMMODULE_DEFINE=
1156
1157 IFS="${IFS=     }"; gtk_save_ifs="$IFS"; IFS=","
1158 for immodule in $included_immodules; do
1159  immodule_underscores=`echo $immodule | sed -e 's/-/_/g'`
1160  if echo "$all_immodules" | egrep "(^|,)$immodule(\$|,)" > /dev/null; then
1161    :
1162  else
1163    AC_MSG_ERROR([the specified input method $immodule does not exist])
1164  fi
1165
1166  INCLUDED_IMMODULE_OBJ="$INCLUDED_IMMODULE_OBJ ../modules/input/libstatic-im-$immodule.la"
1167  INCLUDED_IMMODULE_DEFINE="$INCLUDED_IMMODULE_DEFINE -DINCLUDE_IM_$immodule_underscores"
1168  eval INCLUDE_$immodule_underscores=yes
1169 done
1170 IFS="$gtk_save_ifs"
1171 AC_SUBST(INCLUDED_IMMODULE_OBJ)
1172 AC_SUBST(INCLUDED_IMMODULE_DEFINE)
1173
1174 AM_CONDITIONAL(INCLUDE_IM_AM_ET, [test x"$INCLUDE_am_et" = xyes])
1175 AM_CONDITIONAL(INCLUDE_IM_CEDILLA, [test x"$INCLUDE_cedilla" = xyes])
1176 AM_CONDITIONAL(INCLUDE_IM_CYRILLIC_TRANSLIT, [test x"$INCLUDE_cyrillic_translit" = xyes])
1177 AM_CONDITIONAL(INCLUDE_IM_IME, [test x"$INCLUDE_ime" = xyes])
1178 AM_CONDITIONAL(INCLUDE_IM_INUKTITUT, [test x"$INCLUDE_inuktitut" = xyes])
1179 AM_CONDITIONAL(INCLUDE_IM_IPA, [test x"$INCLUDE_ipa" = xyes])
1180 AM_CONDITIONAL(INCLUDE_IM_MULTIPRESS, [test x"$INCLUDE_multipress" = xyes])
1181 AM_CONDITIONAL(INCLUDE_IM_THAI, [test x"$INCLUDE_thai" = xyes])
1182 AM_CONDITIONAL(INCLUDE_IM_TI_ER, [test x"$INCLUDE_ti_er" = xyes])
1183 AM_CONDITIONAL(INCLUDE_IM_TI_ET, [test x"$INCLUDE_ti_et" = xyes])
1184 AM_CONDITIONAL(INCLUDE_IM_VIQR, [test x"$INCLUDE_viqr" = xyes])
1185 AM_CONDITIONAL(INCLUDE_IM_XIM, [test x"$INCLUDE_xim" = xyes])
1186
1187 AC_HEADER_SYS_WAIT
1188
1189 AC_TYPE_SIGNAL
1190
1191 AM_CONDITIONAL(HAVE_TIFF, test "x$LIBTIFF" != x)
1192 AM_CONDITIONAL(HAVE_PNG, test "x$LIBPNG" != x)
1193 AM_CONDITIONAL(HAVE_JPEG, test "x$LIBJPEG" != x)
1194 AM_CONDITIONAL(HAVE_JASPER, test "x$LIBJASPER" != x)
1195
1196 if $dynworks ; then
1197   STATIC_LIB_DEPS=
1198   if echo "$included_loaders" | egrep '(^|,)tiff($|,)' > /dev/null; then
1199     STATIC_LIB_DEPS="$STATIC_LIB_DEPS $LIBTIFF"
1200   fi
1201   if echo "$included_loaders" | egrep '(^|,)jpeg($|,)' > /dev/null; then
1202     STATIC_LIB_DEPS="$STATIC_LIB_DEPS $LIBJPEG"
1203   fi
1204   if echo "$included_loaders" | egrep '(^|,)png($|,)' > /dev/null; then
1205     STATIC_LIB_DEPS="$STATIC_LIB_DEPS $LIBPNG"
1206   fi
1207   if echo "$included_loaders" | egrep '(^|,)jasper($|,)' > /dev/null; then
1208     STATIC_LIB_DEPS="$STATIC_LIB_DEPS $LIBJASPER"
1209   fi
1210 else
1211   STATIC_LIB_DEPS="$LIBTIFF $LIBJPEG $LIBPNG $LIBJASPER"
1212 fi
1213
1214 # Checks to see whether we should include mediaLib
1215 # support.
1216 #
1217 AC_CHECK_HEADER(sys/systeminfo.h,
1218                 AC_DEFINE(HAVE_SYS_SYSTEMINFO_H, 1, 
1219                           [Define to 1 if sys/systeminfo.h is available]))
1220 AC_CHECK_HEADER(sys/sysinfo.h,
1221                 AC_DEFINE(HAVE_SYS_SYSINFO_H, 1,
1222                           [Define to 1 if sys/sysinfo.h is available]))
1223
1224 AC_MSG_CHECKING(for mediaLib 2.3)
1225 use_mlib25=no
1226 # Check for a mediaLib 2.3 function since that is what the GTK+ mediaLib
1227 # patch requires.
1228 AC_CHECK_LIB(mlib, mlib_ImageSetStruct, use_mlib=yes, use_mlib=no)
1229 if test $use_mlib = yes; then
1230     AC_DEFINE(USE_MEDIALIB, 1,
1231               [Define to 1 if medialib is available and should be used])
1232     MEDIA_LIB=-lmlib
1233
1234     AC_MSG_CHECKING(for mediaLib 2.5)
1235     # Check for a mediaLib 2.5 function since that is what is needed for
1236     # gdk_rgb_convert integration.
1237     AC_CHECK_LIB(mlib, mlib_VideoColorRGBint_to_BGRAint, use_mlib25=yes, use_mlib25=no)
1238     if test $use_mlib25 = yes; then
1239         AC_DEFINE(USE_MEDIALIB25, 1,
1240                   [Define to 1 if medialib 2.5 is available])
1241     fi
1242 fi
1243 AM_CONDITIONAL(USE_MEDIALIB, test $use_mlib = yes)
1244 AM_CONDITIONAL(USE_MEDIALIB25, test $use_mlib25 = yes)
1245
1246 # Checks to see if we should compile in MMX support (there will be
1247 # a runtime test when the code is actually run to see if it should
1248 # be used - this just checks if we can compile it.)
1249 #
1250 # This code is partially taken from Mesa
1251 #
1252 AC_MSG_CHECKING(for x86 platform)
1253 case $host_cpu in
1254   i386|i486|i586|i686|i786|k6|k7)
1255         use_x86_asm=yes
1256         ;;
1257    *)
1258         use_x86_asm=no
1259 esac
1260 AC_MSG_RESULT($use_x86_asm)
1261
1262 use_mmx_asm=no
1263 if test $use_x86_asm = yes; then
1264     save_ac_ext=$ac_ext
1265     ac_ext=S
1266     
1267     AC_MSG_CHECKING(compiler support for MMX)
1268     cp $srcdir/gdk-pixbuf/pixops/scale_line_22_33_mmx.S conftest.S
1269     if AC_TRY_EVAL(ac_compile); then
1270         use_mmx_asm=yes
1271     fi
1272
1273     rm -rf conftest*
1274
1275     ac_ext=$save_ac_ext
1276     if test $use_mmx_asm = yes; then
1277       AC_DEFINE(USE_MMX, 1,
1278                 [Define to 1 if XXM is available and should be used])
1279       AC_MSG_RESULT(yes)
1280     else
1281       AC_MSG_RESULT(no)
1282     fi
1283 fi
1284
1285 AM_CONDITIONAL(USE_MMX, test x$use_mmx_asm = xyes)
1286
1287 REBUILD_PNGS=
1288 if test -z "$LIBPNG" && test x"$os_win32" = xno -o x$enable_gdiplus = xno; then
1289   REBUILD_PNGS=#
1290 fi
1291
1292 dnl Look for a host system's gdk-pixbuf-csource if we are cross-compiling
1293
1294 AM_CONDITIONAL(CROSS_COMPILING, test $cross_compiling = yes)
1295
1296 if test $cross_compiling = yes; then
1297   AC_PATH_PROG(GDK_PIXBUF_CSOURCE, gdk-pixbuf-csource, no)
1298   AC_PATH_PROG(GTK_UPDATE_ICON_CACHE, gtk-update-icon-cache, no)
1299   if test x$GTK_UPDATE_ICON_CACHE = xno; then
1300     REBUILD_PNGS=#
1301   fi
1302 fi
1303
1304 if test ! -f $srcdir/gtk/gtkbuiltincache.h && 
1305    test "x$REBUILD_PNGS" = "x#" ; then
1306      AC_MSG_ERROR([
1307 *** gtkbuiltincache.h is not in the tree, and cannot be built
1308 *** because you don't have libpng, or (when cross-compiling) you 
1309 *** don't have a prebuilt gtk-update-icon-cache on the build system.])
1310 fi
1311
1312 AC_SUBST(REBUILD_PNGS)
1313
1314 GDK_PIXBUF_PACKAGES="gmodule-no-export-2.0 gobject-2.0 gio-2.0"
1315 GDK_PIXBUF_EXTRA_LIBS="$STATIC_LIB_DEPS $MATH_LIB $MEDIA_LIB"
1316 GDK_PIXBUF_EXTRA_CFLAGS= 
1317 GDK_PIXBUF_DEP_LIBS="`$PKG_CONFIG --libs $GDK_PIXBUF_PACKAGES` $GDK_PIXBUF_EXTRA_LIBS"
1318 GDK_PIXBUF_DEP_CFLAGS="`$PKG_CONFIG --cflags  gthread-2.0 $GDK_PIXBUF_PACKAGES $PNG_DEP_CFLAGS_PACKAGES` $GDK_PIXBUF_EXTRA_CFLAGS"
1319
1320 ########################################
1321 # Windowing system checks
1322 ########################################
1323
1324 GDK_PIXBUF_XLIB_PACKAGES=
1325 GDK_PIXBUF_XLIB_EXTRA_CFLAGS=
1326 GDK_PIXBUF_XLIB_EXTRA_LIBS=
1327         
1328 GDK_EXTRA_LIBS="$GDK_WLIBS"
1329 GDK_EXTRA_CFLAGS=
1330         
1331 # GTK+ uses some X calls, so needs to link against X directly
1332 GTK_DEP_PACKAGES_FOR_X=
1333 GTK_DEP_LIBS_FOR_X=
1334
1335 if test "x$gdktarget" = "xx11"; then
1336   X_PACKAGES=fontconfig
1337
1338   #
1339   # We use fontconfig very peripherally when decoding the default
1340   # settings.
1341   #
1342   if $PKG_CONFIG --exists fontconfig; then : ; else
1343     AC_MSG_ERROR([
1344 *** fontconfig (http://www.fontconfig.org) is required by the X11 backend.])
1345   fi
1346
1347   #
1348   # Check for basic X packages; we use pkg-config if available
1349   #
1350   if $PKG_CONFIG --exists x11 xext xrender; then
1351     have_base_x_pc=true
1352     X_PACKAGES="$X_PACKAGES x11 xext xrender"
1353     x_libs="`$PKG_CONFIG --libs x11 xext xrender`"
1354     X_CFLAGS="`$PKG_CONFIG --cflags x11 xext xrender`"
1355     
1356     # Strip out any .la files that pkg-config might give us (this happens
1357     # with -uninstalled.pc files)
1358     x_libs_for_checks=
1359     for I in $x_libs ; do
1360       case $I in 
1361         *.la) ;;
1362         *) x_libs_for_checks="$x_libs_for_checks $I" ;;
1363       esac
1364     done
1365     
1366     GDK_PIXBUF_XLIB_PACKAGES="x11"
1367     GTK_PACKAGES_FOR_X="x11"
1368   else
1369     have_base_x_pc=false
1370     AC_PATH_XTRA
1371     if test x$no_x = xyes ; then
1372       AC_MSG_ERROR([X development libraries not found])
1373     fi
1374     
1375     x_cflags="$X_CFLAGS"
1376     x_libs_for_checks="$X_LIBS -lXext -lXrender -lX11 $X_EXTRA_LIBS"
1377
1378     GDK_PIXBUF_XLIB_EXTRA_CFLAGS="$x_cflags"
1379     GDK_PIXBUF_XLIB_EXTRA_LIBS="$X_LIBS -lX11 $X_EXTRA_LIBS"
1380     GTK_DEP_LIBS_FOR_X="$X_LIBS -lXrender -lX11 $X_EXTRA_LIBS"
1381   fi
1382
1383   # Extra libraries found during checks (-lXinerama, etc), not from pkg-config.
1384   x_extra_libs=
1385
1386   gtk_save_cppflags="$CPPFLAGS"
1387   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
1388
1389   gtk_save_LIBS=$LIBS
1390   LIBS="$x_libs_for_checks $LIBS"
1391   
1392   # Sanity check for the X11 and Xext libraries. While everything we need from
1393   # Xext is optional, the chances a system has *none* of these things is so
1394   # small that we just unconditionally require it.
1395   AC_CHECK_FUNC(XOpenDisplay, :,
1396                 AC_MSG_ERROR([*** libX11 not found. Check 'config.log' for more details.]))
1397   AC_CHECK_FUNC(XextFindDisplay, :,
1398                 AC_MSG_ERROR([*** libXext not found. Check 'config.log' for more details.]))
1399   AC_CHECK_FUNC(XRenderQueryExtension, :,
1400                 AC_MSG_ERROR([*** libXrender not found. Check 'config.log' for more details.]))
1401
1402   # Check for xReply
1403
1404   AC_MSG_CHECKING([if <X11/extensions/XIproto.h> is needed for xReply])
1405   AC_TRY_COMPILE([#include <X11/Xlibint.h>],
1406       [xReply *rep;],
1407       [AC_MSG_RESULT([no])],
1408       [AC_TRY_COMPILE([#include <X11/extensions/XIproto.h>
1409 #include <X11/Xlibint.h>],
1410            [xReply *rep;],
1411            [AC_MSG_RESULT([yes])
1412             AC_DEFINE([NEED_XIPROTO_H_FOR_XREPLY], 1,
1413                       [Define if <X11/extensions/XIproto.h> needed for xReply])],
1414            [AC_MSG_RESULT([unknown])
1415             AC_MSG_ERROR([xReply type unavailable. X11 is too old])])])
1416
1417   # Check for XConvertCase, XInternAtoms (X11R6 specific)
1418
1419   AC_CHECK_FUNCS(XConvertCase XInternAtoms)
1420
1421   # Generic X11R6 check needed for XIM support; we could
1422   # probably use this to replace the above, but we'll
1423   # leave the separate checks for XConvertCase and XInternAtoms 
1424   # for clarity
1425   
1426   have_x11r6=false
1427   AC_CHECK_FUNC(XAddConnectionWatch,
1428       have_x11r6=true)
1429
1430   if $have_x11r6; then
1431     AC_DEFINE(HAVE_X11R6, 1, [Define if we have X11R6])
1432   fi
1433   AM_CONDITIONAL(HAVE_X11R6, $have_x11r6)
1434
1435   # Check for XKB support.
1436
1437   if test "x$enable_xkb" = "xyes"; then
1438         AC_MSG_WARN(XKB support explicitly enabled)
1439         AC_DEFINE(HAVE_XKB, 1, [Define to use XKB extension])
1440   elif test "x$enable_xkb" = "xmaybe"; then
1441         AC_CHECK_FUNC(XkbQueryExtension,
1442                       AC_DEFINE(HAVE_XKB, 1, [Define to use XKB extension]))
1443   else
1444         AC_MSG_WARN(XKB support explicitly disabled)
1445   fi
1446
1447   # Check for shaped window extension
1448
1449   AC_CHECK_FUNC(XShapeCombineMask, :,
1450      [AC_MSG_ERROR([Shape extension not found, check your development headers])])
1451
1452   # X SYNC check
1453   gtk_save_CFLAGS="$CFLAGS"
1454   CFLAGS="$CFLAGS $x_cflags"
1455   
1456   AC_CHECK_FUNC(XSyncQueryExtension,
1457       [AC_CHECK_HEADER(X11/extensions/sync.h,
1458           AC_DEFINE(HAVE_XSYNC, 1, [Have the SYNC extension library]),
1459           :, [#include <X11/Xlib.h>])])
1460
1461   CFLAGS="$gtk_save_CFLAGS"
1462
1463   # Xshm checks
1464
1465   if test "x$enable_shm" = "xyes"; then
1466      # Check for the XShm extension, normally in Xext
1467      AC_CHECK_FUNC(XShmAttach,
1468         :,
1469         # On AIX, it is in XextSam instead
1470         [AC_CHECK_LIB(XextSam, XShmAttach, 
1471             [GTK_ADD_LIB(x_extra_libs,XextSam)])])
1472   fi    
1473
1474   if test "x$enable_shm" = "xyes"; then
1475     # Check for shared memory
1476     AC_CHECK_HEADER(sys/ipc.h,
1477                     AC_DEFINE(HAVE_IPC_H, 1,
1478                               [Define to 1 if ipc.h is available]),
1479                     no_sys_ipc=yes)
1480     AC_CHECK_HEADER(sys/shm.h,
1481                     AC_DEFINE(HAVE_SHM_H, 1,
1482                               [Define to 1 if shm.h is available]),
1483                     no_sys_shm=yes)
1484
1485     # Check for the X shared memory extension header file
1486     have_xshm=no 
1487     AC_MSG_CHECKING(X11/extensions/XShm.h)
1488     if test "x$no_xext_lib" = "xyes"; then
1489       :
1490     else
1491       gtk_save_CFLAGS="$CFLAGS"
1492       CFLAGS="$CFLAGS $x_cflags"
1493       AC_TRY_COMPILE([
1494 #include <stdlib.h>
1495 #include <sys/types.h>
1496 #include <sys/ipc.h>
1497 #include <sys/shm.h>
1498 #include <X11/Xlib.h>
1499 #include <X11/Xutil.h>
1500 #include <X11/extensions/XShm.h>
1501 ], [XShmSegmentInfo *x_shm_info;], have_xshm=yes)
1502       CFLAGS="$gtk_save_CFLAGS"
1503     fi
1504     AC_MSG_RESULT($have_xshm)
1505     if test $have_xshm = yes ; then
1506       AC_DEFINE(HAVE_XSHM_H, 1,
1507                 [Define to 1 if xshm.h is available])
1508     fi
1509   fi
1510
1511   if test "x$enable_xinerama" = "xyes"; then
1512     # Check for Xinerama extension (Solaris impl or Xfree impl)
1513     gtk_save_cppflags="$CPPFLAGS"
1514     CPPFLAGS="$CPPFLAGS $x_cflags"
1515   
1516     # Check for XFree
1517     AC_MSG_CHECKING(for Xinerama support on XFree86)
1518           
1519     have_xfree_xinerama=false
1520     if $PKG_CONFIG --exists xinerama ; then
1521        have_xfree_xinerama=true
1522        X_PACKAGES="$X_PACKAGES xinerama"
1523     else    
1524        AC_CHECK_LIB(Xinerama, XineramaQueryExtension,
1525            [AC_CHECK_HEADER(X11/extensions/Xinerama.h, 
1526            [GTK_ADD_LIB(x_extra_libs,Xinerama)
1527            have_xfree_xinerama=true], :,
1528            [#include <X11/Xlib.h>])])
1529     fi
1530
1531     if $have_xfree_xinerama ; then
1532       AC_DEFINE(HAVE_XFREE_XINERAMA, 1,
1533                 [Define to 1 if XFree Xinerama is available])
1534       AC_DEFINE(HAVE_XINERAMA, 1,
1535                 [Define to 1 is Xinerama is available])
1536       AC_MSG_RESULT(yes)
1537     else
1538       AC_MSG_RESULT(no)
1539
1540       case "$host" in
1541         *-*-solaris*)
1542             # Check for solaris
1543             AC_MSG_CHECKING(for Xinerama support on Solaris)
1544           
1545             have_solaris_xinerama=false
1546             AC_CHECK_FUNC(XineramaGetInfo,
1547                 [AC_CHECK_HEADER(X11/extensions/xinerama.h,
1548                     [have_solaris_xinerama=true], :,
1549                     [#include <X11/Xlib.h>])])
1550                 
1551             if $have_solaris_xinerama ; then
1552               AC_DEFINE(HAVE_SOLARIS_XINERAMA, 1,
1553                         [Define to 1 if solaris xinerama is available])
1554               AC_DEFINE(HAVE_XINERAMA, 1,
1555                         [Define to 1 if xinerama is available])
1556               AC_MSG_RESULT(yes)
1557             else
1558               AC_MSG_RESULT(no)
1559             fi
1560             ;;
1561         *)
1562             ;;
1563       esac
1564     fi
1565   fi
1566   
1567   # set up things for XInput
1568
1569   if test "x$with_xinput" = "xxfree" || test "x$with_xinput" = "xyes"; then
1570     AC_DEFINE(XINPUT_XFREE, 1,
1571               [Define to 1 if XFree XInput should be used])
1572     
1573     if $PKG_CONFIG --exists xi ; then
1574       X_PACKAGES="$X_PACKAGES xi"
1575     else
1576       GTK_ADD_LIB(x_extra_libs, Xi)
1577     fi
1578   else
1579     AC_DEFINE(XINPUT_NONE, 1,
1580               [Define to 1 if no XInput should be used])
1581   fi
1582
1583   AM_CONDITIONAL(XINPUT_XFREE, test x$with_xinput = xxfree || test x$with_xinput = xyes)
1584
1585   # Check for the RANDR extension
1586   if $PKG_CONFIG --exists "xrandr >= 1.2.99" ; then
1587      AC_DEFINE(HAVE_RANDR, 1, [Have the Xrandr extension library])
1588
1589      X_PACKAGES="$X_PACKAGES xrandr"
1590   fi
1591        
1592   # Checks for Xcursor library
1593   
1594   if $PKG_CONFIG --exists xcursor ; then
1595     AC_DEFINE(HAVE_XCURSOR, 1, [Have the Xcursor library])
1596     
1597     X_PACKAGES="$X_PACKAGES xcursor"
1598   fi
1599
1600   # Checks for XFixes extension
1601   
1602   if $PKG_CONFIG --exists xfixes ; then
1603     AC_DEFINE(HAVE_XFIXES, 1, [Have the XFIXES X extension])
1604     
1605     X_PACKAGES="$X_PACKAGES xfixes"
1606     GTK_PACKAGES_FOR_X="$GTK_PACKAGES_FOR_X xfixes"
1607   fi
1608
1609   # Checks for Xcomposite extension
1610
1611   if $PKG_CONFIG --exists xcomposite ; then
1612     AC_DEFINE(HAVE_XCOMPOSITE, 1, [Have the XCOMPOSITE X extension])
1613
1614     X_PACKAGES="$X_PACKAGES xcomposite"
1615     GTK_PACKAGES_FOR_X="$GTK_PACKAGES_FOR_X xcomposite"
1616   fi
1617
1618   # Checks for Xdamage extension
1619
1620   if $PKG_CONFIG --exists xdamage ; then
1621     AC_DEFINE(HAVE_XDAMAGE, 1, [Have the XDAMAGE X extension])
1622
1623     X_PACKAGES="$X_PACKAGES xdamage"
1624     GTK_PACKAGES_FOR_X="$GTK_PACKAGES_FOR_X xdamage"
1625   fi
1626
1627   if $have_base_x_pc ; then
1628     GDK_EXTRA_LIBS="$x_extra_libs"
1629   else
1630     GDK_EXTRA_LIBS="$X_LIBS $x_extra_libs -lXext -lX11 $GDK_EXTRA_LIBS"
1631   fi
1632
1633   CPPFLAGS="$gtk_save_cppflags"
1634   LIBS="$gtk_save_libs"
1635
1636   AM_CONDITIONAL(USE_X11, true)
1637 else
1638   XPACKAGES=
1639
1640   AM_CONDITIONAL(XINPUT_XFREE, false)
1641   AM_CONDITIONAL(USE_X11, false)
1642   AM_CONDITIONAL(HAVE_X11R6, false)
1643 fi
1644
1645 if test "x$gdktarget" = "xwin32"; then
1646   GDK_EXTRA_LIBS="$GDK_EXTRA_LIBS -lgdi32 -limm32 -lshell32 -lole32 -Wl,-luuid"
1647   AM_CONDITIONAL(USE_WIN32, true)
1648 else
1649   AM_CONDITIONAL(USE_WIN32, false)
1650 fi
1651
1652 if test "x$gdktarget" = "xquartz"; then
1653   GDK_EXTRA_LIBS="$GDK_EXTRA_LIBS -framework Cocoa"
1654   AM_CONDITIONAL(USE_QUARTZ, true)
1655 else
1656   AM_CONDITIONAL(USE_QUARTZ, false)
1657 fi
1658
1659 GDK_PIXBUF_XLIB_DEP_LIBS="`$PKG_CONFIG --libs $GDK_PIXBUF_PACKAGES $GDK_PIXBUF_XLIB_PACKAGES` $GDK_PIXBUF_XLIB_EXTRA_LIBS $GDK_PIXBUF_EXTRA_LIBS"
1660 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"
1661
1662 AC_SUBST(GDK_PIXBUF_XLIB_PACKAGES)
1663 AC_SUBST(GDK_PIXBUF_XLIB_EXTRA_LIBS)
1664 AC_SUBST(GDK_PIXBUF_XLIB_EXTRA_CFLAGS)
1665 AC_SUBST(GDK_PIXBUF_XLIB_DEP_LIBS)
1666 AC_SUBST(GDK_PIXBUF_XLIB_DEP_CFLAGS)
1667
1668 if test "x$gdktarget" = "xdirectfb"; then
1669   DIRECTFB_REQUIRED_VERSION=1.0.0
1670   AC_MSG_CHECKING(for DirectFB)
1671
1672   PKG_CHECK_MODULES(DIRECTFB, [directfb >= $DIRECTFB_REQUIRED_VERSION])
1673   AM_CONDITIONAL(USE_DIRECTFB, true)
1674 else
1675   AM_CONDITIONAL(USE_DIRECTFB, false)
1676 fi
1677
1678
1679 # Check for Pango flags
1680
1681 if test "x$gdktarget" = "xwin32"; then
1682         PANGO_PACKAGES="pangowin32 pangocairo"
1683 else
1684         PANGO_PACKAGES="pango pangocairo"
1685 fi
1686
1687 AC_MSG_CHECKING(Pango flags)
1688 if $PKG_CONFIG --exists $PANGO_PACKAGES ; then
1689         PANGO_CFLAGS=`$PKG_CONFIG --cflags $PANGO_PACKAGES`
1690         PANGO_LIBS=`$PKG_CONFIG --libs $PANGO_PACKAGES`
1691
1692         AC_MSG_RESULT($PANGO_CFLAGS $PANGO_LIBS)
1693 else
1694         AC_MSG_ERROR([
1695 *** Pango not found. Pango built with Cairo support is required
1696 *** to build GTK+. See http://www.pango.org for Pango information.
1697 ])
1698 fi
1699
1700 CFLAGS="$CFLAGS $PANGO_CFLAGS"
1701
1702 if $PKG_CONFIG --uninstalled $PANGO_PACKAGES; then
1703         :
1704 else
1705         gtk_save_LIBS="$LIBS"
1706         LIBS="$PANGO_LIBS $LIBS"
1707         AC_TRY_LINK_FUNC(pango_context_new, :, AC_MSG_ERROR([
1708 *** Can't link to Pango. Pango is required to build
1709 *** GTK+. For more information see http://www.pango.org]))
1710         LIBS="$gtk_save_LIBS"
1711 fi
1712
1713 CFLAGS="$saved_cflags"
1714 LDFLAGS="$saved_ldflags"
1715
1716 GDK_PACKAGES="$PANGO_PACKAGES gio-2.0 $X_PACKAGES cairo-$cairo_backend"
1717 GDK_DEP_LIBS="$GDK_EXTRA_LIBS `$PKG_CONFIG --libs $GDK_PIXBUF_PACKAGES $GDK_PACKAGES` $GDK_PIXBUF_EXTRA_LIBS"
1718 GDK_DEP_CFLAGS="`$PKG_CONFIG --cflags  gthread-2.0 $GDK_PIXBUF_PACKAGES $GDK_PACKAGES` $GDK_PIXBUF_EXTRA_CFLAGS $GDK_EXTRA_CFLAGS"
1719 #
1720 # If we aren't writing explicit dependencies, then don't put the extra libraries we need
1721 # into the pkg-config files
1722 #
1723 if test $enable_explicit_deps != yes ; then
1724   GDK_PACKAGES="$PANGO_PACKAGES"
1725   GDK_EXTRA_LIBS=
1726 fi
1727
1728 AC_SUBST(GDK_PACKAGES)
1729 AC_SUBST(GDK_EXTRA_LIBS)
1730 AC_SUBST(GDK_EXTRA_CFLAGS)
1731 AC_SUBST(GDK_DEP_LIBS)
1732 AC_SUBST(GDK_DEP_CFLAGS)
1733
1734
1735 ########################################
1736 # Check for Accessibility Toolkit flags
1737 ########################################
1738
1739 ATK_PACKAGES=atk
1740 AC_MSG_CHECKING(ATK flags)
1741 if $PKG_CONFIG --exists $ATK_PACKAGES ; then
1742         ATK_CFLAGS=`$PKG_CONFIG --cflags $ATK_PACKAGES`
1743         ATK_LIBS=`$PKG_CONFIG --libs $ATK_PACKAGES`
1744
1745         AC_MSG_RESULT($ATK_CFLAGS $ATK_LIBS)
1746 else
1747         AC_MSG_ERROR([
1748 *** Accessibility Toolkit not found. Accessibility Toolkit is required
1749 *** to build GTK+.
1750 ])
1751 fi
1752
1753 if $PKG_CONFIG --uninstalled $ATK_PACKAGES; then
1754         :
1755 else
1756         gtk_save_LIBS="$LIBS"
1757         LIBS="$ATK_LIBS $LIBS"
1758         AC_TRY_LINK_FUNC(atk_object_get_type, : , AC_MSG_ERROR([
1759                 *** Cannot link to Accessibility Toolkit. Accessibility Toolkit is required
1760                 *** to build GTK+]))
1761         LIBS="$gtk_save_LIBS"
1762 fi
1763
1764 GTK_PACKAGES="atk cairo gio-2.0"
1765 if test "x$gdktarget" = "xx11"; then
1766   GTK_PACKAGES="$GTK_PACKAGES pangoft2"
1767 fi
1768 GTK_EXTRA_LIBS=
1769 GTK_EXTRA_CFLAGS= 
1770 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"
1771 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"
1772
1773 if test x"$os_win32" = xyes; then
1774   GTK_EXTRA_CFLAGS="$msnative_struct"
1775 fi
1776
1777 GLIB_PREFIX="`$PKG_CONFIG --variable=prefix glib-2.0`"
1778 ATK_PREFIX="`$PKG_CONFIG --variable=prefix atk`"
1779 PANGO_PREFIX="`$PKG_CONFIG --variable=prefix pango`"
1780 CAIRO_PREFIX="`pkg-config --variable=prefix cairo`"
1781
1782 if test $enable_explicit_deps != yes ; then
1783   GDK_PIXBUF_EXTRA_LIBS=
1784 fi
1785
1786 AC_SUBST(GDK_PIXBUF_PACKAGES)
1787 AC_SUBST(GDK_PIXBUF_EXTRA_LIBS)
1788 AC_SUBST(GDK_PIXBUF_EXTRA_CFLAGS)
1789 AC_SUBST(GDK_PIXBUF_DEP_LIBS)
1790 AC_SUBST(GDK_PIXBUF_DEP_CFLAGS)
1791
1792 AC_SUBST(GTK_PACKAGES)
1793 AC_SUBST(GTK_EXTRA_LIBS)
1794 AC_SUBST(GTK_EXTRA_CFLAGS)
1795 AC_SUBST(GTK_DEP_LIBS)
1796 AC_SUBST(GTK_DEP_CFLAGS)
1797
1798 AC_SUBST(GLIB_PREFIX)
1799 AC_SUBST(ATK_PREFIX)
1800 AC_SUBST(PANGO_PREFIX)
1801 AC_SUBST(CAIRO_PREFIX)
1802
1803 AC_SUBST(GTK_DEBUG_FLAGS)
1804 AC_SUBST(GTK_XIM_FLAGS)
1805
1806 ########################
1807 # Checks needed for gail
1808 ########################
1809
1810 old_LIBS="$LIBS"
1811 dnl Checks for inet libraries:
1812 AC_SEARCH_LIBS(gethostent, nsl)
1813 AC_SEARCH_LIBS(setsockopt, socket)
1814 AC_SEARCH_LIBS(connect, inet)
1815
1816 dnl check for the sockaddr_un.sun_len member
1817 AC_CHECK_MEMBER([struct sockaddr_un.sun_len],
1818                 [struct_sockaddr_un_sun_len=true],
1819                 [struct_sockaddr_un_suin_len=false],
1820                 [#include <sys/types.h>
1821                  #include <sys/un.h>]
1822                 )
1823 case $struct_sockaddr_un_sun_len in 
1824         true)
1825                 AC_DEFINE_UNQUOTED(HAVE_SOCKADDR_UN_SUN_LEN, 1,
1826                                    [Have the sockaddr_un.sun_len member])
1827                 ;;
1828         *)
1829                 ;;
1830 esac
1831
1832 GAIL_INET_LIBS="$LIBS"
1833 AC_SUBST([GAIL_INET_LIBS])
1834
1835 LIBS="$old_LIBS"
1836
1837 ################################################################
1838 # Printing system checks
1839 ################################################################
1840
1841 AC_ARG_ENABLE(cups,
1842               [AC_HELP_STRING([--disable-cups]
1843                               [disable cups print backend])],,
1844               [enable_cups=auto])
1845
1846 if test "x$enable_cups" = "xno"; then
1847   AM_CONDITIONAL(HAVE_CUPS, false)
1848 else
1849   AC_PATH_PROG(CUPS_CONFIG, cups-config, no)
1850   if test "x$CUPS_CONFIG" = "xno"; then
1851     if test "x$enable_cups" = "xauto"; then
1852       AM_CONDITIONAL(HAVE_CUPS, false)
1853     else
1854       AC_MSG_ERROR([
1855 *** cups not found.
1856 ])
1857     fi
1858   else
1859     CUPS_CFLAGS=`$CUPS_CONFIG --cflags | sed 's/-O[0-9]*//' | sed 's/-m[^\t]*//g'`
1860     CUPS_LIBS=`$CUPS_CONFIG --libs`
1861
1862     CUPS_API_VERSION=`$CUPS_CONFIG --api-version`
1863     CUPS_API_MAJOR=`echo $ECHO_N $CUPS_API_VERSION | awk -F. '{print $1}'`
1864     CUPS_API_MINOR=`echo $ECHO_N $CUPS_API_VERSION | awk -F. '{print $2}'`
1865
1866     if test $CUPS_API_MAJOR -gt 1 -o \
1867             $CUPS_API_MAJOR -eq 1 -a $CUPS_API_MINOR -ge 2; then
1868       AC_DEFINE(HAVE_CUPS_API_1_2, 1, 
1869                 [Define to 1 if CUPS 1.2 API is available])
1870     fi
1871
1872     AC_SUBST(CUPS_API_MAJOR)
1873     AC_SUBST(CUPS_API_MINOR)
1874     AC_SUBST(CUPS_CFLAGS)
1875     AC_SUBST(CUPS_LIBS)
1876
1877     AC_CHECK_HEADER(cups/cups.h,,AC_MSG_ERROR([[*** Sorry, cups-config present but cups/cups.h missing.]]))
1878
1879     AM_CONDITIONAL(HAVE_CUPS, true)
1880
1881     gtk_save_cflags="$CFLAGS"
1882     CFLAGS="$CUPS_CFLAGS"
1883     AC_TRY_COMPILE([#include <cups/http.h>],
1884                    [http_t http; char *s = http.authstring;],
1885                    [AC_DEFINE(HAVE_HTTP_AUTHSTRING, [],
1886                               [Define if cups http_t authstring field is accessible])],)
1887     CFLAGS="$gtk_save_cflags"
1888
1889     AC_SUBST(HAVE_HTTP_AUTHSTRING)
1890
1891     gtk_save_libs="$LIBS"
1892     LIBS="$CUPS_LIBS"
1893     AC_CHECK_FUNCS(httpGetAuthString)
1894     LIBS="$gtk_save_libs"
1895   fi
1896 fi
1897
1898 # Checks to see if we should compile with PAPI backend for GTK+
1899 #
1900
1901 AC_ARG_ENABLE(papi,
1902               [AC_HELP_STRING([--disable-papi]
1903                               [disable papi print backend])],,
1904              [enable_papi=auto])
1905
1906 if test "x$enable_papi" = "xno"; then
1907   AM_CONDITIONAL(HAVE_PAPI, false)
1908 else
1909   AC_MSG_CHECKING(libpapi)
1910   AC_CHECK_LIB(papi, papiServiceCreate, have_papi=yes, have_papi=no)
1911   if test $have_papi = yes; then
1912     AC_DEFINE([HAVE_PAPI], [], [Define to 1 if libpapi available])
1913   fi
1914   AM_CONDITIONAL(HAVE_PAPI, test $have_papi = yes)
1915   if test "x$enable_papi" = "xyes" -a "x$have_papi" = "xno"; then
1916     AC_MSG_ERROR([
1917 *** papi not found.
1918 ])
1919   fi
1920 fi
1921
1922 AM_CONDITIONAL(HAVE_PAPI_CUPS, test "x$have_papi" = "xyes" -a "x$CUPS_CONFIG" != "xno")
1923
1924 gtk_save_cppflags="$CPPFLAGS"
1925 CPPFLAGS="$CPPFLAGS $GTK_DEP_CFLAGS $GDK_DEP_CFLAGS"
1926
1927 AC_CHECK_HEADER(cairo-pdf.h,,AC_MSG_ERROR([
1928 *** Can't find cairo-pdf.h. You must build Cairo with the pdf
1929 *** backend enabled.]))
1930
1931 if test "$os_win32" != "yes"; then
1932   AC_CHECK_HEADER(cairo-ps.h,,AC_MSG_ERROR([
1933 *** Can't find cairo-ps.h. You must build Cairo with the 
1934 *** postscript backend enabled.]))
1935 fi   
1936
1937 CPPFLAGS="$gtk_save_cppflags"
1938      
1939                                 
1940 AC_ARG_ENABLE(test-print-backend,
1941               [AC_HELP_STRING([--enable-test-print-backend],
1942                               [build test print backend])],,
1943               [enable_test_print_backend=no])
1944 AM_CONDITIONAL(TEST_PRINT_BACKEND, test "x$enable_test_print_backend" != "xno")
1945
1946
1947 ################################################################
1948 # Strip -export-dynamic from the link lines of various libraries
1949 ################################################################
1950
1951 #
1952 # pkg-config --libs gmodule includes the "export_dynamic" flag,
1953 #  but this flag is only meaningful for executables. For libraries
1954 #  the effect is undefined; what it causes on Linux is that the
1955 #  export list from -export-symbols-regex is ignored and everything
1956 #  is exported
1957 #
1958 # We are using gmodule-no-export now, but I'm leaving the stripping
1959 # code in place for now, since pango and atk still require gmodule.
1960 export SED
1961 export_dynamic=`(./libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh`
1962 if test -n "$export_dynamic"; then
1963   GDK_PIXBUF_DEP_LIBS=`echo $GDK_PIXBUF_DEP_LIBS | sed -e "s/$export_dynamic//"`
1964   GDK_PIXBUF_XLIB_DEP_LIBS=`echo $GDK_PIXBUF_XLIB_DEP_LIBS | sed -e "s/$export_dynamic//"`
1965   GDK_DEP_LIBS=`echo $GDK_DEP_LIBS | sed -e "s/$export_dynamic//"`
1966   GTK_DEP_LIBS=`echo $GTK_DEP_LIBS | sed -e "s/$export_dynamic//"`
1967 fi
1968
1969
1970 ##################################################
1971 # Checks for gtk-doc and docbook-tools
1972 ##################################################
1973
1974 GTK_DOC_CHECK([1.11])
1975
1976 AC_CHECK_PROG(DB2HTML, db2html, true, false)
1977 AM_CONDITIONAL(HAVE_DOCBOOK, $DB2HTML)
1978
1979 AC_ARG_ENABLE(man,
1980               [AC_HELP_STRING([--enable-man],
1981                               [regenerate man pages from Docbook [default=no]])],enable_man=yes,
1982               enable_man=no)
1983
1984 if test "${enable_man}" != no; then
1985   dnl
1986   dnl Check for xsltproc
1987   dnl
1988   AC_PATH_PROG([XSLTPROC], [xsltproc])
1989   if test -z "$XSLTPROC"; then
1990     enable_man=no
1991   fi
1992
1993   dnl check for DocBook DTD and stylesheets in the local catalog.
1994   JH_CHECK_XML_CATALOG([-//OASIS//DTD DocBook XML V4.1.2//EN],
1995      [DocBook XML DTD V4.1.2],,enable_man=no)
1996   JH_CHECK_XML_CATALOG([http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl],
1997      [DocBook XSL Stylesheets],,enable_man=no)
1998 fi
1999
2000 AM_CONDITIONAL(ENABLE_MAN, test x$enable_man != xno)
2001
2002
2003 ##################################################
2004 # Output commands
2005 ##################################################
2006
2007 AC_CONFIG_COMMANDS([gdk/gdkconfig.h], [
2008         outfile=gdkconfig.h-tmp
2009         cat > $outfile <<\_______EOF
2010 /* gdkconfig.h
2011  *
2012  * This is a generated file.  Please modify `configure.in'
2013  */
2014
2015 #ifndef GDKCONFIG_H
2016 #define GDKCONFIG_H
2017
2018 #ifdef __cplusplus
2019 extern "C" {
2020 #endif /* __cplusplus */
2021
2022 #ifndef GSEAL
2023 /* introduce GSEAL() here for all of Gdk and Gtk+ without the need to modify GLib */
2024 #  ifdef GSEAL_ENABLE
2025 #    define GSEAL(ident)      _g_sealed__ ## ident
2026 #  else
2027 #    define GSEAL(ident)      ident
2028 #  endif
2029 #endif /* !GSEAL */
2030
2031 _______EOF
2032
2033         cat >>$outfile <<_______EOF
2034 $gdk_windowing
2035 $gdk_wc
2036 _______EOF
2037
2038         cat >>$outfile <<_______EOF
2039
2040 #ifdef __cplusplus
2041 }
2042 #endif /* __cplusplus */
2043
2044 #endif /* GDKCONFIG_H */
2045 _______EOF
2046
2047
2048         if cmp -s $outfile gdk/gdkconfig.h; then
2049           AC_MSG_NOTICE([gdk/gdkconfig.h is unchanged])
2050           rm -f $outfile
2051         else
2052           mv $outfile gdk/gdkconfig.h
2053         fi
2054 ],[
2055 if test "x$gdktarget" = "xx11" ; then
2056   gdk_windowing='
2057 #define GDK_WINDOWING_X11'
2058 elif test "x$gdktarget" = "xwin32" ; then
2059   gdk_windowing='
2060 #define GDK_NATIVE_WINDOW_POINTER
2061
2062 #define GDK_WINDOWING_WIN32'
2063 elif test "x$gdktarget" = "xquartz" ; then
2064   gdk_windowing='
2065 #define GDK_WINDOWING_QUARTZ'
2066 elif test "x$gdktarget" = "xdirectfb" ; then
2067   gdk_windowing='
2068 #define GDK_WINDOWING_DIRECTFB'
2069 fi
2070
2071 if test x$gdk_wchar_h = xyes; then
2072   gdk_wc='
2073 #define GDK_HAVE_WCHAR_H 1'
2074 fi
2075 if test x$gdk_wctype_h = xyes; then
2076   gdk_wc="\$gdk_wc
2077 #define GDK_HAVE_WCTYPE_H 1"
2078 fi
2079 if test x$gdk_working_wctype = xno; then
2080   gdk_wc="\$gdk_wc
2081 #define GDK_HAVE_BROKEN_WCTYPE 1"
2082 fi
2083
2084
2085 ])
2086
2087 AC_CONFIG_FILES([
2088 config.h.win32
2089 gtk-zip.sh
2090 Makefile
2091 gdk-pixbuf-2.0.pc
2092 gdk-2.0.pc
2093 gtk+-2.0.pc
2094 gtk+-unix-print-2.0.pc
2095 gail.pc
2096 gdk-pixbuf-2.0-uninstalled.pc
2097 gdk-2.0-uninstalled.pc
2098 gtk+-2.0-uninstalled.pc
2099 gail-uninstalled.pc
2100 m4macros/Makefile
2101 po/Makefile.in
2102 po-properties/Makefile.in
2103 demos/Makefile
2104 demos/gtk-demo/Makefile
2105 demos/gtk-demo/geninclude.pl
2106 tests/Makefile
2107 docs/Makefile
2108 docs/reference/Makefile
2109 docs/reference/gdk-pixbuf/Makefile
2110 docs/reference/gdk-pixbuf/version.xml
2111 docs/reference/gdk/Makefile
2112 docs/reference/gdk/version.xml
2113 docs/reference/gtk/Makefile
2114 docs/reference/gtk/version.xml
2115 docs/reference/libgail-util/Makefile
2116 docs/faq/Makefile
2117 docs/tools/Makefile
2118 docs/tutorial/Makefile
2119 gdk-pixbuf/Makefile
2120 gdk-pixbuf/gdk_pixbuf.rc
2121 gdk-pixbuf/gdk-pixbuf-features.h
2122 gdk-pixbuf/pixops/Makefile
2123 gdk/Makefile
2124 gdk/x11/Makefile
2125 gdk/win32/Makefile
2126 gdk/win32/rc/Makefile
2127 gdk/win32/rc/gdk.rc
2128 gdk/quartz/Makefile
2129 gdk/directfb/Makefile
2130 gdk/tests/Makefile
2131 gtk/Makefile
2132 gtk/makefile.msc
2133 gtk/gtkversion.h
2134 gtk/gtk-win32.rc
2135 gtk/theme-bits/Makefile
2136 gtk/tests/Makefile
2137 modules/Makefile
2138 modules/other/Makefile
2139 modules/other/gail/Makefile
2140 modules/other/gail/libgail-util/Makefile
2141 modules/other/gail/tests/Makefile
2142 modules/engines/Makefile
2143 modules/engines/pixbuf/Makefile
2144 modules/engines/ms-windows/Makefile
2145 modules/engines/ms-windows/Theme/Makefile
2146 modules/engines/ms-windows/Theme/gtk-2.0/Makefile
2147 modules/input/Makefile
2148 modules/printbackends/Makefile
2149 modules/printbackends/cups/Makefile
2150 modules/printbackends/lpr/Makefile
2151 modules/printbackends/file/Makefile
2152 modules/printbackends/papi/Makefile
2153 modules/printbackends/test/Makefile
2154 perf/Makefile
2155 contrib/Makefile
2156 contrib/gdk-pixbuf-xlib/Makefile
2157 contrib/gdk-pixbuf-xlib/gdk-pixbuf-xlib-2.0.pc
2158 ])
2159
2160 AC_OUTPUT
2161
2162 echo "configuration:
2163         target: $gdktarget"