Sha256: 3d9d745d0b088ce6ea273e23a81b93d7a042df314b29d3738d0d8db407316a70

Contents?: true

Size: 765 Bytes

Versions: 6

Compression:

Stored size: 765 Bytes

Contents

require 'mkmf'

HEADER_DIRS = [
  '/opt/local/include', # MacPorts
  '/usr/local/include', # compiled from source and Homebrew
  '/usr/include',       # system
]

LIB_DIRS = [
  '/opt/local/lib', # MacPorts
  '/usr/local/lib', # compiled from source and Homebrew
  '/usr/lib',       # system
]

$CFLAGS << ' -Wall' if ENV['WALL']
$LDFLAGS << ' -static-libgcc' if RUBY_PLATFORM =~ /cygwin|mingw|mswin/

dir_config('magic', HEADER_DIRS, LIB_DIRS)
dir_config('gnurx', HEADER_DIRS, LIB_DIRS)

have_library('gnurx')

if have_library('magic', 'magic_open') && have_header('magic.h')
  have_func('magic_version')
  have_header('file/patchlevel.h')
  create_makefile('filemagic/ruby_filemagic')
else
  abort '*** ERROR: missing required library to compile this module'
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
ruby-filemagic-0.7.2-x86-mswin32-60 ext/filemagic/extconf.rb
ruby-filemagic-0.7.2-x86-mingw32 ext/filemagic/extconf.rb
ruby-filemagic-0.7.2 ext/filemagic/extconf.rb
ruby-filemagic-0.7.1-x86-mingw32 ext/filemagic/extconf.rb
ruby-filemagic-0.7.1-x86-mswin32-60 ext/filemagic/extconf.rb
ruby-filemagic-0.7.1 ext/filemagic/extconf.rb