$NetBSD: patch-ac,v 1.2 2006/06/23 12:56:26 salo Exp $ --- configure.orig 2006-06-17 01:09:19.000000000 +0200 +++ configure 2006-06-23 14:13:20.000000000 +0200 @@ -19435,13 +19435,13 @@ if test "${enable_pthread+set}" = set; t enableval=$enable_pthread; if test "$enableval" = "yes"; then -{ echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthread" >&5 -echo $ECHO_N "checking for pthread_mutex_init in -lpthread... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: checking for pthread_mutex_init in ${PTHREAD_LDFLAGS} ${PTHREAD_LIBS}" >&5 +echo $ECHO_N "checking for pthread_mutex_init in ${PTHREAD_LDFLAGS} ${PTHREAD_LIBS}... $ECHO_C" >&6; } if test "${ac_cv_lib_pthread_pthread_mutex_init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-lpthread $LIBS" +LIBS="${PTHREAD_LDFLAGS} ${PTHREAD_LIBS} $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -19505,12 +19505,12 @@ if test $ac_cv_lib_pthread_pthread_mutex #define HAVE_LIBPTHREAD 1 _ACEOF - LIBS="-lpthread $LIBS" + LIBS="${PTHREAD_LDFLAGS} ${PTHREAD_LIBS} $LIBS" fi EXAMPLES="$EXAMPLES chm_http" - LDFLAGS="$LDFLAGS -lpthread" + LDFLAGS="$LDFLAGS ${PTHREAD_LDFLAGS} ${PTHREAD_LIBS}" else CHM_MT="" { echo "$as_me:$LINENO: WARNING: Thread safe mode turned off. chm_http will not be built" >&5 @@ -19520,13 +19520,13 @@ echo "$as_me: WARNING: Thread safe mode else -{ echo "$as_me:$LINENO: checking for pthread_mutex_init in -lpthread" >&5 -echo $ECHO_N "checking for pthread_mutex_init in -lpthread... $ECHO_C" >&6; } +{ echo "$as_me:$LINENO: checking for pthread_mutex_init in ${PTHREAD_LDFLAGS} ${PTHREAD_LIBS}" >&5 +echo $ECHO_N "checking for pthread_mutex_init in ${PTHREAD_LDFLAGS} ${PTHREAD_LIBS}... $ECHO_C" >&6; } if test "${ac_cv_lib_pthread_pthread_mutex_init+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-lpthread $LIBS" +LIBS="${PTHREAD_LDFLAGS} ${PTHREAD_LIBS} $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -19590,12 +19590,12 @@ if test $ac_cv_lib_pthread_pthread_mutex #define HAVE_LIBPTHREAD 1 _ACEOF - LIBS="-lpthread $LIBS" + LIBS="${PTHREAD_LDFLAGS} ${PTHREAD_LIBS} $LIBS" fi EXAMPLES="$EXAMPLES chm_http" - LDFLAGS="$LDFLAGS -lpthread" + LDFLAGS="$LDFLAGS ${PTHREAD_LDFLAGS} ${PTHREAD_LIBS}" fi