Fix automake build
authorArjen Roodselaar <arjen@fb.com>
Thu, 10 Dec 2015 01:51:27 +0000 (17:51 -0800)
committerfacebook-github-bot-4 <folly-bot@fb.com>
Thu, 10 Dec 2015 02:20:24 +0000 (18:20 -0800)
Summary: There is slight drift in external deps between the TARGETS and automake files, keeping tests from linking in the 'make check' step when building folly outside of fbcode.

Reviewed By: yfeldblum

Differential Revision: D2740482

fb-gh-sync-id: ae6243f9bb112a7d2680017b3d577a1f23ef4f60

folly/configure.ac
folly/test/Makefile.am

index 9ab499aa230441c943aebc5f9c24b2c6c7ff3caa..d89061b141ee2eb05e2d12630e487dae522a745f 100644 (file)
@@ -107,13 +107,14 @@ AC_CHECK_LIB(ssl,
 
 # check for boost libs
 AX_BOOST_BASE([1.51.0], [], [AC_MSG_ERROR(
-              [Please install boost >= 1.51.0 (context, thread, program_options, regex, and system)])])
+              [Please install boost >= 1.51.0 (context, thread, program_options, regex, system and chrono)])])
 AX_BOOST_CONTEXT
 AX_BOOST_PROGRAM_OPTIONS
 AX_BOOST_THREAD
 AX_BOOST_REGEX
 AX_BOOST_SYSTEM
 AX_BOOST_FILESYSTEM
+AX_BOOST_CHRONO
 
 # Check for python interpreter
 AM_PATH_PYTHON
@@ -454,6 +455,7 @@ AM_CPPFLAGS="$AM_CPPFLAGS $BOOST_CPPFLAGS"
 AM_LDFLAGS="$AM_LDFLAGS $BOOST_CONTEXT_LIB $BOOST_PROGRAM_OPTIONS_LIB"
 AM_LDFLAGS="$AM_LDFLAGS $BOOST_THREAD_LIB $BOOST_FILESYSTEM_LIB"
 AM_LDFLAGS="$AM_LDFLAGS $BOOST_SYSTEM_LIB $BOOST_REGEX_LIB -lpthread"
+AM_LDFLAGS="$AM_LDFLAGS $BOOST_CHRONO_LIB"
 
 AC_SUBST([AM_CPPFLAGS])
 AC_SUBST([AM_LDFLAGS])
index 3b9913b9386e36ad990dd4ff28f0c5c0676950a0..7c277e19503aea40fdbc50a2cc0f37027bdb1417 100644 (file)
@@ -75,7 +75,7 @@ thread_cached_int_test_LDADD = libgtestmain.la $(top_builddir)/libfollybenchmark
 
 thread_local_test_SOURCES = ThreadLocalTest.cpp
 thread_local_test_LDADD = libgtestmain.la $(top_builddir)/libfollybenchmark.la $(top_builddir)/libfolly.la
-
+thread_local_test_LDFLAGS = -ldl
 TESTS += thread_cached_int_test thread_local_test
 
 fbvector_test_SOURCES = FBVectorTest.cpp
@@ -185,11 +185,11 @@ spooky_hash_v2_test_LDADD = libgtestmain.la $(top_builddir)/libfolly.la $(top_bu
 TESTS += spooky_hash_v2_test
 
 token_bucket_test_SOURCES = TokenBucketTest.cpp
-token_bucket_test_LDADD = libgtest.la $(top_builddir)/libfolly.la $(top_builddir)/libfollybenchmark.la
+token_bucket_test_LDADD = libgtestmain.la $(top_builddir)/libfolly.la $(top_builddir)/libfollybenchmark.la
 TESTS += token_bucket_test
 
 thread_name_test_SOURCES = ThreadNameTest.cpp
-thread_name_test_LDADD = ligtest.la $(top_builddir)/libfolly.la
+thread_name_test_LDADD = libgtestmain.la $(top_builddir)/libfolly.la
 TESTS += thread_name_test