xref: /freebsd/sys/contrib/openzfs/config/user-libudev.m4 (revision 5ca8e32633c4ffbbcd6762e5888b6a4ba0708c6c)
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