$NetBSD: patch-ab,v 1.14 2010/09/10 03:29:00 taca Exp $ * Adding Interix support. --- configure.orig 2010-06-23 05:38:48.000000000 +0000 +++ configure @@ -6212,6 +6212,9 @@ bsdi*) LIBS="-lm $LIBS" $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h ac_cv_sizeof_rlim_t=8;; +interix3*) LIBS="-lm $LIBS" + ac_cv_func_getpgrp_void=yes + ;; freebsd*) LIBS="-lm $LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lxpg4 has to be linked" >&5 $as_echo_n "checking whether -lxpg4 has to be linked... " >&6; } @@ -10196,6 +10199,13 @@ fi LDFLAGS="$LDFLAGS -Wl,-export-dynamic" fi rb_cv_dlopen=yes ;; + interix3*) : ${LDSHARED='${CC} -shared'} + LDFLAGS="$LDFLAGS -Wl,-E" + # use special random-slot linkage in 0x[56]XXXXXXX + DLDFLAGS="$DLDFLAGS "'-Wl,-h,$(.TARGET) -Wl,--image-base,$$(($$RANDOM %4096/2*262144+1342177280))' + LIBPATHFLAG=' -L%1$-s' + RPATHFLAG=' -Wl,-R%1$-s' + rb_cv_dlopen=yes ;; interix*) : ${LDSHARED="$CC -shared"} XLDFLAGS="$XLDFLAGS -Wl,-E" LIBPATHFLAG=" -L%1\$-s" @@ -10724,6 +10734,14 @@ if test "$enable_shared" = 'yes'; then 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' ;; + interix3*) + SOLIBS='$(LIBS)' + LIBRUBY_SO='lib$(RUBY_SO_NAME).so.$(MAJOR)$(MINOR).$(TEENY)' + # link explicitly to 0x48000000 + LIBRUBY_DLDFLAGS='-Wl,-h,lib$(RUBY_SO_NAME).so.$(MAJOR)$(MINOR) -Wl,--image-base,1207959552' + 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' + ;; interix*) LIBRUBYARG_SHARED='-L. -L${libdir} -l$(RUBY_SO_NAME)' ;; @@ -10733,6 +10751,7 @@ if test "$enable_shared" = 'yes'; then fi if test "$enable_rpath" = yes; then LIBRUBYARG_SHARED="${linker_flag}-R ${linker_flag}\$(libdir) -L\$(libdir) $LIBRUBYARG_SHARED" + LIBRUBY_DLDFLAGS="${linker_flag}-R ${linker_flag}\$(libdir) -L\$(libdir) $LIBRUBY_DLDFLAGS" fi LDFLAGS="-L. $LDFLAGS"