[xmlsec] NSS changes corresponding to Roumen's changes
Roumen Petrov
xmlsec@roumenpetrov.info
Wed, 06 Aug 2003 12:33:17 +0300
This is a multi-part message in MIME format.
--------------090401060103000201090908
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Hi Aleksey,
Aleksey Sanin wrote:
> Roumen,
>
> I have some questions about this patch:
>
> 1) Why do you want to use "includedir" / "libdir" instead of
> "pkgincludedir" / "pkglibdir"? I don't have a lot of knowledge
> about pkg-config but the current stuff seems to be working.
> Why do you want to change this?
Please find attached file pkg.sh, save it in xmlsec ${top_builddir} and
run. See output for xmlsec1-nss:
....
-L@pkglibdir@ -lxmlsec1-nss -lxmlsec1 -lxslt -lxml2 -lz -lm
....
No one of scripts configure or config.status contain command to
substitute @pkglibdir@ and @pkgincludedir@.
Other xmlsec1-*.pc files at moment are not affected, but proprosed patch
try to fix future problems.
> 2) You have added some variables to xmlSecConf.sh.in
> but I don't see who these variables are used. Do I miss something?
First configure script was run only with --prefix=/usr option and
without --XXXdir options (especially without --libdir).
just run "sh -x xmlsec1Conf.sh" without quotes and check the output:
+ XMLSEC_LIBDIR=@XMLSEC_LIBDIR@
....
+ XMLSEC_LIBS=-L/lib -lxmlsec1-openssl ....
....
No one of scripts configure or config.status contain command to
substitute @XMLSEC_LIBDIR@.
We have two solutions:
- to define this in configure.{ac|in} as in proposed patch;
- to replease @XMLSEC_LIBDIR@ with @libdir@ in xmlsec1Conf.sh.in.
When xmlsec1Conf.sh.in template contain lines:
=======================================
prefix="@prefix@"
exec_prefix="@exec_prefix@"
libdir="@libdir@"
includedir="@includedir@"
=======================================
output is :
....
+ XMLSEC_LIBS=-L/usr/lib -lxmlsec1-openssl ....
....
Now let we comment exec_prefix in template and after "./config.status"
and "sh -x xmlsec1Conf.sh" output is:
....
+ XMLSEC_LIBS=-L/lib -lxmlsec1-openssl ....
....
differece is -L/lib (incorrect) vs -L/usr/lib (from patch).
> 3) I am not sure I understand your comment about coping file.
> Why do you need to put it in a different place?
Let builddir != srcdir
Command "ln -s $srcdir/Copyright COPYING" will create a link in
builddir, but good (default/standard) plase for file COPYING is
${top_srcdir}.
I'm not sure that configure script should create that link.
$ cd /usr/local/src/.work/.builds/xmlsec1-1.1.0
$ /bin/ls -l COPYING
lrwxrwxrwx .... COPYING ->
/usr/local/src/.work/.sources/xmlsec1-1.1.0/Copyright
When is necessary COPYING to be created my suggestion is (xmlsec with
proposed patch):
$ cd /usr/local/src/.work/.sources/xmlsec1-current
$ /bin/ls -l COPYING
lrwxrwxrwx .... COPYING -> Copyright
File COPYING exist in ${top_srcdir} (check tar archive) and I think that
COPYING should be replaced with a symbolic link (when OS support this)
in same plase.
Proprosed patch contain replacement of "ln -s" with $LN_S. I don't have
problems and I don't have OS without symbolic link support. In that case
I cannot fix a bug :-) I can only suggest a enhancement. May be only in
hypothetic situation when build dir is located in mounted vfat
partition. In that case we can see difference between ln -s and $LN_S ;-).
> Thanks,
> Aleksey
>
> P.S. I guess I have these questions because everything works just
> fine on my system and you have some problems on yours :) It would bee
I think that everything works fine too, but suddenly ... :-)
Realy I don't use xmlsecConf.sh and I don't know how to use.
I don't know why to use "pkg-config ... xmlsec1" to get cflags,libs and
etc. instead of "xmlsec1-config ..." and my system use OpenSSL not NSS.
My filesystem support symbolic links, i.e. ln -s works fine.
> a good idea to describe these problems in a bug thus the patch would
> fix a bug rather than just do something :)
:-) treat proposed patch as enhancement which fix potential problems ;-)
> <SNIP>
--------------090401060103000201090908
Content-Type: text/plain;
name="pkg.sh"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="pkg.sh"
#!/bin/sh
export PKG_CONFIG_PATH=`pwd`
PKG_CONFIG="pkg-config --silence-errors"
PKG_CONFIG="pkg-config"
cat > mozilla-nss.pc <<EOF
Name: mozilla-nss
Version: 1.4
Description: dummy mozilla-nss package
EOF
for MODULE in \
xmlsec1-openssl \
xmlsec1-gnutls \
xmlsec1-nss \
; do
echo "=== ${MODULE} ==="
${PKG_CONFIG} --variable=prefix ${MODULE}
${PKG_CONFIG} --variable=exec_prefix ${MODULE}
${PKG_CONFIG} --variable=libdir ${MODULE}
${PKG_CONFIG} --variable=includedir ${MODULE}
${PKG_CONFIG} --cflags ${MODULE}
${PKG_CONFIG} --libs ${MODULE}
done
rm -f mozilla-nss.pc
--------------090401060103000201090908--