xref: /freebsd/sys/contrib/openzfs/config/user-makedev.m4 (revision ebacd8013fe5f7fdf9f6a5b286f6680dd2891036)
1dnl #
2dnl # glibc 2.25
3dnl #
4AC_DEFUN([ZFS_AC_CONFIG_USER_MAKEDEV_IN_SYSMACROS], [
5	AC_MSG_CHECKING([makedev() is declared in sys/sysmacros.h])
6	AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
7		#include <sys/sysmacros.h>
8	]], [[
9		int k;
10		k = makedev(0,0);
11	]])],[
12		AC_MSG_RESULT(yes)
13		AC_DEFINE(HAVE_MAKEDEV_IN_SYSMACROS, 1,
14		    [makedev() is declared in sys/sysmacros.h])
15	],[
16		AC_MSG_RESULT(no)
17	])
18])
19
20dnl #
21dnl # glibc X < Y < 2.25
22dnl #
23AC_DEFUN([ZFS_AC_CONFIG_USER_MAKEDEV_IN_MKDEV], [
24	AC_MSG_CHECKING([makedev() is declared in sys/mkdev.h])
25	AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
26		#include <sys/mkdev.h>
27	]], [[
28		int k;
29		k = makedev(0,0);
30	]])],[
31		AC_MSG_RESULT(yes)
32		AC_DEFINE(HAVE_MAKEDEV_IN_MKDEV, 1,
33		    [makedev() is declared in sys/mkdev.h])
34	],[
35		AC_MSG_RESULT(no)
36	])
37])
38