summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2020-09-28 16:16:07 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2020-09-28 16:16:07 -0700
commitcaa71668af7fd3ebdd56353c8f0ab90824773969 (patch)
tree7e580e287802860f4c76df0b73ec1f4a25b1398d /configure.ac
parent1a9269a95c353e3de9f4d33bab9f1363d84e79db (diff)
downloadxorg-lib-libX11-caa71668af7fd3ebdd56353c8f0ab90824773969.tar.gz
Use __builtin_popcountl if available to replace Ones() in GetImage.c
If the compiler knows of a better algorithm for counting the number of bits set in a word for the target CPU, let it use that, instead of the classic algorithm optimized for PDP-6. Based on libXext commit 490a25e6f8a4d2482af4364c700b68ad11a4d10b Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac1
1 files changed, 1 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index b7602026..7a8ad520 100644
--- a/configure.ac
+++ b/configure.ac
@@ -152,6 +152,7 @@ AC_MSG_RESULT($XLIB_LOADABLE_XCURSOR)
AC_CHECK_HEADERS([sys/filio.h sys/select.h sys/ioctl.h sys/socket.h])
# Checks for typedefs, structures, and compiler characteristics.
+AX_GCC_BUILTIN([__builtin_popcountl])
# Checks for library functions.
AC_CHECK_FUNCS([strtol seteuid])