diff options
author | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2017-04-14 23:14:15 +0300 |
---|---|---|
committer | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2017-04-14 23:14:15 +0300 |
commit | bc005396f6f91d5019636a774896656c848741f1 (patch) | |
tree | d3aa909d792c542f98a6eae8b06ebfe079ae61a5 /configure.ac | |
parent | ac85c57139a490f101b4d67117aefb2b67e3cf10 (diff) | |
download | libmicrohttpd-bc005396f6f91d5019636a774896656c848741f1.tar.gz libmicrohttpd-bc005396f6f91d5019636a774896656c848741f1.zip |
configure: check for invalid "with-thread" parameters
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac index 431e08e6..481f1cbe 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -341,11 +341,17 @@ esac | |||
341 | AC_ARG_WITH([threads], | 341 | AC_ARG_WITH([threads], |
342 | [AS_HELP_STRING([--with-threads=LIB],[choose threading library (posix, w32, auto) [auto]])], | 342 | [AS_HELP_STRING([--with-threads=LIB],[choose threading library (posix, w32, auto) [auto]])], |
343 | [], [with_threads='auto']) | 343 | [], [with_threads='auto']) |
344 | test "x$with_threads" = "xwin32" && with_threads='w32' | 344 | AS_CASE([[$with_threads]], |
345 | test "x$with_threads" = "xpthreads" && with_threads='posix' | 345 | [[win32]], [[with_threads='w32']], |
346 | [[pthreads]], [[with_threads='posix']], | ||
347 | [[posix]], [[:]], | ||
348 | [[w32]], [[:]], | ||
349 | [[auto]], [[:]], | ||
350 | [AC_MSG_ERROR([[incorrect parameter "$with_threads" specified for --with-threads]])] | ||
351 | ) | ||
346 | 352 | ||
347 | # Check for posix threads support, regardless of configure parameters as | 353 | # Check for posix threads support, regardless of configure parameters as |
348 | # posix threads are used in some tests even on W32. | 354 | # testsuite use only posix threads. |
349 | AX_PTHREAD( | 355 | AX_PTHREAD( |
350 | [ | 356 | [ |
351 | HAVE_POSIX_THREADS='yes' | 357 | HAVE_POSIX_THREADS='yes' |
@@ -354,7 +360,9 @@ AX_PTHREAD( | |||
354 | AM_CONDITIONAL([HAVE_POSIX_THREADS],[test "x$HAVE_POSIX_THREADS" = "xyes"]) | 360 | AM_CONDITIONAL([HAVE_POSIX_THREADS],[test "x$HAVE_POSIX_THREADS" = "xyes"]) |
355 | 361 | ||
356 | HAVE_W32_THREADS='no' | 362 | HAVE_W32_THREADS='no' |
357 | AS_IF([[test "x$os_is_windows" = "xyes"]], | 363 | AS_IF([[test "x$with_threads" = "xauto"]], |
364 | [ | ||
365 | AS_IF([[test "x$os_is_windows" = "xyes"]], | ||
358 | [ | 366 | [ |
359 | AC_MSG_CHECKING([[for W32 threads]]) | 367 | AC_MSG_CHECKING([[for W32 threads]]) |
360 | AC_LINK_IFELSE( | 368 | AC_LINK_IFELSE( |
@@ -363,6 +371,8 @@ AS_IF([[test "x$os_is_windows" = "xyes"]], | |||
363 | ) | 371 | ) |
364 | AC_MSG_RESULT([[$HAVE_W32_THREADS]]) | 372 | AC_MSG_RESULT([[$HAVE_W32_THREADS]]) |
365 | ]) | 373 | ]) |
374 | ] | ||
375 | ) | ||
366 | 376 | ||
367 | AC_MSG_CHECKING([[for threading lib to use with libmicrohttpd]]) | 377 | AC_MSG_CHECKING([[for threading lib to use with libmicrohttpd]]) |
368 | AS_IF([[test "x$with_threads" = "xposix"]], | 378 | AS_IF([[test "x$with_threads" = "xposix"]], |