metasurf

annotate configure @ 2:9ab057fba0c5

added copyright statements, added comments, yada yada
author John Tsiombikas <nuclear@member.fsf.org>
date Tue, 25 Oct 2011 08:59:07 +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.