aboutsummaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2013-05-05 19:21:40 +0000
committerChristian Grothoff <christian@grothoff.org>2013-05-05 19:21:40 +0000
commit639c6a9880b73c1bbef0944e8934cece1e5191ac (patch)
treeb9ed0484f989630340614e7d5dab084ff76e61da /m4
parent7f193935fa7ec246bfa619d0fd7d6ce1a059fb1c (diff)
downloadlibmicrohttpd-639c6a9880b73c1bbef0944e8934cece1e5191ac.tar.gz
libmicrohttpd-639c6a9880b73c1bbef0944e8934cece1e5191ac.zip
merging libmicrospdy into tree
Diffstat (limited to 'm4')
-rw-r--r--m4/openssl.m469
1 files changed, 69 insertions, 0 deletions
diff --git a/m4/openssl.m4 b/m4/openssl.m4
new file mode 100644
index 00000000..1317e7e4
--- /dev/null
+++ b/m4/openssl.m4
@@ -0,0 +1,69 @@
1dnl Check to find the OpenSSL headers/libraries
2
3AC_DEFUN([spdy_OPENSSL],
4[
5 AC_ARG_WITH(openssl,
6 AS_HELP_STRING([--with-openssl=DIR], [OpenSSL base directory, or:]),
7 [openssl="$withval"
8 CPPFLAGS="$CPPFLAGS -I$withval/include"
9 LDFLAGS="$LDFLAGS -L$withval/lib"]
10 )
11
12 AC_ARG_WITH(openssl-include,
13 AS_HELP_STRING([--with-openssl-include=DIR], [OpenSSL headers directory (without trailing /openssl)]),
14 [openssl_include="$withval"
15 CPPFLAGS="$CPPFLAGS -I$withval"]
16 )
17
18 AC_ARG_WITH(openssl-lib,
19 AS_HELP_STRING([--with-openssl-lib=DIR], [OpenSSL library directory]),
20 [openssl_lib="$withval"
21 LDFLAGS="$LDFLAGS -L$withval"]
22 )
23
24 AC_CHECK_HEADERS(openssl/evp.h openssl/rsa.h openssl/rand.h openssl/err.h openssl/sha.h openssl/pem.h openssl/engine.h,
25 [],
26 [AC_MSG_WARN([OpenSSL header files not found.]); break]
27 )
28
29case $host_os in
30 *mingw*)
31 AC_CHECK_LIB(crypto, SHA1_Init,
32 [LIBS="$LIBS -lcrypto -lgdi32"],
33 [AC_MSG_WARN([OpenSSL libraries not found.])]
34 )
35 ;;
36 *)
37
38 AC_CHECK_LIB(crypto, SHA1_Init,
39 [LIBS="$LIBS -lcrypto"],
40 [AC_MSG_WARN([OpenSSL libraries not found.])]
41 )
42
43 AC_CHECK_FUNC(dlopen,
44 [],
45 [AC_CHECK_LIB(dl, dlopen,
46 [LIBS="$LIBS -ldl"],
47 [AC_MSG_WARN([OpenSSL depends on libdl.]); break]
48 )]
49 )
50
51 AC_CHECK_FUNC(SSL_library_init,
52 [],
53 [AC_CHECK_LIB(ssl, SSL_library_init,
54 [LIBS="$LIBS -lssl"],
55 [AC_MSG_WARN([OpenSSL?.]); break]
56 )]
57 )
58 ;;
59esac
60
61# AC_CHECK_FUNCS([RAND_pseudo_bytes EVP_EncryptInit_ex], ,
62# [AC_MSG_ERROR([Missing OpenSSL functionality, make sure you have installed the latest version.]); break],
63# )
64
65# AC_CHECK_DECL([OpenSSL_add_all_algorithms], ,
66# [AC_MSG_ERROR([Missing OpenSSL functionality, make sure you have installed the latest version.]); break],
67# [#include <openssl/evp.h>]
68# )
69])