Also check for rand.h and err.h. If any of these files does not
[tinc] / m4 / openssl.m4
index d933b23..6e08ebe 100644 (file)
@@ -33,22 +33,21 @@ AC_DEFUN(tinc_OPENSSL,
     )
   ])
 
-if test "$openssl_lib" != "none given" ; then
+if test "$tinc_cv_openssl_lib" != "none given" ; then
   LIBS="$LIBS -L$tinc_cv_openssl_lib"
 fi
-if test "$openssl_include" != "none given" ; then
+if test "$tinc_cv_openssl_include" != "none given" ; then
   INCLUDES="$INCLUDES -I$tinc_cv_openssl_include"
 fi
 
-osi=none
-AC_CHECK_HEADERS(evp.h rsa.h,
-[osi=found
- break])
+osi=found
+AC_CHECK_HEADERS(evp.h rsa.h rand.h err.h,
+[], [osi=none; break])
 
 if test "$osi" = "none" ; then
-  AC_CHECK_HEADERS(openssl/evp.h openssl/rsa.h,
-  [osi=found
-   break])
+  osi=found
+  AC_CHECK_HEADERS(openssl/evp.h openssl/rsa.h openssl/rand.h openssl/err.h,
+  [], [osi=none; break])
 fi