Sha256: 09e175dd29dc92671d6051269bcac81f06af9c21011f4ce7121a39a2c110b78a

Contents?: true

Size: 1.23 KB

Versions: 2

Compression:

Stored size: 1.23 KB

Contents

ENV['RC_ARCHS'] = '' if RUBY_PLATFORM =~ /darwin/

# :stopdoc:

require 'mkmf'

LIBDIR      = Config::CONFIG['libdir']
INCLUDEDIR  = Config::CONFIG['includedir']

$CFLAGS << " -O3 -Wall -Wcast-qual -Wwrite-strings -Wconversion -Wmissing-noreturn -Winline"

HEADER_DIRS = [
  # First search /opt/local for macports
  '/opt/local/include',

  # Then search /usr/local for people that installed from source
  '/usr/local/include',

  # Check the ruby install locations
  INCLUDEDIR,

  # Finally fall back to /usr
  '/usr/include',
]

LIB_DIRS = [
  # First search /opt/local for macports
  '/opt/local/lib',

  # Then search /usr/local for people that installed from source
  '/usr/local/lib',

  # Check the ruby install locations
  LIBDIR,

  # Finally fall back to /usr
  '/usr/lib',
]

nfc_dirs = dir_config('nfc', '/opt/local/include', '/opt/local/lib')
unless ["", ""] == nfc_dirs
  HEADER_DIRS.unshift nfc_dirs.first
  LIB_DIRS.unshift nfc_dirs[1]
end

unless find_header('libnfc/libnfc.h', *HEADER_DIRS)
  abort "libnfc is missing.  please install libnfc: http://libnfc.org/"
end

unless find_library('nfc', 'nfc_connect', *LIB_DIRS)
  abort "libnfc is missing.  please install libnfc: http://libnfc.org/"
end

create_makefile('nfc/nfc')

# :startdoc:

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
nfc-2.0.1 ext/nfc/extconf.rb
nfc-2.0.0 ext/nfc/extconf.rb