From a02b8c67b35d2445dffbe2a9a0435627aaa6167d Mon Sep 17 00:00:00 2001 From: Ken Raeburn Date: Fri, 10 Jun 2005 03:09:40 +0000 Subject: [PATCH] * configure.in: Check for headers byteswap.h, sys/bswap.h, machine/endian.h, machine/byte_order.h, and functions bswap16, bswap64, bswap_16, and bswap_64. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17236 dc483132-0cff-0310-8789-dd5450dbe970 --- src/ChangeLog | 6 ++++++ src/configure.in | 24 +++++++++++++++++++++--- 2 files changed, 27 insertions(+), 3 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 8f4f9efbd..a602e23c6 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2005-06-09 Ken Raeburn + + * configure.in: Check for headers byteswap.h, sys/bswap.h, + machine/endian.h, machine/byte_order.h, and functions bswap16, + bswap64, bswap_16, and bswap_64. + 2005-06-06 Ken Raeburn * configure.in: Put #undef for the PACKAGE_* symbols at the start diff --git a/src/configure.in b/src/configure.in index 937dca21c..36db4c8fe 100644 --- a/src/configure.in +++ b/src/configure.in @@ -139,10 +139,28 @@ AC_PROG_INSTALL AC_PROG_AWK AC_PROG_LEX AC_C_CONST -AC_CHECK_FUNCS(strdup setvbuf inet_ntoa inet_aton seteuid setresuid setreuid setegid setresgid setregid setsid flock fchmod chmod strftime strptime geteuid setenv unsetenv getenv gethostbyname2 getifaddrs gmtime_r localtime_r pthread_mutex_lock sched_yield dlopen) -AC_CHECK_FUNCS( mkstemp) +AC_CHECK_FUNCS(strdup setvbuf inet_ntoa inet_aton seteuid setresuid setreuid setegid setresgid setregid setsid flock fchmod chmod strftime strptime geteuid setenv unsetenv getenv gethostbyname2 getifaddrs gmtime_r localtime_r pthread_mutex_lock sched_yield dlopen bswap16 bswap64 mkstemp) AC_HEADER_STDARG -AC_CHECK_HEADERS(unistd.h paths.h regex.h regexp.h regexpr.h fcntl.h memory.h ifaddrs.h sys/filio.h sched.h) +AC_CHECK_HEADERS(unistd.h paths.h regex.h regexp.h regexpr.h fcntl.h memory.h ifaddrs.h sys/filio.h sched.h byteswap.h machine/endian.h machine/byte_order.h sys/bswap.h) +dnl bswap_16 is a macro in byteswap.h under GNU libc +AC_MSG_CHECKING(for bswap_16) +AC_CACHE_VAL(krb5_cv_bswap_16,[ +AC_TRY_LINK([#if HAVE_BYTESWAP_H +#include +#endif],[bswap_16(37);],krb5_cv_bswap_16=yes,krb5_cv_bswap_16=no)]) +AC_MSG_RESULT($krb5_cv_bswap_16) +if test "$krb5_cv_bswap_16" = yes; then + AC_DEFINE(HAVE_BSWAP_16,1,[Define to 1 if bswap_16 is available via byteswap.h]) +fi +AC_MSG_CHECKING(for bswap_64) +AC_CACHE_VAL(krb5_cv_bswap_64,[ +AC_TRY_LINK([#if HAVE_BYTESWAP_H +#include +#endif],[bswap_64(37);],krb5_cv_bswap_64=yes,krb5_cv_bswap_64=no)]) +AC_MSG_RESULT($krb5_cv_bswap_64) +if test "$krb5_cv_bswap_64" = yes; then + AC_DEFINE(HAVE_BSWAP_64,1,[Define to 1 if bswap_64 is available via byteswap.h]) +fi dnl dnl Check what the return types for gethostbyname_r and getservbyname_r are. dnl -- 2.26.2