Skip to content

Commit f435b02

Browse files
committed
build/pkgs/mathjax: add spkg-configure file
1 parent 7342cbf commit f435b02

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

build/pkgs/mathjax/spkg-configure.m4

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
SAGE_SPKG_CONFIGURE([mathjax], [
2+
# Arch: /usr/share/mathjax
3+
# Gentoo: /usr/share/mathjax
4+
# Void: /usr/share/mathjax
5+
AC_MSG_CHECKING([for MathJax-3.x])
6+
m4_foreach([mathjax_dir], [/usr/share/mathjax], [
7+
# tex-chtml.hs is used in src/sage_docbuild/conf.py
8+
# and was not present in MathJax-2.x
9+
AS_IF([test -f "mathjax_dir/tex-chtml.js"], [
10+
SAGE_MATHJAX_DIR="mathjax_dir"
11+
AC_MSG_RESULT([mathjax_dir])
12+
])
13+
])
14+
AS_IF([test -z "${SAGE_MATHJAX_DIR}"], [
15+
AC_MSG_RESULT([no])
16+
sage_spkg_install_mathjax=yes
17+
])
18+
],[],[],[
19+
# post-check
20+
AS_IF([test x$sage_spkg_install_mathjax = xyes], [
21+
# Our spkg-src script adds an extra "mathjax"
22+
SAGE_MATHJAX_DIR='${prefix}'/share/mathjax/mathjax
23+
])
24+
25+
AC_SUBST(SAGE_MATHJAX_DIR, "${SAGE_MATHJAX_DIR}")
26+
])

0 commit comments

Comments
 (0)