2012-11-16 02:51:20 +07:00
|
|
|
AC_PREREQ([2.68])
|
2022-06-14 06:44:42 +07:00
|
|
|
AC_INIT([eudev],[3.2.12-pre3],[https://github.com/gentoo/eudev/issues])
|
2019-10-27 03:18:03 +07:00
|
|
|
AC_SUBST(UDEV_VERSION, 243)
|
2012-11-16 02:51:20 +07:00
|
|
|
AC_CONFIG_SRCDIR([src/udev/udevd.c])
|
2011-10-03 05:31:59 +07:00
|
|
|
|
2011-04-26 03:00:12 +07:00
|
|
|
AC_USE_SYSTEM_EXTENSIONS
|
2011-04-26 02:50:42 +07:00
|
|
|
AC_SYS_LARGEFILE
|
2013-04-04 23:06:05 +07:00
|
|
|
AC_PREFIX_DEFAULT([/usr])
|
2012-11-16 02:51:20 +07:00
|
|
|
|
|
|
|
AC_CONFIG_MACRO_DIR([m4])
|
|
|
|
AC_CONFIG_HEADERS([config.h])
|
|
|
|
|
2016-02-29 05:31:02 +07:00
|
|
|
AM_INIT_AUTOMAKE([foreign 1.11])
|
2012-04-04 02:24:46 +07:00
|
|
|
AM_SILENT_RULES([yes])
|
2010-02-03 20:21:48 +07:00
|
|
|
|
2012-04-04 02:24:46 +07:00
|
|
|
LT_PREREQ(2.2)
|
|
|
|
LT_INIT
|
2010-02-03 20:21:48 +07:00
|
|
|
|
2012-11-16 02:51:20 +07:00
|
|
|
# Checks for programs.
|
2010-05-16 23:34:31 +07:00
|
|
|
AC_PROG_MKDIR_P
|
|
|
|
AC_PROG_LN_S
|
|
|
|
AC_PROG_SED
|
2012-02-13 07:46:44 +07:00
|
|
|
AC_PROG_GREP
|
2011-08-01 05:43:05 +07:00
|
|
|
AC_PROG_AWK
|
2010-05-16 23:34:31 +07:00
|
|
|
|
2021-10-10 05:53:23 +07:00
|
|
|
AC_PROG_CC
|
2012-12-28 05:23:23 +07:00
|
|
|
AS_IF([test "x$ac_cv_prog_cc_c99" = "xno"], [
|
2021-12-15 02:43:36 +07:00
|
|
|
AC_MSG_ERROR([no C99 compiler found, $PACKAGE requires a C99 compiler.])
|
2012-12-28 05:23:23 +07:00
|
|
|
])
|
|
|
|
|
2012-11-16 02:51:20 +07:00
|
|
|
AC_PROG_CXX
|
|
|
|
AC_PROG_CPP
|
|
|
|
AC_PROG_INSTALL
|
|
|
|
AC_PROG_LN_S
|
|
|
|
AC_PROG_MAKE_SET
|
2010-02-03 20:21:48 +07:00
|
|
|
|
2012-04-04 02:24:46 +07:00
|
|
|
AC_PATH_PROG([M4], [m4])
|
2012-04-17 21:17:27 +07:00
|
|
|
|
2012-11-16 02:51:20 +07:00
|
|
|
# Checks for header files.
|
|
|
|
AC_CHECK_HEADERS(
|
2021-12-15 02:43:36 +07:00
|
|
|
[arpa/inet.h fcntl.h inttypes.h limits.h locale.h netinet/in.h sys/ioctl.h \
|
|
|
|
sys/mount.h sys/param.h sys/socket.h sys/statvfs.h sys/time.h sys/vfs.h \
|
|
|
|
syslog.h termios.h unistd.h],
|
|
|
|
[],
|
|
|
|
[AC_MSG_ERROR([*** POSIX header not found])]
|
2013-09-26 22:31:01 +07:00
|
|
|
)
|
|
|
|
|
|
|
|
AC_CHECK_HEADERS(
|
2021-12-15 02:43:36 +07:00
|
|
|
[mtd/mtd-user.h],
|
|
|
|
[],
|
|
|
|
[AC_MSG_ERROR([*** KERNEL header not found])]
|
2012-11-16 02:51:20 +07:00
|
|
|
)
|
|
|
|
|
2014-11-17 01:40:43 +07:00
|
|
|
AC_CHECK_HEADERS(
|
2021-12-15 02:43:36 +07:00
|
|
|
[linux/btrfs.h],
|
|
|
|
[],
|
|
|
|
[AC_MSG_WARN([*** KERNEL header not found])]
|
2014-11-17 01:40:43 +07:00
|
|
|
)
|
|
|
|
|
2012-11-16 02:51:20 +07:00
|
|
|
# Checks for typedefs, structures, and compiler characteristics.
|
|
|
|
AC_TYPE_UID_T
|
|
|
|
AC_C_INLINE
|
|
|
|
AC_TYPE_MODE_T
|
|
|
|
AC_TYPE_PID_T
|
|
|
|
AC_CHECK_MEMBERS([struct stat.st_rdev])
|
2016-03-21 21:58:20 +07:00
|
|
|
AC_CHECK_DECLS([getrandom, gettid, name_to_handle_at, accept4, mkostemp, ppoll, strndupa], [], [],
|
|
|
|
[[#include <fcntl.h>
|
|
|
|
#include <linux/random.h>
|
|
|
|
#include <poll.h>
|
|
|
|
#include <signal.h>
|
|
|
|
#include <stdlib.h>
|
2015-07-30 22:31:31 +07:00
|
|
|
#include <string.h>
|
2012-11-17 08:40:11 +07:00
|
|
|
#include <sys/mount.h>
|
2014-10-31 22:58:25 +07:00
|
|
|
#include <sys/socket.h>
|
2016-03-21 21:58:20 +07:00
|
|
|
#include <sys/types.h>
|
|
|
|
#include <unistd.h>]])
|
2012-11-17 08:40:11 +07:00
|
|
|
|
2014-05-16 05:42:28 +07:00
|
|
|
AC_CHECK_SIZEOF(pid_t)
|
|
|
|
AC_CHECK_SIZEOF(uid_t)
|
|
|
|
AC_CHECK_SIZEOF(gid_t)
|
hashmap: rewrite the implementation
We reintroduce hashmap.{h,c}, list.h and set.h verbatim from upstream,
before we punt dead code. The following is the upstream message:
This is a rewrite of the hashmap implementation. Its advantage is lower
memory usage.
It uses open addressing (entries are stored in an array, as opposed to
linked lists). Hash collisions are resolved with linear probing and
Robin Hood displacement policy. See the references in hashmap.c.
Some fun empirical findings about hashmap usage in systemd on my laptop:
- 98 % of allocated hashmaps are Sets.
- Sets contain 78 % of all entries, plain Hashmaps 17 %, and
OrderedHashmaps 5 %.
- 60 % of allocated hashmaps contain only 1 entry.
- 90 % of allocated hashmaps contain 5 or fewer entries.
- 75 % of all entries are in hashmaps that use trivial_hash_ops.
Clearly it makes sense to:
- store entries in distinct entry types. Especially for Sets - their
entries are the most numerous and they require the least information
to store an entry.
- have a way to store small numbers of entries directly in the hashmap
structs, and only allocate the usual entry arrays when the direct
storage is full.
The implementation has an optional debugging feature (enabled by
defining the ENABLE_HASHMAP_DEBUG macro), where it:
- tracks all allocated hashmaps in a linked list so that one can
easily find them in gdb,
- tracks which function/line allocated a given hashmap, and
- checks for invalid mixing of hashmap iteration and modification.
Since entries are not allocated one-by-one anymore, mempools are not
used for entries. Originally I meant to drop mempools entirely, but it's
still worth it to use them for the hashmap structs. My testing indicates
that it makes loading of units about 5 % faster (a test with 10000 units
where more than 200000 hashmaps are allocated - pure malloc: 449±4 ms,
mempools: 427±7 ms).
Here are some memory usage numbers, taken on my laptop with a more or
less normal Fedora setup after booting with SELinux disabled (SELinux
increases systemd's memory usage significantly):
systemd (PID 1) Original New Change
dirty memory (from pmap -x 1) [KiB] 2152 1264 -41 %
total heap allocations (from gdb-heap) [KiB] 1623 756 -53 %
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-11-01 00:28:12 +07:00
|
|
|
AC_CHECK_SIZEOF(dev_t)
|
2014-10-31 22:58:25 +07:00
|
|
|
AC_CHECK_SIZEOF(rlim_t,,[[
|
|
|
|
#include <sys/time.h>
|
|
|
|
#include <sys/resource.h>]])
|
2012-11-16 02:51:20 +07:00
|
|
|
|
|
|
|
# Checks for library functions.
|
|
|
|
AC_FUNC_CHOWN
|
|
|
|
AC_FUNC_FORK
|
|
|
|
AC_FUNC_FSEEKO
|
2012-11-18 04:22:12 +07:00
|
|
|
AC_FUNC_GETGROUPS
|
2012-11-16 02:51:20 +07:00
|
|
|
AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK
|
|
|
|
AC_HEADER_MAJOR
|
|
|
|
AC_FUNC_MMAP
|
2012-11-18 04:22:12 +07:00
|
|
|
|
2012-11-16 02:51:20 +07:00
|
|
|
AC_CHECK_FUNCS(
|
2021-12-15 02:43:36 +07:00
|
|
|
[alarm dup2 ftruncate localtime_r mempcpy mkdir munmap nl_langinfo rmdir \
|
|
|
|
setlocale socket stpcpy uname],
|
|
|
|
[],
|
|
|
|
[AC_MSG_ERROR([*** POSIX function not found])]
|
2012-11-16 02:51:20 +07:00
|
|
|
)
|
|
|
|
AC_SEARCH_LIBS([clock_gettime], [rt], [], [AC_MSG_ERROR([*** POSIX librt not found])])
|
2015-01-21 22:18:17 +07:00
|
|
|
LT_LIB_M
|
2012-09-03 04:28:30 +07:00
|
|
|
|
2012-11-24 01:48:49 +07:00
|
|
|
# ------------------------------------------------------------------------------
|
2010-11-24 03:12:11 +07:00
|
|
|
|
2012-11-24 00:29:06 +07:00
|
|
|
# TODO: the old python checks are irrelevant, but we do need python and perl for tests
|
2012-07-16 22:19:39 +07:00
|
|
|
|
2012-11-24 01:48:49 +07:00
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
# Set paths here
|
|
|
|
|
|
|
|
AC_ARG_WITH(
|
2021-12-15 02:43:36 +07:00
|
|
|
[rootprefix],
|
|
|
|
[AS_HELP_STRING(
|
|
|
|
[--with-rootprefix=DIR],
|
|
|
|
[rootfs directory prefix for config files and kernel modules])],
|
|
|
|
[],
|
|
|
|
[with_rootprefix="\${prefix}"]
|
2012-11-24 01:48:49 +07:00
|
|
|
)
|
|
|
|
|
|
|
|
AC_ARG_WITH(
|
2021-12-15 02:43:36 +07:00
|
|
|
[rootlibdir],
|
|
|
|
[AS_HELP_STRING(
|
|
|
|
[--with-rootlibdir=DIR],
|
|
|
|
[Root directory for libraries necessary for boot])],
|
|
|
|
[],
|
|
|
|
[with_rootlibdir=${libdir}]
|
2012-11-24 01:48:49 +07:00
|
|
|
)
|
|
|
|
|
2014-06-25 02:28:01 +07:00
|
|
|
AC_ARG_WITH(
|
2021-12-15 02:43:36 +07:00
|
|
|
[rootlibexecdir],
|
|
|
|
[AS_HELP_STRING(
|
|
|
|
[--with-rootlibexecdir=DIR],
|
|
|
|
[Root directory for libexecs necessary for boot])],
|
|
|
|
[],
|
|
|
|
[with_rootlibexecdir=${with_rootlibdir}/udev]
|
2014-06-25 02:28:01 +07:00
|
|
|
)
|
|
|
|
|
2015-03-25 11:48:36 +07:00
|
|
|
AC_ARG_WITH(
|
2021-12-15 02:43:36 +07:00
|
|
|
[rootrundir],
|
|
|
|
[AS_HELP_STRING(
|
|
|
|
[--with-rootrundir=DIR],
|
|
|
|
[Configurable path for /run])],
|
|
|
|
[],
|
|
|
|
[with_rootrundir=/run]
|
2015-03-25 11:48:36 +07:00
|
|
|
)
|
|
|
|
|
2012-11-24 01:48:49 +07:00
|
|
|
AC_ARG_ENABLE(
|
2021-12-15 02:43:36 +07:00
|
|
|
[split-usr],
|
|
|
|
[AS_HELP_STRING(
|
|
|
|
[--enable-split-usr],
|
|
|
|
[Include hard-coded default search paths in / and /usr])],
|
|
|
|
[],
|
|
|
|
[AS_IF(
|
|
|
|
[test "x${ac_default_prefix}" != "x${with_rootprefix}" && test "x${with_rootprefix}" != "x\${prefix}"],
|
|
|
|
[enable_split_usr=yes],
|
|
|
|
[enable_split_usr=no])]
|
2012-11-24 01:48:49 +07:00
|
|
|
)
|
|
|
|
|
|
|
|
AS_IF(
|
2021-12-15 02:43:36 +07:00
|
|
|
[test "x${enable_split_usr}" = "xyes"],
|
|
|
|
[AC_DEFINE(HAVE_SPLIT_USR, 1, [Define to include hard-coded default search paths in / and /usr])]
|
2012-11-24 01:48:49 +07:00
|
|
|
)
|
|
|
|
|
|
|
|
# Configured paths
|
2018-09-24 08:03:30 +07:00
|
|
|
AC_SUBST([rootprefix], [${with_rootprefix}])
|
|
|
|
AC_SUBST([rootlibdir], [${with_rootlibdir}])
|
2014-06-25 02:28:01 +07:00
|
|
|
AC_SUBST([rootlibexecdir], [${with_rootlibexecdir}])
|
|
|
|
AC_SUBST([udevlibexecdir], [${rootlibexecdir}])
|
2012-11-24 01:48:49 +07:00
|
|
|
|
|
|
|
# sysconfdir paths
|
|
|
|
AC_SUBST([udevconfdir],[${sysconfdir}/udev])
|
2012-11-24 06:56:16 +07:00
|
|
|
AC_SUBST([udevconffile],[${udevconfdir}/udev.conf])
|
|
|
|
AC_SUBST([udevhwdbdir],[${udevconfdir}/hwdb.d])
|
|
|
|
AC_SUBST([udevhwdbbin],[${udevconfdir}/hwdb.bin])
|
2013-01-05 02:34:52 +07:00
|
|
|
|
|
|
|
# udevlibexecdir paths
|
2013-01-04 23:33:33 +07:00
|
|
|
AC_SUBST([udevkeymapdir],[${udevlibexecdir}/keymaps])
|
2012-11-24 06:56:16 +07:00
|
|
|
AC_SUBST([udevkeymapforceredir],[${udevkeymapdir}/force-release])
|
2012-11-29 22:07:41 +07:00
|
|
|
AC_SUBST([udevrulesdir],[${udevlibexecdir}/rules.d])
|
2012-11-24 01:48:49 +07:00
|
|
|
|
|
|
|
# pkgconfigdir paths
|
2012-11-25 19:49:21 +07:00
|
|
|
AC_SUBST([pkgconfiglibdir], [${libdir}/pkgconfig])
|
2012-11-24 01:48:49 +07:00
|
|
|
AC_SUBST([sharepkgconfigdir],[${datadir}/pkgconfig])
|
|
|
|
|
2015-03-25 11:48:36 +07:00
|
|
|
AC_SUBST([rootrundir],[${with_rootrundir}])
|
|
|
|
|
2016-10-09 21:17:50 +07:00
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
AC_ARG_ENABLE([programs],
|
2021-12-15 02:43:36 +07:00
|
|
|
AS_HELP_STRING([--disable-programs], [disable programs (udevd, udevadm and helpers)]),
|
|
|
|
[], [enable_programs="yes"])
|
2016-10-09 21:17:50 +07:00
|
|
|
AM_CONDITIONAL([ENABLE_PROGRAMS], [test "x$enable_programs" = "xyes"])
|
|
|
|
|
2013-01-26 01:34:21 +07:00
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
have_blkid=no
|
|
|
|
AC_ARG_ENABLE(blkid, AS_HELP_STRING([--disable-blkid], [Disable optional blkid support]))
|
|
|
|
if test "x$enable_blkid" != "xno"; then
|
2021-12-15 02:43:36 +07:00
|
|
|
PKG_CHECK_MODULES([BLKID], [blkid >= 2.20],
|
|
|
|
[AC_DEFINE(HAVE_BLKID, 1, [Define if blkid is available]) have_blkid=yes], have_blkid=no)
|
|
|
|
if test "x$have_blkid" = xno && test "x$enable_blkid" = xyes; then
|
|
|
|
AC_MSG_ERROR([*** blkid support requested but not found])
|
|
|
|
fi
|
2013-01-26 01:34:21 +07:00
|
|
|
fi
|
2013-01-29 21:06:05 +07:00
|
|
|
AM_CONDITIONAL(HAVE_BLKID, [test "x$have_blkid" = "xyes"])
|
2013-01-26 01:34:21 +07:00
|
|
|
|
2012-04-04 02:24:46 +07:00
|
|
|
# ------------------------------------------------------------------------------
|
2011-02-08 17:44:38 +07:00
|
|
|
have_selinux=no
|
|
|
|
AC_ARG_ENABLE(selinux, AS_HELP_STRING([--disable-selinux], [Disable optional SELINUX support]))
|
|
|
|
if test "x$enable_selinux" != "xno"; then
|
2021-12-15 02:43:36 +07:00
|
|
|
PKG_CHECK_MODULES([SELINUX], [libselinux >= 2.1.9],
|
|
|
|
[AC_DEFINE(HAVE_SELINUX, 1, [Define if SELinux is available]) have_selinux=yes], have_selinux=no)
|
|
|
|
if test "x$have_selinux" = xno && test "x$enable_selinux" = xyes; then
|
|
|
|
AC_MSG_ERROR([*** SELinux support requested but libraries not found])
|
|
|
|
fi
|
Systemd is causing mislabeled devices to be created and then attempting to read them.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 07/28/2010 05:57 AM, Kay Sievers wrote:
> On Wed, Jul 28, 2010 at 11:43, Lennart Poettering
> <lennart@poettering.net> wrote:
>> On Mon, 26.07.10 16:42, Daniel J Walsh (dwalsh@redhat.com) wrote:
>>> tcontext=system_u:object_r:device_t:s0 tclass=chr_file
>>> type=1400 audit(1280174589.476:7): avc: denied { read } for pid=1
>>> comm="systemd" name="autofs" dev=devtmpfs ino=9482
>>> scontext=system_u:system_r:init_t:s0
>>> tcontext=system_u:object_r:device_t:s0 tclass=chr_file
>>> type=1400 audit(1280174589.476:8): avc: denied { read } for pid=1
>>> comm="systemd" name="autofs" dev=devtmpfs ino=9482
>>> scontext=system_u:system_r:init_t:s0
>>> tcontext=system_u:object_r:device_t:s0 tclass=chr_file
>>>
>>> Lennart, we talked about this earlier. I think this is caused by the
>>> modprobe calls to create /dev/autofs. Since udev is not created at the
>>> point that init loads the kernel modules, the devices get created with
>>> the wrong label. Once udev starts the labels get fixed.
>>>
>>> I can allow init_t to read device_t chr_files.
>>
>> Hmm, I think a cleaner fix would be to make systemd relabel this device
>> properly before accessing it? Given that this is only one device this
>> should not be a problem for us to maintain, I think? How would the
>> fixing of the label work? Would we have to spawn restorecon for this, or
>> can we actually do this in C without too much work?
>
> I guess we can just do what udev is doing, and call setfilecon(), with
> a context of an earlier matchpathcon().
>
> Kay
> _______________________________________________
> systemd-devel mailing list
> systemd-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Here is the updated patch with a fix for the labeling of /dev/autofs
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/
iEYEARECAAYFAkxQMyoACgkQrlYvE4MpobNviACfWgxsjW2xzz1qznFex8RVAQHf
gIEAmwRmRcLvGqYtwQaZ3WKIg8wmrwNk
=pC2e
2010-07-28 20:39:54 +07:00
|
|
|
fi
|
2011-02-08 17:44:38 +07:00
|
|
|
AM_CONDITIONAL(HAVE_SELINUX, [test "$have_selinux" = "yes"])
|
2012-06-07 21:03:33 +07:00
|
|
|
if test "x${have_selinux}" != xno ; then
|
2021-12-15 02:43:36 +07:00
|
|
|
sushell=/sbin/sushell
|
2012-06-07 21:03:33 +07:00
|
|
|
else
|
2021-12-15 02:43:36 +07:00
|
|
|
sushell=/bin/bash
|
2012-06-07 21:03:33 +07:00
|
|
|
fi
|
|
|
|
AC_SUBST(sushell)
|
Systemd is causing mislabeled devices to be created and then attempting to read them.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 07/28/2010 05:57 AM, Kay Sievers wrote:
> On Wed, Jul 28, 2010 at 11:43, Lennart Poettering
> <lennart@poettering.net> wrote:
>> On Mon, 26.07.10 16:42, Daniel J Walsh (dwalsh@redhat.com) wrote:
>>> tcontext=system_u:object_r:device_t:s0 tclass=chr_file
>>> type=1400 audit(1280174589.476:7): avc: denied { read } for pid=1
>>> comm="systemd" name="autofs" dev=devtmpfs ino=9482
>>> scontext=system_u:system_r:init_t:s0
>>> tcontext=system_u:object_r:device_t:s0 tclass=chr_file
>>> type=1400 audit(1280174589.476:8): avc: denied { read } for pid=1
>>> comm="systemd" name="autofs" dev=devtmpfs ino=9482
>>> scontext=system_u:system_r:init_t:s0
>>> tcontext=system_u:object_r:device_t:s0 tclass=chr_file
>>>
>>> Lennart, we talked about this earlier. I think this is caused by the
>>> modprobe calls to create /dev/autofs. Since udev is not created at the
>>> point that init loads the kernel modules, the devices get created with
>>> the wrong label. Once udev starts the labels get fixed.
>>>
>>> I can allow init_t to read device_t chr_files.
>>
>> Hmm, I think a cleaner fix would be to make systemd relabel this device
>> properly before accessing it? Given that this is only one device this
>> should not be a problem for us to maintain, I think? How would the
>> fixing of the label work? Would we have to spawn restorecon for this, or
>> can we actually do this in C without too much work?
>
> I guess we can just do what udev is doing, and call setfilecon(), with
> a context of an earlier matchpathcon().
>
> Kay
> _______________________________________________
> systemd-devel mailing list
> systemd-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/systemd-devel
Here is the updated patch with a fix for the labeling of /dev/autofs
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/
iEYEARECAAYFAkxQMyoACgkQrlYvE4MpobNviACfWgxsjW2xzz1qznFex8RVAQHf
gIEAmwRmRcLvGqYtwQaZ3WKIg8wmrwNk
=pC2e
2010-07-28 20:39:54 +07:00
|
|
|
|
2015-07-30 21:55:45 +07:00
|
|
|
# selinux-util.c uses struct mallinfo which is not available for all C libraries (musl).
|
|
|
|
AC_CHECK_FUNCS([mallinfo])
|
2021-12-15 02:56:06 +07:00
|
|
|
# mallinfo is deprecated, prefer to use mallinfo2 when available
|
|
|
|
AC_CHECK_FUNCS([mallinfo2])
|
2015-07-30 21:55:45 +07:00
|
|
|
|
2012-11-19 09:43:35 +07:00
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
AC_CHECK_DECL([unshare],
|
2021-12-15 02:43:36 +07:00
|
|
|
[AC_DEFINE(HAVE_UNSHARE, 1, [Define if unshare is declared])],
|
|
|
|
[AC_CHECK_DECL([SYS_unshare],
|
|
|
|
[ ] ,
|
|
|
|
[AC_MSG_ERROR([*** unshare nor SYS_unshare found.])],
|
|
|
|
[#include <syscall.h>])],
|
|
|
|
[#include <sched.h>])
|
2012-11-19 09:43:35 +07:00
|
|
|
|
2012-04-04 02:24:46 +07:00
|
|
|
# ------------------------------------------------------------------------------
|
2015-02-12 06:40:16 +07:00
|
|
|
AC_PATH_TOOL(GPERF, gperf)
|
|
|
|
if test -z "$GPERF" ; then
|
2021-12-15 02:43:36 +07:00
|
|
|
AC_MSG_ERROR([*** gperf not found])
|
2013-03-11 01:50:10 +07:00
|
|
|
fi
|
|
|
|
|
2012-11-16 02:51:20 +07:00
|
|
|
# ------------------------------------------------------------------------------
|
2015-05-30 19:25:51 +07:00
|
|
|
AC_ARG_ENABLE([manpages], AS_HELP_STRING([--disable-manpages],[disable manpages]),[],[enable_manpages=no])
|
|
|
|
AM_CONDITIONAL(ENABLE_MANPAGES, [test "x$enable_manpages" = "xyes"])
|
2012-02-11 03:44:14 +07:00
|
|
|
|
2012-11-23 12:20:15 +07:00
|
|
|
# ------------------------------------------------------------------------------
|
2015-02-12 06:06:47 +07:00
|
|
|
have_kmod=no
|
|
|
|
AC_ARG_ENABLE(kmod, AS_HELP_STRING([--disable-kmod], [disable loadable modules support]))
|
|
|
|
if test "x$enable_kmod" != "xno"; then
|
2021-12-15 02:43:36 +07:00
|
|
|
PKG_CHECK_EXISTS([ libkmod ], have_kmod=yes, have_kmod=no)
|
|
|
|
if test "x$have_kmod" = "xyes"; then
|
|
|
|
PKG_CHECK_MODULES(KMOD, [ libkmod >= 15 ],
|
|
|
|
[AC_DEFINE(HAVE_KMOD, 1, [Define if kmod is available])],
|
|
|
|
AC_MSG_ERROR([*** kmod version >= 15 not found]))
|
|
|
|
fi
|
|
|
|
if test "x$have_kmod" = xno && test "x$enable_kmod" = xyes; then
|
|
|
|
AC_MSG_ERROR([*** kmod support requested, but libraries not found])
|
|
|
|
fi
|
2012-11-23 12:20:15 +07:00
|
|
|
fi
|
2015-02-12 06:06:47 +07:00
|
|
|
AM_CONDITIONAL(HAVE_KMOD, [test "$have_kmod" = "yes"])
|
2012-11-19 23:49:42 +07:00
|
|
|
|
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
|
2015-05-30 19:50:28 +07:00
|
|
|
AC_ARG_ENABLE([hwdb], AS_HELP_STRING([--enable-hwdb],[install hwdb.d files]),[],[enable_hwdb=yes])
|
|
|
|
AM_CONDITIONAL(ENABLE_HWDB, [test "x$enable_hwdb" = "xyes"])
|
|
|
|
|
2015-09-23 00:53:41 +07:00
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
# rule-generator - persistent network and optical device rule generator
|
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
AC_ARG_ENABLE([rule-generator],
|
2021-12-15 02:43:36 +07:00
|
|
|
AS_HELP_STRING([--enable-rule-generator], [enable legacy persistent network, cdrom support]),
|
|
|
|
[], [enable_rule_generator=no])
|
2015-09-23 00:53:41 +07:00
|
|
|
|
|
|
|
if test "x${enable_rule_generator}" != xno; then
|
2021-12-15 02:43:36 +07:00
|
|
|
AC_DEFINE([ENABLE_RULE_GENERATOR], [1], [Define if we are enabling rule generator])
|
2015-09-23 00:53:41 +07:00
|
|
|
fi
|
|
|
|
|
|
|
|
AM_CONDITIONAL([ENABLE_RULE_GENERATOR], [test "x$enable_rule_generator" = xyes])
|
|
|
|
|
2016-12-21 21:07:27 +07:00
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
# mtd_probe - autoloads FTL module for mtd devices
|
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
AC_ARG_ENABLE([mtd_probe],
|
2021-12-15 02:43:36 +07:00
|
|
|
AS_HELP_STRING([--disable-mtd_probe], [disable MTD support]),
|
|
|
|
[], [enable_mtd_probe=yes])
|
2016-12-21 21:07:27 +07:00
|
|
|
AM_CONDITIONAL([ENABLE_MTD_PROBE], [test "x$enable_mtd_probe" = xyes])
|
|
|
|
|
2015-05-30 19:50:28 +07:00
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
|
2012-11-16 02:51:20 +07:00
|
|
|
AC_CONFIG_FILES([Makefile
|
2021-12-15 02:43:36 +07:00
|
|
|
hwdb/Makefile
|
|
|
|
man/Makefile
|
|
|
|
rule_generator/Makefile
|
|
|
|
rule_generator/write_net_rules
|
|
|
|
rules/Makefile
|
|
|
|
src/Makefile
|
|
|
|
src/ata_id/Makefile
|
|
|
|
src/cdrom_id/Makefile
|
|
|
|
src/collect/Makefile
|
|
|
|
src/mtd_probe/Makefile
|
|
|
|
src/scsi_id/Makefile
|
|
|
|
src/v4l_id/Makefile
|
|
|
|
src/shared/Makefile
|
|
|
|
src/libudev/Makefile
|
|
|
|
src/libudev/libudev.pc
|
|
|
|
src/udev/Makefile
|
|
|
|
src/udev/udev.pc
|
|
|
|
test/Makefile])
|
2012-11-18 04:22:12 +07:00
|
|
|
|
2010-06-02 23:53:19 +07:00
|
|
|
AC_OUTPUT
|
2012-11-23 09:51:53 +07:00
|
|
|
|
2012-11-25 11:47:06 +07:00
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
AC_MSG_RESULT([
|
2021-12-15 02:43:36 +07:00
|
|
|
prefix: ${prefix}
|
|
|
|
exec_prefix: ${exec_prefix}
|
|
|
|
sysconfdir: ${sysconfdir}
|
|
|
|
datadir: ${datadir}
|
|
|
|
includedir: ${includedir}
|
|
|
|
bindir: ${bindir}
|
|
|
|
libdir: ${libdir}
|
|
|
|
|
|
|
|
rootprefix: ${rootprefix}
|
|
|
|
rootlibdir: ${rootlibdir}
|
|
|
|
rootlibexecdir: ${rootlibexecdir}
|
|
|
|
datarootdir: ${datarootdir}
|
|
|
|
rootrundir: ${rootrundir}
|
|
|
|
|
|
|
|
udevconfdir: ${udevconfdir}
|
|
|
|
udevconffile: ${udevconffile}
|
|
|
|
udevhwdbdir: ${udevhwdbdir}
|
|
|
|
udevhwdbbin: ${udevhwdbbin}
|
|
|
|
udevlibexecdir: ${udevlibexecdir}
|
|
|
|
udevkeymapdir: ${udevkeymapdir}
|
|
|
|
udevkeymapforceredir: ${udevkeymapforceredir}
|
|
|
|
udevrulesdir: ${udevrulesdir}
|
|
|
|
|
|
|
|
pkgconfiglibdir: ${libdir}/pkgconfig
|
|
|
|
sharepkgconfigdir ${datadir}/pkgconfig
|
2012-11-25 11:47:06 +07:00
|
|
|
])
|
|
|
|
|
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
|
2012-11-23 09:51:53 +07:00
|
|
|
dnl Set configured scripts executable
|
|
|
|
if test -f src/keymap/check-keymaps.sh; then
|
2021-12-15 02:43:36 +07:00
|
|
|
chmod +x src/keymap/check-keymaps.sh
|
2012-11-23 09:51:53 +07:00
|
|
|
fi
|
|
|
|
|
|
|
|
if test -f src/keymap/keyboard-force-release.sh; then
|
2021-12-15 02:43:36 +07:00
|
|
|
chmod +x src/keymap/keyboard-force-release.sh
|
2012-11-23 09:51:53 +07:00
|
|
|
fi
|
2012-11-25 11:47:06 +07:00
|
|
|
|