Rene Engelhard wrote:
Yeah, the question is: how long? Everything nowadays is done by
pkg-config..
Well, obviously at least not on Mac OS X (which includes everything
needed to program against libxml and libxslt, but not pkg-config).
But the .pc files. It IMHO is a bug in apples stuff that they don't ship
pkg-config...
Yep, you are right. (However, this little discrepancy nicely helps with
my problem of keeping MacPorts-based pkg-config for building moz (which
would drag behing non-standard pkg-config information for libxml/xslt)
and Mac-standard libxml/xslt from conflicting.)
the former is not available or does not work). I used a crude patch
to verify this (see below), but I would be happy if somebody with
deeper knowledge of autoconf (Rene?) turned this into a clean patch.
Please don't patch a generated file. Patch configure.in. (and run
autoconf)
Sure. I just wanted to get feedback on the chosen approach (and ideally
somebody willing to turn my crude patch into a good one).
For that, I want to look at a configure.in patch, not at a configure one
:)
Finally managed to sit down and give autoconf a try. I came up with the
below solution (aka hack). Let me know what you think about it.
-Stephan
---8<---
Index: acinclude.m4
===================================================================
RCS file: /cvs/tools/config_office/acinclude.m4,v
retrieving revision 1.2
diff -u -p -r1.2 acinclude.m4
--- acinclude.m4 19 Jul 2006 09:39:28 -0000 1.2
+++ acinclude.m4 31 Jan 2008 21:22:23 -0000
@@ -118,3 +118,21 @@ esac
AC_LANG_POP(C)
]) dnl end AC_DEFUN
+
+dnl PKG_CHECK_MODULES_MACHACK is like PKG_CHECK_MODULES but sneaks in
an extra
+dnl argument between the first and second, denoting a program to call
instead of
+dnl pkg-config on Mac OS X (aka Darwin):
+AC_DEFUN([PKG_CHECK_MODULES_MACHACK],
+[if test "$_os" = "Darwin"; then
+ AC_MSG_CHECKING($1_CFLAGS)
+ $1_CFLAGS=`$2 --cflags`
+ AC_MSG_RESULT($$1_CFLAGS)
+ AC_MSG_CHECKING($1_LIBS)
+ $1_LIBS=`$2 --libs`
+ AC_MSG_RESULT($$1_LIBS)
+ AC_SUBST($1_CFLAGS)
+ AC_SUBST($1_LIBS)
+ else
+ PKG_CHECK_MODULES($1, $3, $4, $5, $6)
+ fi
+])
Index: configure.in
===================================================================
RCS file: /cvs/tools/config_office/configure.in,v
retrieving revision 1.237
diff -u -p -r1.237 configure.in
--- configure.in 12 Dec 2007 15:36:54 -0000 1.237
+++ configure.in 31 Jan 2008 21:22:32 -0000
@@ -3241,7 +3241,7 @@ if test -n "$with_system_libxslt" -o -n
AC_MSG_RESULT([external])
SYSTEM_LIBXSLT=YES
- PKG_CHECK_MODULES( LIBXSLT, libxslt )
+ PKG_CHECK_MODULES_MACHACK(LIBXSLT, xslt-config, libxslt)
dnl Check for xsltproc
AC_PATH_PROG(XSLTPROC, xsltproc, no)
@@ -3266,7 +3266,7 @@ if test -n "$with_system_libxml" -o -n "
test "$with_system_libxml" != "no"; then
AC_MSG_RESULT([external])
SYSTEM_LIBXML=YES
- PKG_CHECK_MODULES( LIBXML, libxml-2.0 >= 2.0 )
+ PKG_CHECK_MODULES_MACHACK(LIBXML, xml2-config, libxml-2.0 >= 2.0)
BUILD_TYPE="$BUILD_TYPE LIBXMLSEC"
else
AC_MSG_RESULT([internal])
---8<---
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]