summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorAnthony G. Basile <blueness@gentoo.org>2012-11-23 13:48:49 -0500
committerAnthony G. Basile <blueness@gentoo.org>2012-11-23 13:48:49 -0500
commite5cc2b881fd1db175b0d80bcccf21ae70857a532 (patch)
tree352c36d21626640c5a7eddf25a42a7db3c656741 /configure.ac
parentef6fd93e79be3df2ee33085a8f399e616d624c9d (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>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac85
1 files changed, 56 insertions, 29 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])