5 exec_prefix="@exec_prefix@"
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
45 if [ "z@XMLSEC_NO_CRYPTO_DYNAMIC_LOADING@" = "z1" ] ;
56 optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'`
70 if [ $exec_prefix_set = no ] ;
103 echo @XMLSEC_DEFAULT_CRYPTO@
128 # Get LibXML2 settings
130 the_xml_flags="`@LIBXML_CONFIG@ --cflags`"
131 the_xml_libs="`@LIBXML_CONFIG@ --libs`"
134 # Get LibXSLT settings
138 if test "@XMLSEC_NO_LIBXSLT@" = "0" ;
140 the_xslt_flags="`@LIBXSLT_CONFIG@ --cflags`"
141 the_xslt_libs="`@LIBXSLT_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 [ "z@XMLSEC_NO_CRYPTO_DYNAMIC_LOADING@" != "z1" ] ;
156 the_crypto_flags="-DXMLSEC_CRYPTO_DYNAMIC_LOADING=1"
161 the_crypto_flags="@XMLSEC_CRYPTO_CFLAGS@"
162 the_crypto_libs="@XMLSEC_CRYPTO_LIBS@"
163 the_xmlsec_crypto_lib="-l@XMLSEC_CRYPTO_LIB@"
167 if test "@XMLSEC_NO_OPENSSL@" = "0" ;
169 the_crypto_flags="@OPENSSL_CFLAGS@"
170 the_crypto_libs="@OPENSSL_LIBS@"
171 the_xmlsec_crypto_lib="-l@OPENSSL_CRYPTO_LIB@"
173 echo "Error: the \"$crypto\" cryptographic library is not supported"
179 if test "@XMLSEC_NO_GNUTLS@" = "0" ;
181 the_crypto_flags="@GNUTLS_CFLAGS@"
182 the_crypto_libs="@GNUTLS_LIBS@"
183 the_xmlsec_crypto_lib="-l@GNUTLS_CRYPTO_LIB@"
185 echo "Error: the \"$crypto\" cryptographic library is not supported"
191 if test "@XMLSEC_NO_GCRYPT@" = "0" ;
193 the_crypto_flags="@GCRYPT_CFLAGS@L"
194 the_crypto_libs="@GCRYPT_LIBS@"
195 the_xmlsec_crypto_lib="-l@GCRYPT_CRYPTO_LIB@"
197 echo "Error: the \"$crypto\" cryptographic library is not supported"
203 if test "@XMLSEC_NO_NSS@" = "0";
205 the_crypto_flags="@NSS_CFLAGS@"
206 the_crypto_libs="@NSS_LIBS@"
207 the_xmlsec_crypto_lib="-l@NSS_CRYPTO_LIB@"
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 @XMLSEC_CORE_CFLAGS@ $the_xml_flags $the_xslt_flags $the_crypto_flags"
225 the_libs="$the_libs -L${libdir} @XMLSEC_CORE_LIBS@ $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