Andrew Benton wrote:
On Thu, 31 May 2012 14:05:19 +0100
Dan Nicholson <dbn.li...@gmail.com> wrote:

Here's an update. I forgot that [] are quotes in autoconf, so you
usually end up using test instead. I still didn't test it works all
the way, but I think configure should run.

Withthis patch automake fails with:

Makefile.am:1447: Cannot apply `+=' because `MANPAGES' is not defined in
Makefile.am:1447: the following conditions:
Makefile.am:1447:   UDEV_ONLY
Makefile.am:1447: Either define `MANPAGES' in these conditions, or use
Makefile.am:1447: `+=' in the same conditions as the definitions.
Makefile.am:1511: Cannot apply `+=' because `bin_PROGRAMS' is not defined in
Makefile.am:1511: the following conditions:
Makefile.am:1511:   UDEV_ONLY
Makefile.am:1511: Either define `bin_PROGRAMS' in these conditions, or use
Makefile.am:1511: `+=' in the same conditions as the definitions.
Makefile.am:2773: Cannot apply `+=' because `rootlibexec_PROGRAMS' is not 
defined in
Makefile.am:2773: the following conditions:
Makefile.am:2773:   ENABLE_LOGIND and UDEV_ONLY
Makefile.am:2773: Either define `rootlibexec_PROGRAMS' in these conditions, or 
use
Makefile.am:2773: `+=' in the same conditions as the definitions.

I can fix that by making some changes to Makefile.am (see the attached
diff) so that autoreconf now completes without error. However, when I
try to run ./configure --enable-udev-only I get:

Try this diff for configure.ac.

  -- Bruce


--- systemd-183.orig/configure.ac       2012-05-24 08:44:38.000000000 -0500
+++ systemd-183/configure.ac    2012-05-31 10:44:32.000000000 -0500
@@ -44,8 +44,21 @@
 LT_PREREQ(2.2)
 LT_INIT
 
+# figure out early if we only want udev
+AC_ARG_ENABLE([udev-only],
+              [AS_HELP_STRING([--enable-udev-only],
+                              [build only udev (default: no)])],,
+              [enable_udev_only=no])
+case "$enable_udev_only" in
+yes|no) ;;
+*) enable_udev_only=no ;;
+esac
+AM_CONDITIONAL([UDEV_ONLY], [test $enable_udev_only = yes])
+
 # i18n stuff for the PolicyKit policy files
-IT_PROG_INTLTOOL([0.40.0])
+if test $enable_udev_only = no; then
+        IT_PROG_INTLTOOL([0.40.0])
+fi
 
 GETTEXT_PACKAGE=systemd
 AC_SUBST(GETTEXT_PACKAGE)
@@ -74,10 +87,12 @@
 
 AC_CHECK_TOOL(OBJCOPY, objcopy)
 AC_CHECK_TOOL(STRINGS, strings)
+if test $enable_udev_only = no; then
 AC_CHECK_TOOL(GPERF, gperf)
 if test -z "$GPERF" ; then
         AC_MSG_ERROR([*** gperf not found])
 fi
+fi
 
 CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\
         -pipe \
@@ -134,6 +149,7 @@
 
 save_LIBS="$LIBS"
 LIBS=
+if test $enable_udev_only = no; then
 AC_SEARCH_LIBS([cap_init], [cap], [], [AC_MSG_ERROR([*** POSIX caps library 
not found])])
 AC_CHECK_HEADERS([sys/capability.h], [], [AC_MSG_ERROR([*** POSIX caps headers 
not found])])
 CAP_LIBS="$LIBS"
@@ -143,7 +159,8 @@
 # This makes sure pkg.m4 is available.
 m4_pattern_forbid([^_?PKG_[A-Z_]+$],[*** pkg.m4 missing, please install 
pkg-config])
 
-PKG_CHECK_MODULES(DBUS, [dbus-1 >= 1.3.2])
+        PKG_CHECK_MODULES(DBUS, [dbus-1 >= 1.3.2])
+fi
 PKG_CHECK_MODULES(KMOD, [libkmod >= 5])
 PKG_CHECK_MODULES(BLKID,[blkid >= 2.20])
 
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page

Reply via email to