3 # Run this script in a directory with a working makefile to check for
4 # compiler warnings in SQLite.
7 if uname |
grep -i openbsd
; then
8 # Use these for testing on OpenBSD:
10 WARNING_ANDROID_OPTS
=-Wall
12 # Use these for testing on Linux and Mac OSX:
13 WARNING_OPTS
="-Wshadow -Wall -Wextra -pedantic-errors -Wno-long-long"
14 WARNING_ANDROID_OPTS
="-Wshadow -Wall -Wextra"
19 echo '********** No optimizations. Includes FTS4/5, GEOPOLY, JSON1 ***'
20 echo '********** ' Options
: $WARNING_OPTS
21 gcc
-c $WARNING_OPTS -std=c89 \
22 -ansi -DHAVE_STDINT_H -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_GEOPOLY \
23 -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_JSON1 \
25 if test x
`uname` = 'xLinux'; then
26 echo '********** Android configuration ******************************'
27 echo '********** ' Options
: $WARNING_ANDROID_OPTS
31 -DSQLITE_DEFAULT_JOURNAL_SIZE_LIMIT=1048576 \
32 -DSQLITE_THREADSAFE=2 \
33 -DSQLITE_TEMP_STORE=3 \
34 -DSQLITE_POWERSAFE_OVERWRITE=1 \
35 -DSQLITE_DEFAULT_FILE_FORMAT=4 \
36 -DSQLITE_DEFAULT_AUTOVACUUM=1 \
37 -DSQLITE_ENABLE_MEMORY_MANAGEMENT=1 \
38 -DSQLITE_ENABLE_FTS3 \
39 -DSQLITE_ENABLE_FTS3_BACKWARDS \
40 -DSQLITE_ENABLE_FTS4 \
41 -DSQLITE_OMIT_BUILTIN_TEST \
42 -DSQLITE_OMIT_COMPILEOPTION_DIAGS \
43 -DSQLITE_OMIT_LOAD_EXTENSION \
44 -DSQLITE_DEFAULT_FILE_PERMISSIONS=0600 \
47 $WARNING_ANDROID_OPTS \
50 echo '********** No optimizations. ENABLE_STAT4. THREADSAFE=0 *******'
51 echo '********** ' Options
: $WARNING_OPTS
52 gcc
-c $WARNING_OPTS -std=c89 \
53 -ansi -DSQLITE_ENABLE_STAT4 -DSQLITE_THREADSAFE=0 \
55 echo '********** Optimized -O3. Includes FTS4/5, GEOPOLY, JSON1 ******'
56 echo '********** ' Options
: $WARNING_OPTS
57 gcc
-O3 -c $WARNING_OPTS -std=c89 \
58 -ansi -DHAVE_STDINT_H -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_GEOPOLY \
59 -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_JSON1 \