From: drh <> Date: Tue, 6 Aug 2024 20:00:10 +0000 (+0000) Subject: Improvements to ./configure that will hopefully break fewer builds. X-Git-Tag: version-3.47.0~258 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=210f6f89befbe4e4c561fc34aabc175f552450f4;p=thirdparty%2Fsqlite.git Improvements to ./configure that will hopefully break fewer builds. FossilOrigin-Name: 769e32a69b7b7c04225afa0371f139b2ed29aaee5a7a4159a30d600ed9f25c57 --- diff --git a/configure b/configure index 616fb26276..2c57d6ac3a 100755 --- a/configure +++ b/configure @@ -10306,7 +10306,7 @@ USE_AMALGAMATION=1 ######### # Figure out all the name of a working tclsh and parameters needed to compile against Tcl. -# The --with-tcl= configuration parameter might be useful for this. +# The --with-tcl= and/or --with-tclsh= configuration arguments might be useful for this. # # Check whether --with-tclsh was given. @@ -10371,41 +10371,70 @@ if test x"${with_tclsh}" != x -a x"${with_tclsh}" != xnone; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: using tclsh at \"$TCLSH_CMD\"" >&5 $as_echo "using tclsh at \"$TCLSH_CMD\"" >&6; } with_tcl=`${with_tclsh} <${srcdir}/tool/find_tclconfig.tcl` - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH_CMD recommends the tclConfig.sh at ${with_tcl}" >&5 + if test x"${with_tcl}" != x; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TCLSH_CMD recommends the tclConfig.sh at ${with_tcl}" >&5 $as_echo "$TCLSH_CMD recommends the tclConfig.sh at ${with_tcl}" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $TCLSH_CMD is unable to recommend a tclConfig.sh" >&5 +$as_echo "$as_me: WARNING: $TCLSH_CMD is unable to recommend a tclConfig.sh" >&2;} + fi fi if test x"${with_tcl}" != x; then if test -r ${with_tcl}/tclConfig.sh; then tclconfig="${with_tcl}/tclConfig.sh" else - if test -r ${with_tcl}/tcl8.6/tclConfig.sh; then - tclconfig="${with_tcl}/tcl8.6/tclConfig.sh" - else - as_fn_error $? "no tclConfig.sh file found in ${with_tcl} or ${with_tcl}/tcl8.6" "$LINENO" 5 - fi + for i in tcl8.6 tcl9.0 lib; do + if test -r ${with_tcl}/$i/tclConfig.sh; then + tclconfig=${with_tcl}/$i/tclConfig.sh + break + fi + done + fi + if test ! -r "${tclconfig}"; then + as_fn_error $? "no tclConfig.sh file found under ${with_tcl}" "$LINENO" 5 fi - if test x"${tclconfig}" != x; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading TCL configuration from ${tclconfig}" >&5 +else + # If we have not yet found a tclConfig.sh file, look in $libdir whic is + # set automatically by autoconf or by the --prefix command-line option. + # See https://sqlite.org/forum/forumpost/e04e693439a22457 + libdir=${prefix}/lib + if test -r ${libdir}/tclConfig.sh; then + tclconfig=${libdir}/tclConfig.sh + else + for i in tcl8.6 tcl9.0 lib; do + if test -r ${libdir}/$i/tclConfig.sh; then + tclconfig=${libdir}/$i/tclConfig.sh + break + fi + done + fi + if test ! -r "${tclconfig}"; then + as_fn_error $? "cannot find a usable tclConfig.sh file. + Use --with-tcl=DIR to specify a directory where tclConfig.sh can be found. + SQLite does not use TCL internally, but TCL is required to build SQLite + from canonical sources and TCL is required for testing." "$LINENO" 5 + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: loading TCL configuration from ${tclconfig}" >&5 $as_echo "loading TCL configuration from ${tclconfig}" >&6; } - . ${tclconfig} +. ${tclconfig} - # There are lots of other configuration variables that are provided by the - # tclConfig.sh file and that could be included here. But as of right now, - # TCL_LIB_SPEC is the only what that the Makefile uses. - fi - if test x"$TCLSH_CMD" == x; then - TCLSH_CMD=${TCL_EXEC_PREFIX}/bin/tclsh${TCL_VERSION} - if test ! -x ${TCLSH_CMD}; then - TCLSH_CMD_2=${TCL_EXEC_PREFIX}/bin/tclsh - if test ! -x ${TCLSH_CMD_2}; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot find a usable tclsh at either ${TCLSH_CMD} or ${TCLSH_CMD_2}" >&5 +# There are lots of other configuration variables that are provided by the +# tclConfig.sh file and that could be included here. But as of right now, +# TCL_LIB_SPEC is the only what that the Makefile uses. + +if test x"$TCLSH_CMD" == x; then + TCLSH_CMD=${TCL_EXEC_PREFIX}/bin/tclsh${TCL_VERSION} + if test ! -x ${TCLSH_CMD}; then + TCLSH_CMD_2=${TCL_EXEC_PREFIX}/bin/tclsh + if test ! -x ${TCLSH_CMD_2}; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot find a usable tclsh at either ${TCLSH_CMD} or ${TCLSH_CMD_2}" >&5 $as_echo "$as_me: WARNING: cannot find a usable tclsh at either ${TCLSH_CMD} or ${TCLSH_CMD_2}" >&2;} - TCLSH_CMD=none - else - TCLSH_CMD=${TCLSH_CMD_2} - fi + TCLSH_CMD=none + else + TCLSH_CMD=${TCLSH_CMD_2} fi fi fi @@ -10425,7 +10454,6 @@ fi if test "x${TCLLIBDIR+set}" != "xset" ; then - TCLLIBDIR='$(libdir)' for i in `echo 'puts stdout $auto_path' | ${TCLSH_CMD}` ; do if test -d $i ; then TCLLIBDIR=$i diff --git a/configure.ac b/configure.ac index 7526c211dc..095df5e4f6 100644 --- a/configure.ac +++ b/configure.ac @@ -117,7 +117,7 @@ USE_AMALGAMATION=1 ######### # Figure out all the name of a working tclsh and parameters needed to compile against Tcl. -# The --with-tcl= configuration parameter might be useful for this. +# The --with-tcl= and/or --with-tclsh= configuration arguments might be useful for this. # AC_ARG_WITH(tclsh, AS_HELP_STRING([--with-tclsh=PATHNAME],[full pathname of a tclsh to use])) AC_ARG_WITH(tcl, AS_HELP_STRING([--with-tcl=DIR],[directory containing (tclConfig.sh)])) @@ -129,38 +129,66 @@ if test x"${with_tclsh}" != x -a x"${with_tclsh}" != xnone; then TCLSH_CMD=${with_tclsh} AC_MSG_RESULT([using tclsh at "$TCLSH_CMD"]) with_tcl=`${with_tclsh} <${srcdir}/tool/find_tclconfig.tcl` - AC_MSG_RESULT([$TCLSH_CMD recommends the tclConfig.sh at ${with_tcl}]) + if test x"${with_tcl}" != x; then + AC_MSG_RESULT([$TCLSH_CMD recommends the tclConfig.sh at ${with_tcl}]) + else + AC_MSG_WARN([$TCLSH_CMD is unable to recommend a tclConfig.sh]) + fi fi if test x"${with_tcl}" != x; then if test -r ${with_tcl}/tclConfig.sh; then tclconfig="${with_tcl}/tclConfig.sh" else - if test -r ${with_tcl}/tcl8.6/tclConfig.sh; then - tclconfig="${with_tcl}/tcl8.6/tclConfig.sh" - else - AC_MSG_ERROR([no tclConfig.sh file found in ${with_tcl} or ${with_tcl}/tcl8.6]) - fi + for i in tcl8.6 tcl9.0 lib; do + if test -r ${with_tcl}/$i/tclConfig.sh; then + tclconfig=${with_tcl}/$i/tclConfig.sh + break + fi + done fi - if test x"${tclconfig}" != x; then - AC_MSG_RESULT([loading TCL configuration from ${tclconfig}]) - . ${tclconfig} - AC_SUBST(TCL_INCLUDE_SPEC) - AC_SUBST(TCL_LIB_SPEC) - AC_SUBST(TCL_STUB_LIB_SPEC) - # There are lots of other configuration variables that are provided by the - # tclConfig.sh file and that could be included here. But as of right now, - # TCL_LIB_SPEC is the only what that the Makefile uses. + if test ! -r "${tclconfig}"; then + AC_MSG_ERROR([no tclConfig.sh file found under ${with_tcl}]) fi - if test x"$TCLSH_CMD" == x; then - TCLSH_CMD=${TCL_EXEC_PREFIX}/bin/tclsh${TCL_VERSION} - if test ! -x ${TCLSH_CMD}; then - TCLSH_CMD_2=${TCL_EXEC_PREFIX}/bin/tclsh - if test ! -x ${TCLSH_CMD_2}; then - AC_MSG_WARN([cannot find a usable tclsh at either ${TCLSH_CMD} or ${TCLSH_CMD_2}]) - TCLSH_CMD=none - else - TCLSH_CMD=${TCLSH_CMD_2} +else + # If we have not yet found a tclConfig.sh file, look in $libdir whic is + # set automatically by autoconf or by the --prefix command-line option. + # See https://sqlite.org/forum/forumpost/e04e693439a22457 + libdir=${prefix}/lib + if test -r ${libdir}/tclConfig.sh; then + tclconfig=${libdir}/tclConfig.sh + else + for i in tcl8.6 tcl9.0 lib; do + if test -r ${libdir}/$i/tclConfig.sh; then + tclconfig=${libdir}/$i/tclConfig.sh + break fi + done + fi + if test ! -r "${tclconfig}"; then + AC_MSG_ERROR([cannot find a usable tclConfig.sh file. + Use --with-tcl=DIR to specify a directory where tclConfig.sh can be found. + SQLite does not use TCL internally, but TCL is required to build SQLite + from canonical sources and TCL is required for testing.]) + fi +fi +AC_MSG_RESULT([loading TCL configuration from ${tclconfig}]) +. ${tclconfig} +AC_SUBST(TCL_INCLUDE_SPEC) +AC_SUBST(TCL_LIB_SPEC) +AC_SUBST(TCL_STUB_LIB_SPEC) +# There are lots of other configuration variables that are provided by the +# tclConfig.sh file and that could be included here. But as of right now, +# TCL_LIB_SPEC is the only what that the Makefile uses. + +if test x"$TCLSH_CMD" == x; then + TCLSH_CMD=${TCL_EXEC_PREFIX}/bin/tclsh${TCL_VERSION} + if test ! -x ${TCLSH_CMD}; then + TCLSH_CMD_2=${TCL_EXEC_PREFIX}/bin/tclsh + if test ! -x ${TCLSH_CMD_2}; then + AC_MSG_WARN([cannot find a usable tclsh at either ${TCLSH_CMD} or ${TCLSH_CMD_2}]) + TCLSH_CMD=none + else + TCLSH_CMD=${TCLSH_CMD_2} fi fi fi @@ -179,7 +207,6 @@ AC_SUBST(HAVE_TCL) AC_ARG_VAR([TCLLIBDIR], [Where to install tcl plugin]) if test "x${TCLLIBDIR+set}" != "xset" ; then - TCLLIBDIR='$(libdir)' for i in `echo 'puts stdout $auto_path' | ${TCLSH_CMD}` ; do if test -d $i ; then TCLLIBDIR=$i diff --git a/manifest b/manifest index a186bcee82..215ae7ad21 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Change\sthe\sAggInfoColumnReg()\sand\sAggInfoFuncReg()\smacros\sfor\ncompilers\sthat\scannot\sparse\sempty\selements\sof\sa\scomma\sexpression.\n[forum:/forumpost/8fd21998dc|Forum\spost\s8fd21998dc]. -D 2024-08-06T10:29:41.290 +C Improvements\sto\s./configure\sthat\swill\shopefully\sbreak\sfewer\sbuilds. +D 2024-08-06T20:00:10.407 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724 @@ -35,8 +35,8 @@ F autoconf/tea/win/nmakehlp.c b01f822eabbe1ed2b64e70882d97d48402b42d2689a1ea0034 F autoconf/tea/win/rules.vc 7b3bb2ef32ade0f3f14d951231811678722725e3bca240dd9727ae0dfe10f6a5 F config.guess 883205ddf25b46f10c181818bf42c09da9888884af96f79e1719264345053bd6 F config.sub c2d0260f17f3e4bc0b6808fccf1b291cb5e9126c14fc5890efc77b9fd0175559 -F configure 187978aa8b6e5bfe261bce02a883f82f7a1d239f95e53cbb5eb6be0aaab2a5b6 x -F configure.ac 50ac86967b264eab4f2925ae8c981601f154aa090ef2fd0c413974fca63251d0 +F configure 8c74221e3e3af939270c27f0600281a5485ac2e5014dd7581b056e24a528d625 x +F configure.ac 9a3d92b38ad56456d09c1272f83131794f73110437f0f53fb94c90ce0d7a351a F contrib/sqlitecon.tcl 210a913ad63f9f991070821e599d600bd913e0ad F doc/F2FS.txt c1d4a0ae9711cfe0e1d8b019d154f1c29e0d3abfe820787ba1e9ed7691160fcd F doc/compile-for-windows.md e8635eea9153dcd6a51fd2740666ebc4492b3813cb1ac31cd8e99150df91762d @@ -2203,8 +2203,8 @@ F vsixtest/vsixtest.tcl 6195aba1f12a5e10efc2b8c0009532167be5e301abe5b31385638080 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0 -P 931ad7d9e3aedb6d466fffc0af1f8d6b20d57a35dec644f28585f3e84f22d1ce -R d8ba70166a18ab57aa5e818fead8a2e7 +P 533a6251f188805363f0e39613ea03b1bfd758eaea00e0855803238585bdfec7 +R a7a477ca379232403aa066474b0e57d0 U drh -Z 3f8f0dbf60885f64555a59fa3dde5754 +Z 01918af4ac385e19f077c5342eefac64 # Remove this line to create a well-formed Fossil manifest. diff --git a/manifest.uuid b/manifest.uuid index 5b481e56df..c7ef415a77 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -533a6251f188805363f0e39613ea03b1bfd758eaea00e0855803238585bdfec7 +769e32a69b7b7c04225afa0371f139b2ed29aaee5a7a4159a30d600ed9f25c57