mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2025-11-19 11:25:28 +03:00
Only build devname2devid when libudev headers are available
Accidentally introduced by commit 39fc0cb. The devname2devid utility
which depends on libudev must only be built when libudev headers are
available. This is accomplished through an AM_CONDITIONAL.
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue #4416
This commit is contained in:
parent
39fc0cb557
commit
e4023e42a8
@ -4,10 +4,17 @@ dnl #
|
||||
AC_DEFUN([ZFS_AC_CONFIG_USER_LIBUDEV], [
|
||||
LIBUDEV=
|
||||
|
||||
AC_CHECK_HEADER([libudev.h], [AC_SUBST([LIBUDEV], ["-ludev"])
|
||||
AC_DEFINE([HAVE_LIBUDEV], 1, [Define if you have libudev])], [])
|
||||
AC_CHECK_HEADER([libudev.h], [
|
||||
libudev=yes
|
||||
AC_SUBST([LIBUDEV], ["-ludev"])
|
||||
AC_DEFINE([HAVE_LIBUDEV], 1, [Define if you have libudev])
|
||||
], [
|
||||
libudev=no
|
||||
])
|
||||
|
||||
AC_SEARCH_LIBS(i[udev_device_get_is_initialized], [udev], [
|
||||
AM_CONDITIONAL([WANT_DEVNAME2DEVID], [ test x$libudev = xyes ])
|
||||
AC_SEARCH_LIBS([udev_device_get_is_initialized], [udev], [
|
||||
AC_DEFINE([HAVE_LIBUDEV_UDEV_DEVICE_GET_IS_INITIALIZED], 1, [
|
||||
Define if udev_device_get_is_initialized is available])], [])
|
||||
|
||||
])
|
||||
|
||||
@ -2,6 +2,8 @@ include $(top_srcdir)/config/Rules.am
|
||||
|
||||
pkgexecdir = $(datadir)/@PACKAGE@/zfs-tests/bin
|
||||
|
||||
if WANT_DEVNAME2DEVID
|
||||
pkgexec_PROGRAMS = devname2devid
|
||||
devname2devid_SOURCES = devname2devid.c
|
||||
devname2devid_LDADD = -ludev
|
||||
endif
|
||||
|
||||
Loading…
Reference in New Issue
Block a user