Finally, fix the autoconf setup to allow for a missing clock_gettime;

the source code should now be set up to handle this.

llvm-svn: 171570
This commit is contained in:
Chandler Carruth 2013-01-05 00:29:06 +00:00
parent 939ec18099
commit d121a7b0c0
2 changed files with 4 additions and 7 deletions

View File

@ -1250,9 +1250,10 @@ AC_SEARCH_LIBS(dlopen,dl,AC_DEFINE([HAVE_DLOPEN],[1],
[Define if dlopen() is available on this platform.]), [Define if dlopen() is available on this platform.]),
AC_MSG_WARN([dlopen() not found - disabling plugin support])) AC_MSG_WARN([dlopen() not found - disabling plugin support]))
dnl clock_gettime() is required for modern timing support. dnl Search for the clock_gettime() function. Note that we rely on the POSIX
AC_SEARCH_LIBS(clock_gettime,rt,[], dnl macros to detect whether clock_gettime is available, dnl this just finds
AC_MSG_ERROR([clock_gettime not found and is required for modern POSIX timing uspport])) 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 dnl libffi is optional; used to call external functions from the interpreter
if test "$llvm_cv_enable_libffi" = "yes" ; then if test "$llvm_cv_enable_libffi" = "yes" ; then

4
llvm/configure vendored
View File

@ -12614,10 +12614,6 @@ ac_res=$ac_cv_search_clock_gettime
if test "$ac_res" != no; then if test "$ac_res" != no; then
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" 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 fi