]>
Commit | Line | Data |
---|---|---|
f67539c2 TL |
1 | # |
2 | # Licensed to the Apache Software Foundation (ASF) under one | |
3 | # or more contributor license agreements. See the NOTICE file | |
4 | # distributed with this work for additional information | |
5 | # regarding copyright ownership. The ASF licenses this file | |
6 | # to you under the Apache License, Version 2.0 (the | |
7 | # "License"); you may not use this file except in compliance | |
8 | # with the License. You may obtain a copy of the License at | |
9 | # | |
10 | # http://www.apache.org/licenses/LICENSE-2.0 | |
11 | # | |
12 | # Unless required by applicable law or agreed to in writing, | |
13 | # software distributed under the License is distributed on an | |
14 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | |
15 | # KIND, either express or implied. See the License for the | |
16 | # specific language governing permissions and limitations | |
17 | # under the License. | |
18 | # | |
19 | ||
20 | AC_PREREQ(2.65) | |
21 | AC_CONFIG_MACRO_DIR([./aclocal]) | |
22 | ||
23 | AC_INIT([thrift], [0.13.0]) | |
24 | ||
25 | AC_CONFIG_AUX_DIR([.]) | |
26 | ||
27 | AM_INIT_AUTOMAKE([1.13 subdir-objects tar-ustar]) | |
28 | PKG_PROG_PKG_CONFIG | |
29 | ||
30 | AC_ARG_VAR([PY_PREFIX], [Prefix for installing Python modules. | |
31 | (Normal --prefix is ignored for Python because | |
32 | Python has different conventions.) | |
33 | Default = "/usr"]) | |
34 | AS_IF([test "x$PY_PREFIX" = x], [PY_PREFIX="/usr"]) | |
35 | ||
36 | AC_ARG_VAR([JAVA_PREFIX], [Prefix for installing the Java lib jar. | |
37 | Default = "/usr/local/lib"]) | |
38 | AS_IF([test "x$JAVA_PREFIX" != x], [JAVA_PREFIX="$JAVA_PREFIX/usr/local/lib"], | |
39 | [test "x$PREFIX" != x], [JAVA_PREFIX="$PREFIX/usr/local/lib"], | |
40 | [JAVA_PREFIX="/usr/local/lib"]) | |
41 | ||
42 | AC_ARG_VAR([RUBY_PREFIX], [Prefix for installing Ruby modules. | |
43 | (Normal --prefix is ignored for Ruby because | |
44 | Ruby has different conventions.) | |
45 | Default = none, let ruby setup decide]) | |
46 | ||
47 | AC_ARG_VAR([PHP_PREFIX], [Prefix for installing PHP modules. | |
48 | (Normal --prefix is ignored for PHP because | |
49 | PHP has different conventions.) | |
50 | Default = "/usr/lib/php"]) | |
51 | AS_IF([test "x$PHP_PREFIX" = x], [PHP_PREFIX="/usr/lib/php"]) | |
52 | ||
53 | AC_ARG_VAR([PHP_CONFIG_PREFIX], | |
54 | [Prefix for installing PHP extension module .ini file. | |
55 | (Normal --prefix is ignored for PHP because PHP has | |
56 | different conventions.) | |
57 | Default = "/etc/php.d"]) | |
58 | AS_IF([test "x$PHP_CONFIG_PREFIX" = x], [PHP_CONFIG_PREFIX="/etc/php.d"]) | |
59 | ||
60 | AC_ARG_VAR([INSTALLDIRS], [When installing Perl modules, specifies which | |
61 | of the sets of installation directories | |
62 | to choose: perl, site or vendor. | |
63 | Default = "vendor"]) | |
64 | AS_IF([test "x$INSTALLDIRS" = x], [INSTALLDIRS="vendor"]) | |
65 | ||
66 | AC_ARG_VAR([PERL_PREFIX], [Prefix for installing Perl modules. | |
67 | (Normal --prefix is ignored for Perl because | |
68 | Perl has different conventions.) | |
69 | Ignored, when INSTALLDIRS set to site or vendor. | |
70 | Default = "/usr/local/lib"]) | |
71 | AS_IF([test "x$PERL_PREFIX" = x], [PERL_PREFIX="/usr/local"]) | |
72 | ||
73 | AC_ARG_VAR([CABAL_CONFIGURE_FLAGS], | |
74 | [Extra flags to pass to cabal: "cabal Setup.lhs configure $CABAL_CONFIGURE_FLAGS". | |
75 | (Typically used to set --user or force --global.)]) | |
76 | ||
77 | AC_SUBST(CABAL_CONFIGURE_FLAGS) | |
78 | ||
79 | AC_ARG_VAR([D_IMPORT_PREFIX], [Prefix for installing D modules. | |
80 | [INCLUDEDIR/d2]]) | |
81 | AS_IF([test "x$D_IMPORT_PREFIX" = x], [D_IMPORT_PREFIX="${includedir}/d2"]) | |
82 | ||
83 | AC_ARG_VAR([DMD_LIBEVENT_FLAGS], [DMD flags for linking libevent (auto-detected if not set).]) | |
84 | AC_ARG_VAR([DMD_OPENSSL_FLAGS], [DMD flags for linking OpenSSL (auto-detected if not set).]) | |
85 | ||
86 | AC_ARG_VAR([THRIFT], [Path to the thrift tool (needed for cross-compilation).]) | |
87 | AS_IF([test "x$THRIFT" = x], [THRIFT=`pwd`/compiler/cpp/thrift]) | |
88 | ||
89 | AC_PROG_CC | |
90 | AC_PROG_CPP | |
91 | AC_PROG_CXX | |
92 | AC_PROG_INSTALL | |
93 | AC_PROG_LIBTOOL | |
94 | AC_PROG_MAKE_SET | |
95 | AC_PROG_BISON(2.5) | |
96 | AC_PROG_YACC | |
97 | AC_PROG_LEX | |
98 | AM_PROG_LEX | |
99 | AC_PROG_LN_S | |
100 | AC_PROG_MKDIR_P | |
101 | AC_PROG_AWK | |
102 | AC_PROG_RANLIB | |
103 | ||
104 | AC_LANG([C++]) | |
105 | AX_CXX_COMPILE_STDCXX_11([noext], [mandatory]) | |
106 | ||
107 | AM_EXTRA_RECURSIVE_TARGETS([style]) | |
108 | AC_SUBST(CPPSTYLE_CMD, 'find . -type f \( -iname "*.h" -or -iname "*.cpp" -or -iname "*.cc" -or -iname "*.tcc" \) -printf "Reformatting: %h/%f\n" -exec clang-format -i {} \;') | |
109 | # ' | |
110 | # The above comment is to fix editor syntax highlighting | |
111 | ||
112 | AC_ARG_ENABLE([libs], | |
113 | AS_HELP_STRING([--enable-libs], [build the Apache Thrift libraries [default=yes]]), | |
114 | [], enable_libs=yes | |
115 | ) | |
116 | have_libs=yes | |
117 | if test "$enable_libs" = "no"; then | |
118 | have_libs="no" | |
119 | with_as3="no" | |
120 | with_cpp="no" | |
121 | with_c_glib="no" | |
122 | with_cl="no" | |
123 | with_java="no" | |
124 | with_csharp="no" | |
125 | with_python="no" | |
126 | with_py3="no" | |
127 | with_ruby="no" | |
128 | with_haskell="no" | |
129 | with_haxe="no" | |
130 | with_dotnetcore="no" | |
131 | with_netstd="no" | |
132 | with_perl="no" | |
133 | with_php="no" | |
134 | with_php_extension="no" | |
135 | with_dart="no" | |
136 | with_erlang="no" | |
137 | with_go="no" | |
138 | with_d="no" | |
139 | with_nodejs="no" | |
140 | with_nodets="no" | |
141 | with_lua="no" | |
142 | with_rs="no" | |
143 | with_swift="no" | |
144 | fi | |
145 | ||
146 | AX_THRIFT_LIB(as3, [as3], yes) | |
147 | have_as3=no | |
148 | if test "$with_as3" = "yes"; then | |
149 | if test "${FLEX_HOME+set}" = set; then | |
150 | AC_PATH_PROGS([FLEX_COMPC], [compc], "fail", [$PATH$PATH_SEPARATOR$FLEX_HOME/bin]) | |
151 | if test "$FLEX_COMPC" != "fail"; then | |
152 | have_as3="yes" | |
153 | fi | |
154 | fi | |
155 | fi | |
156 | AM_CONDITIONAL(WITH_AS3, [test "$have_as3" = "yes"]) | |
157 | ||
158 | AX_THRIFT_LIB(cpp, [C++], yes) | |
159 | have_cpp=no | |
160 | if test "$with_cpp" = "yes"; then | |
161 | AX_BOOST_BASE([1.56.0]) | |
162 | if test "x$succeeded" = "xyes" ; then | |
163 | AC_SUBST([BOOST_LIB_DIR], [$(echo "$BOOST_LDFLAGS" | sed -e 's/^\-L//')]) | |
164 | AC_SUBST([BOOST_CHRONO_LDADD], [$(echo "$BOOST_LIB_DIR/libboost_chrono.a")]) | |
165 | AC_SUBST([BOOST_FILESYSTEM_LDADD], [$(echo "$BOOST_LIB_DIR/libboost_filesystem.a")]) | |
166 | AC_SUBST([BOOST_SYSTEM_LDADD], [$(echo "$BOOST_LIB_DIR/libboost_system.a")]) | |
167 | AC_SUBST([BOOST_TEST_LDADD], [$(echo "$BOOST_LIB_DIR/libboost_unit_test_framework.a")]) | |
168 | AC_SUBST([BOOST_THREAD_LDADD], [$(echo "$BOOST_LIB_DIR/libboost_thread.a")]) | |
169 | have_cpp="yes" | |
170 | fi | |
171 | ||
172 | AX_LIB_EVENT([2.0]) | |
173 | have_libevent=$success | |
174 | ||
175 | AX_LIB_ZLIB([1.2.3]) | |
176 | have_zlib=$success | |
177 | ||
178 | AX_THRIFT_LIB(qt5, [Qt5], yes) | |
179 | have_qt5=no | |
180 | qt_reduce_reloc="" | |
181 | if test "$with_qt5" = "yes"; then | |
182 | PKG_CHECK_MODULES([QT5], [Qt5Core >= 5.0, Qt5Network >= 5.0], | |
183 | [have_qt5=yes;qt_reduce_reloc=`$PKG_CONFIG --variable=qt_config Qt5Core | grep "reduce_relocations"`], | |
184 | [have_qt5=no]) | |
185 | fi | |
186 | if test "$have_qt5" = "yes"; then | |
187 | AC_PATH_PROGS([QT5_MOC], [moc-qt5 moc], "fail") | |
188 | if test "$QT5_MOC" = "fail"; then | |
189 | have_qt5=no | |
190 | fi | |
191 | fi | |
192 | fi | |
193 | AM_CONDITIONAL([WITH_CPP], [test "$have_cpp" = "yes"]) | |
194 | AM_CONDITIONAL([AMX_HAVE_LIBEVENT], [test "$have_libevent" = "yes"]) | |
195 | AM_CONDITIONAL([AMX_HAVE_ZLIB], [test "$have_zlib" = "yes"]) | |
196 | AM_CONDITIONAL([AMX_HAVE_QT5], [test "$have_qt5" = "yes"]) | |
197 | AM_CONDITIONAL([QT5_REDUCE_RELOCATIONS], [test "x$qt_reduce_reloc" != "x"]) | |
198 | ||
199 | AX_THRIFT_LIB(c_glib, [C (GLib)], yes) | |
200 | if test "$with_c_glib" = "yes"; then | |
201 | PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.0], have_glib2=yes, have_glib2=no) | |
202 | PKG_CHECK_MODULES([GOBJECT], [gobject-2.0 >= 2.0], have_gobject2=yes, have_gobject2=no) | |
203 | if test "$have_glib2" = "yes" -a "$have_gobject2" = "yes" ; then | |
204 | AC_PATH_PROG([GSETTINGS], [gsettings]) | |
205 | have_c_glib="yes" | |
206 | fi | |
207 | fi | |
208 | AM_CONDITIONAL(WITH_C_GLIB, [test "$have_glib2" = "yes" -a "$have_gobject2" = "yes"]) | |
209 | ||
210 | # echo "OpenSSL check" | |
211 | if test "$have_cpp" = "yes" -o "$have_c_glib" = "yes"; then | |
212 | # echo "Have cpp or c so we check for OpenSSL" | |
213 | AX_CHECK_OPENSSL() | |
214 | fi | |
215 | ||
216 | AX_THRIFT_LIB(csharp, [C#], yes) | |
217 | if test "$with_csharp" = "yes"; then | |
218 | PKG_CHECK_MODULES(MONO, mono >= 2.11.0, mono_2_11=yes, mono_2_11=no) | |
219 | if test "$mono_2_11" == "yes"; then | |
220 | AC_PATH_PROG([MCS], [mcs]) | |
221 | if test "x$MCS" != "x"; then | |
222 | mono_mcs="yes" | |
223 | fi | |
224 | fi | |
225 | PKG_CHECK_MODULES(MONO, mono >= 2.0.0, net_3_5=yes, net_3_5=no) | |
226 | PKG_CHECK_MODULES(MONO, mono >= 1.2.4, have_mono=yes, have_mono=no) | |
227 | if test "$have_mono" = "yes" ; then | |
228 | have_csharp="yes" | |
229 | fi | |
230 | fi | |
231 | AM_CONDITIONAL(WITH_MONO, [test "$have_csharp" = "yes"]) | |
232 | AM_CONDITIONAL(NET_2_0, [test "$net_3_5" = "no"]) | |
233 | AM_CONDITIONAL(MONO_MCS, [test "$mono_mcs" = "yes"]) | |
234 | ||
235 | AX_THRIFT_LIB(java, [Java], yes) | |
236 | if test "$with_java" = "yes"; then | |
237 | AX_JAVAC_AND_JAVA | |
238 | AC_PATH_PROG([ANT], [ant]) | |
239 | AX_CHECK_ANT_VERSION($ANT, 1.7) | |
240 | AC_SUBST(CLASSPATH) | |
241 | AC_SUBST(ANT_FLAGS) | |
242 | AC_SUBST(GRADLE_OPTS) | |
243 | if test "x$JAVA" != "x" && test "x$JAVAC" != "x" && test "x$ANT" != "x" ; then | |
244 | have_java="yes" | |
245 | fi | |
246 | fi | |
247 | AM_CONDITIONAL([WITH_JAVA], [test "$have_java" = "yes"]) | |
248 | ||
249 | AX_THRIFT_LIB(erlang, [Erlang], yes) | |
250 | if test "$with_erlang" = "yes"; then | |
251 | AC_ERLANG_PATH_ERL | |
252 | AC_ERLANG_PATH_ERLC | |
253 | AC_PATH_PROG([REBAR], [rebar3]) | |
254 | if test -n "$ERLC" ; then | |
255 | AC_ERLANG_SUBST_LIB_DIR | |
256 | # Install into the detected Erlang directory instead of $libdir/erlang/lib | |
257 | ERLANG_INSTALL_LIB_DIR="$ERLANG_LIB_DIR" | |
258 | AC_ERLANG_SUBST_INSTALL_LIB_SUBDIR(AC_PACKAGE_NAME, AC_PACKAGE_VERSION) | |
259 | fi | |
260 | if test -n "$ERL" -a -n "$ERLC" && test "x$REBAR" != "x" ; then | |
261 | have_erlang="yes" | |
262 | ||
263 | # otp_release is simply a number (like "17") for OTP17+ while "R16..." for OTP16 or less. | |
264 | # OTP version is currently only used for running tests. | |
265 | if $ERL -eval 'erlang:display(erlang:system_info(otp_release)),halt().' -noshell | grep "^\"R" >/dev/null; then | |
266 | erlang_otp16_or_less="yes" | |
267 | fi | |
268 | fi | |
269 | fi | |
270 | AM_CONDITIONAL(WITH_ERLANG, [test "$have_erlang" = "yes"]) | |
271 | AM_CONDITIONAL(ERLANG_OTP16, [test "$erlang_otp16_or_less" = "yes"]) | |
272 | ||
273 | AX_THRIFT_LIB(nodejs, [Nodejs], yes) | |
274 | have_nodejs=no | |
275 | if test "$with_nodejs" = "yes"; then | |
276 | AC_PATH_PROGS([NODEJS], [nodejs node]) | |
277 | AC_PATH_PROG([NPM], [npm]) | |
278 | if test "x$NODEJS" != "x" -a "x$NPM" != "x"; then | |
279 | have_nodejs="yes" | |
280 | fi | |
281 | fi | |
282 | AM_CONDITIONAL(WITH_NODEJS, [test "$have_nodejs" = "yes"]) | |
283 | AM_CONDITIONAL(HAVE_NPM, [test "x$NPM" != "x"]) | |
284 | ||
285 | AX_THRIFT_LIB(nodets, [Nodets], yes) | |
286 | have_nodets=no | |
287 | if test "$with_nodets" = "yes"; then | |
288 | AC_PATH_PROGS([NODETS], [nodets node]) | |
289 | AC_PATH_PROG([NPM], [npm]) | |
290 | if test "x$NODETS" != "x" -a "x$NPM" != "x"; then | |
291 | have_nodets="yes" | |
292 | fi | |
293 | fi | |
294 | AM_CONDITIONAL(WITH_NODETS, [test "$have_nodets" = "yes"]) | |
295 | AM_CONDITIONAL(HAVE_NPM, [test "x$NPM" != "x"]) | |
296 | ||
297 | AX_THRIFT_LIB(lua, [Lua], yes) | |
298 | have_lua=no | |
299 | if test "$with_lua" = "yes"; then | |
300 | AX_PROG_LUA(5.2,, have_lua="yes", have_lua="no") | |
301 | if test "$have_lua" = "yes"; then | |
302 | AX_LUA_HEADERS(, have_lua="no") | |
303 | AX_LUA_LIBS(, have_lua="no") | |
304 | fi | |
305 | fi | |
306 | AM_CONDITIONAL(WITH_LUA, [test "$have_lua" = "yes"]) | |
307 | ||
308 | # Find python regardless of with_python value, because it's needed by make cross | |
309 | AM_PATH_PYTHON(2.6,, :) | |
310 | AX_THRIFT_LIB(python, [Python], yes) | |
311 | if test "$with_python" = "yes"; then | |
312 | if test -n "$PYTHON"; then | |
313 | have_python="yes" | |
314 | fi | |
315 | AC_PATH_PROG([TRIAL], [trial]) | |
316 | if test -n "$TRIAL"; then | |
317 | have_trial="yes" | |
318 | fi | |
319 | fi | |
320 | AM_CONDITIONAL(WITH_PYTHON, [test "$have_python" = "yes"]) | |
321 | AM_CONDITIONAL(WITH_TWISTED_TEST, [test "$have_trial" = "yes"]) | |
322 | ||
323 | # Find "python3" executable. | |
324 | # It's distro specific and far from ideal but needed to cross test py2-3 at once. | |
325 | # TODO: find "python2" if it's 3.x | |
326 | have_py3="no" | |
327 | AX_THRIFT_LIB(py3, [Py3], yes) | |
328 | if test "$with_py3" = "yes"; then | |
329 | if $PYTHON --version 2>&1 | grep -q "Python 2"; then | |
330 | AC_PATH_PROGS([PYTHON3], [python3 python3.7 python37 python3.6 python36 python3.5 python35 python3.4 python34]) | |
331 | if test -n "$PYTHON3"; then | |
332 | have_py3="yes" | |
333 | fi | |
334 | fi | |
335 | fi | |
336 | AM_CONDITIONAL(WITH_PY3, [test "$have_py3" = "yes"]) | |
337 | ||
338 | AX_THRIFT_LIB(perl, [Perl], yes) | |
339 | if test "$with_perl" = "yes"; then | |
340 | AC_PATH_PROG([PERL], [perl]) | |
341 | if test -n "$PERL" ; then | |
342 | AC_PROG_PERL_MODULES([Bit::Vector], success="yes", success="no") | |
343 | have_perl_bit_vector="$success" | |
344 | AC_PROG_PERL_MODULES([Class::Accessor], success="yes", success="no") | |
345 | have_perl_class_accessor="$success" | |
346 | fi | |
347 | if test -n "$PERL" -a "$have_perl_bit_vector" = "yes" ; then | |
348 | if test -n "$PERL" -a "$have_perl_class_accessor" = "yes" ; then | |
349 | have_perl="yes" | |
350 | fi | |
351 | fi | |
352 | fi | |
353 | AM_CONDITIONAL(WITH_PERL, [test "$have_perl" = "yes"]) | |
354 | ||
355 | AX_THRIFT_LIB(php, [PHP], yes) | |
356 | if test "$with_php" = "yes"; then | |
357 | AC_PATH_PROG([PHP], [php]) | |
358 | if test -n "$PHP" ; then | |
359 | have_php="yes" | |
360 | fi | |
361 | fi | |
362 | AM_CONDITIONAL(WITH_PHP, [test "$have_php" = "yes"]) | |
363 | ||
364 | AX_THRIFT_LIB(php_extension, [PHP_EXTENSION], yes) | |
365 | if test "$with_php_extension" = "yes"; then | |
366 | if test -f "lib/php/src/ext/thrift_protocol/configure"; then | |
367 | AC_PATH_PROG([PHP_CONFIG], [php-config]) | |
368 | if test -n "$PHP_CONFIG" ; then | |
369 | AC_CONFIG_SUBDIRS([lib/php/src/ext/thrift_protocol]) | |
370 | have_php_extension="yes" | |
371 | fi | |
372 | fi | |
373 | fi | |
374 | AM_CONDITIONAL(WITH_PHP_EXTENSION, [test "$have_php_extension" = "yes"]) | |
375 | ||
376 | AX_THRIFT_LIB(dart, [DART], yes) | |
377 | if test "$with_dart" = "yes"; then | |
378 | AC_PATH_PROG([DART], [dart]) | |
379 | AC_PATH_PROG([DARTPUB], [pub]) | |
380 | if test "x$DART" != "x" -a "x$DARTPUB" != "x"; then | |
381 | have_dart="yes" | |
382 | fi | |
383 | fi | |
384 | AM_CONDITIONAL(WITH_DART, [test "$have_dart" = "yes"]) | |
385 | ||
386 | AX_THRIFT_LIB(ruby, [Ruby], yes) | |
387 | have_ruby=no | |
388 | if test "$with_ruby" = "yes"; then | |
389 | AC_PATH_PROG([RUBY], [ruby]) | |
390 | AC_PATH_PROG([BUNDLER], [bundle]) | |
391 | if test "x$RUBY" != "x" -a "x$BUNDLER" != "x"; then | |
392 | have_ruby="yes" | |
393 | fi | |
394 | fi | |
395 | AM_CONDITIONAL(WITH_RUBY, [test "$have_ruby" = "yes"]) | |
396 | AM_CONDITIONAL(HAVE_BUNDLER, [test "x$BUNDLER" != "x"]) | |
397 | ||
398 | AX_THRIFT_LIB(haskell, [Haskell], yes) | |
399 | have_haskell=no | |
400 | RUNHASKELL=true | |
401 | CABAL=true | |
402 | if test "$with_haskell" = "yes"; then | |
403 | AC_PATH_PROG([CABAL], [cabal]) | |
404 | AC_PATH_PROG([RUNHASKELL], [runhaskell]) | |
405 | if test "x$CABAL" != "x" -a "x$RUNHASKELL" != "x"; then | |
406 | have_haskell="yes" | |
407 | else | |
408 | RUNHASKELL=true | |
409 | CABAL=true | |
410 | fi | |
411 | fi | |
412 | AC_SUBST(CABAL) | |
413 | AC_SUBST(RUNHASKELL) | |
414 | AM_CONDITIONAL(WITH_HASKELL, [test "$have_haskell" = "yes"]) | |
415 | ||
416 | AX_THRIFT_LIB(go, [Go], yes) | |
417 | if test "$with_go" = "yes"; then | |
418 | AC_PATH_PROG([GO], [go]) | |
419 | if [[ -x "$GO" ]] ; then | |
420 | AS_IF([test -n "$GO"],[ | |
421 | ax_go_version="1.4" | |
422 | ax_go17_version="1.7" | |
423 | ||
424 | AC_MSG_CHECKING([for Go version]) | |
425 | golang_version=`$GO version 2>&1 | $SED -e 's/\(go \)\(version \)\(go\)\(@<:@0-9@:>@.@<:@0-9@:>@.@<:@0-9@:>@\)\(@<:@\*@:>@*\).*/\4/'` | |
426 | AC_MSG_RESULT($golang_version) | |
427 | AC_SUBST([golang_version],[$golang_version]) | |
428 | AX_COMPARE_VERSION([$ax_go_version],[le],[$golang_version],[ | |
429 | : | |
430 | have_go="yes" | |
431 | ],[ | |
432 | : | |
433 | have_go="no" | |
434 | ]) | |
435 | AX_COMPARE_VERSION([$golang_version],[lt],[$ax_go17_version],[ | |
436 | : | |
437 | go_version_lt_17="yes" | |
438 | ],[ | |
439 | : | |
440 | go_version_lt_17="no" | |
441 | ]) | |
442 | ],[ | |
443 | AC_MSG_WARN([could not find Go ]) | |
444 | have_go="no" | |
445 | ]) | |
446 | fi | |
447 | fi | |
448 | AM_CONDITIONAL(WITH_GO, [test "$have_go" = "yes"]) | |
449 | AM_CONDITIONAL([GOVERSION_LT_17], [test "$go_version_lt_17" = "yes"]) | |
450 | ||
451 | AX_THRIFT_LIB(swift, [Swift], yes) | |
452 | have_swift="no" | |
453 | if test "$with_swift" = "yes"; then | |
454 | AC_PATH_PROG([SWIFT], [swift]) | |
455 | if test "x$SWIFT" != "x" -a "x$SWIFT" != "x"; then | |
456 | have_swift="yes" | |
457 | fi | |
458 | fi | |
459 | AM_CONDITIONAL([WITH_SWIFT], [test "$have_swift" = "yes"]) | |
460 | ||
461 | AX_THRIFT_LIB(rs, [Rust], yes) | |
462 | have_rs="no" | |
463 | if test "$with_rs" = "yes"; then | |
464 | AC_PATH_PROG([CARGO], [cargo]) | |
465 | AC_PATH_PROG([RUSTC], [rustc]) | |
466 | if [[ -x "$CARGO" ]] && [[ -x "$RUSTC" ]]; then | |
467 | min_rustc_version="1.13" | |
468 | ||
469 | AC_MSG_CHECKING([for rustc version]) | |
470 | rustc_version=`$RUSTC --version 2>&1 | $SED -e 's/\(rustc \)\([0-9]\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\2.\3/'` | |
471 | AC_MSG_RESULT($rustc_version) | |
472 | AC_SUBST([rustc_version],[$rustc_version]) | |
473 | ||
474 | AX_COMPARE_VERSION([$min_rustc_version],[le],[$rustc_version],[ | |
475 | : | |
476 | have_rs="yes" | |
477 | ],[ | |
478 | : | |
479 | have_rs="no" | |
480 | ]) | |
481 | fi | |
482 | fi | |
483 | AM_CONDITIONAL(WITH_RS, [test "$have_rs" = "yes"]) | |
484 | ||
485 | AX_THRIFT_LIB(cl, [Common Lisp], yes) | |
486 | have_cl="no" | |
487 | if test "$with_cl" = "yes"; then | |
488 | AC_PATH_PROG([SBCL], [sbcl]) | |
489 | if test "x$SBCL" != "x"; then | |
490 | have_cl="yes" | |
491 | fi | |
492 | fi | |
493 | AM_CONDITIONAL(WITH_CL, [test "$have_cl" = "yes"]) | |
494 | ||
495 | AX_THRIFT_LIB(haxe, [Haxe], yes) | |
496 | if test "$with_haxe" = "yes"; then | |
497 | AC_PATH_PROG([HAXE], [haxe]) | |
498 | if [[ -x "$HAXE" ]] ; then | |
499 | AX_PROG_HAXE_VERSION( [3.1.3], have_haxe="yes", have_haxe="no") | |
500 | fi | |
501 | fi | |
502 | AM_CONDITIONAL(WITH_HAXE, [test "$have_haxe" = "yes"]) | |
503 | ||
504 | ||
505 | AX_THRIFT_LIB(dotnetcore, [.NET Core], yes) | |
506 | if test "$with_dotnetcore" = "yes"; then | |
507 | AC_PATH_PROG([DOTNETCORE], [dotnet]) | |
508 | if [[ -x "$DOTNETCORE" ]] ; then | |
509 | AX_PROG_DOTNETCORE_VERSION( [2.0.0], have_dotnetcore="yes", have_dotnetcore="no") | |
510 | fi | |
511 | fi | |
512 | AM_CONDITIONAL(WITH_DOTNET, [test "$have_dotnetcore" = "yes"]) | |
513 | ||
514 | ||
515 | AX_THRIFT_LIB(d, [D], yes) | |
516 | if test "$with_d" = "yes"; then | |
517 | AX_DMD | |
518 | AC_SUBST(DMD) | |
519 | if test "x$DMD" != "x"; then | |
520 | have_d="yes" | |
521 | fi | |
522 | fi | |
523 | ||
524 | # Determine actual name of the generated D library for use in the command line | |
525 | # when compiling tests. This is needed because the -l<lib> syntax doesn't work | |
526 | # with OPTLINK (Windows). | |
527 | lib_prefix=lib | |
528 | lib_suffix=a | |
529 | case "$host_os" in | |
530 | cygwin* | mingw* | pw32* | cegcc*) | |
531 | lib_prefix="" | |
532 | lib_suffix=lib | |
533 | ;; | |
534 | esac | |
535 | D_LIB_NAME="${lib_prefix}thriftd.${lib_suffix}" | |
536 | AC_SUBST(D_LIB_NAME) | |
537 | D_EVENT_LIB_NAME="${lib_prefix}thriftd-event.${lib_suffix}" | |
538 | AC_SUBST(D_EVENT_LIB_NAME) | |
539 | D_SSL_LIB_NAME="${lib_prefix}thriftd-ssl.${lib_suffix}" | |
540 | AC_SUBST(D_SSL_LIB_NAME) | |
541 | ||
542 | if test "$have_d" = "yes"; then | |
543 | AX_CHECK_D_MODULE(deimos.event2.event) | |
544 | have_deimos_event2=$success | |
545 | ||
546 | with_d_event_tests="no" | |
547 | if test "$have_deimos_event2" = "yes"; then | |
548 | if test "x$DMD_LIBEVENT_FLAGS" = "x"; then | |
549 | if test "$dmd_optlink" = "yes"; then | |
550 | AC_MSG_WARN([D libevent interface found, but cannot auto-detect \ | |
551 | linker flags for OPTLINK. Please set DMD_LIBEVENT_FLAGS manually.]) | |
552 | else | |
553 | AX_LIB_EVENT([2.0]) | |
554 | if test "$success" = "yes"; then | |
555 | DMD_LIBEVENT_FLAGS=$(echo "-fuse-ld=gold $LIBEVENT_LDFLAGS $LIBEVENT_LIBS" | \ | |
556 | sed -e 's/^ *//g;s/ *$//g;s/^\(.\)/-L\1/g;s/ */ -L/g') | |
557 | with_d_event_tests="yes" | |
558 | else | |
559 | AC_MSG_WARN([D libevent interface present, but libevent library not found.]) | |
560 | fi | |
561 | fi | |
562 | else | |
563 | with_d_event_tests="yes" | |
564 | fi | |
565 | fi | |
566 | ||
567 | AX_CHECK_D_MODULE(deimos.openssl.ssl) | |
568 | have_deimos_openssl=$success | |
569 | ||
570 | with_d_ssl_tests="no" | |
571 | if test "$have_deimos_openssl" = "yes"; then | |
572 | if test "x$DMD_OPENSSL_FLAGS" = "x"; then | |
573 | if test "$dmd_optlink" = "yes"; then | |
574 | AC_MSG_WARN([D OpenSSL interface found, but cannot auto-detect \ | |
575 | linker flags for OPTLINK. Please set DMD_OPENSSL_FLAGS manually.]) | |
576 | else | |
577 | AX_CHECK_OPENSSL([with_d_ssl_tests="yes"]) | |
578 | if test "$with_d_ssl_tests" = "yes"; then | |
579 | DMD_OPENSSL_FLAGS=$(echo "-fuse-ld=gold $OPENSSL_LDFLAGS $OPENSSL_LIBS" | \ | |
580 | sed -e 's/^ *//g;s/ *$//g;s/^\(.\)/-L\1/g;s/ */ -L/g') | |
581 | else | |
582 | AC_MSG_WARN([D OpenSSL interface present, but OpenSSL library not found.]) | |
583 | fi | |
584 | fi | |
585 | else | |
586 | with_d_ssl_tests="yes" | |
587 | fi | |
588 | fi | |
589 | fi | |
590 | ||
591 | AM_CONDITIONAL(WITH_D, [test "$have_d" = "yes"]) | |
592 | AM_CONDITIONAL(DMD_OPTLINK, [test "$dmd_optlink" = "yes"]) | |
593 | AC_SUBST(DMD_OF_DIRSEP, "$dmd_of_dirsep") | |
594 | AM_CONDITIONAL(HAVE_DEIMOS_EVENT2, [test "$have_deimos_event2" = "yes"]) | |
595 | AM_CONDITIONAL(WITH_D_EVENT_TESTS, [test "$with_d_event_tests" = "yes"]) | |
596 | AC_SUBST(DMD_LIBEVENT_FLAGS) | |
597 | AM_CONDITIONAL(HAVE_DEIMOS_OPENSSL, [test "$have_deimos_openssl" = "yes"]) | |
598 | AM_CONDITIONAL(WITH_D_SSL_TESTS, [test "$with_d_ssl_tests" = "yes"]) | |
599 | AC_SUBST(DMD_OPENSSL_FLAGS) | |
600 | ||
601 | AC_ARG_ENABLE([tests], | |
602 | AS_HELP_STRING([--enable-tests], [build tests [default=yes]]), | |
603 | [], enable_tests=yes | |
604 | ) | |
605 | have_tests=yes | |
606 | if test "$enable_tests" = "no"; then | |
607 | have_tests="no" | |
608 | fi | |
609 | AM_CONDITIONAL(WITH_TESTS, [test "$have_tests" = "yes"]) | |
610 | ||
611 | AC_ARG_ENABLE([tutorial], | |
612 | AS_HELP_STRING([--enable-tutorial], [build tutorial [default=yes]]), | |
613 | [], enable_tutorial=yes | |
614 | ) | |
615 | have_tutorial=yes | |
616 | if test "$enable_tutorial" = "no"; then | |
617 | have_tutorial="no" | |
618 | fi | |
619 | AM_CONDITIONAL(WITH_TUTORIAL, [test "$have_tutorial" = "yes"]) | |
620 | ||
621 | AM_CONDITIONAL(MINGW, false) | |
622 | case "${host_os}" in | |
623 | *mingw*) | |
624 | mingw32_support="yes" | |
625 | AC_CHECK_HEADER(windows.h) | |
626 | AM_CONDITIONAL(MINGW, true) | |
627 | ;; | |
628 | *) | |
629 | AC_ISC_POSIX | |
630 | ;; | |
631 | esac | |
632 | ||
633 | AC_C_CONST | |
634 | AC_C_INLINE | |
635 | AC_C_VOLATILE | |
636 | ||
637 | AC_HEADER_STDBOOL | |
638 | AC_HEADER_STDC | |
639 | AC_HEADER_TIME | |
640 | AC_HEADER_SYS_WAIT | |
641 | AC_TYPE_SIGNAL | |
642 | AC_CHECK_HEADERS([arpa/inet.h]) | |
643 | AC_CHECK_HEADERS([sys/param.h]) | |
644 | AC_CHECK_HEADERS([fcntl.h]) | |
645 | AC_CHECK_HEADERS([inttypes.h]) | |
646 | AC_CHECK_HEADERS([limits.h]) | |
647 | AC_CHECK_HEADERS([netdb.h]) | |
648 | AC_CHECK_HEADERS([netinet/in.h]) | |
649 | AC_CHECK_HEADERS([pthread.h]) | |
650 | AC_CHECK_HEADERS([signal.h]) | |
651 | AC_CHECK_HEADERS([stddef.h]) | |
652 | AC_CHECK_HEADERS([stdlib.h]) | |
653 | AC_CHECK_HEADERS([sys/ioctl.h]) | |
654 | AC_CHECK_HEADERS([sys/socket.h]) | |
655 | AC_CHECK_HEADERS([sys/time.h]) | |
656 | AC_CHECK_HEADERS([sys/un.h]) | |
657 | AC_CHECK_HEADERS([poll.h]) | |
658 | AC_CHECK_HEADERS([sys/poll.h]) | |
659 | AC_CHECK_HEADERS([sys/resource.h]) | |
660 | AC_CHECK_HEADERS([unistd.h]) | |
661 | AC_CHECK_HEADERS([libintl.h]) | |
662 | AC_CHECK_HEADERS([malloc.h]) | |
663 | AC_CHECK_HEADERS([openssl/ssl.h]) | |
664 | AC_CHECK_HEADERS([openssl/rand.h]) | |
665 | AC_CHECK_HEADERS([openssl/x509v3.h]) | |
666 | AC_CHECK_HEADERS([sched.h]) | |
667 | AC_CHECK_HEADERS([wchar.h]) | |
668 | ||
669 | AC_CHECK_LIB(pthread, pthread_create) | |
670 | dnl NOTE(dreiss): I haven't been able to find any really solid docs | |
671 | dnl on what librt is and how it fits into various Unix systems. | |
672 | dnl My best guess is that it is where glibc stashes its implementation | |
673 | dnl of the POSIX Real-Time Extensions. This seems necessary on Linux, | |
674 | dnl and we haven't yet found a system where this is a problem. | |
675 | AC_CHECK_LIB(rt, clock_gettime) | |
676 | AC_CHECK_LIB(socket, setsockopt) | |
677 | ||
678 | AC_TYPE_INT16_T | |
679 | AC_TYPE_INT32_T | |
680 | AC_TYPE_INT64_T | |
681 | AC_TYPE_INT8_T | |
682 | AC_TYPE_MODE_T | |
683 | AC_TYPE_OFF_T | |
684 | AC_TYPE_SIZE_T | |
685 | AC_TYPE_SSIZE_T | |
686 | AC_TYPE_UINT16_T | |
687 | AC_TYPE_UINT32_T | |
688 | AC_TYPE_UINT64_T | |
689 | AC_TYPE_UINT8_T | |
690 | AC_CHECK_TYPES([ptrdiff_t], [], [echo "ptrdiff_t not found or g++ not installed - cannot continue" && exit 1]) | |
691 | ||
692 | AC_STRUCT_TM | |
693 | ||
694 | dnl NOTE(dreiss): AI_ADDRCONFIG is not defined on OpenBSD. | |
695 | AC_CHECK_DECL([AI_ADDRCONFIG], [], | |
696 | [AC_DEFINE([AI_ADDRCONFIG], 0, | |
697 | [Define if the AI_ADDRCONFIG symbol is unavailable])], | |
698 | [ | |
699 | #include <sys/types.h> | |
700 | #include <sys/socket.h> | |
701 | #include <netdb.h> | |
702 | ]) | |
703 | ||
704 | AC_FUNC_ALLOCA | |
705 | AC_FUNC_FORK | |
706 | AC_FUNC_MALLOC | |
707 | AC_FUNC_MEMCMP | |
708 | AC_FUNC_REALLOC | |
709 | AC_FUNC_SELECT_ARGTYPES | |
710 | AC_FUNC_STAT | |
711 | AC_FUNC_STRERROR_R | |
712 | AC_FUNC_STRFTIME | |
713 | AC_FUNC_VPRINTF | |
714 | AC_CHECK_FUNCS([strtoul]) | |
715 | AC_CHECK_FUNCS([bzero]) | |
716 | AC_CHECK_FUNCS([ftruncate]) | |
717 | AC_CHECK_FUNCS([gethostbyname]) | |
718 | AC_CHECK_FUNCS([gethostbyname_r]) | |
719 | AC_CHECK_FUNCS([gettimeofday]) | |
720 | AC_CHECK_FUNCS([memmove]) | |
721 | AC_CHECK_FUNCS([memset]) | |
722 | AC_CHECK_FUNCS([mkdir]) | |
723 | AC_CHECK_FUNCS([realpath]) | |
724 | AC_CHECK_FUNCS([select]) | |
725 | AC_CHECK_FUNCS([setlocale]) | |
726 | AC_CHECK_FUNCS([socket]) | |
727 | AC_CHECK_FUNCS([strchr]) | |
728 | AC_CHECK_FUNCS([strdup]) | |
729 | AC_CHECK_FUNCS([strerror]) | |
730 | AC_CHECK_FUNCS([strstr]) | |
731 | AC_CHECK_FUNCS([strtol]) | |
732 | AC_CHECK_FUNCS([sqrt]) | |
733 | dnl The following functions are optional. | |
734 | AC_CHECK_FUNCS([alarm]) | |
735 | AC_CHECK_FUNCS([clock_gettime]) | |
736 | AC_CHECK_FUNCS([sched_get_priority_min]) | |
737 | AC_CHECK_FUNCS([sched_get_priority_max]) | |
738 | AC_CHECK_FUNCS([inet_ntoa]) | |
739 | AC_CHECK_FUNCS([pow]) | |
740 | ||
741 | if test "$cross_compiling" = "no" ; then | |
742 | AX_SIGNED_RIGHT_SHIFT | |
743 | fi | |
744 | ||
745 | dnl autoscan thinks we need this macro because we have a member function | |
746 | dnl called "error". Invoke the macro but don't run the check so autoscan | |
747 | dnl thinks we are in the clear. It's highly unlikely that we will ever | |
748 | dnl actually use the function that this checks for. | |
749 | if false ; then | |
750 | AC_FUNC_ERROR_AT_LINE | |
751 | fi | |
752 | ||
753 | # --- Coverage hooks --- | |
754 | ||
755 | AC_ARG_ENABLE(coverage, | |
756 | [ --enable-coverage turn on -fprofile-arcs -ftest-coverage], | |
757 | [case "${enableval}" in | |
758 | yes) ENABLE_COVERAGE=1 ;; | |
759 | no) ENABLE_COVERAGE=0 ;; | |
760 | *) AC_MSG_ERROR(bad value ${enableval} for --enable-cov) ;; | |
761 | esac], | |
762 | [ENABLE_COVERAGE=2]) | |
763 | ||
764 | if test "x[$]ENABLE_COVERAGE" = "x1"; then | |
765 | AC_MSG_WARN(enable coverage) | |
766 | GCOV_CFLAGS="`echo \"[$]CFLAGS\" | perl -pe 's/-O\d+//g;'` -fprofile-arcs -ftest-coverage" | |
767 | GCOV_CXXFLAGS="`echo \"[$]CXXFLAGS\" | perl -pe 's/-O\d+//g;'` -fprofile-arcs -ftest-coverage" | |
768 | GCOV_LDFLAGS="-XCClinker -fprofile-arcs -XCClinker -ftest-coverage" | |
769 | fi | |
770 | ||
771 | AC_SUBST(ENABLE_COVERAGE) | |
772 | AC_SUBST(GCOV_CFLAGS) | |
773 | AC_SUBST(GCOV_CXXFLAGS) | |
774 | AC_SUBST(GCOV_LDFLAGS) | |
775 | ||
776 | AC_CONFIG_HEADERS(config.h:config.hin) | |
777 | AC_CONFIG_HEADERS(lib/cpp/src/thrift/config.h:config.hin) | |
778 | AC_CONFIG_HEADERS(lib/c_glib/src/thrift/config.h:config.hin) | |
779 | # guard against pre defined config.h | |
780 | AH_TOP([ | |
781 | #ifndef CONFIG_H | |
782 | #define CONFIG_H | |
783 | ]) | |
784 | AH_BOTTOM([ | |
785 | #endif | |
786 | ]) | |
787 | ||
788 | ||
789 | AC_CONFIG_FILES([ | |
790 | Makefile | |
791 | compiler/cpp/Makefile | |
792 | compiler/cpp/src/Makefile | |
793 | compiler/cpp/test/Makefile | |
794 | compiler/cpp/src/thrift/version.h | |
795 | lib/Makefile | |
796 | lib/as3/Makefile | |
797 | lib/cl/Makefile | |
798 | lib/cpp/Makefile | |
799 | lib/cpp/test/Makefile | |
800 | lib/cpp/thrift-nb.pc | |
801 | lib/cpp/thrift-z.pc | |
802 | lib/cpp/thrift-qt5.pc | |
803 | lib/cpp/thrift.pc | |
804 | lib/c_glib/Makefile | |
805 | lib/c_glib/thrift_c_glib.pc | |
806 | lib/c_glib/test/Makefile | |
807 | lib/csharp/Makefile | |
808 | lib/csharp/test/Multiplex/Makefile | |
809 | lib/d/Makefile | |
810 | lib/d/test/Makefile | |
811 | lib/erl/Makefile | |
812 | lib/go/Makefile | |
813 | lib/go/test/Makefile | |
814 | lib/haxe/test/Makefile | |
815 | lib/hs/Makefile | |
816 | lib/java/Makefile | |
817 | lib/js/Makefile | |
818 | lib/js/test/Makefile | |
819 | lib/json/Makefile | |
820 | lib/json/test/Makefile | |
821 | lib/netcore/Makefile | |
822 | lib/netstd/Makefile | |
823 | lib/nodejs/Makefile | |
824 | lib/nodets/Makefile | |
825 | lib/perl/Makefile | |
826 | lib/perl/t/Makefile | |
827 | lib/php/Makefile | |
828 | lib/php/test/Makefile | |
829 | lib/dart/Makefile | |
830 | lib/py/Makefile | |
831 | lib/rb/Makefile | |
832 | lib/rs/Makefile | |
833 | lib/rs/test/Makefile | |
834 | lib/lua/Makefile | |
835 | lib/swift/Makefile | |
836 | lib/ts/Makefile | |
837 | lib/xml/Makefile | |
838 | lib/xml/test/Makefile | |
839 | test/Makefile | |
840 | test/features/Makefile | |
841 | test/c_glib/Makefile | |
842 | test/cl/Makefile | |
843 | test/cpp/Makefile | |
844 | test/csharp/Makefile | |
845 | test/erl/Makefile | |
846 | test/go/Makefile | |
847 | test/haxe/Makefile | |
848 | test/hs/Makefile | |
849 | test/lua/Makefile | |
850 | test/netcore/Makefile | |
851 | test/netstd/Makefile | |
852 | test/php/Makefile | |
853 | test/dart/Makefile | |
854 | test/perl/Makefile | |
855 | test/py/Makefile | |
856 | test/py.twisted/Makefile | |
857 | test/py.tornado/Makefile | |
858 | test/rb/Makefile | |
859 | test/rs/Makefile | |
860 | tutorial/Makefile | |
861 | tutorial/c_glib/Makefile | |
862 | tutorial/cl/Makefile | |
863 | tutorial/cpp/Makefile | |
864 | tutorial/d/Makefile | |
865 | tutorial/go/Makefile | |
866 | tutorial/haxe/Makefile | |
867 | tutorial/hs/Makefile | |
868 | tutorial/java/Makefile | |
869 | tutorial/js/Makefile | |
870 | tutorial/netcore/Makefile | |
871 | tutorial/netstd/Makefile | |
872 | tutorial/nodejs/Makefile | |
873 | tutorial/dart/Makefile | |
874 | tutorial/py/Makefile | |
875 | tutorial/py.twisted/Makefile | |
876 | tutorial/py.tornado/Makefile | |
877 | tutorial/rb/Makefile | |
878 | tutorial/rs/Makefile | |
879 | ]) | |
880 | ||
881 | if test "$have_as3" = "yes" ; then MAYBE_AS3="as3" ; else MAYBE_AS3="" ; fi | |
882 | AC_SUBST([MAYBE_AS3]) | |
883 | if test "$have_cpp" = "yes" ; then MAYBE_CPP="cpp" ; else MAYBE_CPP="" ; fi | |
884 | AC_SUBST([MAYBE_CPP]) | |
885 | if test "$have_c_glib" = "yes" ; then MAYBE_C_GLIB="c_glib" ; else MAYBE_C_GLIB="" ; fi | |
886 | AC_SUBST([MAYBE_C_GLIB]) | |
887 | if test "$have_d" = "yes" -a "$have_deimos_event2" = "yes" -a "$have_deimos_openssl" = "yes"; then MAYBE_D="d" ; else MAYBE_D="" ; fi | |
888 | AC_SUBST([MAYBE_D]) | |
889 | if test "$have_java" = "yes" ; then MAYBE_JAVA="java" ; else MAYBE_JAVA="" ; fi | |
890 | AC_SUBST([MAYBE_JAVA]) | |
891 | if test "$have_csharp" = "yes" ; then MAYBE_CSHARP="csharp" ; else MAYBE_CSHARP="" ; fi | |
892 | AC_SUBST([MAYBE_CSHARP]) | |
893 | if test "$have_python" = "yes" ; then MAYBE_PYTHON="py" ; else MAYBE_PYTHON="" ; fi | |
894 | AC_SUBST([MAYBE_PYTHON]) | |
895 | if test "$have_py3" = "yes" ; then MAYBE_PY3="py3" ; else MAYBE_PY3="" ; fi | |
896 | AC_SUBST([MAYBE_PY3]) | |
897 | if test "$have_ruby" = "yes" ; then MAYBE_RUBY="rb" ; else MAYBE_RUBY="" ; fi | |
898 | AC_SUBST([MAYBE_RUBY]) | |
899 | if test "$have_haskell" = "yes" ; then MAYBE_HASKELL="hs" ; else MAYBE_HASKELL="" ; fi | |
900 | AC_SUBST([MAYBE_HASKELL]) | |
901 | if test "$have_perl" = "yes" ; then MAYBE_PERL="perl" ; else MAYBE_PERL="" ; fi | |
902 | AC_SUBST([MAYBE_PERL]) | |
903 | if test "$have_php" = "yes" ; then MAYBE_PHP="php" ; else MAYBE_PHP="" ; fi | |
904 | AC_SUBST([MAYBE_PHP]) | |
905 | if test "$have_dart" = "yes" ; then MAYBE_DART="dart" ; else MAYBE_DART="" ; fi | |
906 | AC_SUBST([MAYBE_DART]) | |
907 | if test "$have_go" = "yes" ; then MAYBE_GO="go" ; else MAYBE_GO="" ; fi | |
908 | AC_SUBST([MAYBE_GO]) | |
909 | if test "$have_nodejs" = "yes" ; then MAYBE_NODEJS="nodejs" ; else MAYBE_NODEJS="" ; fi | |
910 | AC_SUBST([MAYBE_NODEJS]) | |
911 | if test "$have_nodets" = "yes" ; then MAYBE_NODETS="nodets" ; else MAYBE_NODETS="" ; fi | |
912 | AC_SUBST([MAYBE_NODETS]) | |
913 | if test "$have_erlang" = "yes" ; then MAYBE_ERLANG="erl" ; else MAYBE_ERLANG="" ; fi | |
914 | AC_SUBST([MAYBE_ERLANG]) | |
915 | if test "$have_lua" = "yes" ; then MAYBE_LUA="lua" ; else MAYBE_LUA="" ; fi | |
916 | AC_SUBST([MAYBE_LUA]) | |
917 | if test "$have_rs" = "yes" ; then MAYBE_RS="rs" ; else MAYBE_RS="" ; fi | |
918 | AC_SUBST([MAYBE_RS]) | |
919 | if test "$have_swift" = "yes" ; then MAYBE_SWIFT="swift" ; else MAYBE_SWIFT="" ; fi | |
920 | AC_SUBST([MAYBE_SWIFT]) | |
921 | if test "$have_dotnetcore" = "yes" ; then MAYBE_DOTNETCORE="netcore" ; else MAYBE_DOTNETCORE="" ; fi | |
922 | AC_SUBST([MAYBE_DOTNETCORE]) | |
923 | if test "$have_cl" = "yes" ; then MAYBE_CL="cl" ; else MAYBE_CL="" ; fi | |
924 | AC_SUBST([MAYBE_CL]) | |
925 | ||
926 | AC_OUTPUT | |
927 | ||
928 | ||
929 | echo | |
930 | echo "$PACKAGE $VERSION" | |
931 | echo | |
932 | echo "Building ActionScript3 Library : $have_as3" | |
933 | echo "Building C (GLib) Library .... : $have_c_glib" | |
934 | echo "Building C# (Mono) Library ... : $have_csharp" | |
935 | echo "Building C++ Library ......... : $have_cpp" | |
936 | echo "Building Common Lisp Library.. : $have_cl" | |
937 | echo "Building D Library ........... : $have_d" | |
938 | echo "Building Dart Library ........ : $have_dart" | |
939 | echo "Building dotnetcore Library .. : $have_dotnetcore" | |
940 | echo "Building .NET Standard Library : $have_dotnetcore" | |
941 | echo "Building Erlang Library ...... : $have_erlang" | |
942 | echo "Building Go Library .......... : $have_go" | |
943 | echo "Building Haskell Library ..... : $have_haskell" | |
944 | echo "Building Haxe Library ........ : $have_haxe" | |
945 | echo "Building Java Library ........ : $have_java" | |
946 | echo "Building Lua Library ......... : $have_lua" | |
947 | echo "Building NodeJS Library ...... : $have_nodejs" | |
948 | echo "Building Perl Library ........ : $have_perl" | |
949 | echo "Building PHP Library ......... : $have_php" | |
950 | echo "Building Python Library ...... : $have_python" | |
951 | echo "Building Py3 Library ......... : $have_py3" | |
952 | echo "Building Ruby Library ........ : $have_ruby" | |
953 | echo "Building Rust Library ........ : $have_rs" | |
954 | echo "Building Swift Library ....... : $have_swift" | |
955 | ||
956 | if test "$have_as3" = "yes" ; then | |
957 | echo | |
958 | echo "ActionScript Library:" | |
959 | echo " FLEX_HOME ................. : $FLEX_HOME" | |
960 | echo " Using compc version ....... : $($FLEX_COMPC --version)" | |
961 | fi | |
962 | if test "$have_c_glib" = "yes" ; then | |
963 | echo | |
964 | echo "C (glib):" | |
965 | echo " Using glib version ........ : $($GSETTINGS --version)" | |
966 | fi | |
967 | if test "$have_csharp" = "yes" ; then | |
968 | echo | |
969 | echo "C# Library:" | |
970 | echo " Using .NET 3.5 ............ : $net_3_5" | |
971 | echo " Using mono version ........ : $($MCS --version | head -1)" | |
972 | fi | |
973 | if test "$have_cpp" = "yes" ; then | |
974 | echo | |
975 | echo "C++ Library:" | |
976 | echo " C++ compiler .............. : $CXX" | |
977 | echo " Build TZlibTransport ...... : $have_zlib" | |
978 | echo " Build TNonblockingServer .. : $have_libevent" | |
979 | echo " Build TQTcpServer (Qt5) ... : $have_qt5" | |
980 | echo " C++ compiler version ...... : $($CXX --version | head -1)" | |
981 | fi | |
982 | if test "$have_cl" = "yes" ; then | |
983 | echo | |
984 | echo "Common Lisp Library:" | |
985 | echo " Using Common Lisp ......... : $SBCL" | |
986 | echo " Using Common Lisp version . : $($SBCL --version)" | |
987 | fi | |
988 | if test "$have_d" = "yes" ; then | |
989 | echo | |
990 | echo "D Library:" | |
991 | echo " Using D Compiler .......... : $DMD" | |
992 | echo " Building D libevent tests . : $with_d_event_tests" | |
993 | echo " Building D SSL tests ...... : $with_d_ssl_tests" | |
994 | echo " Using D version ........... : $($DMD --version | head -1)" | |
995 | fi | |
996 | if test "$have_dart" = "yes" ; then | |
997 | echo | |
998 | echo "Dart Library:" | |
999 | echo " Using Dart ................ : $DART" | |
1000 | echo " Using Pub ................. : $DARTPUB" | |
1001 | echo " Using Dart version ........ : $($DART --version 2>&1)" | |
1002 | fi | |
1003 | if test "$have_dotnetcore" = "yes" ; then | |
1004 | echo | |
1005 | echo ".NET Core Library:" | |
1006 | echo " Using .NET Core ........... : $DOTNETCORE" | |
1007 | echo " Using .NET Core version ... : $DOTNETCORE_VERSION" | |
1008 | fi | |
1009 | if test "$have_dotnetcore" = "yes" ; then | |
1010 | echo | |
1011 | echo ".NET Standard Library:" | |
1012 | echo " Using dotnet .............. : $DOTNETCORE" | |
1013 | echo " Using dotnet version ...... : $DOTNETCORE_VERSION" | |
1014 | fi | |
1015 | if test "$have_erlang" = "yes" ; then | |
1016 | echo | |
1017 | echo "Erlang Library:" | |
1018 | echo " Using erlc ................ : $ERLC" | |
1019 | echo " Using rebar ............... : $REBAR" | |
1020 | echo " Using erlc version ........ : $($ERL -eval 'erlang:display(erlang:system_info(otp_release)), halt().' -noshell | tr -d '\"')" | |
1021 | fi | |
1022 | if test "$have_go" = "yes" ; then | |
1023 | echo | |
1024 | echo "Go Library:" | |
1025 | echo " Using Go................... : $GO" | |
1026 | echo " Using Go version........... : $($GO version)" | |
1027 | fi | |
1028 | if test "$have_haskell" = "yes" ; then | |
1029 | echo | |
1030 | echo "Haskell Library:" | |
1031 | echo " Using Cabal ............... : $CABAL" | |
1032 | echo " Using Haskell ............. : $RUNHASKELL" | |
1033 | echo " Using Haskell version ..... : $($RUNHASKELL --version)" | |
1034 | fi | |
1035 | if test "$have_haxe" = "yes" ; then | |
1036 | echo | |
1037 | echo "Haxe Library:" | |
1038 | echo " Using Haxe ................ : $HAXE" | |
1039 | echo " Using Haxe version ........ : $HAXE_VERSION" | |
1040 | fi | |
1041 | if test "$have_java" = "yes" ; then | |
1042 | echo | |
1043 | echo "Java Library:" | |
1044 | echo " Using gradlew ............. : lib/java/gradlew" | |
1045 | echo " Using java ................ : $JAVA" | |
1046 | echo " Using javac ............... : $JAVAC" | |
1047 | echo " Using Gradle version ...... : $(lib/java/gradlew --version --quiet | grep Gradle 2>&1)" | |
1048 | echo " Using java version ........ : $($JAVA -version 2>&1 | grep 'version ')" | |
1049 | fi | |
1050 | if test "$have_lua" = "yes" ; then | |
1051 | echo | |
1052 | echo "Lua Library:" | |
1053 | echo " Using Lua ................. : $LUA" | |
1054 | echo " Using Lua version.......... : $($LUA -v)" | |
1055 | fi | |
1056 | if test "$have_nodejs" = "yes" ; then | |
1057 | echo | |
1058 | echo "NodeJS Library:" | |
1059 | echo " Using NodeJS .............. : $NODEJS" | |
1060 | echo " Using NodeJS version....... : $($NODEJS --version)" | |
1061 | fi | |
1062 | if test "$have_perl" = "yes" ; then | |
1063 | echo | |
1064 | echo "Perl Library:" | |
1065 | echo " Using Perl ................ : $PERL" | |
1066 | echo " Using Perl version ........ : $($PERL -v | grep 'version ')" | |
1067 | fi | |
1068 | if test "$have_php" = "yes" ; then | |
1069 | echo | |
1070 | echo "PHP Library:" | |
1071 | echo " Using php-config .......... : $PHP_CONFIG" | |
1072 | echo " Using php version ......... : $($PHP --version | head -1)" | |
1073 | fi | |
1074 | if test "$have_python" = "yes" ; then | |
1075 | echo | |
1076 | echo "Python Library:" | |
1077 | echo " Using Python .............. : $PYTHON" | |
1078 | echo " Using Python version ...... : $($PYTHON --version 2>&1)" | |
1079 | if test "$have_py3" = "yes" ; then | |
1080 | echo " Using Python3 ............. : $PYTHON3" | |
1081 | echo " Using Python3 version ..... : $($PYTHON3 --version)" | |
1082 | fi | |
1083 | if test "$have_trial" = "yes"; then | |
1084 | echo " Using trial ............... : $TRIAL" | |
1085 | fi | |
1086 | fi | |
1087 | if test "$have_ruby" = "yes" ; then | |
1088 | echo | |
1089 | echo "Ruby Library:" | |
1090 | echo " Using Ruby ................ : $RUBY" | |
1091 | echo " Using Ruby version ........ : $($RUBY --version)" | |
1092 | fi | |
1093 | if test "$have_rs" = "yes" ; then | |
1094 | echo | |
1095 | echo "Rust Library:" | |
1096 | echo " Using Cargo................ : $CARGO" | |
1097 | echo " Using rustc................ : $RUSTC" | |
1098 | echo " Using Rust version......... : $($RUSTC --version)" | |
1099 | fi | |
1100 | if test "$have_swift" = "yes" ; then | |
1101 | echo | |
1102 | echo "Swift Library:" | |
1103 | echo " Using Swift ............... : $SWIFT" | |
1104 | echo " Using Swift version ....... : $($SWIFT --version | head -1)" | |
1105 | fi | |
1106 | echo | |
1107 | echo "If something is missing that you think should be present," | |
1108 | echo "please skim the output of configure to find the missing" | |
1109 | echo "component. Details are present in config.log." | |
1110 | echo |