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
This commit is contained in:
Michael Jerris 2007-04-01 19:28:34 +00:00
parent 0cb39cba02
commit 6c3abba824
1 changed files with 12 additions and 1 deletions

View File

@ -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 <inttypes.h>
#include <byteswap.h>
],[
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)])