Index: config.lib =================================================================== --- config.lib (revision 20214) +++ config.lib (working copy) @@ -1421,7 +1421,7 @@ fi if [ "$with_zlib" != "0" ]; then - if [ "$enable_static" != "0" ] && [ "$os" != "OSX" ]; then + if [ "$enable_static" != "0" ]; then LIBS="$LIBS $zlib" else LIBS="$LIBS -lz" @@ -1430,7 +1430,7 @@ fi if [ "$with_lzo2" != "0" ]; then - if [ "$enable_static" != "0" ] && [ "$os" != "OSX" ]; then + if [ "$enable_static" != "0" ]; then LIBS="$LIBS $lzo2" else LIBS="$LIBS -llzo2" @@ -1530,7 +1530,11 @@ if [ "$with_iconv" != "0" ]; then CFLAGS="$CFLAGS -DWITH_ICONV" if [ "$link_to_iconv" = "yes" ]; then - LIBS="$LIBS -liconv" + if [ "$enable_static" != "0" ]; then + LIBS="$LIBS $iconv" + else + LIBS="$LIBS -liconv" + fi if [ "$with_iconv" != "2" ]; then CFLAGS="$CFLAGS -I$with_iconv/include" LIBS="$LIBS -L$with_iconv/lib" @@ -2332,7 +2336,7 @@ fi eval "res=\$$2" - if [ -n "$res" ] && ( [ -n "$force_static" ] || ( [ "$enable_static" != "0" ] && [ "$os" != "OSX" ] ) ); then + if [ -n "$res" ] && ( [ -n "$force_static" ] || [ "$enable_static" != "0" ] ); then eval "res=\$$2" log 2 " trying $res... found" # Now find the static lib, if needed @@ -2350,6 +2354,11 @@ eval "res=\$$2" if [ -z "$res" ]; then log 2 " trying /usr/local/lib/$3... no" + eval "$2=`ls /opt/local/lib/*.a 2>/dev/null | egrep \"\/$3\$\"`" + fi + eval "res=\$$2" + if [ -z "$res" ]; then + log 2 " trying /opt/local/lib/$3... no" eval "$2=`ls /mingw/lib/*.a 2>/dev/null | egrep \"\/$3\$\"`" fi eval "res=\$$2" @@ -2702,8 +2711,11 @@ # Try to find iconv.h, seems to only thing to detect iconv with if [ "$with_iconv" = "1" ] || [ "$with_iconv" = "" ] || [ "$with_iconv" = "2" ]; then - iconv=`ls -1 /usr/include 2>/dev/null | grep "iconv.h"` + detect_library "$with_iconv" "iconv" "libiconv.a" "" "iconv.h" if [ -z "$iconv" ]; then + iconv=`ls -1 /usr/include 2>/dev/null | grep "iconv.h"` + fi + if [ -z "$iconv" ]; then iconv=`ls -1 /usr/local/include 2>/dev/null | grep "iconv.h"` fi else