Ref #332: include pdf-view
[geeqie.git] / configure.in
index ed62c1c..da4e7e0 100644 (file)
@@ -540,6 +540,35 @@ AM_CONDITIONAL(HAVE_LUA, [test "x$HAVE_LUA" = xyes])
 AC_SUBST(LUA_CFLAGS)
 AC_SUBST(LUA_LIBS)
 
+#  Pdf support
+# ----------------------------------------------------------------------
+
+if test "x${gtk3}" != "xno"; then
+    AC_ARG_ENABLE([pdf],
+      AC_HELP_STRING([--disable-pdf], [disable pdf support]),
+        [libpdf=$enableval], [libpdf=auto])
+
+    if test "x${libpdf}" != "xno"; then
+      PKG_CHECK_MODULES(PDF, poppler-glib >= 0.62,
+        [
+          HAVE_PDF=yes
+          AC_DEFINE(HAVE_PDF, 1, [define to enable pdf support])
+        ],
+        [
+          HAVE_PDF=no
+          AC_MSG_WARN([$PDF_PKG_ERRORS])
+        ])
+    else
+        HAVE_PDF=disabled
+    fi
+else
+    HAVE_PDF=disabled
+fi
+
+AM_CONDITIONAL(HAVE_PDF, [test "x$HAVE_PDF" = xyes])
+AC_SUBST(PDF_CFLAGS)
+AC_SUBST(PDF_LIBS)
+
 #  Markdown support
 # ----------------------------------------------------------------------
 
@@ -641,6 +670,7 @@ Support:
   Libchamplain-gtk:    $HAVE_LIBCHAMPLAIN_GTK
   Lua:          $HAVE_LUA
   FFmpegthumbnailer:   $HAVE_FFMPEGTHUMBNAILER
+  Pdf:          $HAVE_PDF
 
 Documentation:
   Doxygen:       $DX_DOXYGEN