summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLionel Landwerlin <llandwerlin@gmail.com>2012-05-24 10:54:36 +0100
committerLionel Landwerlin <llandwerlin@gmail.com>2012-08-20 14:45:21 +0100
commitcf4dc4cabdeffbc32a6e2216a099e1e3039d9d9c (patch)
tree66879dd3719640469a9229eb11668ee407830061
parenta73d0a7f28a384a84efe54037ae279b4e6704037 (diff)
downloadgdk-pixbuf-cf4dc4cabdeffbc32a6e2216a099e1e3039d9d9c.tar.gz
configure: add an option to deactivate gio sniffing
At the moment gio sniffing support is detected at configure time by compiling a piece of C code and running it. This obviously can't work when cross compiling. This patch adds an option to force gio sniffing enabling/disabling at configure time but still keeps the previous behavior when no hint is given. https://bugzilla.gnome.org/show_bug.cgi?id=676726
-rw-r--r--configure.ac14
1 files changed, 13 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 00d977f59..73f5bf1cf 100644
--- a/configure.ac
+++ b/configure.ac
@@ -95,6 +95,11 @@ PKG_PROG_PKG_CONFIG
AC_CANONICAL_HOST
+AC_ARG_ENABLE(gio-sniffing,
+ [AC_HELP_STRING([--enable-gio-sniffing=@<:@no/yes/auto@:>@],
+ [enable or disable gio sniffing [default=auto]])],,
+ [enable_gio_sniffing=auto])
+
MATH_LIB=-lm
AC_MSG_CHECKING([for native Win32])
LIB_EXE_MACHINE_FLAG=X86
@@ -746,7 +751,7 @@ AM_CONDITIONAL(INCLUDE_QTIF, [test x"$INCLUDE_qtif" = xyes])
# check one of the variables here
AM_CONDITIONAL(INCLUDE_GDIPLUS, [test x"$INCLUDE_gdip_ico" = xyes])
-if test x$gio_can_sniff = x; then
+if test x$enable_gio_sniffing = xauto && test x$gio_can_sniff = x; then
AC_MSG_CHECKING([if gio can sniff png])
gtk_save_LIBS="$LIBS"
gtk_save_CFLAGS="$CFLAGS"
@@ -788,6 +793,13 @@ if test x$gio_can_sniff = x; then
AC_MSG_RESULT($gio_can_sniff)
LIBS="$gtk_save_LIBS"
CFLAGS="$gtk_save_CFLAGS"
+else
+ if test x$enable_gio_sniffing = xyes; then
+ gio_can_sniff=yes
+ AC_DEFINE(GDK_PIXBUF_USE_GIO_MIME, 1, [Define if gio can sniff image data])
+ else
+ gio_can_sniff=no
+ fi
fi
AM_CONDITIONAL(HAVE_TIFF, test "x$LIBTIFF" != x)