diff --git a/Misc/NEWS.d/next/Build/2026-10-19-13-49-39.gh-issue-54767.IdrGm6.rst b/Misc/NEWS.d/next/Build/2026-10-19-13-49-39.gh-issue-54767.IdrGm6.rst new file mode 100644 index 000000000000000..6154892709ee12d --- /dev/null +++ b/Misc/NEWS.d/next/Build/2026-10-19-13-49-39.gh-issue-54767.IdrGm6.rst @@ -0,0 +1,3 @@ +The ``--enable-loadable-sqlite-extensions=no`` and +``--disable-loadable-sqlite-extensions`` configure options now disable +loadable SQLite extensions instead of enabling them. diff --git a/configure b/configure index 217d8e135600e16..487104a7aabce49 100755 --- a/configure +++ b/configure @@ -18014,35 +18014,42 @@ printf %s "checking for --enable-loadable-sqlite-extensions... " >&6; } if test ${enable_loadable_sqlite_extensions+y} then : enableval=$enable_loadable_sqlite_extensions; - if test "x$have_sqlite3_load_extension" = xno +else case e in #( + e) enable_loadable_sqlite_extensions=no + ;; +esac +fi + +if test "x$enable_loadable_sqlite_extensions" = xyes +then : + + if test "x$have_sqlite3_load_extension" = xno then : - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: n/a" >&5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: n/a" >&5 printf "%s\n" "n/a" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Your version of SQLite does not support loadable extensions" >&5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Your version of SQLite does not support loadable extensions" >&5 printf "%s\n" "$as_me: WARNING: Your version of SQLite does not support loadable extensions" >&2;} else case e in #( e) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } printf "%s\n" "#define PY_SQLITE_ENABLE_LOAD_EXTENSION 1" >>confdefs.h - ;; + ;; esac fi else case e in #( e) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } - ;; esac fi - found_tcltk=no for _QUERY in \ "tcl >= 8.5.12 tk >= 8.5.12" \ diff --git a/configure.ac b/configure.ac index ca804d6448810d2..0f704b15e883f13 100644 --- a/configure.ac +++ b/configure.ac @@ -4630,21 +4630,22 @@ AC_ARG_ENABLE([loadable-sqlite-extensions], support loadable extensions in the sqlite3 module, see Doc/library/sqlite3.rst (default is no) ] - ), [ - AS_VAR_IF([have_sqlite3_load_extension], [no], [ - AC_MSG_RESULT([n/a]) - AC_MSG_WARN([Your version of SQLite does not support loadable extensions]) - ], [ - AC_MSG_RESULT([yes]) - AC_DEFINE( - [PY_SQLITE_ENABLE_LOAD_EXTENSION], [1], - [Define to 1 to build the sqlite module with loadable extensions support.] - ) - ]) - ], [ - AC_MSG_RESULT([no]) - ] + ), [], [enable_loadable_sqlite_extensions=no] ) +AS_VAR_IF([enable_loadable_sqlite_extensions], [yes], [ + AS_VAR_IF([have_sqlite3_load_extension], [no], [ + AC_MSG_RESULT([n/a]) + AC_MSG_WARN([Your version of SQLite does not support loadable extensions]) + ], [ + AC_MSG_RESULT([yes]) + AC_DEFINE( + [PY_SQLITE_ENABLE_LOAD_EXTENSION], [1], + [Define to 1 to build the sqlite module with loadable extensions support.] + ) + ]) +], [ + AC_MSG_RESULT([no]) +]) dnl dnl Detect Tcl/Tk. Use pkg-config if available.