summaryrefslogtreecommitdiff
path: root/external/curl/zlib.patch.0
blob: b8e242a3aaeab780a7dbba2ae8e9fd3247060edf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
--- configure
+++ configure
@@ -22808,7 +22808,6 @@
 clean_CPPFLAGS=$CPPFLAGS
 clean_LDFLAGS=$LDFLAGS
 clean_LIBS=$LIBS
-ZLIB_LIBS=""
 
 # Check whether --with-zlib was given.
 if test ${with_zlib+y}
@@ -22818,6 +22818,7 @@
 
 
 if test "$OPT_ZLIB" = "no" ; then
+    ZLIB_LIBS=""
     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: zlib disabled" >&5
 printf "%s\n" "$as_me: WARNING: zlib disabled" >&2;}
 else
@@ -22825,6 +825,21 @@
     OPT_ZLIB=""
   fi
 
+ if test -n "$ZLIB_CFLAGS$ZLIB_LIBS"; then
+  CPPFLAGS="$CPPFLAGS $ZLIB_CFLAGS"
+  LIBS="$ZLIB_LIBS $LIBS"
+  HAVE_LIBZ="1"
+
+
+$as_echo "#define HAVE_ZLIB_H 1" >>confdefs.h
+
+
+$as_echo "#define HAVE_LIBZ 1" >>confdefs.h
+
+  AMFIXLIB="1"
+ else
+  ZLIB_LIBS=""
+
   if test -z "$OPT_ZLIB" ; then
 
     if test -n "$PKG_CONFIG"; then
@@ -23120,6 +23120,7 @@
 printf "%s\n" "$as_me: found both libz and libz.h header" >&6;}
     curl_zlib_msg="enabled"
   fi
+ fi
 fi
 
  if test x"$AMFIXLIB" = x1; then
--- configure.ac
+++ configure.ac
@@ -1222,19 +1222,30 @@
 clean_CPPFLAGS=$CPPFLAGS
 clean_LDFLAGS=$LDFLAGS
 clean_LIBS=$LIBS
-ZLIB_LIBS=""
 AC_ARG_WITH(zlib,
 AS_HELP_STRING([--with-zlib=PATH],[search for zlib in PATH])
 AS_HELP_STRING([--without-zlib],[disable use of zlib]),
                [OPT_ZLIB="$withval"])
 
 if test "$OPT_ZLIB" = "no" ; then
+    ZLIB_LIBS=""
     AC_MSG_WARN([zlib disabled])
 else
   if test "$OPT_ZLIB" = "yes" ; then
     OPT_ZLIB=""
   fi
 
+ if test -n "$ZLIB_CFLAGS$ZLIB_LIBS"; then
+  CPPFLAGS="$CPPFLAGS $ZLIB_CFLAGS"
+  LIBS="$ZLIB_LIBS $LIBS"
+  HAVE_LIBZ="1"
+  AC_SUBST(HAVE_LIBZ)
+  AC_DEFINE(HAVE_ZLIB_H, 1, [if you have the zlib.h header file])
+  AC_DEFINE(HAVE_LIBZ, 1, [if zlib is available])
+  AMFIXLIB="1"
+ else
+  ZLIB_LIBS=""
+
   if test -z "$OPT_ZLIB" ; then
     CURL_CHECK_PKGCONFIG(zlib)
 
@@ -1316,6 +1316,7 @@
     AC_MSG_NOTICE([found both libz and libz.h header])
     curl_zlib_msg="enabled"
   fi
+ fi
 fi
 
 dnl set variable for use in automakefile(s)