Hi, On 31-03-14 16:13, Heiko Hund wrote: > On Sunday 23 March 2014 14:27:43 Steffan Karger wrote: >> + AC_EGREP_CPP(have_ssl_op_no_ticket, [ >> + #include <openssl/ssl.h> > > We just found that this breaks if the openssl headers are in a non-standard > place. The test above sets the -I option in CFLAGS, but not in CPPFLAGS. So, > maybe we should generally set -I in CPPFLAGS instead.
I'm not much of an autotools wizard, so I don't really know if there are downsides to using CPPFLAGS insteadof CFLAGS everywhere. The attached patch fixes your problem, but if there is someone around with a better idea (and, preferrably, patch) to fix it, I'm all ears! -Steffan
>From ccebcab605325f98a0ff22edbbbc089194e2e0ad Mon Sep 17 00:00:00 2001 From: Steffan Karger <stef...@karger.me> List-Post: openvpn-devel@lists.sourceforge.net Date: Tue, 1 Apr 2014 00:33:55 +0200 Subject: [PATCH] configure.ac: use CPPFLAGS for SSL_OP_NO_TICKET check AC_EGREP_CPP uses CPPFLAGS, not CFLAGS. Make sure the macro can find OpenSSL by temporarily adding OPENSSL_CRYPTO_FLAGS to CPPFLAGS. Signed-off-by: Steffan Karger <stef...@karger.me> --- configure.ac | 3 +++ 1 file changed, 3 insertions(+) diff --git a/configure.ac b/configure.ac index 7e94280..0c2abb9 100644 --- a/configure.ac +++ b/configure.ac @@ -794,6 +794,8 @@ if test "${have_openssl_crypto}" = "yes"; then fi if test "${have_openssl_ssl}" = "yes"; then + saved_CPPFLAGS="${CPPFLAGS}" + CPPFLAGS="${CPPFLAGS} ${OPENSSL_CRYPTO_CFLAGS}" AC_MSG_CHECKING([for SSL_OP_NO_TICKET flag in OpenSSL]) AC_EGREP_CPP(have_ssl_op_no_ticket, [ #include <openssl/ssl.h> @@ -806,6 +808,7 @@ if test "${have_openssl_ssl}" = "yes"; then AC_MSG_RESULT([no]) AC_ERROR([OpenVPN 2.4+ requires SSL_OP_NO_TICKET in OpenSSL]) ]) + CPPFLAGS="${saved_CPPFLAGS}" fi AC_ARG_VAR([POLARSSL_CFLAGS], [C compiler flags for polarssl]) -- 1.8.3.2