]> rtime.felk.cvut.cz Git - notmuch.git/commitdiff
configure: add set -u
authorTomi Ollila <tomi.ollila@iki.fi>
Fri, 6 May 2016 18:11:25 +0000 (21:11 +0300)
committerDavid Bremner <david@tethera.net>
Sat, 7 May 2016 17:40:14 +0000 (14:40 -0300)
In case of any unset variable, make ./configure exit with nonzero value;
an attempt to expand an unset variable is a bug in the script
(usually a spelling mistake) and those should not pass through
unnoticed.

configure

index 49fc7391cc19294c5ded75653407a134327916c5..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 "
@@ -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