mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-02-13 01:10:36 +01:00
more patches, autoconf fixes...
This commit is contained in:
parent
6ff9f43ae2
commit
b3dc1483f7
9 changed files with 302 additions and 134 deletions
|
|
@ -35,6 +35,11 @@
|
|||
#define bswap_16 __swap16
|
||||
#define bswap_32 __swap32
|
||||
#define bswap_64 __swap64
|
||||
#elif defined(__APPLE__)
|
||||
#include <libkern/OSByteOrder.h>
|
||||
#define bswap_16 OSSwapInt16
|
||||
#define bswap_32 OSSwapInt32
|
||||
#define bswap_64 OSSwapInt64
|
||||
#else
|
||||
#include <sys/endian.h>
|
||||
#define bswap_16 bswap16
|
||||
|
|
|
|||
|
|
@ -53,6 +53,12 @@
|
|||
#define bswap_16 __swap16
|
||||
#define bswap_32 __swap32
|
||||
#define bswap_64 __swap64
|
||||
#define bswap_64 __swap64
|
||||
#elif defined(__APPLE__)
|
||||
#include <libkern/OSByteOrder.h>
|
||||
#define bswap_16 OSSwapInt16
|
||||
#define bswap_32 OSSwapInt32
|
||||
#define bswap_64 OSSwapInt64
|
||||
#else
|
||||
#include <sys/endian.h>
|
||||
#define bswap_16 bswap16
|
||||
|
|
|
|||
|
|
@ -46,6 +46,11 @@
|
|||
#define bswap_16 __swap16
|
||||
#define bswap_32 __swap32
|
||||
#define bswap_64 __swap64
|
||||
#elif defined(__APPLE__)
|
||||
#include <libkern/OSByteOrder.h>
|
||||
#define bswap_16 OSSwapInt16
|
||||
#define bswap_32 OSSwapInt32
|
||||
#define bswap_64 OSSwapInt64
|
||||
#else
|
||||
#include <sys/endian.h>
|
||||
#define bswap_16 bswap16
|
||||
|
|
|
|||
|
|
@ -35,6 +35,11 @@
|
|||
#define bswap_16 __swap16
|
||||
#define bswap_32 __swap32
|
||||
#define bswap_64 __swap64
|
||||
#elif defined(__APPLE__)
|
||||
#include <libkern/OSByteOrder.h>
|
||||
#define bswap_16 OSSwapInt16
|
||||
#define bswap_32 OSSwapInt32
|
||||
#define bswap_64 OSSwapInt64
|
||||
#else
|
||||
#include <sys/endian.h>
|
||||
#define bswap_16 bswap16
|
||||
|
|
|
|||
|
|
@ -47,6 +47,11 @@
|
|||
#define bswap_16 __swap16
|
||||
#define bswap_32 __swap32
|
||||
#define bswap_64 __swap64
|
||||
#elif defined(__APPLE__)
|
||||
#include <libkern/OSByteOrder.h>
|
||||
#define bswap_16 OSSwapInt16
|
||||
#define bswap_32 OSSwapInt32
|
||||
#define bswap_64 OSSwapInt64
|
||||
#else
|
||||
#include <sys/endian.h>
|
||||
#define bswap_16 bswap16
|
||||
|
|
|
|||
335
configure.ac
335
configure.ac
|
|
@ -1,24 +1,27 @@
|
|||
dnl $Id$
|
||||
dnl Copyright © 2003-2007 Keith Packard, Daniel Stone
|
||||
dnl
|
||||
dnl Copyright © 2003-2005 Keith Packard, Daniel Stone
|
||||
dnl Permission is hereby granted, free of charge, to any person obtaining a
|
||||
dnl copy of this software and associated documentation files (the "Software"),
|
||||
dnl to deal in the Software without restriction, including without limitation
|
||||
dnl the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
dnl and/or sell copies of the Software, and to permit persons to whom the
|
||||
dnl Software is furnished to do so, subject to the following conditions:
|
||||
dnl
|
||||
dnl Permission to use, copy, modify, distribute, and sell this software and its
|
||||
dnl documentation for any purpose is hereby granted without fee, provided that
|
||||
dnl the above copyright notice appear in all copies and that both that
|
||||
dnl copyright notice and this permission notice appear in supporting
|
||||
dnl documentation, and that the names of Keith Packard and Daniel Stone not be
|
||||
dnl used in advertising or publicity pertaining to distribution of the software
|
||||
dnl without specific, written prior permission. Keith Packard and Daniel Stone
|
||||
dnl make no representations about the suitability of this software for any
|
||||
dnl purpose. It is provided "as is" without express or implied warranty.
|
||||
dnl The above copyright notice and this permission notice (including the next
|
||||
dnl paragraph) shall be included in all copies or substantial portions of the
|
||||
dnl Software.
|
||||
dnl
|
||||
dnl KEITH PACKARD AND DANIEL STONE DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
|
||||
dnl SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS,
|
||||
dnl IN NO EVENT SHALL KEITH PACKARD OR DANIEL STONE BE LIABLE FOR ANY SPECIAL,
|
||||
dnl INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||||
dnl LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
|
||||
dnl OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
dnl PERFORMANCE OF THIS SOFTWARE.
|
||||
dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
dnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
dnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
dnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
dnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
dnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
dnl DEALINGS IN THE SOFTWARE.
|
||||
dnl
|
||||
dnl Authors: Keith Packard <keithp@keithp.com>
|
||||
dnl Daniel Stone <daniel@fooishbar.org>
|
||||
dnl an unwitting cast of miscellaneous others
|
||||
dnl
|
||||
dnl Process this file with autoconf to create configure.
|
||||
|
||||
|
|
@ -67,6 +70,8 @@ AC_HEADER_DIRENT
|
|||
AC_HEADER_STDC
|
||||
AC_CHECK_HEADERS([fcntl.h stdlib.h string.h unistd.h])
|
||||
|
||||
AC_CHECK_PROG(HAVE_LAUNCHD, [launchd], [yes], [])
|
||||
|
||||
dnl Checks for typedefs, structures, and compiler characteristics.
|
||||
AC_C_CONST
|
||||
AC_C_BIGENDIAN([ENDIAN="X_BIG_ENDIAN"], [ENDIAN="X_LITTLE_ENDIAN"])
|
||||
|
|
@ -78,6 +83,67 @@ 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/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/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
|
||||
|
||||
AC_CHECK_FUNC([dlopen], [],
|
||||
AC_CHECK_LIB([dl], [dlopen], DLOPEN_LIBS="-ldl"))
|
||||
|
||||
dnl Checks for library functions.
|
||||
AC_FUNC_VPRINTF
|
||||
AC_CHECK_FUNCS([geteuid getuid link memmove memset mkstemp strchr strrchr \
|
||||
|
|
@ -86,23 +152,25 @@ AC_CHECK_FUNCS([geteuid getuid link memmove memset mkstemp strchr strrchr \
|
|||
AC_FUNC_ALLOCA
|
||||
dnl Old HAS_* names used in os/*.c.
|
||||
AC_CHECK_FUNC([getdtablesize],
|
||||
AC_DEFINE(HAS_GETDTABLESIZE, 1, [Have the `getdtablesize' function.]))
|
||||
AC_DEFINE(HAS_GETDTABLESIZE, 1, [Have the 'getdtablesize' function.]))
|
||||
AC_CHECK_FUNC([getifaddrs],
|
||||
AC_DEFINE(HAS_GETIFADDRS, 1, [Have the `getifaddrs' function.]))
|
||||
AC_DEFINE(HAS_GETIFADDRS, 1, [Have the 'getifaddrs' function.]))
|
||||
AC_CHECK_FUNC([getpeereid],
|
||||
AC_DEFINE(HAS_GETPEEREID, 1, [Have the `getpeereid' function.]))
|
||||
AC_DEFINE(HAS_GETPEEREID, 1, [Have the 'getpeereid' function.]))
|
||||
AC_CHECK_FUNC([getpeerucred],
|
||||
AC_DEFINE(HAS_GETPEERUCRED, 1, [Have the `getpeerucred' function.]))
|
||||
AC_DEFINE(HAS_GETPEERUCRED, 1, [Have the 'getpeerucred' function.]))
|
||||
AC_CHECK_FUNC([strlcat], HAVE_STRLCAT=yes, HAVE_STRLCAT=no)
|
||||
AM_CONDITIONAL(NEED_STRLCAT, [test x$HAVE_STRLCAT = xno])
|
||||
AC_CHECK_FUNC([strlcpy], AC_DEFINE(HAS_STRLCPY, 1, [Have the 'strlcpy' function]))
|
||||
|
||||
AM_CONDITIONAL(NEED_VSNPRINTF, [test x$HAVE_VSNPRINTF = xno])
|
||||
|
||||
dnl Check for mmap support for Xvfb
|
||||
AC_CHECK_FUNC([mmap], AC_DEFINE(HAS_MMAP, 1, [Have the `mmap' function.]))
|
||||
AC_CHECK_FUNC([mmap], AC_DEFINE(HAS_MMAP, 1, [Have the 'mmap' function.]))
|
||||
|
||||
dnl Find the math libary
|
||||
AC_CHECK_LIB(m, sqrt)
|
||||
AC_CHECK_LIB(m, cbrt, AC_DEFINE(HAVE_CBRT, 1, [Have the 'cbrt' function]))
|
||||
|
||||
AC_CHECK_HEADERS([ndbm.h dbm.h rpcsvc/dbm.h])
|
||||
|
||||
|
|
@ -198,9 +266,10 @@ case $host_cpu in
|
|||
ARM_VIDEO=yes
|
||||
;;
|
||||
i*86)
|
||||
use_x86_asm="no"
|
||||
use_x86_asm="yes"
|
||||
I386_VIDEO=yes
|
||||
case $host_os in
|
||||
darwin*) use_x86_asm="no" ;;
|
||||
*linux*) DEFAULT_INT10=vm86 ;;
|
||||
*freebsd*) AC_DEFINE(USE_DEV_IO) ;;
|
||||
*netbsd*) AC_DEFINE(USE_I386_IOPL)
|
||||
|
|
@ -223,9 +292,10 @@ case $host_cpu in
|
|||
BSD_ARCH_SOURCES="sparc64_video.c ioperm_noop.c"
|
||||
;;
|
||||
x86_64*|amd64*)
|
||||
use_x86_asm="no"
|
||||
use_x86_asm="yes"
|
||||
I386_VIDEO=yes
|
||||
case $host_os in
|
||||
darwin*) use_x86_asm="no" ;;
|
||||
*freebsd*) AC_DEFINE(USE_DEV_IO, 1, [BSD /dev/io]) ;;
|
||||
*netbsd*) AC_DEFINE(USE_I386_IOPL, 1, [BSD i386 iopl])
|
||||
SYS_LIBS=-lx86_64
|
||||
|
|
@ -407,7 +477,6 @@ AC_ARG_ENABLE(xres, AS_HELP_STRING([--disable-xres], [Build XRes exten
|
|||
AC_ARG_ENABLE(xtrap, AS_HELP_STRING([--disable-xtrap], [Build XTrap extension (default: enabled)]), [XTRAP=$enableval], [XTRAP=yes])
|
||||
AC_ARG_ENABLE(record, AS_HELP_STRING([--disable-record], [Build Record extension (default: enabled)]), [RECORD=$enableval], [RECORD=yes])
|
||||
AC_ARG_ENABLE(xv, AS_HELP_STRING([--disable-xv], [Build Xv extension (default: enabled)]), [XV=$enableval], [XV=yes])
|
||||
AC_ARG_ENABLE(quartz, AS_HELP_STRING([--enable-quartz], [Build with darwin quartz support (default: auto)]), [XQUARTZ=$enableval], [XQUARTZ=auto])
|
||||
AC_ARG_ENABLE(xvmc, AS_HELP_STRING([--disable-xvmc], [Build XvMC extension (default: enabled)]), [XVMC=$enableval], [XVMC=yes])
|
||||
AC_ARG_ENABLE(dga, AS_HELP_STRING([--disable-dga], [Build DGA extension (default: enabled)]), [DGA=$enableval], [DGA=yes])
|
||||
AC_ARG_ENABLE(screensaver, AS_HELP_STRING([--disable-screensaver], [Build ScreenSaver extension (default: enabled)]), [SCREENSAVER=$enableval], [SCREENSAVER=yes])
|
||||
|
|
@ -418,9 +487,9 @@ AC_ARG_ENABLE(aiglx, AS_HELP_STRING([--enable-aiglx], [Build accelerate
|
|||
AC_ARG_ENABLE(glx-tls, AS_HELP_STRING([--enable-glx-tls], [Build GLX with TLS support (default: disabled)]), [GLX_USE_TLS=$enableval], [GLX_USE_TLS=no])
|
||||
AC_ARG_ENABLE(dri, AS_HELP_STRING([--enable-dri], [Build DRI extension (default: auto)]), [DRI=$enableval])
|
||||
AC_ARG_ENABLE(xinerama, AS_HELP_STRING([--disable-xinerama], [Build Xinerama extension (default: enabled)]), [XINERAMA=$enableval], [XINERAMA=yes])
|
||||
AC_ARG_ENABLE(xf86vidmode, AS_HELP_STRING([--disable-xf86vidmode], [Build XF86VidMode extension (default: enabled)]), [XF86VIDMODE=$enableval], [XF86VIDMODE=yes])
|
||||
AC_ARG_ENABLE(xf86misc, AS_HELP_STRING([--disable-xf86misc], [Build XF86Misc extension (default: enabled)]), [XF86MISC=$enableval], [XF86MISC=yes])
|
||||
AC_ARG_ENABLE(xace, AS_HELP_STRING([--disable-xace], [Build X-ACE extension (default: enabled)]), [XACE=$enableval], [XACE=yes])
|
||||
AC_ARG_ENABLE(xf86vidmode, AS_HELP_STRING([--disable-xf86vidmode], [Build XF86VidMode extension (default: auto)]), [XF86VIDMODE=$enableval], [XF86VIDMODE=auto])
|
||||
AC_ARG_ENABLE(xf86misc, AS_HELP_STRING([--disable-xf86misc], [Build XF86Misc extension (default: auto)]), [XF86MISC=$enableval], [XF86MISC=auto])
|
||||
AC_ARG_ENABLE(xace, AS_HELP_STRING([--disable-xace], [Build X-ACE extension (default: enabled)]), [XACE=$enableval], [XACE=yes])
|
||||
AC_ARG_ENABLE(xcsecurity, AS_HELP_STRING([--disable-xcsecurity], [Build Security extension (default: enabled)]), [XCSECURITY=$enableval], [XCSECURITY=$XACE])
|
||||
AC_ARG_ENABLE(appgroup, AS_HELP_STRING([--disable-appgroup], [Build XC-APPGROUP extension (default: enabled)]), [APPGROUP=$enableval], [APPGROUP=$XCSECURITY])
|
||||
AC_ARG_ENABLE(xcalibrate, AS_HELP_STRING([--enable-xcalibrate], [Build XCalibrate extension (default: disabled)]), [XCALIBRATE=$enableval], [XCALIBRATE=no])
|
||||
|
|
@ -438,11 +507,15 @@ AC_ARG_ENABLE(xfree86-utils, AS_HELP_STRING([--enable-xfree86-utils], [Build
|
|||
|
||||
dnl DDXes.
|
||||
AC_ARG_ENABLE(xorg, AS_HELP_STRING([--enable-xorg], [Build Xorg server (default: auto)]), [XORG=$enableval], [XORG=auto])
|
||||
AC_ARG_ENABLE(dmx, AS_HELP_STRING([--enable-dmx], [Build DMX server (default: auto)]), [DMX=$enableval], [DMX=auto])
|
||||
AC_ARG_ENABLE(xvfb, AS_HELP_STRING([--enable-xvfb], [Build Xvfb server (default: yes)]), [XVFB=$enableval], [XVFB=yes])
|
||||
AC_ARG_ENABLE(xnest, AS_HELP_STRING([--enable-xnest], [Build Xnest server (default: auto)]), [XNEST=$enableval], [XNEST=auto])
|
||||
AC_ARG_ENABLE(dmx, AS_HELP_STRING([--enable-dmx], [Build DMX server (default: no)]), [DMX=$enableval], [DMX=no])
|
||||
AC_ARG_ENABLE(xvfb, AS_HELP_STRING([--enable-xvfb], [Build Xvfb server (default: no)]), [XVFB=$enableval], [XVFB=no])
|
||||
AC_ARG_ENABLE(xnest, AS_HELP_STRING([--enable-xnest], [Build Xnest server (default: no)]), [XNEST=$enableval], [XNEST=no])
|
||||
AC_ARG_ENABLE(xdarwin, AS_HELP_STRING([--enable-xdarwin], [Build XDarwin server (default: auto)]), [XDARWIN=$enableval], [XDARWIN=auto])
|
||||
AC_ARG_ENABLE(xdarwinapp, AS_HELP_STRING([--enable-xdarwinapp], [Build XDarwin.app server (default: no)]), [XDARWINAPP=$enableval], [XDARWINAPP=no])
|
||||
AC_ARG_ENABLE(xquartz, AS_HELP_STRING([--disable-xquartz], [Build Xquartz server on Darwin (default: auto)]), [XQUARTZ=$enableval], [XQUARTZ=auto])
|
||||
AC_ARG_ENABLE(x11app, AS_HELP_STRING([--enable-x11app], [Build Apple's X11.app wrapper for Xquartz (default: no)]), [X11APP=$enableval], [X11APP=no])
|
||||
AC_ARG_ENABLE(xwin, AS_HELP_STRING([--enable-xwin], [Build XWin server (default: auto)]), [XWIN=$enableval], [XWIN=auto])
|
||||
AC_ARG_ENABLE(xprint, AS_HELP_STRING([--enable-xprint], [Build Xprint extension and server (default: auto)]), [XPRINT=$enableval], [XPRINT=auto])
|
||||
AC_ARG_ENABLE(xprint, AS_HELP_STRING([--enable-xprint], [Build Xprint extension and server (default: no)]), [XPRINT=$enableval], [XPRINT=no])
|
||||
AC_ARG_ENABLE(xgl, AS_HELP_STRING([--enable-xgl], [Build Xgl server (default: no)]), [XGL=$enableval], [XGL=no])
|
||||
AC_ARG_ENABLE(xglx, AS_HELP_STRING([--enable-xglx], [Build Xglx xgl module (default: no)]), [XGLX=$enableval], [XGLX=no])
|
||||
AC_ARG_ENABLE(xegl, AS_HELP_STRING([--enable-xegl], [Build Xegl xgl module (default: no)]), [XEGL=$enableval], [XEGL=no])
|
||||
|
|
@ -1106,61 +1179,6 @@ dnl has it in libc), or if libdl is needed to get it.
|
|||
AC_CHECK_LIB([dl], [dlopen], XORG_LIBS="$XORG_LIBS -ldl"))
|
||||
|
||||
case $host_os in
|
||||
darwin*)
|
||||
XORG_OS="Darwin"
|
||||
build_darwin=yes
|
||||
if test "X$XQUARTZ" = Xauto; then
|
||||
AC_CACHE_CHECK([for Carbon framework],xorg_cv_Carbon_framework,[
|
||||
save_LDFLAGS=$LDFLAGS
|
||||
LDFLAGS="$LDFLAGS -framework Carbon"
|
||||
AC_LINK_IFELSE([char FSFindFolder();
|
||||
int main() {
|
||||
FSFindFolder();
|
||||
return 0;}
|
||||
],[xorg_cv_Carbon_framework=yes],
|
||||
[xorg_cv_Carbon_framework=no])
|
||||
LDFLAGS=$save_LDFLAGS])
|
||||
if test "X$xorg_cv_Carbon_framework" = Xyes; then
|
||||
AC_DEFINE([DARWIN_WITH_QUARTZ],[1],
|
||||
[Have Quartz])
|
||||
XQUARTZ=yes
|
||||
else
|
||||
XQUARTZ=no
|
||||
fi
|
||||
fi
|
||||
AC_DEFINE(ROOTLESS,1,[Build Rootless code])
|
||||
AC_CACHE_CHECK([for AGL framework],xorg_cv_AGL_framework,[
|
||||
save_LDFLAGS=$LDFLAGS
|
||||
LDFLAGS="$LDFLAGS -framework AGL"
|
||||
AC_LINK_IFELSE([char aglEnable();
|
||||
int main() {
|
||||
aglEnable();
|
||||
return 0;}
|
||||
],[xorg_cv_AGL_framework=yes],
|
||||
[xorg_cv_AGL_framework=no])
|
||||
LDFLAGS=$save_LDFLAGS
|
||||
])
|
||||
AC_CHECK_LIB([Xplugin],[xp_init],[:])
|
||||
AC_SUBST([APPLE_APPLICATIONS_DIR])
|
||||
CFLAGS="${CFLAGS} -D__DARWIN__"
|
||||
PLIST_VERSION_STRING=$VENDOR_VERSION_STRING
|
||||
AC_SUBST([PLIST_VERSION_STRING])
|
||||
PLIST_VENDOR_WEB=$VENDOR_WEB
|
||||
AC_SUBST([PLIST_VENDOR_WEB])
|
||||
# Not sure that we should be disabling all these...
|
||||
if test "x$XF86MISC" = xyes; then
|
||||
AC_MSG_NOTICE([Disabling XF86Misc extension])
|
||||
XF86MISC=no
|
||||
fi
|
||||
if test "x$XF86VIDMODE" = xyes; then
|
||||
AC_MSG_NOTICE([Disabling XF86VidMode extension])
|
||||
XF86VIDMODE=no
|
||||
fi
|
||||
if test "x$DGA" = xyes; then
|
||||
AC_MSG_NOTICE([Disabling DGA extension])
|
||||
DGA=no
|
||||
fi
|
||||
;;
|
||||
linux*)
|
||||
if test "x$LNXAPM" = xyes; then
|
||||
XORG_CFLAGS="$XORG_CFLAGS -DXF86PM"
|
||||
|
|
@ -1335,6 +1353,40 @@ int main () {
|
|||
if test "x$XORG_OS_PCI" = x ; then
|
||||
XORG_OS_PCI=$XORG_OS
|
||||
fi
|
||||
if test "x$DGA" = xauto; then
|
||||
PKG_CHECK_MODULES(DGA, xf86dgaproto, [DGA=yes], [DGA=no])
|
||||
fi
|
||||
if test "x$DGA" = xyes; then
|
||||
XORG_MODULES="$XORG_MODULES xf86dgaproto"
|
||||
PKG_CHECK_MODULES(DGA, xf86dgaproto)
|
||||
AC_DEFINE(DGA, 1, [Support DGA extension])
|
||||
AC_DEFINE(XFreeXDGA, 1, [Build XDGA support])
|
||||
fi
|
||||
|
||||
if test "x$XF86MISC" = xauto; then
|
||||
PKG_CHECK_MODULES(XF86MISC, xf86miscproto, [XF86MISC=yes], [XF86MISC=no])
|
||||
fi
|
||||
if test "x$XF86MISC" = xyes; then
|
||||
XORG_MODULES="$XORG_MODULES xf86miscproto"
|
||||
PKG_CHECK_MODULES(XF86MISC, xf86miscproto)
|
||||
AC_DEFINE(XF86MISC, 1, [Support XFree86 miscellaneous extensions])
|
||||
fi
|
||||
|
||||
if test "x$XF86VIDMODE" = xauto; then
|
||||
PKG_CHECK_MODULES(XF86VIDMODE, xf86vidmodeproto, [XF86VIDMODE=yes], [XF86VIDMODE=no])
|
||||
fi
|
||||
if test "x$XF86VIDMODE" = xyes; then
|
||||
XORG_MODULES="$XORG_MODULES xf86vidmodeproto"
|
||||
PKG_CHECK_MODULES(XF86VIDMODE, xf86vidmodeproto)
|
||||
AC_DEFINE(XF86VIDMODE, 1, [Support XFree86 Video Mode extension])
|
||||
fi
|
||||
|
||||
if test -n "$XORG_MODULES"; then
|
||||
PKG_CHECK_MODULES(XORG_MODULES, [$XORG_MODULES])
|
||||
XORG_CFLAGS="$XORG_CFLAGS $XORG_MODULES_CFLAGS"
|
||||
XORG_SYS_LIBS="$XORG_SYS_LIBS $XORG_MODULES_LIBS"
|
||||
fi
|
||||
|
||||
AC_SUBST([XORG_LIBS])
|
||||
AC_SUBST([XORG_INCS])
|
||||
AC_SUBST([XORG_OS])
|
||||
|
|
@ -1409,26 +1461,6 @@ int main () {
|
|||
AC_SUBST([extdir])
|
||||
AC_SUBST([logdir])
|
||||
fi
|
||||
|
||||
if test "x$XF86VIDMODE" = xyes; then
|
||||
AC_DEFINE(XF86VIDMODE, 1, [Support XFree86 Video Mode extension])
|
||||
fi
|
||||
|
||||
if test "x$XF86MISC" = xyes; then
|
||||
AC_DEFINE(XF86MISC, 1, [Support XFree86 miscellaneous extensions])
|
||||
fi
|
||||
# Support for objc in autotools is minimal and not documented.
|
||||
OBJC='$(CC)'
|
||||
OBJCLD='$(CCLD)'
|
||||
OBJCLINK='$(LINK)'
|
||||
OBJCFLAGS='$(CFLAGS)'
|
||||
AC_SUBST([OBJC])
|
||||
AC_SUBST([OBJCCLD])
|
||||
AC_SUBST([OBJCLINK])
|
||||
AC_SUBST([OBJCFLAGS])
|
||||
# internal, undocumented automake func follows :(
|
||||
_AM_DEPENDENCIES([OBJC])
|
||||
|
||||
AM_CONDITIONAL([XORG], [test "x$XORG" = xyes])
|
||||
AM_CONDITIONAL([XORG_BUS_LINUXPCI], [test "x$xorg_bus_linuxpci" = xyes])
|
||||
AM_CONDITIONAL([XORG_BUS_FREEBSDPCI], [test "x$xorg_bus_freebsdpci" = xyes])
|
||||
|
|
@ -1570,10 +1602,95 @@ AM_CONDITIONAL(XWIN_PRIMARYFB, [test "x$XWIN" = xyes && false])
|
|||
AM_CONDITIONAL(XWIN_RANDR, [test "x$XWIN" = xyes])
|
||||
AM_CONDITIONAL(XWIN_XV, [test "x$XWIN" = xyes && test "x$XV" = xyes])
|
||||
|
||||
dnl Darwin / OS X DDX
|
||||
AC_MSG_CHECKING([whether to build XDarwin (Mac OS X) DDX])
|
||||
if test "x$XDARWIN" = xauto; then
|
||||
case $host_os in
|
||||
darwin*) XDARWIN="yes" ;;
|
||||
*) XDARWIN="no" ;;
|
||||
esac
|
||||
fi
|
||||
AC_MSG_RESULT([$XDARWIN])
|
||||
|
||||
if test "x$XDARWIN" = xyes; then
|
||||
if test "X$XQUARTZ" = Xauto; then
|
||||
AC_CACHE_CHECK([for Carbon framework],xorg_cv_Carbon_framework,[
|
||||
save_LDFLAGS=$LDFLAGS
|
||||
LDFLAGS="$LDFLAGS -framework Carbon"
|
||||
AC_LINK_IFELSE([char FSFindFolder();
|
||||
int main() {
|
||||
FSFindFolder();
|
||||
return 0;}
|
||||
],[xorg_cv_Carbon_framework=yes],
|
||||
[xorg_cv_Carbon_framework=no])
|
||||
LDFLAGS=$save_LDFLAGS])
|
||||
if test "X$xorg_cv_Carbon_framework" = Xyes; then
|
||||
AC_DEFINE([DARWIN_WITH_QUARTZ],[1],
|
||||
[Have Quartz])
|
||||
XQUARTZ=yes
|
||||
else
|
||||
XQUARTZ=no
|
||||
fi
|
||||
fi
|
||||
# glxAGL / glxCGL don't work yet
|
||||
# AC_CACHE_CHECK([for AGL framework],xorg_cv_AGL_framework,[
|
||||
# save_LDFLAGS=$LDFLAGS
|
||||
# LDFLAGS="$LDFLAGS -framework AGL"
|
||||
# AC_LINK_IFELSE([char aglEnable();
|
||||
#int main() {
|
||||
#aglEnable();
|
||||
#return 0;}
|
||||
# ],[xorg_cv_AGL_framework=yes],
|
||||
# [xorg_cv_AGL_framework=no])
|
||||
# LDFLAGS=$save_LDFLAGS
|
||||
# ])
|
||||
xorg_cv_AGL_framework=no
|
||||
DARWIN_LIBS="$MI_LIB $OS_LIB $DIX_LIB $FB_LIB $FIXES_LIB $XEXT_LIB $CONFIG_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $XPSTUBS_LIB"
|
||||
AC_SUBST([DARWIN_LIBS])
|
||||
AC_CHECK_LIB([Xplugin],[xp_init],[:])
|
||||
AC_SUBST([APPLE_APPLICATIONS_DIR])
|
||||
CFLAGS="${CFLAGS} -D__DARWIN__"
|
||||
PLIST_VERSION_STRING=$PACKAGE_VERSION
|
||||
AC_SUBST([PLIST_VERSION_STRING])
|
||||
PLIST_VENDOR_WEB=$VENDOR_WEB
|
||||
AC_SUBST([PLIST_VENDOR_WEB])
|
||||
if test "x$XF86MISC" = xyes || test "x$XF86MISC" = xauto; then
|
||||
AC_MSG_NOTICE([Disabling XF86Misc extension])
|
||||
XF86MISC=no
|
||||
fi
|
||||
if test "x$XF86VIDMODE" = xyes || test "x$XF86VIDMODE" = xauto; then
|
||||
AC_MSG_NOTICE([Disabling XF86VidMode extension])
|
||||
XF86VIDMODE=no
|
||||
fi
|
||||
if test "x$XF86BIGFONT" = xyes || test "x$XF86BIGFONT" = xauto; then
|
||||
AC_MSG_NOTICE([Disabling XF86BigFont extension])
|
||||
XF86BIGFONT=no
|
||||
fi
|
||||
if test "x$DGA" = xyes || test "x$DGA" = xauto; then
|
||||
AC_MSG_NOTICE([Disabling DGA extension])
|
||||
DGA=no
|
||||
fi
|
||||
fi
|
||||
# Support for objc in autotools is minimal and not documented.
|
||||
OBJC='$(CC)'
|
||||
OBJCLD='$(CCLD)'
|
||||
OBJCLINK='$(LINK)'
|
||||
OBJCFLAGS='$(CFLAGS)'
|
||||
AC_SUBST([OBJC])
|
||||
AC_SUBST([OBJCCLD])
|
||||
AC_SUBST([OBJCLINK])
|
||||
AC_SUBST([OBJCFLAGS])
|
||||
# internal, undocumented automake func follows :(
|
||||
_AM_DEPENDENCIES([OBJC])
|
||||
AM_CONDITIONAL(HAVE_XPLUGIN, [test "x$ac_cv_lib_Xplugin_xp_init" = xyes])
|
||||
AM_CONDITIONAL(HAVE_AGL_FRAMEWORK, [test "x$xorg_cv_AGL_framework" = xyes])
|
||||
AM_CONDITIONAL(XDARWIN, [test "x$XDARWIN" = xyes])
|
||||
AM_CONDITIONAL(XDARWINAPP, [test "x$XDARWINAPP" = xyes])
|
||||
AM_CONDITIONAL(XQUARTZ, [test "x$XQUARTZ" = xyes])
|
||||
|
||||
dnl kdrive DDX
|
||||
|
||||
XEYPHR_LIBS=
|
||||
XEPHYR_LIBS=
|
||||
XEPHYR_INCS=
|
||||
XSDL_LIBS=
|
||||
XSDL_INCS=
|
||||
|
|
|
|||
|
|
@ -79,8 +79,7 @@ XDarwin_LDADD = \
|
|||
$(top_builddir)/miext/rootless/librootless.la \
|
||||
$(top_builddir)/miext/rootless/safeAlpha/libsafeAlpha.la \
|
||||
$(top_builddir)/miext/rootless/accel/librlAccel.la \
|
||||
@XORG_LIBS@ \
|
||||
-lXau -lXdmcp -lXfont -lfreetype
|
||||
$(XSERVER_LIBS)
|
||||
|
||||
Xquartz_LDADD = \
|
||||
$(top_builddir)/dix/dixfonts.lo \
|
||||
|
|
@ -90,6 +89,7 @@ Xquartz_LDADD = \
|
|||
$(top_builddir)/dix/libxpstubs.la \
|
||||
$(top_builddir)/miext/shadow/libshadow.la \
|
||||
$(top_builddir)/fb/libfb.la \
|
||||
$(top_builddir)/mi/libmi.la \
|
||||
$(top_builddir)/composite/libcomposite.la \
|
||||
$(top_builddir)/damageext/libdamageext.la \
|
||||
$(top_builddir)/miext/damage/libdamage.la \
|
||||
|
|
@ -105,8 +105,7 @@ Xquartz_LDADD = \
|
|||
$(top_builddir)/miext/rootless/librootless.la \
|
||||
$(top_builddir)/miext/rootless/safeAlpha/libsafeAlpha.la \
|
||||
$(top_builddir)/miext/rootless/accel/librlAccel.la \
|
||||
@XORG_LIBS@ \
|
||||
-lXau -lXdmcp -lXfont -lfreetype -lXplugin
|
||||
$(XSERVER_LIBS)
|
||||
|
||||
XDarwin_LDFLAGS = \
|
||||
-XCClinker -Objc \
|
||||
|
|
@ -258,6 +257,8 @@ xpr_la_LDFLAGS = -shrext '' -Wl,-framework,ApplicationServices \
|
|||
-module -avoid-version -no-undefined
|
||||
xpr_la_DEPENDENCIES = XDarwinApp
|
||||
|
||||
|
||||
if HAVE_AGL_FRAMEWORK
|
||||
glxCGLplugindir = $(darwinappdir)/Contents/Resources/glxCGL.bundle/Contents/MacOS
|
||||
glxCGLplugin_LTLIBRARIES =
|
||||
glxCGL_la_SOURCES =
|
||||
|
|
@ -289,6 +290,10 @@ glxAGL_la_LDFLAGS = -shrext '' \
|
|||
-module -avoid-version -no-undefined
|
||||
glxAGL_la_DEPENDENCIES = XDarwinApp
|
||||
|
||||
|
||||
|
||||
endif
|
||||
|
||||
man1_MANS = XDarwin.man
|
||||
|
||||
uninstall-hook:
|
||||
|
|
|
|||
|
|
@ -43,8 +43,6 @@
|
|||
# include "micmap.h"
|
||||
#undef BOOL
|
||||
|
||||
#include "xf86Version.h"
|
||||
|
||||
#include <mach/mach.h>
|
||||
#include <unistd.h>
|
||||
#include <pthread.h>
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
**************************************************************/
|
||||
/*
|
||||
* Copyright (c) 2001-2004 Torrey T. Lyons. All Rights Reserved.
|
||||
* Copyright (c) 2007 Apple Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
|
|
@ -30,9 +31,7 @@
|
|||
* use or other dealings in this Software without prior written authorization.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_XORG_CONFIG_H
|
||||
#include <xorg-config.h>
|
||||
#endif
|
||||
#include <dix-config.h>
|
||||
|
||||
#include <X11/X.h>
|
||||
#include <X11/Xproto.h>
|
||||
|
|
@ -46,8 +45,6 @@
|
|||
#include "fb.h" // fb framebuffer code
|
||||
#include "site.h"
|
||||
#include "globals.h"
|
||||
#include "xorgVersion.h"
|
||||
#include "xf86Date.h"
|
||||
#include "dix.h"
|
||||
|
||||
#ifdef XINPUT
|
||||
|
|
@ -83,6 +80,7 @@ int darwinScreenIndex = 0;
|
|||
io_connect_t darwinParamConnect = 0;
|
||||
int darwinEventReadFD = -1;
|
||||
int darwinEventWriteFD = -1;
|
||||
// int darwinMouseAccelChange = 1;
|
||||
int darwinFakeButtons = 0;
|
||||
|
||||
// location of X11's (0,0) point in global screen coordinates
|
||||
|
|
@ -129,13 +127,21 @@ const int NUMFORMATS = sizeof(formats)/sizeof(formats[0]);
|
|||
#ifndef BUILD_DATE
|
||||
#define BUILD_DATE ""
|
||||
#endif
|
||||
#ifndef XORG_RELEASE
|
||||
#define XORG_RELEASE "?"
|
||||
#endif
|
||||
|
||||
void DDXRingBell(int volume, int pitch, int duration) {
|
||||
// FIXME -- make some noise, yo
|
||||
}
|
||||
|
||||
void
|
||||
DarwinPrintBanner()
|
||||
{
|
||||
DarwinPrintBanner(void)
|
||||
{
|
||||
// this should change depending on which specific server we are building
|
||||
ErrorF("X11.app starting:\n");
|
||||
ErrorF("Xquartz server based on X.org %s, built on %s\n", XORG_RELEASE, BUILD_DATE );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
|
|
@ -301,6 +307,29 @@ static Bool DarwinAddScreen(
|
|||
=============================================================================
|
||||
*/
|
||||
|
||||
#if 0
|
||||
/*
|
||||
* DarwinChangePointerControl
|
||||
* Set mouse acceleration and thresholding
|
||||
* FIXME: We currently ignore the threshold in ctrl->threshold.
|
||||
*/
|
||||
static void DarwinChangePointerControl(
|
||||
DeviceIntPtr device,
|
||||
PtrCtrl *ctrl )
|
||||
{
|
||||
kern_return_t kr;
|
||||
double acceleration;
|
||||
|
||||
if (!darwinMouseAccelChange)
|
||||
return;
|
||||
|
||||
acceleration = ctrl->num / ctrl->den;
|
||||
kr = IOHIDSetMouseAcceleration( darwinParamConnect, acceleration );
|
||||
if (kr != KERN_SUCCESS)
|
||||
ErrorF( "Could not set mouse acceleration with kernel return = 0x%x.\n", kr );
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* DarwinMouseProc
|
||||
* Handle the initialization, etc. of a mouse
|
||||
|
|
@ -549,8 +578,8 @@ DarwinAdjustScreenOrigins(ScreenInfo *pScreenInfo)
|
|||
for (i = 0; i < pScreenInfo->numScreens; i++) {
|
||||
dixScreenOrigins[i].x -= darwinMainScreenX;
|
||||
dixScreenOrigins[i].y -= darwinMainScreenY;
|
||||
/* ErrorF("Screen %d placed at X11 coordinate (%d,%d).\n",
|
||||
i, dixScreenOrigins[i].x, dixScreenOrigins[i].y); */
|
||||
/* ErrorF("Screen %d placed at X11 coordinate (%d,%d).\n",
|
||||
i, dixScreenOrigins[i].x, dixScreenOrigins[i].y); */
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -627,14 +656,10 @@ void OsVendorInit(void)
|
|||
if ( !tempStr ) {
|
||||
ErrorF("Could not find keymapping file %s.\n", darwinKeymapFile);
|
||||
} else {
|
||||
ErrorF("Using keymapping provided in %s.\n", tempStr);
|
||||
ErrorF("Using keymapping provided in %s.\n", tempStr);
|
||||
}
|
||||
darwinKeymapFile = tempStr;
|
||||
}
|
||||
|
||||
if ( !darwinKeymapFile ) {
|
||||
// ErrorF("Reading keymap from the system.\n");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -832,7 +857,7 @@ void ddxUseMsg( void )
|
|||
*/
|
||||
void ddxGiveUp( void )
|
||||
{
|
||||
ErrorF( "Quitting Xquartz...\n" );
|
||||
ErrorF( "Quitting XQuartz...\n" );
|
||||
|
||||
DarwinModeGiveUp();
|
||||
}
|
||||
|
|
@ -855,7 +880,6 @@ void AbortDDX( void )
|
|||
}
|
||||
|
||||
|
||||
#ifdef DPMSExtension
|
||||
/*
|
||||
* DPMS extension stubs
|
||||
*/
|
||||
|
|
@ -872,8 +896,6 @@ int DPMSGet(int *level)
|
|||
{
|
||||
return -1;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#include "mivalidate.h" // for union _Validate used by windowstr.h
|
||||
#include "windowstr.h" // for struct _Window
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue