5 exec_prefix="${prefix}"
7 package_libdir="${exec_prefix}/lib"
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 nss gnutls gcrypt)
32 # first parse command line aruments
51 -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
62 if [ $exec_prefix_set = no ]
111 # Get LibXML2 settings
113 the_xml_flags="`xml2-config --cflags`"
114 the_xml_libs="`xml2-config --libs`"
117 # Get LibXSLT settings
121 if test "0" = "0"; then
122 the_xslt_flags="`xslt-config --cflags`"
123 the_xslt_libs="`xslt-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 [ "z0" != "z1" ] ;
138 the_crypto_flags="-DXMLSEC_CRYPTO_DYNAMIC_LOADING=1 -DXMLSEC_CRYPTO=\\\"openssl\\\""
143 the_crypto_flags=" -DXMLSEC_OPENSSL_100=1 -DXMLSEC_CRYPTO_OPENSSL=1 -DXMLSEC_CRYPTO=\\\"openssl\\\""
144 the_crypto_libs="-lssl -lcrypto "
145 the_xmlsec_crypto_lib="-lxmlsec1-openssl"
149 if test "0" = "0"; then
150 the_crypto_flags=" -DXMLSEC_OPENSSL_100=1 -DXMLSEC_CRYPTO_OPENSSL=1 -DXMLSEC_CRYPTO=\\\"openssl\\\""
151 the_crypto_libs="-lssl -lcrypto "
152 the_xmlsec_crypto_lib="-lxmlsec1-openssl"
154 echo "Error: the \"$crypto\" cryptographic library is not supported"
160 if test "0" = "0"; then
161 the_crypto_flags="-I/usr/include/p11-kit-1 -DXMLSEC_CRYPTO_GNUTLS=1 -DXMLSEC_CRYPTO=\\\"gnutls\\\""
162 the_crypto_libs="-lgnutls "
163 the_xmlsec_crypto_lib="-lxmlsec1-gnutls"
165 echo "Error: the \"$crypto\" cryptographic library is not supported"
171 if test "0" = "0"; then
172 the_crypto_flags=" -DXMLSEC_CRYPTO_GCRYPT=1 -DXMLSEC_CRYPTO=\\\"gcrypt\\\""
173 the_crypto_libs=" -L/lib/i386-linux-gnu -lgcrypt"
174 the_xmlsec_crypto_lib="-lxmlsec1-gcrypt"
176 echo "Error: the \"$crypto\" cryptographic library is not supported"
182 if test "0" = "0"; then
183 the_crypto_flags="-I/usr/include/nspr -I/usr/include/nss -DXMLSEC_CRYPTO_NSS=1 -DXMLSEC_CRYPTO=\\\"nss\\\""
184 the_crypto_libs="-lnss3 -lnssutil3 -lsmime3 -lssl3 -lplds4 -lplc4 -lnspr4 "
185 the_xmlsec_crypto_lib="-lxmlsec1-nss"
187 echo "Error: the \"$crypto\" cryptographic library is not supported"
193 echo "Error: the \"$crypto\" cryptographic library is not supported"
200 # Assemble all the settings together
202 the_flags="$the_flags -D__XMLSEC_FUNCTION__=__FUNCTION__ -DXMLSEC_NO_GOST=1 -DXMLSEC_NO_XKMS=1 -DXMLSEC_DL_LIBLTDL=1 -I${prefix}/include/xmlsec1 $the_xml_flags $the_xslt_flags $the_crypto_flags"
203 the_libs="$the_libs -L${package_libdir} -lxmlsec1 -lltdl $the_xmlsec_crypto_lib -lxmlsec1 $the_xml_libs $the_xslt_libs $the_crypto_libs"
206 all_flags="$the_flags"
210 all_flags="$all_flags $services $the_libs"
213 if test -z "$all_flags" || test "x$all_flags" = "x "; then
217 # Straight out any possible duplicates, but be careful to
218 # get `-lfoo -lbar -lbaz' for `-lfoo -lbaz -lbar -lbaz'
221 for i in $all_flags; do
223 # a library, save it for later, in reverse order
224 -l*) rev_libs="$i $rev_libs" ;;
226 case " $other_flags " in
227 *\ $i\ *) ;; # already there
228 *) other_flags="$other_flags $i" ;; # add it to output
234 for i in $rev_libs; do
235 case " $ord_libs " in
236 *\ $i\ *) ;; # already there
237 *) ord_libs="$i $ord_libs" ;; # add it to output in reverse order
241 echo $other_flags $ord_libs