From: Roland Hieber Date: Tue, 9 Jul 2019 12:18:52 +0200 Subject: [PATCH] configure: make --disable-threadsafe work SQLITE_THREADSAFE can be 0, 1 or 2, and if it is not defined, it is defined to 1 by default in sqlite3.c. _REENTRANT only needs to be defined or undefined according to https://www.gnu.org/software/libc/manual/html_node/Feature-Test-Macros.html#Feature-Test-Macros Forwarded: https://www.mail-archive.com/sqlite-users@mailinglists.sqlite.org/msg115812.html Signed-off-by: Roland Hieber --- configure.ac | 2 ++ 1 file changed, 2 insertions(+) diff --git a/configure.ac b/configure.ac index f0b70b96428c..3044077e93f6 100644 --- a/configure.ac +++ b/configure.ac @@ -91,6 +91,8 @@ if test x"$enable_threadsafe" != "xno"; then BUILD_CFLAGS="$BUILD_CFLAGS -D_REENTRANT=1 -DSQLITE_THREADSAFE=1" AC_SEARCH_LIBS(pthread_create, pthread) AC_SEARCH_LIBS(pthread_mutexattr_init, pthread) +else + BUILD_CFLAGS="$BUILD_CFLAGS -DSQLITE_THREADSAFE=0" fi #-----------------------------------------------------------------------