--- /dev/null
+#!/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.'