ext/extconf.rb in ruby-odbc-0.9999 vs ext/extconf.rb in ruby-odbc-0.99991

- old
+ new

@@ -96,17 +96,27 @@ 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" + if defined? have_type then + if have_type("SQLBIGINT", "sqltypes.h", "-DHAVE_LONG_LONG") then + $CPPFLAGS+=" -DHAVE_LONG_LONG" + end + end else have_library("odbc", "SQLAllocConnect") || have_library("iodbc", "SQLAllocConnect") ($have_odbcinst_h && have_library("odbcinst", "SQLConfigDataSource")) || ($have_odbcinst_h && have_library("iodbcinst", "SQLConfigDataSource")) $have_odbcinst_h && have_func("SQLInstallerError", "odbcinst.h") + if defined? have_type then + if have_type("SQLBIGINT", "sqltypes.h", "-DHAVE_LONG_LONG") then + $CPPFLAGS+=" -DHAVE_LONG_LONG" + end + end end create_makefile("odbc")