[xmlsec] --with-libxml-src break pkg-config tests

Roumen Petrov xmlsec at roumenpetrov.info
Sat Apr 24 02:33:38 PDT 2010


Hi all,

First lets see configure script:
===============
...
AC_ARG_ENABLE(pkgconfig,   [  --enable-pkgconfig  ...
if test "z$enable_pkgconfig" = "zno" ; then
    ...PKG_CONFIG_ENABLED=no
fi
...
AC_ARG_WITH(libxml-src, ...
if test "z$with_libxml" = "zno" -o "z$with_libxml_src" = "zno"; then
     ...
elif test "z$with_libxml_src" != "z" ; then
    ...
elif test "z$with_libxml" = "z" -a "z$PKG_CONFIG_ENABLED" = "zyes" ; then
     PKG_CHECK_MODULES(LIBXML,.....
fi
...
===============
My version of pkg-config in 0.23 and in this version macro 
PKG_CHECK_MODULES require PKG_PROG_PKG_CONFIG.
The macro PKG_PROG_PKG_CONFIG check for pkg-config tool and set variable 
PKG_CONFIG.

The issue is that macros are expended in last elif block and if one of 
test (conditions ) before succeed code from PKG_PROG_PKG_CONFIG is never 
executed so variable PKG_CONFIG left empty.



Work-around is to set PKG_CONFIG on configure command line or as env. 
variable.

One of possible fixes is to rewrite if test "z$enable_pkgconfig" block 
to set PKG_CONFIG variable.

Other is to rewrite block and to add macro PKG_PROG_PKG_CONFIG. I don't 
know which version pkg package add this macro.


Also I'm not sure that line "if ! pkg-config --atleast-pkgconfig-version 
0.9 ; then"
work well on unix shells. This character "!" could be issue for some old 
unix shells as example solaris 8.


Roumen


More information about the xmlsec mailing list