aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--Makefile.in1
-rw-r--r--configure.in32
3 files changed, 19 insertions, 19 deletions
diff --git a/ChangeLog b/ChangeLog
index 0bae8e37a6..2a2e83eed5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,7 @@
-Thu Feb 21 09:51:05 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+Thu Feb 21 12:42:19 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * configure.in (libdir_basename): expand with multiarch in configure,
+ not to defer the expansion till ruby.pc.in and mkmf.rb. [Bug #7874]
* configure.in (libdir_basename): also -rpath and -install_name flags
are affected when libruby directory changes. [Bug #7874]
diff --git a/Makefile.in b/Makefile.in
index 5a21b9fa47..7a9acaa06f 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -34,7 +34,6 @@ exec_prefix = @exec_prefix@
bindir = @bindir@
sbindir = @sbindir@
libdir = @libdir@
-libdir_basename = @libdir_basename@
libexecdir = @libexecdir@
datarootdir = @datarootdir@
datadir = @datadir@
diff --git a/configure.in b/configure.in
index 6b9d5f544b..d692372f27 100644
--- a/configure.in
+++ b/configure.in
@@ -2667,6 +2667,15 @@ AS_CASE(["$target_os"],
DLDLIBS="$DLDLIBS -lc"
])
+AC_ARG_ENABLE(multiarch,
+ AS_HELP_STRING([--enable-multiarch], [enable multiarch compatible directories]),
+ [multiarch=], [unset multiarch])
+
+archlibdir='${libdir}/${arch}'
+sitearchlibdir='${libdir}/${sitearch}'
+archincludedir='${includedir}/${arch}'
+sitearchincludedir='${includedir}/${sitearch}'
+
AC_ARG_WITH(soname,
AS_HELP_STRING([--with-soname=SONAME], [base name of shared library]),
[RUBY_SO_NAME=$withval], [RUBY_SO_NAME='$(RUBY_BASE_NAME)'])
@@ -2680,7 +2689,7 @@ ENABLE_SHARED=no
AC_ARG_ENABLE(shared,
AS_HELP_STRING([--enable-shared], [build a shared library for Ruby]),
[enable_shared=$enableval])
-libprefix='$(libdir)'
+libprefix=${multiarch+'$(archlibdir)'}${multiarch-'$(libdir)'}
LIBRUBY_RELATIVE=${load_relative-no}
AS_CASE("$enable_shared", [yes], [
LIBRUBY='$(LIBRUBY_SO)'
@@ -2699,7 +2708,7 @@ AS_CASE("$enable_shared", [yes], [
AS_CASE(["$libdir"], ['${exec_prefix}/'*], [libdir_basename=`basename "$libdir"`])
fi
AC_DEFINE_UNQUOTED(LIBDIR_BASENAME, ["${libdir_basename}"])
- AC_SUBST(libdir_basename)
+ libdir_basename="${libdir_basename}"${multiarch+'/${arch}'}
AS_CASE(["$target_os"],
[freebsd*|dragonfly*], [],
@@ -2720,7 +2729,8 @@ AS_CASE("$enable_shared", [yes], [
LIBRUBY_DLDFLAGS='-Wl,-soname,lib$(RUBY_SO_NAME).so.$(MAJOR).$(MINOR)'" $LDFLAGS_OPTDIR"
LIBRUBY_ALIASES='lib$(RUBY_SO_NAME).so.$(MAJOR).$(MINOR) lib$(RUBY_SO_NAME).so'
if test "$load_relative" = yes; then
- LIBRUBY_RPATHFLAGS="'-Wl,-rpath,\$\${ORIGIN}/../\${libdir_basename}'"
+ libprefix="'\$\${ORIGIN}/../${libdir_basename}'"
+ LIBRUBY_RPATHFLAGS="-Wl,-rpath,${libprefix}"
LIBRUBY_RELATIVE=yes
fi
],
@@ -2777,7 +2787,7 @@ AS_CASE("$enable_shared", [yes], [
RUBY_SO_NAME="$RUBY_SO_NAME"'.$(MAJOR).$(MINOR).$(TEENY)'
LIBRUBY_LDSHARED='$(CC) -dynamiclib'
if test "$load_relative" = yes; then
- libprefix='@executable_path/../${libdir_basename}'
+ libprefix="@executable_path/../${libdir_basename}"
LIBRUBY_RELATIVE=yes
fi
LIBRUBY_DLDFLAGS="$LIBRUBY_DLDFLAGS "'-install_name '${libprefix}'/$(LIBRUBY_SO)'
@@ -2834,7 +2844,7 @@ AS_CASE("$enable_shared", [yes], [
])
if test "$enable_rpath" = yes; then
test -z "$LIBRUBY_RPATHFLAGS" || LIBRUBY_RPATHFLAGS="$LIBRUBY_RPATHFLAGS "
- LIBRUBY_RPATHFLAGS="$LIBRUBY_RPATHFLAGS${linker_flag}-R ${linker_flag}${libprefix} -L\$(libdir)"
+ LIBRUBY_RPATHFLAGS="$LIBRUBY_RPATHFLAGS${linker_flag}-R ${linker_flag}${libprefix} -L${libprefix}"
LIBRUBYARG_SHARED="$LIBRUBY_RPATHFLAGS $LIBRUBYARG_SHARED"
LIBRUBYARG_STATIC="$LIBRUBY_RPATHFLAGS $LIBRUBYARG_STATIC"
fi
@@ -3229,18 +3239,6 @@ AS_CASE(["$target_os"],
rubyw_install_name='$(RUBYW_INSTALL_NAME)'
])
-AC_ARG_ENABLE(multiarch,
- AS_HELP_STRING([--enable-multiarch], [enable multiarch compatible directories]),
- [multiarch=], [unset multiarch])
-
-archlibdir='${libdir}/${arch}'
-sitearchlibdir='${libdir}/${sitearch}'
-archincludedir='${includedir}/${arch}'
-sitearchincludedir='${includedir}/${sitearch}'
-if test ${libdir_basename+set}; then
- libdir_basename="${libdir_basename}"${multiarch+'/${arch}'}
-fi
-
shvar_to_cpp() {
local var="$1" val="$2"
local exec_prefix_pat="`echo \"${exec_prefix}\" | sed 's/\\./\\\\./g'`"