# HG changeset patch # User John Tsiombikas # Date 1309044637 -10800 # Node ID 12ce0cef7ebf34a7d40856ea56cfa3c2fee7f206 # Parent 33acb6b2d7a458f74ebde929fccb0fd3d0c5d976 foo diff -r 33acb6b2d7a4 -r 12ce0cef7ebf Makefile.in --- a/Makefile.in Sat Jun 25 05:24:49 2011 +0300 +++ b/Makefile.in Sun Jun 26 02:30:37 2011 +0300 @@ -1,6 +1,6 @@ src = $(wildcard src/*.c) msrc = $(wildcard src/*.m) -obj = $(src:.c=.o) +obj = $(src:.c=.o) $(msrc:.m=.o) dep = $(src:.c=.d) lib_a = libsgl.a soname = libsgl.so.$(somajor) @@ -17,7 +17,6 @@ ifeq ($(shell uname -s), Darwin) sys = mac - obj += $(msrc:.m=.o) else sys = unix endif diff -r 33acb6b2d7a4 -r 12ce0cef7ebf configure --- a/configure Sat Jun 25 05:24:49 2011 +0300 +++ b/configure Sun Jun 26 02:30:37 2011 +0300 @@ -2,6 +2,15 @@ cfgfile=src/config.h modfile=src/modules.c +logfile=config.log +echobin=`which echo` + +rm -f $logfile + +message() +{ + $echobin $* | tee -a $logfile +} extract() { @@ -28,8 +37,11 @@ srcfile=/tmp/sgl-trylink.c aout=/tmp/sgl-a.out + echo >>$logfile + echo "trying command line: cc -o $aout $srcfile $*" >>$logfile + echo 'int main(void) { return 0; }' >$srcfile - cc -o $aout $srcfile $1 >/dev/null 2>/dev/null + eval cc -o $aout $srcfile $1 >>$logfile 2>>$logfile res=$? rm -f $srcfile $aout @@ -52,7 +64,7 @@ # start scanning for modules -echo 'Looking for usable window system modules ...' +message 'Looking for usable window system modules ...' # collect all src/wsys_whatever.c files all_files=`ls src/wsys_*.c src/wsys_*.m 2>/dev/null` @@ -75,10 +87,10 @@ fi name=`echo $m | sort | sed 's/src\/wsys_//' | sed 's/\.c//' | sed 's/\.m//'` - `which echo` -n "-> trying module $name (needs: $dep) ... " + message -n "-> trying module $name (needs: $dep) ... " if try_link "$dep"; then - echo ok + message ok libs="$libs $dep" @@ -89,7 +101,7 @@ # make the registration call in modules.c echo " REGISTER_MODULE($name);" >>$modfile else - echo failed + message failed fi done echo "Will link with: $libs" @@ -101,11 +113,11 @@ echo '#endif /* CONFIG_H_ */' >>$cfgfile # generate makefile -echo Generating makefile ... +message Generating makefile ... # hardcode prefix for now, too lazy to actually add an option... echo 'PREFIX = /usr/local' >Makefile echo "wsys_libs = $libs" >>Makefile cat Makefile.in >>Makefile -echo 'Configuration complete. Run make (or gmake) to compile.' +message 'Configuration complete. Run make (or gmake) to compile.' diff -r 33acb6b2d7a4 -r 12ce0cef7ebf src/wsys_cocoa.m --- a/src/wsys_cocoa.m Sat Jun 25 05:24:49 2011 +0300 +++ b/src/wsys_cocoa.m Sun Jun 26 02:30:37 2011 +0300 @@ -1,4 +1,6 @@ +/* SimplyGL window system module for Cocoa */ /* mac-framework: -framework Cocoa */ +/* link-with: `gnustep-config --gui-libs` */ #include "config.h"