From 79774488814b0f5267644628e31c07c7ac380a65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Jacke?= Date: Tue, 24 Aug 2010 13:29:59 -0400 Subject: autoconf: add checks for clock_gettime --- configure.ac | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/configure.ac b/configure.ac index c7d420d..7f82cd6 100644 --- a/configure.ac +++ b/configure.ac @@ -110,6 +110,16 @@ AC_FUNC_STRNLEN # check for required functions AC_CHECK_FUNCS([alarm atexit endpwent getmntent getpass gettimeofday inet_ntop memset realpath setenv strchr strcmp strdup strerror strncasecmp strndup strpbrk strrchr strstr strtol strtoul tolower uname], , [AC_MSG_ERROR([necessary functions(s) not found])]) +AC_CHECK_FUNCS(clock_gettime, [], [ + AC_CHECK_LIB(rt, clock_gettime, [ + AC_DEFINE(HAVE_CLOCK_GETTIME, 1) + AC_DEFINE(HAVE_CLOCK_GETTIME,1, + [Whether the clock_gettime func is there]) + LIBS="$LIBS -lrt" + ]) + ]) + + # ugly, but I'm not sure how to check for functions in a library that's not in $LIBS cu_saved_libs=$LIBS LIBS="$LIBS $KRB5_LDADD" -- cgit v1.2.3