From: Brian Aker Date: Mon, 10 Oct 2011 06:08:34 +0000 (-0700) Subject: Fix for 850399, add in libgearman test. X-Git-Tag: 1.0.2~7^2~1^2 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=51c3287c3c30161245f0f5994811d43a9da6a188;p=m6w6%2Flibmemcached Fix for 850399, add in libgearman test. --- diff --git a/configure.ac b/configure.ac index fe346180..ed9b978c 100644 --- a/configure.ac +++ b/configure.ac @@ -61,14 +61,13 @@ gl_VISIBILITY m4_include([m4/memcached.m4]) m4_include([m4/memcached_sasl.m4]) m4_include([m4/gearmand.m4]) +m4_include([m4/libgearman.m4]) AM_CONDITIONAL(BUILDING_LIBMEMCACHED, true) AM_CONDITIONAL(HAVE_LIBMEMCACHED, false) AC_DEFINE([HAVE_LIBMEMCACHED], [1], [Enables libmemcached Support]) AM_CONDITIONAL(BUILDING_GEARMAN, false) -AM_CONDITIONAL(HAVE_LIBGEARMAN, false) -AC_DEFINE([HAVE_LIBGEARMAN], [0], [Enables libgearman Support]) AC_SEARCH_LIBS(getopt_long, gnugetopt) AC_SEARCH_LIBS(gethostbyname, nsl) diff --git a/libtest/include.am b/libtest/include.am index a91cc2ac..a52c573a 100644 --- a/libtest/include.am +++ b/libtest/include.am @@ -149,11 +149,8 @@ libtest_libtest_la_SOURCES+= libtest/blobslap_worker.cc libtest_libtest_la_SOURCES+= libtest/gearmand.cc libtest_libtest_la_SOURCES+= util/instance.cc libtest_libtest_la_SOURCES+= util/operation.cc -libtest_libtest_la_CXXFLAGS+= -DHAVE_LIBGEARMAN -libtest_libtest_la_CXXFLAGS+= -DGEARMAND_BINARY="\"${abs_top_builddir}/gearmand/gearmand\"" libtest_libtest_la_CXXFLAGS+= -DGEARMAND_BLOBSLAP_WORKER="\"${abs_top_builddir}/benchmark/blobslap_worker\"" -libtest_unittest_CXXFLAGS+= -DHAVE_LIBGEARMAN libtest_unittest_LDADD+= libgearman/libgearman.la libtest_unittest_DEPENDENCIES+= libgearman/libgearman.la else @@ -164,12 +161,9 @@ libtest_libtest_la_SOURCES+= libtest/blobslap_worker.cc libtest_libtest_la_SOURCES+= libtest/gearmand.cc libtest_libtest_la_SOURCES+= util/instance.cc libtest_libtest_la_SOURCES+= util/operation.cc +libtest_libtest_la_CXXFLAGS+= -DGEARMAND_BLOBSLAP_WORKER=0 else -libtest_libtest_la_CXXFLAGS+= -DGEARMAND_BINARY=0 libtest_libtest_la_CXXFLAGS+= -DGEARMAND_BLOBSLAP_WORKER=0 -libtest_libtest_la_CXXFLAGS+= -DHAVE_LIBGEARMAN=0 -libtest_unittest_CXXFLAGS+= -DGEARMAND_BINARY=0 -libtest_unittest_CXXFLAGS+= -DHAVE_LIBGEARMAN=0 endif endif diff --git a/m4/libgearman.m4 b/m4/libgearman.m4 new file mode 100644 index 00000000..a7bf493e --- /dev/null +++ b/m4/libgearman.m4 @@ -0,0 +1,9 @@ +AX_CHECK_LIBRARY([LIBGEARMAN], [libgearman/gearmand.h], [gearman], + [ + AM_CONDITIONAL(HAVE_LIBGEARMAN, true) + AC_DEFINE([HAVE_LIBGEARMAN], [1], [Enables libgearman Support]) + ], + [ + AM_CONDITIONAL(HAVE_LIBGEARMAN, false) + AC_DEFINE([HAVE_LIBGEARMAN], [0], [Enables libgearman Support]) + ])