tests: socket.test check for ipv6 support
[jimtcl.git] / autosetup / jim-misc.auto
blobcf135928c61059c36c07462b73b83f34233101d2
1 # @cc-check-inline
3 # The equivalent of the 'AC_C_INLINE' macro.
5 # defines 'HAVE_INLINE' if inline is available,
6 # and defines 'inline' to be __inline__ or __inline if necessary
7 # or to "" if not available.
9 # Returns 1 if 'inline' is available or 0 otherwise
11 proc cc-check-inline {} {
12         msg-checking "Checking for inline support..."
13         set ok 0
14         foreach i {inline __inline__ __inline} {
15                 if {[cctest -declare "#ifndef __cplusplus\nstatic $i void testfunc__(void);\n#endif"]} {
16                         incr ok
17                         break
18                 }
19         }
20         if {$ok} {
21                 if {$i eq "inline"} {
22                         msg-result yes
23                 } else {
24                         msg-result $i
25                         define inline $i
26                 }
27         } else {
28                 define inline ""
29                 msg-result no
30         }
31         define-feature inline $ok
32         return $ok