]> git.sur5r.net Git - bacula/bacula/blob - bacula/src/win32/patches/sqlite.patch
Restore win32 dir from Branch-5.2 and update it
[bacula/bacula] / bacula / src / win32 / patches / sqlite.patch
1 Index: main.mk
2 --- ../orig/sqlite-3.3.6/main.mk        2006-06-06 03:52:26.000000000 -0700
3 +++ ./main.mk   2006-06-30 15:16:28.000000000 -0700
4 @@ -60,7 +60,7 @@
5           expr.o func.o hash.o insert.o \
6           main.o opcodes.o os.o os_os2.o os_unix.o os_win.o \
7           pager.o parse.o pragma.o prepare.o printf.o random.o \
8 -         select.o table.o tclsqlite.o tokenize.o trigger.o \
9 +         select.o table.o tokenize.o trigger.o \
10           update.o util.o vacuum.o \
11           vdbe.o vdbeapi.o vdbeaux.o vdbefifo.o vdbemem.o \
12           where.o utf.o legacy.o
13 @@ -394,8 +394,8 @@
14  
15  # Rules for building test programs and for running tests
16  #
17 -tclsqlite3:    $(TOP)/src/tclsqlite.c libsqlite3.a
18 -       $(TCCX) $(TCL_FLAGS) -DTCLSH=1 -o tclsqlite3 \
19 +tclsqlite3$(EXE):      $(TOP)/src/tclsqlite.c libsqlite3.a
20 +       $(TCCX) $(TCL_FLAGS) -DTCLSH=1 -o tclsqlite3$(EXE) \
21                 $(TOP)/src/tclsqlite.c libsqlite3.a $(LIBTCL) $(THREADLIB)
22  
23  testfixture$(EXE):     $(TOP)/src/tclsqlite.c libsqlite3.a $(TESTSRC)
24 @@ -604,8 +604,8 @@
25  
26  # Standard install and cleanup targets
27  #
28 -install:       sqlite3 libsqlite3.a sqlite3.h
29 -       mv sqlite3 /usr/bin
30 +install:       sqlite3$(EXE) libsqlite3.a sqlite3.h
31 +       mv sqlite3$(EXE) /usr/bin
32         mv libsqlite3.a /usr/lib
33         mv sqlite3.h /usr/include
34  
35 Index: Makefile.mingw32
36 --- ../orig/sqlite-3.3.6/Makefile.mingw32       1969-12-31 16:00:00.000000000 -0800
37 +++ ./Makefile.mingw32  2006-06-30 15:14:29.000000000 -0700
38 @@ -0,0 +1,124 @@
39 +#!/usr/make
40 +#
41 +# Makefile for SQLITE
42 +#
43 +# This is a template makefile for SQLite.  Most people prefer to
44 +# use the autoconf generated "configure" script to generate the
45 +# makefile automatically.  But that does not work for everybody
46 +# and in every situation.  If you are having problems with the
47 +# "configure" script, you might want to try this makefile as an
48 +# alternative.  Create a copy of this file, edit the parameters
49 +# below and type "make".
50 +#
51 +
52 +#### The toplevel directory of the source tree.  This is the directory
53 +#    that contains this "Makefile.in" and the "configure.in" script.
54 +#
55 +TOP = ..
56 +
57 +#### C Compiler and options for use in building executables that
58 +#    will run on the platform that is doing the build.
59 +#
60 +BCC = gcc -g -O2
61 +#BCC = /opt/ancic/bin/c89 -0
62 +
63 +#### If the target operating system supports the "usleep()" system
64 +#    call, then define the HAVE_USLEEP macro for all C modules.
65 +#
66 +#USLEEP = 
67 +USLEEP = -DHAVE_USLEEP=1
68 +
69 +#### If you want the SQLite library to be safe for use within a 
70 +#    multi-threaded program, then define the following macro
71 +#    appropriately:
72 +#
73 +THREADSAFE = -DTHREADSAFE=1
74 +#THREADSAFE = -DTHREADSAFE=0
75 +
76 +#### Specify any extra linker options needed to make the library
77 +#    thread safe
78 +#
79 +THREADLIB = -lpthreadGCE
80 +#THREADLIB = 
81 +
82 +#### Specify any extra libraries needed to access required functions.
83 +#
84 +#TLIBS = -lrt    # fdatasync on Solaris 8
85 +TLIBS = 
86 +
87 +#### Leave SQLITE_DEBUG undefined for maximum speed.  Use SQLITE_DEBUG=1
88 +#    to check for memory leaks.  Use SQLITE_DEBUG=2 to print a log of all
89 +#    malloc()s and free()s in order to track down memory leaks.
90 +#    
91 +#    SQLite uses some expensive assert() statements in the inner loop.
92 +#    You can make the library go almost twice as fast if you compile
93 +#    with -DNDEBUG=1
94 +#
95 +#OPTS = -DSQLITE_DEBUG=2
96 +#OPTS = -DSQLITE_DEBUG=1
97 +#OPTS = 
98 +OPTS = -DNDEBUG=1
99 +OPTS += -DHAVE_FDATASYNC=1
100 +
101 +#### The suffix to add to executable files.  ".exe" for windows.
102 +#    Nothing for unix.
103 +#
104 +EXE = .exe
105 +#EXE =
106 +
107 +#### C Compile and options for use in building executables that 
108 +#    will run on the target platform.  This is usually the same
109 +#    as BCC, unless you are cross-compiling.
110 +#
111 +#TCC = gcc -O6
112 +#TCC = gcc -g -O0 -Wall
113 +#TCC = gcc -g -O0 -Wall -fprofile-arcs -ftest-coverage
114 +TCC = $(CROSSTOOLS)/mingw32-gcc -O6
115 +#TCC = /opt/ansic/bin/c89 -O +z -Wl,-a,archive
116 +
117 +#### Tools used to build a static library.
118 +#
119 +#AR = ar cr
120 +AR = $(CROSSTOOLS)/mingw32-ar cr
121 +#RANLIB = ranlib
122 +RANLIB = $(CROSSTOOLS)/mingw32-ranlib
123 +
124 +#### Extra compiler options needed for programs that use the TCL library.
125 +#
126 +#TCL_FLAGS =
127 +#TCL_FLAGS = -DSTATIC_BUILD=1
128 +#TCL_FLAGS = -I/home/drh/tcltk/8.4linux
129 +#TCL_FLAGS = -I/home/drh/tcltk/8.4win -DSTATIC_BUILD=1
130 +#TCL_FLAGS = -I/home/drh/tcltk/8.3hpux
131 +
132 +#### Linker options needed to link against the TCL library.
133 +#
134 +#LIBTCL = -ltcl84
135 +#LIBTCL = /home/drh/tcltk/8.4linux/libtcl8.4g.a -lm -ldl
136 +#LIBTCL = /home/drh/tcltk/8.4win/libtcl84s.a -lmsvcrt
137 +#LIBTCL = /home/drh/tcltk/8.3hpux/libtcl8.3.a -ldld -lm -lc
138 +
139 +#### Compiler options needed for programs that use the readline() library.
140 +#
141 +READLINE_FLAGS =
142 +#READLINE_FLAGS = -DHAVE_READLINE=1 -I/usr/include/readline
143 +
144 +#### Linker options needed by programs using readline() must link against.
145 +#
146 +LIBREADLINE =
147 +#LIBREADLINE = -static -lreadline -ltermcap
148 +
149 +#### Should the database engine assume text is coded as UTF-8 or iso8859?
150 +#
151 +# ENCODING  = UTF8
152 +ENCODING = ISO8859
153 +
154 +
155 +#### Which "awk" program provides nawk compatibilty
156 +#
157 +# NAWK = nawk
158 +NAWK = awk
159 +
160 +# You should not have to change anything below this line
161 +###############################################################################
162 +include $(TOP)/main.mk