5 exec_prefix="${prefix}"
7 libdir="${exec_prefix}/lib"
12 Usage: $package-config [OPTION]...
14 Known values for OPTION are:
16 --cflags print pre-processor and compiler flags
17 --libs print library linking information
18 --prefix print the default XMLSEC prefix folder
19 --exec-prefix print the default XMLSEC executable prefix folder
20 --libdir print the default XMLSEC libraries folder
21 --crypto print the default crypto library name
22 --prefix=DIR change XMLSEC prefix folder
23 --exec-prefix=DIR change XMLSEC executable prefix folder
24 --libdir=DIR change XMLSEC libraries folder
25 --crypto=LIB configure with XMLSEC crypto library (one of the
26 following: none default openssl nss gnutls gcrypt)
27 --help display this help and exit
28 --version output version information
36 # first parse command line aruments
56 optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'`
70 if [ $exec_prefix_set = no ] ;
128 # Get LibXML2 settings
130 the_xml_flags="`xml2-config --cflags`"
131 the_xml_libs="`xml2-config --libs`"
134 # Get LibXSLT settings
140 the_xslt_flags="`xslt-config --cflags`"
141 the_xslt_libs="`xslt-config --libs`"
145 # Get crypto library settings
149 the_xmlsec_crypto_lib=""
152 # no crypto, just the core xmlsec engine (useful when more
153 # than one crypto engine i sused by application)
154 if [ "z0" != "z1" ] ;
156 the_crypto_flags="-DXMLSEC_CRYPTO_DYNAMIC_LOADING=1"
161 the_crypto_flags=" -DXMLSEC_OPENSSL_100=1 -DXMLSEC_CRYPTO_OPENSSL=1"
162 the_crypto_libs="-lssl -lcrypto "
163 the_xmlsec_crypto_lib="-lxmlsec1-openssl"
169 the_crypto_flags=" -DXMLSEC_OPENSSL_100=1 -DXMLSEC_CRYPTO_OPENSSL=1"
170 the_crypto_libs="-lssl -lcrypto "
171 the_xmlsec_crypto_lib="-lxmlsec1-openssl"
173 echo "Error: the \"$crypto\" cryptographic library is not supported"
181 the_crypto_flags="-I/usr/include/p11-kit-1 -DXMLSEC_CRYPTO_GNUTLS=1"
182 the_crypto_libs="-lgnutls "
183 the_xmlsec_crypto_lib="-lxmlsec1-gnutls"
185 echo "Error: the \"$crypto\" cryptographic library is not supported"
193 the_crypto_flags=" -DXMLSEC_CRYPTO_GCRYPT=1L"
194 the_crypto_libs=" -lgcrypt"
195 the_xmlsec_crypto_lib="-lxmlsec1-gcrypt"
197 echo "Error: the \"$crypto\" cryptographic library is not supported"
205 the_crypto_flags="-I/usr/include/nspr -I/usr/include/nss -I/usr/include/nspr -DXMLSEC_CRYPTO_NSS=1"
206 the_crypto_libs="-lplds4 -lplc4 -lnspr4 -lnss3 -lnssutil3 -lsmime3 -lssl3 -lplds4 -lplc4 -lnspr4 "
207 the_xmlsec_crypto_lib="-lxmlsec1-nss"
209 echo "Error: the \"$crypto\" cryptographic library is not supported"
215 echo "Error: the \"$crypto\" cryptographic library is not supported"
222 # Assemble all the settings together
224 the_flags="$the_flags -D__XMLSEC_FUNCTION__=__func__ -DXMLSEC_NO_GOST=1 -DXMLSEC_NO_GOST2012=1 -DXMLSEC_DL_LIBLTDL=1 -I${prefix}/include/xmlsec1 $the_xml_flags $the_xslt_flags $the_crypto_flags"
225 the_libs="$the_libs -L${libdir} -lxmlsec1 -lltdl $the_xmlsec_crypto_lib -lxmlsec1 $the_xml_libs $the_xslt_libs $the_crypto_libs"
229 all_flags="$the_flags"
234 all_flags="$all_flags $services $the_libs"
237 if test -z "$all_flags" || test "x$all_flags" = "x " ;
242 # Straight out any possible duplicates, but be careful to
243 # get `-lfoo -lbar -lbaz' for `-lfoo -lbaz -lbar -lbaz'
246 for i in $all_flags; do
248 # a library, save it for later, in reverse order
250 rev_libs="$i $rev_libs"
253 case " $other_flags " in
259 other_flags="$other_flags $i"
267 for i in $rev_libs; do
268 case " $ord_libs " in
273 # add it to output in reverse order
274 ord_libs="$i $ord_libs"
279 echo $other_flags $ord_libs