X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=configure.ac;h=4ba9964cbdc21df096294d712e796e835d8b01a5;hp=863aad86d45731e8e3982bf16035dc39ebf1f037;hb=c59d1e45bd50ab36e2ac09f0c4b36d38821f20f5;hpb=28e490c945e16f9d2dce7cff9967ed5d11b23f93 diff --git a/configure.ac b/configure.ac index 863aad86d..4ba9964cb 100644 --- a/configure.ac +++ b/configure.ac @@ -4,9 +4,9 @@ AC_INIT([udev], [linux-hotplug@vger.kernel.org], [udev], [http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html]) -AC_CONFIG_SRCDIR([udev/udevd.c]) +AC_CONFIG_SRCDIR([src/udevd.c]) AC_CONFIG_AUX_DIR([build-aux]) -AM_INIT_AUTOMAKE([check-news foreign 1.11 -Wall -Wno-portability silent-rules tar-pax dist-xz subdir-objects]) +AM_INIT_AUTOMAKE([check-news foreign 1.11 -Wall -Wno-portability silent-rules tar-pax no-dist-gzip dist-xz subdir-objects]) AC_USE_SYSTEM_EXTENSIONS AC_SYS_LARGEFILE AC_CONFIG_MACRO_DIR([m4]) @@ -21,6 +21,46 @@ AC_PATH_PROG([XSLTPROC], [xsltproc]) AC_SEARCH_LIBS([clock_gettime], [rt], [], [AC_MSG_ERROR([POSIX RT library not found])]) +PKG_CHECK_MODULES(BLKID, blkid >= 2.20) + +PKG_CHECK_MODULES(KMOD, libkmod >= 3) + +if test "x$cross_compiling" = "xno" ; 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(usb-ids-path, + [AS_HELP_STRING([--with-usb-ids-path=DIR], [Path to usb.ids file])], + [USB_DATABASE=${withval}], + [if test -n "$usbids" ; then + USB_DATABASE="$usbids" + else + PKG_CHECK_MODULES(USBUTILS, usbutils >= 0.82) + AC_SUBST([USB_DATABASE], [$($PKG_CONFIG --variable=usbids usbutils)]) + fi]) +AC_MSG_CHECKING([for USB database location]) +AC_MSG_RESULT([$USB_DATABASE]) +AC_SUBST(USB_DATABASE) + +AC_ARG_WITH(pci-ids-path, + [AS_HELP_STRING([--with-pci-ids-path=DIR], [Path to pci.ids file])], + [PCI_DATABASE=${withval}], + [if test -n "$pciids" ; then + PCI_DATABASE="$pciids" + else + AC_MSG_ERROR([pci.ids not found, try --with-pci-ids-path=]) + fi]) +AC_MSG_CHECKING([for PCI database location]) +AC_MSG_RESULT([$PCI_DATABASE]) +AC_SUBST(PCI_DATABASE) + +AC_ARG_WITH([rootprefix], + AS_HELP_STRING([--with-rootprefix=DIR], [rootfs directory prefix for config files and kernel modules]), + [], [with_rootprefix=${ac_default_prefix}]) +AC_SUBST([rootprefix], [$with_rootprefix]) + AC_ARG_WITH([rootlibdir], AS_HELP_STRING([--with-rootlibdir=DIR], [rootfs directory to install shared libraries]), [], [with_rootlibdir=$libdir]) @@ -54,7 +94,7 @@ AS_IF([test "x$enable_logging" = "xyes"], [ AC_DEFINE(ENABLE_LOGGING, [1], [Syst AC_ARG_WITH(firmware-path, AS_HELP_STRING([--with-firmware-path=DIR[[[:DIR[...]]]]], [Firmware search path (default=/lib/firmware/updates:/lib/firmware)]), - [], [with_firmware_path="/lib/firmware/updates:/lib/firmware"]) + [], [with_firmware_path="$rootprefix/lib/firmware/updates:$rootprefix/lib/firmware"]) OLD_IFS=$IFS IFS=: for i in $with_firmware_path; do @@ -96,46 +136,6 @@ AS_IF([test "x$enable_introspection" = "xyes"], [ AM_CONDITIONAL([ENABLE_INTROSPECTION], [test "x$enable_introspection" = "xyes"]) AM_CONDITIONAL([ENABLE_GUDEV], [test "x$enable_gudev" = "xyes"]) -# ------------------------------------------------------------------------------ -# usb/pci-db - read vendor/device string database -# ------------------------------------------------------------------------------ -AC_ARG_ENABLE([hwdb], - AS_HELP_STRING([--disable-hwdb], [disable hardware database support @<:@default=enabled@:>@]), - [], [enable_hwdb=yes]) -AS_IF([test "x$enable_hwdb" = "xyes"], [ - if test "x$cross_compiling" = "xno" ; 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(usb-ids-path, - [AS_HELP_STRING([--with-usb-ids-path=DIR], [Path to usb.ids file])], - [USB_DATABASE=${withval}], - [if test -n "$usbids" ; then - USB_DATABASE="$usbids" - else - PKG_CHECK_MODULES(USBUTILS, usbutils >= 0.82) - AC_SUBST([USB_DATABASE], [$($PKG_CONFIG --variable=usbids usbutils)]) - fi]) - AC_MSG_CHECKING([for USB database location]) - AC_MSG_RESULT([$USB_DATABASE]) - AC_SUBST(USB_DATABASE) - - AC_ARG_WITH(pci-ids-path, - [AS_HELP_STRING([--with-pci-ids-path=DIR], [Path to pci.ids file])], - [PCI_DATABASE=${withval}], - [if test -n "$pciids" ; then - PCI_DATABASE="$pciids" - else - AC_MSG_ERROR([pci.ids not found, try --with-pci-ids-path=]) - fi]) - AC_MSG_CHECKING([for PCI database location]) - AC_MSG_RESULT([$PCI_DATABASE]) - AC_SUBST(PCI_DATABASE) -]) -AM_CONDITIONAL([ENABLE_HWDB], [test "x$enable_hwdb" = "xyes"]) - # ------------------------------------------------------------------------------ # keymap - map custom hardware's multimedia keys # ------------------------------------------------------------------------------ @@ -199,13 +199,21 @@ AC_ARG_ENABLE([edd], [], [enable_edd=no]) AM_CONDITIONAL([ENABLE_EDD], [test "x$enable_edd" = "xyes"]) +my_CFLAGS="-Wall \ +-Wmissing-declarations -Wmissing-prototypes \ +-Wnested-externs -Wpointer-arith \ +-Wpointer-arith -Wsign-compare -Wchar-subscripts \ +-Wstrict-prototypes -Wshadow \ +-Wformat-security -Wtype-limits" +AC_SUBST([my_CFLAGS]) + AC_CONFIG_HEADERS(config.h) AC_CONFIG_FILES([ Makefile - libudev/docs/Makefile - libudev/docs/version.xml - extras/gudev/docs/Makefile - extras/gudev/docs/version.xml + src/docs/Makefile + src/docs/version.xml + src/extras/gudev/docs/Makefile + src/extras/gudev/docs/version.xml ]) AC_OUTPUT @@ -214,9 +222,9 @@ AC_MSG_RESULT([ ======== prefix: ${prefix} + rootprefix: ${rootprefix} sysconfdir: ${sysconfdir} bindir: ${bindir} - sbindir: ${sbindir} libdir: ${libdir} rootlibdir: ${rootlib_execdir} libexecdir: ${libexecdir} @@ -226,6 +234,8 @@ AC_MSG_RESULT([ include_prefix: ${INCLUDE_PREFIX} systemdsystemunitdir: ${systemdsystemunitdir} firmware path: ${FIRMWARE_PATH} + usb.ids: ${USB_DATABASE} + pci.ids: ${PCI_DATABASE} compiler: ${CC} cflags: ${CFLAGS} @@ -240,9 +250,6 @@ AC_MSG_RESULT([ gudev: ${enable_gudev} gintrospection: ${enable_introspection} keymap: ${enable_keymap} - hwdb: ${enable_hwdb} - usb.ids: ${USB_DATABASE} - pci.ids: ${PCI_DATABASE} mtd_probe: ${enable_mtd_probe} rule_generator: ${enable_rule_generator} udev_acl: ${enable_udev_acl}