aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2009-09-01 06:53:01 +0000
committerDaniel Stenberg <daniel@haxx.se>2009-09-01 06:53:01 +0000
commitceda7e98f8f8d04b26ce0e0ea2f800dcdf966b79 (patch)
tree41e1d60b03f9abb02597b5ac5abc9b67929b93b4 /configure.ac
parent2d0aca3b92aba75bfc6d975ac2d4f5aa3e25793a (diff)
- configure now tries to use pkg-config for a number of sub-dependencies even
when cross-compiling. The key to success is then you properly setup PKG_CONFIG_PATH before invoking configure. I also improved how NSS is detected by trying nss-config if pkg-config isn't present, and as a last resort just use the lib name and force the user to setup the LIBS/LDFLAGS/CFLAGS etc properly. The previous last resort would add a range of various libs that would almost never be quite correct.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac20
1 files changed, 14 insertions, 6 deletions
diff --git a/configure.ac b/configure.ac
index e5e58c657..ac889ad3a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1663,13 +1663,21 @@ if test "$OPENSSL_ENABLED" != "1" -a "$GNUTLS_ENABLED" != "1"; then
addcflags=`$PKGCONFIG --cflags nss`
version=`$PKGCONFIG --modversion nss`
nssprefix=`$PKGCONFIG --variable=prefix nss`
+ else
+ dnl Without pkg-config, we check for nss-config
+
+ check=`nss-config --version 2>/dev/null`
+ if test -n "$check"; then
+ addlib=`nss-config --libs`
+ addcflags=`nss-config --cflags`
+ version=`nss-config --version`
+ nssprefix=`nss-config --prefix`
+ else
+ addlib="-lnss3"
+ addcflags=""
+ version="unknown"
+ fi
fi
- else
- # Without pkg-config, we'll kludge in some defaults
- addlib="-L$OPT_NSS/lib -lssl3 -lsmime3 -lnss3 -lplds4 -lplc4 -lnspr4 -lpthread -ldl"
- addcflags="-I$OPT_NSS/include"
- version="unknown"
- nssprefix=$OPT_NSS
fi
dnl Check for functionPK11_CreateGenericObject