nuclear@0: #!/bin/sh nuclear@0: nuclear@0: prefix=/usr/local nuclear@0: opt=true nuclear@0: dbg=true nuclear@0: nuclear@0: while [ $# -ne 0 ]; do nuclear@0: case "$1" in nuclear@0: --prefix=*) nuclear@0: prefix=`echo $1 | sed 's/--prefix=//'` nuclear@0: ;; nuclear@0: nuclear@0: --enable-debug) nuclear@0: dbg=true nuclear@0: ;; nuclear@0: --disable-debug) nuclear@0: dbg=false nuclear@0: ;; nuclear@0: --enable-opt) nuclear@0: opt=true nuclear@0: ;; nuclear@0: --disable-opt) nuclear@0: opt=false nuclear@0: ;; nuclear@0: esac nuclear@0: shift nuclear@0: done nuclear@0: nuclear@0: nuclear@0: echo 'configuring metasurf...' nuclear@0: echo " prefix: $prefix" nuclear@0: echo 'debugging symbols:' `$dbg && echo yes || echo no` nuclear@0: echo ' optimization:' `$opt && echo yes || echo no` nuclear@0: nuclear@0: echo 'generating makefile...' nuclear@0: echo "# automatically generated by the configure script" >Makefile nuclear@0: echo "PREFIX = $prefix" >>Makefile nuclear@0: $opt && echo "opt = -O3" >>Makefile nuclear@0: $dbg && echo "dbg = -g" >>Makefile nuclear@0: cat Makefile.in >>Makefile nuclear@0: nuclear@0: echo done.