diff options
| author | Darryl L. Pierce <mcpierce@apache.org> | 2013-06-19 14:08:42 +0000 |
|---|---|---|
| committer | Darryl L. Pierce <mcpierce@apache.org> | 2013-06-19 14:08:42 +0000 |
| commit | 4322bdffcc0aa9af52f7cca3ec288f8764a6998b (patch) | |
| tree | ded7aa21eae852a834c6fd67b9f9fb1777dd219c /qpid/cpp | |
| parent | b5862f30af4f9c7197376ce7b207f607648ef763 (diff) | |
| download | qpid-python-4322bdffcc0aa9af52f7cca3ec288f8764a6998b.tar.gz | |
QPID-4933: Fix Ruby gem installs on Ruby > 1.8.7
Changed the cqpid extconf.rb file to use different command line options
depending on which version of Ruby is installing the gem.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1494628 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp')
| -rw-r--r-- | qpid/cpp/bindings/qpid/ruby/ext/cqpid/extconf.rb | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/qpid/cpp/bindings/qpid/ruby/ext/cqpid/extconf.rb b/qpid/cpp/bindings/qpid/ruby/ext/cqpid/extconf.rb index fc9e65d562..27cb41af3c 100644 --- a/qpid/cpp/bindings/qpid/ruby/ext/cqpid/extconf.rb +++ b/qpid/cpp/bindings/qpid/ruby/ext/cqpid/extconf.rb @@ -25,8 +25,16 @@ require 'mkmf' +(rver, rrev, rmin) = RUBY_VERSION.split('.') + +old_ruby = (rver == "1" && rrev < "9") # pre-1.9 + # Setup the build environment. -$CFLAGS = "-fPIC -fno-inline -x c++ -lstdc++" +if old_ruby + $CFLAGS = "-fPIC -fno-inline -x c++ -lstdc++" +else + $CFLAGS = "-fPIC -fno-inline" +end REQUIRED_LIBRARIES = [ 'stdc++', @@ -68,7 +76,7 @@ have_library('stdc++') REQUIRED_LIBRARIES.each {|library| require_library library} -REQUIRED_HEADERS.each {|header| require_header header} +REQUIRED_HEADERS.each {|header| require_header header} if old_ruby create_makefile('cqpid') |
