summaryrefslogtreecommitdiffstats
path: root/lib/ccan/libccan.m4
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2012-10-14 16:05:58 +1030
committerRusty Russell <rusty@rustcorp.com.au>2012-10-17 01:55:14 +0200
commit029654897d721308c9ee782aee420abddce7edee (patch)
treeef5b7089389130c8e464f3291c40006b452204bc /lib/ccan/libccan.m4
parent05a59748910cc11d43bffbfc4d00fdf3701e2ca1 (diff)
downloadsamba-029654897d721308c9ee782aee420abddce7edee.tar.gz
samba-029654897d721308c9ee782aee420abddce7edee.tar.xz
samba-029654897d721308c9ee782aee420abddce7edee.zip
ccan: check for all the used config.h defines
In particular, not checking for byteswap.h meant we defined duplicates: https://bugzilla.samba.org/show_bug.cgi?id=9286 Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Autobuild-User(master): Rusty Russell <rusty@rustcorp.com.au> Autobuild-Date(master): Wed Oct 17 01:55:14 CEST 2012 on sn-devel-104
Diffstat (limited to 'lib/ccan/libccan.m4')
-rw-r--r--lib/ccan/libccan.m416
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/ccan/libccan.m4 b/lib/ccan/libccan.m4
index 0d391ad961..7b27c69b81 100644
--- a/lib/ccan/libccan.m4
+++ b/lib/ccan/libccan.m4
@@ -23,6 +23,8 @@ AC_SUBST(CCAN_CFLAGS)
# fairly harmless.
AC_CHECK_HEADERS(err.h)
+AC_CHECK_HEADERS(byteswap.h)
+
AC_CACHE_CHECK([whether we can compile with __attribute__((cold))],
samba_cv_attribute_cold,
[
@@ -270,6 +272,19 @@ if test x"$samba_cv_compound_literals" = xyes ; then
[whether we have compound literals])
fi
+AC_CACHE_CHECK([whether we have flexible array members],
+ samba_cv_have_flex_arr_member,
+ [
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE(
+ [struct foo { unsigned int x; int arr@<:@@:>@; }; ])],
+ samba_cv_have_flex_arr_member=yes)
+ ])
+
+if test x"$samba_cv_have_flex_arr_member" = xyes ; then
+ AC_DEFINE(HAVE_FLEXIBLE_ARRAY_MEMBER, 1,
+ [whether we have flexible array member support])
+fi
+
AC_CACHE_CHECK([whether we have isblank],
samba_cv_have_isblank,
[
@@ -331,3 +346,4 @@ if test x"$samba_cv_warn_unused_result" = xyes ; then
AC_DEFINE(HAVE_WARN_UNUSED_RESULT, 1,
[whether we have __attribute__((warn_unused_result))])
fi
+AC_HAVE_DECL(bswap_64, [#include <byteswap.h>])