Finally, fix the autoconf setup to allow for a missing clock_gettime;
authorChandler Carruth <chandlerc@gmail.com>
Sat, 5 Jan 2013 00:29:06 +0000 (00:29 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Sat, 5 Jan 2013 00:29:06 +0000 (00:29 +0000)
the source code should now be set up to handle this.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171570 91177308-0d34-0410-b5e6-96231b3b80d8

autoconf/configure.ac
configure

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
index 8e06154b98c4b1aa4c1aaa9c72f292c15d48b900..4392e976ae538e4e16252e346105cf0e3bbdd68a 100755 (executable)
--- a/configure
+++ b/configure
@@ -12614,10 +12614,6 @@ ac_res=$ac_cv_search_clock_gettime
 if test "$ac_res" != no; then
   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
 
-else
-  { { echo "$as_me:$LINENO: error: clock_gettime not found and is required for modern POSIX timing uspport" >&5
-echo "$as_me: error: clock_gettime not found and is required for modern POSIX timing uspport" >&2;}
-   { (exit 1); exit 1; }; }
 fi