* [PATCH] Allow configuring without systemd-only dependencies
@ 2012-06-08 6:35 Bryan Kadzban
2012-06-08 16:15 ` William Hubbs
2012-06-09 7:01 ` Bryan Kadzban
0 siblings, 2 replies; 3+ messages in thread
From: Bryan Kadzban @ 2012-06-08 6:35 UTC (permalink / raw)
To: linux-hotplug
[-- Attachment #1: Type: text/plain, Size: 940 bytes --]
Some dependencies (intltool, m4, dbus, pkg-config, PAM) are only
required or useful for systemd, not for udev. Leave these required by
default, but allow them to be made optional if the right flag is used to
./configure.
Signed-Off-By: Bryan Kadzban <bryan@kadzban.is-a-geek.net>
-----
This is necessary for anyone who wants to build udev only. It's not
sufficient, but without this or something like it, ./configure fails
hard. This change touches *only* configure; if the dependencies are
made optional in a ./configure run, and they don't exist on the system
(or in some cases, even if they do) make will fail hard.
I'm not attached to the --with-X flag's name; coming up with a better
one would be fine.
Unfortunately there's no "use intltool if it's present, otherwise don't
bother" variant of IT_PROG_INTLTOOL. If that's wanted, I could hack it
together with another invocation of AC_PATH_PROG, but this is slightly
simpler.
[-- Attachment #2: systemd-make-systemd-dependencies-optional.patch --]
[-- Type: text/plain, Size: 4453 bytes --]
diff --git a/configure.ac b/configure.ac
index 70f3e96..446fb95 100644
--- a/configure.ac
+++ b/configure.ac
@@ -44,8 +44,15 @@ AS_IF([test "x$host_cpu" = "xmips" || test "x$host_cpu" = "xmipsel" ||
LT_PREREQ(2.2)
LT_INIT
+AC_ARG_WITH([require-systemd-deps],
+ [AS_HELP_STRING([--without-require-systemd-deps],
+ [make systemd configure dependencies optional @<:@default: required@:>@])],
+ [with_require_systemd_deps=$withval], [with_require_systemd_deps=yes])
+
# i18n stuff for the PolicyKit policy files
+AS_IF([test "x$with_require_systemd_deps" = "xyes"], [
IT_PROG_INTLTOOL([0.40.0])
+])
GETTEXT_PACKAGE=systemd
AC_SUBST(GETTEXT_PACKAGE)
@@ -61,7 +68,9 @@ AC_PROG_CC_C99
AM_PROG_CC_C_O
AC_PROG_GCC_TRADITIONAL
+AS_IF([test "x$with_require_systemd_deps" = "xyes"], [
AC_PATH_PROG([M4], [m4])
+])
# gtkdocize greps for '^GTK_DOC_CHECK', so it needs to be on its own line
m4_ifdef([GTK_DOC_CHECK], [
@@ -75,7 +84,7 @@ GOBJECT_INTROSPECTION_CHECK([1.31.1])
AC_CHECK_TOOL(OBJCOPY, objcopy)
AC_CHECK_TOOL(STRINGS, strings)
AC_CHECK_TOOL(GPERF, gperf)
-if test -z "$GPERF" ; then
+if test -z "$GPERF" && test "x$with_require_systemd_deps" = "xyes" ; then
AC_MSG_ERROR([*** gperf not found])
fi
@@ -132,6 +141,7 @@ AC_SUBST([GCLDFLAGS], $with_ldflags)
AC_SEARCH_LIBS([clock_gettime], [rt], [], [AC_MSG_ERROR([*** POSIX RT library not found])])
AC_SEARCH_LIBS([dlsym], [dl], [], [AC_MSG_ERROR([*** Dynamic linking loader library not found])])
+AS_IF([test "x$with_require_systemd_deps" = "xyes"], [
save_LIBS="$LIBS"
LIBS=
AC_SEARCH_LIBS([cap_init], [cap], [], [AC_MSG_ERROR([*** POSIX caps library not found])])
@@ -139,11 +149,14 @@ AC_CHECK_HEADERS([sys/capability.h], [], [AC_MSG_ERROR([*** POSIX caps headers n
CAP_LIBS="$LIBS"
LIBS="$save_LIBS"
AC_SUBST(CAP_LIBS)
+])
# This makes sure pkg.m4 is available.
m4_pattern_forbid([^_?PKG_[A-Z_]+$],[*** pkg.m4 missing, please install pkg-config])
+AS_IF([test "x$with_require_systemd_deps" = "xyes"], [
PKG_CHECK_MODULES(DBUS, [dbus-1 >= 1.3.2])
+])
PKG_CHECK_MODULES(KMOD, [libkmod >= 5])
PKG_CHECK_MODULES(BLKID,[blkid >= 2.20])
@@ -648,22 +661,22 @@ AM_CONDITIONAL(HAVE_SYSV_COMPAT, test "$SYSTEM_SYSV_COMPAT" = "yes")
AC_ARG_WITH([dbuspolicydir],
AS_HELP_STRING([--with-dbuspolicydir=DIR], [D-Bus policy directory]),
[],
- [with_dbuspolicydir=`pkg-config --variable=sysconfdir dbus-1`/dbus-1/system.d])
+ [AS_IF([test "x$with_require_systemd_deps" = "xyes"], [with_dbuspolicydir=`pkg-config --variable=sysconfdir dbus-1`/dbus-1/system.d])])
AC_ARG_WITH([dbussessionservicedir],
AS_HELP_STRING([--with-dbussessionservicedir=DIR], [D-Bus session service directory]),
[],
- [with_dbussessionservicedir=`pkg-config --variable=session_bus_services_dir dbus-1`])
+ [AS_IF([test "x$with_require_systemd_deps" = "xyes"], [with_dbussessionservicedir=`pkg-config --variable=session_bus_services_dir dbus-1`])])
AC_ARG_WITH([dbussystemservicedir],
AS_HELP_STRING([--with-dbussystemservicedir=DIR], [D-Bus system service directory]),
[],
- [with_dbussystemservicedir=`pkg-config --variable=session_bus_services_dir dbus-1`/../system-services])
+ [AS_IF([test "x$with_require_systemd_deps" = "xyes"], [with_dbussystemservicedir=`pkg-config --variable=session_bus_services_dir dbus-1`/../system-services])])
AC_ARG_WITH([dbusinterfacedir],
AS_HELP_STRING([--with-dbusinterfacedir=DIR], [D-Bus interface directory]),
[],
- [with_dbusinterfacedir=`pkg-config --variable=session_bus_services_dir dbus-1`/../interfaces])
+ [AS_IF([test "x$with_require_systemd_deps" = "xyes"], [with_dbusinterfacedir=`pkg-config --variable=session_bus_services_dir dbus-1`/../interfaces])])
AC_ARG_WITH([rootprefix],
AS_HELP_STRING([--with-rootprefix=DIR], [rootfs directory prefix for config files and kernel modules]),
@@ -677,7 +690,7 @@ AC_ARG_WITH([rootlibdir],
AC_ARG_WITH([pamlibdir],
AS_HELP_STRING([--with-pamlibdir=DIR], [Directory for PAM modules]),
[],
- [with_pamlibdir=${with_rootlibdir}/security])
+ [AS_IF([test "x$with_require_systemd_deps" = "xyes"], [with_pamlibdir=${with_rootlibdir}/security])])
AC_ARG_ENABLE([split-usr],
AS_HELP_STRING([--enable-split-usr], [Assume that /bin, /sbin aren\'t symlinks into /usr]),
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] Allow configuring without systemd-only dependencies
2012-06-08 6:35 [PATCH] Allow configuring without systemd-only dependencies Bryan Kadzban
@ 2012-06-08 16:15 ` William Hubbs
2012-06-09 7:01 ` Bryan Kadzban
1 sibling, 0 replies; 3+ messages in thread
From: William Hubbs @ 2012-06-08 16:15 UTC (permalink / raw)
To: linux-hotplug
[-- Attachment #1: Type: text/plain, Size: 403 bytes --]
On Thu, Jun 07, 2012 at 11:35:00PM -0700, Bryan Kadzban wrote:
> Some dependencies (intltool, m4, dbus, pkg-config, PAM) are only
> required or useful for systemd, not for udev. Leave these required by
> default, but allow them to be made optional if the right flag is used to
> ./configure.
How about using --disable-systemd to take out these dependencies instead
of adding another switch?
William
[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Allow configuring without systemd-only dependencies
2012-06-08 6:35 [PATCH] Allow configuring without systemd-only dependencies Bryan Kadzban
2012-06-08 16:15 ` William Hubbs
@ 2012-06-09 7:01 ` Bryan Kadzban
1 sibling, 0 replies; 3+ messages in thread
From: Bryan Kadzban @ 2012-06-09 7:01 UTC (permalink / raw)
To: linux-hotplug
William Hubbs wrote:
> On Thu, Jun 07, 2012 at 11:35:00PM -0700, Bryan Kadzban wrote:
>> Some dependencies (intltool, m4, dbus, pkg-config, PAM) are only
>> required or useful for systemd, not for udev. Leave these required by
>> default, but allow them to be made optional if the right flag is used to
>> ./configure.
>
> How about using --disable-systemd to take out these dependencies instead
> of adding another switch?
Well, this is the minimum to let us (LFS) at least get a build process
together to upgrade from udev-182. systemd as-is has too many build
dependencies for us to use it the way it is today. I figured I'd see
what upstream thought about just doing the minimum we need first. (We
can override variables at make time to build just the udev binary and
helpers.)
But if a --disable-systemd switch ends up getting committed, sure,
that'd work too.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-06-09 7:01 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-08 6:35 [PATCH] Allow configuring without systemd-only dependencies Bryan Kadzban
2012-06-08 16:15 ` William Hubbs
2012-06-09 7:01 ` Bryan Kadzban
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).