gallium: correctly manage libsensors link flags
authorEmil Velikov <emil.velikov@collabora.com>
Thu, 8 Dec 2016 17:58:21 +0000 (17:58 +0000)
committerEmil Velikov <emil.l.velikov@gmail.com>
Wed, 18 Jan 2017 16:01:14 +0000 (16:01 +0000)
We should be using LIBS rather than the LDFLAGS variable. Furthermore
try to keep the linking to the final stage, rather than intermetent
static library.

Cc: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
configure.ac
src/gallium/Automake.inc
src/gallium/auxiliary/Makefile.am

index b68b51e94a4fd6d8c03e7281242047db51f65cc6..450fca161ac969e36dbf661c5b8c1198317b36ee 100644 (file)
@@ -1127,11 +1127,11 @@ AC_ARG_ENABLE([lmsensors],
 AM_CONDITIONAL(HAVE_LIBSENSORS, test "x$enable_lmsensors" = xyes)
 if test "x$enable_lmsensors" = xyes ; then
     DEFINES="${DEFINES} -DHAVE_LIBSENSORS=1"
-    LIBSENSORS_LDFLAGS="-lsensors"
+    LIBSENSORS_LIBS="-lsensors"
 else
-    LIBSENSORS_LDFLAGS=""
+    LIBSENSORS_LIBS=""
 fi
-AC_SUBST(LIBSENSORS_LDFLAGS)
+AC_SUBST(LIBSENSORS_LIBS)
 
 case "$host_os" in
 linux*)
index 6aadcb919836cb08ea82a22dd9167f6fb15ce397..a01fa54053149372a32ff50eed546490170b7cb2 100644 (file)
@@ -46,6 +46,7 @@ GALLIUM_TARGET_CFLAGS = \
 
 GALLIUM_COMMON_LIB_DEPS = \
        -lm \
+       $(LIBSENSORS_LIBS) \
        $(CLOCK_LIB) \
        $(PTHREAD_LIBS) \
        $(DLOPEN_LIBS)
index 1154c791311fa4b91ff0e24278ab22ff5ef564ef..def009803087d03c359faf8aa86c804282660e58 100644 (file)
@@ -44,8 +44,6 @@ libgallium_la_SOURCES += \
 
 endif
 
-libgallium_la_LDFLAGS = $(LIBSENSORS_LDFLAGS)
-
 MKDIR_GEN = $(AM_V_at)$(MKDIR_P) $(@D)
 PYTHON_GEN =  $(AM_V_GEN)$(PYTHON2) $(PYTHON_FLAGS)