diff options
author | Steve Bennett <steveb@workware.net.au> | 2023-03-19 15:49:13 +1000 |
---|---|---|
committer | Steve Bennett <steveb@workware.net.au> | 2023-03-20 08:19:51 +1000 |
commit | 55d169005f184591a6eb4a57af3608ebae94e317 (patch) | |
tree | ae637295f99b4a82b6106d6ebcf896211ce05df0 | |
parent | 56339de8502e8838b825453668c7388bbc0d448b (diff) | |
download | jimtcl-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.def | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -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" |