aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvgeny Grin (Karlson2k) <k2k@narod.ru>2017-04-14 23:21:32 +0300
committerEvgeny Grin (Karlson2k) <k2k@narod.ru>2017-04-14 23:21:32 +0300
commit541d62839a73d2df6eac947e0baea05c1ab5ba95 (patch)
treeaa8fe2496f0a147d22c16039893e01299e4c7be5
parentbc005396f6f91d5019636a774896656c848741f1 (diff)
downloadlibmicrohttpd-541d62839a73d2df6eac947e0baea05c1ab5ba95.tar.gz
libmicrohttpd-541d62839a73d2df6eac947e0baea05c1ab5ba95.zip
configure: refactoring to be consistent with other configure variables
-rw-r--r--configure.ac22
1 files changed, 11 insertions, 11 deletions
diff --git a/configure.ac b/configure.ac
index 481f1cbe..31f18c30 100644
--- a/configure.ac
+++ b/configure.ac
@@ -354,12 +354,12 @@ AS_CASE([[$with_threads]],
354# testsuite use only posix threads. 354# testsuite use only posix threads.
355AX_PTHREAD( 355AX_PTHREAD(
356 [ 356 [
357 HAVE_POSIX_THREADS='yes' 357 mhd_have_posix_threads='yes'
358 AC_DEFINE([[HAVE_PTHREAD_H]],[[1]],[Define to 1 if you have the <pthread.h> header file.]) 358 AC_DEFINE([[HAVE_PTHREAD_H]],[[1]],[Define to 1 if you have the <pthread.h> header file.])
359 ],[[HAVE_POSIX_THREADS='no']]) 359 ],[[mhd_have_posix_threads='no']])
360AM_CONDITIONAL([HAVE_POSIX_THREADS],[test "x$HAVE_POSIX_THREADS" = "xyes"]) 360AM_CONDITIONAL([HAVE_POSIX_THREADS],[test "x$mhd_have_posix_threads" = "xyes"])
361 361
362HAVE_W32_THREADS='no' 362mhd_have_w32_threads='no'
363AS_IF([[test "x$with_threads" = "xauto"]], 363AS_IF([[test "x$with_threads" = "xauto"]],
364 [ 364 [
365 AS_IF([[test "x$os_is_windows" = "xyes"]], 365 AS_IF([[test "x$os_is_windows" = "xyes"]],
@@ -367,9 +367,9 @@ AS_IF([[test "x$with_threads" = "xauto"]],
367 AC_MSG_CHECKING([[for W32 threads]]) 367 AC_MSG_CHECKING([[for W32 threads]])
368 AC_LINK_IFELSE( 368 AC_LINK_IFELSE(
369 [AC_LANG_PROGRAM([#include <windows.h>], [ HANDLE h = CreateThread(NULL, 0, NULL, NULL, 0, NULL);])] 369 [AC_LANG_PROGRAM([#include <windows.h>], [ HANDLE h = CreateThread(NULL, 0, NULL, NULL, 0, NULL);])]
370 , [[HAVE_W32_THREADS='yes']], [[HAVE_W32_THREADS='no']] 370 , [[mhd_have_w32_threads='yes']], [[mhd_have_w32_threads='no']]
371 ) 371 )
372 AC_MSG_RESULT([[$HAVE_W32_THREADS]]) 372 AC_MSG_RESULT([[$mhd_have_w32_threads]])
373 ]) 373 ])
374 ] 374 ]
375) 375)
@@ -377,7 +377,7 @@ AS_IF([[test "x$with_threads" = "xauto"]],
377AC_MSG_CHECKING([[for threading lib to use with libmicrohttpd]]) 377AC_MSG_CHECKING([[for threading lib to use with libmicrohttpd]])
378AS_IF([[test "x$with_threads" = "xposix"]], 378AS_IF([[test "x$with_threads" = "xposix"]],
379 [ # forced posix threads 379 [ # forced posix threads
380 AS_IF([[test "x$HAVE_POSIX_THREADS" = "xyes"]], [[ USE_THREADS='posix' ]], 380 AS_IF([[test "x$mhd_have_posix_threads" = "xyes"]], [[ USE_THREADS='posix' ]],
381 [ AS_IF([[test "x$os_is_windows" = "xyes"]] , 381 [ AS_IF([[test "x$os_is_windows" = "xyes"]] ,
382 [ AC_MSG_ERROR([[Posix threads are not available. Try to configure --with-threads=auto]])], 382 [ AC_MSG_ERROR([[Posix threads are not available. Try to configure --with-threads=auto]])],
383 [ AC_MSG_ERROR([[No threading lib is available. Consider installing pthreads]])] ) 383 [ AC_MSG_ERROR([[No threading lib is available. Consider installing pthreads]])] )
@@ -385,15 +385,15 @@ AS_IF([[test "x$with_threads" = "xposix"]],
385 ] , 385 ] ,
386 [[ test "x$with_threads" = "xw32" ]] , 386 [[ test "x$with_threads" = "xw32" ]] ,
387 [ # forced w32 threads 387 [ # forced w32 threads
388 AS_IF([[test "x$HAVE_W32_THREADS" = "xyes"]], 388 AS_IF([[test "x$mhd_have_w32_threads" = "xyes"]],
389 [[ USE_THREADS='w32' ]], 389 [[ USE_THREADS='w32' ]],
390 [ AC_MSG_ERROR([[W32 threads are not available. Try to configure --with-threads=auto]])]) 390 [ AC_MSG_ERROR([[W32 threads are not available. Try to configure --with-threads=auto]])])
391 ] , 391 ] ,
392 [ # automatic threads lib selection 392 [ # automatic threads lib selection
393 AS_IF([[test "x$os_is_native_w32" = "xyes" && test "x$HAVE_W32_THREADS" = "xyes"]] , 393 AS_IF([[test "x$os_is_native_w32" = "xyes" && test "x$mhd_have_w32_threads" = "xyes"]] ,
394 [[ USE_THREADS='w32' ]] , 394 [[ USE_THREADS='w32' ]] ,
395 [[ test "x$HAVE_POSIX_THREADS" = "xyes" ]], [[ USE_THREADS='posix' ]], 395 [[ test "x$mhd_have_posix_threads" = "xyes" ]], [[ USE_THREADS='posix' ]],
396 [[ test "x$HAVE_W32_THREADS" = "xyes" ]], [[ USE_THREADS='w32' ]], 396 [[ test "x$mhd_have_w32_threads" = "xyes" ]], [[ USE_THREADS='w32' ]],
397 [ AC_MSG_ERROR([[No threading lib is available. Consider installing pthreads]]) ] 397 [ AC_MSG_ERROR([[No threading lib is available. Consider installing pthreads]]) ]
398 ) 398 )
399 ] 399 ]