diff options
-rw-r--r-- | configure.ac | 7 | ||||
-rw-r--r-- | rules/Makefile.am | 6 | ||||
-rw-r--r-- | src/udev/Makefile.am | 5 | ||||
-rw-r--r-- | src/udev/udev-builtin.c | 2 | ||||
-rw-r--r-- | src/udev/udev.h | 4 |
5 files changed, 20 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac index df7ba6af4d..045445214b 100644 --- a/configure.ac +++ b/configure.ac @@ -197,8 +197,8 @@ AC_CHECK_DECL([unshare], # ------------------------------------------------------------------------------ AC_ARG_WITH(firmware-path, AS_HELP_STRING([--with-firmware-path=DIR[[[:DIR[...]]]]], - [Firmware search path (default=ROOTPREFIX/lib/firmware/updates:ROOTPREFIX/lib/firmware)]), - [], [with_firmware_path="$rootprefix/lib/firmware/updates:$rootprefix/lib/firmware"]) + [Firmware search path (default="")]), + [], [with_firmware_path=""]) OLD_IFS=$IFS IFS=: for i in $with_firmware_path; do @@ -209,7 +209,8 @@ for i in $with_firmware_path; do fi done IFS=$OLD_IFS -AC_SUBST([FIRMWARE_PATH], [$FIRMWARE_PATH]) +AC_SUBST(FIRMWARE_PATH) +AM_CONDITIONAL(ENABLE_FIRMWARE, [test "x${FIRMWARE_PATH}" != "x"]) # ------------------------------------------------------------------------------ AC_ARG_ENABLE([gudev], diff --git a/rules/Makefile.am b/rules/Makefile.am index dca563e815..31d926e234 100644 --- a/rules/Makefile.am +++ b/rules/Makefile.am @@ -2,7 +2,6 @@ ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS} dist_udevrules_DATA = \ 42-usb-hid-pm.rules \ - 50-firmware.rules \ 50-udev-default.rules \ 60-cdrom_id.rules \ 60-persistent-alsa.rules \ @@ -20,6 +19,11 @@ dist_udevrules_DATA = \ 80-net-name-slot.rules \ 95-udev-late.rules +if ENABLE_FIRMWARE +dist_udevrules_DATA += \ + 50-firmware.rules +endif + if HAVE_BLKID dist_udevrules_DATA += \ 60-persistent-storage.rules diff --git a/src/udev/Makefile.am b/src/udev/Makefile.am index 038803454f..d88d72bc6b 100644 --- a/src/udev/Makefile.am +++ b/src/udev/Makefile.am @@ -57,6 +57,11 @@ libudev_core_la_SOURCES = \ label.c \ mkdir.c +if ENABLE_FIRMWARE +libudev_core_la_SOURCES += \ + udev-builtin-firmware.c +endif + noinst_HEADERS = \ dev-setup.h \ label.h \ diff --git a/src/udev/udev-builtin.c b/src/udev/udev-builtin.c index b9dbe87dcc..d17534e1e0 100644 --- a/src/udev/udev-builtin.c +++ b/src/udev/udev-builtin.c @@ -34,7 +34,9 @@ static const struct udev_builtin *builtins[] = { [UDEV_BUILTIN_BLKID] = &udev_builtin_blkid, #endif [UDEV_BUILTIN_BTRFS] = &udev_builtin_btrfs, +#ifdef ENABLE_FIRMWARE [UDEV_BUILTIN_FIRMWARE] = &udev_builtin_firmware, +#endif [UDEV_BUILTIN_HWDB] = &udev_builtin_hwdb, [UDEV_BUILTIN_INPUT_ID] = &udev_builtin_input_id, #ifdef HAVE_MODULES diff --git a/src/udev/udev.h b/src/udev/udev.h index 682e03721f..5418261b55 100644 --- a/src/udev/udev.h +++ b/src/udev/udev.h @@ -140,7 +140,9 @@ enum udev_builtin_cmd { UDEV_BUILTIN_BLKID, #endif UDEV_BUILTIN_BTRFS, +#ifdef ENABLE_FIRMWARE UDEV_BUILTIN_FIRMWARE, +#endif UDEV_BUILTIN_HWDB, UDEV_BUILTIN_INPUT_ID, #ifdef HAVE_MODULES @@ -164,7 +166,9 @@ struct udev_builtin { extern const struct udev_builtin udev_builtin_blkid; #endif extern const struct udev_builtin udev_builtin_btrfs; +#ifdef ENABLE_FIRMWARE extern const struct udev_builtin udev_builtin_firmware; +#endif extern const struct udev_builtin udev_builtin_hwdb; extern const struct udev_builtin udev_builtin_input_id; #ifdef HAVE_MODULES |