From 738a229a719747cc1b048e4de88aeedf85e83677 Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Tue, 20 Nov 2007 06:59:11 -0800 Subject: [PATCH] Various cleanups to get Xquartz to compile. --- GL/apple/Makefile.am | 4 +++- configure.ac | 17 ++++++++++------- hw/darwin/Makefile.am | 13 +++++++++---- hw/darwin/darwin.c | 10 ++++------ hw/darwin/quartz/Makefile.am | 11 ++++++++--- hw/darwin/quartz/cr/Makefile.am | 12 +++++++----- hw/darwin/quartz/fullscreen/Makefile.am | 7 +++++-- hw/darwin/quartz/quartzCocoa.m | 2 +- hw/darwin/quartz/xpr/Makefile.am | 10 +++++++--- 9 files changed, 54 insertions(+), 32 deletions(-) diff --git a/GL/apple/Makefile.am b/GL/apple/Makefile.am index 4220f7f9c..411dfdf45 100644 --- a/GL/apple/Makefile.am +++ b/GL/apple/Makefile.am @@ -3,7 +3,9 @@ AM_CFLAGS = -I$(top_srcdir) \ -I$(top_srcdir)/GL/include \ -I$(top_srcdir)/GL/mesa/glapi \ -I$(top_srcdir)/hw/darwin/quartz \ - -I$(top_srcdir)/hw/darwin/quartz/xpr + -I$(top_srcdir)/hw/darwin/quartz/xpr \ + -I$(top_srcdir)/miext/damage \ + $(PIXMAN_CFLAGS) noinst_LIBRARIES = libCGLcore.a libCGLcore_a_SOURCES = indirect.c \ diff --git a/configure.ac b/configure.ac index 21f58e146..e73d12beb 100644 --- a/configure.ac +++ b/configure.ac @@ -70,13 +70,16 @@ AC_ARG_WITH(dtrace, AS_HELP_STRING([--with-dtrace=PATH], [Enable dtrace probes (default: enabled if dtrace found)]), [WDTRACE=$withval], [WDTRACE=auto]) if test "x$WDTRACE" = "xyes" -o "x$WDTRACE" = "xauto" ; then - AC_PATH_PROG(DTRACE, [dtrace], [not_found], [$PATH:/usr/sbin]) - if test "x$DTRACE" = "xnot_found" ; then - if test "x$WDTRACE" = "xyes" ; then - AC_MSG_FAILURE([dtrace requested but not found]) - fi - WDTRACE="no" - fi + case $host_os in + darwin*) WDTRACE="no" ;; + *) AC_PATH_PROG(DTRACE, [dtrace], [not_found], [$PATH:/usr/sbin]) + if test "x$DTRACE" = "xnot_found" ; then + if test "x$WDTRACE" = "xyes" ; then + AC_MSG_FAILURE([dtrace requested but not found]) + fi + WDTRACE="no" + fi ;; + esac fi if test "x$WDTRACE" != "xno" ; then AC_DEFINE(XSERVER_DTRACE, 1, diff --git a/hw/darwin/Makefile.am b/hw/darwin/Makefile.am index f1740e344..4a86fa3f7 100644 --- a/hw/darwin/Makefile.am +++ b/hw/darwin/Makefile.am @@ -1,5 +1,10 @@ -AM_CFLAGS = @XORG_CFLAGS@ -AM_CPPFLAGS = @XORG_INCS@ -I$(top_srcdir)/Xext -I$(top_srcdir)/miext/rootless -DUSE_NEW_CLUT -DBUILD_DATE=\"$(BUILD_DATE)\" -DHAVE_XORG_CONFIG_H -DXFree86Server -DINXQUARTZ +AM_CFLAGS = $(XORG_CFLAGS) $(PIXMAN_CFLAGS) +AM_CPPFLAGS = $(XORG_INCS) -DUSE_NEW_CLUT -DBUILD_DATE=\"$(BUILD_DATE)\" -DHAVE_XORG_CONFIG_H -DXFree86Server -DINXQUARTZ \ + -I$(top_srcdir)/fb \ + -I$(top_srcdir)/mi \ + -I$(top_srcdir)/miext/rootless \ + -I$(top_srcdir)/render \ + -I$(top_srcdir)/Xext SUBDIRS = quartz utils @@ -10,7 +15,7 @@ Xquartz_SOURCES = darwin.c \ darwinEvents.c \ darwinKeyboard.c \ darwinXinput.c \ - $(top_srcdir)/fb/fbcmap.c \ + $(top_srcdir)/fb/fbcmap_mi.c \ $(top_srcdir)/mi/miinitext.c # We should probably add these once they're working, or are these obsolete and to be removed? @@ -41,7 +46,7 @@ Xquartz_LDADD = ./quartz/libXquartz.a \ $(top_builddir)/miext/rootless/librootless.la \ $(top_builddir)/miext/rootless/safeAlpha/libsafeAlpha.la \ $(top_builddir)/miext/rootless/accel/librlAccel.la \ - $(DARWIN_LIBS) $(XSERVER_LIBS) -lXplugin + $(DARWIN_LIBS) $(XSERVER_LIBS) $(PIXMAN_LIBS) -lXplugin Xquartz_LDFLAGS = -XCClinker -Objc \ -Wl,-u,_miDCInitialize \ diff --git a/hw/darwin/darwin.c b/hw/darwin/darwin.c index c721ca112..80d879bea 100644 --- a/hw/darwin/darwin.c +++ b/hw/darwin/darwin.c @@ -362,12 +362,10 @@ static int DarwinMouseProc( map[3] = 3; map[4] = 4; map[5] = 5; - InitPointerDeviceStruct( (DevicePtr)pPointer, - map, - 5, // numbuttons (4 & 5 are scroll wheel) - miPointerGetMotionEvents, - (PtrCtrlProcPtr)NoopDDA, - 0 ); + InitPointerDeviceStruct((DevicePtr)pPointer, map, 5, + GetMotionHistory, + (PtrCtrlProcPtr)NoopDDA, + GetMotionHistorySize(), 2); #ifdef XINPUT InitValuatorAxisStruct( pPointer, 0, // X axis diff --git a/hw/darwin/quartz/Makefile.am b/hw/darwin/quartz/Makefile.am index 4c650e607..d90b2bf58 100644 --- a/hw/darwin/quartz/Makefile.am +++ b/hw/darwin/quartz/Makefile.am @@ -1,8 +1,13 @@ noinst_LIBRARIES = libXQuartz.a -AM_CFLAGS = @XORG_CFLAGS@ -AM_OBJCFLAGS = @XORG_CFLAGS@ -AM_CPPFLAGS = -I$(srcdir) -I$(srcdir)/.. -I$(top_srcdir)/miext/rootless @XORG_INCS@ -DXBINDIR=\"${bindir}\" -DHAS_KL_API -DHAVE_XORG_CONFIG_H +AM_CFLAGS = $(XORG_CFLAGS) $(PIXMAN_CFLAGS) +AM_OBJCFLAGS = $(XORG_CFLAGS) $(PIXMAN_CFLAGS) +AM_CPPFLAGS = $(XORG_INCS) -DXBINDIR=\"${bindir}\" -DHAS_KL_API -DHAVE_XORG_CONFIG_H \ + -I$(srcdir) -I$(srcdir)/.. \ + -I$(top_srcdir)/fb \ + -I$(top_srcdir)/mi \ + -I$(top_srcdir)/miext/rootless \ + -I$(top_srcdir)/render SUBDIRS = cr fullscreen xpr diff --git a/hw/darwin/quartz/cr/Makefile.am b/hw/darwin/quartz/cr/Makefile.am index ff6043d46..03f2e2457 100644 --- a/hw/darwin/quartz/cr/Makefile.am +++ b/hw/darwin/quartz/cr/Makefile.am @@ -1,13 +1,15 @@ noinst_LIBRARIES = libcr.a -AM_CFLAGS = @XORG_CFLAGS@ -AM_OBJCFLAGS = @XORG_CFLAGS@ +AM_CFLAGS = $(XORG_CFLAGS) +AM_OBJCFLAGS = $(XORG_CFLAGS) AM_CPPFLAGS = -DDEFER_NSWINDOW \ - @XORG_INCS@ \ + $(XORG_INCS) \ -I../fullscreen \ -I$(srcdir) -I$(srcdir)/.. -I$(srcdir)/../.. \ + -I$(top_srcdir)/mi \ -I$(top_srcdir)/miext/rootless \ -I$(top_srcdir)/miext/rootless/safeAlpha \ - -I$(top_srcdir)/mi + -I$(top_srcdir)/render \ + $(PIXMAN_CFLAGS) libcr_a_SOURCES = crAppleWM.m \ crFrame.m \ @@ -18,4 +20,4 @@ libcr_a_SOURCES = crAppleWM.m \ EXTRA_DIST = \ cr.h \ XView.h - + diff --git a/hw/darwin/quartz/fullscreen/Makefile.am b/hw/darwin/quartz/fullscreen/Makefile.am index 5e471ad30..510c0c28c 100644 --- a/hw/darwin/quartz/fullscreen/Makefile.am +++ b/hw/darwin/quartz/fullscreen/Makefile.am @@ -1,6 +1,9 @@ noinst_LIBRARIES = libfullscreen.a -AM_CFLAGS = @XORG_CFLAGS@ -AM_CPPFLAGS = @XORG_INCS@ -I$(srcdir) -I$(srcdir)/.. -I$(srcdir)/../.. +AM_CFLAGS = $(XORG_CFLAGS) $(PIXMAN_CFLAGS) +AM_CPPFLAGS = $(XORG_INCS) -I$(srcdir) -I$(srcdir)/.. -I$(srcdir)/../.. \ + -I$(top_srcdir)/miext/damage \ + -I$(top_srcdir)/miext/shadow \ + -I$(top_srcdir)/mi libfullscreen_a_SOURCES = fullscreen.c \ quartzCursor.c diff --git a/hw/darwin/quartz/quartzCocoa.m b/hw/darwin/quartz/quartzCocoa.m index 46c61dc8e..bff3772d9 100644 --- a/hw/darwin/quartz/quartzCocoa.m +++ b/hw/darwin/quartz/quartzCocoa.m @@ -97,7 +97,7 @@ char *QuartzReadCocoaPasteboard(void) char *buffer; if (! string) return NULL; - buffer = (char *) [string lossyCString]; + buffer = (char *) [string UTF8String]; text = (char *) malloc(strlen(buffer)+1); if (text) strcpy(text, buffer); diff --git a/hw/darwin/quartz/xpr/Makefile.am b/hw/darwin/quartz/xpr/Makefile.am index 1f19fe90b..444ba5c6b 100644 --- a/hw/darwin/quartz/xpr/Makefile.am +++ b/hw/darwin/quartz/xpr/Makefile.am @@ -1,11 +1,15 @@ noinst_LIBRARIES = libxpr.a -AM_CFLAGS = @XORG_CFLAGS@ -AM_CPPFLAGS = @XORG_INCS@ \ +AM_CFLAGS = $(XORG_CFLAGS) $(PIXMAN_CFLAGS) +AM_CPPFLAGS = $(XORG_INCS) \ -DHAVE_XORG_CONFIG_H \ -I$(srcdir) -I$(srcdir)/.. -I$(srcdir)/../.. \ + -I$(top_srcdir)/fb \ + -I$(top_srcdir)/mi \ + -I$(top_srcdir)/miext \ + -I$(top_srcdir)/miext/damage \ -I$(top_srcdir)/miext/rootless \ -I$(top_srcdir)/miext/rootless/safeAlpha \ - -I$(top_srcdir)/miext + -I$(top_srcdir)/render libxpr_a_SOURCES = \ appledri.c \