+if test $ol_link_tls = no ; then
+ if test $ol_with_tls = moznss || test $ol_with_tls = auto ; then
+ have_moznss=no
+ for ac_header in nssutil.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "nssutil.h" "ac_cv_header_nssutil_h" "$ac_includes_default"
+if test "x$ac_cv_header_nssutil_h" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_NSSUTIL_H 1
+_ACEOF
+
+fi
+
+done
+
+ if test "$ac_cv_header_nssutil_h" = yes ; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NSS_Initialize in -lnss3" >&5
+$as_echo_n "checking for NSS_Initialize in -lnss3... " >&6; }
+if test "${ac_cv_lib_nss3_NSS_Initialize+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lnss3 $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char NSS_Initialize ();
+int
+main ()
+{
+return NSS_Initialize ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_nss3_NSS_Initialize=yes
+else
+ ac_cv_lib_nss3_NSS_Initialize=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nss3_NSS_Initialize" >&5
+$as_echo "$ac_cv_lib_nss3_NSS_Initialize" >&6; }
+if test "x$ac_cv_lib_nss3_NSS_Initialize" = x""yes; then :
+ have_moznss=yes
+else
+ have_moznss=no
+fi
+
+ fi
+
+ if test "$have_moznss" = yes ; then
+ ol_with_tls=moznss
+ ol_link_tls=yes
+
+$as_echo "#define HAVE_MOZNSS 1" >>confdefs.h
+
+ TLS_LIBS="-lssl3 -lsmime3 -lnss3 -lnssutil3 -lplds4 -lplc4 -lnspr4"
+ else
+ if test $ol_with_tls = moznss ; then
+ as_fn_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)" "$LINENO" 5
+ fi
+ fi
+ fi
+fi
+