]> Pileus Git - ~andy/gtk/blob - configure.ac
configure.ac: Remove some more obsolete macros
[~andy/gtk] / configure.ac
1 # Process this file with autoconf to produce a configure script.
2
3 # Making releases:
4 #   GTK_MICRO_VERSION += 1;
5 #   GTK_INTERFACE_AGE += 1;
6 #   GTK_BINARY_AGE += 1;
7 # if any functions have been added, set GTK_INTERFACE_AGE to 0.
8 # if backwards compatibility has been broken,
9 # set GTK_BINARY_AGE and GTK_INTERFACE_AGE to 0.
10
11 m4_define([gtk_major_version], [2])
12 m4_define([gtk_minor_version], [99])
13 m4_define([gtk_micro_version], [4])
14 m4_define([gtk_interface_age], [0])
15 m4_define([gtk_binary_age],
16           [m4_eval(100 * gtk_minor_version + gtk_micro_version)])
17 m4_define([gtk_version],
18           [gtk_major_version.gtk_minor_version.gtk_micro_version])
19 # This is the X.Y used in -lgtk-FOO-X.Y
20 m4_define([gtk_api_version], [3.0])
21
22 AC_PREREQ([2.62])
23 AC_INIT([gtk+], [gtk_version],
24         [http://bugzilla.gnome.org/enter_bug.cgi?product=gtk%2B],
25         [gtk+])
26
27 AC_CONFIG_HEADER([config.h])
28 AC_CONFIG_SRCDIR([gdk/gdktypes.h])
29 AC_CONFIG_MACRO_DIR([m4])
30
31 # Define a string for the earliest version that this release has
32 # backwards binary compatibility with for all interfaces a module
33 # might. Unless we add module-only API with lower stability
34 # guarantees, this should be unchanged until we break binary compat
35 # for GTK+.
36 #
37 #GTK_BINARY_VERSION=$GTK_MAJOR_VERSION.$GTK_MINOR_VERSION.$LT_CURRENT
38 m4_define([gtk_binary_version], [3.0.0])
39
40 # required versions of other packages
41 m4_define([glib_required_version], [2.27.5])
42 m4_define([pango_required_version], [1.20])
43 m4_define([atk_required_version], [1.29.2])
44 m4_define([cairo_required_version], [1.10.0])
45 m4_define([gdk_pixbuf_required_version], [2.21.0])
46 GLIB_REQUIRED_VERSION=glib_required_version
47 PANGO_REQUIRED_VERSION=pango_required_version
48 ATK_REQUIRED_VERSION=atk_required_version
49 CAIRO_REQUIRED_VERSION=cairo_required_version
50 GDK_PIXBUF_REQUIRED_VERSION=gdk_pixbuf_required_version
51 AC_SUBST(GLIB_REQUIRED_VERSION)
52 AC_SUBST(PANGO_REQUIRED_VERSION)
53 AC_SUBST(ATK_REQUIRED_VERSION)
54 AC_SUBST(CAIRO_REQUIRED_VERSION)
55 AC_SUBST(GDK_PIXBUF_REQUIRED_VERSION)
56
57
58 # Save this value here, since automake will set cflags later
59 cflags_set=${CFLAGS+set}
60
61 AM_INIT_AUTOMAKE([1.10 no-define -Wno-portability dist-bzip2])
62 AM_MAINTAINER_MODE([enable])
63
64 # Support silent build rules, requires at least automake-1.11. Disable
65 # by either passing --disable-silent-rules to configure or passing V=1
66 # to make
67 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
68
69 #
70 # For each of the libraries we build, we define the following
71 # substituted variables:
72 #
73 # foo_PACKAGES:     pkg-config packages this library requires
74 # foo_EXTRA_LIBS:   Libraries this module requires not pulled in by pkg-config
75 # foo_EXTRA_CFLAGS: cflags this module requires not pulled in by pkg-config
76 # foo_DEP_LIBS:     All libraries this module requires
77 # foo_DEP_CFLAGS:   All cflags this module requires
78
79
80 GTK_MAJOR_VERSION=gtk_major_version
81 GTK_MINOR_VERSION=gtk_minor_version
82 GTK_MICRO_VERSION=gtk_micro_version
83 GTK_INTERFACE_AGE=gtk_interface_age
84 GTK_BINARY_AGE=gtk_binary_age
85 GTK_VERSION=gtk_version
86 GTK_API_VERSION=gtk_api_version
87 GTK_BINARY_VERSION=gtk_binary_version
88 AC_SUBST(GTK_MAJOR_VERSION)
89 AC_SUBST(GTK_MINOR_VERSION)
90 AC_SUBST(GTK_MICRO_VERSION)
91 AC_SUBST(GTK_INTERFACE_AGE)
92 AC_SUBST(GTK_BINARY_AGE)
93 AC_SUBST(GTK_API_VERSION)
94 AC_SUBST(GTK_VERSION)
95 AC_SUBST(GTK_BINARY_VERSION)
96
97 # libtool versioning
98 #LT_RELEASE=$GTK_MAJOR_VERSION.$GTK_MINOR_VERSION
99 #LT_CURRENT=`expr $GTK_MICRO_VERSION - $GTK_INTERFACE_AGE`
100 #LT_REVISION=$GTK_INTERFACE_AGE
101 #LT_AGE=`expr $GTK_BINARY_AGE - $GTK_INTERFACE_AGE`
102 #LT_CURRENT_MINUS_AGE=`expr $LT_CURRENT - $LT_AGE`
103
104 m4_define([lt_current], [m4_eval(100 * gtk_minor_version + gtk_micro_version - gtk_interface_age)])
105 m4_define([lt_revision], [gtk_interface_age])
106 m4_define([lt_age], [m4_eval(gtk_binary_age - gtk_interface_age)])
107 LT_VERSION_INFO="lt_current:lt_revision:lt_age"
108 LT_CURRENT_MINUS_AGE=m4_eval(lt_current - lt_age)
109 AC_SUBST(LT_VERSION_INFO)
110 AC_SUBST(LT_CURRENT_MINUS_AGE)
111
112 m4_define([gail_lt_current],[0])
113 m4_define([gail_lt_revision],[0])
114 m4_define([gail_lt_age],[0])
115 m4_define([gail_lt_version_info],[gail_lt_current:gail_lt_revision:gail_lt_age])
116 m4_define([gail_lt_current_minus_age],[m4_eval(gail_lt_current - gail_lt_age)])
117 AC_SUBST([GAIL_LT_VERSION_INFO],[gail_lt_version_info])
118 AC_SUBST([GAIL_LT_CURRENT_MINUS_AGE],[gail_lt_current_minus_age])
119
120 # Checks for programs.
121 AC_PROG_CC
122 AC_PROG_CC_C_O
123 AC_PROG_CC_STDC
124 AC_PROG_INSTALL
125 AC_PROG_MAKE_SET
126
127
128 GETTEXT_PACKAGE=gtk30
129 AC_SUBST(GETTEXT_PACKAGE)
130 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE",
131                    [The prefix for our gettext translation domains.])
132
133 AC_CANONICAL_HOST
134
135 MATH_LIB=-lm
136 AC_MSG_CHECKING([for native Win32])
137 LIB_EXE_MACHINE_FLAG=X86
138 EXE_MANIFEST_ARCHITECTURE=X86
139 case "$host" in
140   *-*-mingw*)
141     os_win32=yes
142     gio_can_sniff=no
143     MATH_LIB=
144     case "$host" in
145     x86_64-*-*)
146       LIB_EXE_MACHINE_FLAG=X64
147       EXE_MANIFEST_ARCHITECTURE=AMD64
148       ;;
149     esac
150     ;;
151   *)
152     os_win32=no
153     ;;
154 esac
155 AC_MSG_RESULT([$os_win32])
156
157 AC_SUBST(LIB_EXE_MACHINE_FLAG)
158 AC_SUBST(EXE_MANIFEST_ARCHITECTURE)
159
160 case $host in
161   *-*-linux*)
162     os_linux=yes
163     ;;
164 esac
165
166 dnl
167 dnl Check for a working C++ compiler, but do not bail out, if none is found.
168 dnl We use this for an automated test for C++ header correctness.
169 dnl
170 AC_CHECK_TOOLS(CXX, [$CCC c++ g++ gcc CC cxx cc++ cl], gcc)
171 AC_LANG_PUSH([C++])
172
173 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]],
174                                    [[class a { int b; } c;]])],
175                   [],[CXX=])
176 AM_CONDITIONAL(HAVE_CXX, test "$CXX" != "")
177
178 gtk_save_cxxflags="$CXXFLAGS"
179 CXXFLAGS="$CXXFLAGS -x objective-c++"
180 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@interface Foo @end]],
181                                    [[]])],
182                   [OBJC=yes],[OBJC=no])
183 AM_CONDITIONAL(HAVE_OBJC, test "$OBJC" = "yes")
184 CXXFLAGS="$gtk_save_cxxflags"
185 AC_LANG_POP([C++])
186
187 if test "$os_win32" = "yes"; then
188   if test x$enable_static = xyes -o x$enable_static = x; then
189     AC_MSG_WARN([Disabling static library build, must build as DLL on Windows.])
190     enable_static=no
191   fi
192   if test x$enable_shared = xno; then
193     AC_MSG_WARN([Enabling shared library build, must build as DLL on Windows.])
194   fi
195   enable_shared=yes
196 fi
197
198 dnl Initialize libtool
199 LT_PREREQ([2.2.6])
200 LT_INIT([disable-static win32-dll])
201 # Create libtool early, because it's used in configure
202 LT_OUTPUT
203
204 # Make sure we use 64-bit versions of various file stuff.
205 AC_SYS_LARGEFILE
206
207 AM_PROG_AS
208 AC_PATH_PROG(NM, nm, nm)
209
210 AC_MSG_CHECKING([for some Win32 platform])
211 case "$host" in
212   *-*-mingw*|*-*-cygwin*)
213     platform_win32=yes
214     ;;
215   *)
216     platform_win32=no
217     ;;
218 esac
219 AC_MSG_RESULT([$platform_win32])
220 AM_CONDITIONAL(PLATFORM_WIN32, test "$platform_win32" = "yes")
221
222 AM_CONDITIONAL(OS_WIN32, test "$os_win32" = "yes")
223 AM_CONDITIONAL(OS_UNIX, test "$os_win32" != "yes")
224 AM_CONDITIONAL(OS_LINUX, test "$os_linux" = "yes")
225
226 if test "$os_win32" = "yes"; then
227   AC_CHECK_TOOL(WINDRES, windres, no)
228   if test "$WINDRES" = no; then
229     AC_MSG_ERROR([*** Could not find an implementation of windres in your PATH.])
230   fi
231   AC_CHECK_PROG(ms_librarian, lib.exe, yes, no)
232 fi
233 AM_CONDITIONAL(MS_LIB_AVAILABLE, test x$ms_librarian = xyes)
234
235 m4_define([debug_default],
236           m4_if(m4_eval(gtk_minor_version % 2), [1], [yes], [minimum]))
237
238 dnl declare --enable-* args and collect ac_help strings
239 AC_ARG_ENABLE(debug,
240               [AS_HELP_STRING([--enable-debug=@<:@no/minimum/yes@:>@],
241                               [turn on debugging @<:@default=debug_default@:>@])],,
242               [enable_debug=debug_default])
243
244 AC_ARG_ENABLE(rebuilds,
245               [AS_HELP_STRING([--disable-rebuilds],
246                               [disable all source autogeneration rules])],,
247               [enable_rebuilds=yes])
248
249 AC_ARG_ENABLE(gtk2-dependency,
250               [AS_HELP_STRING([--enable-gtk2-dependency],
251                               [Do not build gtk-update-icon-cache and other shared tools])],,
252               [enable_gtk2_dependency=no])
253
254 AM_CONDITIONAL(BUILD_ICON_CACHE, [test "x$enable_gtk2_dependency" = xno])
255
256 AC_ARG_ENABLE(xkb,
257               [AS_HELP_STRING([--enable-xkb],
258                               [support XKB extension [default=maybe]])],,
259               [enable_xkb="maybe"])
260 AC_ARG_ENABLE(xinerama,
261               [AS_HELP_STRING([--enable-xinerama],
262                               [support Xinerama extension if available [default=maybe]])],,
263               [enable_xinerama="maybe"])
264 AC_ARG_ENABLE(xinput,
265               [AS_HELP_STRING([--enable-xinput],
266                               [support XInput extension if available [default=yes]])],,
267               [enable_xinput="maybe"])
268 AC_ARG_ENABLE(xrandr,
269               [AS_HELP_STRING([--enable-xrandr],
270                               [support XRandR extension if available [default=maybe]])],,
271               [enable_xrandr="maybe"])
272 AC_ARG_ENABLE(xfixes,
273               [AS_HELP_STRING([--enable-xfixes],
274                               [support XFixes extension if available [default=maybe]])],,
275               [enable_xfixes="maybe"])
276 AC_ARG_ENABLE(xcomposite,
277               [AS_HELP_STRING([--enable-xcomposite],
278                               [support X Composite extension if available [default=maybe]])],,
279               [enable_xcomposite="maybe"])
280 AC_ARG_ENABLE(xdamage,
281               [AS_HELP_STRING([--enable-xdamage],
282                               [support X Damage extension if available [default=maybe]])],,
283               [enable_xdamage="maybe"])
284
285 AC_ARG_ENABLE(x11-backend,
286               [AS_HELP_STRING([--enable-x11-backend],
287                               [enable the X11 gdk backend])],
288                               [backend_set=yes])
289 AC_ARG_ENABLE(win32-backend,
290               [AS_HELP_STRING([--enable-win32-backend],
291                               [enable the Win32 gdk backend])],
292                               [backend_set=yes])
293 AC_ARG_ENABLE(quartz-backend,
294               [AS_HELP_STRING([--enable-quartz-backend],
295                               [enable the quartz gdk backend])],
296                               [backend_set=yes])
297
298 if test -z "$backend_set"; then
299   if test "$platform_win32" = yes; then
300     enable_win32_backend=yes
301   else
302     enable_x11_backend=yes
303   fi
304 fi
305
306 cairo_backends=
307 backend_immodules=
308 GDK_BACKENDS=
309 GDK_EXTRA_LIBS=
310 GDK_EXTRA_CFLAGS=
311 GDK_WINDOWING=
312 GIO_PACKAGE=gio-2.0
313 PANGO_PACKAGES="pango pangocairo"
314
315 if test "x$enable_x11_backend" == xyes; then
316   # GDK calls the xlib backend "x11," cairo calls it "xlib." Other
317   # backend names are identical.
318   cairo_backends="$cairo_backends cairo-xlib"
319   GDK_BACKENDS="$GDK_BACKENDS x11"
320   # Pull in gio-unix for GDesktopAppInfo usage, see at least
321   # gdkapplaunchcontext-x11.c
322   GIO_PACKAGE=gio-unix-2.0
323   backend_immodules="$backend_immodules,xim"
324   GDK_WINDOWING="$GDK_WINDOWING
325 #define GDK_WINDOWING_X11"
326 fi
327
328 if test "x$enable_win32_backend" == xyes; then
329   cairo_backends="$cairo_backends cairo-win32"
330   GDK_BACKENDS="$GDK_BACKENDS win32"
331   backend_immodules="$backend_immodules,ime"
332   GDK_WINDOWING="$GDK_WINDOWING
333 #define GDK_WINDOWING_WIN32"
334   GDK_EXTRA_LIBS="$GDK_EXTRA_LIBS -lgdi32 -limm32 -lshell32 -lole32 -Wl,-luuid"
335   AM_CONDITIONAL(USE_WIN32, true)
336   PANGO_PACKAGES="pangowin32 pangocairo"
337 else
338   AM_CONDITIONAL(USE_WIN32, false)
339 fi
340
341 if test "x$enable_quartz_backend" == xyes; then
342   cairo_backends="$cairo_backends cairo-quartz"
343   GDK_BACKENDS="$GDK_BACKENDS quartz"
344   GDK_WINDOWING="$GDK_WINDOWING
345 #define GDK_WINDOWING_QUARTZ"
346   GDK_EXTRA_LIBS="$GDK_EXTRA_LIBS -framework Cocoa"
347   AM_CONDITIONAL(USE_QUARTZ, true)
348 else
349   AM_CONDITIONAL(USE_QUARTZ, false)
350 fi
351
352 # strip leading space
353 GDK_BACKENDS=${GDK_BACKENDS/# }
354
355 AC_SUBST(GDK_BACKENDS)
356
357 if test -z "$GDK_BACKENDS"; then
358   AC_MSG_ERROR([No GDK backends selected.])
359 fi
360
361 if test "x$enable_debug" = "xyes"; then
362   test "$cflags_set" = set || CFLAGS="$CFLAGS -g"
363   GTK_DEBUG_FLAGS="-DG_ENABLE_DEBUG -DG_ERRORCHECK_MUTEXES"
364 else
365   if test "x$enable_debug" = "xno"; then
366     GTK_DEBUG_FLAGS="-DG_DISABLE_ASSERT -DG_DISABLE_CHECKS -DG_DISABLE_CAST_CHECKS"
367   else
368     GTK_DEBUG_FLAGS="-DG_DISABLE_CAST_CHECKS"
369   fi
370 fi
371
372
373 AC_DEFINE_UNQUOTED(GTK_COMPILED_WITH_DEBUGGING, "${enable_debug}",
374                    [Define if debugging is enabled])
375
376
377 # Build time sanity check...
378 AM_SANITY_CHECK
379
380 changequote(,)dnl
381 if test "x$GCC" = "xyes"; then
382   case " $CFLAGS " in
383   *[\ \ ]-Wall[\ \      ]*) ;;
384   *) CFLAGS="$CFLAGS -Wall" ;;
385   esac
386
387   if test "x$enable_ansi" = "xyes"; then
388     case " $CFLAGS " in
389     *[\ \       ]-ansi[\ \      ]*) ;;
390     *) CFLAGS="$CFLAGS -ansi" ;;
391     esac
392
393     case " $CFLAGS " in
394     *[\ \       ]-pedantic[\ \  ]*) ;;
395     *) CFLAGS="$CFLAGS -pedantic" ;;
396     esac
397   fi
398 fi
399 changequote([,])dnl
400
401 CPPFLAGS="$CPPFLAGS -DG_DISABLE_SINGLE_INCLUDES -DATK_DISABLE_SINGLE_INCLUDES"
402
403 # Ensure MSVC-compatible struct packing convention is used when
404 # compiling for Win32 with gcc.
405 # What flag to depends on gcc version: gcc3 uses "-mms-bitfields", while
406 # gcc2 uses "-fnative-struct".
407 if test x"$os_win32" = xyes; then
408   if test x"$GCC" = xyes; then
409     msnative_struct=''
410     AC_MSG_CHECKING([how to get MSVC-compatible struct packing])
411     if test -z "$ac_cv_prog_CC"; then
412       our_gcc="$CC"
413     else
414       our_gcc="$ac_cv_prog_CC"
415     fi
416     case `$our_gcc --version | sed -e 's,\..*,.,' -e q` in
417       2.)
418         if $our_gcc -v --help 2>/dev/null | grep fnative-struct >/dev/null; then
419           msnative_struct='-fnative-struct'
420         fi
421         ;;
422       *)
423         if $our_gcc -v --help 2>/dev/null | grep ms-bitfields >/dev/null; then
424           msnative_struct='-mms-bitfields'
425         fi
426         ;;
427     esac
428     if test x"$msnative_struct" = x ; then
429       AC_MSG_RESULT([no way])
430       AC_MSG_WARN([produced libraries might be incompatible with MSVC-compiled code])
431     else
432       CFLAGS="$CFLAGS $msnative_struct"
433       AC_MSG_RESULT([${msnative_struct}])
434     fi
435   fi
436 fi
437
438 ## Initial sanity check, done here so that users get told they
439 ## have the wrong dependencies as early in the process as possible.
440 ## Later on we actually use the cflags/libs from separate pkg-config
441 ## calls. Oh, also the later pkg-config calls don't include
442 ## the version requirements since those make the module lists
443 ## annoying to construct
444 PKG_CHECK_MODULES(BASE_DEPENDENCIES,
445   [glib-2.0 >= glib_required_version dnl
446    atk >= atk_required_version dnl
447    pango >= pango_required_version dnl
448    cairo >= cairo_required_version dnl
449    cairo-gobject >= cairo_required_version dnl
450    gdk-pixbuf-2.0 >= gdk_pixbuf_required_version])
451
452 PKG_CHECK_MODULES(CAIRO_BACKEND, [$cairo_backends])
453
454 if test "$os_win32" != yes; then
455     # libtool option to control which symbols are exported
456     # right now, symbols starting with _ are not exported
457     LIBTOOL_EXPORT_OPTIONS='-export-symbols-regex "^[[^_]].*"'
458 else
459     # We currently use .def files on Windows (for gdk and gtk)
460     LIBTOOL_EXPORT_OPTIONS=
461 fi
462 AC_SUBST(LIBTOOL_EXPORT_OPTIONS)
463
464 dnl ******************************************************
465 dnl * See whether to include shared library dependencies *
466 dnl ******************************************************
467
468 AC_ARG_ENABLE(explicit-deps,
469               [AS_HELP_STRING([--enable-explicit-deps=@<:@yes/no/auto@:>@],
470                               [use explicit dependencies in .pc files [default=auto]])],,
471               [enable_explicit_deps=auto])
472
473 AC_MSG_CHECKING([Whether to write dependencies into .pc files])
474 case $enable_explicit_deps in
475   auto)
476     export SED
477     deplibs_check_method=`(./libtool --config; echo 'eval echo \"$deplibs_check_method\"') | sh`
478     if test "x$deplibs_check_method" '!=' xpass_all || test "x$enable_static" = xyes ; then
479       enable_explicit_deps=yes
480     else
481       enable_explicit_deps=no
482     fi
483   ;;
484   yes|no)
485   ;;
486   *) AC_MSG_ERROR([Value given to --enable-explicit-deps must be one of yes, no or auto])
487   ;;
488 esac
489 AC_MSG_RESULT($enable_explicit_deps)
490
491 AM_CONDITIONAL(DISABLE_EXPLICIT_DEPS, test $enable_explicit_deps = no)
492
493 # define a MAINT-like variable REBUILD which is set if Perl
494 # and awk are found, so autogenerated sources can be rebuilt
495
496 AC_PATH_PROGS(PERL, perl5 perl)
497
498 # We would like indent, but don't require it.
499 AC_CHECK_PROG(INDENT, indent, indent)
500
501 REBUILD=\#
502 if test "x$enable_rebuilds" = "xyes" && \
503      test -n "$PERL" && \
504      $PERL -e 'exit !($] >= 5.002)' > /dev/null 2>&1 ; then
505   REBUILD=
506 fi
507 AC_SUBST(REBUILD)
508
509 AC_CHECK_FUNCS(lstat mkstemp flockfile getc_unlocked)
510 AC_CHECK_FUNCS(localtime_r)
511
512 # _NL_TIME_FIRST_WEEKDAY is an enum and not a define
513 AC_MSG_CHECKING([for _NL_TIME_FIRST_WEEKDAY])
514 AC_TRY_LINK([#include <langinfo.h>], [
515 char c;
516 c = *((unsigned char *)  nl_langinfo(_NL_TIME_FIRST_WEEKDAY));
517 ], gtk_ok=yes, gtk_ok=no)
518 AC_MSG_RESULT($gtk_ok)
519 if test "$gtk_ok" = "yes"; then
520   AC_DEFINE([HAVE__NL_TIME_FIRST_WEEKDAY], [1],
521             [Define if _NL_TIME_FIRST_WEEKDAY is available])
522 fi
523
524 # _NL_MEASUREMENT_MEASUREMENT is an enum and not a define
525 AC_MSG_CHECKING([for _NL_MEASUREMENT_MEASUREMENT])
526 AC_TRY_LINK([#include <langinfo.h>], [
527 char c;
528 c = *((unsigned char *)  nl_langinfo(_NL_MEASUREMENT_MEASUREMENT));
529 ], gtk_ok=yes, gtk_ok=no)
530 AC_MSG_RESULT($gtk_ok)
531 if test "$gtk_ok" = "yes"; then
532   AC_DEFINE([HAVE__NL_MEASUREMENT_MEASUREMENT], [1],
533             [Define if _NL_MEASUREMENT_MEASUREMENT is available])
534 fi
535
536 # _NL_PAPER_HEIGHT is an enum and not a define
537 AC_MSG_CHECKING([for _NL_PAPER_HEIGHT])
538 AC_TRY_LINK([#include <langinfo.h>], [
539 char c;
540 c = *((unsigned char *)  nl_langinfo(_NL_PAPER_HEIGHT));
541 ], gtk_ok=yes, gtk_ok=no)
542 AC_MSG_RESULT($gtk_ok)
543 if test "$gtk_ok" = "yes"; then
544   AC_DEFINE([HAVE__NL_PAPER_HEIGHT], [1],
545             [Define if _NL_PAPER_HEIGHT is available])
546 fi
547
548 # _NL_PAPER_WIDTH is an enum and not a define
549 AC_MSG_CHECKING([for _NL_PAPER_WIDTH])
550 AC_TRY_LINK([#include <langinfo.h>], [
551 char c;
552 c = *((unsigned char *)  nl_langinfo(_NL_PAPER_WIDTH));
553 ], gtk_ok=yes, gtk_ok=no)
554 AC_MSG_RESULT($gtk_ok)
555 if test "$gtk_ok" = "yes"; then
556   AC_DEFINE([HAVE__NL_PAPER_WIDTH], [1],
557             [Define if _NL_PAPER_WIDTH is available])
558 fi
559
560 # i18n stuff
561 ALL_LINGUAS="`grep -v '^#' "$srcdir/po/LINGUAS" | tr '\n' ' '`"
562 AM_GLIB_GNU_GETTEXT
563 LIBS="$LIBS $INTLLIBS"
564 AC_OUTPUT_COMMANDS([case "$CONFIG_FILES" in *po-properties/Makefile.in*)
565         sed -e "/POTFILES =/r po-properties/POTFILES" po-properties/Makefile.in > po-properties/Makefile
566       esac])
567
568 dnl Snippet below is copied from AM_GLIB_GNU_GETTEXT to generate a first
569 dnl po-properties/POTFILES during configure; see GNOME #573515.
570 dnl
571 dnl Generate list of files to be processed by xgettext which will
572 dnl be included in po-properties/Makefile.
573 test -d po-properties || mkdir po-properties
574 if test "x$srcdir" != "x."; then
575   if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
576     popropsrcprefix="$srcdir/"
577   else
578     popropsrcprefix="../$srcdir/"
579   fi
580 else
581   popropsrcprefix="../"
582 fi
583 rm -f po-properties/POTFILES
584 sed -e "/^#/d" -e "/^\$/d" -e "s,.*,    $popropsrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
585 < $srcdir/po-properties/POTFILES.in > po-properties/POTFILES
586 dnl (End of adapted AM_GLIB_GNU_GETTEXT snippet.)
587
588 AM_GLIB_DEFINE_LOCALEDIR(GTK_LOCALEDIR)
589
590 dnl The DU4 header files don't provide library prototypes unless
591 dnl -std1 is given to the native cc.
592 AC_MSG_CHECKING([for extra flags to get ANSI library prototypes])
593
594 gtk_save_LIBS=$LIBS
595 LIBS="$LIBS -lm"
596 AC_TRY_RUN([#include <math.h>
597              int main (void) { return (log(1) != log(1.)); }],
598      AC_MSG_RESULT(none needed),
599      gtk_save_CFLAGS="$CFLAGS"
600      CFLAGS="$CFLAGS -std1"
601      AC_TRY_RUN([#include <math.h>
602                  int main (void) { return (log(1) != log(1.)); }],
603          AC_MSG_RESULT(-std1),
604          AC_MSG_RESULT()
605          CFLAGS="$gtk_save_CFLAGS"
606          AC_MSG_WARN(
607                 [No ANSI prototypes found in library. (-std1 didn't work.)]),
608          true
609      ),
610      AC_MSG_RESULT(none needed)
611 )
612 LIBS=$gtk_save_LIBS
613
614 AC_MSG_CHECKING(for the BeOS)
615 case $host in
616   *-*-beos*)
617     AC_MSG_RESULT(yes)
618     MATH_LIB=
619   ;;
620   *)
621     AC_MSG_RESULT(no)
622   ;;
623 esac
624
625 AC_SUBST(MATH_LIB)
626 #
627 # see bug 162979
628 #
629 AC_MSG_CHECKING(for HP-UX)
630 case $host_os in
631   hpux9* | hpux10* | hpux11*)
632     AC_MSG_RESULT(yes)
633     CFLAGS="$CFLAGS -DHPPEX -DSHMLINK"
634   ;;
635   *)
636     AC_MSG_RESULT(no)
637   ;;
638 esac
639
640 #
641 # Run AM_PATH_GLIB_2_0 to make sure that GLib is installed and working
642 #
643
644 GLIB_PACKAGES="gobject-2.0 gio-2.0 gmodule-no-export-2.0"
645
646 AM_PATH_GLIB_2_0(glib_required_version, :,
647   AC_MSG_ERROR([
648 *** GLIB glib_required_version or better is required. The latest version of
649 *** GLIB is always available from ftp://ftp.gtk.org/pub/gtk/.]),
650   gobject gmodule-no-export gthread)
651
652 # See if it's safe to turn G_DISABLE_DEPRECATED on.
653 GLIB_VERSION_MAJOR_MINOR=`$PKG_CONFIG --modversion glib-2.0 | sed "s/\.@<:@^.@:>@*\$//"`
654 GLIB_REQUIRED_VERSION_MAJOR_MINOR=`echo glib_required_version | sed "s/\.@<:@^.@:>@*\$//"`
655 if test "x$GLIB_VERSION_MAJOR_MINOR" = "x$GLIB_REQUIRED_VERSION_MAJOR_MINOR"; then
656   CFLAGS="-DG_DISABLE_DEPRECATED $CFLAGS"
657 fi
658
659 CFLAGS="-DGDK_PIXBUF_DISABLE_DEPRECATED $CFLAGS"
660
661
662 dnl
663 dnl Check for bind_textdomain_codeset, including -lintl if GLib brings it in.
664 dnl
665 gtk_save_LIBS=$LIBS
666 LIBS="$LIBS $GLIB_LIBS"
667 AC_CHECK_FUNCS(bind_textdomain_codeset)
668 LIBS=$gtk_save_LIBS
669
670 AC_CHECK_HEADERS(pwd.h,
671                  AC_DEFINE(HAVE_PWD_H, 1,
672                            [Define to 1 if pwd.h is available]))
673 AC_CHECK_HEADERS(sys/time.h,
674                  AC_DEFINE(HAVE_SYS_TIME_H, 1,
675                            [Define to 1 if time.h is available]))
676 AC_CHECK_HEADERS(unistd.h,
677                  AC_DEFINE(HAVE_UNISTD_H, 1,
678                            [Define to 1 if unistd.h is available]))
679 AC_CHECK_HEADERS(ftw.h,
680                  AC_DEFINE(HAVE_FTW_H, 1,
681                            [Define to 1 if ftw.h is available]))
682
683 AC_MSG_CHECKING([for GNU ftw extensions])
684 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#define _XOPEN_SOURCE 500
685                                      #define _GNU_SOURCE
686                                      #include <ftw.h>]],
687                                    [[int flags = FTW_ACTIONRETVAL;]])],
688                   [gtk_ok=yes],[gtk_ok=no])
689 if test $gtk_ok = yes; then
690     AC_MSG_RESULT([yes])
691     AC_DEFINE(HAVE_GNU_FTW, 1, [Have GNU ftw])
692 else
693     AC_MSG_RESULT([no])
694 fi
695
696 saved_cflags="$CFLAGS"
697 saved_ldflags="$LDFLAGS"
698
699
700 # Checks for library functions.
701 AC_FUNC_MMAP
702
703 AC_CHECK_FUNCS(mallinfo)
704 AC_CHECK_FUNCS(getresuid)
705 AC_TYPE_UID_T
706
707 # Check if <sys/select.h> needs to be included for fd_set
708 AC_MSG_CHECKING([for fd_set])
709 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>]],
710                                    [[fd_set readMask, writeMask;]])],
711                   [gtk_ok=yes],[gtk_ok=no])
712 if test $gtk_ok = yes; then
713     AC_MSG_RESULT([yes, found in sys/types.h])
714 else
715     AC_HEADER_EGREP(fd_mask, sys/select.h, gtk_ok=yes)
716     if test $gtk_ok = yes; then
717         AC_DEFINE(HAVE_SYS_SELECT_H, 1,
718                   [Define to 1 if sys/select.h is available])
719         AC_MSG_RESULT([yes, found in sys/select.h])
720     else
721         AC_DEFINE(NO_FD_SET, 1,
722                   [Define to 1 if fd_set is not available])
723         AC_MSG_RESULT(no)
724     fi
725 fi
726
727 # Check for uxtheme.h (for MS-Windows Engine)
728 AC_MSG_CHECKING(for uxtheme.h)
729 AC_TRY_CPP([#include <uxtheme.h>], gtk_uxtheme_h=yes, gtk_uxtheme_h=no)
730 if test $gtk_uxtheme_h = yes; then
731    AC_DEFINE(HAVE_UXTHEME_H, 1, [Have uxtheme.h include file])
732 fi
733 AC_MSG_RESULT($gtk_uxtheme_h)
734
735 # Checks for gdkspawn
736 AC_CHECK_HEADERS(crt_externs.h)
737 AC_CHECK_FUNCS(_NSGetEnviron)
738
739 AC_MSG_CHECKING(whether to build dynamic modules)
740
741 AC_ARG_ENABLE(modules,
742               [AS_HELP_STRING([--disable-modules],
743                               [disable dynamic module loading])])
744
745 dynworks=false
746 build_dynamic_modules=no
747 deps=
748 if test x$enable_modules = xno; then
749     AC_MSG_RESULT(no)
750 else
751     AC_MSG_RESULT(yes)
752     AC_MSG_CHECKING(whether dynamic modules work)
753     ## for loop is to strip newline
754     tmp=`$PKG_CONFIG --variable=gmodule_supported gmodule-no-export-2.0`
755     for I in $tmp; do
756         dynworks=$I
757     done
758
759     dnl Now we check to see if our libtool supports shared lib deps
760     dnl (in a rather ugly way even)
761     if $dynworks; then
762         module_libtool_config="${CONFIG_SHELL-/bin/sh} ./libtool --config"
763         module_deplibs_check=`$module_libtool_config | \
764             grep '^[[a-z_]]*check[[a-z_]]*_method=[['\''"]]' | \
765             sed 's/.*[['\''"]]\(.*\)[['\''"]]$/\1/'`
766         if test "x$module_deplibs_check" = "xnone" || \
767            test "x$module_deplibs_check" = "xunknown" || \
768            test "x$module_deplibs_check" = "x"; then
769             dynworks=false
770         fi
771     fi
772
773     if $dynworks; then
774         build_dynamic_modules=yes
775         AC_DEFINE(USE_GMODULE, 1,
776                   [Define to 1 if gmodule works and should be used])
777         AC_MSG_RESULT(yes)
778     else
779         build_dynamic_modules=no
780         AC_MSG_RESULT(no)
781     fi
782 fi
783
784 AM_CONDITIONAL(BUILD_DYNAMIC_MODULES, $dynworks)
785
786 #
787 # Allow building some or all immodules included
788 #
789 AC_MSG_CHECKING(immodules to build)
790
791 AC_ARG_WITH(included_immodules,
792             [AS_HELP_STRING([--with-included-immodules=MODULE1,MODULE2,...],
793                             [build the specified input methods into gtk])])
794
795 if $dynworks; then
796    :
797 else
798    ## if the option was specified, leave it; otherwise disable included immodules
799    if test x$with_included_immodules = xno; then
800            with_included_immodules=yes
801    fi
802 fi
803
804 all_immodules="am-et,cedilla,cyrillic-translit,inuktitut,ipa,multipress,thai,ti-er,ti-et,viqr$backend_immodules"
805
806 included_immodules=""
807 # If the switch specified without listing any specific ones, include all
808 if test "x$with_included_immodules" = xyes ; then
809   included_immodules="$all_immodules"
810 else
811   included_immodules="$with_included_immodules"
812 fi
813
814 AC_MSG_RESULT($included_immodules)
815 AM_CONDITIONAL(HAVE_INCLUDED_IMMMODULES, test "x$included_immodules" != x)
816
817 INCLUDED_IMMODULE_OBJ=
818 INCLUDED_IMMODULE_DEFINE=
819
820 IFS="${IFS=     }"; gtk_save_ifs="$IFS"; IFS=","
821 for immodule in $included_immodules; do
822  immodule_underscores=`echo $immodule | sed -e 's/-/_/g'`
823  if echo "$all_immodules" | egrep "(^|,)$immodule(\$|,)" > /dev/null; then
824    :
825  else
826    AC_MSG_ERROR([the specified input method $immodule does not exist])
827  fi
828
829  INCLUDED_IMMODULE_OBJ="$INCLUDED_IMMODULE_OBJ ../modules/input/libstatic-im-$immodule.la"
830  INCLUDED_IMMODULE_DEFINE="$INCLUDED_IMMODULE_DEFINE -DINCLUDE_IM_$immodule_underscores"
831  eval INCLUDE_$immodule_underscores=yes
832 done
833 IFS="$gtk_save_ifs"
834 AC_SUBST(INCLUDED_IMMODULE_OBJ)
835 AC_SUBST(INCLUDED_IMMODULE_DEFINE)
836
837 AM_CONDITIONAL(INCLUDE_IM_AM_ET, [test x"$INCLUDE_am_et" = xyes])
838 AM_CONDITIONAL(INCLUDE_IM_CEDILLA, [test x"$INCLUDE_cedilla" = xyes])
839 AM_CONDITIONAL(INCLUDE_IM_CYRILLIC_TRANSLIT, [test x"$INCLUDE_cyrillic_translit" = xyes])
840 AM_CONDITIONAL(INCLUDE_IM_IME, [test x"$INCLUDE_ime" = xyes])
841 AM_CONDITIONAL(INCLUDE_IM_INUKTITUT, [test x"$INCLUDE_inuktitut" = xyes])
842 AM_CONDITIONAL(INCLUDE_IM_IPA, [test x"$INCLUDE_ipa" = xyes])
843 AM_CONDITIONAL(INCLUDE_IM_MULTIPRESS, [test x"$INCLUDE_multipress" = xyes])
844 AM_CONDITIONAL(INCLUDE_IM_THAI, [test x"$INCLUDE_thai" = xyes])
845 AM_CONDITIONAL(INCLUDE_IM_TI_ER, [test x"$INCLUDE_ti_er" = xyes])
846 AM_CONDITIONAL(INCLUDE_IM_TI_ET, [test x"$INCLUDE_ti_et" = xyes])
847 AM_CONDITIONAL(INCLUDE_IM_VIQR, [test x"$INCLUDE_viqr" = xyes])
848 AM_CONDITIONAL(INCLUDE_IM_XIM, [test x"$INCLUDE_xim" = xyes])
849
850 # Checks to see whether we should include mediaLib
851 # support.
852 #
853 AC_CHECK_HEADER(sys/systeminfo.h,
854                 AC_DEFINE(HAVE_SYS_SYSTEMINFO_H, 1,
855                           [Define to 1 if sys/systeminfo.h is available]))
856 AC_CHECK_HEADER(sys/sysinfo.h,
857                 AC_DEFINE(HAVE_SYS_SYSINFO_H, 1,
858                           [Define to 1 if sys/sysinfo.h is available]))
859
860 dnl Look for a host system's gdk-pixbuf-csource if we are cross-compiling
861
862 AM_CONDITIONAL(CROSS_COMPILING, test $cross_compiling = yes)
863
864 if test "x$cross_compiling" = xyes || test "x$enable_gtk2_dependency" = xyes; then
865   AC_PATH_PROG(GTK_UPDATE_ICON_CACHE, gtk-update-icon-cache, no)
866   if test x$GTK_UPDATE_ICON_CACHE = xno; then
867     REBUILD_PNGS=#
868   fi
869 fi
870
871 AM_CONDITIONAL(USE_EXTERNAL_ICON_CACHE, [test "x$cross_compiling" = xyes || test "x$enable_gtk2_dependency" = xyes])
872
873 AC_PATH_PROG(GDK_PIXBUF_CSOURCE, gdk-pixbuf-csource, no)
874
875 if test ! -f $srcdir/gtk/gtkbuiltincache.h &&
876    test "x$REBUILD_PNGS" = "x#" ; then
877      AC_MSG_ERROR([
878 *** gtkbuiltincache.h is not in the tree, and cannot be built
879 *** because you don't have libpng, or (when cross-compiling) you
880 *** don't have a prebuilt gtk-update-icon-cache on the build system.])
881 fi
882
883 ########################################
884 # Windowing system checks
885 ########################################
886
887 # GTK+ uses some X calls, so needs to link against X directly
888 GTK_DEP_PACKAGES_FOR_X=
889 GTK_DEP_LIBS_FOR_X=
890 X_EXTENSIONS=
891
892 if test "x$enable_x11_backend" == xyes; then
893   X_PACKAGES=fontconfig
894
895   #
896   # We use fontconfig very peripherally when decoding the default
897   # settings.
898   #
899   if $PKG_CONFIG --exists fontconfig; then : ; else
900     AC_MSG_ERROR([
901 *** fontconfig (http://www.fontconfig.org) is required by the X11 backend.])
902   fi
903
904   #
905   # Check for basic X packages; we use pkg-config if available
906   #
907   if $PKG_CONFIG --exists x11 xext; then
908     have_base_x_pc=true
909     X_PACKAGES="$X_PACKAGES x11 xext"
910     x_libs="`$PKG_CONFIG --libs x11 xext`"
911     X_CFLAGS="`$PKG_CONFIG --cflags x11 xext`"
912
913     # Strip out any .la files that pkg-config might give us (this happens
914     # with -uninstalled.pc files)
915     x_libs_for_checks=
916     for I in $x_libs ; do
917       case $I in
918         *.la) ;;
919         *) x_libs_for_checks="$x_libs_for_checks $I" ;;
920       esac
921     done
922
923     GTK_PACKAGES_FOR_X="x11"
924   else
925     have_base_x_pc=false
926     AC_PATH_XTRA
927     if test x$no_x = xyes ; then
928       AC_MSG_ERROR([X development libraries not found])
929     fi
930
931     x_cflags="$X_CFLAGS"
932     x_libs_for_checks="$X_LIBS -lXext -lX11 $X_EXTRA_LIBS"
933
934     GTK_DEP_LIBS_FOR_X="$X_LIBS -lX11 $X_EXTRA_LIBS"
935   fi
936
937   # Extra libraries found during checks (-lXinerama, etc), not from pkg-config.
938   x_extra_libs=
939
940   gtk_save_cppflags="$CPPFLAGS"
941   CPPFLAGS="$CPPFLAGS $X_CFLAGS"
942
943   gtk_save_LIBS=$LIBS
944   LIBS="$x_libs_for_checks $LIBS"
945
946   # Sanity check for the X11 and Xext libraries. While everything we need from
947   # Xext is optional, the chances a system has *none* of these things is so
948   # small that we just unconditionally require it.
949   AC_CHECK_FUNC(XOpenDisplay, :,
950                 AC_MSG_ERROR([*** libX11 not found. Check 'config.log' for more details.]))
951   AC_CHECK_FUNC(XextFindDisplay, :,
952                 AC_MSG_ERROR([*** libXext not found. Check 'config.log' for more details.]))
953
954   # Check for xReply
955
956   AC_MSG_CHECKING([if <X11/extensions/XIproto.h> is needed for xReply])
957   AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <X11/Xlibint.h>]],
958                                      [[xReply *rep;]])],
959                     [AC_MSG_RESULT([no])],
960                     [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <X11/extensions/XIproto.h>
961                                                           #include <X11/Xlibint.h>]],
962                                                         [[xReply *rep;]])],
963                                        [AC_MSG_RESULT([yes])
964                                         AC_DEFINE([NEED_XIPROTO_H_FOR_XREPLY], [1],
965                                                   [Define if <X11/extensions/XIproto.h> needed for xReply])],
966                                        [AC_MSG_RESULT([unknown])
967                                         AC_MSG_ERROR([xReply type unavailable. X11 is too old])])])
968
969   # Check for XConvertCase, XInternAtoms (X11R6 specific)
970
971   AC_CHECK_FUNCS(XConvertCase XInternAtoms)
972
973   # Generic X11R6 check needed for XIM support; we could
974   # probably use this to replace the above, but we'll
975   # leave the separate checks for XConvertCase and XInternAtoms
976   # for clarity
977
978   have_x11r6=false
979   AC_CHECK_FUNC(XAddConnectionWatch,
980       have_x11r6=true)
981
982   if $have_x11r6; then
983     AC_DEFINE(HAVE_X11R6, 1, [Define if we have X11R6])
984   fi
985   AM_CONDITIONAL(HAVE_X11R6, $have_x11r6)
986
987   # Check for XKB support.
988
989   if test "x$enable_xkb" = "xyes"; then
990         AC_CHECK_FUNC(XkbQueryExtension,
991                       X_EXTENSIONS="$X_EXTENSIONS XKB"
992                       AC_DEFINE(HAVE_XKB, 1, [Define to use XKB extension]),
993                       AC_MSG_ERROR([*** XKB extension not found. Check 'config.log' for more details.]))
994   elif test "x$enable_xkb" = "xmaybe"; then
995         AC_CHECK_FUNC(XkbQueryExtension,
996                       X_EXTENSIONS="$X_EXTENSIONS XKB"
997                       AC_DEFINE(HAVE_XKB, 1, [Define to use XKB extension]))
998   else
999         AC_MSG_WARN(XKB support explicitly disabled)
1000   fi
1001
1002   # Check for shaped window extension
1003
1004   AC_CHECK_FUNC(XShapeCombineMask, :,
1005      [AC_MSG_ERROR([Shape extension not found, check your development headers])])
1006
1007   # X SYNC check
1008   gtk_save_CFLAGS="$CFLAGS"
1009   CFLAGS="$CFLAGS $x_cflags"
1010
1011   AC_CHECK_FUNC(XSyncQueryExtension,
1012       [AC_CHECK_HEADER(X11/extensions/sync.h,
1013           AC_DEFINE(HAVE_XSYNC, 1, [Have the SYNC extension library]),
1014           :, [#include <X11/Xlib.h>])])
1015
1016   CFLAGS="$gtk_save_CFLAGS"
1017
1018   if test "x$enable_xinerama" != "xno"; then
1019     # Check for Xinerama extension (Solaris impl or Xfree impl)
1020     have_xfree_xinerama=false
1021     have_solaris_xinerama=false
1022
1023     gtk_save_cppflags="$CPPFLAGS"
1024     CPPFLAGS="$CPPFLAGS $x_cflags"
1025
1026     # Check for XFree
1027     AC_MSG_CHECKING(for Xinerama packages)
1028
1029     if $PKG_CONFIG --exists xinerama ; then
1030        AC_MSG_RESULT(yes)
1031        have_xfree_xinerama=true
1032        X_PACKAGES="$X_PACKAGES xinerama"
1033     else
1034        AC_MSG_RESULT(no)
1035        AC_CHECK_LIB(Xinerama, XineramaQueryExtension,
1036            [AC_CHECK_HEADER(X11/extensions/Xinerama.h,
1037            [GTK_ADD_LIB(x_extra_libs,Xinerama)
1038            have_xfree_xinerama=true], :,
1039            [#include <X11/Xlib.h>])])
1040     fi
1041
1042     if $have_xfree_xinerama ; then
1043       X_EXTENSIONS="$X_EXTENSIONS Xinerama"
1044       AC_DEFINE(HAVE_XFREE_XINERAMA, 1,
1045                 [Define to 1 if XFree Xinerama is available])
1046       AC_DEFINE(HAVE_XINERAMA, 1,
1047                 [Define to 1 is Xinerama is available])
1048     else
1049       case "$host" in
1050         *-*-solaris*)
1051             # Check for solaris
1052             AC_MSG_CHECKING(for Xinerama support on Solaris)
1053
1054             have_solaris_xinerama=false
1055             AC_CHECK_FUNC(XineramaGetInfo,
1056                 [AC_CHECK_HEADER(X11/extensions/xinerama.h,
1057                     [have_solaris_xinerama=true], :,
1058                     [#include <X11/Xlib.h>])])
1059
1060             if $have_solaris_xinerama ; then
1061               X_EXTENSIONS="$X_EXTENSIONS Xinerama"
1062               AC_DEFINE(HAVE_SOLARIS_XINERAMA, 1,
1063                         [Define to 1 if solaris xinerama is available])
1064               AC_DEFINE(HAVE_XINERAMA, 1,
1065                         [Define to 1 if xinerama is available])
1066               AC_MSG_RESULT(yes)
1067             else
1068               AC_MSG_RESULT(no)
1069             fi
1070             ;;
1071         *)
1072             ;;
1073       esac
1074     fi
1075   fi
1076   if test "x$enable_xinerama" = "xyes" ; then
1077     if test "x$have_xfree_xinerama" != "xtrue" -a "x$have_solaris_xinerama" != "xtrue" ; then
1078       AC_MSG_ERROR([*** Xinerama extension not found. Check 'config.log' for more details.])
1079     fi
1080   fi
1081
1082   # set up things for XInput
1083   if test "x$enable_xinput" != "xno" && $PKG_CONFIG --exists "xi" ; then
1084     have_xinput=yes
1085
1086     AC_DEFINE(XINPUT_XFREE, 1,
1087               [Define to 1 if XFree XInput should be used])
1088
1089     X_PACKAGES="$X_PACKAGES xi"
1090
1091     AC_CHECK_HEADER(X11/extensions/XInput2.h,
1092                     have_xinput2=yes
1093                     X_EXTENSIONS="$X_EXTENSIONS XI2"
1094                     AC_DEFINE(XINPUT_2, 1, [Define to 1 if XInput 2.0 is available]),
1095                     X_EXTENSIONS="$X_EXTENSIONS XInput")
1096
1097   else
1098     AC_DEFINE(XINPUT_NONE, 1,
1099               [Define to 1 if no XInput should be used])
1100   fi
1101
1102   AM_CONDITIONAL(XINPUT_XFREE, test "x$have_xinput" = "xyes")
1103   AM_CONDITIONAL(XINPUT_2,     test "x$have_xinput2" = "xyes")
1104
1105   if test "x$enable_xinput" = "xyes" ; then
1106     if test "x$have_xinput" != "xyes" -a "x$have_xinput2" != "xyes" ; then
1107       AC_MSG_ERROR([*** XInput extension not found. Check 'config.log' for more details.])
1108     fi
1109   fi
1110
1111   # Check for the RANDR extension
1112   if test x"$enable_xrandr" != xno; then
1113     if $PKG_CONFIG --exists "xrandr >= 1.2.99" ; then
1114       AC_DEFINE(HAVE_RANDR, 1, [Have the Xrandr extension library])
1115
1116       X_PACKAGES="$X_PACKAGES xrandr"
1117       X_EXTENSIONS="$X_EXTENSIONS XRANDR"
1118     elif test x"$enable_xrandr" = xyes; then
1119       AC_MSG_ERROR([RANDR support requested but xrandr not found])
1120     fi
1121   fi
1122
1123   # Checks for Xcursor library
1124
1125   if $PKG_CONFIG --exists xcursor ; then
1126     AC_DEFINE(HAVE_XCURSOR, 1, [Have the Xcursor library])
1127
1128     X_PACKAGES="$X_PACKAGES xcursor"
1129   fi
1130
1131   # Checks for XFixes extension
1132
1133   if test x"$enable_xfixes" != xno; then
1134     if $PKG_CONFIG --exists xfixes ; then
1135       AC_DEFINE(HAVE_XFIXES, 1, [Have the XFIXES X extension])
1136
1137       X_PACKAGES="$X_PACKAGES xfixes"
1138       X_EXTENSIONS="$X_EXTENSIONS XFIXES"
1139       GTK_PACKAGES_FOR_X="$GTK_PACKAGES_FOR_X xfixes"
1140     elif test x"$enable_xfixes" = xyes; then
1141       AC_MSG_ERROR([XFixes support requested but xfixes not found])
1142     fi
1143   fi
1144
1145   # Checks for Xcomposite extension
1146
1147   if test x"$enable_xcomposite" != xno; then
1148     if $PKG_CONFIG --exists xcomposite ; then
1149       AC_DEFINE(HAVE_XCOMPOSITE, 1, [Have the XCOMPOSITE X extension])
1150
1151       X_PACKAGES="$X_PACKAGES xcomposite"
1152       X_EXTENSIONS="$X_EXTENSIONS Composite"
1153       GTK_PACKAGES_FOR_X="$GTK_PACKAGES_FOR_X xcomposite"
1154     elif test x"$enable_xcomposite" = xyes; then
1155       AC_MSG_ERROR([Xcomposite support requested but xcomposite not found])
1156     fi
1157   fi
1158
1159   # Checks for Xdamage extension
1160
1161   if test x"$enable_xdamage" != xno; then
1162     if $PKG_CONFIG --exists xdamage ; then
1163       AC_DEFINE(HAVE_XDAMAGE, 1, [Have the XDAMAGE X extension])
1164
1165       X_PACKAGES="$X_PACKAGES xdamage"
1166       X_EXTENSIONS="$X_EXTENSIONS DAMAGE"
1167       GTK_PACKAGES_FOR_X="$GTK_PACKAGES_FOR_X xdamage"
1168     elif test x"$enable_xdamage" = xyes; then
1169       AC_MSG_ERROR([Xdamage support requested but xdamage not found])
1170     fi
1171   fi
1172
1173   if $have_base_x_pc ; then
1174     GDK_EXTRA_LIBS="$x_extra_libs"
1175   else
1176     GDK_EXTRA_LIBS="$X_LIBS $x_extra_libs -lXext -lX11 $GDK_EXTRA_LIBS"
1177   fi
1178
1179   CPPFLAGS="$gtk_save_cppflags"
1180   LIBS="$gtk_save_libs"
1181
1182   AM_CONDITIONAL(USE_X11, true)
1183
1184   # strip leading space
1185   X_EXTENSIONS=${X_EXTENSIONS/# }
1186
1187 else
1188   XPACKAGES=
1189
1190   AM_CONDITIONAL(XINPUT_XFREE, false)
1191   AM_CONDITIONAL(XINPUT_2, false)
1192   AM_CONDITIONAL(USE_X11, false)
1193   AM_CONDITIONAL(HAVE_X11R6, false)
1194 fi
1195
1196 # Check for Pango flags
1197
1198 AC_MSG_CHECKING(Pango flags)
1199 if $PKG_CONFIG --exists $PANGO_PACKAGES ; then
1200         PANGO_CFLAGS=`$PKG_CONFIG --cflags $PANGO_PACKAGES`
1201         PANGO_LIBS=`$PKG_CONFIG --libs $PANGO_PACKAGES`
1202
1203         AC_MSG_RESULT($PANGO_CFLAGS $PANGO_LIBS)
1204 else
1205         AC_MSG_ERROR([
1206 *** Pango not found. Pango built with Cairo support is required
1207 *** to build GTK+. See http://www.pango.org for Pango information.
1208 ])
1209 fi
1210
1211 CFLAGS="$CFLAGS $PANGO_CFLAGS"
1212
1213 if $PKG_CONFIG --uninstalled $PANGO_PACKAGES; then
1214         :
1215 else
1216         gtk_save_LIBS="$LIBS"
1217         LIBS="$PANGO_LIBS $LIBS"
1218         AC_TRY_LINK_FUNC(pango_context_new, :, AC_MSG_ERROR([
1219 *** Can't link to Pango. Pango is required to build
1220 *** GTK+. For more information see http://www.pango.org]))
1221         LIBS="$gtk_save_LIBS"
1222 fi
1223
1224 CFLAGS="$saved_cflags"
1225 LDFLAGS="$saved_ldflags"
1226
1227 GDK_PACKAGES="$PANGO_PACKAGES $GIO_PACKAGE $X_PACKAGES gdk-pixbuf-2.0 $cairo_backends cairo-gobject"
1228
1229 GDK_DEP_LIBS="$GDK_EXTRA_LIBS `$PKG_CONFIG --libs $GDK_PACKAGES`"
1230 GDK_DEP_CFLAGS="`$PKG_CONFIG --cflags  gthread-2.0 $GDK_PACKAGES` $GDK_EXTRA_CFLAGS"
1231 #
1232 # If we aren't writing explicit dependencies, then don't put the extra libraries we need
1233 # into the pkg-config files
1234 #
1235 if test $enable_explicit_deps != yes ; then
1236   GDK_PACKAGES="$PANGO_PACKAGES gdk-pixbuf-2.0 cairo-gobject"
1237   GDK_EXTRA_LIBS=
1238 fi
1239
1240 AC_SUBST(GDK_PACKAGES)
1241 AC_SUBST(GDK_EXTRA_LIBS)
1242 AC_SUBST(GDK_EXTRA_CFLAGS)
1243 AC_SUBST(GDK_DEP_LIBS)
1244 AC_SUBST(GDK_DEP_CFLAGS)
1245
1246
1247 ########################################
1248 # Check for Accessibility Toolkit flags
1249 ########################################
1250
1251 ATK_PACKAGES=atk
1252 AC_MSG_CHECKING(ATK flags)
1253 if $PKG_CONFIG --exists $ATK_PACKAGES ; then
1254         ATK_CFLAGS=`$PKG_CONFIG --cflags $ATK_PACKAGES`
1255         ATK_LIBS=`$PKG_CONFIG --libs $ATK_PACKAGES`
1256
1257         AC_MSG_RESULT($ATK_CFLAGS $ATK_LIBS)
1258 else
1259         AC_MSG_ERROR([
1260 *** Accessibility Toolkit not found. Accessibility Toolkit is required
1261 *** to build GTK+.
1262 ])
1263 fi
1264
1265 if $PKG_CONFIG --uninstalled $ATK_PACKAGES; then
1266         :
1267 else
1268         gtk_save_LIBS="$LIBS"
1269         LIBS="$ATK_LIBS $LIBS"
1270         AC_TRY_LINK_FUNC(atk_object_get_type, : , AC_MSG_ERROR([
1271                 *** Cannot link to Accessibility Toolkit. Accessibility Toolkit is required
1272                 *** to build GTK+]))
1273         LIBS="$gtk_save_LIBS"
1274 fi
1275
1276 GTK_PACKAGES="atk cairo cairo-gobject gdk-pixbuf-2.0 gio-2.0"
1277 if test "x$enable_x11_backend" == xyes; then
1278   GTK_PACKAGES="$GTK_PACKAGES pangoft2"
1279 fi
1280 GTK_EXTRA_LIBS=
1281 GTK_EXTRA_CFLAGS=
1282 GTK_DEP_LIBS="$GDK_EXTRA_LIBS $GTK_DEP_LIBS_FOR_X `$PKG_CONFIG --libs $PANGO_PACKAGES $GTK_PACKAGES_FOR_X $GTK_PACKAGES` $GTK_EXTRA_LIBS"
1283 GTK_DEP_CFLAGS="`$PKG_CONFIG --cflags  gthread-2.0 $GDK_PACKAGES $GTK_PACKAGES` $GDK_EXTRA_CFLAGS $GTK_EXTRA_CFLAGS"
1284
1285 if test x"$os_win32" = xyes; then
1286   GTK_EXTRA_CFLAGS="$msnative_struct"
1287 fi
1288
1289 GLIB_PREFIX="`$PKG_CONFIG --variable=prefix glib-2.0`"
1290 ATK_PREFIX="`$PKG_CONFIG --variable=prefix atk`"
1291 PANGO_PREFIX="`$PKG_CONFIG --variable=prefix pango`"
1292 CAIRO_PREFIX="`$PKG_CONFIG --variable=prefix cairo`"
1293
1294 AC_SUBST(GTK_PACKAGES)
1295 AC_SUBST(GTK_EXTRA_LIBS)
1296 AC_SUBST(GTK_EXTRA_CFLAGS)
1297 AC_SUBST(GTK_DEP_LIBS)
1298 AC_SUBST(GTK_DEP_CFLAGS)
1299
1300 AC_SUBST(GLIB_PREFIX)
1301 AC_SUBST(ATK_PREFIX)
1302 AC_SUBST(PANGO_PREFIX)
1303 AC_SUBST(CAIRO_PREFIX)
1304
1305 AC_SUBST(GTK_DEBUG_FLAGS)
1306 AC_SUBST(GTK_XIM_FLAGS)
1307
1308 GDK_PIXBUF_LIBS=`$PKG_CONFIG --libs gdk-pixbuf-2.0`
1309 AC_SUBST(GDK_PIXBUF_LIBS)
1310
1311 ########################
1312 # Checks needed for gail
1313 ########################
1314
1315 old_LIBS="$LIBS"
1316 dnl Checks for inet libraries:
1317 AC_SEARCH_LIBS(gethostent, nsl)
1318 AC_SEARCH_LIBS(setsockopt, socket)
1319 AC_SEARCH_LIBS(connect, inet)
1320
1321 dnl check for the sockaddr_un.sun_len member
1322 AC_CHECK_MEMBER([struct sockaddr_un.sun_len],
1323                 [struct_sockaddr_un_sun_len=true],
1324                 [struct_sockaddr_un_suin_len=false],
1325                 [#include <sys/types.h>
1326                  #include <sys/un.h>]
1327                 )
1328 case $struct_sockaddr_un_sun_len in
1329         true)
1330                 AC_DEFINE_UNQUOTED(HAVE_SOCKADDR_UN_SUN_LEN, 1,
1331                                    [Have the sockaddr_un.sun_len member])
1332                 ;;
1333         *)
1334                 ;;
1335 esac
1336
1337 GAIL_INET_LIBS="$LIBS"
1338 AC_SUBST([GAIL_INET_LIBS])
1339
1340 LIBS="$old_LIBS"
1341
1342 ################################################################
1343 # Printing system checks
1344 ################################################################
1345
1346 PRINT_BACKENDS="file lpr"
1347
1348 AC_ARG_ENABLE(cups,
1349               [AS_HELP_STRING([--disable-cups],
1350                               [disable cups print backend])],,
1351               [enable_cups=auto])
1352
1353 if test "x$enable_cups" = "xno"; then
1354   AM_CONDITIONAL(HAVE_CUPS, false)
1355 else
1356   AC_PATH_PROG(CUPS_CONFIG, cups-config, no)
1357   if test "x$CUPS_CONFIG" = "xno"; then
1358     if test "x$enable_cups" = "xauto"; then
1359       AM_CONDITIONAL(HAVE_CUPS, false)
1360     else
1361       AC_MSG_ERROR([
1362 *** cups not found.
1363 ])
1364     fi
1365   else
1366     CUPS_CFLAGS=`$CUPS_CONFIG --cflags | sed 's/-O[0-9]*//' | sed 's/-m[^\t]*//g'`
1367     CUPS_LIBS=`$CUPS_CONFIG --libs`
1368
1369     CUPS_API_VERSION=`$CUPS_CONFIG --api-version`
1370     CUPS_API_MAJOR=`echo $ECHO_N $CUPS_API_VERSION | awk -F. '{print $1}'`
1371     CUPS_API_MINOR=`echo $ECHO_N $CUPS_API_VERSION | awk -F. '{print $2}'`
1372
1373     if test $CUPS_API_MAJOR -gt 1 -o \
1374             $CUPS_API_MAJOR -eq 1 -a $CUPS_API_MINOR -ge 2; then
1375       AC_DEFINE(HAVE_CUPS_API_1_2, 1,
1376                 [Define to 1 if CUPS 1.2 API is available])
1377     fi
1378
1379     AC_SUBST(CUPS_API_MAJOR)
1380     AC_SUBST(CUPS_API_MINOR)
1381     AC_SUBST(CUPS_CFLAGS)
1382     AC_SUBST(CUPS_LIBS)
1383
1384     AC_CHECK_HEADER(cups/cups.h,,AC_MSG_ERROR([[*** Sorry, cups-config present but cups/cups.h missing.]]))
1385
1386     PRINT_BACKENDS="$PRINT_BACKENDS cups"
1387     AM_CONDITIONAL(HAVE_CUPS, true)
1388
1389     gtk_save_cflags="$CFLAGS"
1390     CFLAGS="$CUPS_CFLAGS"
1391     AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <cups/http.h>]],
1392                                        [[http_t http; char *s = http.authstring;]])],
1393                       [AC_DEFINE([HAVE_HTTP_AUTHSTRING], [],
1394                                  [Define if cups http_t authstring field is accessible])],
1395                       [])
1396     CFLAGS="$gtk_save_cflags"
1397
1398     AC_SUBST(HAVE_HTTP_AUTHSTRING)
1399
1400     gtk_save_libs="$LIBS"
1401     LIBS="$CUPS_LIBS"
1402     AC_CHECK_FUNCS(httpGetAuthString)
1403     LIBS="$gtk_save_libs"
1404   fi
1405 fi
1406
1407 # Checks to see if we should compile with PAPI backend for GTK+
1408 #
1409
1410 AC_ARG_ENABLE(papi,
1411               [AS_HELP_STRING([--disable-papi],
1412                               [disable papi print backend])],,
1413               [enable_papi=auto])
1414
1415 if test "x$enable_papi" = "xno"; then
1416   AM_CONDITIONAL(HAVE_PAPI, false)
1417 else
1418   AC_MSG_CHECKING(libpapi)
1419   AC_CHECK_LIB(papi, papiServiceCreate, have_papi=yes, have_papi=no)
1420   if test $have_papi = yes; then
1421     PRINT_BACKENDS="$PRINT_BACKENDS papi"
1422     AC_DEFINE([HAVE_PAPI], [], [Define to 1 if libpapi available])
1423   fi
1424   AM_CONDITIONAL(HAVE_PAPI, test $have_papi = yes)
1425   if test "x$enable_papi" = "xyes" -a "x$have_papi" = "xno"; then
1426     AC_MSG_ERROR([
1427 *** papi not found.
1428 ])
1429   fi
1430 fi
1431
1432 AM_CONDITIONAL(HAVE_PAPI_CUPS, test "x$have_papi" = "xyes" -a "x$CUPS_CONFIG" != "xno")
1433
1434 gtk_save_cppflags="$CPPFLAGS"
1435 CPPFLAGS="$CPPFLAGS $GTK_DEP_CFLAGS $GDK_DEP_CFLAGS"
1436
1437 AC_CHECK_HEADER(cairo-pdf.h,,AC_MSG_ERROR([
1438 *** Can't find cairo-pdf.h. You must build Cairo with the pdf
1439 *** backend enabled.]))
1440
1441 if test "$os_win32" != "yes"; then
1442   AC_CHECK_HEADER(cairo-ps.h,,AC_MSG_ERROR([
1443 *** Can't find cairo-ps.h. You must build Cairo with the
1444 *** postscript backend enabled.]))
1445
1446   AC_CHECK_HEADER(cairo-svg.h,,AC_MSG_ERROR([
1447 *** Cannot find cairo-svg.h. You must build Cairo with the
1448 *** svg backend enabled.]))
1449 fi
1450
1451 CPPFLAGS="$gtk_save_cppflags"
1452
1453
1454 AC_ARG_ENABLE(test-print-backend,
1455               [AS_HELP_STRING([--enable-test-print-backend],
1456                               [build test print backend])],,
1457               [enable_test_print_backend=no])
1458 if test "x$enable_test_print_backend" != "xno" ; then
1459   PRINT_BACKENDS="$PRINT_BACKENDS test"
1460 fi
1461 AM_CONDITIONAL(TEST_PRINT_BACKEND, test "x$enable_test_print_backend" != "xno")
1462
1463
1464 ################################################################
1465 # Strip -export-dynamic from the link lines of various libraries
1466 ################################################################
1467
1468 #
1469 # pkg-config --libs gmodule includes the "export_dynamic" flag,
1470 #  but this flag is only meaningful for executables. For libraries
1471 #  the effect is undefined; what it causes on Linux is that the
1472 #  export list from -export-symbols-regex is ignored and everything
1473 #  is exported
1474 #
1475 # We are using gmodule-no-export now, but I'm leaving the stripping
1476 # code in place for now, since pango and atk still require gmodule.
1477 export SED
1478 export_dynamic=`(./libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh`
1479 if test -n "$export_dynamic"; then
1480   GDK_DEP_LIBS=`echo $GDK_DEP_LIBS | sed -e "s/$export_dynamic//"`
1481   GTK_DEP_LIBS=`echo $GTK_DEP_LIBS | sed -e "s/$export_dynamic//"`
1482 fi
1483
1484 #############
1485 # GSettings #
1486 #############
1487
1488 GLIB_GSETTINGS
1489
1490 ##################################################
1491 # GObject introspection
1492 ##################################################
1493
1494 GOBJECT_INTROSPECTION_CHECK([0.10.1])
1495
1496 ##################################################
1497 # Packagekit module
1498 #################################################
1499
1500 AC_ARG_ENABLE(packagekit,
1501               [AS_HELP_STRING([--disable-packagekit],
1502                               [build packagekit open-with module])])
1503
1504 build_packagekit=no
1505 if test "os_win32" != "yes"; then
1506         if test "x$enable_packagekit" != "xno"; then
1507                 build_packagekit=yes
1508                 AC_DEFINE(ENABLE_PACKAGEKIT, 1, [define to enable packagekit])
1509         fi
1510 fi
1511
1512 AM_CONDITIONAL(ENABLE_PACKAGEKIT, test "x$build_packagekit" = "xyes")
1513
1514 ##################################################
1515 # Checks for gtk-doc and docbook-tools
1516 ##################################################
1517
1518 GTK_DOC_CHECK([1.11])
1519
1520 AC_CHECK_PROG(DB2HTML, db2html, true, false)
1521 AM_CONDITIONAL(HAVE_DOCBOOK, $DB2HTML)
1522
1523 AC_ARG_ENABLE(man,
1524               [AS_HELP_STRING([--enable-man],
1525                               [regenerate man pages from Docbook [default=no]])],
1526               [enable_man=yes],
1527               [enable_man=no])
1528
1529 if test "${enable_man}" != no; then
1530   dnl
1531   dnl Check for xsltproc
1532   dnl
1533   AC_PATH_PROG([XSLTPROC], [xsltproc])
1534   if test -z "$XSLTPROC"; then
1535     enable_man=no
1536   fi
1537
1538   dnl check for DocBook DTD and stylesheets in the local catalog.
1539   JH_CHECK_XML_CATALOG([-//OASIS//DTD DocBook XML V4.1.2//EN],
1540      [DocBook XML DTD V4.1.2],,enable_man=no)
1541   JH_CHECK_XML_CATALOG([http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl],
1542      [DocBook XSL Stylesheets],,enable_man=no)
1543 fi
1544
1545 AM_CONDITIONAL(ENABLE_MAN, test x$enable_man != xno)
1546
1547
1548 ##################################################
1549 # Output commands
1550 ##################################################
1551
1552 AC_CONFIG_COMMANDS([gdk/gdkconfig.h], [
1553         outfile=gdkconfig.h-tmp
1554         cat > $outfile <<\_______EOF
1555 /* gdkconfig.h
1556  *
1557  * This is a generated file.  Please modify `configure.ac'
1558  */
1559
1560 #ifndef __GDKCONFIG_H__
1561 #define __GDKCONFIG_H__
1562
1563 #if !defined (__GDK_H_INSIDE__) && !defined (GDK_COMPILATION)
1564 #error "Only <gdk/gdk.h> can be included directly."
1565 #endif
1566
1567 #include <glib.h>
1568
1569 G_BEGIN_DECLS
1570
1571 _______EOF
1572
1573         cat >>$outfile <<_______EOF
1574 $gdk_windowing
1575 _______EOF
1576
1577         cat >>$outfile <<_______EOF
1578
1579 G_END_DECLS
1580
1581 #endif  /* __GDKCONFIG_H__ */
1582 _______EOF
1583
1584
1585         if cmp -s $outfile gdk/gdkconfig.h; then
1586           AC_MSG_NOTICE([gdk/gdkconfig.h is unchanged])
1587           rm -f $outfile
1588         else
1589           mv $outfile gdk/gdkconfig.h
1590         fi
1591 ],[
1592 gdk_windowing='$GDK_WINDOWING'
1593 ])
1594
1595 dnl
1596 dnl Check for -Bsymbolic-functions linker flag used to avoid
1597 dnl intra-library PLT jumps, if available.
1598 dnl
1599 AC_ARG_ENABLE(Bsymbolic,
1600               [AS_HELP_STRING([--disable-Bsymbolic],
1601                               [avoid linking with -Bsymbolic])],,
1602               [SAVED_LDFLAGS="${LDFLAGS}"
1603                AC_MSG_CHECKING([for -Bsymbolic-functions linker flag])
1604                LDFLAGS=-Wl,-Bsymbolic-functions
1605                AC_TRY_LINK([], [int main (void) { return 0; }],
1606                            AC_MSG_RESULT(yes)
1607                            enable_Bsymbolic=yes,
1608                            AC_MSG_RESULT(no)
1609                            enable_Bsymbolic=no)
1610                LDFLAGS="${SAVED_LDFLAGS}"])
1611
1612 if test "x${enable_Bsymbolic}" = "xyes" ; then
1613   GTK_LINK_FLAGS=-Wl,-Bsymbolic-functions
1614 fi
1615 AC_SUBST(GTK_LINK_FLAGS)
1616
1617 AC_CONFIG_FILES([
1618 config.h.win32
1619 gtk-zip.sh
1620 Makefile
1621 gdk-3.0.pc
1622 gtk+-3.0.pc
1623 gtk+-unix-print-3.0.pc
1624 gail-3.0.pc
1625 gtk+-3.0-uninstalled.pc
1626 gail-3.0-uninstalled.pc
1627 m4macros/Makefile
1628 po/Makefile.in
1629 po-properties/Makefile.in
1630 demos/Makefile
1631 demos/gtk-demo/Makefile
1632 demos/gtk-demo/geninclude.pl
1633 examples/Makefile
1634 tests/Makefile
1635 docs/Makefile
1636 docs/reference/Makefile
1637 docs/reference/gdk/Makefile
1638 docs/reference/gdk/version.xml
1639 docs/reference/gtk/Makefile
1640 docs/reference/gtk/version.xml
1641 docs/reference/libgail-util/Makefile
1642 docs/reference/libgail-util/version.xml
1643 docs/tools/Makefile
1644 build/Makefile
1645 build/win32/Makefile
1646 build/win32/vs9/Makefile
1647 gdk/Makefile
1648 gdk/x11/Makefile
1649 gdk/win32/Makefile
1650 gdk/win32/rc/Makefile
1651 gdk/win32/rc/gdk.rc
1652 gdk/quartz/Makefile
1653 gdk/tests/Makefile
1654 gtk/Makefile
1655 gtk/makefile.msc
1656 gtk/gtkversion.h
1657 gtk/gtk-win32.rc
1658 gtk/tests/Makefile
1659 modules/Makefile
1660 modules/other/Makefile
1661 modules/other/gail/Makefile
1662 modules/other/gail/libgail-util/Makefile
1663 modules/other/gail/tests/Makefile
1664 modules/engines/Makefile
1665 modules/engines/pixbuf/Makefile
1666 modules/engines/ms-windows/Makefile
1667 modules/engines/ms-windows/Theme/Makefile
1668 modules/engines/ms-windows/Theme/gtk-3.0/Makefile
1669 modules/input/Makefile
1670 modules/printbackends/Makefile
1671 modules/printbackends/cups/Makefile
1672 modules/printbackends/lpr/Makefile
1673 modules/printbackends/file/Makefile
1674 modules/printbackends/papi/Makefile
1675 modules/printbackends/test/Makefile
1676 perf/Makefile
1677 ])
1678
1679 AC_OUTPUT
1680
1681 # beautify the immodule list a bit
1682 included_immodules=${included_immodules//,/ }
1683 included_immodules=${included_immodules:-none}
1684
1685 echo ""
1686 echo "        GTK+ $GTK_VERSION"
1687 echo "        ==========="
1688 echo ""
1689 echo "        GDK backends:         $GDK_BACKENDS"
1690 if test "x$enable_x11_backend" = "xyes"; then
1691 echo "        X11 extensions:       $X_EXTENSIONS"
1692 fi
1693 echo "        Print backends:       $PRINT_BACKENDS"
1694 echo "        Dynamic modules:      $build_dynamic_modules"
1695 echo "        Included immodules:   $included_immodules"
1696 echo "        PackageKit support:   $build_packagekit"
1697 echo "        Introspection:        $found_introspection"
1698 echo "        Debugging:            $enable_debug"
1699 echo "        Documentation:        $enable_gtk_doc"