ext/utf8/extconf.rb in ruby-odbc-0.9998 vs ext/utf8/extconf.rb in ruby-odbc-0.9999

- old
+ new

@@ -1,7 +1,11 @@ require 'mkmf' +if ! defined? PLATFORM + PLATFORM = RUBY_PLATFORM +end + def have_library_ex(lib, func="main", headers=nil) checking_for "#{func}() in -l#{lib}" do libs = append_library($libs, lib) if !func.nil? && !func.empty? && COMMON_LIBS.include?(lib) true @@ -111,9 +115,14 @@ # mingw untested !!! elsif PLATFORM =~ /(mingw|cygwin)/ then have_library("odbc32", "") have_library("odbccp32", "") have_library("user32", "") + have_func("SQLConfigDataSourceW", "odbcinst.h") + have_func("SQLWriteFileDSNW", "odbcinst.h") + have_func("SQLReadFileDSNW", "odbcinst.h") + have_func("SQLInstallerError", "odbcinst.h") + have_func("SQLInstallerErrorW", "odbcinst.h") elsif (testdlopen && PLATFORM !~ /(macos|darwin)/ && CONFIG["CC"] =~ /gcc/ && have_func("dlopen", "dlfcn.h") && have_library("dl", "dlopen")) then $LDFLAGS+=" -Wl,-init -Wl,ruby_odbc_init -Wl,-fini -Wl,ruby_odbc_fini" $CPPFLAGS+=" -DHAVE_SQLCONFIGDATASOURCE" $CPPFLAGS+=" -DHAVE_SQLINSTALLERERROR" $CPPFLAGS+=" -DUSE_DLOPEN_FOR_ODBC_LIBS"