openldap/openldap-autoconf-pkgconfig...

50 lines
1.6 KiB
Diff
Raw Normal View History

2012-07-18 16:57:33 +00:00
Use pkg-config for Mozilla NSS library detection
Author: Jan Vcelak <jvcelak@redhat.com>
---
2012-10-11 09:47:24 +00:00
configure.in | 22 +++++-----------------
1 file changed, 5 insertions(+), 17 deletions(-)
2012-07-18 16:57:33 +00:00
diff --git a/configure.in b/configure.in
2012-10-11 09:47:24 +00:00
index ecffe30..2a9cfb4 100644
2012-07-18 16:57:33 +00:00
--- a/configure.in
+++ b/configure.in
2012-10-11 09:47:24 +00:00
@@ -1223,28 +1223,16 @@ if test $ol_link_tls = no ; then
2012-07-18 16:57:33 +00:00
fi
fi
-dnl NOTE: caller must specify -I/path/to/nspr4 and -I/path/to/nss3
-dnl and -L/path/to/nspr4 libs and -L/path/to/nss3 libs if those libs
-dnl are not in the default system location
if test $ol_link_tls = no ; then
if test $ol_with_tls = moznss || test $ol_with_tls = auto ; then
- have_moznss=no
- AC_CHECK_HEADERS([nssutil.h])
- if test "$ac_cv_header_nssutil_h" = yes ; then
- AC_CHECK_LIB([nss3], [NSS_Initialize],
- [ have_moznss=yes ], [ have_moznss=no ])
- fi
+ PKG_CHECK_MODULES(MOZNSS, [nss nspr], [have_moznss=yes], [have_moznss=no])
- if test "$have_moznss" = yes ; then
+ if test $have_moznss = yes ; then
ol_with_tls=moznss
ol_link_tls=yes
- AC_DEFINE(HAVE_MOZNSS, 1,
- [define if you have MozNSS])
- TLS_LIBS="-lssl3 -lsmime3 -lnss3 -lnssutil3 -lplds4 -lplc4 -lnspr4"
- else
2012-10-11 09:47:24 +00:00
- if test $ol_with_tls = moznss ; then
2012-07-18 16:57:33 +00:00
- AC_MSG_ERROR([MozNSS not found - please specify the location to the NSPR and NSS header files in CPPFLAGS and the location to the NSPR and NSS libraries in LDFLAGS (if not in the system location)])
2012-10-11 09:47:24 +00:00
- fi
2012-07-18 16:57:33 +00:00
+ AC_DEFINE(HAVE_MOZNSS, 1, [define if you have MozNSS])
+ TLS_LIBS="$MOZNSS_LIBS"
+ CFLAGS="$CFLAGS $MOZNSS_CFLAGS"
fi
fi
fi
--
2012-10-11 09:47:24 +00:00
1.7.11.7
2012-07-18 16:57:33 +00:00