File: jim-misc.auto

package info (click to toggle)
jimtcl 0.81%2Bdfsg0-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 15,416 kB
  • sloc: ansic: 175,569; tcl: 5,456; sh: 4,814; cpp: 1,671; makefile: 269
file content (33 lines) | stat: -rw-r--r-- 704 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# @cc-check-inline
#
# The equivalent of the 'AC_C_INLINE' macro.
#
# defines 'HAVE_INLINE' if inline is available,
# and defines 'inline' to be __inline__ or __inline if necessary
# or to "" if not available.
#
# Returns 1 if 'inline' is available or 0 otherwise
#
proc cc-check-inline {} {
	msg-checking "Checking for inline support..."
	set ok 0
	foreach i {inline __inline__ __inline} {
		if {[cctest -declare "#ifndef __cplusplus\nstatic $i void testfunc__(void);\n#endif"]} {
			incr ok
			break
		}
	}
	if {$ok} {
		if {$i eq "inline"} {
			msg-result yes
		} else {
			msg-result $i
			define inline $i
		}
	} else {
		define inline ""
		msg-result no
	}
	define-feature inline $ok
	return $ok
}