Sha256: 0e8777e11fa5508cb97ba6d38f683865a924587cac3075bdbe3b20515f5397bd

Contents?: true

Size: 755 Bytes

Versions: 1

Compression:

Stored size: 755 Bytes

Contents

require 'mkmf'
require 'rbconfig'

INCLUDE_DIRS = [
  RbConfig::CONFIG['includedir'],
  '/usr/include',
  '/usr/local/include',
]

LIB_DIRS = [
  RbConfig::CONFIG['libdir'],
  '/usr/lib',
  '/usr/local/lib',
]

dir_config 'qfs', INCLUDE_DIRS, LIB_DIRS

with_config('qfs-local-libs', '').split(':').each do |lib|
  $LOCAL_LIBS << " #{lib} "
end

if with_config('version-script', '0') == '1'
  $LDFLAGS << " -Wl,--version-script=#{File.expand_path('../qfs_ext.version', __FILE__)} "
end

abort '"kfs/c/qfs.h" is required' unless find_header 'kfs/c/qfs.h'
abort 'libqfsc is required' unless find_library 'qfsc', 'qfs_open'

$CFLAGS << ' -std=c99 -Wall -Wextra '

$warnflags.gsub!('-Wdeclaration-after-statement', '') if $warnflags

create_makefile 'qfs_ext'

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
qfs-0.0.13 ext/qfs/extconf.rb