jorton 2003/10/29 13:11:46
Modified: build apr_threads.m4 Log: * build/apr_threads.m4: If -pthread is used to enable pthread support, also add -lpthread to LIBS to ensure that libapr depends on libpthread regardless of libtool and gcc versions. Revision Changes Path 1.9 +9 -0 apr/build/apr_threads.m4 Index: apr_threads.m4 =================================================================== RCS file: /home/cvs/apr/build/apr_threads.m4,v retrieving revision 1.8 retrieving revision 1.9 diff -u -u -r1.8 -r1.9 --- apr_threads.m4 1 Apr 2003 00:15:04 -0000 1.8 +++ apr_threads.m4 29 Oct 2003 21:11:46 -0000 1.9 @@ -130,6 +130,15 @@ fi ]) +# Some versions of libtool do not pass -pthread through +# to the compiler when given in a --mode=link line. Some +# versions of gcc ignore -pthread when linking a shared +# object. Hence, if using -pthread, always add -lpthread on +# the link line, to ensure that libapr depends on libpthread. +if test "x$ac_cv_pthreads_cflags" = "x-pthread"; then + APR_ADDTO(LIBS,[-lpthread]) +fi + AC_CACHE_CHECK(for pthreads_lib, ac_cv_pthreads_lib,[ ac_cv_pthreads_lib="" if test "$pthreads_working" != "yes"; then
