From 6d3ceb6ce38f91898dfc388fc96f5401ff3edc52 Mon Sep 17 00:00:00 2001 From: nobu Date: Thu, 19 Feb 2009 05:48:14 +0000 Subject: * configure.in, */Makefile.sub (LOAD_RELATIVE): moved from ruby.c git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22436 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 4 ++++ bcc32/Makefile.sub | 1 + configure.in | 14 ++++++++------ ruby.c | 4 ---- win32/Makefile.sub | 1 + 5 files changed, 14 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8140e8e1c2..4fbd2588d9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Thu Feb 19 14:48:12 2009 Nobuyoshi Nakada + + * configure.in, */Makefile.sub (LOAD_RELATIVE): moved from ruby.c + Thu Feb 19 14:39:53 2009 Nobuyoshi Nakada * configure.in (darwin): uses -unexported_symbol option of ld instead diff --git a/bcc32/Makefile.sub b/bcc32/Makefile.sub index 2434b2fef2..15e9669060 100644 --- a/bcc32/Makefile.sub +++ b/bcc32/Makefile.sub @@ -354,6 +354,7 @@ $(CONFIG_H): $(MKFILES) $(srcdir)/bcc32/Makefile.sub \#define NEED_IO_SEEK_BETWEEN_RW 1 \#define STACK_GROW_DIRECTION -1 \#define DEFAULT_KCODE KCODE_NONE +\#define LOAD_RELATIVE 1 \#define DLEXT ".so" \#define RUBY_LIB "/lib/ruby/$(MAJOR).$(MINOR).$(TEENY)" \#define RUBY_SITE_LIB "/lib/ruby/site_ruby" diff --git a/configure.in b/configure.in index bdbffb06e9..76b825b715 100644 --- a/configure.in +++ b/configure.in @@ -1664,7 +1664,11 @@ else when(nextstep*|openstep*|rhapsody*|darwin*) DLEXT=bundle;; when(os2-emx*) + LOAD_RELATIVE=1 DLEXT=dll;; + when(cygwin*|mingw*|*djgpp*) + LOAD_RELATIVE=1 + DLEXT=so;; when(*) DLEXT=so;; esac @@ -2132,18 +2136,16 @@ AC_ARG_WITH(vendordir, [vendordir='${libdir}/${RUBY_INSTALL_NAME}/vendor_ruby']) VENDOR_DIR=`eval echo \\"${vendordir}\\"` -case "$target_os" in - when(cygwin*|mingw*|*djgpp*|os2-emx*) +if test "${LOAD_RELATIVE+set}"; then + AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE) RUBY_LIB_PREFIX="`eval echo "$RUBY_LIB_PREFIX" | sed 's|^NONE/|/|;s|^'"$prefix"'/|/|'`" RUBY_SITE_LIB_PATH="`eval echo "$SITE_DIR" | sed 's|^NONE/|/|;s|^'"$prefix"'/|/|'`" RUBY_VENDOR_LIB_PATH="`eval echo "$VENDOR_DIR" | sed 's|^NONE/|/|;s|^'"$prefix"'/|/|'`" - ;; - when(*) +else RUBY_LIB_PREFIX="`eval echo \\"$RUBY_LIB_PREFIX\\" | sed 's|^NONE/|'"$prefix"'/|'`" RUBY_SITE_LIB_PATH="`eval echo \\"$SITE_DIR\\" | sed 's|^NONE/|'"$prefix"'/|'`" RUBY_VENDOR_LIB_PATH="`eval echo \\"$VENDOR_DIR\\" | sed 's|^NONE/|'"$prefix"'/|'`" - ;; -esac +fi pat="$RUBY_LIB_PREFIX/"'\(.*\)' RUBY_LIB_PATH='RUBY_LIB_PREFIX"/"RUBY_LIB_VERSION' diff --git a/ruby.c b/ruby.c index 3821b939d8..950c3e1ce0 100644 --- a/ruby.c +++ b/ruby.c @@ -331,10 +331,6 @@ ruby_incpush_expand(const char *path) ruby_push_include(path, expand_include_path); } -#if (defined DOSISH || defined __CYGWIN__) && !defined __SYMBIAN32__ -#define LOAD_RELATIVE 1 -#endif - #if defined _WIN32 || defined __CYGWIN__ static HMODULE libruby; diff --git a/win32/Makefile.sub b/win32/Makefile.sub index 765951be83..8af191e1fb 100644 --- a/win32/Makefile.sub +++ b/win32/Makefile.sub @@ -488,6 +488,7 @@ $(CONFIG_H): $(MKFILES) $(srcdir)/win32/Makefile.sub $(win_srcdir)/Makefile.sub !endif #define CANONICALIZATION_FOR_MATHN 1 #define DEFAULT_KCODE KCODE_NONE +#define LOAD_RELATIVE 1 #define DLEXT ".so" #define RUBY_LIB_VERSION STRINGIZE(RUBY_VERSION_MAJOR)"."STRINGIZE(RUBY_VERSION_MINOR)"."STRINGIZE(RUBY_VERSION_TEENY) #define RUBY_LIB_PREFIX "/lib/$(RUBY_INSTALL_NAME)" -- cgit v1.2.3