]> git.proxmox.com Git - ceph.git/blame - ceph/src/jaegertracing/thrift/configure.ac
buildsys: switch source download to quincy
[ceph.git] / ceph / src / jaegertracing / thrift / configure.ac
CommitLineData
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
20AC_PREREQ(2.65)
21AC_CONFIG_MACRO_DIR([./aclocal])
22
23AC_INIT([thrift], [0.13.0])
24
25AC_CONFIG_AUX_DIR([.])
26
27AM_INIT_AUTOMAKE([1.13 subdir-objects tar-ustar])
28PKG_PROG_PKG_CONFIG
29
30AC_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"])
34AS_IF([test "x$PY_PREFIX" = x], [PY_PREFIX="/usr"])
35
36AC_ARG_VAR([JAVA_PREFIX], [Prefix for installing the Java lib jar.
37 Default = "/usr/local/lib"])
38AS_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
42AC_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
47AC_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"])
51AS_IF([test "x$PHP_PREFIX" = x], [PHP_PREFIX="/usr/lib/php"])
52
53AC_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"])
58AS_IF([test "x$PHP_CONFIG_PREFIX" = x], [PHP_CONFIG_PREFIX="/etc/php.d"])
59
60AC_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"])
64AS_IF([test "x$INSTALLDIRS" = x], [INSTALLDIRS="vendor"])
65
66AC_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"])
71AS_IF([test "x$PERL_PREFIX" = x], [PERL_PREFIX="/usr/local"])
72
73AC_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
77AC_SUBST(CABAL_CONFIGURE_FLAGS)
78
79AC_ARG_VAR([D_IMPORT_PREFIX], [Prefix for installing D modules.
80 [INCLUDEDIR/d2]])
81AS_IF([test "x$D_IMPORT_PREFIX" = x], [D_IMPORT_PREFIX="${includedir}/d2"])
82
83AC_ARG_VAR([DMD_LIBEVENT_FLAGS], [DMD flags for linking libevent (auto-detected if not set).])
84AC_ARG_VAR([DMD_OPENSSL_FLAGS], [DMD flags for linking OpenSSL (auto-detected if not set).])
85
86AC_ARG_VAR([THRIFT], [Path to the thrift tool (needed for cross-compilation).])
87AS_IF([test "x$THRIFT" = x], [THRIFT=`pwd`/compiler/cpp/thrift])
88
89AC_PROG_CC
90AC_PROG_CPP
91AC_PROG_CXX
92AC_PROG_INSTALL
93AC_PROG_LIBTOOL
94AC_PROG_MAKE_SET
95AC_PROG_BISON(2.5)
96AC_PROG_YACC
97AC_PROG_LEX
98AM_PROG_LEX
99AC_PROG_LN_S
100AC_PROG_MKDIR_P
101AC_PROG_AWK
102AC_PROG_RANLIB
103
104AC_LANG([C++])
105AX_CXX_COMPILE_STDCXX_11([noext], [mandatory])
106
107AM_EXTRA_RECURSIVE_TARGETS([style])
108AC_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
112AC_ARG_ENABLE([libs],
113 AS_HELP_STRING([--enable-libs], [build the Apache Thrift libraries [default=yes]]),
114 [], enable_libs=yes
115)
116have_libs=yes
117if 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"
144fi
145
146AX_THRIFT_LIB(as3, [as3], yes)
147have_as3=no
148if 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
155fi
156AM_CONDITIONAL(WITH_AS3, [test "$have_as3" = "yes"])
157
158AX_THRIFT_LIB(cpp, [C++], yes)
159have_cpp=no
160if 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
192fi
193AM_CONDITIONAL([WITH_CPP], [test "$have_cpp" = "yes"])
194AM_CONDITIONAL([AMX_HAVE_LIBEVENT], [test "$have_libevent" = "yes"])
195AM_CONDITIONAL([AMX_HAVE_ZLIB], [test "$have_zlib" = "yes"])
196AM_CONDITIONAL([AMX_HAVE_QT5], [test "$have_qt5" = "yes"])
197AM_CONDITIONAL([QT5_REDUCE_RELOCATIONS], [test "x$qt_reduce_reloc" != "x"])
198
199AX_THRIFT_LIB(c_glib, [C (GLib)], yes)
200if 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
207fi
208AM_CONDITIONAL(WITH_C_GLIB, [test "$have_glib2" = "yes" -a "$have_gobject2" = "yes"])
209
210# echo "OpenSSL check"
211if 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()
214fi
215
216AX_THRIFT_LIB(csharp, [C#], yes)
217if 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
230fi
231AM_CONDITIONAL(WITH_MONO, [test "$have_csharp" = "yes"])
232AM_CONDITIONAL(NET_2_0, [test "$net_3_5" = "no"])
233AM_CONDITIONAL(MONO_MCS, [test "$mono_mcs" = "yes"])
234
235AX_THRIFT_LIB(java, [Java], yes)
236if 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
246fi
247AM_CONDITIONAL([WITH_JAVA], [test "$have_java" = "yes"])
248
249AX_THRIFT_LIB(erlang, [Erlang], yes)
250if 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
269fi
270AM_CONDITIONAL(WITH_ERLANG, [test "$have_erlang" = "yes"])
271AM_CONDITIONAL(ERLANG_OTP16, [test "$erlang_otp16_or_less" = "yes"])
272
273AX_THRIFT_LIB(nodejs, [Nodejs], yes)
274have_nodejs=no
275if 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
281fi
282AM_CONDITIONAL(WITH_NODEJS, [test "$have_nodejs" = "yes"])
283AM_CONDITIONAL(HAVE_NPM, [test "x$NPM" != "x"])
284
285AX_THRIFT_LIB(nodets, [Nodets], yes)
286have_nodets=no
287if 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
293fi
294AM_CONDITIONAL(WITH_NODETS, [test "$have_nodets" = "yes"])
295AM_CONDITIONAL(HAVE_NPM, [test "x$NPM" != "x"])
296
297AX_THRIFT_LIB(lua, [Lua], yes)
298have_lua=no
299if 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
305fi
306AM_CONDITIONAL(WITH_LUA, [test "$have_lua" = "yes"])
307
308# Find python regardless of with_python value, because it's needed by make cross
309AM_PATH_PYTHON(2.6,, :)
310AX_THRIFT_LIB(python, [Python], yes)
311if 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
319fi
320AM_CONDITIONAL(WITH_PYTHON, [test "$have_python" = "yes"])
321AM_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
326have_py3="no"
327AX_THRIFT_LIB(py3, [Py3], yes)
328if 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
335fi
336AM_CONDITIONAL(WITH_PY3, [test "$have_py3" = "yes"])
337
338AX_THRIFT_LIB(perl, [Perl], yes)
339if 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
352fi
353AM_CONDITIONAL(WITH_PERL, [test "$have_perl" = "yes"])
354
355AX_THRIFT_LIB(php, [PHP], yes)
356if test "$with_php" = "yes"; then
357 AC_PATH_PROG([PHP], [php])
358 if test -n "$PHP" ; then
359 have_php="yes"
360 fi
361fi
362AM_CONDITIONAL(WITH_PHP, [test "$have_php" = "yes"])
363
364AX_THRIFT_LIB(php_extension, [PHP_EXTENSION], yes)
365if 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
373fi
374AM_CONDITIONAL(WITH_PHP_EXTENSION, [test "$have_php_extension" = "yes"])
375
376AX_THRIFT_LIB(dart, [DART], yes)
377if 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
383fi
384AM_CONDITIONAL(WITH_DART, [test "$have_dart" = "yes"])
385
386AX_THRIFT_LIB(ruby, [Ruby], yes)
387have_ruby=no
388if 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
394fi
395AM_CONDITIONAL(WITH_RUBY, [test "$have_ruby" = "yes"])
396AM_CONDITIONAL(HAVE_BUNDLER, [test "x$BUNDLER" != "x"])
397
398AX_THRIFT_LIB(haskell, [Haskell], yes)
399have_haskell=no
400RUNHASKELL=true
401CABAL=true
402if 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
411fi
412AC_SUBST(CABAL)
413AC_SUBST(RUNHASKELL)
414AM_CONDITIONAL(WITH_HASKELL, [test "$have_haskell" = "yes"])
415
416AX_THRIFT_LIB(go, [Go], yes)
417if 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
447fi
448AM_CONDITIONAL(WITH_GO, [test "$have_go" = "yes"])
449AM_CONDITIONAL([GOVERSION_LT_17], [test "$go_version_lt_17" = "yes"])
450
451AX_THRIFT_LIB(swift, [Swift], yes)
452have_swift="no"
453if 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
458fi
459AM_CONDITIONAL([WITH_SWIFT], [test "$have_swift" = "yes"])
460
461AX_THRIFT_LIB(rs, [Rust], yes)
462have_rs="no"
463if 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
482fi
483AM_CONDITIONAL(WITH_RS, [test "$have_rs" = "yes"])
484
485AX_THRIFT_LIB(cl, [Common Lisp], yes)
486have_cl="no"
487if test "$with_cl" = "yes"; then
488 AC_PATH_PROG([SBCL], [sbcl])
489 if test "x$SBCL" != "x"; then
490 have_cl="yes"
491 fi
492fi
493AM_CONDITIONAL(WITH_CL, [test "$have_cl" = "yes"])
494
495AX_THRIFT_LIB(haxe, [Haxe], yes)
496if 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
501fi
502AM_CONDITIONAL(WITH_HAXE, [test "$have_haxe" = "yes"])
503
504
505AX_THRIFT_LIB(dotnetcore, [.NET Core], yes)
506if 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
511fi
512AM_CONDITIONAL(WITH_DOTNET, [test "$have_dotnetcore" = "yes"])
513
514
515AX_THRIFT_LIB(d, [D], yes)
516if 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
522fi
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).
527lib_prefix=lib
528lib_suffix=a
529case "$host_os" in
530 cygwin* | mingw* | pw32* | cegcc*)
531 lib_prefix=""
532 lib_suffix=lib
533 ;;
534esac
535D_LIB_NAME="${lib_prefix}thriftd.${lib_suffix}"
536AC_SUBST(D_LIB_NAME)
537D_EVENT_LIB_NAME="${lib_prefix}thriftd-event.${lib_suffix}"
538AC_SUBST(D_EVENT_LIB_NAME)
539D_SSL_LIB_NAME="${lib_prefix}thriftd-ssl.${lib_suffix}"
540AC_SUBST(D_SSL_LIB_NAME)
541
542if 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 \
551linker 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 \
575linker 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
589fi
590
591AM_CONDITIONAL(WITH_D, [test "$have_d" = "yes"])
592AM_CONDITIONAL(DMD_OPTLINK, [test "$dmd_optlink" = "yes"])
593AC_SUBST(DMD_OF_DIRSEP, "$dmd_of_dirsep")
594AM_CONDITIONAL(HAVE_DEIMOS_EVENT2, [test "$have_deimos_event2" = "yes"])
595AM_CONDITIONAL(WITH_D_EVENT_TESTS, [test "$with_d_event_tests" = "yes"])
596AC_SUBST(DMD_LIBEVENT_FLAGS)
597AM_CONDITIONAL(HAVE_DEIMOS_OPENSSL, [test "$have_deimos_openssl" = "yes"])
598AM_CONDITIONAL(WITH_D_SSL_TESTS, [test "$with_d_ssl_tests" = "yes"])
599AC_SUBST(DMD_OPENSSL_FLAGS)
600
601AC_ARG_ENABLE([tests],
602 AS_HELP_STRING([--enable-tests], [build tests [default=yes]]),
603 [], enable_tests=yes
604)
605have_tests=yes
606if test "$enable_tests" = "no"; then
607 have_tests="no"
608fi
609AM_CONDITIONAL(WITH_TESTS, [test "$have_tests" = "yes"])
610
611AC_ARG_ENABLE([tutorial],
612 AS_HELP_STRING([--enable-tutorial], [build tutorial [default=yes]]),
613 [], enable_tutorial=yes
614)
615have_tutorial=yes
616if test "$enable_tutorial" = "no"; then
617 have_tutorial="no"
618fi
619AM_CONDITIONAL(WITH_TUTORIAL, [test "$have_tutorial" = "yes"])
620
621AM_CONDITIONAL(MINGW, false)
622case "${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 ;;
631esac
632
633AC_C_CONST
634AC_C_INLINE
635AC_C_VOLATILE
636
637AC_HEADER_STDBOOL
638AC_HEADER_STDC
639AC_HEADER_TIME
640AC_HEADER_SYS_WAIT
641AC_TYPE_SIGNAL
642AC_CHECK_HEADERS([arpa/inet.h])
643AC_CHECK_HEADERS([sys/param.h])
644AC_CHECK_HEADERS([fcntl.h])
645AC_CHECK_HEADERS([inttypes.h])
646AC_CHECK_HEADERS([limits.h])
647AC_CHECK_HEADERS([netdb.h])
648AC_CHECK_HEADERS([netinet/in.h])
649AC_CHECK_HEADERS([pthread.h])
650AC_CHECK_HEADERS([signal.h])
651AC_CHECK_HEADERS([stddef.h])
652AC_CHECK_HEADERS([stdlib.h])
653AC_CHECK_HEADERS([sys/ioctl.h])
654AC_CHECK_HEADERS([sys/socket.h])
655AC_CHECK_HEADERS([sys/time.h])
656AC_CHECK_HEADERS([sys/un.h])
657AC_CHECK_HEADERS([poll.h])
658AC_CHECK_HEADERS([sys/poll.h])
659AC_CHECK_HEADERS([sys/resource.h])
660AC_CHECK_HEADERS([unistd.h])
661AC_CHECK_HEADERS([libintl.h])
662AC_CHECK_HEADERS([malloc.h])
663AC_CHECK_HEADERS([openssl/ssl.h])
664AC_CHECK_HEADERS([openssl/rand.h])
665AC_CHECK_HEADERS([openssl/x509v3.h])
666AC_CHECK_HEADERS([sched.h])
667AC_CHECK_HEADERS([wchar.h])
668
669AC_CHECK_LIB(pthread, pthread_create)
670dnl NOTE(dreiss): I haven't been able to find any really solid docs
671dnl on what librt is and how it fits into various Unix systems.
672dnl My best guess is that it is where glibc stashes its implementation
673dnl of the POSIX Real-Time Extensions. This seems necessary on Linux,
674dnl and we haven't yet found a system where this is a problem.
675AC_CHECK_LIB(rt, clock_gettime)
676AC_CHECK_LIB(socket, setsockopt)
677
678AC_TYPE_INT16_T
679AC_TYPE_INT32_T
680AC_TYPE_INT64_T
681AC_TYPE_INT8_T
682AC_TYPE_MODE_T
683AC_TYPE_OFF_T
684AC_TYPE_SIZE_T
685AC_TYPE_SSIZE_T
686AC_TYPE_UINT16_T
687AC_TYPE_UINT32_T
688AC_TYPE_UINT64_T
689AC_TYPE_UINT8_T
690AC_CHECK_TYPES([ptrdiff_t], [], [echo "ptrdiff_t not found or g++ not installed - cannot continue" && exit 1])
691
692AC_STRUCT_TM
693
694dnl NOTE(dreiss): AI_ADDRCONFIG is not defined on OpenBSD.
695AC_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
704AC_FUNC_ALLOCA
705AC_FUNC_FORK
706AC_FUNC_MALLOC
707AC_FUNC_MEMCMP
708AC_FUNC_REALLOC
709AC_FUNC_SELECT_ARGTYPES
710AC_FUNC_STAT
711AC_FUNC_STRERROR_R
712AC_FUNC_STRFTIME
713AC_FUNC_VPRINTF
714AC_CHECK_FUNCS([strtoul])
715AC_CHECK_FUNCS([bzero])
716AC_CHECK_FUNCS([ftruncate])
717AC_CHECK_FUNCS([gethostbyname])
718AC_CHECK_FUNCS([gethostbyname_r])
719AC_CHECK_FUNCS([gettimeofday])
720AC_CHECK_FUNCS([memmove])
721AC_CHECK_FUNCS([memset])
722AC_CHECK_FUNCS([mkdir])
723AC_CHECK_FUNCS([realpath])
724AC_CHECK_FUNCS([select])
725AC_CHECK_FUNCS([setlocale])
726AC_CHECK_FUNCS([socket])
727AC_CHECK_FUNCS([strchr])
728AC_CHECK_FUNCS([strdup])
729AC_CHECK_FUNCS([strerror])
730AC_CHECK_FUNCS([strstr])
731AC_CHECK_FUNCS([strtol])
732AC_CHECK_FUNCS([sqrt])
733dnl The following functions are optional.
734AC_CHECK_FUNCS([alarm])
735AC_CHECK_FUNCS([clock_gettime])
736AC_CHECK_FUNCS([sched_get_priority_min])
737AC_CHECK_FUNCS([sched_get_priority_max])
738AC_CHECK_FUNCS([inet_ntoa])
739AC_CHECK_FUNCS([pow])
740
741if test "$cross_compiling" = "no" ; then
742 AX_SIGNED_RIGHT_SHIFT
743fi
744
745dnl autoscan thinks we need this macro because we have a member function
746dnl called "error". Invoke the macro but don't run the check so autoscan
747dnl thinks we are in the clear. It's highly unlikely that we will ever
748dnl actually use the function that this checks for.
749if false ; then
750 AC_FUNC_ERROR_AT_LINE
751fi
752
753# --- Coverage hooks ---
754
755AC_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
764if 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"
769fi
770
771AC_SUBST(ENABLE_COVERAGE)
772AC_SUBST(GCOV_CFLAGS)
773AC_SUBST(GCOV_CXXFLAGS)
774AC_SUBST(GCOV_LDFLAGS)
775
776AC_CONFIG_HEADERS(config.h:config.hin)
777AC_CONFIG_HEADERS(lib/cpp/src/thrift/config.h:config.hin)
778AC_CONFIG_HEADERS(lib/c_glib/src/thrift/config.h:config.hin)
779# guard against pre defined config.h
780AH_TOP([
781#ifndef CONFIG_H
782#define CONFIG_H
783])
784AH_BOTTOM([
785#endif
786])
787
788
789AC_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
881if test "$have_as3" = "yes" ; then MAYBE_AS3="as3" ; else MAYBE_AS3="" ; fi
882AC_SUBST([MAYBE_AS3])
883if test "$have_cpp" = "yes" ; then MAYBE_CPP="cpp" ; else MAYBE_CPP="" ; fi
884AC_SUBST([MAYBE_CPP])
885if test "$have_c_glib" = "yes" ; then MAYBE_C_GLIB="c_glib" ; else MAYBE_C_GLIB="" ; fi
886AC_SUBST([MAYBE_C_GLIB])
887if test "$have_d" = "yes" -a "$have_deimos_event2" = "yes" -a "$have_deimos_openssl" = "yes"; then MAYBE_D="d" ; else MAYBE_D="" ; fi
888AC_SUBST([MAYBE_D])
889if test "$have_java" = "yes" ; then MAYBE_JAVA="java" ; else MAYBE_JAVA="" ; fi
890AC_SUBST([MAYBE_JAVA])
891if test "$have_csharp" = "yes" ; then MAYBE_CSHARP="csharp" ; else MAYBE_CSHARP="" ; fi
892AC_SUBST([MAYBE_CSHARP])
893if test "$have_python" = "yes" ; then MAYBE_PYTHON="py" ; else MAYBE_PYTHON="" ; fi
894AC_SUBST([MAYBE_PYTHON])
895if test "$have_py3" = "yes" ; then MAYBE_PY3="py3" ; else MAYBE_PY3="" ; fi
896AC_SUBST([MAYBE_PY3])
897if test "$have_ruby" = "yes" ; then MAYBE_RUBY="rb" ; else MAYBE_RUBY="" ; fi
898AC_SUBST([MAYBE_RUBY])
899if test "$have_haskell" = "yes" ; then MAYBE_HASKELL="hs" ; else MAYBE_HASKELL="" ; fi
900AC_SUBST([MAYBE_HASKELL])
901if test "$have_perl" = "yes" ; then MAYBE_PERL="perl" ; else MAYBE_PERL="" ; fi
902AC_SUBST([MAYBE_PERL])
903if test "$have_php" = "yes" ; then MAYBE_PHP="php" ; else MAYBE_PHP="" ; fi
904AC_SUBST([MAYBE_PHP])
905if test "$have_dart" = "yes" ; then MAYBE_DART="dart" ; else MAYBE_DART="" ; fi
906AC_SUBST([MAYBE_DART])
907if test "$have_go" = "yes" ; then MAYBE_GO="go" ; else MAYBE_GO="" ; fi
908AC_SUBST([MAYBE_GO])
909if test "$have_nodejs" = "yes" ; then MAYBE_NODEJS="nodejs" ; else MAYBE_NODEJS="" ; fi
910AC_SUBST([MAYBE_NODEJS])
911if test "$have_nodets" = "yes" ; then MAYBE_NODETS="nodets" ; else MAYBE_NODETS="" ; fi
912AC_SUBST([MAYBE_NODETS])
913if test "$have_erlang" = "yes" ; then MAYBE_ERLANG="erl" ; else MAYBE_ERLANG="" ; fi
914AC_SUBST([MAYBE_ERLANG])
915if test "$have_lua" = "yes" ; then MAYBE_LUA="lua" ; else MAYBE_LUA="" ; fi
916AC_SUBST([MAYBE_LUA])
917if test "$have_rs" = "yes" ; then MAYBE_RS="rs" ; else MAYBE_RS="" ; fi
918AC_SUBST([MAYBE_RS])
919if test "$have_swift" = "yes" ; then MAYBE_SWIFT="swift" ; else MAYBE_SWIFT="" ; fi
920AC_SUBST([MAYBE_SWIFT])
921if test "$have_dotnetcore" = "yes" ; then MAYBE_DOTNETCORE="netcore" ; else MAYBE_DOTNETCORE="" ; fi
922AC_SUBST([MAYBE_DOTNETCORE])
923if test "$have_cl" = "yes" ; then MAYBE_CL="cl" ; else MAYBE_CL="" ; fi
924AC_SUBST([MAYBE_CL])
925
926AC_OUTPUT
927
928
929echo
930echo "$PACKAGE $VERSION"
931echo
932echo "Building ActionScript3 Library : $have_as3"
933echo "Building C (GLib) Library .... : $have_c_glib"
934echo "Building C# (Mono) Library ... : $have_csharp"
935echo "Building C++ Library ......... : $have_cpp"
936echo "Building Common Lisp Library.. : $have_cl"
937echo "Building D Library ........... : $have_d"
938echo "Building Dart Library ........ : $have_dart"
939echo "Building dotnetcore Library .. : $have_dotnetcore"
940echo "Building .NET Standard Library : $have_dotnetcore"
941echo "Building Erlang Library ...... : $have_erlang"
942echo "Building Go Library .......... : $have_go"
943echo "Building Haskell Library ..... : $have_haskell"
944echo "Building Haxe Library ........ : $have_haxe"
945echo "Building Java Library ........ : $have_java"
946echo "Building Lua Library ......... : $have_lua"
947echo "Building NodeJS Library ...... : $have_nodejs"
948echo "Building Perl Library ........ : $have_perl"
949echo "Building PHP Library ......... : $have_php"
950echo "Building Python Library ...... : $have_python"
951echo "Building Py3 Library ......... : $have_py3"
952echo "Building Ruby Library ........ : $have_ruby"
953echo "Building Rust Library ........ : $have_rs"
954echo "Building Swift Library ....... : $have_swift"
955
956if 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)"
961fi
962if test "$have_c_glib" = "yes" ; then
963 echo
964 echo "C (glib):"
965 echo " Using glib version ........ : $($GSETTINGS --version)"
966fi
967if 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)"
972fi
973if 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)"
981fi
982if 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)"
987fi
988if 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)"
995fi
996if 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)"
1002fi
1003if 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"
1008fi
1009if test "$have_dotnetcore" = "yes" ; then
1010 echo
1011 echo ".NET Standard Library:"
1012 echo " Using dotnet .............. : $DOTNETCORE"
1013 echo " Using dotnet version ...... : $DOTNETCORE_VERSION"
1014fi
1015if 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 '\"')"
1021fi
1022if test "$have_go" = "yes" ; then
1023 echo
1024 echo "Go Library:"
1025 echo " Using Go................... : $GO"
1026 echo " Using Go version........... : $($GO version)"
1027fi
1028if 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)"
1034fi
1035if test "$have_haxe" = "yes" ; then
1036 echo
1037 echo "Haxe Library:"
1038 echo " Using Haxe ................ : $HAXE"
1039 echo " Using Haxe version ........ : $HAXE_VERSION"
1040fi
1041if 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 ')"
1049fi
1050if test "$have_lua" = "yes" ; then
1051 echo
1052 echo "Lua Library:"
1053 echo " Using Lua ................. : $LUA"
1054 echo " Using Lua version.......... : $($LUA -v)"
1055fi
1056if test "$have_nodejs" = "yes" ; then
1057 echo
1058 echo "NodeJS Library:"
1059 echo " Using NodeJS .............. : $NODEJS"
1060 echo " Using NodeJS version....... : $($NODEJS --version)"
1061fi
1062if 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 ')"
1067fi
1068if 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)"
1073fi
1074if 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
1086fi
1087if test "$have_ruby" = "yes" ; then
1088 echo
1089 echo "Ruby Library:"
1090 echo " Using Ruby ................ : $RUBY"
1091 echo " Using Ruby version ........ : $($RUBY --version)"
1092fi
1093if 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)"
1099fi
1100if 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)"
1105fi
1106echo
1107echo "If something is missing that you think should be present,"
1108echo "please skim the output of configure to find the missing"
1109echo "component. Details are present in config.log."
1110echo