1 # Process this file with autoconf to produce a configure script.
4 # Making point releases:
5 # gdk_pixbuf_micro_version += 1;
6 # gdk_pixbuf_interface_age += 1;
7 # gdk_pixbuf_binary_age += 1;
9 # if any functions have been added, set gdk_pixbuf_interface_age to 0.
11 # if backwards compatibility has been broken:
12 # gdk_pixbuf_major_version += 1;
13 # gdk_pixbuf_interface_age = 0;
14 # gdk_pixbuf_binary_age = 0;
16 m4_define([gdk_pixbuf_major_version], [2])
17 m4_define([gdk_pixbuf_minor_version], [26])
18 m4_define([gdk_pixbuf_micro_version], [1])
19 m4_define([gdk_pixbuf_interface_age], [1])
20 m4_define([gdk_pixbuf_binary_age],
21 [m4_eval(100 * gdk_pixbuf_minor_version + gdk_pixbuf_micro_version)])
22 m4_define([gdk_pixbuf_version],
23 [gdk_pixbuf_major_version.gdk_pixbuf_minor_version.gdk_pixbuf_micro_version])
24 m4_define([gdk_pixbuf_api_version], [2.0])
25 m4_define([gdk_pixbuf_binary_version], [2.10.0])
28 # required versions of other packages
29 m4_define([glib_required_version], [2.31.0])
31 AC_INIT([gdk-pixbuf], [gdk_pixbuf_version],
32 [http://bugzilla.gnome.org/enter_bug.cgi?product=gdk-pixbuf],
35 AC_CONFIG_HEADER([config.h])
36 AC_CONFIG_SRCDIR([gdk-pixbuf/gdk-pixbuf.h])
37 AC_CONFIG_MACRO_DIR([m4])
39 # Save this value here, since automake will set cflags later
40 cflags_set=${CFLAGS+set}
42 AM_INIT_AUTOMAKE([1.11 foreign no-define -Wno-portability dist-xz no-dist-gzip tar-ustar])
43 AM_MAINTAINER_MODE([enable])
45 # Support silent build rules. Disable
46 # by either passing --disable-silent-rules to configure or passing V=0
48 AM_SILENT_RULES([yes])
51 # For each of the libraries we build, we define the following
52 # substituted variables:
54 # foo_PACKAGES: pkg-config packages this library requires
55 # foo_EXTRA_LIBS: Libraries this module requires not pulled in by pkg-config
56 # foo_EXTRA_CFLAGS: cflags this module requires not pulled in by pkg-config
57 # foo_DEP_LIBS: All libraries this module requires
58 # foo_DEP_CFLAGS: All cflags this module requires
60 GDK_PIXBUF_MAJOR=gdk_pixbuf_major_version
61 GDK_PIXBUF_MINOR=gdk_pixbuf_minor_version
62 GDK_PIXBUF_MICRO=gdk_pixbuf_micro_version
63 GDK_PIXBUF_VERSION=gdk_pixbuf_version
64 GDK_PIXBUF_API_VERSION=gdk_pixbuf_api_version
65 GDK_PIXBUF_BINARY_VERSION=gdk_pixbuf_binary_version
66 AC_SUBST(GDK_PIXBUF_MAJOR)
67 AC_SUBST(GDK_PIXBUF_MINOR)
68 AC_SUBST(GDK_PIXBUF_MICRO)
69 AC_SUBST(GDK_PIXBUF_VERSION)
70 AC_SUBST(GDK_PIXBUF_API_VERSION)
71 AC_SUBST(GDK_PIXBUF_BINARY_VERSION)
74 #LT_RELEASE=$GTK_MAJOR_VERSION.$GTK_MINOR_VERSION
75 #LT_CURRENT=`expr $GTK_MICRO_VERSION - $GTK_INTERFACE_AGE`
76 #LT_REVISION=$GTK_INTERFACE_AGE
77 #LT_AGE=`expr $GTK_BINARY_AGE - $GTK_INTERFACE_AGE`
78 #LT_CURRENT_MINUS_AGE=`expr $LT_CURRENT - $LT_AGE`
80 m4_define([lt_current], [m4_eval(100 * gdk_pixbuf_minor_version + gdk_pixbuf_micro_version - gdk_pixbuf_interface_age)])
81 m4_define([lt_revision], [gdk_pixbuf_interface_age])
82 m4_define([lt_age], [m4_eval(gdk_pixbuf_binary_age - gdk_pixbuf_interface_age)])
83 LT_VERSION_INFO="lt_current:lt_revision:lt_age"
84 LT_CURRENT_MINUS_AGE=m4_eval(lt_current - lt_age)
85 AC_SUBST(LT_VERSION_INFO)
86 AC_SUBST(LT_CURRENT_MINUS_AGE)
88 # Checks for programs.
99 AC_MSG_CHECKING([for native Win32])
100 LIB_EXE_MACHINE_FLAG=X86
101 EXE_MANIFEST_ARCHITECTURE=X86
109 LIB_EXE_MACHINE_FLAG=X64
110 EXE_MANIFEST_ARCHITECTURE=AMD64
118 AC_MSG_RESULT([$os_win32])
120 AC_SUBST(LIB_EXE_MACHINE_FLAG)
121 AC_SUBST(EXE_MANIFEST_ARCHITECTURE)
129 if test "$os_win32" = "yes"; then
130 if test x$enable_static = xyes -o x$enable_static = x; then
131 AC_MSG_WARN([Disabling static library build, must build as DLL on Windows.])
134 if test x$enable_shared = xno; then
135 AC_MSG_WARN([Enabling shared library build, must build as DLL on Windows.])
140 dnl Initialize libtool
142 LT_INIT([disable-static win32-dll])
143 # Create libtool early, because it's used in configure
146 # Make sure we use 64-bit versions of various file stuff.
150 AC_PATH_PROG(NM, nm, nm)
152 AC_MSG_CHECKING([for some Win32 platform])
154 [*-*-mingw*|*-*-cygwin*], [platform_win32=yes],
157 AC_MSG_RESULT([$platform_win32])
158 AM_CONDITIONAL(PLATFORM_WIN32, test "$platform_win32" = "yes")
160 AM_CONDITIONAL(OS_WIN32, test "$os_win32" = "yes")
161 AM_CONDITIONAL(OS_UNIX, test "$os_win32" != "yes")
162 AM_CONDITIONAL(OS_LINUX, test "$os_linux" = "yes")
164 if test "$os_win32" = "yes"; then
165 AC_CHECK_TOOL(WINDRES, windres, no)
166 if test "$WINDRES" = no; then
167 AC_MSG_ERROR([*** Could not find an implementation of windres in your PATH.])
169 AC_CHECK_PROG(ms_librarian, lib.exe, yes, no)
171 AM_CONDITIONAL(MS_LIB_AVAILABLE, test x$ms_librarian = xyes)
173 m4_define([debug_default],
174 m4_if(m4_eval(gdk_pixbuf_minor_version % 2), [1], [yes], [minimum]))
176 dnl declare --enable-* args and collect ac_help strings
178 AC_HELP_STRING([--enable-debug=@<:@no/minimum/yes@:>@],
179 [turn on debugging @<:@default=debug_default@:>@]),,
180 enable_debug=debug_default)
181 AC_ARG_ENABLE(rebuilds,
182 [AC_HELP_STRING([--disable-rebuilds],
183 [disable all source autogeneration rules])],,
184 [enable_rebuilds=yes])
186 AS_CASE([$enable_debug],
189 test "$cflags_set" = set || CFLAGS="$CFLAGS -g"
190 GDK_PIXBUF_DEBUG_FLAGS="-DG_ENABLE_DEBUG -DG_ERRORCHECK_MUTEXES"
193 [no], [GDK_PIXBUF_DEBUG_FLAGS="-DG_DISABLE_ASSERT -DG_DISABLE_CHECKS -DG_DISABLE_CAST_CHECKS"],
195 [minimum], [GDK_PIXBUF_DEBUG_FLAGS="-DG_DISABLE_CAST_CHECKS"]
198 # Build time sanity check...
202 if test "x$GCC" = "xyes"; then
204 *[\ \ ]-Wall[\ \ ]*) ;;
205 *) CFLAGS="$CFLAGS -Wall" ;;
208 if test "x$enable_ansi" = "xyes"; then
210 *[\ \ ]-ansi[\ \ ]*) ;;
211 *) CFLAGS="$CFLAGS -ansi" ;;
215 *[\ \ ]-pedantic[\ \ ]*) ;;
216 *) CFLAGS="$CFLAGS -pedantic" ;;
222 CPPFLAGS="$CPPFLAGS -DG_DISABLE_SINGLE_INCLUDES"
224 # Ensure MSVC-compatible struct packing convention is used when
225 # compiling for Win32 with gcc.
226 # What flag to depends on gcc version: gcc3 uses "-mms-bitfields", while
227 # gcc2 uses "-fnative-struct".
228 if test x"$os_win32" = xyes; then
229 if test x"$GCC" = xyes; then
231 AC_MSG_CHECKING([how to get MSVC-compatible struct packing])
232 if test -z "$ac_cv_prog_CC"; then
235 our_gcc="$ac_cv_prog_CC"
237 case `$our_gcc --version | sed -e 's,\..*,.,' -e q` in
239 if $our_gcc -v --help 2>/dev/null | grep fnative-struct >/dev/null; then
240 msnative_struct='-fnative-struct'
244 if $our_gcc -v --help 2>/dev/null | grep ms-bitfields >/dev/null; then
245 msnative_struct='-mms-bitfields'
249 if test x"$msnative_struct" = x ; then
250 AC_MSG_RESULT([no way])
251 AC_MSG_WARN([produced libraries might be incompatible with MSVC-compiled code])
253 CFLAGS="$CFLAGS $msnative_struct"
254 AC_MSG_RESULT([${msnative_struct}])
259 ## Initial sanity check, done here so that users get told they
260 ## have the wrong dependencies as early in the process as possible.
261 ## Later on we actually use the cflags/libs from separate pkg-config
262 ## calls. Oh, also the later pkg-config calls don't include
263 ## the version requirements since those make the module lists
264 ## annoying to construct
265 PKG_CHECK_MODULES(BASE_DEPENDENCIES, [glib-2.0 >= glib_required_version])
267 if test "$os_win32" != yes; then
268 # libtool option to control which symbols are exported
269 # right now, symbols starting with _ are not exported
270 LIBTOOL_EXPORT_OPTIONS='-export-symbols-regex "^[[^_]].*"'
272 # We currently use .def files on Windows (for gdk-pixbuf, gdk and gtk)
273 LIBTOOL_EXPORT_OPTIONS=
275 AC_SUBST(LIBTOOL_EXPORT_OPTIONS)
277 dnl ******************************************************
278 dnl * See whether to include shared library dependencies *
279 dnl ******************************************************
281 AC_ARG_ENABLE(explicit-deps,
282 [AC_HELP_STRING([--enable-explicit-deps=@<:@yes/no/auto@:>@],
283 [use explicit dependencies in .pc files [default=auto]])],,
284 [enable_explicit_deps=auto])
286 AC_MSG_CHECKING([Whether to write dependencies into .pc files])
287 case $enable_explicit_deps in
290 deplibs_check_method=`(./libtool --config; echo 'eval echo \"$deplibs_check_method\"') | sh`
291 if test "x$deplibs_check_method" '!=' xpass_all || test "x$enable_static" = xyes ; then
292 enable_explicit_deps=yes
294 enable_explicit_deps=no
299 *) AC_MSG_ERROR([Value given to --enable-explicit-deps must be one of yes, no or auto])
302 AC_MSG_RESULT($enable_explicit_deps)
304 AM_CONDITIONAL(DISABLE_EXPLICIT_DEPS, test $enable_explicit_deps = no)
306 # define a MAINT-like variable REBUILD which is set if Perl
307 # and awk are found, so autogenerated sources can be rebuilt
309 AC_PATH_PROGS(PERL, perl5 perl)
312 if test "x$enable_rebuilds" = "xyes" && \
314 $PERL -e 'exit !($] >= 5.002)' > /dev/null 2>&1 ; then
319 # sigsetjmp is a macro on some platforms, so AC_CHECK_FUNCS is not reliable
320 AC_MSG_CHECKING(for sigsetjmp)
321 AC_TRY_LINK([#include <setjmp.h>], [
324 ], gtk_ok=yes, gtk_ok=no)
325 AC_MSG_RESULT($gtk_ok)
326 if test "$gtk_ok" = "yes"; then
327 AC_DEFINE(HAVE_SIGSETJMP, 1,
328 [Define to 1 if sigsetjmp is available])
332 AM_GNU_GETTEXT_VERSION([0.17])
333 AM_GNU_GETTEXT([external])
335 GETTEXT_PACKAGE="$PACKAGE"
336 AC_SUBST(GETTEXT_PACKAGE)
337 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE",
338 [The prefix for our gettext translation domains.])
340 dnl The DU4 header files don't provide library prototypes unless
341 dnl -std1 is given to the native cc.
342 AC_MSG_CHECKING([for extra flags to get ANSI library prototypes])
346 AC_TRY_RUN([#include <math.h>
347 int main (void) { return (log(1) != log(1.)); }],
348 AC_MSG_RESULT(none needed),
349 gtk_save_CFLAGS="$CFLAGS"
350 CFLAGS="$CFLAGS -std1"
351 AC_TRY_RUN([#include <math.h>
352 int main (void) { return (log(1) != log(1.)); }],
353 AC_MSG_RESULT(-std1),
355 CFLAGS="$gtk_save_CFLAGS"
357 [No ANSI prototypes found in library. (-std1 didn't work.)]),
360 AC_MSG_RESULT(none needed)
364 AC_MSG_CHECKING(for the BeOS)
379 AC_MSG_CHECKING(for HP-UX)
381 hpux9* | hpux10* | hpux11*)
383 CFLAGS="$CFLAGS -DHPPEX -DSHMLINK"
390 dnl NeXTStep cc seems to need this
391 AC_MSG_CHECKING([for extra flags for POSIX compliance])
392 AC_TRY_COMPILE([#include <dirent.h>], [DIR *dir;],
393 AC_MSG_RESULT(none needed),
394 gtk_save_CFLAGS="$CFLAGS"
395 CFLAGS="$CFLAGS -posix"
396 AC_TRY_COMPILE([#include <dirent.h>], [DIR *dir;],
397 AC_MSG_RESULT(-posix),
399 CFLAGS="$gtk_save_CFLAGS"
400 AC_MSG_WARN([Could not determine POSIX flag. (-posix didn't work.)])))
403 # Run AM_PATH_GLIB_2_0 to make sure that GLib is installed and working
406 GLIB_PACKAGES="gobject-2.0 gio-2.0 gmodule-no-export-2.0"
408 AM_PATH_GLIB_2_0(glib_required_version, :,
410 *** GLIB glib_required_version or better is required. The latest version of
411 *** GLIB is always available from ftp://ftp.gtk.org/pub/gtk/.]),
412 gobject gmodule-no-export gthread)
415 dnl Check for bind_textdomain_codeset, including -lintl if GLib brings it in.
418 LIBS="$LIBS $GLIB_LIBS"
419 AC_CHECK_FUNCS(bind_textdomain_codeset)
422 AC_CHECK_HEADERS(unistd.h,
423 AC_DEFINE(HAVE_UNISTD_H, 1,
424 [Define to 1 if unistd.h is available]))
426 saved_cflags="$CFLAGS"
427 saved_ldflags="$LDFLAGS"
430 # Checks for header files.
433 # Checks for typedefs, structures, and compiler characteristics.
436 ##################################################
437 # Checks for gdk-pixbuf
438 ##################################################
440 dnl ********************************************************
441 dnl * See whether we need to load our modules as .la files *
442 dnl ********************************************************
446 *-aix*) use_la_modules=true
449 if $use_la_modules ; then
450 AC_DEFINE(USE_LA_MODULES, 1,
451 [Whether to load modules via .la files rather than directly])
455 AC_MSG_CHECKING(whether to build gmodulized gdk-pixbuf)
457 AC_ARG_ENABLE(modules,
458 [AC_HELP_STRING([--disable-modules],
459 [disable dynamic module loading])])
463 if test x$enable_modules = xno; then
467 AC_MSG_CHECKING(whether dynamic modules work)
468 ## for loop is to strip newline
469 tmp=`$PKG_CONFIG --variable=gmodule_supported gmodule-no-export-2.0`
474 dnl Now we check to see if our libtool supports shared lib deps
475 dnl (in a rather ugly way even)
477 pixbuf_libtool_config="${CONFIG_SHELL-/bin/sh} ./libtool --config"
478 pixbuf_deplibs_check=`$pixbuf_libtool_config | \
479 grep '^[[a-z_]]*check[[a-z_]]*_method=[['\''"]]' | \
480 sed 's/.*[['\''"]]\(.*\)[['\''"]]$/\1/'`
481 if test "x$pixbuf_deplibs_check" = "xnone" || \
482 test "x$pixbuf_deplibs_check" = "xunknown" || \
483 test "x$pixbuf_deplibs_check" = "x"; then
489 AC_DEFINE(USE_GMODULE, 1,
490 [Define to 1 if gmodule works and should be used])
497 dnl We allow people to disable image loaders explicitely, but if they don't we error
498 dnl out so that people don't accidentally build without them.
501 [AC_HELP_STRING([--without-libpng],
502 [disable PNG loader for gdk-pixbuf])])
504 [AC_HELP_STRING([--without-libjpeg],
505 [disable JPEG loader for gdk-pixbuf])])
507 [AC_HELP_STRING([--without-libtiff],
508 [disable TIFF loader for gdk-pixbuf])])
509 AC_ARG_WITH(libjasper,
510 [AC_HELP_STRING([--with-libjasper],
511 [enable JPEG2000 loader for gdk-pixbuf])])
513 [AC_HELP_STRING([--without-gdiplus],
514 [disable GDI+ loaders for gdk-pixbuf on Windows])])
516 AM_CONDITIONAL(BUILD_GDIPLUS_LOADERS, [ test x$os_win32 = xyes && test x$with_gdiplus != xno ])
519 if test x$os_win32 = xno || test x$with_gdiplus = xno; then
520 if test x$with_libtiff != xno && test -z "$LIBTIFF"; then
521 AC_CHECK_LIB(tiff, TIFFReadRGBAImageOriented,
522 [AC_CHECK_HEADER(tiffio.h,
523 TIFF='tiff'; LIBTIFF='-ltiff',
524 AC_MSG_WARN(*** TIFF loader will not be built (TIFF header files not found) ***))],
525 [AC_CHECK_LIB(tiff, TIFFWriteScanline,
526 [AC_CHECK_HEADER(tiffio.h,
527 TIFF='tiff'; LIBTIFF='-ltiff -ljpeg -lz',
528 AC_MSG_WARN(*** TIFF loader will not be built (TIFF header files not found) ***))],
529 [AC_CHECK_LIB(tiff34, TIFFFlushData,
530 [AC_CHECK_HEADER(tiffio.h,
531 TIFF='tiff'; LIBTIFF='-ltiff34 -ljpeg -lz',
532 AC_MSG_WARN(*** TIFF loader will not be built (TIFF header files not found) ***))],
533 AC_MSG_WARN(*** TIFF loader will not be built (TIFF library not found) ***), -ljpeg -lz -lm)], -ljpeg -lz -lm)], -lm)
536 if test x$with_libtiff != xno && test -z "$LIBTIFF"; then
538 *** Checks for TIFF loader failed. You can build without it by passing
539 *** --without-libtiff to configure but some programs using GTK+ may
540 *** not work properly])
545 if test x$os_win32 = xno || test x$with_gdiplus = xno; then
546 if test x$with_libjpeg != xno && test -z "$LIBJPEG"; then
547 AC_CHECK_LIB(jpeg, jpeg_destroy_decompress,
550 AC_MSG_WARN(*** JPEG loader will not be built (JPEG library not found) ***))
551 if test "$jpeg_ok" = yes; then
552 AC_MSG_CHECKING([for jpeglib.h])
558 #include <jpeglib.h>],
561 AC_MSG_RESULT($jpeg_ok)
562 if test "$jpeg_ok" = yes; then
564 AC_CHECK_LIB(jpeg, jpeg_simple_progression,
565 AC_DEFINE(HAVE_PROGRESSIVE_JPEG, 1,
566 [Define to 1 is libjpeg supports progressive JPEG]),
567 AC_MSG_WARN(JPEG library does not support progressive saving.))
569 AC_MSG_WARN(*** JPEG loader will not be built (JPEG header file not found) ***)
574 if test x$with_libjpeg != xno && test -z "$LIBJPEG"; then
576 *** Checks for JPEG loader failed. You can build without it by passing
577 *** --without-libjpeg to configure but some programs using GTK+ may
578 *** not work properly])
583 if test x$with_libpng != xno && test -z "$LIBPNG"; then
584 for l in libpng15 libpng14 libpng12 libpng13 libpng10 libpng ; do
585 AC_MSG_CHECKING(for $l)
586 if $PKG_CONFIG --exists $l ; then
589 PNG_DEP_CFLAGS_PACKAGES=$l
590 LIBPNG=`$PKG_CONFIG --libs $l`
596 if test x$PNG != xpng; then
598 AC_CHECK_LIB(png, png_read_info,
599 [AC_CHECK_HEADER(png.h,
602 AC_MSG_WARN(*** PNG loader will not be built (PNG library not found) ***), -lz -lm)
603 if test "$png_ok" = yes; then
604 AC_MSG_CHECKING([for png_structp in png.h])
605 AC_TRY_COMPILE([#include <png.h>],
606 [png_structp pp; png_infop info; png_colorp cmap; png_create_read_struct;],
609 AC_MSG_RESULT($png_ok)
610 if test "$png_ok" = yes; then
611 PNG='png'; LIBPNG='-lpng -lz'
613 AC_MSG_WARN(*** PNG loader will not be built (PNG library is too old) ***)
616 AC_MSG_WARN(*** PNG loader will not be built (PNG header file not found) ***)
621 if test x$with_libpng != xno && test -z "$LIBPNG"; then
623 *** Checks for PNG loader failed. You can build without it by passing
624 *** --without-libpng to configure but many programs using GTK+ will
625 *** not work properly. The PNG loader is also needed if you are compiling
629 dnl Test for libjasper
630 if test x$with_libjasper = xyes && test -z "$LIBJASPER"; then
631 AC_CHECK_LIB(jasper, jas_init, LIBJASPER=-ljasper, [], -ljpeg -lm)
634 if test x$with_libjasper = xyes && test -z "$LIBJASPER"; then
636 *** Checks for JPEG2000 loader failed. You can build without it by passing
637 *** --without-libjasper to configure])
645 AM_CONDITIONAL(BUILD_DYNAMIC_MODULES, $dynworks)
648 # Allow building some or all gdk-pixbuf loaders included
650 AC_MSG_CHECKING(pixbuf loaders to build)
652 dnl due to an autoconf bug, commas in the first arg to
653 dnl AC_HELP_STRING cause problems.
654 dnl AC_HELP_STRING([--with-included-loaders=LOADER1 LOADER2 ...],
655 dnl [build the specified loaders into gdk-pixbuf])
656 AC_ARG_WITH(included_loaders,
657 [ --with-included-loaders=LOADER1,LOADER2,...
658 build the specified loaders into gdk-pixbuf])
663 ## if the option was specified, leave it; otherwise disable included loaders
664 if test x$with_included_loaders = xno; then
665 with_included_loaders=yes
669 # Use the traditional png loader instead of the GDI+ one on Windows,
670 # because some important apps like GIMP need to read and write
671 # arbitrary tEXt chunks which doesn't seem to be possible through GDI+
673 all_loaders="ani,icns,pcx,ras,tga,png,pnm,wbmp,xbm,xpm,qtif"
674 if test x$with_libjasper = xyes; then
675 all_loaders="$all_loaders,jasper"
677 if test x$os_win32 = xyes && test x$with_gdiplus != xno; then
678 # Skip PNG, see comment above
679 gdip_formats="bmp emf gif ico jpeg tiff wmf"
680 for f in $gdip_formats; do
681 all_loaders="$all_loaders,gdip-$f"
684 all_loaders="$all_loaders,bmp,gif,ico,jpeg,tiff"
687 # If no loaders specified, include all
688 if test "x$with_included_loaders" = xyes ; then
689 included_loaders="$all_loaders"
691 included_loaders="$with_included_loaders"
694 AC_MSG_RESULT($included_loaders)
697 INCLUDED_LOADER_DEFINE=
699 IFS="${IFS= }"; gtk_save_ifs="$IFS"; IFS=","
700 for loader in $included_loaders; do
701 if echo "$all_loaders" | egrep "(^|,)$loader(\$|,)" > /dev/null; then
704 AC_MSG_ERROR([the specified loader $loader does not exist])
707 loader_underscores=`echo $loader | sed -e 's/-/_/g'`
708 INCLUDED_LOADER_OBJ="$INCLUDED_LOADER_OBJ libstatic-pixbufloader-$loader.la"
710 # Don't bother defining separate -DINCLUDE_gdip_foo for each gdip-foo loader
713 *) INCLUDED_LOADER_DEFINE="$INCLUDED_LOADER_DEFINE -DINCLUDE_$loader_underscores";;
715 eval INCLUDE_$loader_underscores=yes
718 # Just define one -DINCLUDE_gdiplus for all the gdip-foo loaders
719 # (except gdip-png, which isn't built at all)
720 if test x"$INCLUDE_gdip_ico" = xyes; then
721 INCLUDED_LOADER_DEFINE="$INCLUDED_LOADER_DEFINE -DINCLUDE_gdiplus"
725 AC_SUBST(INCLUDED_LOADER_OBJ)
726 AC_SUBST(INCLUDED_LOADER_DEFINE)
728 AM_CONDITIONAL(INCLUDE_PNG, [test x"$INCLUDE_png" = xyes])
729 AM_CONDITIONAL(INCLUDE_BMP, [test x"$INCLUDE_bmp" = xyes])
730 AM_CONDITIONAL(INCLUDE_WBMP, [test x"$INCLUDE_wbmp" = xyes])
731 AM_CONDITIONAL(INCLUDE_GIF, [test x"$INCLUDE_gif" = xyes])
732 AM_CONDITIONAL(INCLUDE_ICO, [test x"$INCLUDE_ico" = xyes])
733 AM_CONDITIONAL(INCLUDE_ANI, [test x"$INCLUDE_ani" = xyes])
734 AM_CONDITIONAL(INCLUDE_JPEG, [test x"$INCLUDE_jpeg" = xyes])
735 AM_CONDITIONAL(INCLUDE_PNM, [test x"$INCLUDE_pnm" = xyes])
736 AM_CONDITIONAL(INCLUDE_RAS, [test x"$INCLUDE_ras" = xyes])
737 AM_CONDITIONAL(INCLUDE_TIFF, [test x"$INCLUDE_tiff" = xyes])
738 AM_CONDITIONAL(INCLUDE_XPM, [test x"$INCLUDE_xpm" = xyes])
739 AM_CONDITIONAL(INCLUDE_XBM, [test x"$INCLUDE_xbm" = xyes])
740 AM_CONDITIONAL(INCLUDE_TGA, [test x"$INCLUDE_tga" = xyes])
741 AM_CONDITIONAL(INCLUDE_PCX, [test x"$INCLUDE_pcx" = xyes])
742 AM_CONDITIONAL(INCLUDE_ICNS, [test x"$INCLUDE_icns" = xyes])
743 AM_CONDITIONAL(INCLUDE_JASPER, [test x"$INCLUDE_jasper" = xyes])
744 AM_CONDITIONAL(INCLUDE_QTIF, [test x"$INCLUDE_qtif" = xyes])
745 # As all GDI+ loaders are either built-in or not, arbitrarily just
746 # check one of the variables here
747 AM_CONDITIONAL(INCLUDE_GDIPLUS, [test x"$INCLUDE_gdip_ico" = xyes])
749 if test x$gio_can_sniff = x; then
750 AC_MSG_CHECKING([if gio can sniff png])
751 gtk_save_LIBS="$LIBS"
752 gtk_save_CFLAGS="$CFLAGS"
753 LIBS="`$PKG_CONFIG --libs gio-2.0`"
754 CFLAGS="`$PKG_CONFIG --cflags gio-2.0`"
755 AC_RUN_IFELSE([AC_LANG_SOURCE([[
757 static const gsize data_size = 159;
758 static const guint8 data[] =
760 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d,
761 0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01,
762 0x08, 0x02, 0x00, 0x00, 0x00, 0x90, 0x77, 0x53, 0xde, 0x00, 0x00, 0x00,
763 0x01, 0x73, 0x52, 0x47, 0x42, 0x00, 0xae, 0xce, 0x1c, 0xe9, 0x00, 0x00,
764 0x00, 0x09, 0x70, 0x48, 0x59, 0x73, 0x00, 0x00, 0x0b, 0x13, 0x00, 0x00,
765 0x0b, 0x13, 0x01, 0x00, 0x9a, 0x9c, 0x18, 0x00, 0x00, 0x00, 0x07, 0x74,
766 0x49, 0x4d, 0x45, 0x07, 0xd8, 0x07, 0x0f, 0x10, 0x08, 0x15, 0x61, 0xd8,
767 0x35, 0x37, 0x00, 0x00, 0x00, 0x19, 0x74, 0x45, 0x58, 0x74, 0x43, 0x6f,
768 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x00, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65,
769 0x64, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x47, 0x49, 0x4d, 0x50, 0x57,
770 0x81, 0x0e, 0x17, 0x00, 0x00, 0x00, 0x0c, 0x49, 0x44, 0x41, 0x54, 0x08,
771 0xd7, 0x63, 0xf8, 0xff, 0xff, 0x3f, 0x00, 0x05, 0xfe, 0x02, 0xfe, 0xdc,
772 0xcc, 0x59, 0xe7, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae,
776 main (int argc, char **argv)
781 content_type = g_content_type_guess (NULL, data, data_size, NULL);
782 image_png = g_content_type_from_mime_type ("image/png");
783 return !!g_strcmp0 (content_type, image_png);
786 AC_DEFINE(GDK_PIXBUF_USE_GIO_MIME, 1, [Define if gio can sniff image data])],
788 AC_MSG_RESULT($gio_can_sniff)
789 LIBS="$gtk_save_LIBS"
790 CFLAGS="$gtk_save_CFLAGS"
793 AM_CONDITIONAL(HAVE_TIFF, test "x$LIBTIFF" != x)
794 AM_CONDITIONAL(HAVE_PNG, test "x$LIBPNG" != x)
795 AM_CONDITIONAL(HAVE_JPEG, test "x$LIBJPEG" != x)
796 AM_CONDITIONAL(HAVE_JASPER, test "x$LIBJASPER" != x)
800 if echo "$included_loaders" | egrep '(^|,)tiff($|,)' > /dev/null; then
801 STATIC_LIB_DEPS="$STATIC_LIB_DEPS $LIBTIFF"
803 if echo "$included_loaders" | egrep '(^|,)jpeg($|,)' > /dev/null; then
804 STATIC_LIB_DEPS="$STATIC_LIB_DEPS $LIBJPEG"
806 if echo "$included_loaders" | egrep '(^|,)png($|,)' > /dev/null; then
807 if test -z $PNG_DEP_CFLAGS_PACKAGES; then
808 STATIC_LIB_DEPS="$STATIC_LIB_DEPS $LIBPNG"
811 if echo "$included_loaders" | egrep '(^|,)jasper($|,)' > /dev/null; then
812 STATIC_LIB_DEPS="$STATIC_LIB_DEPS $LIBJASPER"
815 STATIC_LIB_DEPS="$LIBTIFF $LIBJPEG $LIBPNG $LIBJASPER"
818 # Checks to see whether we should include mediaLib
821 AC_CHECK_HEADER(sys/systeminfo.h,
822 AC_DEFINE(HAVE_SYS_SYSTEMINFO_H, 1,
823 [Define to 1 if sys/systeminfo.h is available]))
824 AC_CHECK_HEADER(sys/sysinfo.h,
825 AC_DEFINE(HAVE_SYS_SYSINFO_H, 1,
826 [Define to 1 if sys/sysinfo.h is available]))
828 AC_MSG_CHECKING(for mediaLib 2.3)
830 # Check for a mediaLib 2.3 function since that is what the GTK+ mediaLib
832 AC_CHECK_LIB(mlib, mlib_ImageSetStruct, use_mlib=yes, use_mlib=no)
833 if test $use_mlib = yes; then
834 AC_DEFINE(USE_MEDIALIB, 1,
835 [Define to 1 if medialib is available and should be used])
838 AC_MSG_CHECKING(for mediaLib 2.5)
839 # Check for a mediaLib 2.5 function since that is what is needed for
840 # gdk_rgb_convert integration.
841 AC_CHECK_LIB(mlib, mlib_VideoColorRGBint_to_BGRAint, use_mlib25=yes, use_mlib25=no)
842 if test $use_mlib25 = yes; then
843 AC_DEFINE(USE_MEDIALIB25, 1,
844 [Define to 1 if medialib 2.5 is available])
847 AM_CONDITIONAL(USE_MEDIALIB, test $use_mlib = yes)
848 AM_CONDITIONAL(USE_MEDIALIB25, test $use_mlib25 = yes)
850 # Checks to see if we should compile in MMX support (there will be
851 # a runtime test when the code is actually run to see if it should
852 # be used - this just checks if we can compile it.)
854 # This code is partially taken from Mesa
856 AC_MSG_CHECKING(for x86 platform)
858 i386|i486|i586|i686|i786|k6|k7)
864 AC_MSG_RESULT($use_x86_asm)
867 if test $use_x86_asm = yes; then
871 AC_MSG_CHECKING(compiler support for MMX)
872 cp $srcdir/gdk-pixbuf/pixops/scale_line_22_33_mmx.S conftest.S
873 if AC_TRY_EVAL(ac_compile); then
880 if test $use_mmx_asm = yes; then
881 AC_DEFINE(USE_MMX, 1,
882 [Define to 1 if XXM is available and should be used])
889 AM_CONDITIONAL(USE_MMX, test x$use_mmx_asm = xyes)
892 if test -z "$LIBPNG" && test x"$os_win32" = xno -o x$with_gdiplus = xno; then
896 dnl Look for a host system's gdk-pixbuf-csource if we are cross-compiling
898 AM_CONDITIONAL(CROSS_COMPILING, test $cross_compiling = yes)
900 if test $cross_compiling = yes; then
901 AC_PATH_PROG(GDK_PIXBUF_CSOURCE, gdk-pixbuf-csource, no)
902 AC_PATH_PROG(GTK_UPDATE_ICON_CACHE, gtk-update-icon-cache, no)
903 if test x$GTK_UPDATE_ICON_CACHE = xno; then
908 GDK_PIXBUF_PACKAGES="gmodule-no-export-2.0 gobject-2.0 gio-2.0"
909 GDK_PIXBUF_EXTRA_LIBS="$STATIC_LIB_DEPS $MATH_LIB $MEDIA_LIB"
910 GDK_PIXBUF_EXTRA_CFLAGS=
911 GDK_PIXBUF_DEP_LIBS="`$PKG_CONFIG --libs $GDK_PIXBUF_PACKAGES $PNG_DEP_CFLAGS_PACKAGES` $GDK_PIXBUF_EXTRA_LIBS"
912 GDK_PIXBUF_DEP_CFLAGS="`$PKG_CONFIG --cflags gthread-2.0 $GDK_PIXBUF_PACKAGES $PNG_DEP_CFLAGS_PACKAGES` $GDK_PIXBUF_EXTRA_CFLAGS"
914 AC_SUBST(PNG_DEP_CFLAGS_PACKAGES)
915 AC_SUBST(GDK_PIXBUF_PACKAGES)
916 AC_SUBST(GDK_PIXBUF_EXTRA_LIBS)
917 AC_SUBST(GDK_PIXBUF_EXTRA_CFLAGS)
918 AC_SUBST(GDK_PIXBUF_DEP_LIBS)
919 AC_SUBST(GDK_PIXBUF_DEP_CFLAGS)
925 GDK_PIXBUF_XLIB_PACKAGES=
926 GDK_PIXBUF_XLIB_EXTRA_CFLAGS=
927 GDK_PIXBUF_XLIB_EXTRA_LIBS=
930 [AC_HELP_STRING([--with-x11],
931 [build X11 support])])
933 if test x$with_x11 = xyes; then
934 AM_CONDITIONAL(USE_X11, true)
935 PKG_CHECK_MODULES(GDK_PIXBUF_XLIB_DEP, x11 gobject-2.0)
937 AM_CONDITIONAL(USE_X11, false)
940 ################################################################
941 # Strip -export-dynamic from the link lines of various libraries
942 ################################################################
945 # pkg-config --libs gmodule includes the "export_dynamic" flag,
946 # but this flag is only meaningful for executables. For libraries
947 # the effect is undefined; what it causes on Linux is that the
948 # export list from -export-symbols-regex is ignored and everything
951 # We are using gmodule-no-export now, but I'm leaving the stripping
952 # code in place for now, since pango and atk still require gmodule.
954 export_dynamic=`(./libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh`
955 if test -n "$export_dynamic"; then
956 GDK_PIXBUF_DEP_LIBS=`echo $GDK_PIXBUF_DEP_LIBS | sed -e "s/$export_dynamic//"`
959 ##################################################
960 # GObject introspection
961 ##################################################
963 GOBJECT_INTROSPECTION_CHECK([0.9.3])
965 ##################################################
966 # Checks for gtk-doc and docbook-tools
967 ##################################################
969 GTK_DOC_CHECK([1.11], [--flavour=no-tmpl])
971 AC_CHECK_PROG(DB2HTML, db2html, true, false)
972 AM_CONDITIONAL(HAVE_DOCBOOK, $DB2HTML)
975 [AC_HELP_STRING([--enable-man],
976 [regenerate man pages from Docbook [default=no]])],enable_man=yes,
979 if test "${enable_man}" != no; then
981 dnl Check for xsltproc
983 AC_PATH_PROG([XSLTPROC], [xsltproc])
984 if test -z "$XSLTPROC"; then
989 AM_CONDITIONAL(ENABLE_MAN, test x$enable_man != xno)
992 ##################################################
993 # Check for -Bsymbolic-functions linker flag used
994 # to avoid intra-library PLT jumps, if available.
995 ##################################################
997 AC_ARG_ENABLE(Bsymbolic,
998 [AC_HELP_STRING([--disable-Bsymbolic],
999 [avoid linking with -Bsymbolic])],,
1000 [SAVED_LDFLAGS="${LDFLAGS}"
1001 AC_MSG_CHECKING([for -Bsymbolic-functions linker flag])
1002 LDFLAGS=-Wl,-Bsymbolic-functions
1003 AC_TRY_LINK([], [int main (void) { return 0; }],
1005 enable_Bsymbolic=yes,
1007 enable_Bsymbolic=no)
1008 LDFLAGS="${SAVED_LDFLAGS}"])
1010 if test "x${enable_Bsymbolic}" = "xyes"; then
1011 GDK_PIXBUF_LINK_FLAGS=-Wl,-Bsymbolic-functions
1014 AC_SUBST(GDK_PIXBUF_LINK_FLAGS)
1017 ##################################################
1019 ##################################################
1024 gdk-pixbuf-2.0-uninstalled.pc
1026 gdk-pixbuf/gdk_pixbuf.rc
1027 gdk-pixbuf/gdk-pixbuf-features.h
1028 gdk-pixbuf/pixops/Makefile
1030 build/win32/Makefile
1031 build/win32/vs9/Makefile
1032 build/win32/vs10/Makefile
1034 docs/reference/Makefile
1035 docs/reference/gdk-pixbuf/Makefile
1036 docs/reference/gdk-pixbuf/version.xml
1040 contrib/gdk-pixbuf-xlib/Makefile
1041 contrib/gdk-pixbuf-xlib/gdk-pixbuf-xlib-2.0.pc