From 30741871850b08bbd7eaee129e682b824630ff5f Mon Sep 17 00:00:00 2001 From: Peter Breitenlohner Date: Tue, 5 May 2009 11:04:36 +0000 Subject: 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 --- Build/source/m4/kpse-xpdf-flags.m4 | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) (limited to 'Build/source/m4/kpse-xpdf-flags.m4') 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 -- cgit v1.2.3