]> git.notmuchmail.org Git - notmuch/blobdiff - configure
configure: add set -u
[notmuch] / configure
index 6231d2b7ed2b26f241b2afa63efdcae0ad9bf2b4..c24a9c8589250bac6dcc76a7750928573441e43d 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,5 +1,7 @@
 #! /bin/sh
 
+set -u
+
 # Test whether this shell is capable of parameter substring processing.
 ( option='a/b'; : ${option#*/} ) 2>/dev/null || {
     echo "
@@ -380,7 +382,7 @@ int main(int argc, char** argv) {
    Xapian::WritableDatabase db("test.db",Xapian::DB_CREATE_OR_OPEN);
 }
 EOF
-    ${CXX} ${CXXLAGS} ${xapian_cxxflags} _default_backend.cc -o _default_backend ${xapian_ldflags}
+    ${CXX} ${CXXFLAGS_for_sh} ${xapian_cxxflags} _default_backend.cc -o _default_backend ${xapian_ldflags}
     ./_default_backend
     if [ -f test.db/iamglass ]; then
        default_xapian_backend=glass
@@ -480,6 +482,7 @@ if pkg-config --exists valgrind; then
 else
     printf "No (but that's fine).\n"
     have_valgrind=0
+    valgrind_cflags=
 fi
 
 printf "Checking for bash-completion (>= 1.90)... "
@@ -490,11 +493,11 @@ else
     WITH_BASH=0
 fi
 
-if [ -z "${EMACSLISPDIR}" ]; then
+if [ -z "${EMACSLISPDIR-}" ]; then
     EMACSLISPDIR="\$(prefix)/share/emacs/site-lisp"
 fi
 
-if [ -z "${EMACSETCDIR}" ]; then
+if [ -z "${EMACSETCDIR-}" ]; then
     EMACSETCDIR="\$(prefix)/share/emacs/site-lisp"
 fi