aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorEvgeny Grin (Karlson2k) <k2k@narod.ru>2017-04-14 23:14:15 +0300
committerEvgeny Grin (Karlson2k) <k2k@narod.ru>2017-04-14 23:14:15 +0300
commitbc005396f6f91d5019636a774896656c848741f1 (patch)
treed3aa909d792c542f98a6eae8b06ebfe079ae61a5 /configure.ac
parentac85c57139a490f101b4d67117aefb2b67e3cf10 (diff)
downloadlibmicrohttpd-bc005396f6f91d5019636a774896656c848741f1.tar.gz
libmicrohttpd-bc005396f6f91d5019636a774896656c848741f1.zip
configure: check for invalid "with-thread" parameters
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac18
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
341AC_ARG_WITH([threads], 341AC_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'])
344test "x$with_threads" = "xwin32" && with_threads='w32' 344AS_CASE([[$with_threads]],
345test "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.
349AX_PTHREAD( 355AX_PTHREAD(
350 [ 356 [
351 HAVE_POSIX_THREADS='yes' 357 HAVE_POSIX_THREADS='yes'
@@ -354,7 +360,9 @@ AX_PTHREAD(
354AM_CONDITIONAL([HAVE_POSIX_THREADS],[test "x$HAVE_POSIX_THREADS" = "xyes"]) 360AM_CONDITIONAL([HAVE_POSIX_THREADS],[test "x$HAVE_POSIX_THREADS" = "xyes"])
355 361
356HAVE_W32_THREADS='no' 362HAVE_W32_THREADS='no'
357AS_IF([[test "x$os_is_windows" = "xyes"]], 363AS_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
367AC_MSG_CHECKING([[for threading lib to use with libmicrohttpd]]) 377AC_MSG_CHECKING([[for threading lib to use with libmicrohttpd]])
368AS_IF([[test "x$with_threads" = "xposix"]], 378AS_IF([[test "x$with_threads" = "xposix"]],