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")
# }}}
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
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