2012-11-16 03:51:20 +08:00
|
|
|
|
|
|
|
AC_PREREQ([2.68])
|
2014-10-30 04:20:14 +08:00
|
|
|
AC_INIT([eudev],[2.1.1],[https://github.com/gentoo/eudev/issues])
|
2014-10-29 08:53:04 +08:00
|
|
|
AC_SUBST(UDEV_VERSION, 217)
|
2012-11-16 03:51:20 +08:00
|
|
|
AC_CONFIG_SRCDIR([src/udev/udevd.c])
|
2011-10-03 06:31:59 +08:00
|
|
|
|
2011-04-26 04:00:12 +08:00
|
|
|
AC_USE_SYSTEM_EXTENSIONS
|
2011-04-26 03:50:42 +08:00
|
|
|
AC_SYS_LARGEFILE
|
2013-04-05 00:06:05 +08:00
|
|
|
AC_PREFIX_DEFAULT([/usr])
|
2012-11-16 03:51:20 +08:00
|
|
|
|
|
|
|
AC_CONFIG_MACRO_DIR([m4])
|
|
|
|
AC_CONFIG_HEADERS([config.h])
|
|
|
|
|
2014-09-16 05:01:33 +08:00
|
|
|
AM_INIT_AUTOMAKE([foreign 1.13])
|
2012-04-04 03:24:46 +08:00
|
|
|
AM_SILENT_RULES([yes])
|
2010-02-03 21:21:48 +08:00
|
|
|
|
2012-04-04 03:24:46 +08:00
|
|
|
LT_PREREQ(2.2)
|
|
|
|
LT_INIT
|
2010-02-03 21:21:48 +08:00
|
|
|
|
2012-11-16 03:51:20 +08:00
|
|
|
# Checks for programs.
|
2010-05-17 00:34:31 +08:00
|
|
|
AC_PROG_MKDIR_P
|
|
|
|
AC_PROG_LN_S
|
|
|
|
AC_PROG_SED
|
2012-02-13 08:46:44 +08:00
|
|
|
AC_PROG_GREP
|
2011-08-01 06:43:05 +08:00
|
|
|
AC_PROG_AWK
|
2010-05-17 00:34:31 +08:00
|
|
|
|
2012-12-28 06:23:23 +08:00
|
|
|
AC_PROG_CC_C99
|
|
|
|
AS_IF([test "x$ac_cv_prog_cc_c99" = "xno"], [
|
2013-03-15 06:05:30 +08:00
|
|
|
AC_MSG_ERROR([no C99 compiler found, $PACKAGE requires a C99 compiler.])
|
2012-12-28 06:23:23 +08:00
|
|
|
])
|
|
|
|
|
2012-11-16 03:51:20 +08:00
|
|
|
AC_PROG_CXX
|
|
|
|
AC_PROG_CPP
|
|
|
|
AC_PROG_INSTALL
|
|
|
|
AC_PROG_LN_S
|
|
|
|
AC_PROG_MAKE_SET
|
2010-02-03 21:21:48 +08:00
|
|
|
|
2012-04-04 03:24:46 +08:00
|
|
|
AC_PATH_PROG([M4], [m4])
|
2012-08-25 07:57:03 +08:00
|
|
|
AC_PATH_PROG([XSLTPROC], [xsltproc])
|
2012-04-17 22:17:27 +08:00
|
|
|
|
2012-11-16 03:51:20 +08:00
|
|
|
# Checks for header files.
|
|
|
|
AC_CHECK_HEADERS(
|
2013-03-15 06:05:30 +08:00
|
|
|
[arpa/inet.h fcntl.h inttypes.h langinfo.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 23:31:01 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
AC_CHECK_HEADERS(
|
2014-08-05 20:32:35 +08:00
|
|
|
[linux/btrfs.h mtd/mtd-user.h],
|
2013-09-26 23:31:01 +08:00
|
|
|
[],
|
|
|
|
[AC_MSG_ERROR([*** KERNEL header not found])]
|
2012-11-16 03:51:20 +08: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])
|
2014-05-13 22:52:30 +08:00
|
|
|
AC_CHECK_DECLS([gettid, name_to_handle_at, accept4, mkostemp], [], [], [[#include <sys/types.h>
|
2012-11-17 09:40:11 +08:00
|
|
|
#include <unistd.h>
|
|
|
|
#include <sys/mount.h>
|
2012-11-18 15:15:16 +08:00
|
|
|
#include <fcntl.h>
|
|
|
|
#include <sys/socket.h>]])
|
2012-11-17 09:40:11 +08:00
|
|
|
|
2014-05-16 06:42:28 +08:00
|
|
|
AC_CHECK_SIZEOF(pid_t)
|
|
|
|
AC_CHECK_SIZEOF(uid_t)
|
|
|
|
AC_CHECK_SIZEOF(gid_t)
|
|
|
|
AC_CHECK_SIZEOF(time_t)
|
|
|
|
AC_CHECK_SIZEOF(rlim_t,,[
|
|
|
|
#include <sys/time.h>
|
|
|
|
#include <sys/resource.h>
|
|
|
|
])
|
2012-11-16 03:51:20 +08:00
|
|
|
|
|
|
|
# Checks for library functions.
|
|
|
|
AC_FUNC_CHOWN
|
|
|
|
AC_FUNC_FORK
|
|
|
|
AC_FUNC_FSEEKO
|
2012-11-18 05:22:12 +08:00
|
|
|
AC_FUNC_GETGROUPS
|
2012-11-16 03:51:20 +08:00
|
|
|
AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK
|
|
|
|
AC_HEADER_MAJOR
|
|
|
|
AC_FUNC_MMAP
|
2012-11-18 05:22:12 +08:00
|
|
|
|
2012-11-16 03:51:20 +08:00
|
|
|
AC_CHECK_FUNCS(
|
2013-03-15 06:05:30 +08: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 03:51:20 +08:00
|
|
|
)
|
|
|
|
AC_SEARCH_LIBS([clock_gettime], [rt], [], [AC_MSG_ERROR([*** POSIX librt not found])])
|
|
|
|
AC_SEARCH_LIBS([sqrt], [m], [], [AC_MSG_ERROR([*** POSIX libm not found])])
|
2012-09-03 05:28:30 +08:00
|
|
|
|
2012-11-24 02:48:49 +08:00
|
|
|
# ------------------------------------------------------------------------------
|
2010-11-24 04:12:11 +08:00
|
|
|
|
2012-11-24 01:29:06 +08:00
|
|
|
# TODO: the old python checks are irrelevant, but we do need python and perl for tests
|
2012-07-16 23:19:39 +08:00
|
|
|
|
2012-11-24 02:48:49 +08:00
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
# Set paths here
|
|
|
|
|
|
|
|
AC_ARG_WITH(
|
2013-03-15 06:05:30 +08:00
|
|
|
[rootprefix],
|
|
|
|
[AS_HELP_STRING(
|
|
|
|
[--with-rootprefix=DIR],
|
|
|
|
[rootfs directory prefix for config files and kernel modules])],
|
|
|
|
[],
|
2013-04-05 00:50:17 +08:00
|
|
|
[with_rootprefix="\${prefix}"]
|
2012-11-24 02:48:49 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
AC_ARG_WITH(
|
2013-03-15 06:05:30 +08:00
|
|
|
[rootlibdir],
|
|
|
|
[AS_HELP_STRING(
|
|
|
|
[--with-rootlibdir=DIR],
|
|
|
|
[Root directory for libraries necessary for boot])],
|
|
|
|
[],
|
|
|
|
[with_rootlibdir=${libdir}]
|
2012-11-24 02:48:49 +08:00
|
|
|
)
|
|
|
|
|
2014-06-25 03:28:01 +08:00
|
|
|
AC_ARG_WITH(
|
|
|
|
[rootlibexecdir],
|
|
|
|
[AS_HELP_STRING(
|
|
|
|
[--with-rootlibexecdir=DIR],
|
|
|
|
[Root directory for libexecs necessary for boot])],
|
|
|
|
[],
|
|
|
|
[with_rootlibexecdir=${with_rootlibdir}/udev]
|
|
|
|
)
|
|
|
|
|
2012-11-24 02:48:49 +08:00
|
|
|
AC_ARG_ENABLE(
|
2013-03-15 06:05:30 +08:00
|
|
|
[split-usr],
|
|
|
|
[AS_HELP_STRING(
|
|
|
|
[--enable-split-usr],
|
|
|
|
[Include hard-coded default search paths in / and /usr])],
|
|
|
|
[],
|
|
|
|
[AS_IF(
|
2013-04-05 00:50:17 +08:00
|
|
|
[test "x${ac_default_prefix}" != "x${with_rootprefix}" && test "x${with_rootprefix}" != "x\${prefix}"],
|
2013-03-15 06:05:30 +08:00
|
|
|
[enable_split_usr=yes],
|
|
|
|
[enable_split_usr=no])]
|
2012-11-24 02:48:49 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
AS_IF(
|
2013-03-15 06:05:30 +08: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 02:48:49 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
# Configured paths
|
|
|
|
AC_SUBST([rootprefix], [$with_rootprefix])
|
|
|
|
AC_SUBST([rootlibdir], [$with_rootlibdir])
|
2014-06-25 03:28:01 +08:00
|
|
|
AC_SUBST([rootlibexecdir], [${with_rootlibexecdir}])
|
|
|
|
AC_SUBST([udevlibexecdir], [${rootlibexecdir}])
|
2012-11-24 02:48:49 +08:00
|
|
|
|
|
|
|
# sysconfdir paths
|
|
|
|
AC_SUBST([udevconfdir],[${sysconfdir}/udev])
|
2012-11-24 07:56:16 +08:00
|
|
|
AC_SUBST([udevconffile],[${udevconfdir}/udev.conf])
|
|
|
|
AC_SUBST([udevhwdbdir],[${udevconfdir}/hwdb.d])
|
|
|
|
AC_SUBST([udevhwdbbin],[${udevconfdir}/hwdb.bin])
|
2013-01-05 03:34:52 +08:00
|
|
|
|
|
|
|
# udevlibexecdir paths
|
2013-01-05 00:33:33 +08:00
|
|
|
AC_SUBST([udevkeymapdir],[${udevlibexecdir}/keymaps])
|
2012-11-24 07:56:16 +08:00
|
|
|
AC_SUBST([udevkeymapforceredir],[${udevkeymapdir}/force-release])
|
2012-11-29 23:07:41 +08:00
|
|
|
AC_SUBST([udevrulesdir],[${udevlibexecdir}/rules.d])
|
2012-11-24 02:48:49 +08:00
|
|
|
|
|
|
|
# pkgconfigdir paths
|
2012-11-25 20:49:21 +08:00
|
|
|
AC_SUBST([pkgconfiglibdir], [${libdir}/pkgconfig])
|
2012-11-24 02:48:49 +08:00
|
|
|
AC_SUBST([sharepkgconfigdir],[${datadir}/pkgconfig])
|
|
|
|
|
2012-11-26 08:44:28 +08:00
|
|
|
# gudev paths
|
|
|
|
AC_SUBST([libgudev_includedir],[${includedir}/gudev-1.0/gudev])
|
|
|
|
|
|
|
|
# introspection paths
|
|
|
|
AC_SUBST([girdir], [${datadir}/gir-1.0])
|
|
|
|
AC_SUBST([typelibsdir], [${libdir}/girepository-1.0])
|
|
|
|
|
2012-11-16 09:18:22 +08:00
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
GOBJECT_INTROSPECTION_CHECK([1.31.1])
|
2012-11-26 04:37:04 +08:00
|
|
|
AM_CONDITIONAL([HAVE_INTROSPECTION], [test "$enable_introspection" = "yes"])
|
2012-11-16 09:18:22 +08:00
|
|
|
|
2013-01-26 02:34:21 +08:00
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
have_blkid=no
|
|
|
|
AC_ARG_ENABLE(blkid, AS_HELP_STRING([--disable-blkid], [Disable optional blkid support]))
|
|
|
|
if test "x$enable_blkid" != "xno"; then
|
|
|
|
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 -a "x$enable_blkd" = xyes; then
|
|
|
|
AC_MSG_ERROR([*** blkid support requested but not found])
|
|
|
|
fi
|
|
|
|
fi
|
2013-01-29 22:06:05 +08:00
|
|
|
AM_CONDITIONAL(HAVE_BLKID, [test "x$have_blkid" = "xyes"])
|
2013-01-26 02:34:21 +08:00
|
|
|
|
2012-04-04 03:24:46 +08:00
|
|
|
# ------------------------------------------------------------------------------
|
2011-02-08 18:44:38 +08:00
|
|
|
have_selinux=no
|
|
|
|
AC_ARG_ENABLE(selinux, AS_HELP_STRING([--disable-selinux], [Disable optional SELINUX support]))
|
|
|
|
if test "x$enable_selinux" != "xno"; then
|
2012-09-20 16:20:49 +08:00
|
|
|
PKG_CHECK_MODULES([SELINUX], [libselinux >= 2.1.9],
|
2011-02-08 18:44:38 +08:00
|
|
|
[AC_DEFINE(HAVE_SELINUX, 1, [Define if SELinux is available]) have_selinux=yes], have_selinux=no)
|
|
|
|
if test "x$have_selinux" = xno -a "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 21:39:54 +08:00
|
|
|
fi
|
2011-02-08 18:44:38 +08:00
|
|
|
AM_CONDITIONAL(HAVE_SELINUX, [test "$have_selinux" = "yes"])
|
2012-06-07 22:03:33 +08:00
|
|
|
if test "x${have_selinux}" != xno ; then
|
|
|
|
sushell=/sbin/sushell
|
|
|
|
else
|
|
|
|
sushell=/bin/bash
|
|
|
|
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 21:39:54 +08:00
|
|
|
|
2012-11-19 10:43:35 +08:00
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
AC_CHECK_DECL([unshare],
|
|
|
|
[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-04-04 03:24:46 +08:00
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
AC_ARG_ENABLE([gudev],
|
|
|
|
AS_HELP_STRING([--disable-gudev], [disable Gobject libudev support @<:@default=enabled@:>@]),
|
|
|
|
[], [enable_gudev=yes])
|
|
|
|
AS_IF([test "x$enable_gudev" = "xyes"], [ PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.22.0 gobject-2.0 >= 2.22.0]) ])
|
|
|
|
AM_CONDITIONAL([ENABLE_GUDEV], [test "x$enable_gudev" = "xyes"])
|
|
|
|
|
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
AC_ARG_ENABLE([keymap],
|
2013-03-11 02:50:10 +08:00
|
|
|
AS_HELP_STRING([--disable-keymap], [disable keymap fixup support @<:@default=enabled@:>@]),
|
|
|
|
[], [enable_keymap=yes])
|
|
|
|
|
|
|
|
if test "x$enable_keymap" = "xyes"; then
|
|
|
|
AC_PATH_TOOL(GPERF, gperf)
|
|
|
|
if test -z "$GPERF" ; then
|
|
|
|
AC_MSG_ERROR([*** gperf not found])
|
|
|
|
fi
|
2013-07-25 02:00:06 +08:00
|
|
|
AC_DEFINE([ENABLE_KEYMAP], [1], [Define if we are enabling rule generator])
|
2013-03-11 02:50:10 +08:00
|
|
|
fi
|
|
|
|
|
2012-04-04 03:24:46 +08:00
|
|
|
AM_CONDITIONAL([ENABLE_KEYMAP], [test "x$enable_keymap" = "xyes"])
|
|
|
|
|
2012-11-16 03:51:20 +08:00
|
|
|
# ------------------------------------------------------------------------------
|
2012-11-23 23:40:08 +08:00
|
|
|
|
|
|
|
GTK_DOC_CHECK([1.18],[--flavour no-tmpl])
|
|
|
|
AM_CONDITIONAL([ENABLE_GTK_DOC],[test "x$enable_gtk_doc" = "xyes"])
|
|
|
|
|
|
|
|
AS_IF([test "x$enable_gtk_doc" = "xyes" -a "x$XSLTPROC" = x], [
|
2013-03-15 06:05:30 +08:00
|
|
|
AC_MSG_ERROR([*** GTK doc requested but xsltproc not found])
|
2012-11-23 23:40:08 +08:00
|
|
|
])
|
|
|
|
|
2012-04-04 03:24:46 +08:00
|
|
|
# ------------------------------------------------------------------------------
|
2014-03-21 08:51:06 +08:00
|
|
|
|
|
|
|
AC_ARG_VAR([XML_CATALOG_FILES],[Used to find Docbook catalog (to build man pages)])
|
|
|
|
AC_ARG_ENABLE([manpages], AS_HELP_STRING([--disable-manpages], [disable manpages]))
|
|
|
|
|
|
|
|
if test "x$enable_manpages" != "xno" -a "x$XSLTPROC" != "x"; then
|
|
|
|
AC_MSG_CHECKING([for local Docbook stylesheets])
|
|
|
|
$XSLTPROC --nonet http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl >/dev/null 2>&1 << END
|
|
|
|
<?xml version="1.0" encoding='ISO-8859-1'?>
|
|
|
|
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
|
|
|
|
<book id="test">
|
|
|
|
</book>
|
|
|
|
END
|
|
|
|
if test "$?" = 0; then
|
|
|
|
docbook_ok=yes
|
|
|
|
XSLTPROC_FLAGS=--nonet
|
|
|
|
AC_MSG_RESULT(${docbook_ok})
|
|
|
|
else
|
|
|
|
AC_MSG_RESULT([no])
|
|
|
|
AC_MSG_CHECKING([for Docbook stylesheets via internet(use '--disable-manpages' flag to omit)])
|
|
|
|
$XSLTPROC http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl >/dev/null 2>&1 << END
|
|
|
|
<?xml version="1.0" encoding='ISO-8859-1'?>
|
|
|
|
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
|
|
|
|
<book id="test">
|
|
|
|
</book>
|
|
|
|
END
|
|
|
|
if test "$?" = 0; then
|
|
|
|
docbook_ok=yes
|
|
|
|
XSLTPROC_FLAGS=
|
|
|
|
else
|
|
|
|
docbook_ok=no
|
|
|
|
fi
|
|
|
|
AC_MSG_RESULT(${docbook_ok})
|
|
|
|
fi
|
|
|
|
|
|
|
|
AS_IF([test "x${docbook_ok}" = "xyes"],[have_manpages=yes], [
|
|
|
|
AC_MSG_WARN([Manpages requested but docbook not enabled. Manpages disabled!])
|
2012-08-25 07:57:03 +08:00
|
|
|
])
|
2014-03-21 08:51:06 +08:00
|
|
|
fi
|
2012-08-25 07:57:03 +08:00
|
|
|
AM_CONDITIONAL(ENABLE_MANPAGES, [test "x$have_manpages" = "xyes"])
|
2014-03-21 08:51:06 +08:00
|
|
|
AC_SUBST(XSLTPROC_FLAGS)
|
2012-02-11 04:44:14 +08:00
|
|
|
|
2012-11-23 13:20:15 +08:00
|
|
|
# ------------------------------------------------------------------------------
|
2012-11-20 00:49:42 +08:00
|
|
|
|
2013-01-23 03:32:21 +08:00
|
|
|
AC_ARG_ENABLE(modules, [AS_HELP_STRING([--disable-modules], [Disable loadable module support @<:@default=enabled@:>@])], [], [enable_modules=yes])
|
2012-12-03 08:10:21 +08:00
|
|
|
AC_ARG_ENABLE(libkmod, [AS_HELP_STRING([--enable-libkmod], [Enable module loading through kmod @<:@default=disabled@:>@])], [], [enable_libkmod=no])
|
2012-11-23 13:20:15 +08:00
|
|
|
|
2012-12-03 08:10:21 +08:00
|
|
|
if test "x${enable_modules}" = xyes; then
|
2012-11-23 13:20:15 +08:00
|
|
|
|
2013-03-15 06:05:30 +08:00
|
|
|
AC_DEFINE([HAVE_MODULES], [1], [Define if we support loading modules])
|
2012-11-23 13:20:15 +08:00
|
|
|
|
2013-03-15 06:05:30 +08:00
|
|
|
AS_IF([test "x${enable_libkmod}" = xyes],
|
|
|
|
[AC_CHECK_LIB([kmod], [main],
|
Revert "static-nodes: remove creation of static nodes if HAVE_LIBKMOD"
This reverts commit aa417a4d83999f6d7f092161d5c411b8cbce9977.
Preface: The kmod+tmpfiles static dev-node creation requires two commands to
be executed at runtime -- it is not something that will automatically occur
without a system's setup being explicitly designed or changed so that these
commands are executed.
Preface2: In order for the kmod+tmpfiles static dev-node creation to work
properly, that -must- be executed at startup before {systemd-,}udevd starts.
The reason for this is because udevd will only set permissions on those files
at startup, and so if udevd starts beforehand then these nodes will exist with
permissions that are (probably) too restrictive.
The function in udevd which creates static-nodes is non-fatal and only updates
mtime on the devnodes if they already exist. As such, if a system is configured
to execute kmod+tmpfiles to create static-nodes, because that must occur first,
eudev's udevd will not conflict. Also, if a system does not execute kmod+tmpfiles,
then eudev will still create the static devnodes, even if kmod-14 or higher is
installed.
There *may* be a conflict if kmod+tmpfiles is executed after udevd starts, but
as per "preface2" this is not a supported configuration.
Signed-off-by: Ian Stakenvicius <axs@gentoo.org>
2013-08-01 00:52:39 +08:00
|
|
|
[PKG_CHECK_MODULES(KMOD, [libkmod >= 5])
|
2013-03-15 06:05:30 +08:00
|
|
|
AC_SUBST([LIBKMOD], ["-lkmod"])
|
|
|
|
AC_DEFINE([HAVE_LIBKMOD], [1],
|
Revert "static-nodes: remove creation of static nodes if HAVE_LIBKMOD"
This reverts commit aa417a4d83999f6d7f092161d5c411b8cbce9977.
Preface: The kmod+tmpfiles static dev-node creation requires two commands to
be executed at runtime -- it is not something that will automatically occur
without a system's setup being explicitly designed or changed so that these
commands are executed.
Preface2: In order for the kmod+tmpfiles static dev-node creation to work
properly, that -must- be executed at startup before {systemd-,}udevd starts.
The reason for this is because udevd will only set permissions on those files
at startup, and so if udevd starts beforehand then these nodes will exist with
permissions that are (probably) too restrictive.
The function in udevd which creates static-nodes is non-fatal and only updates
mtime on the devnodes if they already exist. As such, if a system is configured
to execute kmod+tmpfiles to create static-nodes, because that must occur first,
eudev's udevd will not conflict. Also, if a system does not execute kmod+tmpfiles,
then eudev will still create the static devnodes, even if kmod-14 or higher is
installed.
There *may* be a conflict if kmod+tmpfiles is executed after udevd starts, but
as per "preface2" this is not a supported configuration.
Signed-off-by: Ian Stakenvicius <axs@gentoo.org>
2013-08-01 00:52:39 +08:00
|
|
|
[Define if you have libkmod])
|
2013-03-15 06:05:30 +08:00
|
|
|
],
|
|
|
|
[AC_MSG_FAILURE(
|
|
|
|
[--enable-libkmod was given, but test for kmod failed])],
|
|
|
|
[-lkmod])])
|
2012-11-23 13:20:15 +08:00
|
|
|
|
|
|
|
fi
|
|
|
|
|
2012-12-03 08:10:21 +08:00
|
|
|
AM_CONDITIONAL([HAVE_MODULES], [test "x${enable_modules}" = xyes])
|
|
|
|
AM_CONDITIONAL([HAVE_LIBKMOD], [test "x${enable_libkmod}" = xyes])
|
2012-11-23 13:20:15 +08:00
|
|
|
|
Revert "static-nodes: remove creation of static nodes if HAVE_LIBKMOD"
This reverts commit aa417a4d83999f6d7f092161d5c411b8cbce9977.
Preface: The kmod+tmpfiles static dev-node creation requires two commands to
be executed at runtime -- it is not something that will automatically occur
without a system's setup being explicitly designed or changed so that these
commands are executed.
Preface2: In order for the kmod+tmpfiles static dev-node creation to work
properly, that -must- be executed at startup before {systemd-,}udevd starts.
The reason for this is because udevd will only set permissions on those files
at startup, and so if udevd starts beforehand then these nodes will exist with
permissions that are (probably) too restrictive.
The function in udevd which creates static-nodes is non-fatal and only updates
mtime on the devnodes if they already exist. As such, if a system is configured
to execute kmod+tmpfiles to create static-nodes, because that must occur first,
eudev's udevd will not conflict. Also, if a system does not execute kmod+tmpfiles,
then eudev will still create the static devnodes, even if kmod-14 or higher is
installed.
There *may* be a conflict if kmod+tmpfiles is executed after udevd starts, but
as per "preface2" this is not a supported configuration.
Signed-off-by: Ian Stakenvicius <axs@gentoo.org>
2013-08-01 00:52:39 +08:00
|
|
|
|
2012-11-20 00:49:42 +08:00
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
AC_ARG_WITH([modprobe],
|
|
|
|
[AS_HELP_STRING([--with-modprobe=modprobe],
|
|
|
|
[specify location of modprobe when -- @<:@default=$sbindir/modprobe@:>@])],
|
|
|
|
[],
|
|
|
|
[with_modprobe="${sbindir}/modprobe"])
|
|
|
|
|
|
|
|
AC_SUBST([MODPROBE], ["${with_modprobe}"])
|
|
|
|
|
2012-12-13 22:11:49 +08:00
|
|
|
# ------------------------------------------------------------------------------
|
2013-01-15 02:25:57 +08:00
|
|
|
# rule-generator - persistent network and optical device rule generator
|
2012-12-13 22:11:49 +08:00
|
|
|
# ------------------------------------------------------------------------------
|
2013-01-15 02:25:57 +08:00
|
|
|
AC_ARG_ENABLE([rule-generator],
|
|
|
|
AS_HELP_STRING([--enable-rule-generator], [enable legacy persistent network, cdrom support]),
|
2012-12-13 22:11:49 +08:00
|
|
|
[], [enable_rule_generator=no])
|
|
|
|
|
2013-04-08 10:19:54 +08:00
|
|
|
if test "x${enable_rule_generator}" != xno; then
|
|
|
|
AC_DEFINE([ENABLE_RULE_GENERATOR], [1], [Define if we are enabling rule generator])
|
|
|
|
fi
|
|
|
|
|
2012-12-13 22:11:49 +08:00
|
|
|
AM_CONDITIONAL([ENABLE_RULE_GENERATOR], [test "x$enable_rule_generator" = xyes])
|
|
|
|
|
2012-11-20 00:49:42 +08:00
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
|
2012-11-16 03:51:20 +08:00
|
|
|
AC_CONFIG_FILES([Makefile
|
2012-11-16 09:18:22 +08:00
|
|
|
docs/Makefile
|
2012-11-16 03:51:20 +08:00
|
|
|
docs/gudev/Makefile
|
2012-11-18 05:22:12 +08:00
|
|
|
docs/gudev/version.xml
|
2012-11-16 09:18:22 +08:00
|
|
|
docs/libudev/Makefile
|
2012-11-18 05:22:12 +08:00
|
|
|
docs/libudev/version.xml
|
2012-11-16 09:18:22 +08:00
|
|
|
hwdb/Makefile
|
|
|
|
man/Makefile
|
|
|
|
rules/Makefile
|
2012-12-13 22:11:49 +08:00
|
|
|
rule_generator/Makefile
|
2013-01-15 02:25:57 +08:00
|
|
|
rule_generator/write_cd_rules
|
|
|
|
rule_generator/write_net_rules
|
2012-11-16 09:18:22 +08:00
|
|
|
src/Makefile
|
2012-11-18 09:29:02 +08:00
|
|
|
src/accelerometer/Makefile
|
|
|
|
src/ata_id/Makefile
|
|
|
|
src/cdrom_id/Makefile
|
|
|
|
src/collect/Makefile
|
|
|
|
src/mtd_probe/Makefile
|
|
|
|
src/scsi_id/Makefile
|
|
|
|
src/v4l_id/Makefile
|
2012-11-16 09:18:22 +08:00
|
|
|
src/gudev/Makefile
|
2012-11-18 05:22:12 +08:00
|
|
|
src/gudev/gudev-1.0.pc
|
2014-08-06 07:22:24 +08:00
|
|
|
src/shared/Makefile
|
2012-11-16 09:18:22 +08:00
|
|
|
src/libudev/Makefile
|
2012-11-18 05:22:12 +08:00
|
|
|
src/libudev/libudev.pc
|
2012-11-16 09:18:22 +08:00
|
|
|
src/udev/Makefile
|
2012-11-16 12:11:59 +08:00
|
|
|
src/udev/udev.pc
|
2012-11-18 05:22:12 +08:00
|
|
|
test/Makefile])
|
|
|
|
|
2010-06-03 00:53:19 +08:00
|
|
|
AC_OUTPUT
|
2012-11-23 10:51:53 +08:00
|
|
|
|
2012-11-25 12:47:06 +08:00
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
AC_MSG_RESULT([
|
|
|
|
prefix: ${prefix}
|
|
|
|
exec_prefix: ${exec_prefix}
|
2012-11-26 08:44:28 +08:00
|
|
|
sysconfdir: ${sysconfdir}
|
|
|
|
datadir: ${datadir}
|
2012-11-25 12:47:06 +08:00
|
|
|
includedir: ${includedir}
|
|
|
|
libdir: ${libdir}
|
|
|
|
|
|
|
|
rootprefix: ${rootprefix}
|
|
|
|
rootlibdir: ${rootlibdir}
|
2014-06-25 03:28:01 +08:00
|
|
|
rootlibexecdir: ${rootlibexecdir}
|
2012-11-26 08:44:28 +08:00
|
|
|
datarootdir: ${datarootdir}
|
2012-11-25 12:47:06 +08:00
|
|
|
|
|
|
|
udevconfdir: ${udevconfdir}
|
|
|
|
udevconffile: ${udevconffile}
|
|
|
|
udevhwdbdir: ${udevhwdbdir}
|
|
|
|
udevhwdbbin: ${udevhwdbbin}
|
2014-06-25 03:28:01 +08:00
|
|
|
udevlibexecdir: ${udevlibexecdir}
|
2012-11-25 12:47:06 +08:00
|
|
|
udevkeymapdir: ${udevkeymapdir}
|
|
|
|
udevkeymapforceredir: ${udevkeymapforceredir}
|
|
|
|
udevrulesdir: ${udevrulesdir}
|
|
|
|
|
2012-11-25 20:49:21 +08:00
|
|
|
pkgconfiglibdir: ${libdir}/pkgconfig
|
|
|
|
sharepkgconfigdir ${datadir}/pkgconfig
|
2012-11-26 08:44:28 +08:00
|
|
|
|
2013-03-15 06:05:30 +08:00
|
|
|
libgudev_includedir ${includedir}/gudev-1.0/gudev
|
2012-11-26 08:44:28 +08:00
|
|
|
|
2013-03-15 06:05:30 +08:00
|
|
|
girdir ${datadir}/gir-1.0
|
|
|
|
typelibsdir ${libdir}/girepository-1.0
|
2012-11-25 12:47:06 +08:00
|
|
|
])
|
|
|
|
|
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
|
2012-11-23 10:51:53 +08:00
|
|
|
dnl Set configured scripts executable
|
|
|
|
if test -f src/keymap/check-keymaps.sh; then
|
2013-03-15 06:05:30 +08:00
|
|
|
chmod +x src/keymap/check-keymaps.sh
|
2012-11-23 10:51:53 +08:00
|
|
|
fi
|
|
|
|
|
|
|
|
if test -f src/keymap/keyboard-force-release.sh; then
|
2013-03-15 06:05:30 +08:00
|
|
|
chmod +x src/keymap/keyboard-force-release.sh
|
2012-11-23 10:51:53 +08:00
|
|
|
fi
|
2012-11-25 12:47:06 +08:00
|
|
|
|