summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjörn Jacke <bj@sernet.de>2010-08-24 13:29:59 -0400
committerJeff Layton <jlayton@samba.org>2010-08-24 13:29:59 -0400
commit79774488814b0f5267644628e31c07c7ac380a65 (patch)
treed3a0cc86a0061c357364e075606f5bd4b9062be8
parent909c1bac5eb3b1fc677ef0d4de011cb68e999d15 (diff)
downloadcifs-utils-79774488814b0f5267644628e31c07c7ac380a65.tar.gz
cifs-utils-79774488814b0f5267644628e31c07c7ac380a65.tar.bz2
cifs-utils-79774488814b0f5267644628e31c07c7ac380a65.zip
autoconf: add checks for clock_gettime
-rw-r--r--configure.ac10
1 files changed, 10 insertions, 0 deletions
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"