ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/gvpe/m4/openssl.m4
Revision: 1.4
Committed: Wed Jul 10 01:51:40 2013 UTC (10 years, 10 months ago) by root
Branch: MAIN
CVS Tags: rel-3_0, rel-2_25
Changes since 1.3: +1 -1 lines
Log Message:
*** empty log message ***

File Contents

# User Rev Content
1 pcg 1.1 dnl Check to find the OpenSSL headers/libraries
2    
3 root 1.4 AC_DEFUN([tinc_OPENSSL],
4 pcg 1.1 [
5     tinc_ac_save_CPPFLAGS="$CPPFLAGS"
6    
7     AC_ARG_WITH(openssl-include,
8     [ --with-openssl-include=DIR OpenSSL headers directory (without trailing /openssl)],
9     [openssl_include="$withval"
10     CFLAGS="$CFLAGS -I$withval"
11     CPPFLAGS="$CPPFLAGS -I$withval"]
12     )
13    
14     AC_ARG_WITH(openssl-lib,
15     [ --with-openssl-lib=DIR OpenSSL library directory],
16     [openssl_lib="$withval"
17     LIBS="$LIBS -L$withval"]
18     )
19    
20     AC_CHECK_HEADERS(openssl/evp.h openssl/rsa.h openssl/rand.h openssl/err.h openssl/sha.h openssl/pem.h,
21     [],
22     [AC_MSG_ERROR([OpenSSL header files not found.]); break]
23     )
24    
25     CPPFLAGS="$tinc_ac_save_CPPFLAGS"
26    
27 root 1.3 AC_CHECK_LIB(crypto, SHA1_Init,
28 pcg 1.1 [LIBS="$LIBS -lcrypto"],
29     [AC_MSG_ERROR([OpenSSL libraries not found.])]
30     )
31    
32     AC_CHECK_FUNCS([RAND_pseudo_bytes OPENSSL_add_all_algorithms_noconf OpenSSL_add_all_algorithms SSLeay_add_all_algorithms])
33    
34     AC_CHECK_FUNC(dlopen,
35     [],
36     [AC_CHECK_LIB(dl, dlopen,
37     [LIBS="$LIBS -ldl"],
38     [AC_MSG_ERROR([OpenSSL depends on libdl.])]
39     )]
40     )
41 root 1.2
42     AC_CHECK_FUNC(inflate,
43     [],
44     [AC_CHECK_LIB(z, inflate,
45     [LIBS="$LIBS -lz"],
46     [AC_MSG_ERROR([OpenSSL depends on libz.])]
47     )]
48     )
49 pcg 1.1 ])