$NetBSD: patch-aa,v 1.2 2004/11/29 08:20:06 taca Exp $ --- configure.in.orig 2003-12-25 04:19:12.000000000 +0900 +++ configure.in @@ -864,6 +864,12 @@ if test "$with_dln_a_out" != yes; then osf*) : ${LDSHARED="ld -shared -expect_unresolved \"*\""} rb_cv_dlopen=yes ;; linux*) : ${LDSHARED="$CC -shared"} + if test "$rb_cv_binary_elf" = yes; then + LDFLAGS="$LDFLAGS -Wl,-export-dynamic" + DLDFLAGS="$DLDFLAGS "'-Wl,-soname,$(.TARGET)' + LIBPATHFLAG=' -L%1$-s' + RPATHFLAG=' -Wl,-R%1$-s' + fi rb_cv_dlopen=yes ;; gnu*) : ${LDSHARED="$CC -shared"} rb_cv_dlopen=yes @@ -879,6 +885,7 @@ if test "$with_dln_a_out" != yes; then netbsd*) : ${LDSHARED='${CC} -shared'} if test "$rb_cv_binary_elf" = yes; then LDFLAGS="$LDFLAGS -Wl,-export-dynamic" + DLDFLAGS="$DLDFLAGS "'-Wl,-soname,$(.TARGET)' LIBPATHFLAG=' -L%1$-s' RPATHFLAG=' -Wl,-R%1$-s' fi @@ -1157,6 +1164,7 @@ if test "$enable_shared" = 'yes'; then ;; linux*) LIBRUBY_DLDFLAGS='-Wl,-soname,lib$(RUBY_SO_NAME).so.$(MAJOR).$(MINOR)' + LIBRUBYARG_SHARED='-Wl,-R -Wl,${libdir} -L${libdir} -L. -l$(RUBY_SO_NAME)' LIBRUBY_ALIASES='lib$(RUBY_SO_NAME).so.$(MAJOR).$(MINOR) lib$(RUBY_SO_NAME).so' ;; gnu*) @@ -1187,6 +1195,13 @@ if test "$enable_shared" = 'yes'; then LIBRUBY_SO='lib$(RUBY_INSTALL_NAME).so.$(MAJOR).'`expr ${MINOR} \* 10 + ${TEENY}` ;; solaris*) + SOLIBS='$(LIBS)' + LIBRUBY_SO='lib$(RUBY_SO_NAME).so.$(MAJOR)' + LIBRUBY_ALIASES='lib$(RUBY_SO_NAME).so.$(MAJOR).$(MINOR).$(TEENY) lib$(RUBY_SO_NAME).so' + if test "$GCC" = yes; then + LIBRUBY_DLDFLAGS="$DLDFLAGS "'-Wl,-h,$(.TARGET)' + LIBRUBYARG_SHARED='-Wl,-R -Wl,${libdir} -L${libdir} -L. -l$(RUBY_SO_NAME)' + fi XLDFLAGS="$XLDFLAGS "'-R${libdir}' ;; hpux*)