chiark / gitweb /
build-sys: Normalize paths of configure options
authorMichael Biebl <biebl@debian.org>
Sat, 30 May 2015 01:04:55 +0000 (03:04 +0200)
committerSven Eden <yamakuzure@gmx.net>
Tue, 14 Mar 2017 09:01:42 +0000 (10:01 +0100)
commit2f3c1f55f649c4cc6ac7d623f12bcf32b33d449c
tree9612ae7e324a68927021dbad33565faf9314cbda
parentaea2c66b3d950411fbd59878613adec45d786f1a
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.
m4/ax_normalize_path.m4 [new file with mode: 0644]