summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-02-19 05:48:14 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-02-19 05:48:14 +0000
commit617abc091ea08c03e1f69277e6a1cb20f68c4513 (patch)
tree84e1e4fe2fc00341d7253e24221a2412e21b2144
parentfbceb40b901b71b0066c33ce96db8647cd3a31c8 (diff)
downloadruby-617abc091ea08c03e1f69277e6a1cb20f68c4513.tar.gz
ruby-617abc091ea08c03e1f69277e6a1cb20f68c4513.tar.xz
ruby-617abc091ea08c03e1f69277e6a1cb20f68c4513.zip
* configure.in, */Makefile.sub (LOAD_RELATIVE): moved from ruby.c
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@22436 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog4
-rw-r--r--bcc32/Makefile.sub1
-rw-r--r--configure.in14
-rw-r--r--ruby.c4
-rw-r--r--win32/Makefile.sub1
5 files changed, 14 insertions, 10 deletions
diff --git a/ChangeLog b/ChangeLog
index 8140e8e1c..4fbd2588d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Thu Feb 19 14:48:12 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * configure.in, */Makefile.sub (LOAD_RELATIVE): moved from ruby.c
+
Thu Feb 19 14:39:53 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
* configure.in (darwin): uses -unexported_symbol option of ld instead
diff --git a/bcc32/Makefile.sub b/bcc32/Makefile.sub
index 2434b2fef..15e966906 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 bdbffb06e..76b825b71 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 3821b939d..950c3e1ce 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 765951be8..8af191e1f 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)"