File: ac_check_attribute_symver.m4

package info (click to toggle)
alsa-lib 1.2.14-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 7,948 kB
  • sloc: ansic: 96,686; sh: 4,711; makefile: 653
file content (24 lines) | stat: -rw-r--r-- 608 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
dnl Check compiler support for symver function attribute
AC_DEFUN([AC_CHECK_ATTRIBUTE_SYMVER], [
	saved_CFLAGS=$CFLAGS
	CFLAGS="-O0 -Werror"
	AC_COMPILE_IFELSE(
		[AC_LANG_PROGRAM(
			[[
				void _test_attribute_symver(void);
				__attribute__((__symver__("sym@VER_1.2.3"))) void _test_attribute_symver(void) {}
			]],
			[[
				_test_attribute_symver()
			]]
		)],
		[
			AC_DEFINE([HAVE_ATTRIBUTE_SYMVER], 1, [Define to 1 if __attribute__((symver)) is supported])
		],
		[
			AC_DEFINE([HAVE_ATTRIBUTE_SYMVER], 0, [Define to 0 if __attribute__((symver)) is not supported])
		]
	)
	CFLAGS=$saved_CFLAGS
])