From b7754f4bf7f1204e02baf6086c3cbbd7c6ebf1d9 Mon Sep 17 00:00:00 2001 From: Martin Schwenke Date: Fri, 16 Dec 2011 12:43:34 +1100 Subject: s3:build(autoconf): fix "no AC_LANG_SOURCE call detected" warnings Autoconf 2.68 NEWS says: ** The macros AC_PREPROC_IFELSE, AC_COMPILE_IFELSE, AC_LINK_IFELSE, and AC_RUN_IFELSE now warn if the first argument failed to use AC_LANG_SOURCE or AC_LANG_PROGRAM to generate the conftest file contents. A new macro AC_LANG_DEFINES_PROVIDED exists if you have a compelling reason why you cannot use AC_LANG_SOURCE but must avoid the warning. Signed-off-by: Martin Schwenke --- lib/ccan/libccan.m4 | 72 ++++++++++++++++++++++++++--------------------------- 1 file changed, 36 insertions(+), 36 deletions(-) (limited to 'lib/ccan') diff --git a/lib/ccan/libccan.m4 b/lib/ccan/libccan.m4 index 93dc99e10ec..3b71d7b0234 100644 --- a/lib/ccan/libccan.m4 +++ b/lib/ccan/libccan.m4 @@ -24,11 +24,11 @@ AC_SUBST(CCAN_CFLAGS) AC_CACHE_CHECK([whether we can compile with __attribute__((cold))], samba_cv_attribute_cold, [ - AC_COMPILE_IFELSE( + AC_COMPILE_IFELSE([AC_LANG_SOURCE( [ static void __attribute__((cold)) cleanup(void) { } - ], + ])], samba_cv_attribute_cold=yes) ]) @@ -40,11 +40,11 @@ fi AC_CACHE_CHECK([whether we can compile with __attribute__((const))], samba_cv_attribute_const, [ - AC_COMPILE_IFELSE( + AC_COMPILE_IFELSE([AC_LANG_SOURCE( [ static void __attribute__((const)) cleanup(void) { } - ], + ])], samba_cv_attribute_const=yes) ]) @@ -56,11 +56,11 @@ fi AC_CACHE_CHECK([whether we can compile with __attribute__((noreturn))], samba_cv_attribute_noreturn, [ - AC_COMPILE_IFELSE( + AC_COMPILE_IFELSE([AC_LANG_SOURCE( [ static void __attribute__((noreturn)) cleanup(void) { exit(1); } - ], + ])], samba_cv_attribute_noreturn=yes) ]) @@ -72,11 +72,11 @@ fi AC_CACHE_CHECK([whether we can compile with __attribute__((printf))], samba_cv_attribute_printf, [ - AC_COMPILE_IFELSE( + AC_COMPILE_IFELSE([AC_LANG_SOURCE( [ static void __attribute__((format(__printf__, 1, 2))) cleanup(const char *fmt, ...) { } - ], + ])], samba_cv_attribute_printf=yes) ]) @@ -88,11 +88,11 @@ fi AC_CACHE_CHECK([whether we can compile with __attribute__((unused))], samba_cv_attribute_unused, [ - AC_COMPILE_IFELSE( + AC_COMPILE_IFELSE([AC_LANG_SOURCE( [ static void __attribute__((unused)) cleanup(void) { } - ], + ])], samba_cv_attribute_unused=yes) ]) @@ -104,11 +104,11 @@ fi AC_CACHE_CHECK([whether we can compile with __attribute__((used))], samba_cv_attribute_used, [ - AC_COMPILE_IFELSE( + AC_COMPILE_IFELSE([AC_LANG_SOURCE( [ static void __attribute__((used)) cleanup(void) { } - ], + ])], samba_cv_attribute_used=yes) ]) @@ -135,10 +135,10 @@ fi AC_CACHE_CHECK([whether we have __builtin_clz], samba_cv_builtin_clz, [ - AC_LINK_IFELSE( + AC_LINK_IFELSE([AC_LANG_SOURCE( [int main(void) { return __builtin_clz(1) == (sizeof(int)*8 - 1) ? 0 : 1; - }], + }])], samba_cv_builtin_clz=yes) ]) @@ -150,10 +150,10 @@ fi AC_CACHE_CHECK([whether we have __builtin_clzl], samba_cv_builtin_clzl, [ - AC_LINK_IFELSE( + AC_LINK_IFELSE([AC_LANG_SOURCE( [int main(void) { return __builtin_clzl(1) == (sizeof(int)*8 - 1) ? 0 : 1; - }], + }])], samba_cv_builtin_clzl=yes) ]) @@ -164,10 +164,10 @@ fi AC_CACHE_CHECK([whether we have __builtin_clzll], samba_cv_builtin_clzll, [ - AC_LINK_IFELSE( + AC_LINK_IFELSE([AC_LANG_SOURCE( [int main(void) { return __builtin_clzll(1) == (sizeof(int)*8 - 1) ? 0 : 1; - }], + }])], samba_cv_builtin_clzll=yes) ]) @@ -179,10 +179,10 @@ fi AC_CACHE_CHECK([whether we have __builtin_constant_p], samba_cv_builtin_constant_p, [ - AC_LINK_IFELSE( + AC_LINK_IFELSE([AC_LANG_SOURCE( [int main(void) { return __builtin_constant_p(1) ? 0 : 1; - }], + }])], samba_cv_builtin_constant_p=yes) ]) @@ -194,10 +194,10 @@ fi AC_CACHE_CHECK([whether we have __builtin_expect], samba_cv_builtin_expect, [ - AC_LINK_IFELSE( + AC_LINK_IFELSE([AC_LANG_SOURCE( [int main(void) { return __builtin_expect(main != 0, 1) ? 0 : 1; - }], + }])], samba_cv_builtin_expect=yes) ]) @@ -209,10 +209,10 @@ fi AC_CACHE_CHECK([whether we have __builtin_popcountl], samba_cv_builtin_popcountl, [ - AC_LINK_IFELSE( + AC_LINK_IFELSE([AC_LANG_SOURCE( [int main(void) { return __builtin_popcountl(255L) == 8 ? 0 : 1; - }], + }])], samba_cv_builtin_popcountl=yes) ]) @@ -224,10 +224,10 @@ fi AC_CACHE_CHECK([whether we have __builtin_types_compatible_p], samba_cv_builtin_types_compatible_p, [ - AC_LINK_IFELSE( + AC_LINK_IFELSE([AC_LANG_SOURCE( [int main(void) { return __builtin_types_compatible_p(char *, int) ? 1 : 0; - }], + }])], samba_cv_builtin_types_compatible_p=yes) ]) @@ -239,10 +239,10 @@ fi AC_CACHE_CHECK([whether we have __builtin_choose_expr], samba_cv_builtin_choose_expr, [ - AC_LINK_IFELSE( + AC_LINK_IFELSE([AC_LANG_SOURCE( [int main(void) { return __builtin_choose_expr(1, 0, "garbage"); - }], + }])], samba_cv_builtin_choose_expr=yes) ]) @@ -255,11 +255,11 @@ fi AC_CACHE_CHECK([whether we have compound literals], samba_cv_compound_literals, [ - AC_COMPILE_IFELSE( + AC_COMPILE_IFELSE([AC_LANG_SOURCE( [int main(void) { int *foo = (int@<:@@:>@) { 1, 2, 3, 4 }; return foo@<:@0@:>@ == 1 ? 0 : 1; - }], + }])], samba_cv_compound_literals=yes) ]) @@ -271,10 +271,10 @@ fi AC_CACHE_CHECK([whether we have isblank], samba_cv_have_isblank, [ - AC_LINK_IFELSE( + AC_LINK_IFELSE([AC_LANG_SOURCE( [#include int main(void) { return isblank(' ') ? 0 : 1; } - ], + ])], samba_cv_have_isblank=yes) ]) @@ -301,13 +301,13 @@ fi AC_CACHE_CHECK([whether we have __typeof__], samba_cv_typeof, [ - AC_COMPILE_IFELSE( + AC_COMPILE_IFELSE([AC_LANG_SOURCE( [int main(void) { int x = 1; __typeof__(x) i; i = x; return i == x ? 0 : 1; - }], + }])], samba_cv_typeof=yes) ]) @@ -319,9 +319,9 @@ fi AC_CACHE_CHECK([whether we have __attribute__((warn_unused_result))], samba_cv_warn_unused_result, [ - AC_COMPILE_IFELSE( + AC_COMPILE_IFELSE([AC_LANG_SOURCE( [int __attribute__((warn_unused_result)) func(int x) - { return x; }], + { return x; }])], samba_cv_warn_unused_result=yes) ]) -- cgit