From f612997889916b89becfbfaf41f0101ca6a0736b Mon Sep 17 00:00:00 2001 From: utelle Date: Thu, 5 Oct 2023 15:14:58 +0200 Subject: [PATCH] Adjust autoconf/automake build files For using the autoconf/automake build files under Windows with MSYS minor modifications were necessary: - Fix typo in resource file name - Adjust list of link libraries --- Makefile.am | 24 +++++++++++++++++++++--- src/sqlite3mc.rc | 2 +- src/sqlite3mc_shell.rc | 2 +- 3 files changed, 23 insertions(+), 5 deletions(-) diff --git a/Makefile.am b/Makefile.am index 8e8b621..90f6051 100644 --- a/Makefile.am +++ b/Makefile.am @@ -26,7 +26,11 @@ AM_CFLAGS = -I$(top_srcdir)/src AM_CFLAGS += -std=c99 -DSQLITE_THREADSAFE=1 -DSQLITE_DQS=0 -DSQLITE_MAX_ATTACHED=10 -DSQLITE_SOUNDEX=1 -DSQLITE_ENABLE_COLUMN_METADATA=1 -DSQLITE_SECURE_DELETE=1 -DSQLITE_ENABLE_DESERIALIZE=1 -DSQLITE_ENABLE_FTS3=1 -DSQLITE_ENABLE_FTS3_PARENTHESIS=1 -DSQLITE_ENABLE_FTS4=1 -DSQLITE_ENABLE_FTS5=1 -DSQLITE_ENABLE_JSON1=1 -DSQLITE_ENABLE_RTREE=1 -DSQLITE_ENABLE_GEOPOLY=1 -DSQLITE_ENABLE_PREUPDATE_HOOK=1 -DSQLITE_ENABLE_SESSION=1 -DSQLITE_CORE=1 -DSQLITE_ENABLE_EXTFUNC=1 -DSQLITE_ENABLE_MATH_FUNCTIONS=1 -DSQLITE_ENABLE_CSV=1 -DSQLITE_ENABLE_SHA3=1 -DSQLITE_ENABLE_CARRAY=1 -DSQLITE_ENABLE_FILEIO=1 -DSQLITE_ENABLE_SERIES=1 -DSQLITE_ENABLE_UUID=1 -DSQLITE_ENABLE_REGEXP=1 -DSQLITE_TEMP_STORE=2 -DSQLITE_USE_URI=1 -DSQLITE_USER_AUTHENTICATION=1 $(X86_FLAGS) $(ARM_FLAGS) +if USE_MSW +AM_LDFLAGS = +else AM_LDFLAGS = -pthread -ldl -lm +endif if HAVE_ZLIB AM_CFLAGS += -DSQLITE_HAVE_ZLIB=1 @@ -67,6 +71,11 @@ lib_LTLIBRARIES = lib@SQLITE3MC_LIBNAME@.la lib@SQLITE3MC_LIBNAME@_la_SOURCES = \ src/sqlite3mc.c +if USE_MSW +lib@SQLITE3MC_LIBNAME@_la_SOURCES += \ + src/sqlite3mc.rc +endif + includemc_HEADERS = \ src/sqlite3.h \ src/sqlite3userauth.h \ @@ -114,7 +123,11 @@ noinst_HEADERS = \ src/test_windirent.h lib@SQLITE3MC_LIBNAME@_la_LDFLAGS = -no-undefined $(AM_LDFLAGS) +if USE_MSW +lib@SQLITE3MC_LIBNAME@_la_LIBADD = src/sqlite3mc.res_o +else lib@SQLITE3MC_LIBNAME@_la_LIBADD = -ldl -lm +endif # Samples (don't need to be installed). @@ -126,8 +139,13 @@ sqlite3shell_SOURCES = \ sqlite3shell_CFLAGS = -I$(top_srcdir)/src -std=c99 -D_GNU_SOURCE -DSQLITE_THREADSAFE=1 -DSQLITE_DQS=0 -DSQLITE_MAX_ATTACHED=10 -DSQLITE_SOUNDEX=1 -DSQLITE_ENABLE_COLUMN_METADATA=1 -DSQLITE_SECURE_DELETE=1 -DSQLITE_ENABLE_DESERIALIZE=1 -DSQLITE_ENABLE_FTS3=1 -DSQLITE_ENABLE_FTS3_PARENTHESIS=1 -DSQLITE_ENABLE_FTS4=1 -DSQLITE_ENABLE_FTS5=1 -DSQLITE_ENABLE_JSON1=1 -DSQLITE_ENABLE_RTREE=1 -DSQLITE_ENABLE_GEOPOLY=1 -DSQLITE_ENABLE_PREUPDATE_HOOK=1 -DSQLITE_ENABLE_SESSION=1 -DSQLITE_CORE=1 -DSQLITE_ENABLE_EXTFUNC=1 -DSQLITE_ENABLE_MATH_FUNCTIONS=1 -DSQLITE_ENABLE_CSV=1 -DSQLITE_ENABLE_CARRAY=1 -DSQLITE_ENABLE_UUID=1 -DSQLITE_TEMP_STORE=2 -DSQLITE_USE_URI=1 -DSQLITE_USER_AUTHENTICATION=1 -DSQLITE_ENABLE_DBPAGE_VTAB=1 -DSQLITE_ENABLE_DBSTAT_VTAB=1 -DSQLITE_ENABLE_STMTVTAB=1 -DSQLITE_ENABLE_UNKNOWN_SQL_FUNCTION=1 $(X86_FLAGS) $(ARM_FLAGS) +if USE_MSW +sqlite3shell_LDADD = +sqlite3shell_LDFLAGS = +else sqlite3shell_LDADD = -ldl -lm sqlite3shell_LDFLAGS = -pthread +endif if HAVE_ZLIB sqlite3shell_CFLAGS += -DSQLITE_HAVE_ZLIB=1 @@ -135,9 +153,9 @@ sqlite3shell_LDADD += -lz endif if USE_MSW -sqlite3shell_SOURCES += src/sqlite3shell.rc -sqlite3shell_LDADD += src/sqlite3shell.res_o -CLEANFILES = src/sqlite3shell.res_o +sqlite3shell_SOURCES += src/sqlite3mc_shell.rc +sqlite3shell_LDADD += src/sqlite3mc_shell.res_o +CLEANFILES = src/sqlite3mc_shell.res_o else # libtool complains about unknown "-no-install" option when targetting MSW, so # use it only in the "else" branch. diff --git a/src/sqlite3mc.rc b/src/sqlite3mc.rc index 266a70e..fea52cf 100644 --- a/src/sqlite3mc.rc +++ b/src/sqlite3mc.rc @@ -55,7 +55,7 @@ BEGIN VALUE "FileDescription", "SQLite3 Multiple Ciphers Database Library" VALUE "FileVersion", SQLITE3MC_FILE_VERSION_NUM_DOT_STRING VALUE "InternalName", "sqlite3mc.dll" - VALUE "LegalCopyright", "Copyright (C) 2019-2022, Ulrich Telle" + VALUE "LegalCopyright", "Copyright (C) 2019-2023, Ulrich Telle" VALUE "OriginalFilename", "sqlite3mc.dll" VALUE "ProductName", "SQLite3 Multiple Ciphers" VALUE "ProductVersion", SQLITE3MC_PROD_VERSION_NUM_DOT_STRING diff --git a/src/sqlite3mc_shell.rc b/src/sqlite3mc_shell.rc index 8026aa7..2726967 100644 --- a/src/sqlite3mc_shell.rc +++ b/src/sqlite3mc_shell.rc @@ -57,7 +57,7 @@ BEGIN VALUE "FileDescription", "SQLite3 Multiple Ciphers Database Shell" VALUE "FileVersion", SQLITE3MC_FILE_VERSION_NUM_DOT_STRING VALUE "InternalName", "sqlite3mc_shell.exe" - VALUE "LegalCopyright", "Copyright (C) 2019-2022, Ulrich Telle" + VALUE "LegalCopyright", "Copyright (C) 2019-2023, Ulrich Telle" VALUE "OriginalFilename", "sqlite3mc_shell.exe" VALUE "ProductName", "SQLite3 Multiple Ciphers" VALUE "ProductVersion", SQLITE3MC_PROD_VERSION_NUM_DOT_STRING