Hi.

It's error that I caused by the recent update to zstd detection.
The patch fixes situation where zstd is missing and user doesn't provide
--with-zstd option.

Ready for master?
Thanks,
Martin

gcc/ChangeLog:

2020-03-25  Martin Liska  <mli...@suse.cz>

        PR lto/94259
        * configure.ac: Report error only when --with-zstd
        is used.
        * configure: Regenerate.
---
 gcc/configure    | 2 +-
 gcc/configure.ac | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)


diff --git a/gcc/configure b/gcc/configure
index b4231fe7b7e..dfdc5d8f75a 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -10019,7 +10019,7 @@ if test $gcc_cv_header_zstd_h = yes; then
 
 $as_echo "#define HAVE_ZSTD_H 1" >>confdefs.h
 
-else
+elif test "x$with_zstd" != x; then
     as_fn_error $? "Unable to find zstd.h.  See config.log for details." "$LINENO" 5
 fi
 
diff --git a/gcc/configure.ac b/gcc/configure.ac
index 0051963c85d..fdee9ea587c 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -1371,7 +1371,7 @@ 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
+elif test "x$with_zstd" != x; then
     as_fn_error $? "Unable to find zstd.h.  See config.log for details." "$LINENO" 5
 fi
 

Reply via email to