configure slightly extended to deal with rpmbuild.

This commit is contained in:
suter_a 2017-10-25 13:11:13 +02:00
parent b1422053ab
commit bb18b01514

View File

@ -1214,7 +1214,7 @@ fi
dnl only define DOCDIR if not already present. This allows dnl only define DOCDIR if not already present. This allows
dnl to feed DOCDIR on the configure level which is useful when dnl to feed DOCDIR on the configure level which is useful when
dnl for instance building a rpm. dnl for instance building a rpm. DOCDIR2 is needed for rpmbuild only
if test "x${DOCDIR}" = "x" if test "x${DOCDIR}" = "x"
then then
if test -d "${INSTALLDIR}/doc" if test -d "${INSTALLDIR}/doc"
@ -1223,6 +1223,13 @@ then
else else
DOCDIR="${INSTALLDIR}/share/doc/musrfit" DOCDIR="${INSTALLDIR}/share/doc/musrfit"
fi fi
else
if test -d "${INSTALLDIR}/doc"
then
DOCDIR2="${INSTALLDIR}/doc/musrfit"
else
DOCDIR2="${INSTALLDIR}/share/doc/musrfit"
fi
fi fi
AC_SUBST(DOCDIR) AC_SUBST(DOCDIR)
@ -1447,12 +1454,21 @@ echo ""
dnl -------------- dnl --------------
dnl create header file that musredit knows at runtime where to find the documentation dnl create header file that musredit knows at runtime where to find the documentation
dnl the DOCDIR2 tag is used for rpmbuild only
dnl -------------- dnl --------------
if test "x$enable_editor" != "xno" && test "x${QMAKEBIN}" != "x" && test "x${QTEDITOR}" = "xmusredit_qt5"; then if test "x$enable_editor" != "xno" && test "x${QMAKEBIN}" != "x" && test "x${QTEDITOR}" = "xmusredit_qt5"; then
echo \#define MUSRFIT_PREFIX \"${INSTALLDIR}\" > src/musredit_qt5/musrfit-info.h echo \#define MUSRFIT_PREFIX \"${INSTALLDIR}\" > src/musredit_qt5/musrfit-info.h
if test "x$DOCDIR2" = "x"; then
echo \#define MUSRFIT_DOC_DIR \"${DOCDIR}\" >> src/musredit_qt5/musrfit-info.h echo \#define MUSRFIT_DOC_DIR \"${DOCDIR}\" >> src/musredit_qt5/musrfit-info.h
else
echo \#define MUSRFIT_DOC_DIR \"${DOCDIR2}\" >> src/musredit_qt5/musrfit-info.h
fi
fi fi
if test "x$enable_editor" != "xno" && test "x${QMAKEBIN}" != "x" && test "x${QTEDITOR}" = "xmusredit"; then if test "x$enable_editor" != "xno" && test "x${QMAKEBIN}" != "x" && test "x${QTEDITOR}" = "xmusredit"; then
echo \#define MUSRFIT_PREFIX \"${INSTALLDIR}\" > src/musredit/musrfit-info.h echo \#define MUSRFIT_PREFIX \"${INSTALLDIR}\" > src/musredit/musrfit-info.h
if test "x$DOCDIR2" = "x"; then
echo \#define MUSRFIT_DOC_DIR \"${DOCDIR}\" >> src/musredit/musrfit-info.h echo \#define MUSRFIT_DOC_DIR \"${DOCDIR}\" >> src/musredit/musrfit-info.h
else
echo \#define MUSRFIT_DOC_DIR \"${DOCDIR2}\" >> src/musredit/musrfit-info.h
fi
fi fi