https://bugs.gentoo.org/show_bug.cgi?id=335505 http://bugs.python.org/issue10268 --- configure.ac +++ configure.ac @@ -2326,6 +2326,15 @@ TCLTK_LIBS="$with_tcltk_libs" fi +# Check for support for loadable sqlite extensions +AC_MSG_CHECKING(for --enable-loadable-sqlite-extensions) +AC_ARG_ENABLE(loadable-sqlite-extensions, + AS_HELP_STRING([--enable-loadable-sqlite-extensions], [support loadable extensions in _sqlite module]), + [], + [enable_loadable_sqlite_extensions="no"]) + +AC_MSG_RESULT($enable_loadable_sqlite_extensions) + # Check for --with-dbmliborder AC_MSG_CHECKING(for --with-dbmliborder) AC_ARG_WITH(dbmliborder, --- setup.py +++ setup.py @@ -1183,8 +1183,10 @@ else: sqlite_defines.append(('MODULE_NAME', '\\"sqlite3\\"')) - # Comment this out if you want the sqlite3 module to be able to load extensions. - sqlite_defines.append(("SQLITE_OMIT_LOAD_EXTENSION", "1")) + # Enable support for loadable extensions in the sqlite3 module + # if --enable-loadable-sqlite-extensions configure option is used. + if '--enable-loadable-sqlite-extensions' not in sysconfig.get_config_var("CONFIG_ARGS"): + sqlite_defines.append(("SQLITE_OMIT_LOAD_EXTENSION", "1")) if host_platform == 'darwin': # In every directory on the search path search for a dynamic