mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 07:04:22 +01:00
configure: refuse to create config.vars without any database.
We alter the script to do the move to config.vars right at the end, which is probably a good idea anyway. Fixes: #4054 Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
21
configure
vendored
21
configure
vendored
@@ -165,7 +165,7 @@ add_var()
|
|||||||
else
|
else
|
||||||
echo "$1 not found"
|
echo "$1 not found"
|
||||||
fi
|
fi
|
||||||
echo "$1=$2" >> $CONFIG_VAR_FILE
|
echo "$1=$2" >> $CONFIG_VAR_FILE.$$
|
||||||
[ -z "$3" ] || echo "#define $1 $2" >> "$3"
|
[ -z "$3" ] || echo "#define $1 $2" >> "$3"
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -364,13 +364,11 @@ else
|
|||||||
HAVE_PYTHON3_MAKO=0
|
HAVE_PYTHON3_MAKO=0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
mv $CONFIG_VAR_FILE.$$ $CONFIG_VAR_FILE
|
|
||||||
|
|
||||||
# Now we can finally set our warning flags
|
# Now we can finally set our warning flags
|
||||||
if [ -z ${CWARNFLAGS+x} ]; then
|
if [ -z ${CWARNFLAGS+x} ]; then
|
||||||
CWARNFLAGS=$(default_cwarnflags "$COPTFLAGS" \
|
CWARNFLAGS=$(default_cwarnflags "$COPTFLAGS" \
|
||||||
$(sed -n 's/^HAVE_GCC=//p' < $CONFIG_VAR_FILE) \
|
$(sed -n 's/^HAVE_GCC=//p' < $CONFIG_VAR_FILE.$$) \
|
||||||
$(sed -n 's/^HAVE_MODERN_GCC=//p' < $CONFIG_VAR_FILE) )
|
$(sed -n 's/^HAVE_MODERN_GCC=//p' < $CONFIG_VAR_FILE.$$) )
|
||||||
fi
|
fi
|
||||||
|
|
||||||
add_var PREFIX "$PREFIX"
|
add_var PREFIX "$PREFIX"
|
||||||
@@ -396,3 +394,16 @@ add_var HAVE_PYTHON3_MAKO "$HAVE_PYTHON3_MAKO"
|
|||||||
# Hack to avoid sha256 name clash with libwally: will be fixed when that
|
# Hack to avoid sha256 name clash with libwally: will be fixed when that
|
||||||
# becomes a standalone shared lib.
|
# becomes a standalone shared lib.
|
||||||
echo '#include "ccan_compat.h"' >> $CONFIG_HEADER
|
echo '#include "ccan_compat.h"' >> $CONFIG_HEADER
|
||||||
|
|
||||||
|
# Now we set them all and check.
|
||||||
|
while IFS='=' read VAR VAL; do
|
||||||
|
eval $VAR=\"$VAL\"
|
||||||
|
done < $CONFIG_VAR_FILE.$$
|
||||||
|
|
||||||
|
if [ "$HAVE_SQLITE3" = 0 -a "$HAVE_POSTGRES" = 0 ]; then
|
||||||
|
# I have no database yet I must schema!)
|
||||||
|
echo "*** We need a database, but neither sqlite3 nor postgres found" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
mv $CONFIG_VAR_FILE.$$ $CONFIG_VAR_FILE
|
||||||
|
|||||||
Reference in New Issue
Block a user