[PATCH] Fix yet another --with-threads bug: using "pipe" instead of "logical OR"



Unfortunately, at the time of writing
    2bdf87e Restore behavior of --with-threads without argument

I was too concentrated on --with-threads without arguments and left
second problem in this check unattended: the test chain was built using
'|' pipe instead of '||' logical OR.

As consequence, case --with-threads=pthread remained broken, and
enabling threads by default become broken if neither --with-threads nor
--without-threads passed to configure at all.

* configure.in: use '||' for "logical OR" operator as it should to be
instead of '|' (pipe).
---
 configure.in |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/configure.in b/configure.in
index 4d540cf..627ce48 100644
--- a/configure.in
+++ b/configure.in
@@ -886,7 +886,7 @@ if test "$with_threads" = "no" ; then
 else
     echo Enabling multithreaded support
     dnl Use pthread by default
-    if test "$with_threads" = "pthread" | test "$with_threads" = "" | test "$with_threads" = "yes" ; then
+    if test "$with_threads" = "pthread" || test "$with_threads" = "" || test "$with_threads" = "yes" ; then
         AC_CHECK_HEADER(pthread.h,
 	    AC_CHECK_LIB(pthread, pthread_join,[
 	       THREAD_LIBS="-lpthread"
-- 
1.6.4.4




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]