* Fix sf.net issue #1997905, thanks to Coleman Kane: + Check for the sed tool. + Do not use sed's -i flag: its behaviour across platforms is inconsistent.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
diff --git a/configure.ac b/configure.ac
index e9f867c..cb803b5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -73,8 +73,9 @@ AC_PATH_PROG(KPSEWHICH, kpsewhich, no)
AC_PATH_PROG(DVIPS, dvips, no)
AC_PATH_PROG(CONVERT, convert, no)
AC_PATH_PROG(EPSTOPDF, epstopdf, no)
+AC_PATH_TOOL(SED, sed, no)
if test "${DVIPS}" = "no" -o "${KPSEWHICH}" = "no" -o "${EPSTOPDF}" = "no" \
- -o "${CONVERT}" = "no"; then
+ -o "${CONVERT}" = "no" -o "${SED}" = "no"; then
LATEX="no"
fi
if test "x${LATEX}" != "xno"; then
diff --git a/docs/Makefile.am b/docs/Makefile.am
index 8fec306..eea2744 100644
--- a/docs/Makefile.am
+++ b/docs/Makefile.am
@@ -28,14 +28,17 @@ endif
html/doxygen.css: stamp-doxygen
stamp-doxygen: doxygen.cfg stamp-eps
$(DOXYGEN) $^
- sed -i 's/%FTGL/FTGL/' html/*html
+ for file in html/*html; do \
+ $(SED) -e 's/%FTGL/FTGL/' < $$file > $$file.tmp; \
+ mv $$file.tmp $$file; \
+ done
touch $@
latex/ftgl.pdf: stamp-latex
stamp-latex: stamp-doxygen
rm -f latex/ftgl.tex latex/ftgl.pdf
mv latex/refman.tex latex/ftgl.tex
- sed 's/setlength{/renewcommand{/' latex/ftgl.tex > latex/refman.tex
+ $(SED) -e 's/setlength{/renewcommand{/' < latex/ftgl.tex > latex/refman.tex
cd latex && $(MAKE) $(AM_CFLAGS) refman.pdf || (cat refman.log; exit 1)
mv latex/refman.pdf latex/ftgl.pdf
touch stamp-latex