+2020-03-25 Martin Liska <mliska@suse.cz>
+
+ PR lto/94259
+ * configure.ac: Respect --without-zstd and report
+ error when we can't find header file with --with-zstd.
+ * configure: Regenerate.
+
2020-03-25 Jakub Jelinek <jakub@redhat.com>
PR middle-end/94303
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
$as_echo "#define HAVE_ZSTD_H 1" >>confdefs.h
+else
+ as_fn_error $? "Unable to find zstd.h. See config.log for details." "$LINENO" 5
fi
# LTO can use zstd compression algorithm
ZSTD_LIB="$LIBS"
LIBS="$save_LIBS"
+fi
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 18983 "configure"
+#line 18988 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 19089 "configure"
+#line 19094 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
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
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
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