From: Martin Liska Date: Wed, 25 Mar 2020 10:01:43 +0000 (+0100) Subject: Fix handling of --with{,out}-zstd option. X-Git-Tag: upstream/12.2.0~17661 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0fb0240a051df91d3c24385d1d3c17548b266544;p=platform%2Fupstream%2Fgcc.git 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. --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 3a1bfce..89cfb07 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2020-03-25 Martin Liska + + 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 PR middle-end/94303 diff --git a/gcc/configure b/gcc/configure index 5381e10..b4231fe 100755 --- a/gcc/configure +++ b/gcc/configure @@ -9962,13 +9962,15 @@ fi 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 @@ -10017,6 +10019,8 @@ if test $gcc_cv_header_zstd_h = yes; then $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 @@ -10081,6 +10085,7 @@ fi ZSTD_LIB="$LIBS" LIBS="$save_LIBS" +fi @@ -18980,7 +18985,7 @@ else 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 @@ -19086,7 +19091,7 @@ else 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 diff --git a/gcc/configure.ac b/gcc/configure.ac index 0d6230e..0051963 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 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