diff options
author | Tor Lillqvist <tml@novell.com> | 2008-03-20 23:24:45 +0000 |
---|---|---|
committer | Tor Lillqvist <tml@src.gnome.org> | 2008-03-20 23:24:45 +0000 |
commit | 6d15bbbe1da2a30a2bf4b519cd03bf3bc80ccfaf (patch) | |
tree | 7f865e3e03fc46190ca21516069defda81150860 /configure.in | |
parent | 84fa2c6194c90ddaa05c353ab75fe89750f47677 (diff) | |
download | gtk+-6d15bbbe1da2a30a2bf4b519cd03bf3bc80ccfaf.tar.gz |
Import the GDI+ gdk-pixbuf loaders for Windows by Dominic Lachowicz and
2008-03-21 Tor Lillqvist <tml@novell.com>
Import the GDI+ gdk-pixbuf loaders for Windows by Dominic
Lachowicz and Alberto Ruiz into the GTK+ tree, from the
gdip-pixbuf-loader module.
* configure.in: Add switch --disable-gdiplus-loaders that disables
building of the GDI+ loaders.
When including loaders in the gdk-pixbuf library, either build in
abll the GDI+ ones or none of them. Use just -DINCLUDE_gdiplus in
$INCLUDED_LOADER_DEFINE to signal building them in.
Add Automake conditionals BUILD_GDIPLUS_LOADERS to indicate
whether the GDI+ loaders should be built and INCLUDE_GDIPLUS to
indicate whether they should be built-in.
For the rest of the changes, see gdk-pixbuf/ChangeLog.
In gdk-pixbuf:
* Makefile.am: Add the bits and pieces for the GDI+ loaders. When
building GDI+ loaders don't build the traditional ones for the
same formats. Always build the traditional PNG loader, though, as
it isn't possible to read and write PNG tEXt chunks through GDI+,
and GIMP at least needs that functionality in the gdk-pixbuf PNG
loader.
Either build all the GDI+ loaders (except the PNG one) into
libgdk-pixbuf, or build them all as DLLs. I don't see any reason
to enable cherry-picking among them whether to build in or not.
* io-gdip-animation.c
* io-gdip-animation.h
* io-gdip-bmp.c
* io-gdip-emf.c
* io-gdip-gif.c
* io-gdip-ico.c
* io-gdip-jpeg.c
* io-gdip-native.h
* io-gdip-png.c
* io-gdip-propertytags.h
* io-gdip-tiff.c
* io-gdip-utils.c
* io-gdip-utils.h
* io-gdip-wmf.c: New files. Note that io-gdip-png.c is not
currently used.
* gdk-pixbuf-io.c: Add the bits and pieces for built-in GDI+
loaders.
svn path=/trunk/; revision=19914
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 47 |
1 files changed, 43 insertions, 4 deletions
diff --git a/configure.in b/configure.in index 106fe15cf2..45eb392bea 100644 --- a/configure.in +++ b/configure.in @@ -783,7 +783,14 @@ AC_ARG_WITH(libjasper, [AC_HELP_STRING([--without-libjasper], [disable JPEG2000 loader for gdk-pixbuf])]) +AC_ARG_ENABLE(gdiplus, + [AC_HELP_STRING([--disable-gdiplus-loaders], + [disable GDI+ loaders for gdk-pixbuf])]) + +AM_CONDITIONAL(BUILD_GDIPLUS_LOADERS, [ test x$os_win32 = xyes && test x$enable_gdiplus != xno ]) + dnl Test for libtiff +if test x$os_win32 = xno || test x$enable_gdiplus = xno; then if test x$with_libtiff != xno && test -z "$LIBTIFF"; then AC_CHECK_LIB(tiff, TIFFReadRGBAImageOriented, [AC_CHECK_HEADER(tiffio.h, @@ -806,8 +813,10 @@ dnl Test for libtiff *** --without-libtiff to configure but some programs using GTK+ may *** not work properly]) fi +fi dnl Test for libjpeg +if test x$os_win32 = xno || test x$enable_gdiplus = xno; then if test x$with_libjpeg != xno && test -z "$LIBJPEG"; then AC_CHECK_LIB(jpeg, jpeg_destroy_decompress, jpeg_ok=yes, @@ -842,6 +851,7 @@ dnl Test for libjpeg *** --without-libjpeg to configure but some programs using GTK+ may *** not work properly]) fi +fi dnl Test for libpng if test x$with_libpng != xno && test -z "$LIBPNG"; then @@ -924,10 +934,23 @@ else fi fi -all_loaders="png,bmp,wbmp,gif,ico,ani,jpeg,pnm,ras,tiff,xpm,xbm,tga,pcx,icns" +# Use the traditional png loader instead of the GDI+ one on Windows, +# because some important apps like GIMP need to read and write +# arbitrary tEXt chunks which doesn't seem to be possible through GDI+ + +all_loaders="ani,icns,pcx,ras,tga,png,pnm,wbmp,xbm,xpm" if test x$with_libjasper != xno; then all_loaders="$all_loaders,jasper" fi +if test x$os_win32 = xyes && test x$enable_gdiplus != xno; then + # Skip PNG, see comment above + gdip_formats="bmp emf gif ico jpeg tiff wmf" + for f in $gdip_formats; do + all_loaders="$all_loaders,gdip-$f" + done +else + all_loaders="$all_loaders,bmp,gif,ico,jpeg,tiff" +fi included_loaders="" # If no loaders specified, include all if test "x$with_included_loaders" = xyes ; then @@ -949,10 +972,23 @@ for loader in $included_loaders; do AC_MSG_ERROR([the specified loader $loader does not exist]) fi + loader_underscores=`echo $loader | sed -e 's/-/_/g'` INCLUDED_LOADER_OBJ="$INCLUDED_LOADER_OBJ libstatic-pixbufloader-$loader.la" - INCLUDED_LOADER_DEFINE="$INCLUDED_LOADER_DEFINE -DINCLUDE_$loader" - eval INCLUDE_$loader=yes + + # Don't bother defining separate -DINCLUDE_gdip_foo for each gdip-foo loader + case $loader in + gdip-*) ;; + *) INCLUDED_LOADER_DEFINE="$INCLUDED_LOADER_DEFINE -DINCLUDE_$loader_underscores";; + esac + eval INCLUDE_$loader_underscores=yes done + +# Just define one -DINCLUDE_gdiplus for all the gdip-foo loaders +# (except gdip-png, which isn't built at all) +if test x"$INCLUDE_gdip_ico" = xyes; then + INCLUDED_LOADER_DEFINE="$INCLUDED_LOADER_DEFINE -DINCLUDE_gdiplus" +fi + IFS="$gtk_save_ifs" AC_SUBST(INCLUDED_LOADER_OBJ) AC_SUBST(INCLUDED_LOADER_DEFINE) @@ -973,6 +1009,9 @@ AM_CONDITIONAL(INCLUDE_TGA, [test x"$INCLUDE_tga" = xyes]) AM_CONDITIONAL(INCLUDE_PCX, [test x"$INCLUDE_pcx" = xyes]) AM_CONDITIONAL(INCLUDE_ICNS, [test x"$INCLUDE_icns" = xyes]) AM_CONDITIONAL(INCLUDE_JASPER, [test x"$INCLUDE_jasper" = xyes]) +# As all GDI+ loaders are either built-in or not, arbitrarily just +# check one of the variables here +AM_CONDITIONAL(INCLUDE_GDIPLUS, [test x"$INCLUDE_gdip_ico" = xyes]) # # Allow building some or all immodules included @@ -1147,7 +1186,7 @@ fi AM_CONDITIONAL(USE_MMX, test x$use_mmx_asm = xyes) REBUILD_PNGS= -if test -z "$LIBPNG"; then +if test -z "$LIBPNG" && test x"$os_win32" = xno -o x$enable_gdiplus = xno; then REBUILD_PNGS=# fi |