-
Notifications
You must be signed in to change notification settings - Fork 9
/
windows-configure.ac
143 lines (121 loc) · 5.16 KB
/
windows-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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
## Process this file with autoconf to produce configure script
## Copyright (C) 2010 University of Helsinki
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# autoconf requirements
AC_PREREQ([2.62])
LT_PREREQ([2.2.6])
# init
AC_INIT([hfstospell], [0.3.0], [[email protected]], [hfstospell], [http://hfst.sf.net])
AC_CONFIG_AUX_DIR([build-aux])
AM_INIT_AUTOMAKE([1.11 -Wall -Werror foreign check-news color-tests silent-rules])
AM_SILENT_RULES([yes])
AC_REVISION([$Revision: 3876 $])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_SRCDIR([ospell.cc])
AC_CONFIG_HEADERS([config.h])
# Information on package
HFSTOSPELL_NAME=hfstospell
HFSTOSPELL_MAJOR=0
HFSTOSPELL_MINOR=3
HFSTOSPELL_EXTENSION=.0
HFSTOSPELL_VERSION=$HFSTOSPELL_MAJOR.$HFSTOSPELL_MINOR$HFSTOSPELL_EXTENSION
AC_SUBST(HFSTOSPELL_MAJOR)
AC_SUBST(HFSTOSPELL_MINOR)
AC_SUBST(HFSTOSPELL_VERSION)
AC_SUBST(HFSTOSPELL_NAME)
# Check for pkg-config first - the configuration won't work if it isn't available:
#AC_PATH_PROG([PKGCONFIG], [pkg-config], [no])
#AS_IF([test "x$PKGCONFIG" = xno], [AC_MSG_ERROR([pkg-config is required - please install])])
#AC_PATH_PROG([DOXYGEN], [doxygen], [false])
#AM_CONDITIONAL([CAN_DOXYGEN], [test "x$DOXYGEN" != xfalse])
# Settings
AC_ARG_ENABLE([extra_demos],
[AS_HELP_STRING([--enable-extra-demos],
[build conference demos for science reproduction @<:@default=no@:>@])],
[enable_extra_demos=$enableval], [enable_extra_demos=no])
AM_CONDITIONAL([EXTRA_DEMOS], [test x$enable_extra_demos != xno])
AC_ARG_ENABLE([zhfst],
[AS_HELP_STRING([--enable-zhfst],
[support zipped complex automaton sets @<:@default=check@:>@])],
[enable_zhfst=$enableval], [enable_zhfst=check])
AC_ARG_ENABLE([xml],
[AS_HELP_STRING([--enable-xml=LIBXML],
[support xml metadata for zipped automaton sets with library LIBXML @<:@default=libxmlpp@:>@])],
[enable_xml=$enableval], [enable_xml=libxmlpp])
AC_ARG_WITH([extract],
[AS_HELP_STRING([--with-extract=TARGET],
[extract zhfst archives to tmpdir or mem @<:@default=mem@:>@])],
[with_extract=$withval], [with_extract=mem])
AS_IF([test "x$with_extract" = xmem], [AC_DEFINE([ZHFST_EXTRACT_TO_MEM], [1],
[Define to extract zhfst archives to char buffer])],
[AS_IF([test "x$with_extract" = xtmpdir],
[AC_DEFINE([ZHFST_EXTRACT_TO_TMPDIR], [1],
[Define to extract zhfst to tmp dir])],
[AC_MSG_ERROR([Use with-extract to mem or tmpdir])])])
# Checks for programs
m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
AC_PROG_CC
AC_PROG_CXX
AC_LIBTOOL_WIN32_DLL
LT_INIT
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET
AC_PATH_PROG([HFST_TXT2FST], [hfst-txt2fst], [false])
AC_PATH_PROG([HFST_FST2FST], [hfst-fst2fst], [false])
AC_PATH_PROG([ZIP], [zip], [false])
AM_CONDITIONAL([CAN_TEST],
[test x$HFST_TXT2FST != xfalse -a x$HFST_FST2FST != xfalse -a x$ZIP != xfalse])
# Checks for libraries
#AS_IF([test x$enable_zhfst != xno],
# [PKG_CHECK_MODULES([LIBARCHIVE], [libarchive > 3],
# [AC_DEFINE([HAVE_LIBARCHIVE], [1], [Use archives])
# enable_zhfst=yes],
# [enable_zhfst=no])])
AC_DEFINE([HAVE_LIBARCHIVE], [1], [Use archives])
AM_CONDITIONAL([WANT_ARCHIVE], [test x$enable_zhfst != xno])
#AS_IF([test x$enable_xml = xlibxmlpp],
# [PKG_CHECK_MODULES([LIBXMLPP], [libxml++-2.6 >= 2.10.0],
# [AC_DEFINE([HAVE_LIBXML], [1], [Use libxml++])],
# [AC_MSG_WARN([libxml++ failed, disabling xml])
# enable_xml=no])])
#AM_CONDITIONAL([WANT_LIBXMLPP], [test x$enable_xml = xlibxmlpp])
#AS_IF([test x$enable_xml = xtinyxml2],
# [PKG_CHECK_MODULES([TINYXML2], [tinyxml2 >= 1.0.8],
# [AC_DEFINE([HAVE_TINYXML2], [1], [Use tinyxml])],
# [AC_MSG_WARN([tinyxml missing, xml disabled])
# enable_xml=no])])
AC_DEFINE([HAVE_TINYXML2], [1], [Use tinyxml])
AM_CONDITIONAL([WANT_TINYXML2], [test x$enable_xml = xtinyxml2])
# Checks for header files
AC_CHECK_HEADERS([getopt.h error.h])
# Checks for types
AC_TYPE_SIZE_T
# Checks for structures
# Checks for compiler characteristics
# Checks for library functions
AC_FUNC_MALLOC
AC_CHECK_FUNCS([strndup error])
# Checks for system services
# config files
AC_CONFIG_FILES([Makefile hfstospell.pc])
# output
AC_OUTPUT
cat <<EOF
-- Building $PACKAGE_STRING
* zhfst support: $enable_zhfst
* extracting to: $with_extract
* xml support: $enable_xml
* conference demos: $enable_extra_demos
EOF