1 dnl Check to find the OpenSSL headers/libraries
7 [ --with-openssl=DIR OpenSSL library and headers prefix],
8 [openssl_lib="$withval/lib"
9 openssl_include="$withval/include"]
11 AC_CACHE_CHECK([for openssl headers], tinc_cv_openssl_include,
13 AC_ARG_WITH(openssl-include,
14 [ --with-openssl-include=DIR OpenSSL headers directory],
15 [tinc_cv_openssl_include="$withval"],
16 [if test "x$openssl_include" = "x" ; then
17 tinc_cv_openssl_include="none given"
19 tinc_cv_openssl_include=$openssl_include
23 AC_CACHE_CHECK([for openssl libraries], tinc_cv_openssl_lib,
25 AC_ARG_WITH(openssl-lib,
26 [ --with-openssl-lib=DIR OpenSSL library directory],
27 [tinc_cv_openssl_lib="$withval"],
28 [if test "x$openssl_lib" = "x" ; then
29 tinc_cv_openssl_lib="none given"
31 tinc_cv_openssl_lib=$openssl_lib
36 if test "$tinc_cv_openssl_lib" != "none given" ; then
37 LIBS="$LIBS -L$tinc_cv_openssl_lib"
39 if test "$tinc_cv_openssl_include" != "none given" ; then
40 CFLAGS="$CFLAGS -I$tinc_cv_openssl_include"
44 AC_CHECK_HEADERS(evp.h rsa.h rand.h err.h sha.h pem.h,
45 [], [osi=none; break])
47 if test "$osi" = "none" ; then
49 AC_CHECK_HEADERS(openssl/evp.h openssl/rsa.h openssl/rand.h openssl/err.h openssl/sha.h openssl/pem.h,
50 [], [osi=none; break])
56 if test "$osi" = "found" ; then
57 AC_CHECK_LIB(crypto, SHA1_version, [
62 if test $libcrypto = none; then
65 It seems like OpenSSL is not installed on this system. But perhaps
66 you need to supply the exact location of the headers and libraries.
67 You can try running configure with the --with-openssl=/DIRECTORY
68 parameter. If you installed the headers and libraries in a different
69 location you can use --with-openssl-include=/DIR and
70 --with-openssl-lib=/DIR.
74 AC_MSG_ERROR(OpenSSL not found.)