Allow -pthread in deplibs just as much as -lpthread. --- ltmain.sh.orig 2007-09-15 10:56:26 +0100 +++ ltmain.sh 2007-09-15 10:58:17 +0100 @@ -1635,6 +1635,7 @@ compiler_flags="$compiler_flags $arg" compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" + deplibs="$deplibs $arg" continue ;; @@ -2131,6 +2132,7 @@ finalize_deplibs="$deplib $finalize_deplibs" else compiler_flags="$compiler_flags $deplib" + test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue ;; @@ -4706,2 +4759,5 @@ esac + ;; + *-*-freebsd*) + # FreeBSD doesn't need this... ;;