Only link with librt on Linux
authorNathan Hjelm <hjelmn@mac.com>
Tue, 17 Feb 2009 00:13:52 +0000 (21:13 -0300)
committerDaniel Drake <dsd@gentoo.org>
Tue, 17 Feb 2009 00:19:56 +0000 (21:19 -0300)
[dsd: tweak configure.ac change]

configure.ac
libusb/Makefile.am

index e26ebe5..2e344f7 100644 (file)
@@ -17,6 +17,7 @@ case $host in
        AC_SUBST(OS_LINUX)
        AC_MSG_RESULT([Linux])
        backend="linux"
+       AC_CHECK_LIB(rt, clock_gettime)
        ;;
 *)
        AC_MSG_ERROR([unsupported operating system])
index 97743fa..9ad8ec5 100644 (file)
@@ -10,7 +10,6 @@ endif
 
 libusb_1_0_la_CFLAGS = -fvisibility=hidden $(AM_CFLAGS) -pthread
 libusb_1_0_la_SOURCES = libusbi.h core.c descriptor.c io.c sync.c $(OS_SRC)
-libusb_1_0_la_LIBADD = -lrt
 
 hdrdir = $(includedir)/libusb-1.0
 hdr_HEADERS = libusb.h