metasurf
diff configure @ 0:7aa4627e492b
first commit
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Tue, 25 Oct 2011 07:34:31 +0300 |
parents | |
children |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/configure Tue Oct 25 07:34:31 2011 +0300 1.3 @@ -0,0 +1,42 @@ 1.4 +#!/bin/sh 1.5 + 1.6 +prefix=/usr/local 1.7 +opt=true 1.8 +dbg=true 1.9 + 1.10 +while [ $# -ne 0 ]; do 1.11 + case "$1" in 1.12 + --prefix=*) 1.13 + prefix=`echo $1 | sed 's/--prefix=//'` 1.14 + ;; 1.15 + 1.16 + --enable-debug) 1.17 + dbg=true 1.18 + ;; 1.19 + --disable-debug) 1.20 + dbg=false 1.21 + ;; 1.22 + --enable-opt) 1.23 + opt=true 1.24 + ;; 1.25 + --disable-opt) 1.26 + opt=false 1.27 + ;; 1.28 + esac 1.29 + shift 1.30 +done 1.31 + 1.32 + 1.33 +echo 'configuring metasurf...' 1.34 +echo " prefix: $prefix" 1.35 +echo 'debugging symbols:' `$dbg && echo yes || echo no` 1.36 +echo ' optimization:' `$opt && echo yes || echo no` 1.37 + 1.38 +echo 'generating makefile...' 1.39 +echo "# automatically generated by the configure script" >Makefile 1.40 +echo "PREFIX = $prefix" >>Makefile 1.41 +$opt && echo "opt = -O3" >>Makefile 1.42 +$dbg && echo "dbg = -g" >>Makefile 1.43 +cat Makefile.in >>Makefile 1.44 + 1.45 +echo done.