metasurf

view configure @ 6:c1a60ab45bf7

added commandline option in volume example to set the iso threshold
author John Tsiombikas <nuclear@member.fsf.org>
date Wed, 26 Oct 2011 23:38:20 +0300
parents
children
line source
1 #!/bin/sh
3 prefix=/usr/local
4 opt=true
5 dbg=true
7 while [ $# -ne 0 ]; do
8 case "$1" in
9 --prefix=*)
10 prefix=`echo $1 | sed 's/--prefix=//'`
11 ;;
13 --enable-debug)
14 dbg=true
15 ;;
16 --disable-debug)
17 dbg=false
18 ;;
19 --enable-opt)
20 opt=true
21 ;;
22 --disable-opt)
23 opt=false
24 ;;
25 esac
26 shift
27 done
30 echo 'configuring metasurf...'
31 echo " prefix: $prefix"
32 echo 'debugging symbols:' `$dbg && echo yes || echo no`
33 echo ' optimization:' `$opt && echo yes || echo no`
35 echo 'generating makefile...'
36 echo "# automatically generated by the configure script" >Makefile
37 echo "PREFIX = $prefix" >>Makefile
38 $opt && echo "opt = -O3" >>Makefile
39 $dbg && echo "dbg = -g" >>Makefile
40 cat Makefile.in >>Makefile
42 echo done.