Fix bswap detection on BSD (mis-added '_' in function names).
This commit is contained in:
parent
9616a04285
commit
8f98be7db3
|
@ -123,19 +123,19 @@ b = __swap16(a);
|
||||||
], [SYS_ENDIAN__SWAP='yes'], [SYS_ENDIAN__SWAP='no'])
|
], [SYS_ENDIAN__SWAP='yes'], [SYS_ENDIAN__SWAP='no'])
|
||||||
AC_MSG_RESULT([$SYS_ENDIAN__SWAP])
|
AC_MSG_RESULT([$SYS_ENDIAN__SWAP])
|
||||||
|
|
||||||
AC_MSG_CHECKING([for bswap_16 variant of <sys/endian.h> byteswapping macros])
|
AC_MSG_CHECKING([for bswap16 variant of <sys/endian.h> byteswapping macros])
|
||||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([
|
AC_LINK_IFELSE([AC_LANG_PROGRAM([
|
||||||
#include <sys/endian.h>
|
#include <sys/endian.h>
|
||||||
], [
|
], [
|
||||||
int a = 1, b;
|
int a = 1, b;
|
||||||
b = bswap_16(a);
|
b = bswap16(a);
|
||||||
])
|
])
|
||||||
], [SYS_ENDIAN_BSWAP='yes'], [SYS_ENDIAN_BSWAP='no'])
|
], [SYS_ENDIAN_BSWAP='yes'], [SYS_ENDIAN_BSWAP='no'])
|
||||||
AC_MSG_RESULT([$SYS_ENDIAN_BSWAP])
|
AC_MSG_RESULT([$SYS_ENDIAN_BSWAP])
|
||||||
|
|
||||||
if test "$SYS_ENDIAN_BSWAP" = "yes" ; then
|
if test "$SYS_ENDIAN_BSWAP" = "yes" ; then
|
||||||
USE_SYS_ENDIAN_H=yes
|
USE_SYS_ENDIAN_H=yes
|
||||||
BSWAP=bswap_
|
BSWAP=bswap
|
||||||
else
|
else
|
||||||
if test "$SYS_ENDIAN__SWAP" = "yes" ; then
|
if test "$SYS_ENDIAN__SWAP" = "yes" ; then
|
||||||
USE_SYS_ENDIAN_H=yes
|
USE_SYS_ENDIAN_H=yes
|
||||||
|
|
Loading…
Reference in New Issue