forked from apertium/apertium-jpn
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
43 lines (30 loc) · 1.58 KB
/
configure.ac
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
AC_PREREQ(2.52)
AC_INIT([Apertium Japanese], [0.1.0], [doldham1@swarthmore.edu], [apertium-jpn], [https://wiki.apertium.org/wiki/Apertium-jpn])
AM_INIT_AUTOMAKE
AC_PROG_LN_S
AC_PROG_AWK
dnl HFST support
AH_TEMPLATE(HAVE_HFSTOSPELL, [Have HFSTOSPELL])
AC_ARG_ENABLE(ospell, AC_HELP_STRING([--enable-ospell],
[enable HFST spellchecking backend]),
[hfstospell=${enableval}], [hfstospell=no])
dnl must be AS_IF for some aclocals to pick PKG_CHECK_MODULES somehow.
dnl AC_PROVIDE_IFELSE doesn't work on mac?
AS_IF([test x$hfstospell = xyes], [
PKG_CHECK_MODULES([HFSTOSPELL], [hfstospell >= 0.2])
AC_DEFINE(HAVE_HFSTOSPELL, 1)
CXXFLAGS="$CXXFLAGS $HFSTOSPELL_CFLAGS"
])
AM_CONDITIONAL([HAVE_HFSTOSPELL], [test x$hfstospell = xyes])
m4_define([required_apertium_version], [3.4.0])
PKG_CHECK_MODULES(APERTIUM, apertium >= required_apertium_version)
AC_PATH_PROG([HFSTLEXC], [hfst-lexc], [false], [$PATH$PATH_SEPARATOR$with_hfst_lexc/bin])
AS_IF([test x$HFSTLEXC = xfalse], [AC_MSG_ERROR([You don't have hfst-lexc installed])])
AC_PATH_PROG([HFSTTWOLC], [hfst-twolc], [false], [$PATH$PATH_SEPARATOR$with_hfst_twolc/bin])
AS_IF([test x$HFSTTWOLC = xfalse], [AC_MSG_ERROR([You don't have hfst-twolc installed])])
AC_PATH_PROG([CGCOMP], [cg-comp], [false], [$PATH$PATH_SEPARATOR$with_cg_comp/bin])
AS_IF([test x$CGCOMP = xfalse], [AC_MSG_ERROR([You don't have cg-comp installed])])
PKG_CHECK_MODULES(REGTEST, apertium-regtest >= 0.0.1, [],
[AC_MSG_WARN([Running tests requires apertium-regtest])])
AP_MKINCLUDE
AC_OUTPUT([Makefile apertium-jpn.pc])