libmicrohttpd

HTTP/1.x server C library (MHD 1.x, stable)
Log | Files | Refs | Submodules | README | LICENSE

commit 05d1a633b17b530fd95b20b11f08685d1c91a1ce
parent cfea15fe53e1d84d38de88651f31122de6369143
Author: Christian Grothoff <christian@grothoff.org>
Date:   Tue, 21 May 2013 12:35:28 +0000

improving build system to tolerate missing libraries for libmicrospdy

Diffstat:
MChangeLog | 5+++++
Mconfigure.ac | 22+++++++++++++++++++++-
Msrc/Makefile.am | 8++++++--
3 files changed, 32 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog @@ -1,3 +1,8 @@ +Tue May 21 14:34:36 CEST 2013 + Improving configure tests for OpenSSL and spdylay to + avoid build errors in libmicrospdy code if those libraries + are not present. -CG + Mon May 20 12:29:35 CEST 2013 Added MHD_CONNECTION_INFO_CONNECTION_FD to allow clients direct access to connection socket; useful for COMET diff --git a/configure.ac b/configure.ac @@ -279,20 +279,38 @@ AC_ARG_ENABLE([spdy], [disable libmicrospdy]), [enable_spdy=${enableval}], [enable_spdy=yes]) +AC_MSG_RESULT($enable_spdy) + +if test "$enable_spdy" = "yes" +then + AC_CHECK_HEADERS([openssl/err.h], + [AM_CONDITIONAL(HAVE_OPENSSL, true) + enable_spdy="yes"], + [AM_CONDITIONAL(HAVE_OPENSSL, false) + enable_spdy="no"]) +fi + if test "$enable_spdy" = "yes" then AC_DEFINE([SPDY_SUPPORT],[1],[include libmicrospdy support]) else AC_DEFINE([SPDY_SUPPORT],[0],[disable libmicrospdy support]) fi -AC_MSG_RESULT($enable_spdy) AM_CONDITIONAL(ENABLE_SPDY, [test "x$enable_spdy" != "xno"]) +AC_MSG_CHECKING(whether we have OpenSSL and thus can support libmicrospdy) +AC_MSG_RESULT($enable_spdy) spdy_OPENSSL # for pkg-config SPDY_LIBDEPS="" +AC_CHECK_HEADERS([spdylay/spdylay.h], + [AM_CONDITIONAL(HAVE_SPDYLAY, true) + have_spdylay="yes"], + [AM_CONDITIONAL(HAVE_SPDYLAY, false) + have_spdylay="no"]) + AC_SUBST(SPDY_LIB_LDFLAGS) # for pkg-config AC_SUBST(SPDY_LIBDEPS) @@ -529,6 +547,8 @@ AC_MSG_NOTICE([Configuration Summary: Digest auth.: ${enable_dauth} Postproc: ${enable_postprocessor} HTTPS support: ${enable_https} + libmicrospdy: ${enable_spdy} + spdylay (testing): ${have_spdylay} ]) if test "x$enable_https" = "xyes" diff --git a/src/Makefile.am b/src/Makefile.am @@ -7,8 +7,12 @@ endif endif endif if ENABLE_SPDY -# fixme: should test for spdylay before building testspdy! -microspdy = microspdy spdy2http testspdy +if HAVE_OPENSSL +microspdy = microspdy spdy2http +if HAVE_SPDYLAY +microspdy += testspdy +endif +endif endif SUBDIRS = include microhttpd $(microspdy) examples $(curltests) $(zzuftests) .