libgl-xlib: link with -lrt
authorBrian Paul <brianp@vmware.com>
Mon, 14 Jan 2013 17:17:48 +0000 (09:17 -0800)
committerBrian Paul <brianp@vmware.com>
Tue, 15 Jan 2013 01:15:41 +0000 (18:15 -0700)
Fixes a runtime error:

glxgears: symbol lookup error: /home/brian/mesa/lib/gallium/libGL.so.1: undefined symbol: clock_gettime

v2: use $(CLOCK_LIB) and $(PTHREAD_LIBS) per Andreas Boll.

Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Andreas Boll <andreas.boll.dev@gmail.com>
src/gallium/targets/libgl-xlib/Makefile.am

index 2b697fc35d11cf43e4867b477233bb863b2c7b6a..adeb05dcb96b209b4695dfdd0f8f4cd5e0c33f07 100644 (file)
@@ -53,7 +53,8 @@ libGL_la_LIBADD = \
        $(top_builddir)/src/mapi/glapi/libglapi.la \
        $(top_builddir)/src/mesa/libmesagallium.la \
        $(top_builddir)/src/gallium/auxiliary/libgallium.la \
-       -lpthread
+       $(PTHREAD_LIBS) \
+       $(CLOCK_LIB)
 
 if HAVE_MESA_LLVM
 libGL_la_LIBADD += $(top_builddir)/src/gallium/drivers/llvmpipe/libllvmpipe.la $(LLVM_LIBS)