From: Alan T. DeKok Date: Fri, 6 Apr 2012 13:17:12 +0000 (+0200) Subject: Re-order LIBS <-> -lpthread X-Git-Tag: release_2_2_0~145 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fd10e3b40cb09dce3c62484a8ece1866be595266;p=thirdparty%2Ffreeradius-server.git Re-order LIBS <-> -lpthread -lpthread MAY need other libraries. So adding it first is a good idea. --- diff --git a/configure b/configure index 1a845d44bde..19f85abfb0f 100755 --- a/configure +++ b/configure @@ -21024,7 +21024,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 86bf7e9c809..cfa63bcc721 100644 --- a/configure.in +++ b/configure.in @@ -500,7 +500,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" ]