]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
Silence zlib detection routine
authorcyan4973 <yann.collet.73@gmail.com>
Sun, 5 Feb 2017 07:36:12 +0000 (23:36 -0800)
committercyan4973 <yann.collet.73@gmail.com>
Sun, 5 Feb 2017 07:36:12 +0000 (23:36 -0800)
When it fails, $(CC) sends error message into stderr
redirected to /dev/null

programs/Makefile

index 9746ec4ed6944e790090e86c223d54ffa3cc8265..599bef694d60f73bb8deb598269076c772015de9 100644 (file)
@@ -67,7 +67,7 @@ endif
 
 # zlib detection
 VOID = /dev/null
-HAVE_ZLIB := $(shell echo "int main(){}" | $(CC) -o $(VOID) -x c - -lz && echo 1 || echo 0)
+HAVE_ZLIB := $(shell echo "int main(){}" | $(CC) -o $(VOID) -x c - -lz 2> $(VOID) && echo 1 || echo 0)
 ifeq ($(HAVE_ZLIB), 1)
 ZLIBCPP = -DZSTD_GZDECOMPRESS
 ZLIBLD = -lz