summaryrefslogtreecommitdiff
path: root/gcc/configure.ac
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2020-03-25 11:01:43 +0100
committerMartin Liska <mliska@suse.cz>2020-03-25 11:01:43 +0100
commit0fb0240a051df91d3c24385d1d3c17548b266544 (patch)
tree00a0591a682315130375ec33687766295037c387 /gcc/configure.ac
parentc8504ebef1d6a799600b8e5d255c704b7b3aa19c (diff)
Fix handling of --with{,out}-zstd option.
PR lto/94259 * configure.ac: Respect --without-zstd and report error when we can't find header file with --with-zstd. * configure: Regenerate.
Diffstat (limited to 'gcc/configure.ac')
-rw-r--r--gcc/configure.ac9
1 files changed, 7 insertions, 2 deletions
diff --git a/gcc/configure.ac b/gcc/configure.ac
index 0d6230e0ca1..0051963c85d 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -1334,13 +1334,15 @@ AC_ARG_WITH(zstd-lib,
case "x$with_zstd" in
x) ;;
xno)
- ZSTD_INCLUDE=no
- ZSTD_LIB=no
+ ZSTD_INCLUDE=
+ ZSTD_LIB=
;;
*) ZSTD_INCLUDE=$with_zstd/include
ZSTD_LIB=$with_zstd/lib
;;
esac
+
+if test "x$with_zstd" != xno; then
if test "x$with_zstd_include" != x; then
ZSTD_INCLUDE=$with_zstd_include
fi
@@ -1369,6 +1371,8 @@ AC_MSG_RESULT($gcc_cv_header_zstd_h)
if test $gcc_cv_header_zstd_h = yes; then
AC_DEFINE(HAVE_ZSTD_H, 1,
[Define if you have a working <zstd.h> header file.])
+else
+ as_fn_error $? "Unable to find zstd.h. See config.log for details." "$LINENO" 5
fi
# LTO can use zstd compression algorithm
@@ -1378,6 +1382,7 @@ AC_SEARCH_LIBS(ZSTD_compress, zstd)
ZSTD_LIB="$LIBS"
LIBS="$save_LIBS"
AC_SUBST(ZSTD_LIB)
+fi
dnl Disabled until we have a complete test for buggy enum bitfields.
dnl gcc_AC_C_ENUM_BF_UNSIGNED