Project

Profile

Help

Maintenance: Planio will be observing a scheduled maintenance window this Sunday, November 10, 2024 from 20:00 UTC until 21:00 UTC to perform important network maintenance in our primary data center. Your Planio account will be unavailable for a few minutes during this maintenance window.

Support #1962

closed

Saxon/C and pkg-config

Added by O'Neil Delpratt almost 11 years ago. Updated 5 months ago.

Status:
Closed
Priority:
Normal
Category:
-
Start date:
2013-12-16
Due date:
% Done:

0%

Estimated time:
Applies to branch:
Fix Committed on Branch:
Fixed in Maintenance Release:
Found in version:
SaxonC Languages:
SaxonC Platforms:
SaxonC Architecture:

Description

Reported by Tony Graham:

From the 'pkg-config' page at [1]:

pkg-config is a helper tool used when compiling applications

and libraries.

See also "Guide to pkg-config" at [2].

If Saxon/C is to play nicely with other Linux, etc., packages, you may

want to look at producing a 'pkg-config' file to make it easier for people

building the other packages -- particularly but not limited to people

building using Autotools -- to find how to refer to Saxon/C when compiling

and linking.

Here's what I've been faking as 'saxon-c.pc':


prefix=/usr/local/src/saxon-c/Saxonica/Saxon-HEC0.1
exec_prefix=${prefix}
libdir=${exec_prefix}
pkgincludedir=${prefix}/Saxon-C-API


Name: Saxon/C
Description: Saxon/C
Version: 0.1
Libs: -L${libdir} -lsaxon
Cflags: -I${pkgincludedir} -I/usr/lib/jvm/java-6-openjdk-amd64/include

and here's what I've put in 'configure.ac' for xmlroff:


#
# Checks for Saxon/C
#
SAXON_C_PACKAGES=saxon-c
SAXON_C_REQUIRED_VERSION=0.1

AH_TEMPLATE([ENABLE_SAXON_C],
	    [Enable support for Saxon/C XSLT 2.0 processor.])

AC_ARG_ENABLE(saxon_c,
	      AC_HELP_STRING([--enable-saxon-c],
			     [build Saxon/C XSLT processor capability (default=yes)]),
	      enable_saxon_c_arg="$enableval",
              enable_saxon_c_arg=yes)

if test "x$enable_saxon_c_arg" != "xyes" ; then
  enable_saxon_c_arg=no
fi

enable_saxon_c=false
SAXON_C_REQUIRES=""

have_saxon_c=false

if test "x$enable_saxon_c_arg" = "xyes" ; then
  #
  # Check for Saxon/C support requirement
  #
  have_saxon_c=false

  PKG_CHECK_MODULES(SAXON_C,
		    $SAXON_C_PACKAGES >= $SAXON_C_REQUIRED_VERSION,
		    have_saxon_c=true,
		    

  if $have_saxon_c; then
    enable_saxon_c=true

    AC_DEFINE(ENABLE_SAXON_C,1)
  else
    AC_DEFINE(ENABLE_SAXON_C,0)
    SAXON_C_LIBS=""
    SAXON_C_CFLAGS=""
  fi
fi

AC_SUBST(SAXON_C_ENABLED, [$enable_saxon_c])
AC_SUBST(SAXON_C_REQUIRES)
AC_SUBST(SAXON_C_LIBS)
AC_SUBST(SAXON_C_CFLAGS)
AC_SUBST(ENABLE_SAXON_C, [$enable_saxon_c])
AM_CONDITIONAL(ENABLE_SAXON_C, [$enable_saxon_c])

Tony Graham

Consultant http://www.mentea.net

Mentea 13 Kelly's Bay Beach, Skerries, Co. Dublin, Ireland


XML, XSL-FO and XSLT consulting, training and programming

   Chair, Print and Page Layout Community Group @ W3C

[1] http://www.freedesktop.org/wiki/Software/pkg-config/

[2] http://people.freedesktop.org/~dbn/pkg-config-guide.html

Please register to edit this issue

Also available in: Atom PDF