aboutsummaryrefslogtreecommitdiff
path: root/m4/libevent_openssl.m4
diff options
context:
space:
mode:
Diffstat (limited to 'm4/libevent_openssl.m4')
-rw-r--r--m4/libevent_openssl.m49
1 files changed, 9 insertions, 0 deletions
diff --git a/m4/libevent_openssl.m4 b/m4/libevent_openssl.m4
index c20405950319..a5ea67620067 100644
--- a/m4/libevent_openssl.m4
+++ b/m4/libevent_openssl.m4
@@ -39,10 +39,19 @@ case "$enable_openssl" in
done
;;
esac
+ CPPFLAGS_SAVE=$CPPFLAGS
+ CPPFLAGS="$CPPFLAGS $OPENSSL_INCS"
+ AC_CHECK_HEADERS([openssl/ssl.h], [], [have_openssl=no])
+ CPPFLAGS=$CPPFLAGS_SAVE
AC_SUBST(OPENSSL_INCS)
AC_SUBST(OPENSSL_LIBS)
case "$have_openssl" in
yes) AC_DEFINE(HAVE_OPENSSL, 1, [Define if the system has openssl]) ;;
+ *) AC_MSG_ERROR([openssl is a must but can not be found. You should add the \
+directory containing `openssl.pc' to the `PKG_CONFIG_PATH' environment variable, \
+or set `CFLAGS' and `LDFLAGS' directly for openssl, or use `--disable-openssl' \
+to disable support for openssl encryption])
+ ;;
esac
;;
esac