$NetBSD: patch-ab,v 1.17 2022/01/04 16:04:40 triaxx Exp $ Add SunOS byteorder needs. --- configure.orig 2015-10-04 13:18:39.000000000 +0000 +++ configure @@ -20903,6 +20903,36 @@ else $as_echo "no" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSWAP_32 in sys/byteorder.h" >&5 +$as_echo_n "checking for BSWAP_32 in sys/byteorder.h... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#ifdef BSWAP_32 + symbol is present +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "symbol is present|\" >/dev/null 2>&1; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + cat >> "include/byteorder.h" << EOF +/* Define generic byte swapping functions */ +EOF +cat >> "include/byteorder.h" << EOF +#define swap16(x) BSWAP_16(x) +#define swap32(x) BSWAP_32(x) +#define swap64(x) BSWAP_64(x) + +EOF + +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bswap32 in machine/endian.h" >&5 $as_echo_n "checking for bswap32 in machine/endian.h... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -21093,6 +21123,11 @@ rm -f conftest* +fi +rm -f conftest* + + + if test "$HAVE_LE32TOH" != "1"; then cat >> "$ac_byteorder" << EOF @@ -8977,6 +9012,8 @@ else # ifdef _MSC_VER # include # define alloca _alloca +# elif defined(__NetBSD__) || defined(__FreeBSD__) || defined(__DragonFly__) || defined(__OpenBSD__) +# include # else # ifdef HAVE_ALLOCA_H # include