summaryrefslogtreecommitdiff
path: root/Build/source/m4/kpse-xpdf-flags.m4
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2009-05-05 11:04:36 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2009-05-05 11:04:36 +0000
commit30741871850b08bbd7eaee129e682b824630ff5f (patch)
treef82bfd85a7982a69cd68fc0c597bbdac8046a461 /Build/source/m4/kpse-xpdf-flags.m4
parente6a729fda782c90689112b74d016a56eb7cd9c79 (diff)
prepare for system-xpdf, i.e., poppler and fix system-freetype2
git-svn-id: svn://tug.org/texlive/trunk@12934 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/m4/kpse-xpdf-flags.m4')
-rw-r--r--Build/source/m4/kpse-xpdf-flags.m433
1 files changed, 32 insertions, 1 deletions
diff --git a/Build/source/m4/kpse-xpdf-flags.m4 b/Build/source/m4/kpse-xpdf-flags.m4
index 4595ef6ccff..fa3166739c4 100644
--- a/Build/source/m4/kpse-xpdf-flags.m4
+++ b/Build/source/m4/kpse-xpdf-flags.m4
@@ -12,8 +12,39 @@
# Set the make variables XPDF_INCLUDES and XPDF_LIBS to the CPPFLAGS and
# LIBS required for the `-lxpdf' library in libs/xpdf/ of the TL tree.
AC_DEFUN([KPSE_XPDF_FLAGS],
-[_KPSE_LIB_FLAGS([xpdf], [xpdf], [tree],
+[_KPSE_LIB_FLAGS([xpdf], [xpdf], [],
[-DPDF_PARSER_ONLY -IBLD/libs/xpdf -IBLD/libs/xpdf/goo -IBLD/libs/xpdf/fofi -IBLD/libs/xpdf/xpdf],
[BLD/libs/xpdf/libxpdf.a], [],
[], [${top_builddir}/../../libs/xpdf/xpdf/Stream.h])[]dnl
]) # KPSE_XPDF_FLAGS
+
+# KPSE_XPDF_OPTIONS([WITH-SYSTEM])
+# --------------------------------
+AC_DEFUN([KPSE_XPDF_OPTIONS],
+[m4_ifval([$1],
+ [AC_ARG_WITH([system-xpdf],
+ AS_HELP_STRING([--with-system-xpdf],
+ [use installed poppler headers and library instead of xpdf
+ (requires pkg-config)]))])[]dnl
+]) # KPSE_XPDF_OPTIONS
+
+# KPSE_XPDF_SYSTEM_FLAGS
+# ----------------------
+AC_DEFUN([KPSE_XPDF_SYSTEM_FLAGS],
+[AC_REQUIRE([_KPSE_CHECK_PKG_CONFIG])[]dnl
+if $PKG_CONFIG poppler --atleast-version=0.10; then
+ POPPLER_VERSION='-DPOPPLER_VERSION=\"'`$PKG_CONFIG poppler --modversion`'\"'
+ XPDF_INCLUDES=`$PKG_CONFIG poppler --cflags`
+ XPDF_INCLUDES=`echo $XPDF_INCLUDES`
+ XPDF_INCLUDES="$POPPLER_VERSION $XPDF_INCLUDES $XPDF_INCLUDES/goo"
+ XPDF_LIBS=`$PKG_CONFIG poppler --libs`
+fi
+]) # KPSE_XPDF_SYSTEM_FLAGS
+
+# _KPSE_CHECK_PKG_CONFIG
+# ----------------------
+# Check for pkg-config
+AC_DEFUN([_KPSE_CHECK_PKG_CONFIG],
+[AC_REQUIRE([AC_CANONICAL_HOST])[]dnl
+AC_CHECK_TOOL([PKG_CONFIG], [pkg-config], [false])[]dnl
+]) # _KPSE_CHECK_PKG_CONFIG