[Freeswitch-svn] [commit] r4822 - freeswitch/trunk/libs/srtp

Freeswitch SVN mikej at freeswitch.org
Sun Apr 1 15:28:35 EDT 2007


Author: mikej
Date: Sun Apr  1 15:28:34 2007
New Revision: 4822

Modified:
   freeswitch/trunk/libs/srtp/configure.in

Log:
fix srtp configure detection for byteswap.h to verify if bswap_64 is actually usable

Modified: freeswitch/trunk/libs/srtp/configure.in
==============================================================================
--- freeswitch/trunk/libs/srtp/configure.in	(original)
+++ freeswitch/trunk/libs/srtp/configure.in	Sun Apr  1 15:28:34 2007
@@ -134,7 +134,6 @@
 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(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)])



More information about the Freeswitch-svn mailing list