aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Bennett <steveb@workware.net.au>2023-03-19 15:49:13 +1000
committerSteve Bennett <steveb@workware.net.au>2023-03-20 08:19:51 +1000
commit55d169005f184591a6eb4a57af3608ebae94e317 (patch)
treeae637295f99b4a82b6106d6ebcf896211ce05df0
parent56339de8502e8838b825453668c7388bbc0d448b (diff)
downloadjimtcl-55d169005f184591a6eb4a57af3608ebae94e317.zip
jimtcl-55d169005f184591a6eb4a57af3608ebae94e317.tar.gz
jimtcl-55d169005f184591a6eb4a57af3608ebae94e317.tar.bz2
build: allow build without math functions
if sin(), etc. aren't available, just build without math functions unless --math is explicitly given Signed-off-by: Steve Bennett <steveb@workware.net.au>
-rw-r--r--auto.def11
1 files changed, 7 insertions, 4 deletions
diff --git a/auto.def b/auto.def
index 36ab1e3..3fcf884 100644
--- a/auto.def
+++ b/auto.def
@@ -415,10 +415,13 @@ if {[opt-bool maintainer]} {
define JIM_MAINTAINER
}
if {[opt-bool-unless-minimal math]} {
- msg-result "Enabling math functions"
- define JIM_MATH_FUNCTIONS
- cc-check-function-in-lib sin m
- define-append LDLIBS [get-define lib_sin]
+ if {[cc-check-function-in-lib sin m]} {
+ msg-result "Enabling math functions"
+ define JIM_MATH_FUNCTIONS
+ define-append LDLIBS [get-define lib_sin]
+ } elseif {[opt-bool -nodefault math] > 0} {
+ user-error "Math functions are not available"
+ }
}
if {[opt-bool-unless-minimal ipv6]} {
msg-result "Enabling IPv6"