diff options
author | Anthony G. Basile <blueness@gentoo.org> | 2012-11-23 13:48:49 -0500 |
---|---|---|
committer | Anthony G. Basile <blueness@gentoo.org> | 2012-11-23 13:48:49 -0500 |
commit | e5cc2b881fd1db175b0d80bcccf21ae70857a532 (patch) | |
tree | 352c36d21626640c5a7eddf25a42a7db3c656741 | |
parent | ef6fd93e79be3df2ee33085a8f399e616d624c9d (diff) |
Consolidate configuration of all installation paths into configure.ac
The configuration of the installation paths for various components
was scattered between the main configure.ac file and the various
Makefile.am's. These components are: udev config file, hwdb, keymaps
and force-release keymaps and the rules. This commit consolidates
them all into one point in configure.ac and anticipates the inclusion
of new AM_CPPFLAGS of the form -DHWDB_BIN=@udevhwdbdir@ as upstream
has done, so it is easier to address issues like:
https://github.com/gentoo/eudev/issues/17
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
-rw-r--r-- | configure.ac | 85 | ||||
-rw-r--r-- | hwdb/Makefile.am | 4 | ||||
-rw-r--r-- | keymaps-force-release/Makefile.am | 4 | ||||
-rw-r--r-- | keymaps/Makefile.am | 4 | ||||
-rw-r--r-- | rules/Makefile.am | 4 | ||||
-rw-r--r-- | src/accelerometer/Makefile.am | 1 | ||||
-rw-r--r-- | src/ata_id/Makefile.am | 1 | ||||
-rw-r--r-- | src/cdrom_id/Makefile.am | 1 | ||||
-rw-r--r-- | src/collect/Makefile.am | 1 | ||||
-rw-r--r-- | src/keymap/Makefile.am | 4 | ||||
-rw-r--r-- | src/mtd_probe/Makefile.am | 1 | ||||
-rw-r--r-- | src/scsi_id/Makefile.am | 1 | ||||
-rw-r--r-- | src/udev/Makefile.am | 9 | ||||
-rw-r--r-- | src/v4l_id/Makefile.am | 1 |
14 files changed, 65 insertions, 56 deletions
diff --git a/configure.ac b/configure.ac index 5b80a42804..ee6084c7f4 100644 --- a/configure.ac +++ b/configure.ac @@ -96,10 +96,66 @@ AC_CHECK_FUNCS( AC_SEARCH_LIBS([clock_gettime], [rt], [], [AC_MSG_ERROR([*** POSIX librt not found])]) AC_SEARCH_LIBS([sqrt], [m], [], [AC_MSG_ERROR([*** POSIX libm not found])]) +# ------------------------------------------------------------------------------ # TODO: the old python checks are irrelevant, but we do need python and perl for tests # ------------------------------------------------------------------------------ +# Set paths here + +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_ARG_WITH( + [rootlibdir], + [AS_HELP_STRING( + [--with-rootlibdir=DIR], + [Root directory for libraries necessary for boot])], + [], + [with_rootlibdir=${libdir}] +) + +AC_ARG_ENABLE( + [split-usr], + [AS_HELP_STRING( + [--enable-split-usr], + [Assume that /bin, /sbin are not symlinks into /usr])], + [], + [AS_IF( + [test "x${ac_default_prefix}" != "x${with_rootprefix}"], + [enable_split_usr=yes], + [enable_split_usr=no])] +) + +AS_IF( + [test "x${enable_split_usr}" = "xyes"], + [AC_DEFINE(HAVE_SPLIT_USR, 1, [Define if /bin, /sbin are not symlinks into /usr])] +) + +# Configured paths +AC_SUBST([rootprefix], [$with_rootprefix]) +AC_SUBST([rootlibdir], [$with_rootlibdir]) +AC_SUBST([udevlibexecdir], [${with_rootlibdir}/udev]) + +# sysconfdir paths +AC_SUBST([udevconfdir],[${sysconfdir}/udev]) +AC_SUBST([udevhwdbdir],[${sysconfdir}/hwdb.d]) +AC_SUBST([udevkeymapdir],[${sysconfdir}/keymaps]) +AC_SUBST([udevkeymapforcereldir],[${sysconfdir}/keymaps/force-release]) + +# libexecdir paths +AC_SUBST([udevrulesdir],[${udevlibexecdir}/rules.d]) + +# pkgconfigdir paths +AC_SUBST([sharepkgconfigdir],[${datadir}/pkgconfig]) + +# ------------------------------------------------------------------------------ have_introspection=no AC_ARG_ENABLE([introspection], @@ -227,35 +283,6 @@ AM_CONDITIONAL(ENABLE_MANPAGES, [test "x$have_manpages" = "xyes"]) # ------------------------------------------------------------------------------ -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_ARG_WITH([rootlibdir], - AS_HELP_STRING([--with-rootlibdir=DIR], [Root directory for libraries necessary for boot]), - [], - [with_rootlibdir=${libdir}]) - -AC_ARG_ENABLE([split-usr], - AS_HELP_STRING([--enable-split-usr], [Assume that /bin, /sbin aren\'t symlinks into /usr]), - [], - [AS_IF([test "x${ac_default_prefix}" != "x${with_rootprefix}"], [ - enable_split_usr=yes - ], [ - enable_split_usr=no - ])]) - -AS_IF([test "x${enable_split_usr}" = "xyes"], [ - AC_DEFINE(HAVE_SPLIT_USR, 1, [Define if /bin, /sbin aren't symlinks into /usr]) -]) - -AC_SUBST([rootprefix], [$with_rootprefix]) -AC_SUBST([rootlibdir], [$with_rootlibdir]) -AC_SUBST([udevlibexecdir], [${with_rootlibdir}/udev]) - - -# ------------------------------------------------------------------------------ - LIBKMOD= AC_ARG_ENABLE([modules], [AS_HELP_STRING([--disable-modules], [Disable loadable module support @<:@default=enabled@:>@])], [have_modules=no], [have_modules=yes]) AC_ARG_ENABLE([libkmod], [AS_HELP_STRING([--enable-libkmod], [Enable module loading through kmod @<:@default=disabled@:>@])], [have_libkmod=yes], [have_libkmod=no]) diff --git a/hwdb/Makefile.am b/hwdb/Makefile.am index 0a173a6637..076376dcb8 100644 --- a/hwdb/Makefile.am +++ b/hwdb/Makefile.am @@ -1,8 +1,6 @@ ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS} -rootprefix=@rootprefix@ -udevlibexecdir=@udevlibexecdir@ -udevhwdbdir = $(udevlibexecdir)/hwdb.d +udevhwdbdir = @udevhwdbdir@ dist_udevhwdb_DATA = \ 20-pci-vendor-product.hwdb \ diff --git a/keymaps-force-release/Makefile.am b/keymaps-force-release/Makefile.am index 3f9de31414..5b2bb8e29b 100644 --- a/keymaps-force-release/Makefile.am +++ b/keymaps-force-release/Makefile.am @@ -1,8 +1,6 @@ ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS} -rootprefix=@rootprefix@ -udevlibexecdir=@udevlibexecdir@ -udevkeymapforcereldir = $(udevlibexecdir)/keymaps/force-release +udevkeymapforcereldir = @udevkeymapforcereldir@ dist_udevkeymapforcerel_DATA = \ dell-touchpad \ diff --git a/keymaps/Makefile.am b/keymaps/Makefile.am index a5dfecf339..98cc7e87d8 100644 --- a/keymaps/Makefile.am +++ b/keymaps/Makefile.am @@ -1,8 +1,6 @@ ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS} -rootprefix=@rootprefix@ -udevlibexecdir=@udevlibexecdir@ -udevkeymapdir = $(udevlibexecdir)/keymaps +udevkeymapdir = @udevkeymapdir@ KEYMAPS = \ acer \ diff --git a/rules/Makefile.am b/rules/Makefile.am index e8493036c4..c192c40ed4 100644 --- a/rules/Makefile.am +++ b/rules/Makefile.am @@ -1,8 +1,6 @@ ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS} -rootprefix=@rootprefix@ -udevlibexecdir=@udevlibexecdir@ -udevrulesdir = $(udevlibexecdir)/rules.d +udevrulesdir = @udevrulesdir@ dist_udevrules_DATA = \ 42-usb-hid-pm.rules \ diff --git a/src/accelerometer/Makefile.am b/src/accelerometer/Makefile.am index 46b8801645..9c3e9903f8 100644 --- a/src/accelerometer/Makefile.am +++ b/src/accelerometer/Makefile.am @@ -1,6 +1,5 @@ ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS} -rootprefix=@rootprefix@ udevlibexecdir=@udevlibexecdir@ AM_CPPFLAGS = \ diff --git a/src/ata_id/Makefile.am b/src/ata_id/Makefile.am index 545daf23ec..f57c90f2e9 100644 --- a/src/ata_id/Makefile.am +++ b/src/ata_id/Makefile.am @@ -1,6 +1,5 @@ ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS} -rootprefix=@rootprefix@ udevlibexecdir=@udevlibexecdir@ AM_CPPFLAGS = \ diff --git a/src/cdrom_id/Makefile.am b/src/cdrom_id/Makefile.am index 321b23b928..f4cd8b4d33 100644 --- a/src/cdrom_id/Makefile.am +++ b/src/cdrom_id/Makefile.am @@ -1,6 +1,5 @@ ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS} -rootprefix=@rootprefix@ udevlibexecdir=@udevlibexecdir@ AM_CPPFLAGS = \ diff --git a/src/collect/Makefile.am b/src/collect/Makefile.am index d96cc3946b..37c502aec2 100644 --- a/src/collect/Makefile.am +++ b/src/collect/Makefile.am @@ -1,6 +1,5 @@ ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS} -rootprefix=@rootprefix@ udevlibexecdir=@udevlibexecdir@ AM_CPPFLAGS = \ diff --git a/src/keymap/Makefile.am b/src/keymap/Makefile.am index d39313ba82..f21cb80aae 100644 --- a/src/keymap/Makefile.am +++ b/src/keymap/Makefile.am @@ -1,8 +1,6 @@ ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS} -rootprefix=@rootprefix@ udevlibexecdir=@udevlibexecdir@ -udevhomedir = $(udevlibexecdir) AM_CPPFLAGS = \ -I $(top_srcdir)/src/libudev \ @@ -31,7 +29,7 @@ BUILT_SOURCES = \ dist_doc_DATA = \ README.keymap.txt -dist_udevhome_SCRIPTS = \ +dist_udevlibexec_SCRIPTS = \ findkeyboards \ keyboard-force-release.sh diff --git a/src/mtd_probe/Makefile.am b/src/mtd_probe/Makefile.am index 444caabea7..a0af39e642 100644 --- a/src/mtd_probe/Makefile.am +++ b/src/mtd_probe/Makefile.am @@ -1,6 +1,5 @@ ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS} -rootprefix=@rootprefix@ udevlibexecdir=@udevlibexecdir@ udevlibexec_PROGRAMS = \ diff --git a/src/scsi_id/Makefile.am b/src/scsi_id/Makefile.am index 0f8aa69d4a..058855ff3c 100644 --- a/src/scsi_id/Makefile.am +++ b/src/scsi_id/Makefile.am @@ -1,6 +1,5 @@ ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS} -rootprefix=@rootprefix@ udevlibexecdir=@udevlibexecdir@ AM_CPPFLAGS = \ diff --git a/src/udev/Makefile.am b/src/udev/Makefile.am index 2486824e86..f353e079a8 100644 --- a/src/udev/Makefile.am +++ b/src/udev/Makefile.am @@ -1,8 +1,7 @@ ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS} -rootprefix=@rootprefix@ -udevlibexecdir=@udevlibexecdir@ -udevhomedir = $(udevlibexecdir) +rootprefix = @rootprefix@ +udevlibexecdir = @udevlibexecdir@ AM_CPPFLAGS = \ -include $(top_builddir)/config.h \ @@ -133,11 +132,11 @@ libudev_core_la_CPPFLAGS = \ # # Extras # -udevconfdir = $(sysconfdir)/udev +udevconfdir = @udevconfdir@ dist_udevconf_DATA = \ udev.conf -sharepkgconfigdir = $(datadir)/pkgconfig +sharepkgconfigdir = @sharepkgconfigdir@ sharepkgconfig_DATA = \ udev.pc diff --git a/src/v4l_id/Makefile.am b/src/v4l_id/Makefile.am index 071b0f969e..6542598259 100644 --- a/src/v4l_id/Makefile.am +++ b/src/v4l_id/Makefile.am @@ -1,6 +1,5 @@ ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS} -rootprefix=@rootprefix@ udevlibexecdir=@udevlibexecdir@ udevlibexec_PROGRAMS = \ |