File: extconf.rb

package info (click to toggle)
sqlite3-ruby 1.2.2-1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 1,012 kB
  • ctags: 1,054
  • sloc: ruby: 4,252; ansic: 2,312; makefile: 61; sh: 12
file content (16 lines) | stat: -rw-r--r-- 457 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
require 'mkmf'

SWIG_WRAP = "sqlite3_api_wrap.c"

dir_config( "sqlite3", "/usr/local" )

have_library( "rt", "fdatasync" )

if have_header( "sqlite3.h" ) && have_library( "sqlite3", "sqlite3_open" )
  if !File.exists?( SWIG_WRAP ) || with_config( "swig", false )
    puts "creating #{SWIG_WRAP}"
    system "swig -ruby sqlite3_api.i" or raise "could not build wrapper via swig (perhaps swig is not installed?)"
  end

  create_makefile( "sqlite3_api" )
end