nuclear@0: #!/bin/sh nuclear@0: nuclear@0: prefix=/usr/local nuclear@0: opt=false nuclear@0: dbg=true nuclear@0: nuclear@0: while [ $# != 0 ]; do nuclear@0: case $1 in nuclear@0: --prefix=*) nuclear@0: prefix=`echo $1 | sed 's/^--prefix=//'` nuclear@0: ;; nuclear@0: --enable-opt) nuclear@0: opt=true nuclear@0: ;; nuclear@0: --disable-opt) nuclear@0: opt=false nuclear@0: ;; nuclear@0: --enable-dbg) nuclear@0: dbg=true nuclear@0: ;; nuclear@0: --disable-dbg) nuclear@0: dbg=false nuclear@0: ;; nuclear@0: esac nuclear@0: shift nuclear@0: done nuclear@0: nuclear@0: echo 'Configuring librbtree...' nuclear@0: nuclear@0: echo "# do not modify this file manually, it's generated by configure" >Makefile nuclear@0: echo "PREFIX = $prefix" >>Makefile nuclear@0: $opt && echo '-O3' | xargs echo 'opt =' >>Makefile nuclear@0: $dbg && echo '-g' | xargs echo 'dbg =' >>Makefile nuclear@0: cat Makefile.in >>Makefile nuclear@0: nuclear@0: echo 'Done. Run make (or gmake) to compile.'