X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?p=assman;a=blobdiff_plain;f=configure;fp=configure;h=e817eb65ab3412d192b620dc67d26c69165e6574;hp=0000000000000000000000000000000000000000;hb=0a40e599114ea4b136601e5ba467eb0f8b48a839;hpb=53025831f330bce574a82d7be44ef2c4fcb46b77 diff --git a/configure b/configure new file mode 100755 index 0000000..e817eb6 --- /dev/null +++ b/configure @@ -0,0 +1,53 @@ +#!/bin/sh + +prefix=/usr/local +opt=false +dbg=true +build_mod_url=true + +while [ $# != 0 ]; do + case $1 in + --prefix=*) + prefix=`echo $1 | sed 's/^--prefix=//'` + ;; + --enable-opt) + opt=true + ;; + --disable-opt) + opt=false + ;; + --enable-dbg) + dbg=true + ;; + --disable-dbg) + dbg=false + ;; + --enable-url) + build_mod_url=true + ;; + --disable-url) + build_mod_url=false + ;; + esac + shift +done + +echo "installation prefix: $prefix" +$build_mod_url && echo 'build mod_url: yes' || echo 'build mod_url: no' +$opt && echo 'optimizations: yes' || echo 'optimizations: no' +$dbg && echo 'debug symbols: yes' || echo 'debug symbols: no' + +echo "Configuring assman..." + +echo "# do not modify this file manually, it's generated by the configure script" >Makefile +echo "PREFIX = $prefix" >>Makefile +$opt && echo '-O3' | xargs echo 'opt =' >>Makefile +$dbg && echo '-g' | xargs echo 'dbg =' >>Makefile +if $build_mod_url; then + echo 'mod_url_cflags = -DBUILD_MOD_URL' >>Makefile + echo 'mod_url_libs = -lcurl -lpthread' >>Makefile +fi +echo '# --- end of generated part, start of Makefile.in ---' >>Makefile +cat Makefile.in >>Makefile + +echo 'Done. Run make (or gmake) to compile.'