diff options
author | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2014-03-05 13:20:39 +0000 |
---|---|---|
committer | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2014-03-05 13:20:39 +0000 |
commit | 461e56367f343dca3d0fe111c7c7242b8c28e6fb (patch) | |
tree | 28af4cc30ada5f5a4dbb6559913a4e6305331b21 | |
parent | f20648d0cf16b22a923b6a46bdf0ee439c872563 (diff) | |
download | libmicrohttpd-461e56367f343dca3d0fe111c7c7242b8c28e6fb.tar.gz libmicrohttpd-461e56367f343dca3d0fe111c7c7242b8c28e6fb.zip |
configure.ac: refactoring libcurl tests
-rw-r--r-- | configure.ac | 39 |
1 files changed, 19 insertions, 20 deletions
diff --git a/configure.ac b/configure.ac index d1eaa64e..847aefcb 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -347,30 +347,29 @@ esac | |||
347 | AC_SUBST(HIDDEN_VISIBILITY_CFLAGS) | 347 | AC_SUBST(HIDDEN_VISIBILITY_CFLAGS) |
348 | 348 | ||
349 | # libcurl (required for testing) | 349 | # libcurl (required for testing) |
350 | SAVE_LIBS=$LIBS | ||
351 | |||
352 | AC_MSG_CHECKING(whether to use libcurl for testing) | ||
353 | AC_ARG_ENABLE([curl], | 350 | AC_ARG_ENABLE([curl], |
354 | [AS_HELP_STRING([--disable-curl],[disable cURL based testcases])], | 351 | [AS_HELP_STRING([--disable-curl],[disable cURL based testcases])], |
355 | [enable_curl=${enableval}], | 352 | [enable_curl=${enableval}]) |
356 | [enable_curl=yes]) | ||
357 | AC_MSG_RESULT($enable_curl) | ||
358 | curl=0 | 353 | curl=0 |
359 | if test "$enable_curl" = "yes" | 354 | if test "$enable_curl" != "no" |
355 | then | ||
356 | LIBCURL_CHECK_CONFIG([yes],[7.16.4],[enable_curl=yes], | ||
357 | [ | ||
358 | if test "x$enable_curl" = "xyes"; then | ||
359 | AC_MSG_WARN([[cURL-based tests cannot be enabled because libcurl is missing]]) | ||
360 | fi | ||
361 | enable_curl=no | ||
362 | ]) | ||
363 | fi | ||
364 | if test "$enable_curl" != "no" | ||
360 | then | 365 | then |
361 | LIBCURL_CHECK_CONFIG(,,curl=1,curl=0) | ||
362 | AC_CHECK_HEADERS([curl/curl.h],[ | ||
363 | # Lib cURL & cURL - OpenSSL versions | 366 | # Lib cURL & cURL - OpenSSL versions |
364 | MHD_REQ_CURL_VERSION=7.16.4 | 367 | AC_DEFINE([MHD_REQ_CURL_VERSION], ["7.16.4"], [required cURL version to run tests]) |
365 | MHD_REQ_CURL_OPENSSL_VERSION=0.9.8 | 368 | AC_DEFINE([MHD_REQ_CURL_OPENSSL_VERSION], ["0.9.8"], [required cURL SSL version to run tests]) |
366 | MHD_REQ_CURL_GNUTLS_VERSION=2.8.6 | 369 | AC_DEFINE([MHD_REQ_CURL_GNUTLS_VERSION], ["2.8.6"], [gnuTLS lib version - used in conjunction with cURL]) |
367 | MHD_REQ_CURL_NSS_VERSION=3.12.0 | 370 | AC_DEFINE([MHD_REQ_CURL_NSS_VERSION], ["3.12.0"], [NSS lib version - used in conjunction with cURL]) |
368 | AC_DEFINE_UNQUOTED([MHD_REQ_CURL_VERSION], "$MHD_REQ_CURL_VERSION", [required cURL version to run tests]) | ||
369 | AC_DEFINE_UNQUOTED([MHD_REQ_CURL_OPENSSL_VERSION], "$MHD_REQ_CURL_OPENSSL_VERSION", [required cURL SSL version to run tests]) | ||
370 | AC_DEFINE_UNQUOTED([MHD_REQ_CURL_GNUTLS_VERSION], "$MHD_REQ_CURL_GNUTLS_VERSION", [gnuTLS lib version - used in conjunction with cURL]) | ||
371 | AC_DEFINE_UNQUOTED([MHD_REQ_CURL_NSS_VERSION], "$MHD_REQ_CURL_NSS_VERSION", [NSS lib version - used in conjunction with cURL]) | ||
372 | ],[curl=0]) | ||
373 | fi | 371 | fi |
372 | AM_CONDITIONAL([HAVE_CURL], [test "x$enable_curl" = "xyes"]) | ||
374 | 373 | ||
375 | AC_CHECK_LIB([[magic]], [[magic_open]], | 374 | AC_CHECK_LIB([[magic]], [[magic_open]], |
376 | [AC_CHECK_HEADERS([magic.h], | 375 | [AC_CHECK_HEADERS([magic.h], |
@@ -410,6 +409,7 @@ AM_CONDITIONAL(ENABLE_SPDY, [test "x$enable_spdy" != "xno"]) | |||
410 | AC_MSG_CHECKING(whether we have OpenSSL and thus can support libmicrospdy) | 409 | AC_MSG_CHECKING(whether we have OpenSSL and thus can support libmicrospdy) |
411 | AC_MSG_RESULT($enable_spdy) | 410 | AC_MSG_RESULT($enable_spdy) |
412 | 411 | ||
412 | SAVE_LIBS=$LIBS | ||
413 | spdy_OPENSSL | 413 | spdy_OPENSSL |
414 | # for pkg-config | 414 | # for pkg-config |
415 | SPDY_LIBDEPS="" | 415 | SPDY_LIBDEPS="" |
@@ -427,7 +427,6 @@ AC_SUBST(SPDY_LIBDEPS) | |||
427 | 427 | ||
428 | 428 | ||
429 | LIBS=$SAVE_LIBS | 429 | LIBS=$SAVE_LIBS |
430 | AM_CONDITIONAL(HAVE_CURL, test x$curl = x1) | ||
431 | 430 | ||
432 | # large file support (> 4 GB) | 431 | # large file support (> 4 GB) |
433 | AC_SYS_LARGEFILE | 432 | AC_SYS_LARGEFILE |
@@ -613,7 +612,7 @@ src/testzzuf/Makefile]) | |||
613 | AC_OUTPUT | 612 | AC_OUTPUT |
614 | 613 | ||
615 | # Finally: summary | 614 | # Finally: summary |
616 | if test "$curl" != 1 ; then | 615 | if test "x$enable_curl" != "xyes"; then |
617 | MSG_CURL="no, many unit tests will not run" | 616 | MSG_CURL="no, many unit tests will not run" |
618 | else | 617 | else |
619 | MSG_CURL="yes" | 618 | MSG_CURL="yes" |