mirror of
https://github.com/sqlite/sqlite.git
synced 2024-11-21 19:29:09 +01:00
Lots of work on auto.def and the utility tcl lib. Still lots more to do.
FossilOrigin-Name: 2141527a38ca8170e79b5b5e664378f0d8464055119f5b986e5d7b1be75e919e
This commit is contained in:
parent
aaef970446
commit
13aea08683
3384
Makefile.in
3384
Makefile.in
File diff suppressed because it is too large
Load Diff
364
auto.def
364
auto.def
@ -60,6 +60,7 @@ set enable_shared 1
|
||||
# --enable-tempstore to --with-tempstore seems like the better
|
||||
# approach, in that it doesn't lead to a losing fight with autosetup.
|
||||
options {
|
||||
with-debug:=1 => {Enable debug build flags}
|
||||
with-tclsh:PATHNAME => {Full pathname of tclsh to use}
|
||||
with-tcl:DIR => {Directory containing tclConfig.sh}
|
||||
tcl=1 => {Disable building accessory programs that require TCL-dev}
|
||||
@ -86,10 +87,11 @@ options {
|
||||
geopoly => {Enable the GEOPOLY extension}
|
||||
rtree => {Enable the RTREE extension}
|
||||
session => {Enable the SESSION extension}
|
||||
gcov => {Enable coverage testing using gcov}
|
||||
gcov=0 => {Enable coverage testing using gcov}
|
||||
linemacros => {Enable #line macros in the amalgamation.}
|
||||
with-wasi-sdk:=/opt/wasi-sdk
|
||||
=> {Top-most dir of the wasi-sdk for a WASI build}
|
||||
with-emsdk:DIR => {Top-most dir of the Emscripten SDK installation}
|
||||
dump-defines=1 => {Dump autosetup defines to $DUMP_DEFINES_FILE}
|
||||
}
|
||||
# debug=0 => {debugging & verbose explain}
|
||||
@ -98,7 +100,9 @@ set srcdir $autosetup(srcdir)
|
||||
puts "srcdir = $srcdir"
|
||||
set VERSION [readfile $srcdir/VERSION]
|
||||
puts "VERSION = $VERSION"
|
||||
puts "with-wasi-sdk? = [opt-val with-wasi-sdk]"
|
||||
define PACKAGE_VERSION $VERSION
|
||||
#puts "with-wasi-sdk? = [opt-val with-wasi-sdk]"
|
||||
#puts "with-debug? = [opt-val with-debug]"
|
||||
|
||||
#
|
||||
# The build process allows for using a cross-compiler. But the default
|
||||
@ -164,8 +168,11 @@ puts "with-wasi-sdk? = [opt-val with-wasi-sdk]"
|
||||
########################################################################
|
||||
# OPT_FEATURE_FLAGS = -DSQLITE_OMIT/ENABLE flags.
|
||||
define OPT_FEATURE_FLAGS {}
|
||||
# Adds $flag, if not empty, to OPT_FEATURE_FLAGS.
|
||||
proc add-feature-flag {flag} {
|
||||
define-append OPT_FEATURE_FLAGS $flag
|
||||
if {"" ne $flag} {
|
||||
define-append OPT_FEATURE_FLAGS $flag
|
||||
}
|
||||
}
|
||||
# add-feature-flag -DSQLITE_JUST_TESTING=3
|
||||
|
||||
@ -180,30 +187,6 @@ if {".exe" eq [get-define TARGET_EXEEXT]} {
|
||||
# todo? add -DSQLITE_OS_UNIX=1 to CFLAGS?
|
||||
}
|
||||
|
||||
########################################################################
|
||||
# Force-set autosetup option $flag to $val.
|
||||
proc opt-set {flag {val 1}} {
|
||||
global autosetup
|
||||
if {$flag ni $::autosetup(options)} {
|
||||
# We have to add this to autosetup(options) or else future calls
|
||||
# to [opt-bool $flag] will fail validation of $flag.
|
||||
lappend ::autosetup(options) $flag
|
||||
}
|
||||
dict set ::autosetup(optset) $flag $val
|
||||
}
|
||||
|
||||
########################################################################
|
||||
# If [opt-bool $boolFlag] is true, eval $then, else eval $else.
|
||||
proc if-enabled {boolFlag then {else {}}} {
|
||||
if {[opt-bool $boolFlag]} {eval $then} else {eval $else}
|
||||
}
|
||||
|
||||
########################################################################
|
||||
# If [opt-bool $boolFlag] is false, eval $then, else eval $else.
|
||||
proc if-disabled {boolFlag then {else {}}} {
|
||||
if {![opt-bool $boolFlag]} {eval $then} else {eval $else}
|
||||
}
|
||||
|
||||
#########
|
||||
# Programs needed
|
||||
if {"" eq [hwaci-bin-define install]} {
|
||||
@ -219,15 +202,29 @@ cc-check-lfs
|
||||
cc-check-types int8_t int16_t int32_t int64_t intptr_t \
|
||||
uint8_t uint16_t uint32_t uint64_t uintptr_t
|
||||
|
||||
#########
|
||||
# Check for needed/wanted headers
|
||||
cc-check-includes sys/types.h stdlib.h stdint.h inttypes.h malloc.h
|
||||
|
||||
#########
|
||||
# Figure out whether or not we have these functions
|
||||
cc-check-functions fdatasync gmtime_r isnan localtime_r localtime_s \
|
||||
malloc_usable_size strchrnul usleep utime pread pread64 pwrite pwrite64
|
||||
|
||||
#########
|
||||
# Check for needed/wanted headers
|
||||
cc-check-includes sys/types.h stdlib.h stdint.h inttypes.h malloc.h
|
||||
if {[cc-check-includes zlib.h] && [cc-check-function-in-lib deflate z]} {
|
||||
define HAVE_ZLIB 1
|
||||
define LDFLAGS_ZLIB -lz
|
||||
} else {
|
||||
define HAVE_ZLIB 0
|
||||
define LDFLAGS_ZLIB ""
|
||||
}
|
||||
|
||||
msg-checking "Debug build? "
|
||||
hwaci-if-opt-truthy with-debug {
|
||||
msg-result yes
|
||||
} {
|
||||
msg-result "no. Use --with-debug to enable."
|
||||
}
|
||||
|
||||
##########
|
||||
# Handle --with-wasi-sdk=DIR
|
||||
#
|
||||
@ -249,8 +246,8 @@ if {1} {
|
||||
msg-result "using wasi-sdk clang, disabling: tcl, CLI shell, DLL"
|
||||
define HAVE_WASI_SDK 1
|
||||
define WASI_SDK_DIR $wasiSdkDir
|
||||
opt-set tcl 0
|
||||
opt-set threadsafe 0
|
||||
hwaci-opt-set tcl 0
|
||||
hwaci-opt-set threadsafe 0
|
||||
set cross_compiling 1
|
||||
set enable_shared 0
|
||||
|
||||
@ -267,9 +264,9 @@ if {1} {
|
||||
# XXX LD="${wasiSdkDir}/bin/wasm-ld"
|
||||
# XXX RANLIB="${wasiSdkDir}/bin/llvm-ranlib"
|
||||
# set cross_compiling yes
|
||||
# opt-set threadsafe 0
|
||||
# hwaci-opt-set threadsafe 0
|
||||
# set use_tcl no
|
||||
# opt-set tcl 0
|
||||
# hwaci-opt-set tcl 0
|
||||
# libtool is apparently hard-coded to use gcc for linking DLLs, so
|
||||
# we disable the DLL build...
|
||||
# set enable_shared no
|
||||
@ -437,48 +434,46 @@ if {0} {
|
||||
# XXX fi
|
||||
# XXX AC_SUBST BUILD_CC
|
||||
|
||||
if-enabled all {
|
||||
opt-set fts4
|
||||
opt-set fts5
|
||||
opt-set geopoly
|
||||
opt-set rtree
|
||||
opt-set session
|
||||
} {
|
||||
if-enabled geopoly {opt-set rtree}
|
||||
hwaci-if-opt-truthy all {
|
||||
hwaci-opt-set fts4
|
||||
hwaci-opt-set fts5
|
||||
hwaci-opt-set geopoly
|
||||
hwaci-opt-set rtree
|
||||
hwaci-opt-set session
|
||||
}
|
||||
#{
|
||||
# hwaci-if-opt-truthy geopoly {}
|
||||
#}
|
||||
|
||||
|
||||
##########
|
||||
# Do we want to support multithreaded use of sqlite
|
||||
#
|
||||
if {0} {
|
||||
if {![opt-bool threadsafe]} {
|
||||
}
|
||||
msg-checking "Checking whether to support threadsafe operation..."
|
||||
# XXX if test "$enable_threadsafe" = "no"; then
|
||||
# XXX SQLITE_THREADSAFE=0
|
||||
msg-result "no"
|
||||
# XXX else
|
||||
# XXX SQLITE_THREADSAFE=1
|
||||
msg-result "yes"
|
||||
# XXX fi
|
||||
# XXX AC_SUBST SQLITE_THREADSAFE
|
||||
|
||||
# XXX if test "$SQLITE_THREADSAFE" = "1"; then
|
||||
msg-checking "Checking whether to support threadsafe operation... "
|
||||
hwaci-if-opt-truthy threadsafe {
|
||||
msg-result yes
|
||||
add-feature-flag -DSQLITE_THREADSAFE=1
|
||||
cc-check-function-in-lib pthread_create pthread
|
||||
cc-check-function-in-lib pthread_mutexattr_init pthread
|
||||
# XXX fi
|
||||
} {
|
||||
msg-result no
|
||||
add-feature-flag -DSQLITE_THREADSAFE=0
|
||||
}
|
||||
|
||||
##########
|
||||
# Do we want to support release
|
||||
# Do we want to support release?
|
||||
#
|
||||
if-enabled releasemode {
|
||||
msg-result "Release-mode build."
|
||||
set enable_releasemode 1
|
||||
} {
|
||||
msg-result "Non-release-mode build."
|
||||
set enable_releasemode 0
|
||||
# Maintenance note: this might be irrelevant with an autosetup port,
|
||||
# as it appears to be related to libtool (part of the autotools).
|
||||
#
|
||||
if {0} {
|
||||
hwaci-if-opt-truthy releasemode {
|
||||
msg-result "Release-mode build."
|
||||
set enable_releasemode 1
|
||||
} {
|
||||
msg-result "Non-release-mode build."
|
||||
set enable_releasemode 0
|
||||
}
|
||||
}
|
||||
|
||||
if {0} {
|
||||
@ -494,7 +489,8 @@ if {0} {
|
||||
}
|
||||
|
||||
##########
|
||||
# Do we want temporary databases in memory
|
||||
# Do we want temporary databases in memory?
|
||||
#
|
||||
if {1} {
|
||||
set ts [opt-val with-tempstore no]
|
||||
set tsn 1
|
||||
@ -505,7 +501,7 @@ if {1} {
|
||||
yes { set tsn 2 }
|
||||
always { set tsn 3 }
|
||||
default {
|
||||
user-error "Invalid with-tempstore value \[$ts]. Use one of: no, yes, always, never"
|
||||
user-error "Invalid with-tempstore value \[$ts]. Use one of: never, no, yes, always"
|
||||
}
|
||||
}
|
||||
msg-result $ts
|
||||
@ -513,55 +509,6 @@ if {1} {
|
||||
unset ts tsn
|
||||
}
|
||||
|
||||
if {0} {
|
||||
###########
|
||||
# Lots of things are different if we are compiling for Windows using
|
||||
# the CYGWIN environment. So check for that special case and handle
|
||||
# things accordingly.
|
||||
#
|
||||
msg-checking "Checking if executables have the .exe suffix..."
|
||||
# XXX if test "$config_BUILD_EXEEXT" = ".exe"; then
|
||||
# XXX CYGWIN=yes
|
||||
msg-result "yes"
|
||||
# XXX else
|
||||
msg-result "unknown"
|
||||
# XXX fi
|
||||
# XXX if test "$CYGWIN" != "yes"; then
|
||||
# XXX m4_warn([obsolete],
|
||||
# XXX [AC_CYGWIN is obsolete: use AC_CANONICAL_HOST and check if $host_os
|
||||
# XXX matches *cygwin*])
|
||||
# XXX case $host_os in
|
||||
# XXX *cygwin* ) CYGWIN=yes;;
|
||||
# XXX * ) CYGWIN=no;;
|
||||
# XXX esac
|
||||
|
||||
# XXX fi
|
||||
# XXX if test "$CYGWIN" = "yes"; then
|
||||
# XXX BUILD_EXEEXT=.exe
|
||||
# XXX else
|
||||
# XXX BUILD_EXEEXT=$EXEEXT
|
||||
# XXX fi
|
||||
# XXX if test x"$cross_compiling" = xno; then
|
||||
# XXX TARGET_EXEEXT=$BUILD_EXEEXT
|
||||
# XXX else
|
||||
# XXX TARGET_EXEEXT=$config_TARGET_EXEEXT
|
||||
# XXX fi
|
||||
# XXX if test "$TARGET_EXEEXT" = ".exe"; then
|
||||
# XXX SQLITE_OS_UNIX=0
|
||||
# XXX SQLITE_OS_WIN=1
|
||||
# XXX CFLAGS="$CFLAGS -DSQLITE_OS_WIN=1"
|
||||
# XXX else
|
||||
# XXX SQLITE_OS_UNIX=1
|
||||
# XXX SQLITE_OS_WIN=0
|
||||
# XXX CFLAGS="$CFLAGS -DSQLITE_OS_UNIX=1"
|
||||
# XXX fi
|
||||
|
||||
# XXX AC_SUBST BUILD_EXEEXT
|
||||
# XXX AC_SUBST SQLITE_OS_UNIX
|
||||
# XXX AC_SUBST SQLITE_OS_WIN
|
||||
# XXX AC_SUBST TARGET_EXEEXT
|
||||
}
|
||||
|
||||
if {0} {
|
||||
##########
|
||||
# Figure out what C libraries are required to compile programs
|
||||
@ -731,7 +678,7 @@ if {0} {
|
||||
# XXX AC_SUBST HAVE_ZLIB
|
||||
}
|
||||
|
||||
if-enabled load-extension {
|
||||
hwaci-if-opt-truthy load-extension {
|
||||
if {[cc-check-function-in-lib dlopen dl]} {
|
||||
define LDFLAGS_DLOPEN [get-define lib_dlopen]
|
||||
} else {
|
||||
@ -743,7 +690,7 @@ if-enabled load-extension {
|
||||
msg-result "Disabling loadable extensions."
|
||||
}
|
||||
|
||||
if-enabled math {
|
||||
hwaci-if-opt-truthy math {
|
||||
if {![cc-check-function-in-lib ceil m]} {
|
||||
user-error "Cannot find libm functions. Use --disable-math to bypass this."
|
||||
}
|
||||
@ -756,7 +703,7 @@ if-enabled math {
|
||||
msg-result "Disabling math SQL functions"
|
||||
}
|
||||
|
||||
if-enabled json {
|
||||
hwaci-if-opt-truthy json {
|
||||
msg-result "Enabling JSON SQL functions"
|
||||
} {
|
||||
add-feature-flag {-DSQLITE_OMIT_JSON}
|
||||
@ -816,85 +763,98 @@ if {0} {
|
||||
msg-result "yes"
|
||||
# XXX OPT_FEATURE_FLAGS="${OPT_FEATURE_FLAGS} -DSQLITE_ENABLE_FTS5"
|
||||
cc-check-function-in-lib log m
|
||||
# XXX else
|
||||
msg-result "no"
|
||||
# XXX fi
|
||||
}
|
||||
|
||||
#########
|
||||
# attempt to duplicate any OMITS and ENABLES into the ${OPT_FEATURE_FLAGS} parameter
|
||||
# XXX for option in $CFLAGS $CPPFLAGS
|
||||
# XXX do
|
||||
# XXX case $option in
|
||||
# XXX -DSQLITE_OMIT*) OPT_FEATURE_FLAGS="$OPT_FEATURE_FLAGS $option";;
|
||||
# XXX -DSQLITE_ENABLE*) OPT_FEATURE_FLAGS="$OPT_FEATURE_FLAGS $option";;
|
||||
# XXX esac
|
||||
# XXX done
|
||||
# XXX AC_SUBST OPT_FEATURE_FLAGS
|
||||
if {0} {
|
||||
# is this still relevant?
|
||||
|
||||
# attempt to remove any OMITS and ENABLES from the $(CFLAGS) parameter
|
||||
# XXX ac_temp_CFLAGS=""
|
||||
# XXX for option in $CFLAGS
|
||||
# XXX do
|
||||
# XXX case $option in
|
||||
# XXX -DSQLITE_OMIT*) ;;
|
||||
# XXX -DSQLITE_ENABLE*) ;;
|
||||
# XXX *) ac_temp_CFLAGS="$ac_temp_CFLAGS $option";;
|
||||
# XXX esac
|
||||
# XXX done
|
||||
# XXX CFLAGS=$ac_temp_CFLAGS
|
||||
#########
|
||||
# attempt to duplicate any OMITS and ENABLES into the ${OPT_FEATURE_FLAGS} parameter
|
||||
# XXX for option in $CFLAGS $CPPFLAGS
|
||||
# XXX do
|
||||
# XXX case $option in
|
||||
# XXX -DSQLITE_OMIT*) OPT_FEATURE_FLAGS="$OPT_FEATURE_FLAGS $option";;
|
||||
# XXX -DSQLITE_ENABLE*) OPT_FEATURE_FLAGS="$OPT_FEATURE_FLAGS $option";;
|
||||
# XXX esac
|
||||
# XXX done
|
||||
# XXX AC_SUBST OPT_FEATURE_FLAGS
|
||||
|
||||
# attempt to remove any OMITS and ENABLES from the $(CPPFLAGS) parameter
|
||||
# XXX ac_temp_CPPFLAGS=""
|
||||
# XXX for option in $CPPFLAGS
|
||||
# XXX do
|
||||
# XXX case $option in
|
||||
# XXX -DSQLITE_OMIT*) ;;
|
||||
# XXX -DSQLITE_ENABLE*) ;;
|
||||
# XXX *) ac_temp_CPPFLAGS="$ac_temp_CPPFLAGS $option";;
|
||||
# XXX esac
|
||||
# XXX done
|
||||
# XXX CPPFLAGS=$ac_temp_CPPFLAGS
|
||||
# attempt to remove any OMITS and ENABLES from the $(CFLAGS) parameter
|
||||
# XXX ac_temp_CFLAGS=""
|
||||
# XXX for option in $CFLAGS
|
||||
# XXX do
|
||||
# XXX case $option in
|
||||
# XXX -DSQLITE_OMIT*) ;;
|
||||
# XXX -DSQLITE_ENABLE*) ;;
|
||||
# XXX *) ac_temp_CFLAGS="$ac_temp_CFLAGS $option";;
|
||||
# XXX esac
|
||||
# XXX done
|
||||
# XXX CFLAGS=$ac_temp_CFLAGS
|
||||
|
||||
# attempt to remove any OMITS and ENABLES from the $(BUILD_CFLAGS) parameter
|
||||
# XXX ac_temp_BUILD_CFLAGS=""
|
||||
# XXX for option in $BUILD_CFLAGS
|
||||
# XXX do
|
||||
# XXX case $option in
|
||||
# XXX -DSQLITE_OMIT*) ;;
|
||||
# XXX -DSQLITE_ENABLE*) ;;
|
||||
# XXX *) ac_temp_BUILD_CFLAGS="$ac_temp_BUILD_CFLAGS $option";;
|
||||
# XXX esac
|
||||
# XXX done
|
||||
# XXX BUILD_CFLAGS=$ac_temp_BUILD_CFLAGS
|
||||
# attempt to remove any OMITS and ENABLES from the $(CPPFLAGS) parameter
|
||||
# XXX ac_temp_CPPFLAGS=""
|
||||
# XXX for option in $CPPFLAGS
|
||||
# XXX do
|
||||
# XXX case $option in
|
||||
# XXX -DSQLITE_OMIT*) ;;
|
||||
# XXX -DSQLITE_ENABLE*) ;;
|
||||
# XXX *) ac_temp_CPPFLAGS="$ac_temp_CPPFLAGS $option";;
|
||||
# XXX esac
|
||||
# XXX done
|
||||
# XXX CPPFLAGS=$ac_temp_CPPFLAGS
|
||||
|
||||
# attempt to remove any OMITS and ENABLES from the $(BUILD_CFLAGS) parameter
|
||||
# XXX ac_temp_BUILD_CFLAGS=""
|
||||
# XXX for option in $BUILD_CFLAGS
|
||||
# XXX do
|
||||
# XXX case $option in
|
||||
# XXX -DSQLITE_OMIT*) ;;
|
||||
# XXX -DSQLITE_ENABLE*) ;;
|
||||
# XXX *) ac_temp_BUILD_CFLAGS="$ac_temp_BUILD_CFLAGS $option";;
|
||||
# XXX esac
|
||||
# XXX done
|
||||
# XXX BUILD_CFLAGS=$ac_temp_BUILD_CFLAGS
|
||||
}
|
||||
|
||||
if-enabled gcov {
|
||||
msg-checking "Enable gcov? "
|
||||
hwaci-if-opt-truthy gcov {
|
||||
define USE_GCOV 1
|
||||
msg-result "Enabling gcov"
|
||||
msg-result yes
|
||||
} {
|
||||
define USE_GCOV 0
|
||||
msg-result no
|
||||
}
|
||||
|
||||
foreach {boolFlag featureFlag} {
|
||||
fts4 -DSQLITE_ENABLE_FTS4
|
||||
fts5 -DSQLITE_ENABLE_FTS5
|
||||
geopoly -DSQLITE_ENABLE_GEOPOLY
|
||||
rtree -DSQLITE_ENABLE_RTREE
|
||||
session {-DSQLITE_ENABLE_SESSION -DSQLITE_ENABLE_PREUPDATE_HOOK}
|
||||
update-limit -DSQLITE_ENABLE_UPDATE_DELETE_LIMIT
|
||||
} {
|
||||
if {[opt-bool $boolFlag]} {
|
||||
add-feature-flag $featureFlag
|
||||
msg-checking "Enabling "
|
||||
} else {
|
||||
msg-checking "Not enabling "
|
||||
########################################################################
|
||||
# Handle various SQLITE_ENABLE_... feature flags.
|
||||
foreach {boolFlag featureFlag ifSetEvalThis} {
|
||||
fts4 -DSQLITE_ENABLE_FTS4 {cc-check-function-in-lib log m}
|
||||
fts5 -DSQLITE_ENABLE_FTS5 {cc-check-function-in-lib log m}
|
||||
geopoly -DSQLITE_ENABLE_GEOPOLY {hwaci-opt-set rtree}
|
||||
rtree -DSQLITE_ENABLE_RTREE {}
|
||||
session {-DSQLITE_ENABLE_SESSION -DSQLITE_ENABLE_PREUPDATE_HOOK} {}
|
||||
update-limit -DSQLITE_ENABLE_UPDATE_DELETE_LIMIT {}
|
||||
memsys5 -DSQLITE_ENABLE_MEMSYS5 {}
|
||||
memsys3 {} {
|
||||
if {[opt-bool memsys5]} {
|
||||
msg-result "NOT enabling memsys3 because memsys5 is enabled."
|
||||
} else {
|
||||
add-feature-flag -DSQLITE_ENABLE_MEMSYS3
|
||||
}
|
||||
}
|
||||
} {
|
||||
if {[hwaci-opt-truthy $boolFlag]} {
|
||||
add-feature-flag $featureFlag
|
||||
msg-result "Enabling $boolFlag"
|
||||
eval $ifSetEvalThis
|
||||
} else {
|
||||
msg-result "Not enabling $boolFlag"
|
||||
}
|
||||
msg-result "$boolFlag"
|
||||
}
|
||||
|
||||
msg-checking "Use #line macros in the amalgamation: "
|
||||
if-enabled linemacros {
|
||||
hwaci-if-opt-truthy linemacros {
|
||||
define AMALGAMATION_LINE_MACROS {--linemacros=1}
|
||||
msg-result yes
|
||||
} {
|
||||
@ -902,21 +862,43 @@ if-enabled linemacros {
|
||||
msg-result no
|
||||
}
|
||||
|
||||
if {0} {
|
||||
#########
|
||||
# Generate the output files.
|
||||
#
|
||||
# XXX AC_SUBST BUILD_CFLAGS
|
||||
make-template Makefile.in
|
||||
make-template sqlite3.pc.in
|
||||
make-config-header sqlite_cfg.h
|
||||
|
||||
##########
|
||||
# Emscripten SDK
|
||||
#
|
||||
if {1} {
|
||||
# TODO: port this bit and its associated shell script from the
|
||||
# Fossil source tree's auto.def and tools/emcc.sh.in.
|
||||
}
|
||||
|
||||
if {"" ne [get-define OPT_FEATURE_FLAGS]} {
|
||||
#########
|
||||
# Generate the output files.
|
||||
#
|
||||
if {1} {
|
||||
# mystery: why are defines (srcdir, top_srcdir) both absolute when emitted
|
||||
# from make-config-header but relative when emitted via make-template?
|
||||
|
||||
hwaci-make-from-dot-in Makefile
|
||||
hwaci-make-from-dot-in sqlite3.pc
|
||||
#hwaci-make-from-dot-in ext/wasm/GNUmakefile
|
||||
if {0} {
|
||||
# output from make-config-header is not quite the same as that from the
|
||||
# autotools. We may need to write a custom replacement.
|
||||
# hwaci-make-from-dot-in sqlite_cfg.h
|
||||
# make-config-header sqlite_cfg.h -bare {SIZEOF_* HAVE_DECL_*} -auto HAVE_* -none *
|
||||
# make-config-header sqlite_cfg.h -bare {SIZEOF_* HAVE_*} -none *
|
||||
# make-config-header sqlite_cfg.h
|
||||
}
|
||||
}
|
||||
|
||||
set oFF [get-define OPT_FEATURE_FLAGS]
|
||||
if {"" ne $oFF} {
|
||||
define OPT_FEATURE_FLAGS [lsort -unique $oFF]
|
||||
msg-result "Final feature flags: [get-define OPT_FEATURE_FLAGS]"
|
||||
}
|
||||
unset oFF
|
||||
|
||||
if-enabled dump-defines {
|
||||
hwaci-if-opt-truthy dump-defines {
|
||||
global DUMP_DEFINES_FILE
|
||||
msg-result "--dump-defines is creating file: $DUMP_DEFINES_FILE"
|
||||
make-config-header $DUMP_DEFINES_FILE -bare {OPT_FEATURE_FLAGS SQLITE_OS_*} -auto {*}
|
||||
|
@ -105,10 +105,49 @@ proc hwaci-require-bash {} {
|
||||
return $bash
|
||||
}
|
||||
|
||||
########################################################################
|
||||
# Force-set autosetup option $flag to $val. The value can be fetched
|
||||
# later with [opt-val], [opt-bool], and friends.
|
||||
proc hwaci-opt-set {flag {val 1}} {
|
||||
global autosetup
|
||||
if {$flag ni $::autosetup(options)} {
|
||||
# We have to add this to autosetup(options) or else future calls
|
||||
# to [opt-bool $flag] will fail validation of $flag.
|
||||
lappend ::autosetup(options) $flag
|
||||
}
|
||||
dict set ::autosetup(optset) $flag $val
|
||||
}
|
||||
|
||||
########################################################################
|
||||
# Returns 1 if $val appears to be a truthy value, else returns
|
||||
# 0. Truthy values are any of {1 on enabled yes}
|
||||
proc hwaci-val-truthy {val} {
|
||||
return [expr {$val in {1 on enabled yes}}]
|
||||
}
|
||||
|
||||
########################################################################
|
||||
# Returns 1 if [opt-val $flag] appears to be a truthy value or
|
||||
# [opt-bool $flag] is true. See hwaci-val-truthy.
|
||||
proc hwaci-opt-truthy {flag} {
|
||||
if {[hwaci-val-truthy [opt-val $flag]]} { return 1 }
|
||||
set rc 0
|
||||
catch {
|
||||
# opt-bool will throw if $flag is not a known boolean flag
|
||||
set rc [opt-bool $flag]
|
||||
}
|
||||
return $rc
|
||||
}
|
||||
|
||||
########################################################################
|
||||
# If [hwaci-opt-truthy $flag] is true, eval $then, else eval $else.
|
||||
proc hwaci-if-opt-truthy {flag then {else {}}} {
|
||||
if {[hwaci-opt-truthy $flag]} {eval $then} else {eval $else}
|
||||
}
|
||||
|
||||
########################################################################
|
||||
# Args: [-v] optName defName {descr {}}
|
||||
#
|
||||
# Checks [opt-bool $optName] and does [define $defName X] where X is 0
|
||||
# Checks [hwaci-opt-truthy $optName] and does [define $defName X] where X is 0
|
||||
# for false and 1 for true. descr is an optional [msg-checking]
|
||||
# argument which defaults to $defName. Returns X.
|
||||
#
|
||||
@ -129,7 +168,7 @@ proc hwaci-opt-bool-01 {args} {
|
||||
}
|
||||
set rc 0
|
||||
msg-checking "$descr ... "
|
||||
if {[opt-bool $optName]} {
|
||||
if {[hwaci-opt-truthy $optName]} {
|
||||
if {0 eq $invert} {
|
||||
set rc 1
|
||||
} else {
|
||||
@ -305,7 +344,8 @@ proc hwaci-make-from-dot-in {filename {touch 0}} {
|
||||
# tokens, and interfering with autosetup's use of these vars, this
|
||||
# routine does not directly modify CFLAGS or LDFLAGS.
|
||||
proc hwaci-check-profile-flag {{flagname profile}} {
|
||||
if {[opt-bool $flagname]} {
|
||||
#puts "flagname=$flagname ?[hwaci-opt-truthy $flagname]?"
|
||||
if {[hwaci-opt-truthy $flagname]} {
|
||||
set CC [get-define CC]
|
||||
regsub {.*ccache *} $CC "" CC
|
||||
# ^^^ if CC="ccache gcc" then [exec] treats "ccache gcc" as a
|
||||
@ -328,6 +368,8 @@ proc hwaci-check-profile-flag {{flagname profile}} {
|
||||
# an autosetup define which contains platform name info, defaulting to
|
||||
# "host". The other legal value is "target".
|
||||
proc hwaci-looks-like-windows {{key host}} {
|
||||
global autosetup
|
||||
if {$::autosetup(iswin)} { return 1 }
|
||||
switch -glob -- [get-define $key] {
|
||||
*-*-ming* - *-*-cygwin - *-*-msys {
|
||||
return 1
|
||||
|
16
manifest
16
manifest
@ -1,9 +1,9 @@
|
||||
C Change\s--enable-tempstore\sto\s--with-tempstore\sto\savoid\sthe\suphill\s(and\slosing)\sbattle\swith\sautosetup's\sbuilt-in\shandling\sof\sthe\s--enable/--disable\sprefixes.
|
||||
D 2024-09-25T12:16:13.024
|
||||
C Lots\sof\swork\son\sauto.def\sand\sthe\sutility\stcl\slib.\sStill\slots\smore\sto\sdo.
|
||||
D 2024-09-25T14:38:46.807
|
||||
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
|
||||
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
|
||||
F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
|
||||
F Makefile.in fa448c4c0567623fd140efebecb570ab58d955d766a5ea0fd8a94e9b5697007c
|
||||
F Makefile.in cc79c614f589bda2a0995851ca652f1713490dc9f79867f3ad2c82121d07cbfa
|
||||
F Makefile.linux-gcc f3842a0b1efbfbb74ac0ef60e56b301836d05b4d867d014f714fa750048f1ab6
|
||||
F Makefile.msc e3c4723c27464acc31da4420b808c8d2690180ba2b915897bece0a9d5d2cecf6
|
||||
F README.md c3c0f19532ce28f6297a71870f3c7b424729f0e6d9ab889616d3587dd2332159
|
||||
@ -14,7 +14,7 @@ F art/icon-80x90.gif 65509ce3e5f86a9cd64fe7fca2d23954199f31fe44c1e09e208c80fb83d
|
||||
F art/sqlite370.eps aa97a671332b432a54e1d74ff5e8775be34200c2
|
||||
F art/sqlite370.ico af56c1d00fee7cd4753e8631ed60703ed0fc6e90
|
||||
F art/sqlite370.jpg d512473dae7e378a67e28ff96a34da7cb331def2
|
||||
F auto.def 46adeff81937896526e074fb26dad88f482f44ab4577468a43da73304158d357
|
||||
F auto.def acffcaef405d1a93e5af1a6bfc9ad175e045f0113b896e31812294155aa729e1
|
||||
F autoconf/INSTALL 83e4a25da9fd053c7b3665eaaaf7919707915903
|
||||
F autoconf/Makefile.am adedc1324b6a87fdd1265ddd336d2fb7d4f36a0e77b86ea553ae7cc4ea239347
|
||||
F autoconf/Makefile.fallback 22fe523eb36dfce31e0f6349f782eb084e86a5620b2b0b4f84a2d6133f53f5ac
|
||||
@ -46,7 +46,7 @@ F autosetup/cc-lib.tcl 493c5935b5dd3bf9bd4eca89b07c8b1b1a9356d61783035144e21795f
|
||||
F autosetup/cc-shared.tcl 4f024e94a47f427ba61de1739f6381ef0080210f9fae89112d5c1de1e5460d78
|
||||
F autosetup/cc.tcl 1b52de228642c1db5a714d54ca974d723ec8b4092e8c3765d348b625850f7311
|
||||
F autosetup/default.auto 5cdf016de2140e50f1db190a02039dc42fb390af1dda4cc4853e3042a9ef0e82
|
||||
F autosetup/hwaci-common.tcl b6f0c57b377898b8837bd031ca9a37c021d4fe859c9d3967dbb36deab6748459
|
||||
F autosetup/hwaci-common.tcl c676836141db22751ab9c4e8ff9e66e744546691643f2c2cce459f3af6647f28
|
||||
F autosetup/jimsh0.c 1b5fe91fffcddbc29f2b16acb80f1650632ea2edbe8336b8155ef7b4c66f6d8d
|
||||
F autosetup/pkg-config.tcl 4e635bf39022ff65e0d5434339dd41503ea48fc53822c9c5bde88b02d3d952ba
|
||||
F autosetup/system.tcl 3a39d6e0b3bfba526fd39afe07c1d0d325e5a31925013a1ba7c671e1128e31bb
|
||||
@ -2232,8 +2232,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 c223dbb4fb8e800089752617c6c986b6c80be0d180e9d1610f28cf95253e5674
|
||||
R 780005d9a0ea48859fdd0440470d05eb
|
||||
P 8bea45fbbf8557760e792cdfcede72afa9e25dd7b90e4ce3297efebe8d0cfb1c
|
||||
R cd70ad4d06f521a1f30a01bf2a129759
|
||||
U stephan
|
||||
Z 67206b818d975312f9c5773e94dde53e
|
||||
Z 9f732b0583b6db454836916ab8f6e46b
|
||||
# Remove this line to create a well-formed Fossil manifest.
|
||||
|
@ -1 +1 @@
|
||||
8bea45fbbf8557760e792cdfcede72afa9e25dd7b90e4ce3297efebe8d0cfb1c
|
||||
2141527a38ca8170e79b5b5e664378f0d8464055119f5b986e5d7b1be75e919e
|
||||
|
Loading…
Reference in New Issue
Block a user