nuclear@0: #!/bin/sh nuclear@0: nuclear@0: prefix=/usr/local nuclear@0: opt=false nuclear@0: dbg=true nuclear@0: use_ft2=true nuclear@22: name=libdrawtext 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: --enable-freetype) nuclear@0: use_ft2=true nuclear@22: name=libdrawtext nuclear@0: ;; nuclear@0: --disable-freetype) nuclear@0: use_ft2=false nuclear@22: name=libdrawtext-noft nuclear@0: ;; nuclear@0: esac nuclear@3: shift nuclear@0: done nuclear@0: nuclear@22: echo "installation prefix: $prefix" nuclear@22: $use_ft2 && echo 'use freetype: yes' || echo 'use freetype: no' nuclear@22: $opt && echo 'optimizations: yes' || echo 'optimizations: no' nuclear@22: $dbg && echo 'debug symbols: yes' || echo 'debug symbols: no' nuclear@22: nuclear@22: echo "Configuring ${name}..." nuclear@0: nuclear@0: echo "# do not modify this file manually, it's generated by the configure script" >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: if $use_ft2; then nuclear@22: echo "name = $name" >>Makefile nuclear@0: echo 'ft2_cflags = `pkg-config --cflags freetype2`' >>Makefile nuclear@0: echo 'ft2_libs = `pkg-config --libs freetype2`' >>Makefile nuclear@0: else nuclear@22: echo "name = $name" >>Makefile nuclear@0: echo 'ft2_cflags = -DNO_FREETYPE' >>Makefile nuclear@0: fi nuclear@0: echo '# --- end of generated part, start of Makefile.in ---' >>Makefile nuclear@0: cat Makefile.in >>Makefile nuclear@0: nuclear@0: echo 'Done. Run make (or gmake) to compile.'