diff options
| author | Jason Evans <jasone@canonware.com> | 2015-09-15 14:59:56 -0700 |
|---|---|---|
| committer | Jason Evans <jasone@canonware.com> | 2015-09-15 14:59:56 -0700 |
| commit | 345c1b0eeeac333c3da8baa46e9b96c3b2aca443 (patch) | |
| tree | 99107a19d1b7c0888b60287a699c060f27a36fbb /configure.ac | |
| parent | 9a505b768cd50bffbfaa3a993df9117e7454134e (diff) | |
| download | platform_external_jemalloc_new-345c1b0eeeac333c3da8baa46e9b96c3b2aca443.tar.gz platform_external_jemalloc_new-345c1b0eeeac333c3da8baa46e9b96c3b2aca443.tar.bz2 platform_external_jemalloc_new-345c1b0eeeac333c3da8baa46e9b96c3b2aca443.zip | |
Link test to librt if it contains clock_gettime(2).
This resolves #257.
Diffstat (limited to 'configure.ac')
| -rw-r--r-- | configure.ac | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 2308b990..7a1290e0 100644 --- a/configure.ac +++ b/configure.ac @@ -1190,6 +1190,14 @@ fi CPPFLAGS="$CPPFLAGS -D_REENTRANT" +dnl Check whether clock_gettime(2) is in libc or librt. This function is only +dnl used in test code, so save the result to TESTLIBS to avoid poluting LIBS. +SAVED_LIBS="${LIBS}" +LIBS= +AC_SEARCH_LIBS([clock_gettime], [rt], [TESTLIBS="${LIBS}"]) +AC_SUBST([TESTLIBS]) +LIBS="${SAVED_LIBS}" + dnl Check if the GNU-specific secure_getenv function exists. AC_CHECK_FUNC([secure_getenv], [have_secure_getenv="1"], @@ -1694,6 +1702,7 @@ AC_MSG_RESULT([CPPFLAGS : ${CPPFLAGS}]) AC_MSG_RESULT([LDFLAGS : ${LDFLAGS}]) AC_MSG_RESULT([EXTRA_LDFLAGS : ${EXTRA_LDFLAGS}]) AC_MSG_RESULT([LIBS : ${LIBS}]) +AC_MSG_RESULT([TESTLIBS : ${TESTLIBS}]) AC_MSG_RESULT([RPATH_EXTRA : ${RPATH_EXTRA}]) AC_MSG_RESULT([]) AC_MSG_RESULT([XSLTPROC : ${XSLTPROC}]) |
