diff --git a/configure b/configure index 8191dbc89..05a3a6427 100755 --- a/configure +++ b/configure @@ -1307,9 +1307,9 @@ fi fi elif test "`echo $host_os|sed 's/[0-9].*//'|sed s/elf//`" = freebsd; then - LIBS="-pthread -lobjc" + LIBS="-lobjc -lpthread" if test "$cross_compiling" = yes; then - objc_threaded="-pthread" + objc_threaded="-lpthread" else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then - objc_threaded="-pthread" + objc_threaded="-lpthread" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 diff --git a/configure.in b/configure.in index a883a0b51..accb5ccc6 100644 --- a/configure.in +++ b/configure.in @@ -202,9 +202,9 @@ if test $host_os = linux-gnu; then objc_threaded="", objc_threaded="-lpcthread") fi elif test "`echo $host_os|sed 's/[[0-9]].*//'|sed s/elf//`" = freebsd; then - LIBS="-pthread -lobjc" - AC_TRY_RUN([#include "config/config_thread.m"], objc_threaded="-pthread", - objc_threaded="", objc_threaded="-pthread") + LIBS="-lobjc -lpthread" + AC_TRY_RUN([#include "config/config_thread.m"], objc_threaded="-lpthread", + objc_threaded="", objc_threaded="-lpthread") else LIBS="-lobjc $LIBS $extra_LIBS" AC_TRY_RUN([#include "config/config_thread.m"], objc_threaded="-lthread",