Commit 35ec8b89 authored by Ben Byer's avatar Ben Byer
Browse files

DDX changes for XDarwin

Creating a real DDX section for XDarwin instead of
stuffing it into the XORG section in a half-assed manner.
parent f3f614cd
# someone could get really crazy someday and add support for the SI...
# xwin/darwin/xfree86 have their accel support under the DDX
if BUILD_DARWIN
if XDARWIN
DARWIN_SUBDIRS = apple
endif
SUBDIRS = glx mesa $(DARWIN_SUBDIRS)
......
......@@ -525,6 +525,7 @@ AC_ARG_ENABLE(xorg, AS_HELP_STRING([--enable-xorg], [Build Xorg server
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: 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(xdarwin, AS_HELP_STRING([--enable-xdarwin], [Build XDarwin server (default: auto)]), [XDARWIN=$enableval], [XDARWIN=auto])
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: no)]), [XPRINT=$enableval], [XPRINT=no])
AC_ARG_ENABLE(xgl, AS_HELP_STRING([--enable-xgl], [Build Xgl server (default: no)]), [XGL=$enableval], [XGL=no])
......@@ -1309,64 +1310,6 @@ dnl has it in libc), or if libdl is needed to get it.
XORG_CFLAGS="$XORG_CFLAGS $PCIACCESS_CFLAGS"
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
# 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="$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])
# Not sure that we should be disabling all these...
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$DGA" = xyes || test "x$DGA" = xauto; then
AC_MSG_NOTICE([Disabling DGA extension])
DGA=no
fi
;;
linux*)
if test "x$LNXAPM" = xyes; then
XORG_CFLAGS="$XORG_CFLAGS -DXF86PM"
......@@ -1600,8 +1543,6 @@ AM_CONDITIONAL([LINUX_ALPHA], [test "x$linux_alpha" = xyes])
AM_CONDITIONAL([LNXACPI], [test "x$linux_acpi" = xyes])
AM_CONDITIONAL([SOLARIS_USL_CONSOLE], [test "x$solaris_usl_console" = xyes])
AM_CONDITIONAL([SOLARIS_ASM_INLINE], [test "x$solaris_asm_inline" = xyes])
AM_CONDITIONAL([BUILD_DARWIN],[test "X$build_darwin" = Xyes])
AM_CONDITIONAL([XQUARTZ],[test "X$XQUARTZ" = Xyes])
AM_CONDITIONAL(DGA, [test "x$DGA" = xyes])
dnl legacy fb support
......@@ -1743,10 +1684,73 @@ 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
AM_CONDITIONAL(HAVE_X_PLUGIN, [test "x$ac_cv_lib_Xplugin_xp_init" = xyes])
AM_CONDITIONAL(HAVE_AGL_FRAMEWORK, [test "x$xorg_cv_AGL_framework" = xyes])
# Support for objc in autotools is minimal and not
# documented.
AC_MSG_CHECKING([whether to build XDarwin (Mac OS X) DDX])
if test "x$XDARWIN" = xauto; then
case $host_os in
darwin*) XDARWIN="yes" ;;
*) XWIN="no" ;;
esac
XWIN_LIBS="$FB_LIB $XEXT_LIB $CONFIG_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $DAMAGE_LIB $LAYER_LIB $XPSTUBS_LIB $SHADOW_LIB"
AC_SUBST([XWIN_LIBS])
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="$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$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)'
......@@ -1757,7 +1761,10 @@ 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(XQUARTZ, [test "x$XQUARTZ" = xyes])
dnl kdrive DDX
XEPHYR_LIBS=
......
if DMX
if BUILD_DARWIN
if XDARWIN
# Darwin does not need the dmx subdir
else
DMX_SUBDIRS = dmx
......@@ -7,12 +7,8 @@ endif
endif
if XORG
if BUILD_DARWIN
# Darwin does not need the xfree86 subdir
else
XORG_SUBDIRS = xfree86
endif
endif
if XVFB
XVFB_SUBDIRS = vfb
......@@ -38,15 +34,15 @@ if XPRINT
XPRINT_SUBDIRS = xprint
endif
if BUILD_DARWIN
DARWIN_SUBDIRS = darwin
if XDARWIN
XDARWIN_SUBDIRS = darwin
endif
SUBDIRS = \
$(XORG_SUBDIRS) \
$(XGL_SUBDIRS) \
$(XWIN_SUBDIRS) \
$(DARWIN_SUBDIRS) \
$(XDARWIN_SUBDIRS) \
$(XVFB_SUBDIRS) \
$(XNEST_SUBDIRS) \
$(DMX_SUBDIRS) \
......
......@@ -191,7 +191,7 @@ glxMesa_la_DEPENDENCIES = XDarwinApp
endif
endif
if HAVE_X_PLUGIN
if HAVE_XPLUGIN
xprplugindir = $(darwinappdir)/Contents/Resources/xpr.bundle/Contents/MacOS
xprplugin_LTLIBRARIES = xpr.la
......
......@@ -5,7 +5,7 @@ AM_OBJCFLAGS = @XORG_CFLAGS@ @DIX_CFLAGS@
INCLUDES = -I$(srcdir) -I$(srcdir)/.. @XORG_INCS@
AM_DEFS = -DHAS_CG_MACH_PORT -DHAS_KL_API
if HAVE_X_PLUGIN
if HAVE_XPLUGIN
AM_DEFS += -DBUILD_XPR
endif
DEFS = @DEFS@ $(AM_DEFS) -DXBINDIR=\"${bindir}\"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment