From a3be6fe2d98c696386e74d75342d0eaee88acc38 Mon Sep 17 00:00:00 2001 From: Shane Bryldt Date: Thu, 28 Sep 2017 17:40:01 -0500 Subject: [PATCH] FS-10690: First updates to support civetweb on linux --- libs/libblade/Makefile.am | 13 +++++++++++-- libs/libblade/configure.ac | 19 +++++++++++++++++++ 2 files changed, 30 insertions(+), 2 deletions(-) diff --git a/libs/libblade/Makefile.am b/libs/libblade/Makefile.am index 0943a67676..d3f090579c 100644 --- a/libs/libblade/Makefile.am +++ b/libs/libblade/Makefile.am @@ -3,8 +3,12 @@ EXTRA_DIST = SUBDIRS = . test switchblade AUTOMAKE_OPTIONS = subdir-objects -AM_CFLAGS += -I$(top_srcdir)/src -I$(top_srcdir)/src/include -I$(top_srcdir)/../civetweb-1.9.1/include -AM_LDFLAGS += -L$(top_srcdir)/../civetweb-1.9.1 +CIVETWEB_VERSION=1.9.1 +CIVETWEB=civetweb-$(CIVETWEB_VERSION) +CIVETWEB_DIR=$(top_srcdir)/../$(CIVETWEB) + +AM_CFLAGS += -I$(top_srcdir)/src -I$(top_srcdir)/src/include -I$(CIVETWEB_DIR)/include +AM_LDFLAGS += -L$(CIVETWEB_DIR) noinst_LTLIBRARIES = libunqlite.la libunqlite_la_SOURCES = src/unqlite.c @@ -32,6 +36,11 @@ 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_DIR) + +$(CIVETWEB_DIR): + $(GETLIB) $(CIVETWEB).tar.gz + tests: libblade.la $(MAKE) -C test tests diff --git a/libs/libblade/configure.ac b/libs/libblade/configure.ac index 8437ccdd49..80d9c55872 100644 --- a/libs/libblade/configure.ac +++ b/libs/libblade/configure.ac @@ -20,6 +20,24 @@ blade_builddir=`pwd` AC_SUBST(blade_srcdir) AC_SUBST(blade_builddir) +case $host in + *-openbsd*) + # OpenBSD's gunzip and friends don't like -d because its redundant, only gzip does + AC_PATH_PROGS(ZCAT, gzip) + ;; + *) + AC_PATH_PROGS(ZCAT, gunzip gzcat gzip zcat) + ;; +esac + +AC_PATH_PROGS(BZIP, bzip2) +AC_PATH_PROGS(XZ, xz) +AC_PATH_PROGS(TAR, gtar tar) +AC_PATH_PROGS(WGET, wget) +AC_PATH_PROGS(CURL, curl) +GETLIB="cd $blade_builddir/.. && ${SHELL} $blade_builddir/../../build/getlib.sh" +AC_SUBST(GETLIB) + # Checks for programs. AC_PROG_CC AC_PROG_MAKE_SET @@ -277,6 +295,7 @@ AC_CONFIG_FILES([Makefile test/Makefile switchblade/Makefile libblade.pc + ../../build/getlib.sh ]) AC_OUTPUT