From 2bead55cd2322021267274fac294597dd04f0081 Mon Sep 17 00:00:00 2001 From: Andrey Volk Date: Fri, 29 Sep 2017 16:09:30 +0300 Subject: [PATCH] FS-10690: [Build-System] Compile libks within libblade. --- libs/libblade/Makefile.am | 9 +++++++-- libs/libblade/configure.ac | 2 +- libs/libblade/switchblade/Makefile.am | 4 ++-- libs/libblade/test/Makefile.am | 4 ++-- 4 files changed, 12 insertions(+), 7 deletions(-) diff --git a/libs/libblade/Makefile.am b/libs/libblade/Makefile.am index 6cd793d95c..5c5b39e6e5 100644 --- a/libs/libblade/Makefile.am +++ b/libs/libblade/Makefile.am @@ -7,8 +7,10 @@ CIVETWEB_VERSION=1.9.1 CIVETWEB=civetweb-$(CIVETWEB_VERSION) CIVETWEB_DIR=$(top_srcdir)/../$(CIVETWEB) CIVETWEB_LIB=$(top_srcdir)/../$(CIVETWEB)/libcivetweb.a +LIBKS_DIR=$(top_srcdir)/../libks +LIBKS=$(LIBKS_DIR)/libks.la -AM_CFLAGS += -I$(top_srcdir)/src -I$(top_srcdir)/src/include -I$(CIVETWEB_DIR)/include +AM_CFLAGS += -I$(top_srcdir)/src -I$(top_srcdir)/src/include -I$(CIVETWEB_DIR)/include -I$(LIBKS_DIR)/src/include AM_LDFLAGS += -L$(CIVETWEB_DIR) noinst_LTLIBRARIES = libunqlite.la @@ -37,7 +39,7 @@ library_include_HEADERS += src/include/blade_protocol.h src/include/blade_subscr library_include_HEADERS += src/include/blade_transport.h src/include/blade_transport_wss.h library_include_HEADERS += src/include/unqlite.h test/tap.h -BUILT_SOURCES=$(CIVETWEB_LIB) +BUILT_SOURCES=$(CIVETWEB_LIB) $(LIBKS) $(CIVETWEB_LIB): $(CIVETWEB_DIR) cd $(CIVETWEB_DIR) && $(MAKE) lib USE_STACK_SIZE=102400 MAX_REQUEST_SIZE=16384 WITH_LUA=1 LUA_COMPAT_ALL=1 USE_LUA_SQLITE3=1 USE_LUA_FILE_SYSTEM=1 WITH_IPV6=1 WITH_WEBSOCKET=1 && $(MAKE) lib USE_STACK_SIZE=102400 MAX_REQUEST_SIZE=16384 WITH_LUA=1 LUA_COMPAT_ALL=1 USE_LUA_SQLITE3=1 USE_LUA_FILE_SYSTEM=1 WITH_IPV6=1 WITH_WEBSOCKET=1 WITH_DUKTAPE=1 @@ -45,6 +47,9 @@ $(CIVETWEB_LIB): $(CIVETWEB_DIR) $(CIVETWEB_DIR): $(GETLIB) $(CIVETWEB).tar.gz +$(LIBKS): + cd $(top_srcdir)/../libks && /bin/sh ./bootstrap.sh && /bin/sh ./configure && $(MAKE) + tests: libblade.la $(MAKE) -C test tests diff --git a/libs/libblade/configure.ac b/libs/libblade/configure.ac index 80d9c55872..c19b7e7f98 100644 --- a/libs/libblade/configure.ac +++ b/libs/libblade/configure.ac @@ -280,7 +280,7 @@ if test "${LIBKS_CFLAGS}" = ""; then AC_MSG_WARN([local development version of libks is being used. This is probably not portable.]) LIBKS_CFLAGS="-I`pwd`/../libks/src/include" LIBKS_LIBS="-L`pwd`/../libks/.libs/ -lks", - AC_MSG_ERROR([libks cannot be found. Fatal Error])) + AC_MSG_WARN([libks cannot be found.])) fi AM_CPPFLAGS="-I./src -I./src/include ${LIBKS_CFLAGS} ${openssl_CFLAGS} ${SODIUM_CFLAGS}" diff --git a/libs/libblade/switchblade/Makefile.am b/libs/libblade/switchblade/Makefile.am index 5c6be0e6ba..312c0b2e47 100644 --- a/libs/libblade/switchblade/Makefile.am +++ b/libs/libblade/switchblade/Makefile.am @@ -1,5 +1,5 @@ -AM_CFLAGS += -I$(abs_top_srcdir)/src/include -g -ggdb -O0 -I$(top_srcdir)/../civetweb-1.9.1/include -TEST_LDADD = $(abs_top_builddir)/libblade.la -L$(top_srcdir)/../civetweb-1.9.1 -lconfig -lm -lpthread -lcivetweb +AM_CFLAGS += -I$(abs_top_srcdir)/src/include -g -ggdb -O0 -I$(top_srcdir)/../civetweb-1.9.1/include -I$(top_srcdir)/../libks/src/include +TEST_LDADD = $(abs_top_builddir)/libblade.la -L$(top_srcdir)/../civetweb-1.9.1 -L$(top_srcdir)/../libks -lconfig -lm -lpthread -lcivetweb -lks check_PROGRAMS = diff --git a/libs/libblade/test/Makefile.am b/libs/libblade/test/Makefile.am index 8218b74572..430c318552 100644 --- a/libs/libblade/test/Makefile.am +++ b/libs/libblade/test/Makefile.am @@ -1,5 +1,5 @@ -AM_CFLAGS += -I$(abs_top_srcdir)/src/include -g -ggdb -O0 -I$(top_srcdir)/../civetweb-1.9.1/include -TEST_LDADD = $(abs_top_builddir)/libblade.la -L$(top_srcdir)/../civetweb-1.9.1 -lconfig -lm -lpthread -lcivetweb +AM_CFLAGS += -I$(abs_top_srcdir)/src/include -g -ggdb -O0 -I$(top_srcdir)/../civetweb-1.9.1/include -I$(top_srcdir)/../libks/src/include +TEST_LDADD = $(abs_top_builddir)/libblade.la -L$(top_srcdir)/../civetweb-1.9.1 -L$(top_srcdir)/../libks -lconfig -lm -lpthread -lcivetweb -lks check_PROGRAMS =