--- configure.orig	2005-08-03 12:07:18.000000000 -0700
+++ configure	2005-08-03 12:31:31.000000000 -0700
@@ -14029,7 +14029,7 @@
 	rhapsody*)	: ${LDSHARED='cc -dynamic -bundle -undefined suppress'}
 			: ${LDFLAGS=""}
 			rb_cv_dlopen=yes ;;
-	darwin*)	: ${LDSHARED='cc -dynamic -bundle -undefined suppress -flat_namespace'}
+	darwin*)	: ${LDSHARED='cc $(RC_CFLAGS) -bundle'}
 			: ${LDFLAGS=""}
 			rb_cv_dlopen=yes ;;
 	aix*)		: ${LDSHARED='/usr/ccs/bin/ld'}
@@ -14771,10 +14771,10 @@
 	esac
 	;;
     darwin*)
-	LIBRUBY_SO='lib$(RUBY_SO_NAME).$(MAJOR).$(MINOR).$(TEENY).dylib'
-	LIBRUBY_LDSHARED='cc -dynamiclib -undefined suppress -flat_namespace'
-	LIBRUBY_DLDFLAGS='-install_name $(libdir)/lib$(RUBY_SO_NAME).dylib -current_version $(MAJOR).$(MINOR).$(TEENY) -compatibility_version $(MAJOR).$(MINOR)'
-	LIBRUBY_ALIASES='lib$(RUBY_SO_NAME).$(MAJOR).$(MINOR).dylib lib$(RUBY_SO_NAME).dylib'
+	LIBRUBY_SO='lib$(RUBY_SO_NAME).$(MAJOR).dylib'
+	LIBRUBY_LDSHARED='cc $(RC_CFLAGS) -dynamiclib'
+	LIBRUBY_DLDFLAGS='-install_name $(libdir)/lib$(RUBY_SO_NAME).$(MAJOR).dylib -current_version $(MAJOR).$(MINOR).$(TEENY) -compatibility_version $(MAJOR).$(MINOR)'
+	LIBRUBY_ALIASES='lib$(RUBY_SO_NAME).dylib'
 	;;
     interix*)
 	LIBRUBYARG_SHARED='-L${libdir} -L. -l$(RUBY_SO_NAME)'
