diff options
author | Michael Biebl <biebl@debian.org> | 2015-05-30 03:04:55 +0200 |
---|---|---|
committer | Filipe Brandenburger <filbranden@google.com> | 2015-06-02 07:54:51 -0700 |
commit | dd334850259e6bc25fdd003790467f428d40fbcd (patch) | |
tree | 583bfde5165cc3587a71fadf79e2b5c8ab79c2e9 /configure.ac | |
parent | 7d2e33a416388f9fed5f357e55dcd41394651edc (diff) |
build-sys: Normalize paths of configure options
Strip trailing slashes from options such as --with-rootprefix, so that building
with rootprefix="/" results in paths like "/lib" instead of "//lib".
Also handle paths such as "/usr/" gracefully.
Use m4/ax_normalize_path.m4 from the autoconf-archive project, which is now
included in our tree as per usual practices in using autoconf-archive macros.
Tested with the following configure options:
./configure \
--with-rootprefix=/ \
--with-rootlibdir=/lib64/ \
--prefix=/usr/ \
--libdir=/lib/ \
--with-bashcompletiondir=/bash-completion/completions/
(The "prefix" and "libdir" are already automatically normalized by Autoconf,
this command is testing the others.)
Compared the config.log and resulting trees (in particular man pages) to
confirm double slashes were not present in the latter.
Also tested that a configuration using default options is not affected and that
`make distcheck` still works as expected.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 92654a644a..78d52e401c 100644 --- a/configure.ac +++ b/configure.ac @@ -1370,16 +1370,19 @@ AC_ARG_WITH([dbuspolicydir], AS_HELP_STRING([--with-dbuspolicydir=DIR], [D-Bus policy directory]), [], [with_dbuspolicydir=${sysconfdir}/dbus-1/system.d]) +AX_NORMALIZE_PATH([with_dbuspolicydir]) AC_ARG_WITH([dbussessionservicedir], AS_HELP_STRING([--with-dbussessionservicedir=DIR], [D-Bus session service directory]), [], [with_dbussessionservicedir=${datadir}/dbus-1/services]) +AX_NORMALIZE_PATH([with_dbussessionservicedir]) AC_ARG_WITH([dbussystemservicedir], AS_HELP_STRING([--with-dbussystemservicedir=DIR], [D-Bus system service directory]), [], [with_dbussystemservicedir=${datadir}/dbus-1/system-services]) +AX_NORMALIZE_PATH([with_dbussystemservicedir]) AC_ARG_WITH([bashcompletiondir], AS_HELP_STRING([--with-bashcompletiondir=DIR], [Bash completions directory]), @@ -1389,29 +1392,35 @@ AC_ARG_WITH([bashcompletiondir], ] , [ with_bashcompletiondir=${datadir}/bash-completion/completions ])]) +AX_NORMALIZE_PATH([with_bashcompletiondir]) AC_ARG_WITH([zshcompletiondir], AS_HELP_STRING([--with-zshcompletiondir=DIR], [Zsh completions directory]), [], [with_zshcompletiondir=${datadir}/zsh/site-functions]) +AX_NORMALIZE_PATH([with_zshcompletiondir]) AC_ARG_WITH([rootprefix], AS_HELP_STRING([--with-rootprefix=DIR], [rootfs directory prefix for config files and kernel modules]), [], [with_rootprefix=${ac_default_prefix}]) +AX_NORMALIZE_PATH([with_rootprefix]) AC_ARG_WITH([rootlibdir], AS_HELP_STRING([--with-rootlibdir=DIR], [Root directory for libraries necessary for boot]), [], [with_rootlibdir=${libdir}]) +AX_NORMALIZE_PATH([with_rootlibdir]) AC_ARG_WITH([pamlibdir], AS_HELP_STRING([--with-pamlibdir=DIR], [Directory for PAM modules]), [], [with_pamlibdir=${with_rootlibdir}/security]) +AX_NORMALIZE_PATH([with_pamlibdir]) AC_ARG_WITH([pamconfdir], AS_HELP_STRING([--with-pamconfdir=DIR], [Directory for PAM configuration]), [], [with_pamconfdir=${sysconfdir}/pam.d]) +AX_NORMALIZE_PATH([with_pamconfdir]) AC_ARG_ENABLE([split-usr], AS_HELP_STRING([--enable-split-usr], [Assume that /bin, /sbin aren\'t symlinks into /usr]), |