diff options
author | Christian Grothoff <christian@grothoff.org> | 2013-05-21 12:35:28 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2013-05-21 12:35:28 +0000 |
commit | 05d1a633b17b530fd95b20b11f08685d1c91a1ce (patch) | |
tree | 54bd5c0b515a65b5c552d25408dcc8ee02385d32 | |
parent | cfea15fe53e1d84d38de88651f31122de6369143 (diff) | |
download | libmicrohttpd-05d1a633b17b530fd95b20b11f08685d1c91a1ce.tar.gz libmicrohttpd-05d1a633b17b530fd95b20b11f08685d1c91a1ce.zip |
improving build system to tolerate missing libraries for libmicrospdy
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | configure.ac | 22 | ||||
-rw-r--r-- | src/Makefile.am | 8 |
3 files changed, 32 insertions, 3 deletions
@@ -1,3 +1,8 @@ | |||
1 | Tue May 21 14:34:36 CEST 2013 | ||
2 | Improving configure tests for OpenSSL and spdylay to | ||
3 | avoid build errors in libmicrospdy code if those libraries | ||
4 | are not present. -CG | ||
5 | |||
1 | Mon May 20 12:29:35 CEST 2013 | 6 | Mon May 20 12:29:35 CEST 2013 |
2 | Added MHD_CONNECTION_INFO_CONNECTION_FD to allow clients | 7 | Added MHD_CONNECTION_INFO_CONNECTION_FD to allow clients |
3 | direct access to connection socket; useful for COMET | 8 | direct access to connection socket; useful for COMET |
diff --git a/configure.ac b/configure.ac index 6f2a7851..c4380511 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -279,20 +279,38 @@ AC_ARG_ENABLE([spdy], | |||
279 | [disable libmicrospdy]), | 279 | [disable libmicrospdy]), |
280 | [enable_spdy=${enableval}], | 280 | [enable_spdy=${enableval}], |
281 | [enable_spdy=yes]) | 281 | [enable_spdy=yes]) |
282 | AC_MSG_RESULT($enable_spdy) | ||
283 | |||
284 | if test "$enable_spdy" = "yes" | ||
285 | then | ||
286 | AC_CHECK_HEADERS([openssl/err.h], | ||
287 | [AM_CONDITIONAL(HAVE_OPENSSL, true) | ||
288 | enable_spdy="yes"], | ||
289 | [AM_CONDITIONAL(HAVE_OPENSSL, false) | ||
290 | enable_spdy="no"]) | ||
291 | fi | ||
292 | |||
282 | if test "$enable_spdy" = "yes" | 293 | if test "$enable_spdy" = "yes" |
283 | then | 294 | then |
284 | AC_DEFINE([SPDY_SUPPORT],[1],[include libmicrospdy support]) | 295 | AC_DEFINE([SPDY_SUPPORT],[1],[include libmicrospdy support]) |
285 | else | 296 | else |
286 | AC_DEFINE([SPDY_SUPPORT],[0],[disable libmicrospdy support]) | 297 | AC_DEFINE([SPDY_SUPPORT],[0],[disable libmicrospdy support]) |
287 | fi | 298 | fi |
288 | AC_MSG_RESULT($enable_spdy) | ||
289 | AM_CONDITIONAL(ENABLE_SPDY, [test "x$enable_spdy" != "xno"]) | 299 | AM_CONDITIONAL(ENABLE_SPDY, [test "x$enable_spdy" != "xno"]) |
300 | AC_MSG_CHECKING(whether we have OpenSSL and thus can support libmicrospdy) | ||
301 | AC_MSG_RESULT($enable_spdy) | ||
290 | 302 | ||
291 | spdy_OPENSSL | 303 | spdy_OPENSSL |
292 | # for pkg-config | 304 | # for pkg-config |
293 | SPDY_LIBDEPS="" | 305 | SPDY_LIBDEPS="" |
294 | 306 | ||
295 | 307 | ||
308 | AC_CHECK_HEADERS([spdylay/spdylay.h], | ||
309 | [AM_CONDITIONAL(HAVE_SPDYLAY, true) | ||
310 | have_spdylay="yes"], | ||
311 | [AM_CONDITIONAL(HAVE_SPDYLAY, false) | ||
312 | have_spdylay="no"]) | ||
313 | |||
296 | AC_SUBST(SPDY_LIB_LDFLAGS) | 314 | AC_SUBST(SPDY_LIB_LDFLAGS) |
297 | # for pkg-config | 315 | # for pkg-config |
298 | AC_SUBST(SPDY_LIBDEPS) | 316 | AC_SUBST(SPDY_LIBDEPS) |
@@ -529,6 +547,8 @@ AC_MSG_NOTICE([Configuration Summary: | |||
529 | Digest auth.: ${enable_dauth} | 547 | Digest auth.: ${enable_dauth} |
530 | Postproc: ${enable_postprocessor} | 548 | Postproc: ${enable_postprocessor} |
531 | HTTPS support: ${enable_https} | 549 | HTTPS support: ${enable_https} |
550 | libmicrospdy: ${enable_spdy} | ||
551 | spdylay (testing): ${have_spdylay} | ||
532 | ]) | 552 | ]) |
533 | 553 | ||
534 | if test "x$enable_https" = "xyes" | 554 | if test "x$enable_https" = "xyes" |
diff --git a/src/Makefile.am b/src/Makefile.am index dfd93abe..b26045f1 100644 --- a/src/Makefile.am +++ b/src/Makefile.am | |||
@@ -7,8 +7,12 @@ endif | |||
7 | endif | 7 | endif |
8 | endif | 8 | endif |
9 | if ENABLE_SPDY | 9 | if ENABLE_SPDY |
10 | # fixme: should test for spdylay before building testspdy! | 10 | if HAVE_OPENSSL |
11 | microspdy = microspdy spdy2http testspdy | 11 | microspdy = microspdy spdy2http |
12 | if HAVE_SPDYLAY | ||
13 | microspdy += testspdy | ||
14 | endif | ||
15 | endif | ||
12 | endif | 16 | endif |
13 | 17 | ||
14 | SUBDIRS = include microhttpd $(microspdy) examples $(curltests) $(zzuftests) . | 18 | SUBDIRS = include microhttpd $(microspdy) examples $(curltests) $(zzuftests) . |