Sha256: 095d269a25ac2fe3b6f8877de10ca3b25543e0eb329c7cd3dd56f673f48af80c

Contents?: true

Size: 912 Bytes

Versions: 1

Compression:

Stored size: 912 Bytes

Contents

=begin
  usage: ruby extconf.rb [options ...]
  configure options:
    --with-opt-dir=/path/to/libraries
    --with-jpeg-include=dir
    --with-jpeg-lib=dir
    --with-png-include=dir
    --with-png-lib=dir
    --with-tiff-include=dir
    --with-tiff-lib=dir
=end
require 'mkmf'
require 'rbconfig'
$libs = append_library($libs, "stdc++")

if File.exists?('/sw')
  DARWIN_PORT_DIR = '/sw'
else
  DARWIN_PORT_DIR = '/opt/local'
end

if RUBY_PLATFORM =~ /darwin/
  dir_config('jpeg', DARWIN_PORT_DIR)
  dir_config('png', DARWIN_PORT_DIR)
  dir_config('tiff', DARWIN_PORT_DIR)
else
  dir_config('jpeg')
  dir_config('png')
  dir_config('tiff')
end

if have_header('jpeglib.h') && have_library('jpeg')
  $CFLAGS += ' -DUSE_JPG'
end

if have_header('png.h') && have_library('png')
  $CFLAGS += ' -DUSE_PNG'
end

if have_header('tiff.h') && have_library('tiff')
  $CFLAGS += ' -DUSE_TIFF'
end
create_makefile('rqr/QR')

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
maxtsap_rqr-0.1.1 ext/rqr/extconf.rb