summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Schwenke <martin@meltin.net>2011-12-16 12:43:34 +1100
committerAndrew Bartlett <abartlet@samba.org>2012-06-05 04:27:36 +0200
commitb7754f4bf7f1204e02baf6086c3cbbd7c6ebf1d9 (patch)
treeaab81bd035a91331a518e2543cd7fd9b8aeee2e2
parentd99bbb52e7763601a638ae24033e4b46691582be (diff)
downloadsamba-b7754f4bf7f1204e02baf6086c3cbbd7c6ebf1d9.tar.gz
samba-b7754f4bf7f1204e02baf6086c3cbbd7c6ebf1d9.tar.bz2
samba-b7754f4bf7f1204e02baf6086c3cbbd7c6ebf1d9.zip
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 <martin@meltin.net>
-rw-r--r--lib/ccan/libccan.m472
-rw-r--r--source3/configure.in32
2 files changed, 52 insertions, 52 deletions
diff --git a/lib/ccan/libccan.m4 b/lib/ccan/libccan.m4
index 93dc99e10e..3b71d7b023 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 <ctype.h>
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)
])
diff --git a/source3/configure.in b/source3/configure.in
index 153c8874d2..671fdf1a63 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -1203,11 +1203,11 @@ fi
AC_CACHE_CHECK([whether we can compile with __attribute__((destructor))],
samba_cv_function_attribute_destructor,
[
- AC_COMPILE_IFELSE(
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE(
[
__attribute__((destructor))
static void cleanup(void) { }
- ],
+ ])],
samba_cv_function_attribute_destructor=yes)
])
@@ -5373,44 +5373,44 @@ samba_cv_HAVE_AIO=yes,samba_cv_HAVE_AIO=no)
AC_DEFINE(WITH_AIO, 1, [Using asynchronous io])
LIBS=$AIO_LIBS
AC_MSG_CHECKING(for aio_read)
- AC_LINK_IFELSE([#include <aio.h>
-int main() { struct aiocb a; return aio_read(&a); }],
+ AC_LINK_IFELSE([AC_LANG_SOURCE([#include <aio.h>
+int main() { struct aiocb a; return aio_read(&a); }])],
[AC_DEFINE(HAVE_AIO_READ, 1, [Have aio_read]) AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)])
AC_MSG_CHECKING(for aio_write)
- AC_LINK_IFELSE([#include <aio.h>
-int main() { struct aiocb a; return aio_write(&a); }],
+ AC_LINK_IFELSE([AC_LANG_SOURCE([#include <aio.h>
+int main() { struct aiocb a; return aio_write(&a); }])],
[AC_DEFINE(HAVE_AIO_WRITE, 1, [Have aio_write]) AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)])
AC_MSG_CHECKING(for aio_fsync)
- AC_LINK_IFELSE([#include <aio.h>
-int main() { struct aiocb a; return aio_fsync(1, &a); }],
+ AC_LINK_IFELSE([AC_LANG_SOURCE([#include <aio.h>
+int main() { struct aiocb a; return aio_fsync(1, &a); }])],
[AC_DEFINE(HAVE_AIO_FSYNC, 1, [Have aio_fsync]) AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)])
AC_MSG_CHECKING(for aio_return)
- AC_LINK_IFELSE([#include <aio.h>
-int main() { struct aiocb a; return aio_return(&a); }],
+ AC_LINK_IFELSE([AC_LANG_SOURCE([#include <aio.h>
+int main() { struct aiocb a; return aio_return(&a); }])],
[AC_DEFINE(HAVE_AIO_RETURN, 1, [Have aio_return]) AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)])
AC_MSG_CHECKING(for aio_error)
- AC_LINK_IFELSE([#include <aio.h>
-int main() { struct aiocb a; return aio_error(&a); }],
+ AC_LINK_IFELSE([AC_LANG_SOURCE([#include <aio.h>
+int main() { struct aiocb a; return aio_error(&a); }])],
[AC_DEFINE(HAVE_AIO_ERROR, 1, [Have aio_error]) AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)])
AC_MSG_CHECKING(for aio_cancel)
- AC_LINK_IFELSE([#include <aio.h>
-int main() { struct aiocb a; return aio_cancel(1, &a); }],
+ AC_LINK_IFELSE([AC_LANG_SOURCE([#include <aio.h>
+int main() { struct aiocb a; return aio_cancel(1, &a); }])],
[AC_DEFINE(HAVE_AIO_CANCEL, 1, [Have aio_cancel]) AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)])
AC_MSG_CHECKING(for aio_suspend)
- AC_LINK_IFELSE([#include <aio.h>
-int main() { struct aiocb a; return aio_suspend(&a, 1, NULL); }],
+ AC_LINK_IFELSE([AC_LANG_SOURCE([#include <aio.h>
+int main() { struct aiocb a; return aio_suspend(&a, 1, NULL); }])],
[AC_DEFINE(HAVE_AIO_SUSPEND, 1, [Have aio_suspend]) AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)])
fi