From 6c3abba8242c1e97dc5986fcb3aa2570af7aa018 Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Sun, 1 Apr 2007 19:28:34 +0000 Subject: [PATCH] fix srtp configure detection for byteswap.h to verify if bswap_64 is actually usable git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4822 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- libs/srtp/configure.in | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/libs/srtp/configure.in b/libs/srtp/configure.in index ca7e6cf6db..99a43dd872 100644 --- a/libs/srtp/configure.in +++ b/libs/srtp/configure.in @@ -134,7 +134,6 @@ dnl Checks for header files. AC_HEADER_STDC AC_CHECK_HEADERS(stdlib.h) AC_CHECK_HEADERS(unistd.h) -AC_CHECK_HEADERS(byteswap.h) AC_CHECK_HEADERS(stdint.h) AC_CHECK_HEADERS(sys/uio.h) AC_CHECK_HEADERS(inttypes.h) @@ -142,6 +141,18 @@ AC_CHECK_HEADERS(sys/types.h) AC_CHECK_HEADERS(machine/types.h) AC_CHECK_HEADERS(sys/int_types.h) +AC_LINK_IFELSE(AC_LANG_PROGRAM([ +#include +#include +],[ +uint64_t y = 0x1122334455667788LL; +bswap_64(y); +]),byteswap_cv_bswap_64_usable=yes,byteswap_cv_bswap_64_usable=no) + +if test "x${byteswap_cv_bswap_64_usable}" = "xyes" ; then +AC_DEFINE([HAVE_BYTESWAP_H],1,[define if you have a usable bswap_64 in byteswap.h]) +fi + dnl socket() and friends AC_CHECK_HEADERS(sys/socket.h netinet/in.h arpa/inet.h) AC_CHECK_HEADERS(windows.h, [AC_CHECK_HEADERS(winsock2.h)])