Browse Source

[build] detect nss3/nss.h or nss/nss.h for NSS

master
Glenn Strauss 11 months ago
parent
commit
31a7f0d43c
  1. 1
      configure.ac
  2. 4
      src/CMakeLists.txt
  3. 5
      src/meson.build
  4. 4
      src/sys-crypto.h

1
configure.ac

@ -892,6 +892,7 @@ if test "x$use_nss" = "xyes"; then
PKG_CHECK_MODULES([NSS],[nss])
CPPFLAGS="$CPPFLAGS -I/usr/include/nspr4"
fi
AC_DEFINE([HAVE_NSS_NSS_H], [1], [nss/nss.h])
AC_DEFINE([HAVE_NSS3_NSS_H], [1], [nss3/nss.h])
AC_SUBST([NSS_CFLAGS])
AC_SUBST([NSS_LIBS])

4
src/CMakeLists.txt

@ -399,8 +399,9 @@ else()
endif()
if(WITH_NSS)
check_include_files(nss/nss.h HAVE_NSS_NSS_H)
check_include_files(nss3/nss.h HAVE_NSS3_NSS_H)
if(HAVE_NSS3_NSS_H)
if(HAVE_NSS3_NSS_H OR HAVE_NSS_NSS_H)
check_library_exists(ssl3 NSSSSL_GetVersion "" HAVE_LIBSSL3)
if(HAVE_LIBSSL3)
check_library_exists(smime3 NSSSMIME_GetVersion "" HAVE_LIBSMIME3)
@ -413,6 +414,7 @@ if(WITH_NSS)
endif()
endif()
else()
unset(HAVE_NSS_NSS_H)
unset(HAVE_NSS3_NSS_H)
unset(HAVE_LIBSSL3)
unset(HAVE_LIBSMIME3)

5
src/meson.build

@ -482,6 +482,11 @@ if get_option('with_nss') != 'false'
libnssutil3 = [ dependency('libnssutil3') ]
conf_data.set('HAVE_NSS3_NSS_H', true)
endif
if get_option('with_nss') != 'false'
# manual search:
# header: nss/nss.h
conf_data.set('HAVE_NSS_NSS_H', true)
endif
libpcre = []
if get_option('with_pcre')

4
src/sys-crypto.h

@ -35,6 +35,10 @@
#endif
#endif
#endif
#ifdef HAVE_NSS_NSS_H
#define USE_LIB_CRYPTO
#define USE_NSS_CRYPTO
#endif
#ifdef HAVE_NETTLE_NETTLE_TYPES_H
#define USE_LIB_CRYPTO

Loading…
Cancel
Save