Finally, fix the autoconf setup to allow for a missing clock_gettime;
[oota-llvm.git] / autoconf / configure.ac
index fdda3f956717d6f5e3434332af0b1aedef5fd5d2..c0af01a1e4161ebad9deee9c3f1aa3197deaa1c2 100644 (file)
@@ -1250,9 +1250,10 @@ AC_SEARCH_LIBS(dlopen,dl,AC_DEFINE([HAVE_DLOPEN],[1],
                [Define if dlopen() is available on this platform.]),
                AC_MSG_WARN([dlopen() not found - disabling plugin support]))
 
-dnl clock_gettime() is required for modern timing support.
-AC_SEARCH_LIBS(clock_gettime,rt,[],
-               AC_MSG_ERROR([clock_gettime not found and is required for modern POSIX timing uspport]))
+dnl Search for the clock_gettime() function. Note that we rely on the POSIX
+dnl macros to detect whether clock_gettime is available, dnl this just finds
+dnl the right libraries to link with.
+AC_SEARCH_LIBS(clock_gettime,rt)
 
 dnl libffi is optional; used to call external functions from the interpreter
 if test "$llvm_cv_enable_libffi" = "yes" ; then