From a2d142e73d5abbba3f080b074b0b193a7f2ce81a Mon Sep 17 00:00:00 2001 From: Andreas Suter Date: Tue, 24 Oct 2017 09:06:50 +0200 Subject: [PATCH] check if DOCDIR has not already injected from the command line. --- configure.ac | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index ceb78a7a..d421a507 100644 --- a/configure.ac +++ b/configure.ac @@ -1373,11 +1373,17 @@ else INSTALLDIR="${prefix}" fi -if test -d "${INSTALLDIR}/doc" +dnl only define DOCDIR if not already present. This allows +dnl to feed DOCDIR on the configure level which is useful when +dnl for instance building a rpm. +if test "x${DOCDIR}" = "x" then - DOCDIR="${INSTALLDIR}/doc/musrfit" -else - DOCDIR="${INSTALLDIR}/share/doc/musrfit" + if test -d "${INSTALLDIR}/doc" + then + DOCDIR="${INSTALLDIR}/doc/musrfit" + else + DOCDIR="${INSTALLDIR}/share/doc/musrfit" + fi fi AC_SUBST(DOCDIR)