MErge
authorBrian Aker <brian@tangent.org>
Mon, 10 Oct 2011 06:11:45 +0000 (23:11 -0700)
committerBrian Aker <brian@tangent.org>
Mon, 10 Oct 2011 06:11:45 +0000 (23:11 -0700)
configure.ac
libtest/include.am
m4/libgearman.m4 [new file with mode: 0644]

index fe346180d9c830a89facaa7ef22bca223396dd40..ed9b978cc45bb7358a5613c069374d730f1d08df 100644 (file)
@@ -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)
index a91cc2ac028c069009ae4c346f83fa59ae7dd0da..a52c573aac473818f39aa7660bbf845a75170209 100644 (file)
@@ -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 (file)
index 0000000..a7bf493
--- /dev/null
@@ -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])
+                  ])