Skip to contentSkip to conversation

[5456] Add a configure check for zlib (Ryota OZAKI).

Qemu-devel Andrzej Zaborowski 1 participant 1 message Oct 11, 2008

lore
Share & tools
lore
#0 lore raw

Revision: 5456

          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5456
Author:   balrog
Date:     2008-10-11 09:56:04 +0000 (Sat, 11 Oct 2008)

Log Message:
-----------
Add a configure check for zlib (Ryota OZAKI).

This patch makes configure check zlib devel files installed. Current configure doesn't check that, so make will fail if they are not installed.

Modified Paths:
--------------
trunk/configure

Modified: trunk/configure
===================================================================

configure +17 -0
@@ -716,6 +716,23 @@
 fi
 
 ##########################################
+# zlib check
+
+cat > $TMPC << EOF
+#include <zlib.h>
+int main(void) { zlibVersion(); return 0; }
+EOF
+if $cc $CFLAGS $LDFLAGS -o $TMPE $TMPC -lz 2> /dev/null ; then
+    :
+else
+    echo
+    echo "Error: zlib check failed"
+    echo "Make sure to have the zlib libs and headers installed."
+    echo
+    exit 1
+fi
+
+##########################################
 # SDL probe
 
 sdl_too_old=no