File: jim-misc.auto

package info (click to toggle)
openocd 0.12.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 39,748 kB
  • sloc: ansic: 425,602; sh: 10,320; tcl: 9,539; asm: 3,895; makefile: 2,023; cpp: 1,671; perl: 1,197; python: 1,078; xml: 77; haskell: 32
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
}