ext/duckdb/extconf.rb in duckdb-0.10.2.0 vs ext/duckdb/extconf.rb in duckdb-1.0.0.0
- old
+ new
@@ -27,18 +27,22 @@
'/opt/local/lib'
)
have_func(func, 'duckdb.h')
return if found
+ raise_not_found_library(library, version)
+end
+
+def raise_not_found_library(library, version)
library_name = duckdb_library_name(library)
msg = "#{library_name} is not found. Install #{library_name} of duckdb >= #{version}."
print_message(msg)
raise msg
end
def duckdb_library_name(library)
- "lib#{library}.(so|dylib|dll)"
+ "lib#{library}.#{RbConfig::CONFIG['DLEXT']}"
end
def print_message(msg)
print <<~END_OF_MESSAGE
@@ -58,9 +62,12 @@
have_func('duckdb_bind_parameter_index', 'duckdb.h')
# check duckdb >= 0.10.0
have_func('duckdb_appender_column_count', 'duckdb.h')
-# duckdb_parameter_name is not found on Windows.
+# check duckdb >= 1.0.0
+have_func('duckdb_fetch_chunk', 'duckdb.h')
+
+# duckdb_parameter_name in duckdb <= 0.9.1 is not found on Windows.
have_func('duckdb_parameter_name', 'duckdb.h')
create_makefile('duckdb/duckdb_native')