From: Michael Olbrich <m.olbrich@pengutronix.de>
To: linux-hotplug@vger.kernel.org
Subject: Re: [PATCH] split --disable-extras into multiple options
Date: Wed, 03 Mar 2010 06:15:52 +0000 [thread overview]
Message-ID: <20100303061552.GA32004@pengutronix.de> (raw)
In-Reply-To: <20100211111209.GD30615@pengutronix.de>
[-- Attachment #1: Type: text/plain, Size: 1298 bytes --]
Hello,
On Tue, Mar 02, 2010 at 02:21:05PM +0100, Martin Pitt wrote:
> Michael Olbrich [2010-02-11 12:12 +0100]:
> > This patch patch makes it possible to enable all extras with external
> > dependencies individually. It replaces:
> > --disable-extras
> > with
> > --disable-gudev
> > --disable-bluetooth
> > --disable-keymap
> > --disable-acl
> > --disable-usbdb
> > --disable-pcidb
> > --disable-modem-modeswitch
> > as configure options.
>
> I tried to build with --disable-acl, and "make install" entirely stops
> installing any helper in /lib/udev/. Can you please fix this?
What configure options are you using? I tried
./configure --prefix=/
with and without --disable-acl and the only difference when installing are
the files for acl.
> Also, can you please fix the printed out summary in configure? It
> still says
>
> extras: ${enable_extras}
>
> and should be replaced with the individual enable_* options.
Updated patch attached.
Regards,
Michael
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
[-- Attachment #2: udev-150-split-extras.diff --]
[-- Type: text/x-diff, Size: 9614 bytes --]
From: Michael Olbrich <m.olbrich@pengutronix.de>
Subject: split enabling extras with dependencies
This patch patch makes it possible to enable all extras with external
dependencies individually. It replaces:
--disable-extras
with
--disable-gudev
--disable-bluetooth
--disable-keymap
--disable-acl
--disable-usbdb
--disable-pcidb
--disable-modem-modeswitch
as configure options
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
---
Makefile.am | 25 +++++++++++++++++----
configure.ac | 69 ++++++++++++++++++++++++++++++++++++++++++++++++-----------
2 files changed, 78 insertions(+), 16 deletions(-)
Index: b/Makefile.am
===================================================================
--- a/Makefile.am
+++ b/Makefile.am
@@ -289,7 +289,8 @@ extras_v4l_id_v4l_id_LDADD = libudev/lib
libexec_PROGRAMS += extras/v4l_id/v4l_id
dist_udevrules_DATA += extras/v4l_id/60-persistent-v4l.rules
-if ENABLE_EXTRAS
+if ENABLE_USBDB
+if ENABLE_PCIDB
# ------------------------------------------------------------------------------
# conditional extras (need glib, libusb, libacl, ...)
# ------------------------------------------------------------------------------
@@ -297,7 +298,12 @@ dist_udevrules_DATA += \
rules/rules.d/75-net-description.rules \
rules/rules.d/75-tty-description.rules \
rules/rules.d/78-sound-card.rules
+endif # ENABLE_PCIDB
+endif # ENABLE_USBDB
+BUILT_SOURCES =
+
+if ENABLE_GUDEV
# ------------------------------------------------------------------------------
# GUdev - libudev gobject interface
# ------------------------------------------------------------------------------
@@ -335,7 +341,7 @@ dist_extras_gudev_libgudev_1_0_la_SOURCE
extras/gudev/gudevmarshal.c \
extras/gudev/gudevenumtypes.h \
extras/gudev/gudevenumtypes.c
-BUILT_SOURCES = $(dist_extras_gudev_libgudev_1_0_la_SOURCES)
+BUILT_SOURCES += $(dist_extras_gudev_libgudev_1_0_la_SOURCES)
extras_gudev_libgudev_1_0_la_CPPFLAGS = \
$(AM_CPPFLAGS) \
@@ -411,7 +417,9 @@ typelibs_DATA = extras/gudev/GUdev-1.0.t
CLEANFILES += $(gir_DATA) $(typelibs_DATA)
endif # ENABLE_INTROSPECTION
+endif # ENABLE_GUDEV
+if ENABLE_BLUETOOTH
# ------------------------------------------------------------------------------
# Bluetooth HID devices with special magic to switch the device
# ------------------------------------------------------------------------------
@@ -420,7 +428,9 @@ extras_hid2hci_hid2hci_CPPFLAGS = $(AM_C
extras_hid2hci_hid2hci_LDADD = libudev/libudev-private.la $(LIBUSB_LIBS)
dist_udevrules_DATA += extras/hid2hci/70-hid2hci.rules
libexec_PROGRAMS += extras/hid2hci/hid2hci
+endif # ENABLE_BLUETOOTH
+if ENABLE_ACL
# ------------------------------------------------------------------------------
# udev_acl - apply ACLs for users with local forground sessions
# ------------------------------------------------------------------------------
@@ -435,7 +445,9 @@ udevacl-install-hook:
ln -sf $(libexecdir)/udev-acl $(DESTDIR)$(prefix)/lib/ConsoleKit/run-seat.d/udev-acl.ck
INSTALL_EXEC_HOOKS += udevacl-install-hook
+endif # ENABLE_ACL
+if ENABLE_USBDB
# ------------------------------------------------------------------------------
# usb-db - read USB vendor/device string database
# ------------------------------------------------------------------------------
@@ -443,7 +455,9 @@ extras_usb_db_usb_db_SOURCES = extras/us
extras_usb_db_usb_db_CPPFLAGS = $(AM_CPPFLAGS) -DUSB_DATABASE=\"$(USB_DATABASE)\" -DBUILD_FOR_USB
extras_usb_db_usb_db_LDADD = libudev/libudev-private.la
libexec_PROGRAMS += extras/usb-db/usb-db
+endif # ENABLE_USBDB
+if ENABLE_PCIDB
# ------------------------------------------------------------------------------
# pci-db - read PCI vendor/device string database
# ------------------------------------------------------------------------------
@@ -451,7 +465,9 @@ extras_usb_db_pci_db_SOURCES = extras/us
extras_usb_db_pci_db_CPPFLAGS = $(AM_CPPFLAGS) -DPCI_DATABASE=\"$(PCI_DATABASE)\" -DBUILD_FOR_PCI
extras_usb_db_pci_db_LDADD = libudev/libudev-private.la
libexec_PROGRAMS += extras/usb-db/pci-db
+endif # ENABLE_PCIDB
+if ENABLE_MODEM_MODESWITCH
# ------------------------------------------------------------------------------
# modem-modeswitch - magic config switch for 3G modems
# ------------------------------------------------------------------------------
@@ -471,7 +487,9 @@ dist_udevrules_DATA += \
extras/modem-modeswitch/61-mobile-action.rules
libexec_PROGRAMS += extras/modem-modeswitch/modem-modeswitch
+endif # ENABLE_MODEM_MODESWITCH
+if ENABLE_KEYMAP
# ------------------------------------------------------------------------------
# keymap - map custom hardware's multimedia keys
# ------------------------------------------------------------------------------
@@ -563,8 +581,7 @@ extras/keymap/keys-to-name.h: extras/key
keymaps-distcheck-hook: extras/keymap/keys.txt
$(top_srcdir)/extras/keymap/check-keymaps.sh $(top_srcdir) $^
DISTCHECK_HOOKS = keymaps-distcheck-hook
-
-endif # ENABLE_EXTRAS
+endif # ENABLE_KEYMAP
# ------------------------------------------------------------------------------
# install, uninstall, clean hooks
Index: b/configure.ac
===================================================================
--- a/configure.ac
+++ b/configure.ac
@@ -46,32 +46,72 @@ if test "x$enable_logging" = "xyes"; the
AC_DEFINE(ENABLE_LOGGING, [1], [System logging.])
fi
-AC_ARG_ENABLE([extras],
- AS_HELP_STRING([--disable-extras], [disable extras with external dependencies]),
- [], [enable_extras=yes])
-if test "x$enable_extras" = xyes; then
+AC_ARG_ENABLE([gudev],
+ AS_HELP_STRING([--disable-gudev], [disable libgudev - libudev gobject interface]),
+ [], [enable_gudev=yes])
+AM_CONDITIONAL([ENABLE_GUDEV], [test "x$enable_gudev" = xyes])
+AC_ARG_ENABLE([bluetooth],
+ AS_HELP_STRING([--disable-bluetooth], [disable Bluetooth HID devices with special magic to switch the device]),
+ [], [enable_bluetooth=yes])
+AM_CONDITIONAL([ENABLE_BLUETOOTH], [test "x$enable_bluetooth" = xyes])
+AC_ARG_ENABLE([keymap],
+ AS_HELP_STRING([--disable-keymap], [disable keymap - map custom hardware's multimedia keys]),
+ [], [enable_keymap=yes])
+AM_CONDITIONAL([ENABLE_KEYMAP], [test "x$enable_keymap" = xyes])
+AC_ARG_ENABLE([acl],
+ AS_HELP_STRING([--disable-acl], [disable udev_acl - apply ACLs for users with local forground sessions]),
+ [], [enable_acl=yes])
+AM_CONDITIONAL([ENABLE_ACL], [test "x$enable_acl" = xyes])
+AC_ARG_ENABLE([usbdb],
+ AS_HELP_STRING([--disable-usbdb], [disable usb-db - read USB vendor/device string database]),
+ [], [enable_usbdb=yes])
+AM_CONDITIONAL([ENABLE_USBDB], [test "x$enable_usbdb" = xyes])
+AC_ARG_ENABLE([pcidb],
+ AS_HELP_STRING([--disable-pcidb], [disable pci-db - read PCI vendor/device string database]),
+ [], [enable_pcidb=yes])
+AM_CONDITIONAL([ENABLE_PCIDB], [test "x$enable_pcidb" = xyes])
+AC_ARG_ENABLE([modem-modeswitch],
+ AS_HELP_STRING([--disable-modem-modeswitch], [disable modem-modeswitch - magic config switch for 3G modems]),
+ [], [enable_modem_modeswitch=yes])
+AM_CONDITIONAL([ENABLE_MODEM_MODESWITCH], [test "x$enable_modem_modeswitch" = xyes])
+
+if test "x$enable_keymap" = xyes; then
AC_PATH_PROG([GPERF], [gperf])
if test -z "$GPERF"; then
AC_MSG_ERROR([gperf is needed])
fi
+fi
+if test "x$enable_gudev" = xyes -o "x$enable_acl" = xyes; then
PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.7.0 gobject-2.0 >= 2.7.0])
AC_SUBST([GLIB_CFLAGS])
AC_SUBST([GLIB_LIBS])
+fi
- AC_CHECK_LIB([acl], [acl_init], [:], AC_MSG_ERROR([libacl not found]))
- AC_CHECK_HEADER([acl/libacl.h], [:], AC_MSG_ERROR([libacl header not found]))
-
+if test "x$enable_bluetooth" = xyes -o "x$enable_modem_modeswitch" = xyes; then
PKG_CHECK_MODULES(LIBUSB, libusb >= 0.1.12)
AC_SUBST(LIBUSB_CFLAGS)
AC_SUBST(LIBUSB_LIBS)
+fi
+if test "x$enable_acl" = xyes; then
+ AC_CHECK_LIB([acl], [acl_init], [:], AC_MSG_ERROR([libacl not found]))
+ AC_CHECK_HEADER([acl/libacl.h], [:], AC_MSG_ERROR([libacl header not found]))
+fi
+
+if test "x$enable_usbdb" = xyes; then
PKG_CHECK_MODULES(USBUTILS, usbutils >= 0.82)
AC_SUBST([USB_DATABASE], [$($PKG_CONFIG --variable=usbids usbutils)])
+else
+ USB_DATABASE=no
+fi
- AC_CHECK_FILES([/usr/share/pci.ids], [pciids=/usr/share/pci.ids])
- AC_CHECK_FILES([/usr/share/hwdata/pci.ids], [pciids=/usr/share/hwdata/pci.ids])
- AC_CHECK_FILES([/usr/share/misc/pci.ids], [pciids=/usr/share/misc/pci.ids])
+if test "x$enable_pcidb" = xyes; then
+ if test "x$cross_compiling" != xyes; then
+ AC_CHECK_FILES([/usr/share/pci.ids], [pciids=/usr/share/pci.ids])
+ AC_CHECK_FILES([/usr/share/hwdata/pci.ids], [pciids=/usr/share/hwdata/pci.ids])
+ AC_CHECK_FILES([/usr/share/misc/pci.ids], [pciids=/usr/share/misc/pci.ids])
+ fi
AC_ARG_WITH(pci-ids-path,
AS_HELP_STRING([--pci-ids-path=DIR], [Path to pci.ids file]),
[PCI_DATABASE=${withval}],
@@ -81,8 +121,9 @@ if test "x$enable_extras" = xyes; then
AC_MSG_ERROR([pci.ids not found, try --with-pci-ids-path=])
fi])
AC_SUBST(PCI_DATABASE)
+else
+ PCI_DATABASE=no
fi
-AM_CONDITIONAL([ENABLE_EXTRAS], [test "x$enable_extras" = xyes])
AC_ARG_ENABLE([introspection],
AS_HELP_STRING([--disable-introspection], [disable GObject introspection]),
@@ -134,7 +175,11 @@ AC_MSG_RESULT([
cflags: ${CFLAGS}
ldflags: ${LDFLAGS}
- extras: ${enable_extras}
+ gudev: ${enable_gudev}
+ bluetooth: ${enable_bluetooth}
+ keymap: ${enable_keymap}
+ acl: ${enable_acl}
+ modem-modeswitch: ${enable_modem_modeswitch}
gintrospection: ${enable_introspection}
usb.ids: ${USB_DATABASE}
next prev parent reply other threads:[~2010-03-03 6:15 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-11 11:12 [PATCH] split --disable-extras into multiple options Michael Olbrich
2010-02-13 12:51 ` Martin Pitt
2010-02-13 17:44 ` Bryan Kadzban
2010-02-13 18:11 ` Marco d'Itri
2010-03-02 13:21 ` Martin Pitt
2010-03-03 6:15 ` Michael Olbrich [this message]
2010-03-03 8:01 ` Martin Pitt
2010-03-03 14:23 ` Dan Nicholson
2010-03-03 15:07 ` Michael Olbrich
2010-03-03 16:46 ` Dan Nicholson
2010-03-09 12:14 ` Daniel Mierswa
2010-03-09 12:45 ` Martin Pitt
2010-03-09 16:37 ` Michael Olbrich
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100303061552.GA32004@pengutronix.de \
--to=m.olbrich@pengutronix.de \
--cc=linux-hotplug@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.