--- twemproxy-0.5.0/Makefile.am +++ patch/twemproxy-0.5.0/Makefile.am @@ -2,7 +2,7 @@ ACLOCAL_AMFLAGS = -I m4 -SUBDIRS = contrib src +SUBDIRS = src dist_man_MANS = man/nutcracker.8 --- twemproxy-0.5.0/configure.ac +++ patch/twemproxy-0.5.0/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 @@ -197,15 +205,8 @@ [AC_DEFINE([HAVE_STATS], [1], [Define to 1 if stats is not disabled])]) AC_MSG_RESULT($disable_stats) -# Untar the yaml-0.2.5 in contrib/ before config.status is rerun -AC_CONFIG_COMMANDS_PRE([tar xvfz contrib/yaml-0.2.5.tar.gz -C contrib]) - -# Call yaml-0.2.5 ./configure recursively -AC_CONFIG_SUBDIRS([contrib/yaml-0.2.5]) - # Define Makefiles AC_CONFIG_FILES([Makefile - contrib/Makefile src/Makefile src/hashkit/Makefile src/proto/Makefile --- twemproxy-0.5.0/src/Makefile.am +++ patch/twemproxy-0.5.0/src/Makefile.am @@ -22,7 +22,7 @@ AM_CFLAGS += -Wno-format-zero-length AM_LDFLAGS = -AM_LDFLAGS += -lm -lpthread -rdynamic +AM_LDFLAGS += -lm -lpthread -lyaml -rdynamic if OS_SOLARIS AM_LDFLAGS += -lnsl -lsocket endif @@ -58,7 +58,6 @@ 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.2.5/src/.libs/libyaml.a TESTS = test_all bin_PROGRAMS = test_all @@ -86,4 +85,3 @@ test_all_LDADD = $(top_builddir)/src/hashkit/libhashkit.a test_all_LDADD += $(top_builddir)/src/proto/libproto.a test_all_LDADD += $(top_builddir)/src/event/libevent.a -test_all_LDADD += $(top_builddir)/contrib/yaml-0.2.5/src/.libs/libyaml.a