Move the apple fat binary hacks back to a header file, and make it apple-only.

This commit is contained in:
Eric Anholt 2009-01-30 16:17:58 -08:00
parent 6e49fdd2c8
commit dd098501d8
4 changed files with 12 additions and 9 deletions

View File

@ -45,9 +45,7 @@ dnl drivers.
AC_CONFIG_HEADERS(include/xorg-server.h)
dnl dix-config.h covers most of the DIX (i.e. everything but the DDX, not just
dnl dix/).
AC_CONFIG_HEADERS(include/dix-config.h, [mv include/dix-config.h include/dix-config.h.tmp
sed 's|/undef|#undef|' < include/dix-config.h.tmp > include/dix-config.h
rm include/dix-config.h.tmp])
AC_CONFIG_HEADERS(include/dix-config.h)
dnl xorg-config.h covers the Xorg DDX.
AC_CONFIG_HEADERS(include/xorg-config.h)
dnl xkb-config.h covers XKB for the Xorg and Xnest DDXs.

View File

@ -62,3 +62,5 @@ endif
AM_CFLAGS = $(DIX_CFLAGS)
EXTRA_DIST = \
dix-config-apple-verbatim.h

View File

@ -0,0 +1,8 @@
/* Do not include this file directly. It is included at the end of <dix-config.h> */
/* Correctly set _XSERVER64 for OSX fat binaries */
#if defined(__LP64__) && !defined(_XSERVER64)
#define _XSERVER64 1
#elif !defined(__LP64__) && defined(_XSERVER64)
#undef _XSERVER64
#endif

View File

@ -422,12 +422,7 @@
/* Correctly set _XSERVER64 for OSX fat binaries */
#ifdef __APPLE__
#if defined(__LP64__) && !defined(_XSERVER64)
#define _XSERVER64 1
#elif !defined(__LP64__) && defined(_XSERVER64)
/* configure mangles #undef, so we fix this in AC_CONFIG_HEADERS post process */
/undef _XSERVER64
#endif
#include "dix-config-apple-verbatim.h"
#endif
#endif /* _DIX_CONFIG_H_ */