Use clock() when times() is not available.

* configure.ac: Check for times() and sys/times.h.
* src/misc/timer.hh: Include sys/times.h conditionally
and use clock() if times() is not available.
Reported by Yann Thierry-Mieg.
This commit is contained in:
Alexandre Duret-Lutz 2012-04-27 12:51:32 +02:00
parent 8620138069
commit 2c8e5297e7
2 changed files with 21 additions and 6 deletions

View file

@ -67,7 +67,8 @@ AX_CHECK_LBTT
AX_CHECK_GSPNLIB
AX_CHECK_BOOST([1.34], [103400])
AC_CHECK_FUNCS([srand48 drand48])
AC_CHECK_HEADERS([sys/times.h])
AC_CHECK_FUNCS([times srand48 drand48])
LT_CONFIG_LTDL_DIR([ltdl])
LT_INIT([win32-dll])