--- configure.old	2006-12-06 10:00:46.000000000 +0000
+++ configure	2006-12-06 10:05:34.000000000 +0000
@@ -6065,7 +6065,7 @@
         GNU-g++-*-*-*)
                 # GNU/g++ options vary with the platform:
                 case "$host" in
-                  *-*-darwin*)  ac_sobuild="${CXX-g++} -dynamiclib -install_name $soname -o " ;;
+                  *-*-darwin*)  ac_sobuild="${CXX-g++} -dynamiclib -install_name $libdir/$soname -o " ;;
                   *-*-solaris*) ac_sobuild="${CXX-g++} -shared -Wl,-h,$soname -o " ;;
                   *-*-*)        ac_sobuild="${CXX-g++} -shared -Wl,-soname,$soname -o " ;;
                 esac
