sgl

diff configure @ 13:e989ab58ec5b

trying to figure out how cocoa works
author John Tsiombikas <nuclear@siggraph.org>
date Mon, 16 May 2011 23:05:57 +0300
parents bf34fa677960
children a16b34ac3f2a
line diff
     1.1 --- a/configure	Sat May 14 12:02:22 2011 +0300
     1.2 +++ b/configure	Mon May 16 23:05:57 2011 +0300
     1.3 @@ -30,6 +30,10 @@
     1.4  
     1.5  	echo 'int main(void) { return 0; }' >$srcfile
     1.6  	cc -o $aout $srcfile $1 >/dev/null 2>/dev/null
     1.7 +	res=$?
     1.8 +
     1.9 +	rm -f $srcfile $aout
    1.10 +	return $res
    1.11  }
    1.12  
    1.13  # write beginning of config.h
    1.14 @@ -51,7 +55,7 @@
    1.15  echo 'Looking for usable window system modules ...'
    1.16  
    1.17  # collect all src/wsys_whatever.c files
    1.18 -all_files=`ls src/wsys_*.c 2>/dev/null`
    1.19 +all_files=`ls src/wsys_*.c src/wsys_*.m 2>/dev/null`
    1.20  
    1.21  for m in $all_files; do
    1.22  	# extract USE_WSYS_MODULE_* define
    1.23 @@ -65,9 +69,12 @@
    1.24  		fi
    1.25  	else
    1.26  		dep=`get_depline $m`
    1.27 +		if [ -z "$dep" ]; then
    1.28 +			dep=`get_framework $m`
    1.29 +		fi
    1.30  	fi
    1.31  
    1.32 -	name=`echo $m | sort | sed 's/src\/wsys_//' | sed 's/\.c//'`
    1.33 +	name=`echo $m | sort | sed 's/src\/wsys_//' | sed 's/\.c\|\.m//'`
    1.34  	`which echo` -n "-> trying module $name (needs: $dep) ... "
    1.35  
    1.36  	if try_link "$dep"; then