summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorAmmar Faizi <ammarfaizi2@gnuweeb.org>2022-04-01 14:07:43 +0300
committerAmmar Faizi <ammarfaizi2@gnuweeb.org>2022-04-01 23:23:02 +0700
commit30830bddbfbe9503836bdcb3ed90ec3f945d122d (patch)
tree0102dd2d49fa94c988904c53158cb9d560d85fd8 /configure
parent3b52ae980c41b420592e3005199041890a56d6dc (diff)
downloadliburing-30830bddbfbe9503836bdcb3ed90ec3f945d122d.tar.gz
liburing-30830bddbfbe9503836bdcb3ed90ec3f945d122d.tar.bz2
configure: Allow the configure script to fail with a non-zero exit code
For poorly configured environments, configure may fail but will still exit with code 0. This, in turn, causes cryptic build errors later. Fix this by adding "set -e". Also, append "|| true" to prevent the `expr` command breaks because it will return a non-zero exit code if the regex doesn't match. Closes: https://github.com/axboe/liburing/pull/553 Co-authored-by: Roman Gershman <romange@gmail.com> Signed-off-by: Roman Gershman <romange@gmail.com> Signed-off-by: Ammar Faizi <ammarfaizi2@gnuweeb.org>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure4
1 files changed, 3 insertions, 1 deletions
diff --git a/configure b/configure
index 512a556..f2bf041 100755
--- a/configure
+++ b/configure
@@ -1,10 +1,12 @@
#!/bin/sh
+set -e
+
cc=${CC:-gcc}
cxx=${CXX:-g++}
for opt do
- optarg=$(expr "x$opt" : 'x[^=]*=\(.*\)')
+ optarg=$(expr "x$opt" : 'x[^=]*=\(.*\)' || true)
case "$opt" in
--help|-h) show_help=yes
;;