third_party_alsa-lib/m4/ac_check_attribute_symver.m4
xuxuehai 582d7b6130 commit msg
Signed-off-by: xuxuehai <xuxuehai2@huawei.com>
2024-05-16 17:35:05 +08:00

25 lines
608 B
Plaintext

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
])