Stop hardcoding libudev
authorRuben Kerkhof <ruben@rubenkerkhof.com>
Wed, 25 May 2016 14:15:32 +0000 (16:15 +0200)
committerRuben Kerkhof <ruben@rubenkerkhof.com>
Wed, 25 May 2016 14:15:32 +0000 (16:15 +0200)
configure.ac
src/Makefile.am

index e86d9b9..ceb0b30 100644 (file)
@@ -4495,8 +4495,10 @@ if test "x$with_libudev" = "xyes"
 then
        BUILD_WITH_LIBUDEV_CFLAGS="$with_libudev_cflags"
        BUILD_WITH_LIBUDEV_LDFLAGS="$with_libudev_ldflags"
+       BUILD_WITH_LIBUDEV_LIBS="-ludev"
        AC_SUBST(BUILD_WITH_LIBUDEV_CFLAGS)
        AC_SUBST(BUILD_WITH_LIBUDEV_LDFLAGS)
+       AC_SUBST(BUILD_WITH_LIBUDEV_LIBS)
 fi
 AM_CONDITIONAL(BUILD_WITH_LIBUDEV, test "x$with_libudev" = "xyes")
 # }}}
index a3da05f..f11bd56 100644 (file)
@@ -317,7 +317,7 @@ endif
 if BUILD_WITH_LIBUDEV
 disk_la_CFLAGS += $(BUILD_WITH_LIBUDEV_CFLAGS)
 disk_la_LDFLAGS += $(BUILD_WITH_LIBUDEV_LDFLAGS)
-disk_la_LIBADD += -ludev
+disk_la_LIBADD += $(BULD_WITH_LIBUDEV_LIBS)
 endif
 if BUILD_WITH_PERFSTAT
 disk_la_LIBADD += -lperfstat
@@ -920,7 +920,7 @@ pkglib_LTLIBRARIES += smart.la
 smart_la_SOURCES = smart.c
 smart_la_CFLAGS = $(AM_CFLAGS) $(BUILD_WITH_LIBATASMART_CPPFLAGS) $(BUILD_WITH_LIBUDEV_CFLAGS)
 smart_la_LDFLAGS = $(PLUGIN_LDFLAGS) $(BUILD_WITH_LIBATASMART_LDFLAGS) $(BUILD_WITH_LIBUDEV_LDFLAGS)
-smart_la_LIBADD = $(BUILD_WITH_LIBATASMART_LIBS) -ludev
+smart_la_LIBADD = $(BUILD_WITH_LIBATASMART_LIBS) $(BUILD_WITH_LIBUDEV_LIBS)
 endif
 endif