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)