1 # Process this file with autoconf to produce a configure script.
2 AC_INIT(gdk/gdktypes.h)
4 # In the following, there are a the following variants
5 # of GLib cflags and libs variables
7 # GLIB_CFLAGS: cflags for compiling libraries and example progs
8 # GLIB_LIBS: libraries for linking example programs
9 # GLIB_DEPLIBS: libraries for linking libraries against
12 ## We could have pkg-config uniquify the ldflags and cflags by calling
13 ## it once with both the GLib and Pango package names, but we don't,
14 ## someone should fix that.
17 # Save this value here, since automake will set cflags later
18 cflags_set=${CFLAGS+set}
20 dnl we to AC_DIVERT_PUSH/AC_DIVERT_POP these variable definitions so they
21 dnl are available for $ac_help expansion (don't we all *love* autoconf?)
22 AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl
25 # GTK_MICRO_VERSION += 1;
26 # GTK_INTERFACE_AGE += 1;
27 # GTK_BINARY_AGE += 1;
28 # if any functions have been added, set GTK_INTERFACE_AGE to 0.
29 # if backwards compatibility has been broken,
30 # set GTK_BINARY_AGE and GTK_INTERFACE_AGE to 0.
37 GTK_VERSION=$GTK_MAJOR_VERSION.$GTK_MINOR_VERSION.$GTK_MICRO_VERSION
41 AC_SUBST(GTK_MAJOR_VERSION)
42 AC_SUBST(GTK_MINOR_VERSION)
43 AC_SUBST(GTK_MICRO_VERSION)
44 AC_SUBST(GTK_INTERFACE_AGE)
45 AC_SUBST(GTK_BINARY_AGE)
49 LT_RELEASE=$GTK_MAJOR_VERSION.$GTK_MINOR_VERSION
50 LT_CURRENT=`expr $GTK_MICRO_VERSION - $GTK_INTERFACE_AGE`
51 LT_REVISION=$GTK_INTERFACE_AGE
52 LT_AGE=`expr $GTK_BINARY_AGE - $GTK_INTERFACE_AGE`
59 # gdk-pixbuf gets versioned separately, and for now, using standard
60 # libtool versioning, not GTK+-style versioning
65 GDK_PIXBUF_VERSION="${GDK_PIXBUF_MAJOR}.${GDK_PIXBUF_MINOR}.${GDK_PIXBUF_MICRO}"
66 AC_SUBST(GDK_PIXBUF_MAJOR)
67 AC_SUBST(GDK_PIXBUF_MINOR)
68 AC_SUBST(GDK_PIXBUF_MICRO)
69 AC_SUBST(GDK_PIXBUF_VERSION)
76 AC_SUBST(GETTEXT_PACKAGE)
77 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE")
79 # Save this value here, since automake will set cflags later
80 cflags_set=${CFLAGS+set}
82 dnl Initialize automake stuff
83 AM_INIT_AUTOMAKE($PACKAGE, $VERSION, no-define)
85 # Specify a configuration file
86 AM_CONFIG_HEADER(config.h)
88 dnl Initialize libtool
91 dnl Initialize maintainer mode
96 dnl figure debugging default, prior to $ac_help setup
98 AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl
99 if test `expr $GTK_MINOR_VERSION \% 2` = 1 ; then
102 debug_default=minimum
106 dnl declare --enable-* args and collect ac_help strings
107 AC_ARG_ENABLE(debug, [ --enable-debug=[no/minimum/yes] turn on debugging [default=$debug_default]],,enable_debug=$debug_default)
108 AC_ARG_ENABLE(shm, [ --enable-shm support shared memory if available [default=yes]],
109 echo $enable_shm, enable_shm="yes")
110 AC_ARG_ENABLE(ansi, [ --enable-ansi turn on strict ansi [default=no]],
112 AC_ARG_ENABLE(xim, [ --enable-xim support XIM [default=yes]],
114 AC_ARG_ENABLE(xim_inst, [ --disable-xim-inst does not use xim instantiate callback],
115 , enable_xim_inst="maybe")
116 AC_ARG_ENABLE(xkb, [ --enable-xkb support XKB [default=maybe]],
117 , enable_xkb="maybe")
118 AC_ARG_ENABLE(rebuilds, [ --disable-rebuilds disable all source autogeneration rules],,enable_rebuilds=yes)
120 AC_ARG_WITH(xinput, [ --with-xinput=[no/gxi/xfree] support XInput ])
123 gdktargetlib=libgdk-x11-1.3.la
124 gtktargetlib=libgtk-x11-1.3.la
125 AC_ARG_WITH(gdktarget, [ --with-gdktarget=[x11/nanox/linux-fb] select GDK target [default=x11] ],
126 gdktarget=$with_gdktarget)
130 x11|nanox|linux-fb) ;;
131 *) AC_MSG_ERROR([Invalid target for GDK: use x11, nanox or linux-fb.]);;
134 AC_ARG_ENABLE(shadowfb, [ --disable-shadowfb disable shadowfb support for linux-fb],,enable_shadowfb=yes)
136 if test "x$enable_debug" = "xyes"; then
137 test "$cflags_set" = set || CFLAGS="$CFLAGS -g"
138 GTK_DEBUG_FLAGS="-DG_ENABLE_DEBUG"
140 if test "x$enable_debug" = "xno"; then
141 GTK_DEBUG_FLAGS="-DG_DISABLE_ASSERT -DG_DISABLE_CHECKS -DG_DISABLE_CAST_CHECKS"
143 GTK_DEBUG_FLAGS="-DG_DISABLE_CAST_CHECKS"
147 AC_DEFINE_UNQUOTED(GTK_COMPILED_WITH_DEBUGGING, "${enable_debug}")
150 # Build time sanity check...
153 # Checks for programs.
161 if test "x$GCC" = "xyes"; then
163 *[\ \ ]-Wall[\ \ ]*) ;;
164 *) CFLAGS="$CFLAGS -Wall" ;;
167 if test "x$enable_ansi" = "xyes"; then
169 *[\ \ ]-ansi[\ \ ]*) ;;
170 *) CFLAGS="$CFLAGS -ansi" ;;
174 *[\ \ ]-pedantic[\ \ ]*) ;;
175 *) CFLAGS="$CFLAGS -pedantic" ;;
181 # Honor aclocal flags
182 ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
184 # libtool option to control which symbols are exported
185 # right now, symbols starting with _ are not exported
186 LIBTOOL_EXPORT_OPTIONS='-export-symbols-regex "^[[^_]].*"'
187 AC_SUBST(LIBTOOL_EXPORT_OPTIONS)
189 # define a MAINT-like variable REBUILD which is set if Perl
190 # and awk are found, so autogenerated sources can be rebuilt
193 AC_CHECK_PROGS(PERL, perl5 perl)
195 # We would like indent, but don't require it.
196 AC_CHECK_PROG(INDENT, indent, indent)
199 if test "x$enable_rebuilds" = "xyes" && \
201 $PERL -e 'exit !($] >= 5.002)' > /dev/null 2>&1 && \
202 test -n "$AWK" ; then
207 AC_CHECK_FUNCS(lstat mkstemp sigsetjmp bind_textdomain_codeset)
209 AC_MSG_CHECKING(whether make is GNU Make)
212 if $ac_make --version 2>/dev/null | grep '^GNU Make ' >/dev/null ; then
213 STRIP_BEGIN='$(strip $(STRIP_DUMMY)'
220 AC_SUBST(STRIP_DUMMY)
221 AC_SUBST(STRIP_BEGIN)
225 ALL_LINGUAS="az ca cs da de el en_GB en@IPA es et eu fa fi fr ga gl he hr hu ia it ja ko lt nl nn no pl pt pt_BR ro ru sk sl sp sr sv tr uk vi wa zh_TW zh_CN"
227 LIBS="$LIBS $INTLLIBS"
229 # AM_GTK_GNU_GETTEXT above substs $DATADIRNAME
230 # this is the directory where the *.{mo,gmo} files are installed
231 gtklocaledir='${prefix}/${DATADIRNAME}/locale'
232 AC_SUBST(gtklocaledir)
234 dnl The DU4 header files don't provide library prototypes unless
235 dnl -std1 is given to the native cc.
236 AC_MSG_CHECKING([for extra flags to get ANSI library prototypes])
240 AC_TRY_RUN([#include <math.h>
241 int main (void) { return (log(1) != log(1.)); }],
242 AC_MSG_RESULT(none needed),
243 gtk_save_CFLAGS="$CFLAGS"
244 CFLAGS="$CFLAGS -std1"
245 AC_TRY_RUN([#include <math.h>
246 int main (void) { return (log(1) != log(1.)); }],
247 AC_MSG_RESULT(-std1),
249 CFLAGS="$gtk_save_CFLAGS"
251 [No ANSI prototypes found in library. (-std1 didn't work.)]),
254 AC_MSG_RESULT(none needed)
260 AC_MSG_CHECKING(for the BeOS)
264 GTK_LIBS_EXTRA="-L\$(top_builddir_full)/gdk/.libs -lgdk"
272 AC_SUBST(GTK_LIBS_EXTRA)
274 dnl NeXTStep cc seems to need this
275 AC_MSG_CHECKING([for extra flags for POSIX compliance])
276 AC_TRY_COMPILE([#include <dirent.h>], [DIR *dir;],
277 AC_MSG_RESULT(none needed),
278 gtk_save_CFLAGS="$CFLAGS"
279 CFLAGS="$CFLAGS -posix"
280 AC_TRY_COMPILE([#include <dirent.h>], [DIR *dir;],
281 AC_MSG_RESULT(-posix),
283 CFLAGS="$gtk_save_CFLAGS"
284 AC_MSG_WARN([Could not determine POSIX flag. (-posix didn't work.)])))
287 # Run AM_PATH_GLIB_2_0 to make sure that GLib is installed and working
290 GLIB_PACKAGES="gobject-2.0 gmodule-2.0"
291 GLIB_REQUIRED_VERSION=1.3.4
293 AM_PATH_GLIB_2_0($GLIB_REQUIRED_VERSION, :,
295 *** GLIB $GLIB_REQUIRED_VERSION or better is required. The latest version of
296 *** GLIB is always available from ftp://ftp.gtk.org/.]),
297 gobject gmodule gthread)
299 dnl Call pkg-config again since we don't want -lgthread here
300 GLIB_LIBS=`$PKG_CONFIG --libs $GLIB_PACKAGES`
301 GLIB_DEPLIBS=$GLIB_LIBS
303 CFLAGS="$CFLAGS $GLIB_CFLAGS"
304 AC_SUBST(GLIB_CFLAGS)
306 AC_SUBST(GLIB_DEPLIBS)
308 AC_CHECK_HEADERS(dirent.h, AC_DEFINE(HAVE_DIRENT_H))
309 AC_CHECK_HEADERS(pwd.h, AC_DEFINE(HAVE_PWD_H))
310 AC_CHECK_HEADERS(sys/time.h, AC_DEFINE(HAVE_SYS_TIME_H))
311 AC_CHECK_HEADERS(unistd.h, AC_DEFINE(HAVE_UNISTD_H))
313 saved_cflags="$CFLAGS"
314 saved_ldflags="$LDFLAGS"
316 if test "x$gdktarget" = "xx11"; then
317 # Find the X11 include and library directories
321 if test "x$x_includes" = "x"; then
322 x_includes="/usr/include"
325 CFLAGS="$CFLAGS $X_CFLAGS"
326 LDFLAGS="$LDFLAGS $X_LDFLAGS $X_LIBS"
328 if test "x$no_x" = "xyes"; then
330 *** X libraries or include files not found. Check 'config.log' for
334 # Checks for libraries.
335 # Check for the X11 library
336 AC_CHECK_LIB(X11, XOpenDisplay, x_libs="-lX11 $X_EXTRA_LIBS",
337 AC_MSG_ERROR([*** libX11 not found. Check 'config.log' for more details.]),
340 if test "x$enable_shm" = "xyes"; then
341 # Check for the Xext library (needed for XShm extention)
342 AC_CHECK_LIB(Xext, XShmAttach,
343 x_libs="-lXext $x_libs",
344 # On AIX, it is in XextSam instead, but we still need -lXext
345 AC_CHECK_LIB(XextSam, XShmAttach,
346 x_libs="-lXextSam -lXext $x_libs",
347 no_xext_lib=yes, $x_libs),
351 # Check for shaped window extension
353 AC_CHECK_LIB(Xext, XShapeCombineMask,
354 if test -z "`echo $x_libs | grep "\-lXext" 2> /dev/null`"; then
355 x_libs="-lXext $x_libs"
357 AC_DEFINE(HAVE_SHAPE_EXT),
361 # Check for XConvertCase (X11R6 specific)
363 AC_CHECK_LIB(X11, XConvertCase,
364 AC_DEFINE(HAVE_XCONVERTCASE),
369 # Checks for FreeType
374 AC_PATH_PROG(FREETYPE_CONFIG, freetype-config, no)
375 if test "x$FREETYPE_CONFIG" != "xno" ; then
376 FREETYPE_CFLAGS=`freetype-config --cflags`
377 FREETYPE_LIBS=`freetype-config --libs`
379 AC_CHECK_LIB(freetype, FT_New_Face, have_freetype=true
382 AC_SUBST(FREETYPE_CFLAGS)
385 # Checks for Xft/XRender
390 if test $have_freetype = true ; then
391 AC_CHECK_LIB(Xrender, XRenderFindFormat,
392 AC_CHECK_LIB(Xft, XftFontOpen, have_xft=true, :, -lXrender -lXext $X_LIBS $FREETYPE_LIBS)
395 ## be sure we also have Pango built with xft support
396 if ! $PKG_CONFIG --exists pangoxft ; then
398 AC_MSG_WARN([X render extension found, but Pango lacks Xft support])
401 if $have_xft = 'true' ; then
402 X_LIBS="-lXft -lXrender -lXext $FREETYPE_LIBS $X_LIBS"
408 AM_CONDITIONAL(HAVE_XFT, $have_xft)
410 # Check for XIM support.
412 AC_CHECK_LIB(X11, XUnregisterIMInstantiateCallback,
414 enable_xim_inst="no",
417 # On Solaris, calling XRegisterIMInstantiateCallback seems to
418 # cause an immediate segfault, so we disable it, unless
419 # the user specifically forces it to be on.
421 if test x$enable_xim_inst = xmaybe ; then
427 enable_xim_inst="yes"
432 if test "x$enable_xim" = "xyes"; then
433 GTK_XIM_FLAGS="-DUSE_XIM"
434 if test "x$enable_xim_inst" = "xyes"; then
435 AC_DEFINE(USE_X11R6_XIM)
439 # Check for XKB support.
441 if test "x$enable_xkb" = "xyes"; then
442 AC_MSG_WARN(XKB support explicitly enabled)
444 elif test "x$enable_xkb" = "xmaybe"; then
445 AC_CHECK_LIB(X11, XkbQueryExtension,
450 AC_MSG_WARN(XKB support explicitly disabled)
454 x_ldflags="$X_LDFLAGS $X_LIBS"
456 # set up things for XInput
458 if test "x$with_xinput" = "xgxi" || test "x$with_xinput" = "xyes"; then
459 AC_DEFINE(XINPUT_GXI)
461 x_libs="-lXi $x_libs"
462 elif test "x$with_xinput" = "xxfree"; then
463 AC_DEFINE(XINPUT_XFREE)
464 x_libs="-lXi $x_libs"
466 AC_DEFINE(XINPUT_NONE)
469 AM_CONDITIONAL(XINPUT_GXI, test x$with_xinput = xgxi)
470 AM_CONDITIONAL(XINPUT_XFREE, test x$with_xinput = xxfree)
472 if test "x$enable_shm" = "xyes"; then
473 # Check for shared memory
474 AC_CHECK_HEADER(sys/ipc.h, AC_DEFINE(HAVE_IPC_H), no_sys_ipc=yes)
475 AC_CHECK_HEADER(sys/shm.h, AC_DEFINE(HAVE_SHM_H), no_sys_shm=yes)
477 # Check for the X shared memory extension header file
478 AC_MSG_CHECKING(X11/extensions/XShm.h)
479 if test "x$no_xext_lib" = "xyes"; then
483 if test -f "$x_includes/X11/extensions/XShm.h"; then
485 AC_DEFINE(HAVE_XSHM_H)
493 more_cflags="$x_cflags"
494 more_ldflags="$x_ldflags"
496 more_includes="$x_includes"
498 # these are already defined above
499 #gdktargetlib = "libgdk-x11-1.3.la"
500 #gtktargetlib = "libgtk-x11-1.3.la"
502 AM_CONDITIONAL(USE_X11, true)
504 AM_CONDITIONAL(USE_X11, false)
507 if test "x$gdktarget" = "xnanox"; then
508 AC_CHECK_LIB(nano-X, GrOpen,,AC_MSG_ERROR([nano-X libraries not found.]))
509 # nano-X may require additional libraries
515 gdktargetlib="libgdk-nanox-1.3.la"
516 gtktargetlib="libgtk-nanox-1.3.la"
519 AC_DEFINE(XINPUT_NONE)
525 AM_CONDITIONAL(USE_NANOX, true)
527 AM_CONDITIONAL(USE_NANOX, false)
530 if test "x$gdktarget" = "xlinux-fb"; then
536 gdktargetlib="libgdk-linux-fb-1.3.la"
537 gtktargetlib="libgtk-linux-fb-1.3.la"
540 AC_DEFINE(XINPUT_NONE)
547 AC_PATH_PROG(FREETYPE_CONFIG, freetype-config, no)
548 if test x$FREETYPE_CONFIG = xno ; then
549 AC_MSG_ERROR([*** freetype-config not found])
552 FREETYPE_CFLAGS="`$FREETYPE_CONFIG --cflags`"
553 FREETYPE_LIBS="`$FREETYPE_CONFIG --libs`"
554 CFLAGS="$CFLAGS $FREETYPE_CFLAGS"
556 if test x$enable_shadowfb = xyes ; then
557 AC_DEFINE(ENABLE_SHADOW_FB)
560 AM_CONDITIONAL(USE_LINUX_FB, true)
562 AM_CONDITIONAL(USE_LINUX_FB, false)
564 AC_SUBST(ENABLE_SHADOW_FB)
565 AC_SUBST(FREETYPE_LIBS)
566 AC_SUBST(FREETYPE_CFLAGS)
569 # Pick correct Pango packages to use
572 if test "x$gdktarget" = "xx11"; then
573 if $have_xft = true ; then
574 PANGO_PACKAGES="pangox pangoxft"
576 PANGO_PACKAGES=pangox
578 elif test "x$gdktarget" = "xlinux-fb"; then
579 PANGO_PACKAGES=pangoft2
584 AC_SUBST(PANGO_PACKAGES)
586 # Check for Pango flags
588 AC_MSG_CHECKING(Pango flags)
589 if $PKG_CONFIG --exists $PANGO_PACKAGES ; then
590 PANGO_CFLAGS=`$PKG_CONFIG --cflags $PANGO_PACKAGES`
591 PANGO_LIBS=`$PKG_CONFIG --libs $PANGO_PACKAGES`
593 AC_MSG_RESULT($PANGO_CFLAGS $PANGO_LIBS)
596 *** Pango not found. Pango is required to build GTK+.
597 *** See http://www.pango.org for Pango information.
598 *** For the framebuffer target, you will need to build
599 *** Pango with freetype support.
603 CFLAGS="$CFLAGS $PANGO_CFLAGS"
605 AC_SUBST(PANGO_CFLAGS)
607 AC_CHECK_LIB(pango, pango_context_new, :, AC_MSG_ERROR([
608 *** Can't link to Pango. Pango is required to build
609 *** GTK+. For more information see http://www.pango.org]), $PANGO_LIBS $x_ldflags $x_libs)
611 CFLAGS="$saved_cflags"
612 LDFLAGS="$saved_ldflags"
618 AC_SUBST(xinput_progs)
620 AC_SUBST(more_cflags)
621 AC_SUBST(more_includes)
622 AC_SUBST(more_ldflags)
624 AC_SUBST(gdktargetlib)
625 AC_SUBST(gtktargetlib)
628 # Checks for header files.
631 # Checks for typedefs, structures, and compiler characteristics.
634 # Checks for library functions.
638 AC_CHECK_FUNCS(getresuid)
641 # Check if <sys/select.h> needs to be included for fd_set
642 AC_MSG_CHECKING([for fd_set])
643 AC_TRY_COMPILE([#include <sys/types.h>],
644 [fd_set readMask, writeMask;], gtk_ok=yes, gtk_ok=no)
645 if test $gtk_ok = yes; then
646 AC_MSG_RESULT([yes, found in sys/types.h])
648 AC_HEADER_EGREP(fd_mask, sys/select.h, gtk_ok=yes)
649 if test $gtk_ok = yes; then
650 AC_DEFINE(HAVE_SYS_SELECT_H)
651 AC_MSG_RESULT([yes, found in sys/select.h])
658 # `widechar' tests for gdki18n.h
659 AC_MSG_CHECKING(for wchar.h)
660 AC_TRY_CPP([#include <wchar.h>], gdk_wchar_h=yes, gdk_wchar_h=no)
661 if test $gdk_wchar_h = yes; then
662 AC_DEFINE(HAVE_WCHAR_H,1,[Have wchar.h include file])
664 AC_MSG_RESULT($gdk_wchar_h)
666 # Check for wctype.h (for iswalnum)
667 AC_MSG_CHECKING(for wctype.h)
668 AC_TRY_CPP([#include <wctype.h>], gdk_wctype_h=yes, gdk_wctype_h=no)
669 if test $gdk_wctype_h = yes; then
670 AC_DEFINE(HAVE_WCTYPE_H,1,[Have wctype.h include file])
672 AC_MSG_RESULT($gdk_wctype_h)
674 # in Solaris 2.5, `iswalnum' is in -lw
676 AC_CHECK_FUNC(iswalnum,,[AC_CHECK_LIB(w,iswalnum,GDK_WLIBS=-lw)])
679 LIBS="$LIBS $GDK_WLIBS"
680 # The following is necessary for Linux libc-5.4.38
681 AC_MSG_CHECKING(if iswalnum() and friends are properly defined)
682 AC_TRY_LINK([#include <stdlib.h>],[
683 #if (defined(HAVE_WCTYPE_H) || defined(HAVE_WCHAR_H))
684 # ifdef HAVE_WCTYPE_H
692 # define iswalnum(c) ((wchar_t)(c) <= 0xFF && isalnum(c))
694 iswalnum((wchar_t) 0);
695 ], gdk_working_wctype=yes, gdk_working_wctype=no)
698 if test $gdk_working_wctype = no; then
699 AC_DEFINE(HAVE_BROKEN_WCTYPE,1,[Is the wctype implementation broken])
702 AC_MSG_RESULT($gdk_working_wctype)
705 AC_SUBST(GTK_DEBUG_FLAGS)
706 AC_SUBST(GTK_XIM_FLAGS)
707 AC_SUBST(GTK_LOCALE_FLAGS)
709 ##################################################
710 # Checks for gdk-pixbuf
711 ##################################################
713 AC_MSG_CHECKING(whether to build gmodulized gdk-pixbuf)
715 AC_ARG_ENABLE(modules, [ --disable-modules Disables dynamic module loading],[
716 if test x$withval = xyes; then
725 if test x$with_modules = xno; then
729 AC_MSG_CHECKING(whether dynamic modules work)
732 CFLAGS="$GLIB_CFLAGS"
739 if (g_module_supported ())
749 dnl Now we check to see if our libtool supports shared lib deps
750 dnl (in a rather ugly way even)
752 pixbuf_libtool_config="${CONFIG_SHELL-/bin/sh} libtool --config"
753 pixbuf_deplibs_check=`$pixbuf_libtool_config | \
754 grep '^[[a-z_]]*check[[a-z_]]*_method=[['\''"]]' | \
755 sed 's/.*[['\''"]]\(.*\)[['\''"]]$/\1/'`
756 if test "x$pixbuf_deplibs_check" = "xnone" || \
757 test "x$pixbuf_deplibs_check" = "xunknown" || \
758 test "x$pixbuf_deplibs_check" = "x"; then
764 AC_DEFINE(USE_GMODULE)
771 if test -z "$LIBTIFF"; then
772 AC_CHECK_LIB(tiff, TIFFReadScanline,
773 AC_CHECK_HEADER(tiffio.h,
774 TIFF='tiff'; LIBTIFF='-ltiff',
775 AC_MSG_WARN(*** TIFF loader will not be built (TIFF header files not found) ***)),
776 AC_CHECK_LIB(tiff, TIFFWriteScanline,
777 AC_CHECK_HEADER(tiffio.h,
778 TIFF='tiff'; LIBTIFF='-ltiff -ljpeg -lz',
779 AC_MSG_WARN(*** TIFF loader will not be built (TIFF header files not found) ***)),
780 AC_CHECK_LIB(tiff34, TIFFFlushData,
781 AC_CHECK_HEADER(tiffio.h,
782 TIFF='tiff'; LIBTIFF='-ltiff34 -ljpeg -lz',
783 AC_MSG_WARN(*** TIFF loader will not be built (TIFF header files not found) ***)),
784 AC_MSG_WARN(*** TIFF plug-in will not be built (TIFF library not found) ***), -ljpeg -lz -lm), -ljpeg -lz -lm), -lm)
788 if test -z "$LIBJPEG"; then
789 AC_CHECK_LIB(jpeg, jpeg_destroy_decompress,
792 AC_MSG_WARN(*** JPEG loader will not be built (JPEG library not found) ***))
793 if test "$jpeg_ok" = yes; then
794 AC_MSG_CHECKING([for jpeglib.h])
799 #include <jpeglib.h>],
802 AC_MSG_RESULT($jpeg_ok)
803 if test "$jpeg_ok" = yes; then
805 AC_CHECK_LIB(jpeg, jpeg_simple_progression,
806 AC_DEFINE(HAVE_PROGRESSIVE_JPEG),
807 AC_MSG_WARN(JPEG library does not support progressive saving.))
809 AC_MSG_WARN(*** JPEG loader will not be built (JPEG header file not found) ***)
815 if test -z "$LIBPNG"; then
816 AC_CHECK_LIB(png, png_read_info,
817 AC_CHECK_HEADER(png.h,
820 AC_MSG_WARN(*** PNG loader will not be built (PNG library not found) ***), -lz -lm)
821 if test "$png_ok" = yes; then
822 AC_MSG_CHECKING([for png_structp in png.h])
823 AC_TRY_COMPILE([#include <png.h>],
824 [png_structp pp; png_infop info; png_colorp cmap; png_create_read_struct;],
827 AC_MSG_RESULT($png_ok)
828 if test "$png_ok" = yes; then
829 PNG='png'; LIBPNG='-lpng -lz'
831 AC_MSG_WARN(*** PNG loader will not be built (PNG library is too old) ***)
834 AC_MSG_WARN(*** PNG loader will not be built (PNG header file not found) ***)
838 deps="$LIBTIFF $LIBJPEG $LIBPNG"
844 AM_CONDITIONAL(BUILD_DYNAMIC_MODULES, $dynworks)
847 # Allow building some or all gdk-pixbuf loaders included
849 AC_MSG_CHECKING(pixbuf loaders to build)
851 AC_ARG_WITH(included_loaders, [ --with-included-loaders=LOADER1,LOADER2,... Build the specified loaders into gdk-pixbuf (only used if module loading disabled)])
853 all_loaders="png,bmp,wbmp,gif,ico,jpeg,pnm,ras,tiff,xpm"
855 # If no loaders specified, include all
856 if test "x$with_included_loaders" = xyes ; then
857 included_loaders="$all_loaders"
859 included_loaders="$with_included_loaders"
862 AC_MSG_RESULT($included_loaders)
865 INCLUDED_LOADER_DEFINE=
867 IFS="${IFS= }"; gtk_save_ifs="$IFS"; IFS=","
868 for loader in $included_loaders; do
869 if ! echo "$all_loaders" | grep "\(^\|\,\)$loader\(\$\|\,\)" > /dev/null; then
870 AC_MSG_ERROR([the specified loader $loader does not exist])
873 INCLUDED_LOADER_OBJ="$INCLUDED_LOADER_OBJ libpixbufloader-static-$loader.la"
874 INCLUDED_LOADER_DEFINE="$INCLUDED_LOADER_DEFINE -DINCLUDE_$loader"
877 AC_SUBST(INCLUDED_LOADER_OBJ)
878 AC_SUBST(INCLUDED_LOADER_DEFINE)
886 AM_CONDITIONAL(HAVE_TIFF, test "x$LIBTIFF" != x)
887 AM_CONDITIONAL(HAVE_PNG, test "x$LIBPNG" != x)
888 AM_CONDITIONAL(HAVE_JPEG, test "x$LIBJPEG" != x)
890 GDK_PIXBUF_LIBDIR='-L${libdir}'
891 GDK_PIXBUF_INCLUDEDIR="-I${includedir} $GTK_CFLAGS"
892 GDK_PIXBUF_LIBS="$GLIB_LIBS -lgdk_pixbuf $deps $GTK_LIBS"
893 AC_SUBST(STATIC_LIB_DEPS)
894 STATIC_LIB_DEPS="$deps"
896 AC_SUBST(GDK_PIXBUF_LIBDIR)
897 AC_SUBST(GDK_PIXBUF_INCLUDEDIR)
898 AC_SUBST(GDK_PIXBUF_LIBS)
900 GDK_PIXBUF_XLIB_LIBDIR=$GDK_PIXBUF_LIBDIR
901 GDK_PIXBUF_XLIB_INCLUDEDIR=$GDK_PIXBUF_INCLUDEDIR
902 GDK_PIXBUF_XLIB_LIBS="$GLIB_LIBS -lgdk_pixbuf_xlib $deps $X11_LIBS"
904 AC_SUBST(GDK_PIXBUF_XLIB_LIBDIR)
905 AC_SUBST(GDK_PIXBUF_XLIB_INCLUDEDIR)
906 AC_SUBST(GDK_PIXBUF_XLIB_LIBS)
908 # Checks to see if we should compile in MMX support (there will be
909 # a runtime test when the code is actually run to see if it should
910 # be used - this just checks if we can compile it.)
912 # This code is partially taken from Mesa
914 AC_MSG_CHECKING(for x86 platform)
916 i386|i486|i586|i686|i786|k6|k7)
922 AC_MSG_RESULT($use_x86_asm)
925 if test $use_x86_asm = yes; then
929 AC_MSG_CHECKING(compiler support for MMX)
930 cp $srcdir/gdk-pixbuf/pixops/scale_line_22_33_mmx.S conftest.S
931 if AC_TRY_EVAL(ac_compile); then
938 if test $use_mmx_asm = yes; then
946 AM_CONDITIONAL(USE_MMX, test x$use_mmx_asm = xyes)
949 ##################################################
950 # Checks for gtk-doc and docbook-tools
951 ##################################################
953 AC_ARG_WITH(html-dir, [ --with-html-dir=PATH path to installed docs ])
955 if test "x$with_html_dir" = "x" ; then
956 HTML_DIR='${datadir}/gtk-doc/html'
958 HTML_DIR=$with_html_dir
963 AC_CHECK_PROG(GTKDOC, gtkdoc-mkdb, true, false)
965 gtk_doc_min_version=0.6
967 gtk_doc_version=`gtkdoc-mkdb --version`
968 AC_MSG_CHECKING([gtk-doc version ($gtk_doc_version) >= $gtk_doc_min_version])
970 exit (("$gtk_doc_version" =~ /^[[0-9]]+\.[[0-9]]+$/) &&
971 ("$gtk_doc_version" >= "$gtk_doc_min_version") ? 0 : 1);
980 AM_CONDITIONAL(HAVE_GTK_DOC, $GTKDOC)
981 AC_SUBST(HAVE_GTK_DOC)
983 AC_CHECK_PROG(DB2HTML, db2html, true, false)
984 AM_CONDITIONAL(HAVE_DOCBOOK, $DB2HTML)
986 dnl Let people disable the gtk-doc stuff.
987 AC_ARG_ENABLE(gtk-doc, [ --enable-gtk-doc Use gtk-doc to build documentation [default=auto]], enable_gtk_doc="$enableval", enable_gtk_doc=auto)
989 if test x$enable_gtk_doc = xauto ; then
990 if test x$GTKDOC = xtrue ; then
997 dnl NOTE: We need to use a separate automake conditional for this
998 dnl to make this work with the tarballs.
999 AM_CONDITIONAL(ENABLE_GTK_DOC, test x$enable_gtk_doc = xyes)
1001 GDK_PIXBUF_DIR=`(cd $srcdir; pwd)`
1002 AC_SUBST(GDK_PIXBUF_DIR)
1005 ##################################################
1007 ##################################################
1009 AC_OUTPUT_COMMANDS([
1011 ## Generate `gdk/gdkconfig.h' in two cases
1012 ## 1. `config.status' is run either explicitly, or via configure.
1013 ## Esp. not when it is run in `Makefile' to generate makefiles and
1015 ## 2. CONFIG_OTHER is set explicitly
1017 ## Case 1 is difficult. We know that `automake' sets one of
1018 ## CONFIG_FILES or CONFIG_HEADERS to empty. This heuristic works
1019 ## only when AM_CONFIG_HEADER is set, however.
1021 if test -n "${CONFIG_FILES}" && test -n "${CONFIG_HEADERS}"; then
1022 # Both CONFIG_FILES and CONFIG_HEADERS are non-empty ==> Case 1
1023 CONFIG_OTHER=${CONFIG_OTHER:-gdk/gdkconfig.h}
1025 case "$CONFIG_OTHER" in
1027 echo creating gdk/gdkconfig.h
1028 outfile=gdkconfig.h-tmp
1029 cat > $outfile <<\_______EOF
1032 * This is a generated file. Please modify `configure.in'
1040 #endif /* __cplusplus */
1044 cat >>$outfile <<_______EOF
1049 cat >>$outfile <<_______EOF
1053 #endif /* __cplusplus */
1055 #endif /* GDKCONFIG_H */
1059 if cmp -s $outfile gdk/gdkconfig.h; then
1060 echo gdk/gdkconfig.h is unchanged
1063 mv $outfile gdk/gdkconfig.h
1067 if test "x$gdktarget" = "xx11" ; then
1069 #define GDK_WINDOWING_X11'
1070 elif test "x$gdktarget" = "xnanox" ; then
1072 #define GDK_WINDOWING_NANOX'
1073 elif test "x$gdktarget" = "xlinux-fb" ; then
1075 #define GDK_WINDOWING_FB
1076 #define GDK_NATIVE_WINDOW_POINTER'
1079 if test x$gdk_wchar_h = xyes; then
1081 #define GDK_HAVE_WCHAR_H 1'
1083 if test x$gdk_wctype_h = xyes; then
1085 #define GDK_HAVE_WCTYPE_H 1"
1087 if test x$gdk_working_wctype = xno; then
1089 #define GDK_HAVE_BROKEN_WCTYPE 1"
1095 AC_PATH_PROG(SGML2HTML, sgml2html, no)
1096 AM_CONDITIONAL(HAVE_SGML2HTML, ! test x$SGML2HTML = xno)
1108 build/win32/Makefile
1110 demos/gtk-demo/Makefile
1113 docs/reference/Makefile
1114 docs/reference/gdk-pixbuf/Makefile
1115 docs/reference/gdk/Makefile
1116 docs/reference/gtk/Makefile
1118 docs/tutorial/Makefile
1120 gdk-pixbuf/makefile.mingw
1121 gdk-pixbuf/gdk-pixbuf-features.h
1122 gdk-pixbuf/pixops/Makefile
1123 gdk-pixbuf/pixops/makefile.mingw
1128 gdk/win32/makefile.mingw
1129 gdk/win32/rc/Makefile
1132 gdk/linux-fb/Makefile
1138 gtk/stock-icons/Makefile
1140 modules/input/Makefile
1142 contrib/gdk-pixbuf-xlib/Makefile
1143 contrib/gdk-pixbuf-xlib/gdk-pixbuf-xlib-2.0.pc