Hi,

I suggest the following patch for lispbuilder-sdl-glue on Mac OS X. If it
can't find sdl-config, then it assumes the user installed SDL.framework to
the /Library/Frameworks/ folder. The other change is that it needs to use
g++ rather than gcc.

Index: Makefile.darwin
===================================================================
--- Makefile.darwin (revision 1393)
+++ Makefile.darwin (working copy)
@@ -1,17 +1,21 @@
 #### -*- Mode: Makefile -*-
 #### Makefile for Darwin/PPC systems

-CC=gcc
+CC=g++
 SHFLAGS=-bundle
 CFLAGS+=$(SHFLAGS) -g -Wall
 LDFLAGS+=$(SHFLAGS)
 SHLIB_SUFFIX=dylib
 SDL_CONFIG=sdl-config

-#-lSDLmain -lSDL -framework Cocoa
-SDL_CFLAGS=$(CFLAGS) $(shell $(SDL_CONFIG) --cflags)
-SDL_LDFLAGS=$(LDFLAGS) $(shell $(SDL_CONFIG) --libs)
+# look for sdl-config; else assume framework is in /Library/Frameworks
+ifneq ($(shell which $(SDL_CONFIG)),)
+SDL_CFLAGS=$(CFLAGS) $(shell $(SDL_CONFIG) --cflags)
+SDL_LDFLAGS=$(LDFLAGS) $(shell $(SDL_CONFIG) --libs)
+else
+SDL_CFLAGS=$(CFLAGS) -D_GNU_SOURCE=1 -D_THREAD_SAFE
-I/Library/Frameworks/SDL.framework/Headers
+SDL_LDFLAGS=$(LDFLAGS) -framework SDL -framework Cocoa
+endif

 SDL_GLUE_CFLAGS=$(SDL_CFLAGS)
-SDL_GLUE_LDFLAGS=$(LDFLAGS) -lSDL
-
+SDL_GLUE_LDFLAGS=$(SDL_LDFLAGS)


-- 
Elliott Slaughter

"Don't worry about what anybody else is going to do. The best way to predict
the future is to invent it." - Alan Kay
_______________________________________________
application-builder mailing list
application-builder@lispniks.com
http://www.lispniks.com/mailman/listinfo/application-builder

Reply via email to