X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=configure.ac;h=07254feba0a21eeffe515a73fe1654302c41657d;hp=f0d5d0407644745f5b77c2ce2e47261044b81f28;hb=9e4e44e578ec8ba2c626abed4eb8529814557352;hpb=95de03a7a20e02f06d2bbe8350f1b5e89af02790 diff --git a/configure.ac b/configure.ac index f0d5d0407..07254feba 100644 --- a/configure.ac +++ b/configure.ac @@ -4,7 +4,7 @@ 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 no-dist-gzip dist-xz subdir-objects]) AC_USE_SYSTEM_EXTENSIONS @@ -17,10 +17,52 @@ AC_PROG_SED AC_PROG_MKDIR_P GTK_DOC_CHECK(1.10) AC_PREFIX_DEFAULT([/usr]) + AC_PATH_PROG([XSLTPROC], [xsltproc]) +AM_CONDITIONAL(HAVE_XSLTPROC, test x"$XSLTPROC" != x) 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 +96,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 @@ -73,8 +115,6 @@ AC_ARG_WITH([systemdsystemunitdir], AS_IF([test "x$with_systemdsystemunitdir" != "xno"], [ AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir]) ]) AM_CONDITIONAL(WITH_SYSTEMD, [test -n "$with_systemdsystemunitdir" -a "x$with_systemdsystemunitdir" != "xno" ]) -PKG_CHECK_MODULES(BLKID, blkid >= 2.20) - # ------------------------------------------------------------------------------ # GUdev - libudev gobject interface # ------------------------------------------------------------------------------ @@ -98,46 +138,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 # ------------------------------------------------------------------------------ @@ -201,13 +201,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 @@ -216,9 +224,9 @@ AC_MSG_RESULT([ ======== prefix: ${prefix} + rootprefix: ${rootprefix} sysconfdir: ${sysconfdir} bindir: ${bindir} - sbindir: ${sbindir} libdir: ${libdir} rootlibdir: ${rootlib_execdir} libexecdir: ${libexecdir} @@ -228,6 +236,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} @@ -242,9 +252,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}