Updated configure/makefiles to handle SQLITE_ENABLE* compile options. Made sure makefile passes command line options (OPTS=-Dfoo) to the compiler. Add -DSQLITE_COVERAGE_TEST=1 if gcov being used. (CVS 5838)

FossilOrigin-Name: acb106e51f8bb7449a0e214075c559cc66497277
This commit is contained in:
shane 2008-10-22 18:27:31 +00:00
parent 891adeac5c
commit b1cd7308dc
5 changed files with 36 additions and 24 deletions

View File

@ -76,13 +76,17 @@ TLIBS = @LIBS@
TEMP_STORE = -DSQLITE_TEMP_STORE=@TEMP_STORE@
# Enable/disable loadable extensions, and other optional features
# based on configuration. (-DSQLITE_OMIT*). The same set of OMIT
# flags should be passed to the LEMON parser generator and the
# mkkeywordhash tool as well.
# based on configuration. (-DSQLITE_OMIT*, -DSQLITE_ENABLE*).
# The same set of OMIT and ENABLE flags should be passed to the
# LEMON parser generator and the mkkeywordhash tool as well.
OPT_FEATURE_FLAGS = @OPT_FEATURE_FLAGS@
TCC += $(OPT_FEATURE_FLAGS)
# Add in any optional parameters specified on the make commane line
# ie. make "OPTS=-DSQLITE_ENABLE_FOO=1 -DSQLITE_OMIT_FOO=1".
TCC += $(OPTS)
# Version numbers and release number for the SQLite being compiled.
#
VERSION = @VERSION@
@ -121,7 +125,7 @@ SHLIB_SUFFIX = @TCL_SHLIB_SUFFIX@
#
# for more info.
#
GCOV_CFLAGS1 = -fprofile-arcs -ftest-coverage
GCOV_CFLAGS1 = -DSQLITE_COVERAGE_TEST=1 -fprofile-arcs -ftest-coverage
GCOV_LDFLAGS1 = -lgcov
USE_GCOV = @USE_GCOV@
LTCOMPILE_EXTRAS += $(GCOV_CFLAGS$(USE_GCOV))
@ -624,7 +628,7 @@ parse.h: parse.c
parse.c: $(TOP)/src/parse.y lemon$(BEXE) $(TOP)/addopcodes.awk
cp $(TOP)/src/parse.y .
./lemon$(BEXE) $(OPTS) $(OPT_FEATURE_FLAGS) parse.y
./lemon$(BEXE) $(OPT_FEATURE_FLAGS) $(OPTS) parse.y
mv parse.h parse.h.temp
$(NAWK) -f $(TOP)/addopcodes.awk parse.h.temp >parse.h
@ -663,7 +667,7 @@ tokenize.lo: $(TOP)/src/tokenize.c keywordhash.h $(HDR)
$(LTCOMPILE) -c $(TOP)/src/tokenize.c
keywordhash.h: $(TOP)/tool/mkkeywordhash.c
$(BCC) -o mkkeywordhash$(BEXE) $(OPTS) $(OPT_FEATURE_FLAGS) $(TOP)/tool/mkkeywordhash.c
$(BCC) -o mkkeywordhash$(BEXE) $(OPT_FEATURE_FLAGS) $(OPTS) $(TOP)/tool/mkkeywordhash.c
./mkkeywordhash$(BEXE) >keywordhash.h
trigger.lo: $(TOP)/src/trigger.c $(HDR)

12
configure vendored
View File

@ -1489,7 +1489,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
# The following RCS revision string applies to configure.in
# $Revision: 1.64 $
# $Revision: 1.65 $
#########
# Programs needed
@ -12071,34 +12071,37 @@ else
fi
#########
# attempt to duplicate any OMITS into the $(OPT_FEATURE_FLAGS) parameter
# attempt to duplicate any OMITS and ENABLES into the $(OPT_FEATURE_FLAGS) parameter
for option in $CFLAGS $CPPFLAGS
do
case $option in
-DSQLITE_OMIT*) OPT_FEATURE_FLAGS="$OPT_FEATURE_FLAGS $option";;
-DSQLITE_ENABLE*) OPT_FEATURE_FLAGS="$OPT_FEATURE_FLAGS $option";;
esac
done
# attempt to remove any OMITS from the $(CFLAGS) parameter
# attempt to remove any OMITS and ENABLES from the $(CFLAGS) parameter
ac_temp_CFLAGS=""
for option in $CFLAGS
do
case $option in
-DSQLITE_OMIT*) ;;
-DSQLITE_ENABLE*) ;;
*) ac_temp_CFLAGS="$ac_temp_CFLAGS $option";;
esac
done
CFLAGS=$ac_temp_CFLAGS
# attempt to remove any OMITS from the $(CPPFLAGS) parameter
# attempt to remove any OMITS and ENABLES from the $(CPPFLAGS) parameter
ac_temp_CPPFLAGS=""
for option in $CPPFLAGS
do
case $option in
-DSQLITE_OMIT*) ;;
-DSQLITE_ENABLE*) ;;
*) ac_temp_CPPFLAGS="$ac_temp_CPPFLAGS $option";;
esac
done
@ -12111,6 +12114,7 @@ for option in $BUILD_CFLAGS
do
case $option in
-DSQLITE_OMIT*) ;;
-DSQLITE_ENABLE*) ;;
*) ac_temp_BUILD_CFLAGS="$ac_temp_BUILD_CFLAGS $option";;
esac
done

View File

@ -92,7 +92,7 @@ AC_INIT(sqlite, m4_esyscmd([cat VERSION | tr -d '\n']))
dnl Put the RCS revision string after AC_INIT so that it will also
dnl show in in configure.
# The following RCS revision string applies to configure.in
# $Revision: 1.49 $
# $Revision: 1.50 $
#########
# Programs needed
@ -611,46 +611,50 @@ else
fi
#########
# attempt to duplicate any OMITS into the $(OPT_FEATURE_FLAGS) parameter
# attempt to duplicate any OMITS and ENABLES into the $(OPT_FEATURE_FLAGS) parameter
for option in $CFLAGS $CPPFLAGS
do
case $option in
-DSQLITE_OMIT*) OPT_FEATURE_FLAGS="$OPT_FEATURE_FLAGS $option";;
-DSQLITE_ENABLE*) OPT_FEATURE_FLAGS="$OPT_FEATURE_FLAGS $option";;
esac
done
AC_SUBST(OPT_FEATURE_FLAGS)
# attempt to remove any OMITS from the $(CFLAGS) parameter
# attempt to remove any OMITS and ENABLES from the $(CFLAGS) parameter
ac_temp_CFLAGS=""
for option in $CFLAGS
do
case $option in
-DSQLITE_OMIT*) ;;
-DSQLITE_ENABLE*) ;;
*) ac_temp_CFLAGS="$ac_temp_CFLAGS $option";;
esac
done
CFLAGS=$ac_temp_CFLAGS
# attempt to remove any OMITS from the $(CPPFLAGS) parameter
# attempt to remove any OMITS and ENABLES from the $(CPPFLAGS) parameter
ac_temp_CPPFLAGS=""
for option in $CPPFLAGS
do
case $option in
-DSQLITE_OMIT*) ;;
-DSQLITE_ENABLE*) ;;
*) ac_temp_CPPFLAGS="$ac_temp_CPPFLAGS $option";;
esac
done
CPPFLAGS=$ac_temp_CPPFLAGS
# attempt to remove any OMITS from the $(BUILD_CFLAGS) parameter
# attempt to remove any OMITS and ENABLES from the $(BUILD_CFLAGS) parameter
ac_temp_BUILD_CFLAGS=""
for option in $BUILD_CFLAGS
do
case $option in
-DSQLITE_OMIT*) ;;
-DSQLITE_ENABLE*) ;;
*) ac_temp_BUILD_CFLAGS="$ac_temp_BUILD_CFLAGS $option";;
esac
done

View File

@ -1,7 +1,7 @@
C Removed\ssome\smore\sdead\scode\sand\sfixed\ssome\sunresolved\sexternals\sfor\sWINCE.\s\sTicket\s#3420.\s(CVS\s5837)
D 2008-10-22T16:55:47
C Updated\sconfigure/makefiles\sto\shandle\sSQLITE_ENABLE*\scompile\soptions.\s\sMade\ssure\smakefile\spasses\scommand\sline\soptions\s(OPTS=-Dfoo)\sto\sthe\scompiler.\s\sAdd\s-DSQLITE_COVERAGE_TEST=1\sif\sgcov\sbeing\sused.\s(CVS\s5838)
D 2008-10-22T18:27:31
F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
F Makefile.in 4352ab12369706c793f3e8165db35b102c929998
F Makefile.in 3fe17eccd87d385b5adc9766828716cfdd154d6b
F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
F README b974cdc3f9f12b87e851b04e75996d720ebf81ac
F VERSION 5ba795c6239d62450dd2cb8b469acebda412ebc9
@ -17,8 +17,8 @@ F art/powered_by_sqlite.gif 7fbcd7d3675391fd3d21672c14c05f5999eb60d1
F config.guess 226d9a188c6196f3033ffc651cbc9dcee1a42977
F config.h.in 3fda160d9a0ebbd6c22c0391354fa0036474680f
F config.sub 9ebe4c3b3dab6431ece34f16828b594fb420da55
F configure a013a40a9215b92fb9267603823f95d007ab5b00 x
F configure.ac 24d54c19c2fb8045598495250230d117c2464502
F configure f5bb190d8e9290c4e95349fd6919fd611b438bcf x
F configure.ac 34d1ef70f1170b770049660b5de8398aa0ed7d28
F contrib/sqlitecon.tcl 210a913ad63f9f991070821e599d600bd913e0ad
F doc/lemon.html f0f682f50210928c07e562621c3b7e8ab912a538
F doc/report1.txt a031aaf37b185e4fa540223cb516d3bccec7eeac
@ -650,7 +650,7 @@ F tool/speedtest16.c c8a9c793df96db7e4933f0852abb7a03d48f2e81
F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
P b78f44c91fcf3920e69c11a6f72e8f032905a3c7
R d00295cf1e272f696a9fb6229b295e8f
P 5276e31d42070e7b94bd6050c4fa484dfbfe98ca
R f75966f13a1a4c468b2ca255119ec8fb
U shane
Z b93484f56f8f995214898bd38d76728c
Z 9d361f844e39732b7b3007eb2b6fdc97

View File

@ -1 +1 @@
5276e31d42070e7b94bd6050c4fa484dfbfe98ca
acb106e51f8bb7449a0e214075c559cc66497277