[xserver-commit] xserver configure.ac,3.41,3.42
Jaymz Julian
xserver-commit@pdx.freedesktop.org
Thu, 18 Dec 2003 04:19:50 -0800
Committed by: jaymz
Update of /cvs/xserver/xserver
In directory pdx:/tmp/cvs-serv28385
Modified Files:
configure.ac
Log Message:
Read unaligned in 24bpp rgb packed pixel on architectures which allow it
(trivial for the bgr case as well, but my video card doens't do that, so
I didn't implent it)
Index: configure.ac
===================================================================
RCS file: /cvs/xserver/xserver/configure.ac,v
retrieving revision 3.41
retrieving revision 3.42
diff -u -d -r3.41 -r3.42
--- configure.ac 8 Dec 2003 01:55:06 -0000 3.41
+++ configure.ac 18 Dec 2003 12:19:47 -0000 3.42
@@ -333,6 +333,24 @@
XSERVER_CFLAGS="$GCC_WARNINGS $XSERVER_CFLAGS"
fi
+AC_MSG_CHECKING(if unaligned word accesses behave as expected)
+AC_TRY_RUN([
+#include <stdio.h>
+
+int main()
+{
+ char j[8]={1,2,3,4,5,6,7,8};
+ int k= *(int *)(j+1);
+ if(k==0x02030405 || k==0x05040302)
+ return 0;
+ return 1;
+}
+],
+ [AC_DEFINE(WORKING_UNALIGNED_INT, 1, [unaligned word accesses behave as expected])
+ AC_MSG_RESULT(yes)],
+ AC_MSG_RESULT(no),
+ AC_MSG_RESULT(assuming not on target machine))
+
AC_OUTPUT([
Makefile
include/Makefile