]> git.ozlabs.org Git - petitboot/commitdiff
autotools: Don't link udev into everything
authorJeremy Kerr <jk@ozlabs.org>
Fri, 1 Aug 2014 03:55:45 +0000 (11:55 +0800)
committerJeremy Kerr <jk@ozlabs.org>
Tue, 5 Aug 2014 02:31:28 +0000 (10:31 +0800)
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>
configure.ac
discover/Makefile.am

index fbb6520f4c43bc851ffd621c81e0094021b0f23b..9511fefa8e14bfe659424d5ec760b5493dce9b9d 100644 (file)
@@ -51,7 +51,7 @@ if test "x$ax_cv_curses" = xyes; then
 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.])]
 )
 
@@ -257,7 +257,7 @@ AS_IF(
        ]
 )
  
-
+AC_SUBST([UDEV_LIBS])
 AC_SUBST([LIBTOOL_DEPS])
 AC_SUBST([DESTDIR])
 AC_SUBST([pkgsysconfdir], ["${sysconfdir}/${package}"])
index 9e922fe959b0dc9e212e6b8634ff186249347763..0dc5e898ab865b2734f36c30f3dfb5080e0e844c 100644 (file)
@@ -57,10 +57,9 @@ discover_pb_discover_SOURCES = \
        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) \