|
@@ -2,11 +2,15 @@
|
|
|
include $(top_srcdir)/aminclude.am
|
|
|
|
|
|
AUTOMAKE_OPTIONS = serial-tests
|
|
|
-AM_CPPFLAGS = -I${srcdir}/include -I${srcdir}/tests -I${srcdir}/generated
|
|
|
+if SOLARIS
|
|
|
+ SOLARIS_CPPFLAGS = -D_POSIX_PTHREAD_SEMANTICS
|
|
|
+ SOLARIS_LIB_LDFLAGS = -lnsl -lsocket
|
|
|
+endif
|
|
|
+AM_CPPFLAGS = -I${srcdir}/include -I${srcdir}/tests -I${srcdir}/generated $(SOLARIS_CPPFLAGS)
|
|
|
AM_CFLAGS = -Wall -Werror -Wdeclaration-after-statement
|
|
|
AM_CXXFLAGS = -Wall $(USEIPV6)
|
|
|
|
|
|
-LIB_LDFLAGS = -no-undefined -version-info 2
|
|
|
+LIB_LDFLAGS = -no-undefined -version-info 2 $(SOLARIS_LIB_LDFLAGS)
|
|
|
|
|
|
pkginclude_HEADERS = include/zookeeper.h include/zookeeper_version.h include/zookeeper_log.h include/proto.h include/recordio.h generated/zookeeper.jute.h
|
|
|
EXTRA_DIST=LICENSE
|
|
@@ -98,23 +102,33 @@ TEST_SOURCES = \
|
|
|
tests/TestReadOnlyClient.cc \
|
|
|
$(NULL)
|
|
|
|
|
|
-SYMBOL_WRAPPERS=$(shell cat ${srcdir}/tests/wrappers.opt)
|
|
|
+if SOLARIS
|
|
|
+ SHELL_SYMBOL_WRAPPERS = cat ${srcdir}/tests/wrappers.opt
|
|
|
+ SYMBOL_WRAPPERS=$(SHELL_SYMBOL_WRAPPERS:sh)
|
|
|
+else
|
|
|
+ SYMBOL_WRAPPERS=$(shell cat ${srcdir}/tests/wrappers.opt)
|
|
|
+endif
|
|
|
|
|
|
check_PROGRAMS = zktest-st
|
|
|
TESTS_ENVIRONMENT = ZKROOT=${srcdir}/../.. \
|
|
|
CLASSPATH=$$CLASSPATH:$$CLOVER_HOME/lib/clover.jar
|
|
|
nodist_zktest_st_SOURCES = $(TEST_SOURCES)
|
|
|
zktest_st_LDADD = libzkst.la libhashtable.la $(CPPUNIT_LIBS)
|
|
|
-zktest_st_CXXFLAGS = -DUSE_STATIC_LIB $(CPPUNIT_CFLAGS) $(USEIPV6)
|
|
|
-zktest_st_LDFLAGS = -static-libtool-libs $(SYMBOL_WRAPPERS)
|
|
|
+zktest_st_CXXFLAGS = -DUSE_STATIC_LIB $(CPPUNIT_CFLAGS) $(USEIPV6) $(SOLARIS_CPPFLAGS)
|
|
|
+zktest_st_LDFLAGS = -static-libtool-libs $(SYMBOL_WRAPPERS) $(SOLARIS_LIB_LDFLAGS)
|
|
|
|
|
|
if WANT_SYNCAPI
|
|
|
check_PROGRAMS += zktest-mt
|
|
|
nodist_zktest_mt_SOURCES = $(TEST_SOURCES) tests/PthreadMocks.cc
|
|
|
zktest_mt_LDADD = libzkmt.la libhashtable.la -lpthread $(CPPUNIT_LIBS)
|
|
|
zktest_mt_CXXFLAGS = -DUSE_STATIC_LIB -DTHREADED $(CPPUNIT_CFLAGS) $(USEIPV6)
|
|
|
+if SOLARIS
|
|
|
+ SHELL_SYMBOL_WRAPPERS_MT = cat ${srcdir}/tests/wrappers-mt.opt
|
|
|
+ SYMBOL_WRAPPERS_MT=$(SYMBOL_WRAPPERS) $(SHELL_SYMBOL_WRAPPERS_MT:sh)
|
|
|
+else
|
|
|
SYMBOL_WRAPPERS_MT=$(SYMBOL_WRAPPERS) $(shell cat ${srcdir}/tests/wrappers-mt.opt)
|
|
|
- zktest_mt_LDFLAGS = -static-libtool-libs $(SYMBOL_WRAPPERS_MT)
|
|
|
+endif
|
|
|
+ zktest_mt_LDFLAGS = -static-libtool-libs $(SYMBOL_WRAPPERS_MT) $(SOLARIS_LIB_LDFLAGS)
|
|
|
endif
|
|
|
|
|
|
TESTS = $(check_PROGRAMS)
|