aboutsummaryrefslogtreecommitdiffstats
path: root/testing/twemproxy/use-system-libyaml.patch
blob: e3ec54a15a4e7f38c43545c5119c30f08bf0396c (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
--- twemproxy-0.4.1/Makefile.am
+++ twemproxy/src/twemproxy-0.4.1/Makefile.am
@@ -2,7 +2,7 @@
 
 ACLOCAL_AMFLAGS = -I m4
 
-SUBDIRS = contrib src
+SUBDIRS = src
 
 dist_man_MANS = man/nutcracker.8
 
--- twemproxy-0.4.1/configure.ac
+++ twemproxy/src/twemproxy-0.4.1/configure.ac
@@ -75,6 +75,14 @@
 # Checks for libraries
 AC_CHECK_LIB([m], [pow])
 AC_CHECK_LIB([pthread], [pthread_create])
+AC_CHECK_LIB([yaml], [yaml_get_version_string],,LIBYAML="no")
+if test "$LIBYAML" = "no"; then
+    echo
+    echo "	Error: libyaml library not found."
+    echo "	Run apk add yaml-dev"
+    echo
+    exit 1
+fi
 
 # Checks for library functions
 AC_FUNC_FORK
@@ -196,15 +204,8 @@
   [AC_DEFINE([HAVE_STATS], [1], [Define to 1 if stats is not disabled])])
 AC_MSG_RESULT($disable_stats)
 
-# Untar the yaml-0.1.4 in contrib/ before config.status is rerun
-AC_CONFIG_COMMANDS_PRE([tar xvfz contrib/yaml-0.1.4.tar.gz -C contrib])
-
-# Call yaml-0.1.4 ./configure recursively
-AC_CONFIG_SUBDIRS([contrib/yaml-0.1.4])
-
 # Define Makefiles
 AC_CONFIG_FILES([Makefile
-                 contrib/Makefile
                  src/Makefile
                  src/hashkit/Makefile
                  src/proto/Makefile
--- twemproxy-0.4.1/src/Makefile.am
+++ twemproxy/src/twemproxy-0.4.1/src/Makefile.am
@@ -21,7 +21,7 @@
 AM_CFLAGS += -Wstrict-prototypes -Wmissing-prototypes -Wredundant-decls -Wmissing-declarations
 
 AM_LDFLAGS =
-AM_LDFLAGS += -lm -lpthread -rdynamic
+AM_LDFLAGS += -lm -lpthread -lyaml -rdynamic
 if OS_SOLARIS
 AM_LDFLAGS += -lnsl -lsocket
 endif
@@ -57,4 +57,3 @@
 nutcracker_LDADD = $(top_builddir)/src/hashkit/libhashkit.a
 nutcracker_LDADD += $(top_builddir)/src/proto/libproto.a
 nutcracker_LDADD += $(top_builddir)/src/event/libevent.a
-nutcracker_LDADD += $(top_builddir)/contrib/yaml-0.1.4/src/.libs/libyaml.a