Skip to content

Commit

Permalink
Adjust autoconf/automake build files
Browse files Browse the repository at this point in the history
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
  • Loading branch information
utelle committed Oct 5, 2023
1 parent 294ae8c commit f612997
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 5 deletions.
24 changes: 21 additions & 3 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -67,6 +71,11 @@ lib_LTLIBRARIES = lib@[email protected]
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 \
Expand Down Expand Up @@ -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).
Expand All @@ -126,18 +139,23 @@ 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
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.
Expand Down
2 changes: 1 addition & 1 deletion src/sqlite3mc.rc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/sqlite3mc_shell.rc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f612997

Please sign in to comment.