--- configure.orig	2009-12-30 17:56:37.000000000 -0600
+++ configure	2010-11-19 17:09:55.000000000 -0600
@@ -3080,66 +3080,6 @@
 #     mymakefile="Makefile.aix"
       ;;
    *apple-darwin*)
-      { echo "$as_me:$LINENO: checking for which Mac OSX -arch flags are supported" >&5
-echo $ECHO_N "checking for which Mac OSX -arch flags are supported... $ECHO_C" >&6; }
-valid_arch_flags=""
-found_arch_flags=""
-arch_flags="ppc ppc64 x86_64 i386"
-for a in $arch_flags; do
-  save_ldflags="$LDFLAGS"
-  LDFLAGS="$LDFLAGS -arch $a"
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include <stdio.h>
-int
-main ()
-{
-exit(0)
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_link") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext &&
-       $as_test_x conftest$ac_exeext; then
-  valid_arch_flags="$valid_arch_flags -arch $a";found_arch_flags="$found_arch_flags $a"
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	a="$a"
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
-      conftest$ac_exeext conftest.$ac_ext
-  LDFLAGS="$save_ldflags"
-done
-{ echo "$as_me:$LINENO: result: $found_arch_flags" >&5
-echo "${ECHO_T}$found_arch_flags" >&6; }
-
-
-      SYS_DEFS="$valid_arch_flags"
-      EEXTRA="$valid_arch_flags"
       ;;
    *dec-osf*)
       ;;
@@ -9574,10 +9514,9 @@
                 #
 # MH                LD_RXLIB_A1="${CC} -bundle -flat_namespace -undefined suppress -o \$(@)"
 # MH                LD_RXLIB_A2="${CC} -bundle -flat_namespace -undefined suppress -o \$(@)"
-                EEXTRA="$valid_arch_flags"
-                LD_RXLIB_A1="${CC} ${EEXTRA} -dynamiclib ${LDFLAGS} -o \$(@)"
-                LD_RXLIB_A2="${CC} ${EEXTRA} -dynamiclib ${LDFLAGS} -o \$(@)"
-                LD_RXLIB_UTILA="${CC} ${EEXTRA} -dynamiclib ${LDFLAGS} -o \$(@)"
+                LD_RXLIB_A1="${CC} ${EEXTRA} -dynamiclib ${LDFLAGS} -install_name ${libdir}/\$(@) -o \$(@)"
+                LD_RXLIB_A2="${CC} ${EEXTRA} -dynamiclib ${LDFLAGS} -install_name ${libdir}/\$(@) -o \$(@)"
+                LD_RXLIB_UTILA="${CC} ${EEXTRA} -dynamiclib ${LDFLAGS} -install_name ${libdir}/\$(@) -o \$(@)"
                 LD_RXLIB_B1="-L. -l${SHLFILE} -lc \$(SHLIBS)"
                 LD_RXLIB_B2="-L. -l${SHLFILE} -lc \$(SHLIBS)"
                 LD_RXLIB_UTILB="-L. -l${SHLFILE} -lc \$(SHLIBS)"
@@ -9585,7 +9524,7 @@
                 SHLPRE="lib"
 # MH                BUNDLE=".so"
                 BUNDLE=".junk"
-                SHL_LD="${CC} ${EEXTRA} -dynamiclib ${LDFLAGS} -install_name ${SHLPRE}${SHLFILE}${SHLPST} -o ${SHLPRE}${SHLFILE}${SHLPST} "'$('SHOFILES')'
+                SHL_LD="${CC} ${EEXTRA} -dynamiclib ${LDFLAGS} -install_name ${libdir}/${SHLPRE}${SHLFILE}${SHLPST} -o ${SHLPRE}${SHLFILE}${SHLPST} "'$('SHOFILES')'
                 SHL_BASE="${LIBPRE}${SHLFILE}${SHLPST}"
 # MH                EXTRATARGET="libregina$BUNDLE"
                 OTHER_INSTALLS="installlib"
