summaryrefslogtreecommitdiffstats
path: root/ext/sqlite3_api/extconf.rb
diff options
context:
space:
mode:
authorJamis Buck <jamis@37signals.com>2005-09-11 17:01:27 +0000
committerJamis Buck <jamis@37signals.com>2005-09-11 17:01:27 +0000
commit1a1e6741788be3bd7c294e698ca77edc7cd44a9f (patch)
tree9a4d704e713ea96823a2735ac240a8948742f335 /ext/sqlite3_api/extconf.rb
parent03076057704ced9a2e1bc7bca829299a459bc07d (diff)
downloadthird_party-sqlite3-ruby-1a1e6741788be3bd7c294e698ca77edc7cd44a9f.tar.gz
third_party-sqlite3-ruby-1a1e6741788be3bd7c294e698ca77edc7cd44a9f.tar.xz
third_party-sqlite3-ruby-1a1e6741788be3bd7c294e698ca77edc7cd44a9f.zip
Fix a few broken tests (and comment out a few that appear to be broken due to sqlite3 bugs). Add a pre-built sqlite3_api_wrap.c and make the extconf.rb not try to build it every time. Make extconf.rb die if asked to build the wrap.c file and swig is not installed.
Diffstat (limited to 'ext/sqlite3_api/extconf.rb')
-rw-r--r--ext/sqlite3_api/extconf.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/ext/sqlite3_api/extconf.rb b/ext/sqlite3_api/extconf.rb
index 9787e33..3cf033c 100644
--- a/ext/sqlite3_api/extconf.rb
+++ b/ext/sqlite3_api/extconf.rb
@@ -1,8 +1,13 @@
require 'mkmf'
+SWIG_WRAP = "sqlite3_api_wrap.c"
+
dir_config( "sqlite3", "/usr/local" )
if have_header( "sqlite3.h" ) and have_library( "sqlite3", "sqlite3_open" )
- system "swig -ruby sqlite3_api.i"
+ 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