aboutsummaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-03-10 05:34:27 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-03-10 05:34:27 +0000
commitc87afba26d1f156326ed12451c15b9550cf75b40 (patch)
tree7876d7d9da968c805468324b8d2f87a0e924a714 /configure.in
parenta865326210f85dcbe2554219bd0e7bc3ba457f58 (diff)
downloadruby-c87afba26d1f156326ed12451c15b9550cf75b40.tar.gz
configure.in: RUBY_SO_NAME as --with-soname
* configure.in (RUBY_SO_NAME): [EXPERIMENTAL] use the given name literally if --with-soname is specified. [ruby-core:79972] [Misc #13296] [ci skip] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57825 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in24
1 files changed, 17 insertions, 7 deletions
diff --git a/configure.in b/configure.in
index 756f499387..1cec2e33ac 100644
--- a/configure.in
+++ b/configure.in
@@ -3825,7 +3825,23 @@ 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)'])
+ [RUBY_SO_NAME=$withval],
+ [
+ AS_CASE(["$target_os"],
+ [darwin*], [
+ RUBY_SO_NAME='$(RUBY_BASE_NAME).$(RUBY_PROGRAM_VERSION)'
+ ],
+ [cygwin*], [
+ RUBY_SO_NAME='$(RUBY_BASE_NAME)$(MAJOR)$(MINOR)0'
+ ],
+ [mingw*], [
+ RUBY_SO_NAME="${rb_cv_msvcrt}"'-$(RUBY_BASE_NAME)$(MAJOR)$(MINOR)0'
+ AS_IF([test x"${target_cpu}" != xi386], [
+ RUBY_SO_NAME="${target_cpu}-${RUBY_SO_NAME}"
+ ])
+ ],
+ [RUBY_SO_NAME='$(RUBY_BASE_NAME)'])
+ ])
LIBRUBY_LDSHARED=$LDSHARED
LIBRUBY_DLDFLAGS=$DLDFLAGS
@@ -3925,7 +3941,6 @@ AS_CASE("$enable_shared", [yes], [
SOLIBS='-lm -lc'
],
[darwin*], [
- RUBY_SO_NAME="$RUBY_SO_NAME"'.$(RUBY_PROGRAM_VERSION)'
LIBRUBY_LDSHARED='$(CC) -dynamiclib'
if test "$load_relative" = yes; then
libprefix="@executable_path/../${libdir_basename}"
@@ -4157,7 +4172,6 @@ AS_CASE(["$target_os"],
fi
],
[cygwin*|mingw*], [
- RUBY_SO_NAME="${RUBY_SO_NAME}"'$(MAJOR)$(MINOR)0'
LIBRUBY_DLDFLAGS="${DLDFLAGS}"' -Wl,--out-implib=$(LIBRUBY)'
AS_CASE(["$target_os"],
[cygwin*], [
@@ -4167,10 +4181,6 @@ AS_CASE(["$target_os"],
fi
],
[mingw*], [
- RUBY_SO_NAME="${rb_cv_msvcrt}-${RUBY_SO_NAME}"
- if test x"${target_cpu}" != xi386; then
- RUBY_SO_NAME="${target_cpu}-${RUBY_SO_NAME}"
- fi
if test x"$enable_shared" = xyes; then
LIBRUBY_SO='$(RUBY_SO_NAME)'.dll
LIBRUBY_DLDFLAGS="${LIBRUBY_DLDFLAGS}"' $(RUBYDEF)'