]> git.notmuchmail.org Git - notmuch/blobdiff - configure
Fix option parsing for the case of a value with '='.
[notmuch] / configure
index fd194ab039609ca7c999ad39389bf230735d14ce..54d55cbacf79acaaa2609afe104b2cfe4e33914d 100755 (executable)
--- a/configure
+++ b/configure
@@ -3,6 +3,16 @@
 CC=${CC:-gcc}
 CXX=${CXX:-g++}
 
+# defaults
+PREFIX=/usr/local
+
+# option parsing
+for option; do
+    if [ "${option%%=*}" = '--prefix' ] ; then
+       PREFIX="${option#*=}"
+    fi
+done
+
 cat <<EOF
 Welcome to Notmuch, a system for indexing, searching and tagging your email.
 
@@ -186,7 +196,7 @@ CC = ${CC}
 CXX = ${CXX}
 
 # The prefix to which notmuch should be installed
-prefix = /usr/local
+prefix = ${PREFIX}
 
 # The directory to which emacs lisp files should be installed
 emacs_lispdir=${emacs_lispdir}