-
Notifications
You must be signed in to change notification settings - Fork 28
/
configure.in
91 lines (78 loc) · 2.05 KB
/
configure.in
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
dnl
dnl Generic Haskell configure script
dnl
# Is it there?
AC_INIT(lhs2tex,1.25)
VERSION="1.25"
SHORTVERSION="1.25"
NUMVERSION=125
PRE=1
AC_SUBST(VERSION)
AC_SUBST(SHORTVERSION)
AC_SUBST(NUMVERSION)
AC_SUBST(PRE)
# check for Haskell compiler
AC_PATH_PROG(GHC,ghc)
# check for Hugs (only for documentation)
AC_PATH_PROG(HUGS,hugs)
# install command
AC_PROG_INSTALL
# symbolic links
AC_PROG_LN_S()
# other programs
AC_PATH_PROG(BASH,bash)
AC_PATH_PROG(MV,mv)
AC_PATH_PROG(CP,cp)
AC_PATH_PROG(RM,rm)
AC_PATH_PROG(MKDIR,mkdir)
AC_PATH_PROG(TOUCH,touch)
AC_PATH_PROG(DIFF,diff)
AC_PATH_PROG(GREP,grep)
AC_PATH_PROG(SED,sed)
AC_PATH_PROG(SORT,sort)
AC_PATH_PROG(UNIQ,uniq)
AC_PATH_PROG(FIND,find)
AC_PATH_PROG(LATEX,latex)
AC_PATH_PROG(PDFLATEX,pdflatex)
AC_PATH_PROG(XDVI,xdvi)
AC_PATH_PROG(GV,gv)
AC_PATH_PROG(DVIPS,dvips)
# texmf tree
AC_CHECK_TEXMF
AC_ARG_ENABLE(polytable,
[ --disable-polytable do not install polytable TeX package],
[POLYTABLE_INSTALL=$enableval],
[POLYTABLE_INSTALL=yes])
if test "z$POLYTABLE_INSTALL" = "zyes"; then
AC_CHECK_POLYTABLE
# does polytable need to be installed?
AC_MSG_CHECKING([whether polytable needs to be installed])
POLYTABLE_INSTALL=no
if test -n $POLYTABLE; then
FPTOOLS_PROG_CHECK_VERSION([$POLYTABLE_VERSION],-lt,[0.8.2],
[POLYTABLE_INSTALL=yes])
else
POLYTABLE_INSTALL=yes
fi
AC_MSG_RESULT($POLYTABLE_INSTALL)
fi
AC_SUBST(POLYTABLE_INSTALL)
AC_PATH_PROG(MKTEXLSR,mktexlsr)
# docdir and expansion
docdir="$datadir/doc/$PACKAGE_TARNAME-$PACKAGE_VERSION"
AC_SUBST(docdir)
stydir="$datadir/$PACKAGE_TARNAME-$PACKAGE_VERSION"
AC_SUBST(stydir)
# lhs2TeX binary path relative to docdir
LHS2TEX="../lhs2TeX"
AC_SUBST(LHS2TEX)
# search path separator
SEP=":"
AC_SUBST(SEP)
AC_CONFIG_FILES(config.mk src/Version.lhs lhs2TeX.1 doc/InteractiveHugs.lhs doc/InteractivePre.lhs)
AC_OUTPUT
echo "Configuration succesfully completed."
echo "Say"
echo " make to compile and build documentation"
echo " make bin to compile the binary only"
echo " make install to (compile and) install"