diff options
author | Eric Anholt <eric@anholt.net> | 2017-03-27 14:21:43 -0700 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2017-04-21 11:39:10 -0700 |
commit | be80a3cb48a7860b9ed985b123f4d8a3b4ae3c89 (patch) | |
tree | 8e12a12de779f59e708997e50d48daa10cec5688 /configure.ac | |
parent | dae97e1bb4d4f86db118c22dfeea0eef0d3f8bdd (diff) |
glx: Use the same endian swapping as the rest of the server.
This dumps a ton of configure-time checks for system endian macros.
Given that we're marking the mixed-endian fixup code as cold, getting
at the system macros is a waste of code.
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 60 |
1 files changed, 0 insertions, 60 deletions
diff --git a/configure.ac b/configure.ac index 8881ec34f..07c552094 100644 --- a/configure.ac +++ b/configure.ac @@ -147,66 +147,6 @@ fi AC_TYPE_PID_T -# Checks for headers/macros for byte swapping -# Known variants: -# <byteswap.h> bswap_16, bswap_32, bswap_64 (glibc) -# <sys/endian.h> __swap16, __swap32, __swap64 (OpenBSD) -# <sys/endian.h> bswap16, bswap32, bswap64 (other BSD's) -# and a fallback to local macros if none of the above are found - -# if <byteswap.h> is found, assume it's the correct version -AC_CHECK_HEADERS([byteswap.h]) - -# if <sys/endian.h> is found, have to check which version -AC_CHECK_HEADER([sys/endian.h], [HAVE_SYS_ENDIAN_H="yes"], [HAVE_SYS_ENDIAN_H="no"]) - -if test "x$HAVE_SYS_ENDIAN_H" = "xyes" ; then - AC_MSG_CHECKING([for __swap16 variant of <sys/endian.h> byteswapping macros]) - AC_LINK_IFELSE([AC_LANG_PROGRAM([ -#include <sys/types.h> -#include <sys/endian.h> - ], [ -int a = 1, b; -b = __swap16(a); - ]) -], [SYS_ENDIAN__SWAP='yes'], [SYS_ENDIAN__SWAP='no']) - AC_MSG_RESULT([$SYS_ENDIAN__SWAP]) - - AC_MSG_CHECKING([for bswap16 variant of <sys/endian.h> byteswapping macros]) - AC_LINK_IFELSE([AC_LANG_PROGRAM([ -#include <sys/types.h> -#include <sys/endian.h> - ], [ -int a = 1, b; -b = bswap16(a); - ]) -], [SYS_ENDIAN_BSWAP='yes'], [SYS_ENDIAN_BSWAP='no']) - AC_MSG_RESULT([$SYS_ENDIAN_BSWAP]) - - if test "$SYS_ENDIAN_BSWAP" = "yes" ; then - USE_SYS_ENDIAN_H=yes - BSWAP=bswap - else - if test "$SYS_ENDIAN__SWAP" = "yes" ; then - USE_SYS_ENDIAN_H=yes - BSWAP=__swap - else - USE_SYS_ENDIAN_H=no - fi - fi - - if test "$USE_SYS_ENDIAN_H" = "yes" ; then - AC_DEFINE([USE_SYS_ENDIAN_H], 1, - [Define to use byteswap macros from <sys/endian.h>]) - AC_DEFINE_UNQUOTED([bswap_16], ${BSWAP}16, - [Define to 16-bit byteswap macro]) - AC_DEFINE_UNQUOTED([bswap_32], ${BSWAP}32, - [Define to 32-bit byteswap macro]) - AC_DEFINE_UNQUOTED([bswap_64], ${BSWAP}64, - [Define to 64-bit byteswap macro]) - fi -fi - dnl Check to see if dlopen is in default libraries (like Solaris, which dnl has it in libc), or if libdl is needed to get it. AC_CHECK_FUNC([dlopen], [], |