Sha256: 796ca5999e25e0f243955704ed88a3bb03b493dea1d34614b06d804b9c0eeddc

Contents?: true

Size: 545 Bytes

Versions: 3

Compression:

Stored size: 545 Bytes

Contents

require 'rbconfig'
require 'mkmf'

# This is pretty terrible, but we need to have the environment set up
# before we require the ffi-clang module.

module LibDetect

  DARWIN_LIBCLANG = '/Library/Developer/CommandLineTools/usr/lib/libclang.dylib'

  host_os = RbConfig::CONFIG['host_os']
  case host_os
  when /darwin/
    File.exist? DARWIN_LIBCLANG
    ENV['LIBCLANG'] = DARWIN_LIBCLANG
  when /linux/
    prog = 'llvm-config'
    if find_executable(prog) and not ENV.has_key?('LLVM_CONFIG')
      ENV['LLVM_CONFIG'] = prog
    end
  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
docurium-0.7.0 lib/libdetect.rb
docurium-0.6.0 lib/libdetect.rb
docurium-0.5.0 lib/libdetect.rb