Sha256: 3a761b30e9c650e7ebd600fa945af675614a3849c31226f150fa865a126b2129

Contents?: true

Size: 847 Bytes

Versions: 3

Compression:

Stored size: 847 Bytes

Contents

require 'rbconfig'
require 'mkmf'

if RbConfig::CONFIG['host_os'] =~ /darwin/ then
  $CFLAGS += " -DUSE_INSTANT_OSX=1 -Wall"
  $LDFLAGS += " -framework CoreServices"
elsif RbConfig::CONFIG['host_os'] =~ /win(32|64)/ or RbConfig::CONFIG['host_os'] =~ /mingw/ then
  $CFLAGS += " -DUSE_INSTANT_WINDOWS=1"
else
  if have_library("rt", "clock_gettime") then
    $CFLAGS += " -DUSE_INSTANT_CLOCK_GETTIME=1"
  elsif have_library("c", "clock_gettime") then
    $CFLAGS += " -DUSE_INSTANT_CLOCK_GETTIME=1"
  else
    raise NotImplementedError, <<-_
Unable to find the function 'clock_gettime' in either libc or librt.
Please file an issue at https://github.com/copiousfreetime/hitimes.
_
  end
end

# put in a different location if on windows so we can have fat binaries
subdir = RUBY_VERSION.gsub(/\.\d$/,'')
create_makefile("hitimes/#{subdir}/hitimes")

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
hitimes-1.2.3-x86-mingw32 ext/hitimes/c/extconf.rb
hitimes-1.2.3-java ext/hitimes/c/extconf.rb
hitimes-1.2.3 ext/hitimes/c/extconf.rb