Add a configure option for using gcov (makes things easier for versions of

GCC that fail to build otherwise) (CVS 4947)

FossilOrigin-Name: 7d1e79716246b0dd4a64d7c9575b2300e0f6123e
This commit is contained in:
mlcreech 2008-04-01 02:45:22 +00:00
parent 652fbf55c5
commit aac7b93ea4
5 changed files with 87 additions and 38 deletions

View File

@ -100,6 +100,24 @@ TCLSH_CMD = @TCLSH_CMD@
#
SHLIB_SUFFIX = @TCL_SHLIB_SUFFIX@
# If gcov support was enabled by the configure script, add the appropriate
# flags here. It's not always as easy as just having the user add the right
# CFLAGS / LDFLAGS, because libtool wants to use CFLAGS when linking, which
# causes build errors with -fprofile-arcs -ftest-coverage with some GCCs.
# Supposedly GCC does the right thing if you use --coverage, but in
# practice it still fails. See:
#
# http://www.mail-archive.com/debian-gcc@lists.debian.org/msg26197.html
#
# for more info.
#
GCOV_CFLAGS1 = -fprofile-arcs -ftest-coverage
GCOV_LDFLAGS1 = -lgcov
USE_GCOV = @USE_GCOV@
LTCOMPILE_EXTRAS += $(GCOV_CFLAGS$(USE_GCOV))
LTLINK_EXTRAS += $(GCOV_LDFLAGS$(USE_GCOV))
# The directory into which to store package information for
# Some standard variables and programs
@ -114,8 +132,8 @@ LIBTOOL = ./libtool
ALLOWRELEASE = @ALLOWRELEASE@
# libtool compile/link/install
LTCOMPILE = $(LIBTOOL) --mode=compile --tag=CC $(TCC)
LTLINK = $(LIBTOOL) --mode=link $(TCC) @LDFLAGS@
LTCOMPILE = $(LIBTOOL) --mode=compile --tag=CC $(TCC) $(LTCOMPILE_EXTRAS)
LTLINK = $(LIBTOOL) --mode=link $(TCC) @LDFLAGS@ $(LTLINK_EXTRAS)
LTINSTALL = $(LIBTOOL) --mode=install $(INSTALL)
# nawk compatible awk.

69
configure vendored
View File

@ -872,6 +872,7 @@ TARGET_HAVE_READLINE
TARGET_DEBUG
USE_AMALGAMATION
LOADEXTENSION_FLAGS
USE_GCOV
BUILD_CFLAGS
LIBOBJS
LTLIBOBJS'
@ -1484,6 +1485,7 @@ Optional Features:
--disable-amalgamation Disable the amalgamation and instead build all files
separately
--enable-load-extension Enable loading of external extensions
--enable-gcov Enable coverage testing using gcov
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
@ -1945,7 +1947,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
# The following RCS revision string applies to configure.in
# $Revision: 1.56 $
# $Revision: 1.57 $
#########
# Programs needed
@ -3696,7 +3698,7 @@ ia64-*-hpux*)
;;
*-*-irix6*)
# Find out which ABI we are using.
echo '#line 3699 "configure"' > conftest.$ac_ext
echo '#line 3701 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
@ -6375,11 +6377,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:6378: $lt_compile\"" >&5)
(eval echo "\"\$as_me:6380: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:6382: \$? = $ac_status" >&5
echo "$as_me:6384: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@ -6643,11 +6645,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:6646: $lt_compile\"" >&5)
(eval echo "\"\$as_me:6648: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:6650: \$? = $ac_status" >&5
echo "$as_me:6652: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@ -6747,11 +6749,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:6750: $lt_compile\"" >&5)
(eval echo "\"\$as_me:6752: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
echo "$as_me:6754: \$? = $ac_status" >&5
echo "$as_me:6756: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@ -9092,7 +9094,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
#line 9095 "configure"
#line 9097 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@ -9192,7 +9194,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
#line 9195 "configure"
#line 9197 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@ -11528,11 +11530,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:11531: $lt_compile\"" >&5)
(eval echo "\"\$as_me:11533: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:11535: \$? = $ac_status" >&5
echo "$as_me:11537: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@ -11632,11 +11634,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:11635: $lt_compile\"" >&5)
(eval echo "\"\$as_me:11637: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
echo "$as_me:11639: \$? = $ac_status" >&5
echo "$as_me:11641: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@ -13239,11 +13241,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:13242: $lt_compile\"" >&5)
(eval echo "\"\$as_me:13244: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:13246: \$? = $ac_status" >&5
echo "$as_me:13248: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@ -13343,11 +13345,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:13346: $lt_compile\"" >&5)
(eval echo "\"\$as_me:13348: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
echo "$as_me:13350: \$? = $ac_status" >&5
echo "$as_me:13352: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@ -15578,11 +15580,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:15581: $lt_compile\"" >&5)
(eval echo "\"\$as_me:15583: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:15585: \$? = $ac_status" >&5
echo "$as_me:15587: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@ -15846,11 +15848,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:15849: $lt_compile\"" >&5)
(eval echo "\"\$as_me:15851: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:15853: \$? = $ac_status" >&5
echo "$as_me:15855: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@ -15950,11 +15952,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:15953: $lt_compile\"" >&5)
(eval echo "\"\$as_me:15955: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
echo "$as_me:15957: \$? = $ac_status" >&5
echo "$as_me:15959: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@ -20820,6 +20822,22 @@ else
fi
#########
# See whether we should allow loadable extensions
# Check whether --enable-gcov was given.
if test "${enable_gcov+set}" = set; then
enableval=$enable_gcov; use_gcov=$enableval
else
use_gcov=no
fi
if test "${use_gcov}" = "yes" ; then
USE_GCOV=1
else
USE_GCOV=0
fi
#########
# Output the config header
@ -21596,12 +21614,13 @@ TARGET_HAVE_READLINE!$TARGET_HAVE_READLINE$ac_delim
TARGET_DEBUG!$TARGET_DEBUG$ac_delim
USE_AMALGAMATION!$USE_AMALGAMATION$ac_delim
LOADEXTENSION_FLAGS!$LOADEXTENSION_FLAGS$ac_delim
USE_GCOV!$USE_GCOV$ac_delim
BUILD_CFLAGS!$BUILD_CFLAGS$ac_delim
LIBOBJS!$LIBOBJS$ac_delim
LTLIBOBJS!$LTLIBOBJS$ac_delim
_ACEOF
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 12; then
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 13; then
break
elif $ac_last_try; then
{ { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5

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.42 $
# $Revision: 1.43 $
#########
# Programs needed
@ -612,6 +612,18 @@ else
fi
AC_SUBST(LOADEXTENSION_FLAGS)
#########
# See whether we should allow loadable extensions
AC_ARG_ENABLE(gcov, AC_HELP_STRING([--enable-gcov],
[Enable coverage testing using gcov]),
[use_gcov=$enableval],[use_gcov=no])
if test "${use_gcov}" = "yes" ; then
USE_GCOV=1
else
USE_GCOV=0
fi
AC_SUBST(USE_GCOV)
#########
# Output the config header

View File

@ -1,7 +1,7 @@
C Initial\stest\scases\sand\sbug\sfixes\sin\sthe\sCSE\slogic.\s(CVS\s4946)
D 2008-04-01T01:42:41
C Add\sa\sconfigure\soption\sfor\susing\sgcov\s(makes\sthings\seasier\sfor\sversions\sof\nGCC\sthat\sfail\sto\sbuild\sotherwise)\s(CVS\s4947)
D 2008-04-01T02:45:22
F Makefile.arm-wince-mingw32ce-gcc ac5f7b2cef0cd850d6f755ba6ee4ab961b1fadf7
F Makefile.in cf434ce8ca902e69126ae0f94fc9f7dc7428a5fa
F Makefile.in b861627d91df5ee422c54237aa38296954dc0151
F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
F README b974cdc3f9f12b87e851b04e75996d720ebf81ac
F VERSION 7a41970464b74225915bcaf9d76efd01f26e08f9
@ -18,8 +18,8 @@ F config.guess dba2d1300ec8f8cd00c6fb44b9edde21c14e960c
F config.h 5e461e321e0a56f1762da44eece1fe971ebdba3e
F config.h.in feb93ab9f7703907947aadd3bcff7c6e790920bd
F config.sub 9a842e7c332ed65cef3f2c20354e06dc998b2796
F configure b32b2b216a0c7804b5031953c217e32fb0effd41 x
F configure.ac 18befb6052e69653b1914a3d3d6ee4d25ba75674
F configure 945584d7c8926c2305828e3a7c2b33195cda27f7 x
F configure.ac 1d76f7c88052f5018123b5e142f1048cdf090622
F contrib/sqlitecon.tcl 210a913ad63f9f991070821e599d600bd913e0ad
F doc/lemon.html f0f682f50210928c07e562621c3b7e8ab912a538
F doc/report1.txt a031aaf37b185e4fa540223cb516d3bccec7eeac
@ -621,7 +621,7 @@ F www/tclsqlite.tcl 8be95ee6dba05eabcd27a9d91331c803f2ce2130
F www/vdbe.tcl 87a31ace769f20d3627a64fa1fade7fed47b90d0
F www/version3.tcl 890248cf7b70e60c383b0e84d77d5132b3ead42b
F www/whentouse.tcl fc46eae081251c3c181bd79c5faef8195d7991a5
P 53e533d3a764d1973c24bffaacc505ea4b61a2b9
R 00d768189a7178d88ec40a726cdc13f3
U drh
Z 64e3c6f629ca2210e1712a4840620137
P e5aff09ac693946dc7ebb2f245b6434995b12155
R f89fe1f05f380574fb061473087a9073
U mlcreech
Z 73c30e61e03eb0f5f81deae273244d4d

View File

@ -1 +1 @@
e5aff09ac693946dc7ebb2f245b6434995b12155
7d1e79716246b0dd4a64d7c9575b2300e0f6123e