On Fri, 06 Aug 2004 12:24:46 -0500, Corwin Burgess wrote: > Has any Linux user compile the sqlite > library with threadsafe defined?
I used the following shell script with 2.8.13. The important step is the 'sed' call to modify the Makefile before actually running 'make'. --------------------------------------------------------------------- #!/bin/sh cd sqlite || exit 1 if [ -s Makefile.in ] ; then # clean up to get a fresh compile [ -s Makefile ] && make clean # we want the apps using sqlite to link it statically to avoid # messing around with additional *.so libraries at runtime: ./configure \ --mandir=/usr/share/man \ --enable-shared=NO --disable-shared \ --enable-static=YES \ --enable-threads=POSIX \ --enable-tempdb-in-ram | \ tee config.$(date +'%Y%m%d-%h%M%s') # unfortunately with Linux we've to use 'sed' to compile 'sqlite' # threadsafe and w/o DEBUGging overhead, and the binary 'stripped': sed -e 's#^TCC = \([A-Za-z]*\) #TCC = \1 -DTHREADSAFE=1 -DNDEBUG=1 #g' \ -e 's#^LIBREADLINE = \([A-Za-z]*\)#LIBREADLINE = \1 -s #g' \ Makefile > Makefile.tmp [ -s Makefile.tmp ] && mv -f Makefile.tmp Makefile # intentionally missing 'e': the 'mak' sh-script simply pipes the .. mak # .. output of 'make' through 'tee' to produce a logfile # finally create and tidy up HTML documentation make doc for f in doc/*html; do tidy -cmiq $f ; done (cd doc ; ln -sf ../www/a*gif .) # another missing' in the Makefile fi #_EoF_ --------------------------------------------------------------------- Hih! -- Matthias