--- a/configure.in
+++ b/configure.in
@@ -37,6 +37,7 @@
       if test x$lib != x; then
         # we want the path/name that is embedded in the dylib 
         $1_SONAME=[`otool -L $lib | grep -v lib$2.dylib | grep lib$2 | awk '{V=1; print $V}'`]
+        $1_SONAME=[`basename $$1_SONAME`]
       fi
     done
   fi