diff options
author | Valentin Bartenev <vbart@nginx.com> | 2018-12-04 17:18:00 +0300 |
---|---|---|
committer | Valentin Bartenev <vbart@nginx.com> | 2018-12-04 17:18:00 +0300 |
commit | d500e29f8818247c1eb6fe38c0d802405aa2c283 (patch) | |
tree | 95cd0f9f53121d73f4d4199cdeb4c3cc0d93b6b4 /auto/modules/ruby | |
parent | 63d16aa5f6faf6c96188188c58b4a369ec4f3a4c (diff) | |
download | unit-d500e29f8818247c1eb6fe38c0d802405aa2c283.tar.gz unit-d500e29f8818247c1eb6fe38c0d802405aa2c283.tar.bz2 |
Ruby: rpath made optional.
In most cases it is not needed because Ruby libraries are in the default path.
At the same time, rpath pointing to the default path is prohibited by rpmbuild
on Fedora.
This is related to issue #87 on GitHub.
Diffstat (limited to 'auto/modules/ruby')
-rw-r--r-- | auto/modules/ruby | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/auto/modules/ruby b/auto/modules/ruby index 05072353..7d379f2f 100644 --- a/auto/modules/ruby +++ b/auto/modules/ruby @@ -62,10 +62,9 @@ if /bin/sh -c "$NXT_RUBY -v" >> $NXT_AUTOCONF_ERR 2>&1; then NXT_RUBY_LIBNAME=`$NXT_RUBY -r rbconfig -e 'printf("%s",RbConfig::CONFIG["RUBY_SO_NAME"])'` NXT_RUBY_LIBSCONF=`$NXT_RUBY -r rbconfig -e 'printf("%s",RbConfig::CONFIG["LIBS"])'` - NXT_RUBY_LIBPATH=`$NXT_RUBY -r rbconfig -e 'printf("%s",RbConfig::CONFIG["libdir"])'` - NXT_RUBY_LIBS="-L$NXT_RUBY_LIBPATH -Wl,-rpath,${NXT_RUBY_LIBPATH} -l$NXT_RUBY_LIBNAME $NXT_RUBY_LIBSCONF" + NXT_RUBY_LIBS="-l$NXT_RUBY_LIBNAME $NXT_RUBY_LIBSCONF" - nxt_feature="Ruby" + nxt_feature="Ruby library" nxt_feature_name="" nxt_feature_run=no nxt_feature_incs="${NXT_RUBY_INCPATH}" @@ -80,6 +79,26 @@ if /bin/sh -c "$NXT_RUBY -v" >> $NXT_AUTOCONF_ERR 2>&1; then . auto/feature + if [ $nxt_found = no ]; then + NXT_RUBY_LIBPATH=`$NXT_RUBY -r rbconfig -e 'printf("%s",RbConfig::CONFIG["libdir"])'` + NXT_RUBY_LIBS="-L$NXT_RUBY_LIBPATH -Wl,-rpath,${NXT_RUBY_LIBPATH} $NXT_RUBY_LIBS" + + nxt_feature="Ruby library in $NXT_RUBY_LIBPATH" + nxt_feature_name="" + nxt_feature_run=no + nxt_feature_incs="${NXT_RUBY_INCPATH}" + nxt_feature_libs="${NXT_RUBY_LIBS}" + nxt_feature_test=" + #include <ruby.h> + + int main() { + ruby_init(); + return ruby_cleanup(0); + }" + + . auto/feature + fi + else $echo "checking for Ruby ... not found" fi |