configure.ac: Do not check for rt on Mac OS X.
authorVinson Lee <vlee@freedesktop.org>
Sun, 27 Jan 2013 06:50:05 +0000 (22:50 -0800)
committerVinson Lee <vlee@freedesktop.org>
Sat, 9 Feb 2013 23:21:08 +0000 (15:21 -0800)
There is no rt library on Mac OS X.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=58872
Acked-by: Matt Turner <mattst88@gmail.com>
configure.ac

index 6735fdcf0e28add3540c62211e0aacee58b08270..d08bc2779a4307fb3a5d8bf1008b64508ada4099 100644 (file)
@@ -499,10 +499,16 @@ AC_CHECK_FUNC([dlopen], [DEFINES="$DEFINES -DHAVE_DLOPEN"],
        [DEFINES="$DEFINES -DHAVE_DLOPEN"; DLOPEN_LIBS="-ldl"])])
 AC_SUBST([DLOPEN_LIBS])
 
-AC_CHECK_FUNCS([clock_gettime], [CLOCK_LIB=],
-               [AC_CHECK_LIB([rt], [clock_gettime], [CLOCK_LIB=-lrt],
-                             [AC_MSG_ERROR([Couldn't find clock_gettime])])])
-AC_SUBST([CLOCK_LIB])
+case "$host_os" in
+darwin*)
+    ;;
+*)
+    AC_CHECK_FUNCS([clock_gettime], [CLOCK_LIB=],
+                   [AC_CHECK_LIB([rt], [clock_gettime], [CLOCK_LIB=-lrt],
+                                 [AC_MSG_ERROR([Couldn't find clock_gettime])])])
+    AC_SUBST([CLOCK_LIB])
+    ;;
+esac
 
 dnl See if posix_memalign is available
 AC_CHECK_FUNC([posix_memalign], [DEFINES="$DEFINES -DHAVE_POSIX_MEMALIGN"])