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], [21])
18
m4_define([gdk_pixbuf_micro_version], [7])
19
m4_define([gdk_pixbuf_interface_age], [0])
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.25.9])
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.10 foreign no-define -Wno-portability dist-bzip2])
43
AM_MAINTAINER_MODE([enable])
45
# Support silent build rules, requires at least automake-1.11. Enable
46
# by either passing --enable-silent-rules to configure or passing V=0
48
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([no])])
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
320
AM_GNU_GETTEXT_VERSION([0.17])
321
AM_GNU_GETTEXT([external])
323
GETTEXT_PACKAGE="$PACKAGE"
324
AC_SUBST(GETTEXT_PACKAGE)
325
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE",
326
[The prefix for our gettext translation domains.])
328
dnl The DU4 header files don't provide library prototypes unless
329
dnl -std1 is given to the native cc.
330
AC_MSG_CHECKING([for extra flags to get ANSI library prototypes])
334
AC_TRY_RUN([#include <math.h>
335
int main (void) { return (log(1) != log(1.)); }],
336
AC_MSG_RESULT(none needed),
337
gtk_save_CFLAGS="$CFLAGS"
338
CFLAGS="$CFLAGS -std1"
339
AC_TRY_RUN([#include <math.h>
340
int main (void) { return (log(1) != log(1.)); }],
341
AC_MSG_RESULT(-std1),
343
CFLAGS="$gtk_save_CFLAGS"
345
[No ANSI prototypes found in library. (-std1 didn't work.)]),
348
AC_MSG_RESULT(none needed)
352
AC_MSG_CHECKING(for the BeOS)
367
AC_MSG_CHECKING(for HP-UX)
369
hpux9* | hpux10* | hpux11*)
371
CFLAGS="$CFLAGS -DHPPEX -DSHMLINK"
378
dnl NeXTStep cc seems to need this
379
AC_MSG_CHECKING([for extra flags for POSIX compliance])
380
AC_TRY_COMPILE([#include <dirent.h>], [DIR *dir;],
381
AC_MSG_RESULT(none needed),
382
gtk_save_CFLAGS="$CFLAGS"
383
CFLAGS="$CFLAGS -posix"
384
AC_TRY_COMPILE([#include <dirent.h>], [DIR *dir;],
385
AC_MSG_RESULT(-posix),
387
CFLAGS="$gtk_save_CFLAGS"
388
AC_MSG_WARN([Could not determine POSIX flag. (-posix didn't work.)])))
391
# Run AM_PATH_GLIB_2_0 to make sure that GLib is installed and working
394
GLIB_PACKAGES="gobject-2.0 gio-2.0 gmodule-no-export-2.0"
396
AM_PATH_GLIB_2_0(glib_required_version, :,
398
*** GLIB glib_required_version or better is required. The latest version of
399
*** GLIB is always available from ftp://ftp.gtk.org/pub/gtk/.]),
400
gobject gmodule-no-export gthread)
402
# See if it's safe to turn G_DISABLE_DEPRECATED on.
403
GLIB_VERSION_MAJOR_MINOR=`$PKG_CONFIG --modversion glib-2.0 | sed "s/\.@<:@^.@:>@*\$//"`
404
GLIB_REQUIRED_VERSION_MAJOR_MINOR=`echo glib_required_version | sed "s/\.@<:@^.@:>@*\$//"`
405
if test "x$GLIB_VERSION_MAJOR_MINOR" = "x$GLIB_REQUIRED_VERSION_MAJOR_MINOR"; then
406
CFLAGS="-DG_DISABLE_DEPRECATED $CFLAGS"
409
CFLAGS="-DGDK_PIXBUF_DISABLE_DEPRECATED $CFLAGS"
413
dnl Check for bind_textdomain_codeset, including -lintl if GLib brings it in.
416
LIBS="$LIBS $GLIB_LIBS"
417
AC_CHECK_FUNCS(bind_textdomain_codeset)
420
AC_CHECK_HEADERS(unistd.h,
421
AC_DEFINE(HAVE_UNISTD_H, 1,
422
[Define to 1 if unistd.h is available]))
424
saved_cflags="$CFLAGS"
425
saved_ldflags="$LDFLAGS"
428
# Checks for header files.
431
# Checks for typedefs, structures, and compiler characteristics.
434
##################################################
435
# Checks for gdk-pixbuf
436
##################################################
438
dnl ********************************************************
439
dnl * See whether we need to load our modules as .la files *
440
dnl ********************************************************
444
*-aix*) use_la_modules=true
447
if $use_la_modules ; then
448
AC_DEFINE(USE_LA_MODULES, 1,
449
[Whether to load modules via .la files rather than directly])
453
AC_MSG_CHECKING(whether to build gmodulized gdk-pixbuf)
455
AC_ARG_ENABLE(modules,
456
[AC_HELP_STRING([--disable-modules],
457
[disable dynamic module loading])])
461
if test x$enable_modules = xno; then
465
AC_MSG_CHECKING(whether dynamic modules work)
466
## for loop is to strip newline
467
tmp=`$PKG_CONFIG --variable=gmodule_supported gmodule-no-export-2.0`
472
dnl Now we check to see if our libtool supports shared lib deps
473
dnl (in a rather ugly way even)
475
pixbuf_libtool_config="${CONFIG_SHELL-/bin/sh} ./libtool --config"
476
pixbuf_deplibs_check=`$pixbuf_libtool_config | \
477
grep '^[[a-z_]]*check[[a-z_]]*_method=[['\''"]]' | \
478
sed 's/.*[['\''"]]\(.*\)[['\''"]]$/\1/'`
479
if test "x$pixbuf_deplibs_check" = "xnone" || \
480
test "x$pixbuf_deplibs_check" = "xunknown" || \
481
test "x$pixbuf_deplibs_check" = "x"; then
487
AC_DEFINE(USE_GMODULE, 1,
488
[Define to 1 if gmodule works and should be used])
495
dnl We allow people to disable image loaders explicitely, but if they don't we error
496
dnl out so that people don't accidentally build without them.
499
[AC_HELP_STRING([--without-libpng],
500
[disable PNG loader for gdk-pixbuf])])
502
[AC_HELP_STRING([--without-libjpeg],
503
[disable JPEG loader for gdk-pixbuf])])
505
[AC_HELP_STRING([--without-libtiff],
506
[disable TIFF loader for gdk-pixbuf])])
507
AC_ARG_WITH(libjasper,
508
[AC_HELP_STRING([--with-libjasper],
509
[enable JPEG2000 loader for gdk-pixbuf])])
511
AC_ARG_ENABLE(gdiplus,
512
[AC_HELP_STRING([--enable-gdiplus],
513
[enble GDI+ loaders for gdk-pixbuf (currently known to be broken)])],,
516
AM_CONDITIONAL(BUILD_GDIPLUS_LOADERS, [ test x$os_win32 = xyes && test x$enable_gdiplus != xno ])
519
if test x$os_win32 = xno || test x$enable_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$enable_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 libpng libpng14 libpng12 libpng13 libpng10 ; 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 != xno; then
675
all_loaders="$all_loaders,jasper"
677
if test x$os_win32 = xyes && test x$enable_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
STATIC_LIB_DEPS="$STATIC_LIB_DEPS $LIBPNG"
809
if echo "$included_loaders" | egrep '(^|,)jasper($|,)' > /dev/null; then
810
STATIC_LIB_DEPS="$STATIC_LIB_DEPS $LIBJASPER"
813
STATIC_LIB_DEPS="$LIBTIFF $LIBJPEG $LIBPNG $LIBJASPER"
816
# Checks to see whether we should include mediaLib
819
AC_CHECK_HEADER(sys/systeminfo.h,
820
AC_DEFINE(HAVE_SYS_SYSTEMINFO_H, 1,
821
[Define to 1 if sys/systeminfo.h is available]))
822
AC_CHECK_HEADER(sys/sysinfo.h,
823
AC_DEFINE(HAVE_SYS_SYSINFO_H, 1,
824
[Define to 1 if sys/sysinfo.h is available]))
826
AC_MSG_CHECKING(for mediaLib 2.3)
828
# Check for a mediaLib 2.3 function since that is what the GTK+ mediaLib
830
AC_CHECK_LIB(mlib, mlib_ImageSetStruct, use_mlib=yes, use_mlib=no)
831
if test $use_mlib = yes; then
832
AC_DEFINE(USE_MEDIALIB, 1,
833
[Define to 1 if medialib is available and should be used])
836
AC_MSG_CHECKING(for mediaLib 2.5)
837
# Check for a mediaLib 2.5 function since that is what is needed for
838
# gdk_rgb_convert integration.
839
AC_CHECK_LIB(mlib, mlib_VideoColorRGBint_to_BGRAint, use_mlib25=yes, use_mlib25=no)
840
if test $use_mlib25 = yes; then
841
AC_DEFINE(USE_MEDIALIB25, 1,
842
[Define to 1 if medialib 2.5 is available])
845
AM_CONDITIONAL(USE_MEDIALIB, test $use_mlib = yes)
846
AM_CONDITIONAL(USE_MEDIALIB25, test $use_mlib25 = yes)
848
# Checks to see if we should compile in MMX support (there will be
849
# a runtime test when the code is actually run to see if it should
850
# be used - this just checks if we can compile it.)
852
# This code is partially taken from Mesa
854
AC_MSG_CHECKING(for x86 platform)
856
i386|i486|i586|i686|i786|k6|k7)
862
AC_MSG_RESULT($use_x86_asm)
865
if test $use_x86_asm = yes; then
869
AC_MSG_CHECKING(compiler support for MMX)
870
cp $srcdir/gdk-pixbuf/pixops/scale_line_22_33_mmx.S conftest.S
871
if AC_TRY_EVAL(ac_compile); then
878
if test $use_mmx_asm = yes; then
879
AC_DEFINE(USE_MMX, 1,
880
[Define to 1 if XXM is available and should be used])
887
AM_CONDITIONAL(USE_MMX, test x$use_mmx_asm = xyes)
890
if test -z "$LIBPNG" && test x"$os_win32" = xno -o x$enable_gdiplus = xno; then
894
dnl Look for a host system's gdk-pixbuf-csource if we are cross-compiling
896
AM_CONDITIONAL(CROSS_COMPILING, test $cross_compiling = yes)
898
if test $cross_compiling = yes; then
899
AC_PATH_PROG(GDK_PIXBUF_CSOURCE, gdk-pixbuf-csource, no)
900
AC_PATH_PROG(GTK_UPDATE_ICON_CACHE, gtk-update-icon-cache, no)
901
if test x$GTK_UPDATE_ICON_CACHE = xno; then
906
GDK_PIXBUF_PACKAGES="gmodule-no-export-2.0 gobject-2.0 gio-2.0"
907
GDK_PIXBUF_EXTRA_LIBS="$STATIC_LIB_DEPS $MATH_LIB $MEDIA_LIB"
908
GDK_PIXBUF_EXTRA_CFLAGS=
909
GDK_PIXBUF_DEP_LIBS="`$PKG_CONFIG --libs $GDK_PIXBUF_PACKAGES` $GDK_PIXBUF_EXTRA_LIBS"
910
GDK_PIXBUF_DEP_CFLAGS="`$PKG_CONFIG --cflags gthread-2.0 $GDK_PIXBUF_PACKAGES $PNG_DEP_CFLAGS_PACKAGES` $GDK_PIXBUF_EXTRA_CFLAGS"
912
AC_SUBST(PNG_DEP_CFLAGS_PACKAGES)
913
AC_SUBST(GDK_PIXBUF_PACKAGES)
914
AC_SUBST(GDK_PIXBUF_EXTRA_LIBS)
915
AC_SUBST(GDK_PIXBUF_EXTRA_CFLAGS)
916
AC_SUBST(GDK_PIXBUF_DEP_LIBS)
917
AC_SUBST(GDK_PIXBUF_DEP_CFLAGS)
923
GDK_PIXBUF_XLIB_PACKAGES=
924
GDK_PIXBUF_XLIB_EXTRA_CFLAGS=
925
GDK_PIXBUF_XLIB_EXTRA_LIBS=
927
if $PKG_CONFIG --exists x11; then
928
AM_CONDITIONAL(USE_X11, true)
929
PKG_CHECK_MODULES(GDK_PIXBUF_XLIB_DEP, x11 gobject-2.0)
931
AM_CONDITIONAL(USE_X11, false)
934
################################################################
935
# Strip -export-dynamic from the link lines of various libraries
936
################################################################
939
# pkg-config --libs gmodule includes the "export_dynamic" flag,
940
# but this flag is only meaningful for executables. For libraries
941
# the effect is undefined; what it causes on Linux is that the
942
# export list from -export-symbols-regex is ignored and everything
945
# We are using gmodule-no-export now, but I'm leaving the stripping
946
# code in place for now, since pango and atk still require gmodule.
948
export_dynamic=`(./libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh`
949
if test -n "$export_dynamic"; then
950
GDK_PIXBUF_DEP_LIBS=`echo $GDK_PIXBUF_DEP_LIBS | sed -e "s/$export_dynamic//"`
953
##################################################
954
# GObject introspection
955
##################################################
957
GOBJECT_INTROSPECTION_CHECK([0.9.5])
959
##################################################
960
# Checks for gtk-doc and docbook-tools
961
##################################################
963
GTK_DOC_CHECK([1.11])
965
AC_CHECK_PROG(DB2HTML, db2html, true, false)
966
AM_CONDITIONAL(HAVE_DOCBOOK, $DB2HTML)
969
[AC_HELP_STRING([--enable-man],
970
[regenerate man pages from Docbook [default=no]])],enable_man=yes,
973
if test "${enable_man}" != no; then
975
dnl Check for xsltproc
977
AC_PATH_PROG([XSLTPROC], [xsltproc])
978
if test -z "$XSLTPROC"; then
983
AM_CONDITIONAL(ENABLE_MAN, test x$enable_man != xno)
986
##################################################
987
# Check for -Bsymbolic-functions linker flag used
988
# to avoid intra-library PLT jumps, if available.
989
##################################################
991
AC_ARG_ENABLE(Bsymbolic,
992
[AC_HELP_STRING([--disable-Bsymbolic],
993
[avoid linking with -Bsymbolic])],,
994
[SAVED_LDFLAGS="${LDFLAGS}"
995
AC_MSG_CHECKING([for -Bsymbolic-functions linker flag])
996
LDFLAGS=-Wl,-Bsymbolic-functions
997
AC_TRY_LINK([], [int main (void) { return 0; }],
999
enable_Bsymbolic=yes,
1001
enable_Bsymbolic=no)
1002
LDFLAGS="${SAVED_LDFLAGS}"])
1004
if test "x${enable_Bsymbolic}" == "xyes"; then
1005
GDK_PIXBUF_LINK_FLAGS=-Wl,-Bsymbolic-functions
1008
AC_SUBST(GDK_PIXBUF_LINK_FLAGS)
1011
##################################################
1013
##################################################
1018
gdk-pixbuf-2.0-uninstalled.pc
1020
gdk-pixbuf/gdk_pixbuf.rc
1021
gdk-pixbuf/gdk-pixbuf-features.h
1022
gdk-pixbuf/pixops/Makefile
1024
docs/reference/Makefile
1025
docs/reference/gdk-pixbuf/Makefile
1026
docs/reference/gdk-pixbuf/version.xml
1030
contrib/gdk-pixbuf-xlib/Makefile
1031
contrib/gdk-pixbuf-xlib/gdk-pixbuf-xlib-2.0.pc