summaryrefslogtreecommitdiff
path: root/cpp
diff options
context:
space:
mode:
authorDarryl L. Pierce <mcpierce@apache.org>2013-06-19 14:08:42 +0000
committerDarryl L. Pierce <mcpierce@apache.org>2013-06-19 14:08:42 +0000
commit37d5fa248b71809a9a05bc9ec22c6db7fcf0eb4e (patch)
tree260c95f8d8cdbc0ce7d8100dcc2073bda914baf2 /cpp
parentf3778d36b3b496804ddb8589af2ed162bf4c8284 (diff)
downloadqpid-python-37d5fa248b71809a9a05bc9ec22c6db7fcf0eb4e.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/qpid@1494628 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp')
-rw-r--r--cpp/bindings/qpid/ruby/ext/cqpid/extconf.rb12
1 files changed, 10 insertions, 2 deletions
diff --git a/cpp/bindings/qpid/ruby/ext/cqpid/extconf.rb b/cpp/bindings/qpid/ruby/ext/cqpid/extconf.rb
index fc9e65d562..27cb41af3c 100644
--- a/cpp/bindings/qpid/ruby/ext/cqpid/extconf.rb
+++ b/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')