-
Notifications
You must be signed in to change notification settings - Fork 3
/
configure.ac
39 lines (32 loc) · 983 Bytes
/
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
AC_INIT([NGram], [1.3.6], [[email protected]])
AM_INIT_AUTOMAKE([foreign nostdinc -Wall -Werror])
AM_PROG_AR
# NGram does not throw exceptions, so we do not generate exception handling
# code. However, users are free to re-enable exception handling.
# NGram assumes `char` is `unsigned char`; -fsigned-char is likely unsafe.
CPPFLAGS="$CPPFLAGS -fno-exceptions -funsigned-char"
CXXFLAGS="$CXXFLAGS -std=c++11"
AC_DISABLE_STATIC
AC_PROG_CXX
AC_PROG_LIBTOOL
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_SRCDIR([src/include/ngram/ngram-model.h])
AC_CONFIG_FILES([
Makefile
src/Makefile
src/include/Makefile
src/lib/Makefile
src/bin/Makefile
src/test/Makefile
])
AC_CONFIG_MACRO_DIR([m4])
AC_LANG([C++])
AC_CHECK_HEADER([fst/fst.h], [],
[AC_MSG_ERROR([fst/fst.h header not found])]
)
AC_CHECK_HEADER([fst/extensions/far/far.h], [],
[AC_MSG_ERROR([fst/extensions/far/far.h header not found])]
)
AC_CHECK_LIB([dl], dlopen, [DL_LIBS=-ldl])
AC_SUBST([DL_LIBS])
AC_OUTPUT