xref: /freebsd/sys/contrib/openzfs/config/user-libudev.m4 (revision 06c3fb2749bda94cb5201f81ffdb8fa6c3161b2e)
1dnl #
2dnl # Check for libudev - needed for vdev auto-online and auto-replace
3dnl #
4AC_DEFUN([ZFS_AC_CONFIG_USER_LIBUDEV], [
5	ZFS_AC_FIND_SYSTEM_LIBRARY(LIBUDEV, [libudev], [libudev.h], [], [udev], [], [user_libudev=yes], [user_libudev=no])
6
7	AS_IF([test "x$user_libudev" = xyes], [
8	    AX_SAVE_FLAGS
9
10	    CFLAGS="$CFLAGS $LIBUDEV_CFLAGS"
11	    LIBS="$LIBUDEV_LIBS $LIBS"
12
13	    AC_CHECK_FUNCS([udev_device_get_is_initialized])
14
15	    AX_RESTORE_FLAGS
16	])
17])
18