From: Alan T. DeKok Date: Fri, 6 Apr 2012 13:19:46 +0000 (+0200) Subject: Re-order LIBS <-> -lpthread X-Git-Tag: release_3_0_0_beta0~238 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fce295539c25f25ea7a14df8a60ac5ee42e4d6f8;p=thirdparty%2Ffreeradius-server.git Re-order LIBS <-> -lpthread -lpthread MAY need other libraries. So adding it first is a good idea. Manual merge of fd10e3b40 --- diff --git a/configure b/configure index da6ef73436c..721bc5d1ad5 100755 --- a/configure +++ b/configure @@ -21011,7 +21011,7 @@ fi echo "${ECHO_T}$ac_cv_lib_pthread_pthread_create" >&6; } if test $ac_cv_lib_pthread_pthread_create = yes; then CFLAGS="$CFLAGS -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS" - LIBS="$LIBS -lpthread" + LIBS="-lpthread $LIBS" else { echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5 echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6; } diff --git a/configure.in b/configure.in index f22d6808ac4..7054652d02d 100644 --- a/configure.in +++ b/configure.in @@ -488,7 +488,7 @@ dnl # to do the threading properly. dnl # AC_CHECK_LIB(pthread, pthread_create, [ CFLAGS="$CFLAGS -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS" - LIBS="$LIBS -lpthread" ], + LIBS="-lpthread $LIBS" ], AC_CHECK_LIB(c_r, pthread_create, [ CFLAGS="$CFLAGS -pthread -D_THREAD_SAFE" ], [ WITH_THREADS="no" ]