1
0
Fork 0

dia check via configure

master
Mike Gerwitz 2015-12-22 22:52:04 -05:00
parent d4478cdcd1
commit 7dfb288ba7
2 changed files with 28 additions and 3 deletions

View File

@ -90,6 +90,23 @@ AS_IF(test "$JAVA" -a ! "$CCJAR",
AM_CONDITIONAL(HAS_CCJAR, [test "$CCJAR"])
# dia used for documentation images
path_dia=dia
AC_ARG_WITH([dia],
[AS_HELP_STRING([--without-dia],
[disable support for documentation graphics])],
[],
[with_dia=yes])
AS_IF([test "$with_dia" != no],
[AC_CHECK_PROGS(DIA, [dia])
AS_IF([test "$DIA"],
[],
[AC_MSG_WARN([could not locate dia (--without-dia to disable)])])
])
AM_CONDITIONAL(HAS_DIA, [test "$DIA"])
# check for performance tests
AC_MSG_CHECKING([for performance tests])
PERF_TESTS=$( find $srcdir/test/perf -name 'perf-*.js' | tr '\n' ' ' | LC_ALL=C sort )

View File

@ -59,13 +59,21 @@ pdf-local: img
html-local: img easejs.css highlight.pack.js interactive.js
# doc images
if HAS_DIA
img/%.png: img/%.dia
echo "$<" | grep -q 'wide' \
&& dia -e $@ -s x250 $< \
|| dia -e $@ -s 300x $<
&& $(DIA) -e $@ -s x250 $< \
|| $(DIA) -e $@ -s 300x $<
else
@echo "warning: not building eps (--without-dia)"
endif
img/%.eps: img/%.dia
dia -e $@ $<
if HAS_DIA
$(DIA) -e $@ $<
else
@echo "warning: not building eps (--without-dia)"
endif
# doc plain text
$(path_doc_output_plain): $(doc_imgs_txt)