Alexander Gutkin | 5b6dc79 | 2013-02-28 00:24:20 +0000 | [diff] [blame] | 1 | AC_INIT([OpenFst], [1.3.3], [help@www.openfst.org]) |
Ian Hodson | f4c12fc | 2012-05-30 21:27:06 +0100 | [diff] [blame] | 2 | AM_INIT_AUTOMAKE([foreign nostdinc -Wall -Werror]) |
| 3 | |
| 4 | AC_PROG_CXX |
| 5 | AC_DISABLE_STATIC |
| 6 | AC_PROG_LIBTOOL |
| 7 | |
| 8 | AC_CONFIG_HEADERS([config.h src/include/fst/config.h]) |
| 9 | AC_CONFIG_SRCDIR([src/lib/fst.cc]) |
| 10 | AC_CONFIG_FILES([ |
| 11 | Makefile |
| 12 | src/Makefile |
| 13 | src/include/Makefile |
| 14 | src/lib/Makefile |
| 15 | src/bin/Makefile |
| 16 | src/test/Makefile |
| 17 | src/extensions/Makefile |
| 18 | src/extensions/compact/Makefile |
| 19 | src/extensions/const/Makefile |
| 20 | src/extensions/far/Makefile |
| 21 | src/extensions/lookahead/Makefile |
Alexander Gutkin | dfd8b83 | 2012-09-12 18:11:43 +0100 | [diff] [blame] | 22 | src/extensions/ngram/Makefile |
Ian Hodson | f4c12fc | 2012-05-30 21:27:06 +0100 | [diff] [blame] | 23 | src/extensions/pdt/Makefile |
| 24 | src/script/Makefile |
| 25 | ]) |
| 26 | AC_CONFIG_MACRO_DIR([m4]) |
| 27 | AC_LANG([C++]) |
| 28 | |
| 29 | AC_CHECK_TYPES([std::tr1::hash<long long unsigned>], [], [], |
| 30 | [[#include <tr1/unordered_map>]]) |
| 31 | AC_CHECK_TYPES([__gnu_cxx::slist<int>], [], [], |
| 32 | [[#include <ext/slist>]]) |
| 33 | |
| 34 | AC_ARG_ENABLE( |
| 35 | [bin], |
| 36 | [AS_HELP_STRING( |
| 37 | [--enable-bin], |
| 38 | [enable fst::script and command-line binaries])], |
| 39 | [], |
| 40 | [enable_bin=yes]) |
| 41 | AM_CONDITIONAL([HAVE_BIN], [test "x$enable_bin" != xno]) |
| 42 | AM_CONDITIONAL([HAVE_SCRIPT], [test "x$enable_bin" != xno]) |
| 43 | |
| 44 | AC_ARG_ENABLE( |
| 45 | [compact-fsts], |
| 46 | [AS_HELP_STRING( |
| 47 | [--enable-compact-fsts], |
| 48 | [enable all CompactFst extensions])], |
| 49 | [], |
| 50 | [enable_compact_fsts=no]) |
| 51 | AM_CONDITIONAL([HAVE_COMPACT], [test "x$enable_compact_fsts" != xno]) |
| 52 | |
| 53 | AC_ARG_ENABLE( |
| 54 | [const-fsts], |
| 55 | [AS_HELP_STRING( |
| 56 | [--enable-const-fsts], |
| 57 | [enable all ConstFst extensions])], |
| 58 | [], |
| 59 | [enable_const_fsts=no]) |
| 60 | AM_CONDITIONAL([HAVE_CONST], [test "x$enable_const_fsts" != xno]) |
| 61 | |
| 62 | AC_ARG_ENABLE([far], [AS_HELP_STRING([--enable-far], [enable FAR extensions])], |
| 63 | [], [enable_far=no]) |
| 64 | AM_CONDITIONAL([HAVE_FAR], [test "x$enable_far" != xno]) |
| 65 | |
| 66 | AC_ARG_ENABLE( |
Alexander Gutkin | dfd8b83 | 2012-09-12 18:11:43 +0100 | [diff] [blame] | 67 | [ngram-fsts], |
| 68 | [AS_HELP_STRING( |
| 69 | [--enable-ngram-fsts], |
| 70 | [enable NGramFst extension])], |
| 71 | [], |
| 72 | [enable_ngram_fsts=no]) |
| 73 | AM_CONDITIONAL([HAVE_NGRAM], [test "x$enable_ngram_fsts" != xno]) |
| 74 | |
| 75 | AC_ARG_ENABLE( |
Ian Hodson | f4c12fc | 2012-05-30 21:27:06 +0100 | [diff] [blame] | 76 | [lookahead-fsts], |
| 77 | [AS_HELP_STRING( |
| 78 | [--enable-lookahead-fsts], |
| 79 | [enable LookAheadFst extensions])], |
| 80 | [], |
| 81 | [enable_lookahead_fsts=no]) |
| 82 | AM_CONDITIONAL([HAVE_LOOKAHEAD], [test "x$enable_lookahead_fsts" != xno]) |
| 83 | |
| 84 | AC_ARG_ENABLE([pdt], [AS_HELP_STRING([--enable-pdt], [enable PDT extensions])], |
| 85 | [], [enable_pdt=no]) |
| 86 | AM_CONDITIONAL([HAVE_PDT], [test "x$enable_pdt" != xno]) |
| 87 | |
Ian Hodson | f4c12fc | 2012-05-30 21:27:06 +0100 | [diff] [blame] | 88 | AC_SUBST([libfstdir], [${libdir}/fst]) |
| 89 | |
| 90 | AC_OUTPUT |