From 24d44def601a7ebae5b79743a9c34ca024997531 Mon Sep 17 00:00:00 2001 From: Pavel Roskin Date: Sat, 24 Dec 2016 14:48:02 -0800 Subject: [PATCH] Add --enable-strict-locations option, describe default in its help text Rather than guess user's intention based on whether --prefix was specified, use an explicit option to enable strict GNU Coding Standards for installation directories. The default is to use /etc and /var rather than corresponding directories under prefix. Use --enable-strict-locations in "make distcheck", it expects all installed files to be under prefix. --- Makefile.am | 4 +++- configure.ac | 11 ++++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/Makefile.am b/Makefile.am index 3003129d..c8457c54 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,5 +1,7 @@ ACLOCAL_AMFLAGS = -I m4 -AM_DISTCHECK_CONFIGURE_FLAGS = --without-systemdsystemunitdir +AM_DISTCHECK_CONFIGURE_FLAGS = \ + --without-systemdsystemunitdir \ + --enable-strict-locations EXTRA_DIST = \ COPYING \ diff --git a/configure.ac b/configure.ac index 8150aa59..68620e13 100644 --- a/configure.ac +++ b/configure.ac @@ -292,9 +292,14 @@ CFLAGS="$save_CFLAGS" AC_SUBST([moduledir], '${libdir}/xrdp') -if test "x${prefix}" = "xNONE" ; then -sysconfdir="/etc"; -localstatedir="/var"; +AC_ARG_ENABLE([strict-locations], + [AS_HELP_STRING([--enable-strict-locations], + [Use standard Autoconf install directories unless overridden + (default: use /etc and /var)])]) + +if test "x$enable_strict_locations" != "xyes"; then + sysconfdir="/etc"; + localstatedir="/var"; fi PKG_INSTALLDIR