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