configure: install in a sub-dir of --libdir and --docdir
author"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Thu Dec 10 15:09:13 2009 +0100 (2009-12-10)
changeset 1660991fc21dd3cf
parent 1659 5f26745a915c
child 1662 ea3490d46f4e
configure: install in a sub-dir of --libdir and --docdir

In case the user specifies the LIBDIR with --libdir , or DOCDIR with
--docdir, install our support files in a sub-dir, so as not to mangle
existing (potentially system) files/dirs.
configure
     1.1 --- a/configure	Thu Nov 26 00:22:17 2009 +0100
     1.2 +++ b/configure	Thu Dec 10 15:09:13 2009 +0100
     1.3 @@ -404,10 +404,17 @@
     1.4  
     1.5  # Now we have the version string, we can build up the paths
     1.6  [ -z "${BINDIR_set}" ] && BINDIR="${PREFIX}/bin"
     1.7 -[ -z "${LIBDIR_set}" ] && LIBDIR="${PREFIX}/lib/ct-ng-${VERSION}"
     1.8 -[ -z "${DOCDIR_set}" ] && DOCDIR="${PREFIX}/share/doc/ct-ng-${VERSION}"
     1.9 +[ -z "${LIBDIR_set}" ] && LIBDIR="${PREFIX}/lib"
    1.10 +[ -z "${DOCDIR_set}" ] && DOCDIR="${PREFIX}/share/doc"
    1.11  [ -z "${MANDIR_set}" ] && MANDIR="${PREFIX}/share/man/man1"
    1.12  
    1.13 +# Install support files in our own sub-dir, so as not to mangle (system)
    1.14 +# files and dirs, but only if not --local
    1.15 +if [ -z "${LOCAL_set}" ]; then
    1.16 +    LIBDIR="${LIBDIR}/ct-ng-${VERSION}"
    1.17 +    DOCDIR="${DOCDIR}/ct-ng-${VERSION}"
    1.18 +fi
    1.19 +
    1.20  # Check that install PATHs are absolute
    1.21  for p in BIN LIB DOC MAN; do
    1.22      var="${p}DIR"