1
0
Fork 0

Merge branch 'devel' of https://github.com/triAGENS/ArangoDB into devel

This commit is contained in:
Jan Steemann 2014-12-16 22:52:55 +01:00
commit c5f82f1b10
4 changed files with 87 additions and 1 deletions

View File

@ -8,7 +8,6 @@ make setup || exit 1
echo
echo "$0: configuring ArangoDB"
# V8 needs lib realtime:
export LDFLAGS='-lrt -pthread'
./configure \
--enable-relative \
--enable-all-in-one-libev \

View File

@ -140,6 +140,7 @@ AM_LDFLAGS = \
################################################################################
LIBS = \
@RT_LIBS@ \
@LIBEV_LIBS@ \
@MATH_LIBS@ \
@OPENSSL_LIBS@ \

View File

@ -181,6 +181,12 @@ dnl ============================================================================
dnl --SECTION-- EXTERNAL LIBRARIES
dnl ============================================================================
dnl ----------------------------------------------------------------------------
dnl -lrt
dnl ----------------------------------------------------------------------------
m4_include([m4/clock_gettime])
AC_CLOCK()
dnl ----------------------------------------------------------------------------
dnl MATH

80
m4/clock_gettime Normal file
View File

@ -0,0 +1,80 @@
dnl -*- mode: Autoconf; -*-
dnl borrowed from php-fpm configure
AC_DEFUN([AC_CLOCK],
[
have_clock_gettime=no
AC_MSG_CHECKING([for clock_gettime])
AC_TRY_LINK([ #include <time.h> ], [struct timespec ts; clock_gettime(CLOCK_MONOTONIC, &ts);], [
have_clock_gettime=yes
AC_MSG_RESULT([yes])
], [
AC_MSG_RESULT([no])
])
if test "$have_clock_gettime" = "no"; then
AC_MSG_CHECKING([for clock_gettime in -lrt])
SAVED_LIBS=$LIBS
LIBS="$LIBS -lrt"
AC_TRY_LINK([ #include <time.h> ], [struct timespec ts; clock_gettime(CLOCK_MONOTONIC, &ts);], [
have_clock_gettime=yes
AC_MSG_RESULT([yes])
], [
LIBS="$SAVED_LIBS"
AC_MSG_RESULT([no])
])
fi
if test "$have_clock_gettime" = "yes"; then
AC_DEFINE([HAVE_CLOCK_GETTIME], 1, [do we have clock_gettime?])
fi
have_clock_get_time=no
if test "$have_clock_gettime" = "no"; then
AC_MSG_CHECKING([for clock_get_time])
AC_TRY_RUN([ #include <mach/mach.h>
#include <mach/clock.h>
#include <mach/mach_error.h>
int main()
{
kern_return_t ret; clock_serv_t aClock; mach_timespec_t aTime;
ret = host_get_clock_service(mach_host_self(), REALTIME_CLOCK, &aClock);
if (ret != KERN_SUCCESS) {
return 1;
}
ret = clock_get_time(aClock, &aTime);
if (ret != KERN_SUCCESS) {
return 2;
}
return 0;
}
], [
have_clock_get_time=yes
AC_MSG_RESULT([yes])
], [
AC_MSG_RESULT([no])
])
fi
if test "$have_clock_get_time" = "yes"; then
AC_DEFINE([HAVE_CLOCK_GET_TIME], 1, [do we have clock_get_time?])
fi
RT_LIBS=$LIBS
AC_SUBST(RT_LIBS)
SAVED_LIBS=$LIBS
])
dnl Local Variables:
dnl mode: outline-minor
dnl outline-regexp: "^\\(dnl --SECTION--\\)"
dnl End: