diff options
author | Steve Bennett <steveb@workware.net.au> | 2016-09-14 10:35:12 +1000 |
---|---|---|
committer | Steve Bennett <steveb@workware.net.au> | 2016-09-29 08:09:49 +1000 |
commit | a6a4cfa76408fdd5d93a9cc1417e53fb6c017924 (patch) | |
tree | d4c24662bf1500b4ad9e99c391b5587c445c06c2 /autosetup/cc-lib.tcl | |
parent | 991e0e4ea183eedec150751ed51029bce41690c8 (diff) | |
download | jimtcl-a6a4cfa76408fdd5d93a9cc1417e53fb6c017924.zip jimtcl-a6a4cfa76408fdd5d93a9cc1417e53fb6c017924.tar.gz jimtcl-a6a4cfa76408fdd5d93a9cc1417e53fb6c017924.tar.bz2 |
Update autosetup to v0.6.6
Among other things, includes improved option parsing
Signed-off-by: Steve Bennett <steveb@workware.net.au>
Diffstat (limited to 'autosetup/cc-lib.tcl')
-rw-r--r-- | autosetup/cc-lib.tcl | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/autosetup/cc-lib.tcl b/autosetup/cc-lib.tcl index 4df5130..1ef7c63 100644 --- a/autosetup/cc-lib.tcl +++ b/autosetup/cc-lib.tcl @@ -159,3 +159,33 @@ proc cc-check-c11 {} { cctest_alignof __alignof__ cctest_alignof __alignof } + +# @cc-check-alloca +# +# The equivalent of the AC_FUNC_ALLOCA macro +# +# Checks for the existence of alloca +# defines HAVE_ALLOCA and returns 1 if it exists +proc cc-check-alloca {} { + cc-check-some-feature alloca { + cctest -includes alloca.h -code { alloca (2 * sizeof (int)); } + } +} + +# @cc-signal-return-type +# +# The equivalent of the AC_TYPE_SIGNAL macro +# +# defines RETSIGTYPE to int or void +proc cc-signal-return-type {} { + msg-checking "Checking return type of signal handlers..." + cc-with {-includes {sys/types.h signal.h}} { + if {[cctest -code {return *(signal (0, 0)) (0) == 1;}]} { + set type int + } else { + set type void + } + define RETSIGTYPE $type + msg-result $type + } +} |