aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
blob: 2402e6fae49d24cd34345685ab4bd583883f53c5 (plain)
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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
#                                               -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.

AC_PREREQ(2.59)
AC_INIT([Skribilo],
        m4_esyscmd([build-aux/git-version-gen .tarball-version]),
        [skribilo-users@nongnu.org],
	[skribilo],
	[http://nongnu.org/skribilo/])
AC_CONFIG_AUX_DIR(build-aux)
AC_CONFIG_MACRO_DIR(m4)

AM_INIT_AUTOMAKE([1.11 gnu no-define readme-alpha \
  color-tests parallel-tests])

AC_CONFIG_SRCDIR([src/guile/skribilo/reader.scm])

# GNU Gettext.
AM_GNU_GETTEXT([external])
AM_GNU_GETTEXT_VERSION([0.16.1])

# Specifying the Guile module directory.
AC_ARG_WITH([guilemoduledir],
  [use the specified installation path for Guile modules],
  [case "x$withval" in
     xyes|xno) guilemoduledir="";;
     *)        guilemoduledir="$withval";;
   esac],
  [guilemoduledir=""])

AC_PROG_LN_S
AC_PROG_MKDIR_P

# Look for Guile.
GUILE_PROGS
GUILE_SITE_DIR
AC_PATH_PROGS([GUILD], [guild guile-tools])

# GNU Guile 2.0.x and its compiler.
AM_CONDITIONAL([HAVE_GUILE2],
  [test "x$GUILD" != "x" && \
   "$GUILD" compile --help >/dev/null 2>&1])

# Need Guile-Reader.
GUILE_MODULE_REQUIRED([system reader])

# SRFI-34 is normally in Guile 1.8, but let's make sure.
GUILE_MODULE_REQUIRED([srfi srfi-34])

# Need SRFI-35, available in Guile >= 1.8.3.
GUILE_MODULE_REQUIRED([srfi srfi-35])

# Need SRFI-37, available in Guile >= 1.8.3.
GUILE_MODULE_REQUIRED([srfi srfi-37])

# Make sure we're not using the broken SRFI-35 from Guile-Lib <= 0.1.6.
SKR_GUILE_SRFI_35_WORKS

# Check for SXML and HTMLPrag from Guile-Lib, needed for the `rss-2' reader.
GUILE_MODULE_AVAILABLE([have_sxml_simple], [(sxml simple)])
GUILE_MODULE_AVAILABLE([have_htmlprag],    [(htmlprag)])
if test "x$have_sxml_simple$have_htmlprag" != "xyesyes"; then
  AC_MSG_WARN([Guile-Lib modules needed by the `rss-2' reader are missing.])
fi

AM_CONDITIONAL([BUILD_RSS2_READER],
  [test "x$have_sxml_simple$have_htmlprag" == "xyesyes"])

# Look for `convert', from ImageMagick.
AC_PATH_PROG([CONVERT], [convert])
if test "x$CONVERT" == "x"; then
  AC_MSG_ERROR([The `convert' program was not found.  Please install ImageMagick.])
fi

# Look for `fig2dev', from Xfig/Transfig.
AC_PATH_PROG([FIG2DEV], [fig2dev], [fig2dev])

# Look for a suitable version of Lout.
LOUT_PROGRAM([LOUT_REQUIRED_PACKAGE([math])])

# Look for `ps2pdf' from GhostScript.
AC_PATH_PROG([PS2PDF], [ps2pdf])
AM_CONDITIONAL([HAVE_PS2PDF], [test "x$PS2PDF" != "x"])

# Look for Ploticus.
AC_PATH_PROGS([PLOTICUS], [ploticus pl])
AM_CONDITIONAL([HAVE_PLOTICUS], [test "x$PLOTICUS" != "x"])

# Emacs.
AM_PATH_LISPDIR


pkgdatadir="$datadir/$PACKAGE_TARNAME"
if test "x$guilemoduledir" = "x"; then
  guilemoduledir="$pkgdatadir/$PACKAGE_VERSION"
fi
AC_SUBST([guilemoduledir])

if test "$guilemoduledir" != "$GUILE_SITE"; then
   # Guile won't be able to locate the modules "out of the box", so
   # warn the user.  OTOH, `skribilo' will find them, no matter where
   # it is.
   AC_MSG_NOTICE([`guilemoduledir' ($guilemoduledir) is different from `GUILE_SITE' ($GUILE_SITE).])
   AC_MSG_NOTICE([There is nothing wrong with that, but to access Skribilo modules from Guile,])
   AC_MSG_NOTICE([you will need, e.g., to adjust the `GUILE_LOAD_PATH' environment variable accordingly.])
   AC_MSG_NOTICE([Alternatively, you can re-run `configure' with `--with-guilemoduledir=$GUILE_SITE'.])
fi


AC_OUTPUT([Makefile
	   po/Makefile.in
	   src/Makefile
	   src/guile/Makefile
           doc/Makefile
	   doc/user/Makefile
	   doc/modules/Makefile
	   doc/man/Makefile
	   tests/Makefile
	   emacs/Makefile])