sgl

changeset 19:12ce0cef7ebf

foo
author John Tsiombikas <nuclear@member.fsf.org>
date Sun, 26 Jun 2011 02:30:37 +0300
parents 33acb6b2d7a4
children 0697fbd075b6
files Makefile.in configure src/wsys_cocoa.m
diffstat 3 files changed, 22 insertions(+), 9 deletions(-) [+]
line diff
     1.1 --- a/Makefile.in	Sat Jun 25 05:24:49 2011 +0300
     1.2 +++ b/Makefile.in	Sun Jun 26 02:30:37 2011 +0300
     1.3 @@ -1,6 +1,6 @@
     1.4  src = $(wildcard src/*.c)
     1.5  msrc = $(wildcard src/*.m)
     1.6 -obj = $(src:.c=.o)
     1.7 +obj = $(src:.c=.o) $(msrc:.m=.o)
     1.8  dep = $(src:.c=.d)
     1.9  lib_a = libsgl.a
    1.10  soname = libsgl.so.$(somajor)
    1.11 @@ -17,7 +17,6 @@
    1.12  
    1.13  ifeq ($(shell uname -s), Darwin)
    1.14  	sys = mac
    1.15 -	obj += $(msrc:.m=.o)
    1.16  else
    1.17  	sys = unix
    1.18  endif
     2.1 --- a/configure	Sat Jun 25 05:24:49 2011 +0300
     2.2 +++ b/configure	Sun Jun 26 02:30:37 2011 +0300
     2.3 @@ -2,6 +2,15 @@
     2.4  
     2.5  cfgfile=src/config.h
     2.6  modfile=src/modules.c
     2.7 +logfile=config.log
     2.8 +echobin=`which echo`
     2.9 +
    2.10 +rm -f $logfile
    2.11 +
    2.12 +message()
    2.13 +{
    2.14 +	$echobin $* | tee -a $logfile
    2.15 +}
    2.16  
    2.17  extract()
    2.18  {
    2.19 @@ -28,8 +37,11 @@
    2.20  	srcfile=/tmp/sgl-trylink.c
    2.21  	aout=/tmp/sgl-a.out
    2.22  
    2.23 +	echo >>$logfile
    2.24 +	echo "trying command line: cc -o $aout $srcfile $*" >>$logfile 
    2.25 +
    2.26  	echo 'int main(void) { return 0; }' >$srcfile
    2.27 -	cc -o $aout $srcfile $1 >/dev/null 2>/dev/null
    2.28 +	eval cc -o $aout $srcfile $1 >>$logfile 2>>$logfile
    2.29  	res=$?
    2.30  
    2.31  	rm -f $srcfile $aout
    2.32 @@ -52,7 +64,7 @@
    2.33  
    2.34  
    2.35  # start scanning for modules
    2.36 -echo 'Looking for usable window system modules ...'
    2.37 +message 'Looking for usable window system modules ...'
    2.38  
    2.39  # collect all src/wsys_whatever.c files
    2.40  all_files=`ls src/wsys_*.c src/wsys_*.m 2>/dev/null`
    2.41 @@ -75,10 +87,10 @@
    2.42  	fi
    2.43  
    2.44  	name=`echo $m | sort | sed 's/src\/wsys_//' | sed 's/\.c//' | sed 's/\.m//'`
    2.45 -	`which echo` -n "-> trying module $name (needs: $dep) ... "
    2.46 +	message -n "-> trying module $name (needs: $dep) ... "
    2.47  
    2.48  	if try_link "$dep"; then
    2.49 -		echo ok
    2.50 +		message ok
    2.51  
    2.52  		libs="$libs $dep"
    2.53  
    2.54 @@ -89,7 +101,7 @@
    2.55  		# make the registration call in modules.c
    2.56  		echo "	REGISTER_MODULE($name);" >>$modfile
    2.57  	else
    2.58 -		echo failed
    2.59 +		message failed
    2.60  	fi
    2.61  done
    2.62  echo "Will link with: $libs"
    2.63 @@ -101,11 +113,11 @@
    2.64  echo '#endif	/* CONFIG_H_ */' >>$cfgfile
    2.65  
    2.66  # generate makefile
    2.67 -echo Generating makefile ...
    2.68 +message Generating makefile ...
    2.69  
    2.70  # hardcode prefix for now, too lazy to actually add an option...
    2.71  echo 'PREFIX = /usr/local' >Makefile
    2.72  echo "wsys_libs = $libs" >>Makefile
    2.73  cat Makefile.in >>Makefile
    2.74  
    2.75 -echo 'Configuration complete. Run make (or gmake) to compile.'
    2.76 +message 'Configuration complete. Run make (or gmake) to compile.'
     3.1 --- a/src/wsys_cocoa.m	Sat Jun 25 05:24:49 2011 +0300
     3.2 +++ b/src/wsys_cocoa.m	Sun Jun 26 02:30:37 2011 +0300
     3.3 @@ -1,4 +1,6 @@
     3.4 +/* SimplyGL window system module for Cocoa */
     3.5  /* mac-framework: -framework Cocoa */
     3.6 +/* link-with: `gnustep-config --gui-libs` */
     3.7  
     3.8  #include "config.h"
     3.9