Sha256: aee030ad29293bf31548c3d43c91ca4d1ce96ca108a4f08de0edd08bad8a23a5
Contents?: true
Size: 1.61 KB
Versions: 3
Compression:
Stored size: 1.61 KB
Contents
# Copyright (c) 2016 SolarWinds, LLC. # All rights reserved. require 'mkmf' require 'rbconfig' ext_dir = File.expand_path(File.dirname(__FILE__)) # Check if we're running in JRuby jruby = defined?(JRUBY_VERSION) ? true : false # Set the mkmf lib paths so we have no issues linking to # the AppOpticsAPM libs. ao_lib = File.join(ext_dir, 'lib') ao_include = File.join(ext_dir, 'src') # Create symlinks for the AppOpticsAPM library target = File.join(ao_lib, 'liboboe-1.0.so.0.0.0') File.symlink(target, File.join(ao_lib, 'liboboe.so')) File.symlink(target, File.join(ao_lib, 'liboboe-1.0.so.0')) dir_config('oboe', ao_include, ao_lib) if jruby || ENV.key?('APPOPTICS_URL') # Build the noop extension under JRuby and Heroku. # The oboe-heroku gem builds it's own c extension which links to # libs specific to a Heroku dyno # FIXME: For JRuby we need to remove the c extension entirely create_makefile('oboe_noop', 'noop') elsif have_library('oboe', 'oboe_config_get_revision', 'oboe.h') $libs = append_library($libs, 'oboe') $libs = append_library($libs, 'stdc++') $CFLAGS << " #{ENV['CFLAGS']}" $CPPFLAGS << " #{ENV['CPPFLAGS']}" $LIBS << " #{ENV['LIBS']}" $LDFLAGS << " #{ENV['LDFLAGS']} -Wl,-rpath=#{ao_lib}" if RUBY_VERSION < '1.9' cpp_command('g++') $CPPFLAGS << '-I./src/' end create_makefile('oboe_metal', 'src') else if have_library('oboe') $stderr.puts 'Error: The oboe gem requires an updated liboboe. Please update your liboboe packages.' end $stderr.puts 'Error: Could not find the base liboboe libraries. No tracing will occur.' create_makefile('oboe_noop', 'noop') end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
appoptics_apm-4.0.3 | ext/oboe_metal/extconf.rb |
appoptics_apm-4.0.2 | ext/oboe_metal/extconf.rb |
appoptics_apm-4.0.1-x86_64-linux | ext/oboe_metal/extconf.rb |