X11.app now builds correctly

This commit is contained in:
Ben Byer 2007-02-26 23:40:00 -08:00
parent 154d2c13f4
commit 776d4d6587
2 changed files with 18 additions and 15 deletions

View File

@ -37,7 +37,7 @@ Xquartz_SOURCES = \
$(top_srcdir)/Xi/stubs.c \ $(top_srcdir)/Xi/stubs.c \
apple/X11Application.m \ apple/X11Application.m \
apple/X11Controller.m \ apple/X11Controller.m \
quartz/XServer.m \ quartz/Xserver.m \
quartz/Preferences.m \ quartz/Preferences.m \
quartz/applewm.c \ quartz/applewm.c \
quartz/keysym2ucs.c \ quartz/keysym2ucs.c \
@ -90,6 +90,7 @@ XDarwin_LDADD = \
Xquartz_LDADD = \ Xquartz_LDADD = \
$(top_builddir)/dix/dixfonts.lo \ $(top_builddir)/dix/dixfonts.lo \
$(top_builddir)/dix/libdix.la \ $(top_builddir)/dix/libdix.la \
$(top_builddir)/config/libconfig.a \
$(top_builddir)/os/libos.la \ $(top_builddir)/os/libos.la \
./libdarwinShared.a \ ./libdarwinShared.a \
$(top_builddir)/dix/libxpstubs.la \ $(top_builddir)/dix/libxpstubs.la \
@ -122,7 +123,7 @@ Xquartz_LDFLAGS = \
-XCClinker -Objc \ -XCClinker -Objc \
-Wl,-u,_miDCInitialize \ -Wl,-u,_miDCInitialize \
-Wl,-framework,Carbon \ -Wl,-framework,Carbon \
-Wl,-framework,ApplicationServices \ -Wl,-framework,OpenGL \
-Wl,-framework,Cocoa \ -Wl,-framework,Cocoa \
-Wl,-framework,CoreAudio \ -Wl,-framework,CoreAudio \
-Wl,-framework,IOKit -Wl,-framework,IOKit

View File

@ -42,10 +42,12 @@
char **envpGlobal; // argcGlobal and argvGlobal char **envpGlobal; // argcGlobal and argvGlobal
// are from dix/globals.c // are from dix/globals.c
#ifdef INX11APP #ifdef INXQUARTZ
void X11ControllerMain(int argc, char *argv[], void (*server_thread) (void *), void *server_arg); void X11ControllerMain(int argc, char *argv[], void (*server_thread) (void *), void *server_arg);
# ifdef GLXEXT
void GlxExtensionInit(void); void GlxExtensionInit(void);
void GlxWrapInitVisuals(miInitVisualsProcPtr *); void GlxWrapInitVisuals(miInitVisualsProcPtr *);
# endif
static void server_thread (void *arg) { static void server_thread (void *arg) {
extern int main (int argc, char **argv, char **envp); extern int main (int argc, char **argv, char **envp);
@ -53,20 +55,19 @@ static void server_thread (void *arg) {
} }
#else #else
int NSApplicationMain(int argc, char *argv[]); int NSApplicationMain(int argc, char *argv[]);
typedef Bool (*QuartzModeBundleInitPtr)(void);
# ifdef GLXEXT
// GLX bundle function pointers // GLX bundle function pointers
typedef void (*GlxExtensionInitPtr)(void); typedef void (*GlxExtensionInitPtr)(void);
static GlxExtensionInitPtr GlxExtensionInit = NULL; static GlxExtensionInitPtr GlxExtensionInit = NULL;
typedef void (*GlxWrapInitVisualsPtr)(miInitVisualsProcPtr *); typedef void (*GlxWrapInitVisualsPtr)(miInitVisualsProcPtr *);
static GlxWrapInitVisualsPtr GlxWrapInitVisuals = NULL; static GlxWrapInitVisualsPtr GlxWrapInitVisuals = NULL;
typedef Bool (*QuartzModeBundleInitPtr)(void);
void * __DarwinglXMesaProvider = NULL; void * __DarwinglXMesaProvider = NULL;
typedef void (*GlxPushProviderPtr)(void *); typedef void (*GlxPushProviderPtr)(void *);
GlxPushProviderPtr GlxPushProvider = NULL; GlxPushProviderPtr GlxPushProvider = NULL;
# endif # endif
#endif
/* /*
* DarwinHandleGUI * DarwinHandleGUI
@ -123,7 +124,7 @@ void DarwinHandleGUI(
} }
} }
#ifdef INX11APP #ifdef INXQUARTZ
/* Initially I ran the X server on the main thread, and received /* Initially I ran the X server on the main thread, and received
events on the second thread. But now we may be using Carbon, events on the second thread. But now we may be using Carbon,
that needs to run on the main thread. (Otherwise, when it's that needs to run on the main thread. (Otherwise, when it's
@ -143,7 +144,7 @@ void DarwinHandleGUI(
exit(main_exit); exit(main_exit);
} }
#ifndef INX11APP #ifndef INXQUARTZ
/* /*
* QuartzLoadDisplayBundle * QuartzLoadDisplayBundle
* Try to load the appropriate bundle containing the back end display code. * Try to load the appropriate bundle containing the back end display code.
@ -201,7 +202,7 @@ Bool QuartzLoadDisplayBundle(
return TRUE; return TRUE;
} }
#ifdef GLXEXT
/* /*
* LoadGlxBundle * LoadGlxBundle
* The Quartz mode X server needs to dynamically load the appropriate * The Quartz mode X server needs to dynamically load the appropriate
@ -268,7 +269,7 @@ static void LoadGlxBundle(void)
CFRelease(bundleName); CFRelease(bundleName);
CFRelease(bundleURL); CFRelease(bundleURL);
} }
# endif
#else #else
Bool QuartzLoadDisplayBundle(const char *dpyBundleName) Bool QuartzLoadDisplayBundle(const char *dpyBundleName)
@ -278,9 +279,10 @@ Bool QuartzLoadDisplayBundle(const char *dpyBundleName)
#endif #endif
#ifdef GLXEXT
void DarwinGlxPushProvider(void *impl) void DarwinGlxPushProvider(void *impl)
{ {
#ifndef INX11APP #ifndef INXQUARTZ
if (!GlxExtensionInit) if (!GlxExtensionInit)
LoadGlxBundle(); LoadGlxBundle();
#endif #endif
@ -294,7 +296,7 @@ void DarwinGlxPushProvider(void *impl)
*/ */
void DarwinGlxExtensionInit(void) void DarwinGlxExtensionInit(void)
{ {
#ifndef INX11APP #ifndef INXQUARTZ
if (!GlxExtensionInit) if (!GlxExtensionInit)
LoadGlxBundle(); LoadGlxBundle();
#endif #endif
@ -308,13 +310,13 @@ void DarwinGlxExtensionInit(void)
void DarwinGlxWrapInitVisuals( void DarwinGlxWrapInitVisuals(
miInitVisualsProcPtr *procPtr) miInitVisualsProcPtr *procPtr)
{ {
#ifndef INX11APP #ifndef INXQUARTZ
if (!GlxWrapInitVisuals) if (!GlxWrapInitVisuals)
LoadGlxBundle(); LoadGlxBundle();
#endif #endif
GlxWrapInitVisuals(procPtr); GlxWrapInitVisuals(procPtr);
} }
#endif
int DarwinModeProcessArgument( int argc, char *argv[], int i ) int DarwinModeProcessArgument( int argc, char *argv[], int i )
{ {