From d14bfd30b41d39ded166a3c3094ca162c0be7f5b Mon Sep 17 00:00:00 2001 From: Mike Dalessio Date: Sat, 6 Jun 2026 16:56:37 -0400 Subject: [PATCH] For sqlcipher builds, prefer sqlcipher's header Some systems may have sqlite *and* sqlcipher installed, which is what happened in May 2026 when the sqlcipher vcpkg port started pulling in the sqlite3 port as a dependency. e.g. https://github.com/sparklemotion/sqlite3-ruby/actions/runs/25789505372/job/75751706889 --- ext/sqlite3/extconf.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ext/sqlite3/extconf.rb b/ext/sqlite3/extconf.rb index d6acea6f..12f4e80f 100644 --- a/ext/sqlite3/extconf.rb +++ b/ext/sqlite3/extconf.rb @@ -105,10 +105,10 @@ def configure_packaged_libraries def configure_extension append_cflags("-fvisibility=hidden") # see https://github.com/rake-compiler/rake-compiler-dock/issues/87 - if find_header("sqlite3.h") - # noop - elsif sqlcipher? && find_header("sqlcipher/sqlite3.h") + if sqlcipher? && find_header("sqlcipher/sqlite3.h") append_cppflags("-DUSING_SQLCIPHER_INC_SUBDIR") + elsif find_header("sqlite3.h") + # noop else abort_could_not_find("sqlite3.h") end