sgl

diff configure @ 35:3d6ee9fb9ac1

- added a cflags declaration for modules files
author John Tsiombikas <nuclear@member.fsf.org>
date Fri, 24 Feb 2012 05:17:47 +0200
parents f5e83de47903
children
line diff
     1.1 --- a/configure	Tue Jul 05 06:19:31 2011 +0300
     1.2 +++ b/configure	Fri Feb 24 05:17:47 2012 +0200
     1.3 @@ -28,6 +28,11 @@
     1.4  	extract $1 mac-framework
     1.5  }
     1.6  
     1.7 +get_cflags()
     1.8 +{
     1.9 +	extract $1 cflags
    1.10 +}
    1.11 +
    1.12  get_usedef()
    1.13  {
    1.14  	grep '#ifdef *USE_WSYS_MODULE' $1 | sed 's/^.*\(USE_WSYS_MODULE_.*\)/\1/'
    1.15 @@ -104,6 +109,8 @@
    1.16  		fi
    1.17  	fi
    1.18  
    1.19 +	cfl=`get_cflags $m`
    1.20 +
    1.21  	name=`echo $m | sort | sed 's/src\/wsys_//' | sed 's/\.c//' | sed 's/\.m//'`
    1.22  	message -n "-> trying module $name (needs: $dep) ... "
    1.23  
    1.24 @@ -113,6 +120,7 @@
    1.25  	elif try_link "$dep"; then
    1.26  		message ok
    1.27  
    1.28 +		cflags="$cflags $cfl"
    1.29  		libs="$libs $dep"
    1.30  
    1.31  		# emmit the USE_ define in config.h
    1.32 @@ -126,6 +134,9 @@
    1.33  	fi
    1.34  done
    1.35  
    1.36 +if [ -n "$cflags" ]; then
    1.37 +	message "will compile with: $cflags"
    1.38 +fi
    1.39  message "Will link with: $libs"
    1.40  
    1.41  # wrap up the modules.c file
    1.42 @@ -139,6 +150,7 @@
    1.43  
    1.44  message "install prefix: $prefix"
    1.45  echo "PREFIX = $prefix" >Makefile
    1.46 +echo "wsys_cflags = $cflags" >>Makefile
    1.47  echo "wsys_libs = $libs" >>Makefile
    1.48  cat Makefile.in >>Makefile
    1.49