By default, AC_CHECK_LIB will append to $LIBS, which is used for all
link stages. Intstead, we should popuate $UDEV_LIBS, and just use that
for the single pb-discover link stage.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
fi
AC_CHECK_LIB([udev], [udev_new],
- [],
+ [UDEV_LIBS=-ludev],
[AC_MSG_FAILURE([The libudev development library is required by petitboot. Try installing the package libudev-dev or libudev-devel.])]
)
]
)
-
+AC_SUBST([UDEV_LIBS])
AC_SUBST([LIBTOOL_DEPS])
AC_SUBST([DESTDIR])
AC_SUBST([pkgsysconfdir], ["${sysconfdir}/${package}"])
discover/pxe-parser.c
discover_pb_discover_LDADD = \
+ discover/grub2/grub2-parser.ro \
$(core_lib) \
- discover/grub2/grub2-parser.ro
-
-discover_pb_discover_LDFLAGS = -ludev
+ $(UDEV_LIBS)
discover_pb_discover_CPPFLAGS = \
$(AM_CPPFLAGS) \