diff options
Diffstat (limited to '')
-rw-r--r-- | configure.ac | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac index 78d6e8ac..83d28b85 100644 --- a/configure.ac +++ b/configure.ac @@ -834,15 +834,14 @@ AC_C_BIGENDIAN # Use -Werror because some compilers accept unknown attributes and just # give a warning. If it works this should give no warnings, even # clang -Weverything should be fine. -# dnl This doesn't need AC_LANG_SOURCE, minimal code is enough. AC_MSG_CHECKING([if __attribute__((__constructor__)) can be used]) have_func_attribute_constructor=no OLD_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -Werror" -AC_COMPILE_IFELSE([ +AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ __attribute__((__constructor__)) static void my_constructor_func(void) { return; } -], [ +]])], [ AC_DEFINE([HAVE_FUNC_ATTRIBUTE_CONSTRUCTOR], [1], [Define to 1 if __attribute__((__constructor__)) is supported for functions.]) @@ -878,12 +877,12 @@ if test "x$enable_ifunc" = xyes ; then OLD_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -Werror" AC_MSG_CHECKING([if __attribute__((__ifunc__())) can be used]) - AC_COMPILE_IFELSE([ + AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ static void func(void) { return; } static void (*resolve_func (void)) (void) { return func; } void func_ifunc (void) __attribute__((__ifunc__("resolve_func"))); - ], [ + ]])], [ AC_DEFINE([HAVE_FUNC_ATTRIBUTE_IFUNC], [1], [Define to 1 if __attribute__((__ifunc__())) is supported for functions.]) |