1 #!/bin/sh -x 2 3 configureOpts="" 4 5 while getopts ":hd" opt; do 6 case ${opt} in 7 h ) echo "Use -d to turn on sanitizers (for debugging only)" 8 exit;; 9 d ) configureOpts="--enable-debug" 10 ;; 11 \? ) echo "Usage: $0 [-h] [-d]" 12 exit;; 13 esac 14 done 15 16 configureOpts="${configureOpts} --prefix=/usr --sysconfdir=/etc" 17 18 autoreconf -fiv 19 20 BUILD_DIR=build/ 21 rm -rf $BUILD_DIR 22 mkdir -vp $BUILD_DIR 23 cd $BUILD_DIR || { echo "cd $BUILD_DIR"; exit 127; } 24 25 ../configure ${configureOpts} 26 27 make
