-
Notifications
You must be signed in to change notification settings - Fork 2
/
configure.ac
104 lines (91 loc) · 2.68 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
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
AC_INIT([OpenFst], [1.3.2], [[email protected]])
AM_INIT_AUTOMAKE([foreign nostdinc -Wall -Werror])
AC_PROG_CXX
AC_DISABLE_STATIC
AC_PROG_LIBTOOL
AC_CONFIG_HEADERS([config.h src/include/fst/config.h])
AC_CONFIG_SRCDIR([src/lib/fst.cc])
AC_CONFIG_FILES([
Makefile
src/Makefile
src/include/Makefile
src/lib/Makefile
src/bin/Makefile
src/test/Makefile
src/extensions/Makefile
src/extensions/compact/Makefile
src/extensions/const/Makefile
src/extensions/far/Makefile
src/extensions/lookahead/Makefile
src/extensions/ngram/Makefile
src/extensions/pdt/Makefile
src/script/Makefile
])
AC_CONFIG_MACRO_DIR([m4])
AC_LANG([C++])
AC_CHECK_TYPES([std::tr1::hash<long long unsigned>], [], [],
[[#include <tr1/unordered_map>]])
AC_CHECK_TYPES([__gnu_cxx::slist<int>], [], [],
[[#include <ext/slist>]])
AC_ARG_ENABLE(
[bin],
[AS_HELP_STRING(
[--enable-bin],
[enable fst::script and command-line binaries])],
[],
[enable_bin=yes])
AM_CONDITIONAL([HAVE_BIN], [test "x$enable_bin" != xno])
AM_CONDITIONAL([HAVE_SCRIPT], [test "x$enable_bin" != xno])
AC_ARG_ENABLE(
[compact-fsts],
[AS_HELP_STRING(
[--enable-compact-fsts],
[enable all CompactFst extensions])],
[],
[enable_compact_fsts=no])
AM_CONDITIONAL([HAVE_COMPACT], [test "x$enable_compact_fsts" != xno])
AC_ARG_ENABLE(
[const-fsts],
[AS_HELP_STRING(
[--enable-const-fsts],
[enable all ConstFst extensions])],
[],
[enable_const_fsts=no])
AM_CONDITIONAL([HAVE_CONST], [test "x$enable_const_fsts" != xno])
AC_ARG_ENABLE([far], [AS_HELP_STRING([--enable-far], [enable FAR extensions])],
[], [enable_far=no])
AM_CONDITIONAL([HAVE_FAR], [test "x$enable_far" != xno])
AC_ARG_ENABLE(
[ngram-fsts],
[AS_HELP_STRING(
[--enable-ngram-fsts],
[enable NGramFst extension])],
[],
[enable_ngram_fsts=no])
AM_CONDITIONAL([HAVE_NGRAM], [test "x$enable_ngram_fsts" != xno])
AC_ARG_ENABLE(
[lookahead-fsts],
[AS_HELP_STRING(
[--enable-lookahead-fsts],
[enable LookAheadFst extensions])],
[],
[enable_lookahead_fsts=no])
AM_CONDITIONAL([HAVE_LOOKAHEAD], [test "x$enable_lookahead_fsts" != xno])
AC_ARG_ENABLE([pdt], [AS_HELP_STRING([--enable-pdt], [enable PDT extensions])],
[], [enable_pdt=no])
AM_CONDITIONAL([HAVE_PDT], [test "x$enable_pdt" != xno])
AC_ARG_WITH([icu],
[AS_HELP_STRING([--with-icu],
[enable UTF8 support using the ICU Library])],
[],
[with_icu=no])
AS_IF([test "x$with_icu" != xno],
[AC_CHECK_ICU(
[4.2],
[AC_DEFINE([HAVE_ICU],
[1],
[Define to 1 if you have the ICU library.])],
[AC_MSG_FAILURE(
[--with-icu was given, but ICU Library v. 4.2 or newer not found])])])
AC_SUBST([libfstdir], [${libdir}/fst])
AC_OUTPUT