5 exec_prefix="@exec_prefix@"
7 package_libdir="@libdir@"
12 Usage: $package-config [OPTION]...
14 Known values for OPTION are:
16 --prefix=DIR change XMLSEC prefix
17 --exec-prefix=DIR change XMLSEC executable prefix
18 --libs print library linking information
19 --cflags print pre-processor and compiler flags
20 --crypto print the default crypto library name
21 --help display this help and exit
22 --version output version information
23 --crypto=LIB configure with XMLSEC crypto library (one of the
24 following: none default openssl gnutls nss)
32 # first parse command line aruments
41 if [ "z@XMLSEC_NO_CRYPTO_DYNAMIC_LOADING@" = "z1" ] ;
51 -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
62 if [ $exec_prefix_set = no ]
111 # Get LibXML2 settings
113 the_xml_flags="`@LIBXML_CONFIG@ --cflags`"
114 the_xml_libs="`@LIBXML_CONFIG@ --libs`"
117 # Get LibXSLT settings
121 if test "@XMLSEC_NO_LIBXSLT@" = "0"; then
122 the_xslt_flags="`@LIBXSLT_CONFIG@ --cflags`"
123 the_xslt_libs="`@LIBXSLT_CONFIG@ --libs`"
127 # Get crypto library settings
131 the_xmlsec_crypto_lib=""
134 # no crypto, just the core xmlsec engine (useful when more
135 # than one crypto engine i sused by application)
136 if [ "z@XMLSEC_NO_CRYPTO_DYNAMIC_LOADING@" != "z1" ] ;
138 the_crypto_flags="-DXMLSEC_CRYPTO_DYNAMIC_LOADING=1 -DXMLSEC_CRYPTO=\\\"@XMLSEC_CRYPTO@\\\""
143 the_crypto_flags="@XMLSEC_CRYPTO_CFLAGS@ -DXMLSEC_CRYPTO=\\\"@XMLSEC_CRYPTO@\\\""
144 the_crypto_libs="@XMLSEC_CRYPTO_LIBS@"
145 the_xmlsec_crypto_lib="-l@XMLSEC_CRYPTO_LIB@"
149 if test "@XMLSEC_NO_OPENSSL@" = "0"; then
150 the_crypto_flags="@OPENSSL_CFLAGS@ -DXMLSEC_CRYPTO=\\\"openssl\\\""
151 the_crypto_libs="@OPENSSL_LIBS@"
152 the_xmlsec_crypto_lib="-l@OPENSSL_CRYPTO_LIB@"
154 echo "Error: the \"$crypto\" cryptographic library is not supported"
160 if test "@XMLSEC_NO_GNUTLS@" = "0"; then
161 the_crypto_flags="@GNUTLS_CFLAGS@ -DXMLSEC_CRYPTO=\\\"gnutls\\\""
162 the_crypto_libs="@GNUTLS_LIBS@"
163 the_xmlsec_crypto_lib="-l@GNUTLS_CRYPTO_LIB@"
165 echo "Error: the \"$crypto\" cryptographic library is not supported"
171 if test "@XMLSEC_NO_NSS@" = "0"; then
172 the_crypto_flags="@NSS_CFLAGS@ -DXMLSEC_CRYPTO=\\\"nss\\\""
173 the_crypto_libs="@NSS_LIBS@"
174 the_xmlsec_crypto_lib="-l@NSS_CRYPTO_LIB@"
176 echo "Error: the \"$crypto\" cryptographic library is not supported"
182 echo "Error: the \"$crypto\" cryptographic library is not supported"
189 # Assemble all the settings together
191 the_flags="$the_flags @XMLSEC_CORE_CFLAGS@ $the_xml_flags $the_xslt_flags $the_crypto_flags"
192 the_libs="$the_libs -L${package_libdir} @XMLSEC_CORE_LIBS@ $the_xmlsec_crypto_lib -lxmlsec1 $the_xml_libs $the_xslt_libs $the_crypto_libs"
195 all_flags="$the_flags"
199 all_flags="$all_flags $services $the_libs"
202 if test -z "$all_flags" || test "x$all_flags" = "x "; then
206 # Straight out any possible duplicates, but be careful to
207 # get `-lfoo -lbar -lbaz' for `-lfoo -lbaz -lbar -lbaz'
210 for i in $all_flags; do
212 # a library, save it for later, in reverse order
213 -l*) rev_libs="$i $rev_libs" ;;
215 case " $other_flags " in
216 *\ $i\ *) ;; # already there
217 *) other_flags="$other_flags $i" ;; # add it to output
223 for i in $rev_libs; do
224 case " $ord_libs " in
225 *\ $i\ *) ;; # already there
226 *) ord_libs="$i $ord_libs" ;; # add it to output in reverse order
230 echo $other_flags $ord_libs