1dnl Check compiler support for symver function attribute
2AC_DEFUN([AC_CHECK_ATTRIBUTE_SYMVER], [
3	saved_CFLAGS=$CFLAGS
4	CFLAGS="-O0 -Werror"
5	AC_COMPILE_IFELSE(
6		[AC_LANG_PROGRAM(
7			[[
8				void _test_attribute_symver(void);
9				__attribute__((__symver__("sym@VER_1.2.3"))) void _test_attribute_symver(void) {}
10			]],
11			[[
12				_test_attribute_symver()
13			]]
14		)],
15		[
16			AC_DEFINE([HAVE_ATTRIBUTE_SYMVER], 1, [Define to 1 if __attribute__((symver)) is supported])
17		],
18		[
19			AC_DEFINE([HAVE_ATTRIBUTE_SYMVER], 0, [Define to 0 if __attribute__((symver)) is not supported])
20		]
21	)
22	CFLAGS=$saved_CFLAGS
23])
24
25