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
10 # glib_cflags: cflags to store in gtk-config
11 # glib_libs: libs to store in gtk-config
12 # glib_thread_cflags: cflags to store in gtk-config for gtk-config gthread
13 # glib_thread_libs: libs to store in gtk-config for gtk-config gthread
15 # Save this value here, since automake will set cflags later
16 cflags_set=${CFLAGS+set}
18 dnl we to AC_DIVERT_PUSH/AC_DIVERT_POP these variable definitions so they
19 dnl are available for $ac_help expansion (don't we all *love* autoconf?)
20 AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl
23 # GTK_MICRO_VERSION += 1;
24 # GTK_INTERFACE_AGE += 1;
25 # GTK_BINARY_AGE += 1;
26 # if any functions have been added, set GTK_INTERFACE_AGE to 0.
27 # if backwards compatibility has been broken,
28 # set GTK_BINARY_AGE and GTK_INTERFACE_AGE to 0.
35 GTK_VERSION=$GTK_MAJOR_VERSION.$GTK_MINOR_VERSION.$GTK_MICRO_VERSION
39 AC_SUBST(GTK_MAJOR_VERSION)
40 AC_SUBST(GTK_MINOR_VERSION)
41 AC_SUBST(GTK_MICRO_VERSION)
42 AC_SUBST(GTK_INTERFACE_AGE)
43 AC_SUBST(GTK_BINARY_AGE)
47 LT_RELEASE=$GTK_MAJOR_VERSION.$GTK_MINOR_VERSION
48 LT_CURRENT=`expr $GTK_MICRO_VERSION - $GTK_INTERFACE_AGE`
49 LT_REVISION=$GTK_INTERFACE_AGE
50 LT_AGE=`expr $GTK_BINARY_AGE - $GTK_INTERFACE_AGE`
57 # gdk-pixbuf gets versioned separately, and for now, using standard
58 # libtool versioning, not GTK+-style versioning
63 GDK_PIXBUF_VERSION="${GDK_PIXBUF_MAJOR}.${GDK_PIXBUF_MINOR}.${GDK_PIXBUF_MICRO}"
64 AC_SUBST(GDK_PIXBUF_MAJOR)
65 AC_SUBST(GDK_PIXBUF_MINOR)
66 AC_SUBST(GDK_PIXBUF_MICRO)
67 AC_SUBST(GDK_PIXBUF_VERSION)
74 AC_SUBST(GETTEXT_PACKAGE)
75 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE")
77 # Save this value here, since automake will set cflags later
78 cflags_set=${CFLAGS+set}
80 dnl Initialize automake stuff
81 AM_INIT_AUTOMAKE($PACKAGE, $VERSION, no-define)
83 # Specify a configuration file
84 AM_CONFIG_HEADER(config.h)
86 dnl Initialize libtool
89 dnl Initialize maintainer mode
94 dnl figure debugging default, prior to $ac_help setup
96 AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl
97 if test `expr $GTK_MINOR_VERSION \% 2` = 1 ; then
100 debug_default=minimum
104 dnl declare --enable-* args and collect ac_help strings
105 AC_ARG_ENABLE(debug, [ --enable-debug=[no/minimum/yes] turn on debugging [default=$debug_default]],,enable_debug=$debug_default)
106 AC_ARG_ENABLE(shm, [ --enable-shm support shared memory if available [default=yes]],
107 echo $enable_shm, enable_shm="yes")
108 AC_ARG_ENABLE(ansi, [ --enable-ansi turn on strict ansi [default=no]],
110 AC_ARG_WITH(glib, [ --with-glib=DIR Use uninstalled copy of glib])
111 AC_ARG_ENABLE(xim, [ --enable-xim support XIM [default=yes]],
113 AC_ARG_ENABLE(xim_inst, [ --disable-xim-inst does not use xim instantiate callback],
114 , enable_xim_inst="maybe")
115 AC_ARG_ENABLE(rebuilds, [ --disable-rebuilds disable all source autogeneration rules],,enable_rebuilds=yes)
116 AC_ARG_WITH(locale, [ --with-locale=LOCALE locale name you want to use ])
118 AC_ARG_WITH(xinput, [ --with-xinput=[no/gxi/xfree] support XInput ])
121 gdktargetlib=libgdk-x11-1.3.la
122 gtktargetlib=libgtk-x11-1.3.la
123 AC_ARG_WITH(gdktarget, [ --with-gdktarget=[x11/nanox/linux-fb] select GDK target [default=x11] ],
124 gdktarget=$with_gdktarget)
128 x11|nanox|linux-fb) ;;
129 *) AC_MSG_ERROR([Invalid target for GDK: use x11, nanox or linux-fb.]);;
132 if test "x$enable_debug" = "xyes"; then
133 test "$cflags_set" = set || CFLAGS="$CFLAGS -g"
134 GTK_DEBUG_FLAGS="-DG_ENABLE_DEBUG"
136 if test "x$enable_debug" = "xno"; then
137 GTK_DEBUG_FLAGS="-DG_DISABLE_ASSERT -DG_DISABLE_CHECKS -DGTK_NO_CHECK_CASTS"
139 GTK_DEBUG_FLAGS="-DGTK_NO_CHECK_CASTS"
143 AC_DEFINE_UNQUOTED(GTK_COMPILED_WITH_DEBUGGING, "${enable_debug}")
145 # Build time sanity check...
148 # Checks for programs.
156 if test "x$GCC" = "xyes"; then
158 *[\ \ ]-Wall[\ \ ]*) ;;
159 *) CFLAGS="$CFLAGS -Wall" ;;
162 if test "x$enable_ansi" = "xyes"; then
164 *[\ \ ]-ansi[\ \ ]*) ;;
165 *) CFLAGS="$CFLAGS -ansi" ;;
169 *[\ \ ]-pedantic[\ \ ]*) ;;
170 *) CFLAGS="$CFLAGS -pedantic" ;;
176 # Honor aclocal flags
177 ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
179 # define a MAINT-like variable REBUILD which is set if Perl
180 # and awk are found, so autogenerated sources can be rebuilt
183 AC_CHECK_PROGS(PERL, perl5 perl)
185 # We would like indent, but don't require it.
186 AC_CHECK_PROG(INDENT, indent, indent)
189 if test "x$enable_rebuilds" = "xyes" && \
191 $PERL -e 'exit !($] >= 5.002)' > /dev/null 2>&1 && \
192 test -n "$AWK" ; then
197 AC_CHECK_FUNCS(lstat mkstemp sigsetjmp)
199 AC_MSG_CHECKING(whether make is GNU Make)
202 if $ac_make --version 2>/dev/null | grep '^GNU Make ' >/dev/null ; then
203 STRIP_BEGIN='$(strip $(STRIP_DUMMY)'
210 AC_SUBST(STRIP_DUMMY)
211 AC_SUBST(STRIP_BEGIN)
215 ALL_LINGUAS="ca cs da de el es et eu fi fr ga gl hr hu it ja ko lt nl no pl pt pt_BR ro ru sk sl sv tr uk wa zh_TW.Big5 zh_CN.GB2312"
217 LIBS="$LIBS $INTLLIBS"
219 # AM_GTK_GNU_GETTEXT above substs $DATADIRNAME
220 # this is the directory where the *.{mo,gmo} files are installed
221 gtklocaledir='${prefix}/${DATADIRNAME}/locale'
222 AC_SUBST(gtklocaledir)
224 dnl The DU4 header files don't provide library prototypes unless
225 dnl -std1 is given to the native cc.
226 AC_MSG_CHECKING([for extra flags to get ANSI library prototypes])
230 AC_TRY_RUN([#include <math.h>
231 int main (void) { return (log(1) != log(1.)); }],
232 AC_MSG_RESULT(none needed),
233 gtk_save_CFLAGS="$CFLAGS"
234 CFLAGS="$CFLAGS -std1"
235 AC_TRY_RUN([#include <math.h>
236 int main (void) { return (log(1) != log(1.)); }],
237 AC_MSG_RESULT(-std1),
239 CFLAGS="$gtk_save_CFLAGS"
241 [No ANSI prototypes found in library. (-std1 didn't work.)]),
244 AC_MSG_RESULT(none needed)
250 AC_MSG_CHECKING(for the BeOS)
254 GTK_LIBS_EXTRA="-L\$(top_builddir_full)/gdk/.libs -lgdk"
262 AC_SUBST(GTK_LIBS_EXTRA)
264 dnl NeXTStep cc seems to need this
265 AC_MSG_CHECKING([for extra flags for POSIX compliance])
266 AC_TRY_COMPILE([#include <dirent.h>], [DIR *dir;],
267 AC_MSG_RESULT(none needed),
268 gtk_save_CFLAGS="$CFLAGS"
269 CFLAGS="$CFLAGS -posix"
270 AC_TRY_COMPILE([#include <dirent.h>], [DIR *dir;],
271 AC_MSG_RESULT(-posix),
273 CFLAGS="$gtk_save_CFLAGS"
274 AC_MSG_WARN([Could not determine POSIX flag. (-posix didn't work.)])))
276 if test x$with_glib = xyes ; then
278 *** Directory must be specified for --with-glib])
281 if test x$with_glib = x ; then
282 # Look for separately installed glib
284 AM_PATH_GLIB_2_0(1.3.1,,
286 *** GLIB 1.3.1 or better is required. The latest version of GLIB
287 *** is always available from ftp://ftp.gtk.org/.]),
288 gobject gmodule gthread)
290 # we do not want to make all gtk progs to link to thread libraries.
291 glib_cflags=`$GLIB_CONFIG_2_0 glib gobject gmodule --cflags`
292 glib_thread_cflags="$GLIB_CFLAGS"
293 glib_libs=`$GLIB_CONFIG_2_0 glib gobject gmodule --libs`
294 glib_thread_libs="$GLIB_LIBS"
295 GLIB_LIBS="$glib_libs"
296 GLIB_DEPLIBS="$glib_libs"
298 # Use uninstalled glib (assume they got the version right)
300 GLIB_CONFIG_2_0=$with_glib/glib-config-2.0
301 if test -x $GLIB_CONFIG_2_0 ; then
304 AC_MSG_ERROR([GLIB directory ($with_glib) not present or not configured])
307 # For use in gtk-config
308 glib_cflags=`$GLIB_CONFIG_2_0 --cflags gmodule`
309 glib_thread_cflags=`$GLIB_CONFIG_2_0 --cflags gmodule gthread`
310 glib_libs=`$GLIB_CONFIG_2_0 --libs gmodule`
311 glib_thread_libs=`$GLIB_CONFIG_2_0 --libs gmodule gthread`
313 glib_release=`$GLIB_CONFIG_2_0 --version | sed 's%\\.[[0-9]]*$%%'`
315 # canonicalize relative paths
321 glib_dir="\$(top_builddir)/$with_glib"
325 GLIB_CFLAGS="-I$glib_dir -I$glib_dir/gmodule"
326 GLIB_LIBS="$glib_dir/libglib-1.3.la $glib_dir/gmodule/libgmodule-1.3.la"
329 AC_SUBST(GLIB_CFLAGS)
333 AC_SUBST(glib_cflags)
335 AC_SUBST(glib_thread_cflags)
336 AC_SUBST(glib_thread_libs)
337 AC_SUBST(GLIB_DEPLIBS)
339 AC_CHECK_HEADERS(dirent.h, AC_DEFINE(HAVE_DIRENT_H))
340 AC_CHECK_HEADERS(pwd.h, AC_DEFINE(HAVE_PWD_H))
341 AC_CHECK_HEADERS(sys/time.h, AC_DEFINE(HAVE_SYS_TIME_H))
343 saved_cflags="$CFLAGS"
344 saved_ldflags="$LDFLAGS"
346 if test "x$gdktarget" = "xx11"; then
347 # Find the X11 include and library directories
351 if test "x$x_includes" = "x"; then
352 x_includes="/usr/include"
355 CFLAGS="$CFLAGS $X_CFLAGS"
356 LDFLAGS="$LDFLAGS $X_LDFLAGS $X_LIBS"
358 if test "x$no_x" = "xyes"; then
360 *** X libraries or include files not found. Check 'config.log' for
364 # Checks for libraries.
365 # Check for the X11 library
366 AC_CHECK_LIB(X11, XOpenDisplay, x_libs="-lX11 $X_EXTRA_LIBS",
367 AC_MSG_ERROR([*** libX11 not found. Check 'config.log' for more details.]),
370 if test "x$enable_shm" = "xyes"; then
371 # Check for the Xext library (needed for XShm extention)
372 AC_CHECK_LIB(Xext, XShmAttach,
373 x_libs="-lXext $x_libs",
374 # On AIX, it is in XextSam instead, but we still need -lXext
375 AC_CHECK_LIB(XextSam, XShmAttach,
376 x_libs="-lXextSam -lXext $x_libs",
377 no_xext_lib=yes, $x_libs),
381 # Check for shaped window extension
383 AC_CHECK_LIB(Xext, XShapeCombineMask,
384 if test -z "`echo $x_libs | grep "\-lXext" 2> /dev/null`"; then
385 x_libs="-lXext $x_libs"
387 AC_DEFINE(HAVE_SHAPE_EXT),
391 # Check for XConvertCase (X11R6 specific)
393 AC_CHECK_LIB(X11, XConvertCase,
394 AC_DEFINE(HAVE_XCONVERTCASE),
398 # Check for XIM support.
400 AC_CHECK_LIB(X11, XUnregisterIMInstantiateCallback,
402 enable_xim_inst="no",
405 # On Solaris, calling XRegisterIMInstantiateCallback seems to
406 # cause an immediate segfault, so we disable it, unless
407 # the user specifically forces it to be on.
409 if test x$enable_xim_inst = xmaybe ; then
415 enable_xim_inst="yes"
420 if test "x$enable_xim" = "xyes"; then
421 GTK_XIM_FLAGS="-DUSE_XIM"
422 if test "x$enable_xim_inst" = "xyes"; then
423 AC_DEFINE(USE_X11R6_XIM)
428 x_ldflags="$X_LDFLAGS $X_LIBS"
430 # set up things for XInput
432 if test "x$with_xinput" = "xgxi" || test "x$with_xinput" = "xyes"; then
433 AC_DEFINE(XINPUT_GXI)
435 x_libs="-lXi $x_libs"
436 elif test "x$with_xinput" = "xxfree"; then
437 AC_DEFINE(XINPUT_XFREE)
438 x_libs="-lXi $x_libs"
440 AC_DEFINE(XINPUT_NONE)
443 AM_CONDITIONAL(XINPUT_GXI, test x$with_xinput = xgxi)
444 AM_CONDITIONAL(XINPUT_XFREE, test x$with_xinput = xxfree)
446 if test "x$enable_shm" = "xyes"; then
447 # Check for shared memory
448 AC_CHECK_HEADER(sys/ipc.h, AC_DEFINE(HAVE_IPC_H), no_sys_ipc=yes)
449 AC_CHECK_HEADER(sys/shm.h, AC_DEFINE(HAVE_SHM_H), no_sys_shm=yes)
451 # Check for the X shared memory extension header file
452 AC_MSG_CHECKING(X11/extensions/XShm.h)
453 if test "x$no_xext_lib" = "xyes"; then
457 if test -f "$x_includes/X11/extensions/XShm.h"; then
459 AC_DEFINE(HAVE_XSHM_H)
467 more_cflags="$x_cflags"
468 more_ldflags="$x_ldflags"
470 more_includes="$x_includes"
472 # these are already defined above
473 #gdktargetlib = "libgdk-x11-1.3.la"
474 #gtktargetlib = "libgtk-x11-1.3.la"
476 AM_CONDITIONAL(USE_X11, true)
478 AM_CONDITIONAL(USE_X11, false)
481 if test "x$gdktarget" = "xnanox"; then
482 AC_CHECK_LIB(nano-X, GrOpen,,AC_MSG_ERROR([nano-X libraries not found.]))
483 # nano-X may require additional libraries
489 gdktargetlib="libgdk-nanox-1.3.la"
490 gtktargetlib="libgtk-nanox-1.3.la"
493 AC_DEFINE(XINPUT_NONE)
499 AM_CONDITIONAL(USE_NANOX, true)
501 AM_CONDITIONAL(USE_NANOX, false)
504 if test "x$gdktarget" = "xlinux-fb"; then
510 gdktargetlib="libgdk-linux-fb-1.3.la"
511 gtktargetlib="libgtk-linux-fb-1.3.la"
514 AC_DEFINE(XINPUT_NONE)
521 AM_CONDITIONAL(USE_LINUX_FB, true)
523 AM_CONDITIONAL(USE_LINUX_FB, false)
529 AC_PATH_PROG(PANGO_CONFIG, pango-config, no)
530 if test x$PANGO_CONFIG = xno ; then
531 AC_MSG_ERROR([*** pango-config not found])
534 if test "x$gdktarget" = "xx11"; then
535 PANGO_CFLAGS="`$PANGO_CONFIG --cflags pangox`"
536 PANGO_LIBS="`$PANGO_CONFIG --libs pangox`"
538 PANGO_CFLAGS="`$PANGO_CONFIG --cflags pango`"
539 PANGO_LIBS="`$PANGO_CONFIG --libs pango`"
541 CFLAGS="$CFLAGS $PANGO_CFLAGS"
543 AC_SUBST(PANGO_CFLAGS)
545 AC_CHECK_LIB(pango, pango_context_new, :, AC_MSG_ERROR([
546 *** Pango not found. Pango is required to build
547 *** GTK+. For more information see http://www.pango.org]), $PANGO_LIBS $x_ldflags $x_libs)
549 CFLAGS="$saved_cflags"
550 LDFLAGS="$saved_ldflags"
556 AC_SUBST(xinput_progs)
558 AC_SUBST(more_cflags)
559 AC_SUBST(more_includes)
560 AC_SUBST(more_ldflags)
562 AC_SUBST(gdktargetlib)
563 AC_SUBST(gtktargetlib)
566 # Check if X_LOCALE definition is necessary
568 AC_MSG_CHECKING(need -DX_LOCALE)
577 return setlocale (LC_ALL, "${with_locale}") == NULL;
582 AC_MSG_RESULT($need_x_locale)
584 if test $need_x_locale = yes; then
585 GTK_LOCALE_FLAGS="-DX_LOCALE"
588 # Checks for header files.
591 # Checks for typedefs, structures, and compiler characteristics.
594 # Checks for library functions.
598 # Check if <sys/select.h> needs to be included for fd_set
599 AC_MSG_CHECKING([for fd_set])
600 AC_TRY_COMPILE([#include <sys/types.h>],
601 [fd_set readMask, writeMask;], gtk_ok=yes, gtk_ok=no)
602 if test $gtk_ok = yes; then
603 AC_MSG_RESULT([yes, found in sys/types.h])
605 AC_HEADER_EGREP(fd_mask, sys/select.h, gtk_ok=yes)
606 if test $gtk_ok = yes; then
607 AC_DEFINE(HAVE_SYS_SELECT_H)
608 AC_MSG_RESULT([yes, found in sys/select.h])
615 # `widechar' tests for gdki18n.h
616 AC_MSG_CHECKING(for wchar.h)
617 AC_TRY_CPP([#include <wchar.h>], gdk_wchar_h=yes, gdk_wchar_h=no)
618 if test $gdk_wchar_h = yes; then
619 AC_DEFINE(HAVE_WCHAR_H,1,[Have wchar.h include file])
621 AC_MSG_RESULT($gdk_wchar_h)
623 # Check for wctype.h (for iswalnum)
624 AC_MSG_CHECKING(for wctype.h)
625 AC_TRY_CPP([#include <wctype.h>], gdk_wctype_h=yes, gdk_wctype_h=no)
626 if test $gdk_wctype_h = yes; then
627 AC_DEFINE(HAVE_WCTYPE_H,1,[Have wctype.h include file])
629 AC_MSG_RESULT($gdk_wctype_h)
631 # in Solaris 2.5, `iswalnum' is in -lw
633 AC_CHECK_FUNC(iswalnum,,[AC_CHECK_LIB(w,iswalnum,GDK_WLIBS=-lw)])
636 LIBS="$LIBS $GDK_WLIBS"
637 # The following is necessary for Linux libc-5.4.38
638 AC_MSG_CHECKING(if iswalnum() and friends are properly defined)
639 AC_TRY_LINK([#include <stdlib.h>],[
640 #if (defined(HAVE_WCTYPE_H) || defined(HAVE_WCHAR_H))
641 # ifdef HAVE_WCTYPE_H
649 # define iswalnum(c) ((wchar_t)(c) <= 0xFF && isalnum(c))
651 iswalnum((wchar_t) 0);
652 ], gdk_working_wctype=yes, gdk_working_wctype=no)
655 if test $gdk_working_wctype = no; then
656 AC_DEFINE(HAVE_BROKEN_WCTYPE,1,[Is the wctype implementation broken])
659 AC_MSG_RESULT($gdk_working_wctype)
662 AC_SUBST(GTK_DEBUG_FLAGS)
663 AC_SUBST(GTK_XIM_FLAGS)
664 AC_SUBST(GTK_LOCALE_FLAGS)
666 ##################################################
667 # Checks for gdk-pixbuf
668 ##################################################
670 AC_MSG_CHECKING(whether to build gmodulized gdk-pixbuf)
672 AC_ARG_ENABLE(modules, [ --disable-modules Disables dynamic module loading],[
673 if test x$withval = xyes; then
682 if test x$with_modules = xno; then
686 AC_MSG_CHECKING(whether dynamic modules work)
689 CFLAGS="$GLIB_CFLAGS"
696 if (g_module_supported ())
706 dnl Now we check to see if our libtool supports shared lib deps
707 dnl (in a rather ugly way even)
709 pixbuf_libtool_config="${CONFIG_SHELL-/bin/sh} libtool --config"
710 pixbuf_deplibs_check=`$pixbuf_libtool_config | \
711 grep '^[[a-z_]]*check[[a-z_]]*_method=[['\''"]]' | \
712 sed 's/.*[['\''"]]\(.*\)[['\''"]]$/\1/'`
713 if test "x$pixbuf_deplibs_check" = "xnone" || \
714 test "x$pixbuf_deplibs_check" = "xunknown" || \
715 test "x$pixbuf_deplibs_check" = "x"; then
721 AC_DEFINE(USE_GMODULE)
722 GMODULE_LIBS="`$GLIB_CONFIG_2_0 --libs gmodule`"
723 GMODULE_FLAGS="`$GLIB_CONFIG_2_0 --cflags gmodule`"
724 AC_SUBST(GMODULE_LIBS)
725 AC_SUBST(GMODULE_FLAGS)
732 if test -z "$LIBTIFF"; then
733 AC_CHECK_LIB(tiff, TIFFReadScanline,
734 AC_CHECK_HEADER(tiffio.h,
735 TIFF='tiff'; LIBTIFF='-ltiff',
736 AC_MSG_WARN(*** TIFF loader will not be built (TIFF header files not found) ***)),
737 AC_CHECK_LIB(tiff, TIFFWriteScanline,
738 AC_CHECK_HEADER(tiffio.h,
739 TIFF='tiff'; LIBTIFF='-ltiff -ljpeg -lz',
740 AC_MSG_WARN(*** TIFF loader will not be built (TIFF header files not found) ***)),
741 AC_CHECK_LIB(tiff34, TIFFFlushData,
742 AC_CHECK_HEADER(tiffio.h,
743 TIFF='tiff'; LIBTIFF='-ltiff34 -ljpeg -lz',
744 AC_MSG_WARN(*** TIFF loader will not be built (TIFF header files not found) ***)),
745 AC_MSG_WARN(*** TIFF plug-in will not be built (TIFF library not found) ***), -ljpeg -lz -lm), -ljpeg -lz -lm), -lm)
749 if test -z "$LIBJPEG"; then
750 AC_CHECK_LIB(jpeg, jpeg_destroy_decompress,
753 AC_MSG_WARN(*** JPEG loader will not be built (JPEG library not found) ***))
754 if test "$jpeg_ok" = yes; then
755 AC_MSG_CHECKING([for jpeglib.h])
760 #include <jpeglib.h>],
763 AC_MSG_RESULT($jpeg_ok)
764 if test "$jpeg_ok" = yes; then
766 AC_CHECK_LIB(jpeg, jpeg_simple_progression,
767 AC_DEFINE(HAVE_PROGRESSIVE_JPEG),
768 AC_MSG_WARN(JPEG library does not support progressive saving.))
770 AC_MSG_WARN(*** JPEG loader will not be built (JPEG header file not found) ***)
776 if test -z "$LIBPNG"; then
777 AC_CHECK_LIB(png, png_read_info,
778 AC_CHECK_HEADER(png.h,
781 AC_MSG_WARN(*** PNG loader will not be built (PNG library not found) ***), -lz -lm)
782 if test "$png_ok" = yes; then
783 AC_MSG_CHECKING([for png_structp in png.h])
784 AC_TRY_COMPILE([#include <png.h>],
785 [png_structp pp; png_infop info; png_colorp cmap; png_create_read_struct;],
788 AC_MSG_RESULT($png_ok)
789 if test "$png_ok" = yes; then
790 PNG='png'; LIBPNG='-lpng -lz'
792 AC_MSG_WARN(*** PNG loader will not be built (PNG library is too old) ***)
795 AC_MSG_WARN(*** PNG loader will not be built (PNG header file not found) ***)
799 deps="$LIBTIFF $LIBJPEG $LIBPNG"
805 AM_CONDITIONAL(BUILD_DYNAMIC_MODULES, $dynworks)
813 AM_CONDITIONAL(HAVE_TIFF, test "x$LIBTIFF" != x)
814 AM_CONDITIONAL(HAVE_PNG, test "x$LIBPNG" != x)
815 AM_CONDITIONAL(HAVE_JPEG, test "x$LIBJPEG" != x)
817 GDK_PIXBUF_LIBDIR='-L${libdir}'
818 GDK_PIXBUF_INCLUDEDIR="-I${includedir} $GTK_CFLAGS"
819 GDK_PIXBUF_LIBS="$GLIB_LIBS -lgdk_pixbuf $deps $GTK_LIBS"
820 AC_SUBST(STATIC_LIB_DEPS)
821 STATIC_LIB_DEPS="$deps"
823 AC_SUBST(GDK_PIXBUF_LIBDIR)
824 AC_SUBST(GDK_PIXBUF_INCLUDEDIR)
825 AC_SUBST(GDK_PIXBUF_LIBS)
827 # Checks to see if we should compile in MMX support (there will be
828 # a runtime test when the code is actually run to see if it should
829 # be used - this just checks if we can compile it.)
831 # This code is partially taken from Mesa
833 AC_MSG_CHECKING(for x86 platform)
835 i386|i486|i586|i686|i786|k6|k7)
841 AC_MSG_RESULT($use_x86_asm)
844 if test $use_x86_asm = yes; then
848 AC_MSG_CHECKING(compiler support for MMX)
849 cp $srcdir/gdk-pixbuf/pixops/scale_line_22_33_mmx.S conftest.S
850 if AC_TRY_EVAL(ac_compile); then
855 if test $use_mmx_asm = yes; then
863 AM_CONDITIONAL(USE_MMX, test x$use_mmx_asm = xyes)
866 ##################################################
867 # Checks for gtk-doc and docbook-tools
868 ##################################################
870 AC_CHECK_PROG(GTKDOC, gtkdoc-mkdb, true, false)
871 AM_CONDITIONAL(HAVE_GTK_DOC, $GTKDOC)
872 AC_SUBST(HAVE_GTK_DOC)
874 AC_CHECK_PROG(DB2HTML, db2html, true, false)
875 AM_CONDITIONAL(HAVE_DOCBOOK, $DB2HTML)
877 dnl Let people disable the gtk-doc stuff.
878 AC_ARG_ENABLE(gtk-doc, [ --enable-gtk-doc Use gtk-doc to build documentation [default=auto]], enable_gtk_doc="$enableval", enable_gtk_doc=auto)
880 if test x$enable_gtk_doc = xauto ; then
881 if test x$GTKDOC = xtrue ; then
888 dnl NOTE: We need to use a separate automake conditional for this
889 dnl to make this work with the tarballs.
890 AM_CONDITIONAL(ENABLE_GTK_DOC, test x$enable_gtk_doc = xyes)
892 GDK_PIXBUF_DIR=`(cd $srcdir; pwd)`
893 AC_SUBST(GDK_PIXBUF_DIR)
896 ##################################################
898 ##################################################
902 ## Generate `gdk/gdkconfig.h' in two cases
903 ## 1. `config.status' is run either explicitly, or via configure.
904 ## Esp. not when it is run in `Makefile' to generate makefiles and
906 ## 2. CONFIG_OTHER is set explicitly
908 ## Case 1 is difficult. We know that `automake' sets one of
909 ## CONFIG_FILES or CONFIG_HEADERS to empty. This heuristic works
910 ## only when AM_CONFIG_HEADER is set, however.
912 if test -n "${CONFIG_FILES}" && test -n "${CONFIG_HEADERS}"; then
913 # Both CONFIG_FILES and CONFIG_HEADERS are non-empty ==> Case 1
914 CONFIG_OTHER=${CONFIG_OTHER:-gdk/gdkconfig.h}
916 case "$CONFIG_OTHER" in
918 echo creating gdk/gdkconfig.h
919 outfile=gdkconfig.h-tmp
920 cat > $outfile <<\_______EOF
923 * This is a generated file. Please modify `configure.in'
931 #endif /* __cplusplus */
935 cat >>$outfile <<_______EOF
940 cat >>$outfile <<_______EOF
944 #endif /* __cplusplus */
946 #endif /* GDKCONFIG_H */
950 if cmp -s $outfile gdk/gdkconfig.h; then
951 echo gdk/gdkconfig.h is unchanged
954 mv $outfile gdk/gdkconfig.h
958 # Currently we always use X11 on those systems where we run configure...
959 if test "x$gdktarget" = "xx11" ; then
961 #define GDK_WINDOWING_X11'
962 elif test "x$gdktarget" = "xnanox" ; then
964 #define GDK_WINDOWING_NANOX'
965 elif test "x$gdktarget" = "xlinux-fb" ; then
967 #define GDK_WINDOWING_FB
968 #define GDK_NATIVE_WINDOW_POINTER'
971 if test x$gdk_wchar_h = xyes; then
973 #define GDK_HAVE_WCHAR_H 1'
975 if test x$gdk_wctype_h = xyes; then
977 #define GDK_HAVE_WCTYPE_H 1"
979 if test x$gdk_working_wctype = xno; then
981 #define GDK_HAVE_BROKEN_WCTYPE 1"
987 AC_PATH_PROG(SGML2HTML, sgml2html, no)
988 AM_CONDITIONAL(HAVE_SGML2HTML, ! test x$SGML2HTML = xno)
1000 docs/reference/Makefile
1001 docs/reference/gdk-pixbuf/Makefile
1003 docs/tutorial/Makefile
1005 gdk-pixbuf/makefile.mingw
1006 gdk-pixbuf/gdk-pixbuf-features.h
1007 gdk-pixbuf/pixops/Makefile
1008 gdk-pixbuf/pixops/makefile.mingw
1013 gdk/win32/makefile.mingw
1015 gdk/linux-fb/Makefile
1020 modules/linux-fb/Makefile
1021 ], [chmod +x gtk-config-2.0])