Code

Adding config option to block use of libpoppler-cairo (for misdetected situtations)
authorjoncruz <joncruz@users.sourceforge.net>
Sat, 20 Oct 2007 08:42:05 +0000 (08:42 +0000)
committerjoncruz <joncruz@users.sourceforge.net>
Sat, 20 Oct 2007 08:42:05 +0000 (08:42 +0000)
configure.ac

index 019fe833ea3139d194c7cfd1ae72caeadba66663..4f86ff8310f07efade0b4bcf1c53f2aabcb679fa 100644 (file)
@@ -465,6 +465,10 @@ dnl ******************************
 dnl Libpoppler checking
 dnl ******************************
 
+AC_ARG_ENABLE(poppler-cairo,
+       AC_HELP_STRING([--enable-poppler-cairo], [Enable libpoppler-cairo for rendering PDF preview]),
+       [enable_poppler_cairo=$enableval], [enable_poppler_cairo=yes])
+
 POPPLER_CFLAGS=""
 PKG_CHECK_MODULES(POPPLER, poppler >= 0.5.9, poppler=yes, poppler=no)
 
@@ -481,13 +485,16 @@ if test "x$poppler" = "xyes"; then
                        POPPLER_LIBS="$POPPLER_LIBS -lpoppler-glib "
                fi
        fi
-       dnl Have to test libpoppler-cairo presence for PDF preview
-       PKG_CHECK_MODULES(POPPLER_CAIRO, poppler-cairo >= 0.5.9, poppler_cairo=yes, poppler_cairo=no)
-       if test "x$poppler_cairo" = "xyes"; then
-               dnl Working libpoppler-cairo found
-               dnl Check whether the Cairo FreeType backend is available
-               PKG_CHECK_MODULES(CAIRO_FT, cairo-ft, cairo_ft=yes, cairo_ft=no)
-       fi                                                                              
+       if test "x$enable_poppler_cairo" = "xyes"; then
+               dnl Have to test libpoppler-cairo presence for PDF preview
+               dnl AC_CHECK_HEADER(Magick++.h, magick_ok=yes, magick_ok=no)
+               PKG_CHECK_MODULES(POPPLER_CAIRO, poppler-cairo >= 0.5.9, poppler_cairo=yes, poppler_cairo=no)
+               if test "x$poppler_cairo" = "xyes"; then
+                       dnl Working libpoppler-cairo found
+                       dnl Check whether the Cairo FreeType backend is available
+                       PKG_CHECK_MODULES(CAIRO_FT, cairo-ft, cairo_ft=yes, cairo_ft=no)
+               fi                                                                              
+       fi
 fi
 
 if test "x$poppler" = "xyes"; then
@@ -929,5 +936,6 @@ Configuration:
         Enable LittleCms:         ${enable_lcms}
         Enable Inkboard:          ${with_inkboard}
         Enable SSL in Inkboard:   ${with_inkboard_ssl}
+        Enable Poppler-Cairo:     ${enable_poppler_cairo}
         ImageMagick Magick++:     ${magick_ok}
 "