configure: fix defaults in help.

Both "[ 1 ]" and "[ 0 ]" both evaluate true in shell; we really want
an explicit '1' test.

Before:
$ ./configure --help
...
  --enable/disable-compat (default disable)

After:
$ ./configure --help
...
  --enable/disable-compat (default enable)

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell 2018-06-14 11:44:14 +09:30 committed by Christian Decker
parent 361ed8675a
commit 6a73c7eeb1

6
configure vendored
View file

@ -19,10 +19,10 @@ CONFIG_HEADER=ccan/config.h
usage_with_default() usage_with_default()
{ {
if [ $# = 4 ]; then if [ $# = 4 ]; then
if [ $2 ]; then if [ "$2" = 1 ]; then
DEF=$4
else
DEF=$3 DEF=$3
else
DEF=$4
fi fi
else else
DEF=$2 DEF=$2