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.
parent c8504ebe
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> 2020-03-25 Jakub Jelinek <jakub@redhat.com>
PR middle-end/94303 PR middle-end/94303
......
...@@ -9962,13 +9962,15 @@ fi ...@@ -9962,13 +9962,15 @@ fi
case "x$with_zstd" in case "x$with_zstd" in
x) ;; x) ;;
xno) xno)
ZSTD_INCLUDE=no ZSTD_INCLUDE=
ZSTD_LIB=no ZSTD_LIB=
;; ;;
*) ZSTD_INCLUDE=$with_zstd/include *) ZSTD_INCLUDE=$with_zstd/include
ZSTD_LIB=$with_zstd/lib ZSTD_LIB=$with_zstd/lib
;; ;;
esac esac
if test "x$with_zstd" != xno; then
if test "x$with_zstd_include" != x; then if test "x$with_zstd_include" != x; then
ZSTD_INCLUDE=$with_zstd_include ZSTD_INCLUDE=$with_zstd_include
fi fi
...@@ -10017,6 +10019,8 @@ if test $gcc_cv_header_zstd_h = yes; then ...@@ -10017,6 +10019,8 @@ if test $gcc_cv_header_zstd_h = yes; then
$as_echo "#define HAVE_ZSTD_H 1" >>confdefs.h $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 fi
# LTO can use zstd compression algorithm # LTO can use zstd compression algorithm
...@@ -10081,6 +10085,7 @@ fi ...@@ -10081,6 +10085,7 @@ fi
ZSTD_LIB="$LIBS" ZSTD_LIB="$LIBS"
LIBS="$save_LIBS" LIBS="$save_LIBS"
fi
...@@ -18980,7 +18985,7 @@ else ...@@ -18980,7 +18985,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF cat > conftest.$ac_ext <<_LT_EOF
#line 18983 "configure" #line 18988 "configure"
#include "confdefs.h" #include "confdefs.h"
#if HAVE_DLFCN_H #if HAVE_DLFCN_H
...@@ -19086,7 +19091,7 @@ else ...@@ -19086,7 +19091,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF cat > conftest.$ac_ext <<_LT_EOF
#line 19089 "configure" #line 19094 "configure"
#include "confdefs.h" #include "confdefs.h"
#if HAVE_DLFCN_H #if HAVE_DLFCN_H
......
...@@ -1334,13 +1334,15 @@ AC_ARG_WITH(zstd-lib, ...@@ -1334,13 +1334,15 @@ AC_ARG_WITH(zstd-lib,
case "x$with_zstd" in case "x$with_zstd" in
x) ;; x) ;;
xno) xno)
ZSTD_INCLUDE=no ZSTD_INCLUDE=
ZSTD_LIB=no ZSTD_LIB=
;; ;;
*) ZSTD_INCLUDE=$with_zstd/include *) ZSTD_INCLUDE=$with_zstd/include
ZSTD_LIB=$with_zstd/lib ZSTD_LIB=$with_zstd/lib
;; ;;
esac esac
if test "x$with_zstd" != xno; then
if test "x$with_zstd_include" != x; then if test "x$with_zstd_include" != x; then
ZSTD_INCLUDE=$with_zstd_include ZSTD_INCLUDE=$with_zstd_include
fi fi
...@@ -1369,6 +1371,8 @@ AC_MSG_RESULT($gcc_cv_header_zstd_h) ...@@ -1369,6 +1371,8 @@ AC_MSG_RESULT($gcc_cv_header_zstd_h)
if test $gcc_cv_header_zstd_h = yes; then if test $gcc_cv_header_zstd_h = yes; then
AC_DEFINE(HAVE_ZSTD_H, 1, AC_DEFINE(HAVE_ZSTD_H, 1,
[Define if you have a working <zstd.h> header file.]) [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 fi
# LTO can use zstd compression algorithm # LTO can use zstd compression algorithm
...@@ -1378,6 +1382,7 @@ AC_SEARCH_LIBS(ZSTD_compress, zstd) ...@@ -1378,6 +1382,7 @@ AC_SEARCH_LIBS(ZSTD_compress, zstd)
ZSTD_LIB="$LIBS" ZSTD_LIB="$LIBS"
LIBS="$save_LIBS" LIBS="$save_LIBS"
AC_SUBST(ZSTD_LIB) AC_SUBST(ZSTD_LIB)
fi
dnl Disabled until we have a complete test for buggy enum bitfields. dnl Disabled until we have a complete test for buggy enum bitfields.
dnl gcc_AC_C_ENUM_BF_UNSIGNED dnl gcc_AC_C_ENUM_BF_UNSIGNED
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment