changeset 109960:16358be4a799

Fix configure checks * configure.in: Fix check for librsvg, imagemagick and MagickExportImagePixels.
author Andreas Schwab <schwab@linux-m68k.org>
date Mon, 23 Aug 2010 14:54:09 +0200
parents 43db1ab5d28c
children 25b9c8c975be
files ChangeLog configure configure.in
diffstat 3 files changed, 40 insertions(+), 40 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Mon Aug 23 12:28:12 2010 +0200
+++ b/ChangeLog	Mon Aug 23 14:54:09 2010 +0200
@@ -1,3 +1,8 @@
+2010-08-23  Andreas Schwab  <schwab@linux-m68k.org>
+
+	* configure.in: Fix check for librsvg, imagemagick and
+	MagickExportImagePixels.
+
 2010-08-18  Joakim Verona  <joakim@verona.se>
 
 	* Makefile.in, configure.in: Checks for ImageMagick.
--- a/configure	Mon Aug 23 12:28:12 2010 +0200
+++ b/configure	Mon Aug 23 14:54:09 2010 +0200
@@ -2442,7 +2442,6 @@
 as_fn_append ac_header_list " stdlib.h"
 as_fn_append ac_header_list " unistd.h"
 as_fn_append ac_header_list " sys/param.h"
-as_fn_append ac_func_list " MagickExportImagePixels"
 as_fn_append ac_header_list " sys/time.h"
 as_fn_append ac_func_list " alarm"
 # Check that the precious variables saved in the cache have kept the same
@@ -8597,7 +8596,7 @@
   fi
 
   if test $succeeded = yes; then
-     :
+     HAVE_RSVG=yes
   else
      :
   fi
@@ -8605,8 +8604,7 @@
 
 
 
-    if test ".${RSVG_CFLAGS}" != "."; then
-      HAVE_RSVG=yes
+    if test $HAVE_RSVG = yes; then
 
 $as_echo "#define HAVE_RSVG 1" >>confdefs.h
 
@@ -8708,7 +8706,7 @@
   fi
 
   if test $succeeded = yes; then
-     :
+     HAVE_IMAGEMAGICK=yes
   else
      :
   fi
@@ -8716,38 +8714,24 @@
 
 
 
-  if test ".${IMAGEMAGICK_CFLAGS}" != "."; then
-    HAVE_IMAGEMAGICK=yes
+  if test $HAVE_IMAGEMAGICK = yes; then
 
 $as_echo "#define HAVE_IMAGEMAGICK 1" >>confdefs.h
 
     CFLAGS="$CFLAGS $IMAGEMAGICK_CFLAGS"
     LIBS="$IMAGEMAGICK_LIBS $LIBS"
-  fi
-
-
-$as_echo "#define HAVE_MAGICKEXPORTIMAGEPIXELS 0" >>confdefs.h
-
-
-
-
-  for ac_func in $ac_func_list
+    for ac_func in MagickExportImagePixels
 do :
-  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-eval as_val=\$$as_ac_var
-   if test "x$as_val" = x""yes; then :
+  ac_fn_c_check_func "$LINENO" "MagickExportImagePixels" "ac_cv_func_MagickExportImagePixels"
+if test "x$ac_cv_func_MagickExportImagePixels" = x""yes; then :
   cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
-
-
-
-
+#define HAVE_MAGICKEXPORTIMAGEPIXELS 1
+_ACEOF
+
+fi
+done
+
+  fi
 fi
 
 
@@ -11624,6 +11608,22 @@
 
 
 
+  for ac_func in $ac_func_list
+do :
+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+eval as_val=\$$as_ac_var
+   if test "x$as_val" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+
+
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mktime" >&5
 $as_echo_n "checking for working mktime... " >&6; }
--- a/configure.in	Mon Aug 23 12:28:12 2010 +0200
+++ b/configure.in	Mon Aug 23 14:54:09 2010 +0200
@@ -1825,12 +1825,11 @@
     RSVG_REQUIRED=2.11.0
     RSVG_MODULE="librsvg-2.0 >= $RSVG_REQUIRED"
 
-    PKG_CHECK_MODULES(RSVG, $RSVG_MODULE, :, :)
+    PKG_CHECK_MODULES(RSVG, $RSVG_MODULE, HAVE_RSVG=yes, :)
     AC_SUBST(RSVG_CFLAGS)
     AC_SUBST(RSVG_LIBS)
 
-    if test ".${RSVG_CFLAGS}" != "."; then
-      HAVE_RSVG=yes
+    if test $HAVE_RSVG = yes; then
       AC_DEFINE(HAVE_RSVG, 1, [Define to 1 if using librsvg.])
       CFLAGS="$CFLAGS $RSVG_CFLAGS"
       LIBS="$RSVG_LIBS $LIBS"
@@ -1841,20 +1840,16 @@
 HAVE_IMAGEMAGICK=no
 if test "${with_imagemagick}" != "no"; then
   IMAGEMAGICK_MODULE="Wand"
-  PKG_CHECK_MODULES(IMAGEMAGICK, $IMAGEMAGICK_MODULE, :, :)
+  PKG_CHECK_MODULES(IMAGEMAGICK, $IMAGEMAGICK_MODULE, HAVE_IMAGEMAGICK=yes, :)
   AC_SUBST(IMAGEMAGICK_CFLAGS)
   AC_SUBST(IMAGEMAGICK_LIBS)
 
-  if test ".${IMAGEMAGICK_CFLAGS}" != "."; then
-    HAVE_IMAGEMAGICK=yes
+  if test $HAVE_IMAGEMAGICK = yes; then
     AC_DEFINE(HAVE_IMAGEMAGICK, 1, [Define to 1 if using imagemagick.])
     CFLAGS="$CFLAGS $IMAGEMAGICK_CFLAGS"
     LIBS="$IMAGEMAGICK_LIBS $LIBS"
+    AC_CHECK_FUNCS(MagickExportImagePixels)
   fi
-
-  AC_DEFINE(HAVE_MAGICKEXPORTIMAGEPIXELS, 0, [Define to 1 if MagickExportImagePixels is defined.])
-  AC_CHECK_FUNCS_ONCE(MagickExportImagePixels)
-  
 fi