Skip to content

Commit f612997

Browse files
committed
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
1 parent 294ae8c commit f612997

File tree

3 files changed

+23
-5
lines changed

3 files changed

+23
-5
lines changed

Makefile.am

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,11 @@ AM_CFLAGS = -I$(top_srcdir)/src
2626

2727
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)
2828

29+
if USE_MSW
30+
AM_LDFLAGS =
31+
else
2932
AM_LDFLAGS = -pthread -ldl -lm
33+
endif
3034

3135
if HAVE_ZLIB
3236
AM_CFLAGS += -DSQLITE_HAVE_ZLIB=1
@@ -67,6 +71,11 @@ lib_LTLIBRARIES = lib@[email protected]
6771
lib@SQLITE3MC_LIBNAME@_la_SOURCES = \
6872
src/sqlite3mc.c
6973

74+
if USE_MSW
75+
lib@SQLITE3MC_LIBNAME@_la_SOURCES += \
76+
src/sqlite3mc.rc
77+
endif
78+
7079
includemc_HEADERS = \
7180
src/sqlite3.h \
7281
src/sqlite3userauth.h \
@@ -114,7 +123,11 @@ noinst_HEADERS = \
114123
src/test_windirent.h
115124

116125
lib@SQLITE3MC_LIBNAME@_la_LDFLAGS = -no-undefined $(AM_LDFLAGS)
126+
if USE_MSW
127+
lib@SQLITE3MC_LIBNAME@_la_LIBADD = src/sqlite3mc.res_o
128+
else
117129
lib@SQLITE3MC_LIBNAME@_la_LIBADD = -ldl -lm
130+
endif
118131

119132

120133
# Samples (don't need to be installed).
@@ -126,18 +139,23 @@ sqlite3shell_SOURCES = \
126139

127140
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)
128141

142+
if USE_MSW
143+
sqlite3shell_LDADD =
144+
sqlite3shell_LDFLAGS =
145+
else
129146
sqlite3shell_LDADD = -ldl -lm
130147
sqlite3shell_LDFLAGS = -pthread
148+
endif
131149

132150
if HAVE_ZLIB
133151
sqlite3shell_CFLAGS += -DSQLITE_HAVE_ZLIB=1
134152
sqlite3shell_LDADD += -lz
135153
endif
136154

137155
if USE_MSW
138-
sqlite3shell_SOURCES += src/sqlite3shell.rc
139-
sqlite3shell_LDADD += src/sqlite3shell.res_o
140-
CLEANFILES = src/sqlite3shell.res_o
156+
sqlite3shell_SOURCES += src/sqlite3mc_shell.rc
157+
sqlite3shell_LDADD += src/sqlite3mc_shell.res_o
158+
CLEANFILES = src/sqlite3mc_shell.res_o
141159
else
142160
# libtool complains about unknown "-no-install" option when targetting MSW, so
143161
# use it only in the "else" branch.

src/sqlite3mc.rc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ BEGIN
5555
VALUE "FileDescription", "SQLite3 Multiple Ciphers Database Library"
5656
VALUE "FileVersion", SQLITE3MC_FILE_VERSION_NUM_DOT_STRING
5757
VALUE "InternalName", "sqlite3mc.dll"
58-
VALUE "LegalCopyright", "Copyright (C) 2019-2022, Ulrich Telle"
58+
VALUE "LegalCopyright", "Copyright (C) 2019-2023, Ulrich Telle"
5959
VALUE "OriginalFilename", "sqlite3mc.dll"
6060
VALUE "ProductName", "SQLite3 Multiple Ciphers"
6161
VALUE "ProductVersion", SQLITE3MC_PROD_VERSION_NUM_DOT_STRING

src/sqlite3mc_shell.rc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ BEGIN
5757
VALUE "FileDescription", "SQLite3 Multiple Ciphers Database Shell"
5858
VALUE "FileVersion", SQLITE3MC_FILE_VERSION_NUM_DOT_STRING
5959
VALUE "InternalName", "sqlite3mc_shell.exe"
60-
VALUE "LegalCopyright", "Copyright (C) 2019-2022, Ulrich Telle"
60+
VALUE "LegalCopyright", "Copyright (C) 2019-2023, Ulrich Telle"
6161
VALUE "OriginalFilename", "sqlite3mc_shell.exe"
6262
VALUE "ProductName", "SQLite3 Multiple Ciphers"
6363
VALUE "ProductVersion", SQLITE3MC_PROD_VERSION_NUM_DOT_STRING

0 commit comments

Comments
 (0)