Bryan Kadzban
2012-06-02 06:56:56 UTC
Add a new ./configure arg (--disable-systemd) that causes the build
system to build, test, and install only udev.
Allows udev to be built on a system with many fewer of the build-time
dependencies present.
Signed-Off-By: Bryan Kadzban <***@kadzban.is-a-geek.net>
----
Possible points of discussion:
Should this flag be called --disable-systemd, as I did? (That follows
the autoconf docs, which say --disable-* should only ever turn stuff
off, and --enable-* should only ever turn stuff on.) Or are the
autoconf docs irrelevant, and this should be called --enable-udev-only
or something, instead? The flag name isn't terribly important to me.
(Note that the flag is set to *enable* systemd by default. Disabling it
is probably not to be done lightly, and a bunch of other stuff needs to
be turned off as well for this to actually build.)
Also, a few notes on usage. First, to fully avoid installing systemd
stuff, a bunch of directories need to be set to the empty string at
"make install" time, or they'll be created and left empty.
("pkgdatadir= polkitpolicydir= bashcompletiondir= pkgsysconfdir=
userunitdir= tmpfilesdir= sysctldir= systemunitdir= pkgincludedir=
systemgeneratordir=" is the full list.)
Second, "make check" fails in the po/ directory if systemd was not
enabled at configure time, because intltool was skipped. The udev tests
all succeed though, so "make SUBDIRS=. check" works.
Third, "make distdir" also require systemd to be enabled, otherwise some
of the .policy.in files don't make it into the directory (and so
"dist-xz" won't put them into the generated tarball). But that's not
likely to be an issue, considering who does the releases.
Last, on the changes to configure.ac. The intltool and m4 path checks
are not needed anymore if only udev is being built. Neither is gperf,
so skip the "no gperf found" error message in that case. No need to
check pkg-config for dbus-1. cap_init and sys/capability.h are no
longer required either, so skip them as well. Finally, none of the
--with-{dbus,pam}*dir args need a default value for a udev-only build.
system to build, test, and install only udev.
Allows udev to be built on a system with many fewer of the build-time
dependencies present.
Signed-Off-By: Bryan Kadzban <***@kadzban.is-a-geek.net>
----
Possible points of discussion:
Should this flag be called --disable-systemd, as I did? (That follows
the autoconf docs, which say --disable-* should only ever turn stuff
off, and --enable-* should only ever turn stuff on.) Or are the
autoconf docs irrelevant, and this should be called --enable-udev-only
or something, instead? The flag name isn't terribly important to me.
(Note that the flag is set to *enable* systemd by default. Disabling it
is probably not to be done lightly, and a bunch of other stuff needs to
be turned off as well for this to actually build.)
Also, a few notes on usage. First, to fully avoid installing systemd
stuff, a bunch of directories need to be set to the empty string at
"make install" time, or they'll be created and left empty.
("pkgdatadir= polkitpolicydir= bashcompletiondir= pkgsysconfdir=
userunitdir= tmpfilesdir= sysctldir= systemunitdir= pkgincludedir=
systemgeneratordir=" is the full list.)
Second, "make check" fails in the po/ directory if systemd was not
enabled at configure time, because intltool was skipped. The udev tests
all succeed though, so "make SUBDIRS=. check" works.
Third, "make distdir" also require systemd to be enabled, otherwise some
of the .policy.in files don't make it into the directory (and so
"dist-xz" won't put them into the generated tarball). But that's not
likely to be an issue, considering who does the releases.
Last, on the changes to configure.ac. The intltool and m4 path checks
are not needed anymore if only udev is being built. Neither is gperf,
so skip the "no gperf found" error message in that case. No need to
check pkg-config for dbus-1. cap_init and sys/capability.h are no
longer required either, so skip them as well. Finally, none of the
--with-{dbus,pam}*dir args need a default value for a udev-only build.