Sha256: e29b65c4ad4e6b5b7530a4de630f66b5a7bc6438cad433d50d7f5cc430bfa090
Contents?: true
Size: 1.72 KB
Versions: 7
Compression:
Stored size: 1.72 KB
Contents
#!/usr/bin/env ruby # +----------------------------------------------------------------------+ # | Licensed Materials - Property of IBM | # | | # | (C) Copyright IBM Corporation 2006, 2007. | # +----------------------------------------------------------------------+ require 'mkmf' WIN = RUBY_PLATFORM =~ /mswin/ # use ENV['DB2DIR'] or latest db2 you can find # (we need to revisit default when db2 10.x comes out) IBM_DB_DIR = (ENV['IBM_DB_DIR'] or (Dir['/opt/*/db2/*'].sort_by {|f| File.basename(f)}).last ) dir_config('IBM_DB',IBM_DB_DIR) def crash(str) printf(" extconf failure: %s\n", str) exit 1 end unless (have_library(WIN ? 'db2cli' : 'db2','SQLConnect') or find_library(WIN ? 'db2cli' : 'db2','SQLConnect', ENV['IBM_DB_LIB'])) crash(<<EOL) Unable to locate DB2 libraries. Install IBM DB2 Univeral Database or If using rake, please set the environment variables IBM_DB_DIR=/path/to/db2 (eg. /opt/IBM/db2/V9.1) IBM_DB_LIB=/path/to/db2/lib (eg. /opt/IBM/db2/V9.1/lib32) or Try passing one of the following options to extconf.rb: --with-IBM_DB-dir=/path/to/db2 (eg. /opt/IBM/db2/V9.1) --with-IBM_DB-lib=/path/to/db2/lib (eg. /opt/IBM/db2/V9.1/lib32) EOL end alias :libpathflag0 :libpathflag def libpathflag(libpath) libpathflag0 + case Config::CONFIG["arch"] when /solaris2/ libpath[0..-2].map {|path| " -R#{path}"}.join when /linux/ libpath[0..-2].map {|path| " -Wl,-rpath,#{path}"}.join else "" end end create_makefile('ibm_db')
Version data entries
7 entries across 7 versions & 1 rubygems