diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2013-04-02 17:00:01 +1030 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2013-04-03 22:10:13 +0200 |
commit | 5dad084ab176820af8d661f681e0659596d067cb (patch) | |
tree | 14d366fb171f9e7a32cd5237ba288eeb3a26a575 /lib/ccan | |
parent | b5d5b9a40eb13f89a552e29096deed52229c147e (diff) | |
download | samba-5dad084ab176820af8d661f681e0659596d067cb.tar.gz samba-5dad084ab176820af8d661f681e0659596d067cb.tar.bz2 samba-5dad084ab176820af8d661f681e0659596d067cb.zip |
ccan: fix HAVE_BSWAP_64 for autoconf.
Autoconf defines HAVE_BSWAP_64_DECL, we want HAVE_BSWAP_64.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'lib/ccan')
-rw-r--r-- | lib/ccan/libccan.m4 | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/lib/ccan/libccan.m4 b/lib/ccan/libccan.m4 index 7b27c69b81..cda1353de6 100644 --- a/lib/ccan/libccan.m4 +++ b/lib/ccan/libccan.m4 @@ -346,4 +346,18 @@ 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>]) + +AC_CACHE_CHECK([whether we have bswap_64], + samba_cv_have_bswap_64, + [ + AC_LINK_IFELSE([AC_LANG_SOURCE( + [#include <byteswap.h> + int main(void) { return bswap_64(1) ? 0 : 1; } + ])], + samba_cv_have_bswap_64=yes) + ]) + +if test x"$samba_cv_have_bswap_64" = xyes ; then + AC_DEFINE(HAVE_BSWAP_64, 1, + [whether we have bswap_64]) +fi |