openldap-autoconf-pkgconfig-nss.patch 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. Use pkg-config for Mozilla NSS library detection
  2. Author: Jan Vcelak <jvcelak@redhat.com>
  3. ---
  4. configure.in | 22 +++++-----------------
  5. 1 file changed, 5 insertions(+), 17 deletions(-)
  6. diff --git a/configure.in b/configure.in
  7. index ecffe30..2a9cfb4 100644
  8. --- a/configure.in
  9. +++ b/configure.in
  10. @@ -1223,28 +1223,16 @@ if test $ol_link_tls = no ; then
  11. fi
  12. fi
  13. -dnl NOTE: caller must specify -I/path/to/nspr4 and -I/path/to/nss3
  14. -dnl and -L/path/to/nspr4 libs and -L/path/to/nss3 libs if those libs
  15. -dnl are not in the default system location
  16. if test $ol_link_tls = no ; then
  17. if test $ol_with_tls = moznss || test $ol_with_tls = auto ; then
  18. - have_moznss=no
  19. - AC_CHECK_HEADERS([nssutil.h])
  20. - if test "$ac_cv_header_nssutil_h" = yes ; then
  21. - AC_CHECK_LIB([nss3], [NSS_Initialize],
  22. - [ have_moznss=yes ], [ have_moznss=no ])
  23. - fi
  24. + PKG_CHECK_MODULES(MOZNSS, [nss nspr], [have_moznss=yes], [have_moznss=no])
  25. - if test "$have_moznss" = yes ; then
  26. + if test $have_moznss = yes ; then
  27. ol_with_tls=moznss
  28. ol_link_tls=yes
  29. - AC_DEFINE(HAVE_MOZNSS, 1,
  30. - [define if you have MozNSS])
  31. - TLS_LIBS="-lssl3 -lsmime3 -lnss3 -lnssutil3 -lplds4 -lplc4 -lnspr4"
  32. - else
  33. - if test $ol_with_tls = moznss ; then
  34. - 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)])
  35. - fi
  36. + AC_DEFINE(HAVE_MOZNSS, 1, [define if you have MozNSS])
  37. + TLS_LIBS="$MOZNSS_LIBS"
  38. + CFLAGS="$CFLAGS $MOZNSS_CFLAGS"
  39. fi
  40. fi
  41. fi
  42. --
  43. 1.7.11.7