summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorAllen George <allen.george@gmail.com>2016-11-02 08:01:08 -0400
committerJens Geyer <jensg@apache.org>2017-01-26 01:34:16 +0100
commit8b96bfbf1eb058d3c378535e90c1e90280224bb4 (patch)
tree9b7719c1bb205f7132f4b1870f974c6ceb7f0bac /configure.ac
parent6fe7fa1b7ed72215a59e93c680a209a99530fada (diff)
downloadthrift-8b96bfbf1eb058d3c378535e90c1e90280224bb4.tar.gz
THRIFT-2945 Add Rust support
Client: Rust Patch: Allen George <allen.george@gmail.com> This closes #1147
Diffstat (limited to 'configure.ac')
-rwxr-xr-xconfigure.ac38
1 files changed, 38 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index dad10a72f..0452a1570 100755
--- a/configure.ac
+++ b/configure.ac
@@ -129,6 +129,7 @@ if test "$enable_libs" = "no"; then
with_d="no"
with_nodejs="no"
with_lua="no"
+ with_rs="no"
fi
@@ -410,6 +411,29 @@ if test "$with_go" = "yes"; then
fi
AM_CONDITIONAL(WITH_GO, [test "$have_go" = "yes"])
+AX_THRIFT_LIB(rs, [Rust], yes)
+have_rs="no"
+if test "$with_rs" = "yes"; then
+ AC_PATH_PROG([CARGO], [cargo])
+ AC_PATH_PROG([RUSTC], [rustc])
+ if [[ -x "$CARGO" ]] && [[ -x "$RUSTC" ]]; then
+ min_rustc_version="1.13"
+
+ AC_MSG_CHECKING([for rustc version])
+ rustc_version=`$RUSTC --version 2>&1 | $SED -e 's/\(rustc \)\([0-9]\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*/\2.\3/'`
+ AC_MSG_RESULT($rustc_version)
+ AC_SUBST([rustc_version],[$rustc_version])
+
+ AX_COMPARE_VERSION([$min_rustc_version],[le],[$rustc_version],[
+ :
+ have_rs="yes"
+ ],[
+ :
+ have_rs="no"
+ ])
+ fi
+fi
+AM_CONDITIONAL(WITH_RS, [test "$have_rs" = "yes"])
AX_THRIFT_LIB(haxe, [Haxe], yes)
if test "$with_haxe" = "yes"; then
@@ -777,6 +801,8 @@ AC_CONFIG_FILES([
lib/dart/Makefile
lib/py/Makefile
lib/rb/Makefile
+ lib/rs/Makefile
+ lib/rs/test/Makefile
lib/lua/Makefile
lib/xml/Makefile
lib/xml/test/Makefile
@@ -798,6 +824,7 @@ AC_CONFIG_FILES([
test/py.twisted/Makefile
test/py.tornado/Makefile
test/rb/Makefile
+ test/rs/Makefile
tutorial/Makefile
tutorial/c_glib/Makefile
tutorial/cpp/Makefile
@@ -814,6 +841,7 @@ AC_CONFIG_FILES([
tutorial/py.twisted/Makefile
tutorial/py.tornado/Makefile
tutorial/rb/Makefile
+ tutorial/rs/Makefile
])
if test "$have_cpp" = "yes" ; then MAYBE_CPP="cpp" ; else MAYBE_CPP="" ; fi
@@ -848,6 +876,8 @@ if test "$have_erlang" = "yes" ; then MAYBE_ERLANG="erl" ; else MAYBE_ERLANG=""
AC_SUBST([MAYBE_ERLANG])
if test "$have_lua" = "yes" ; then MAYBE_LUA="lua" ; else MAYBE_LUA="" ; fi
AC_SUBST([MAYBE_LUA])
+if test "$have_rs" = "yes" ; then MAYBE_RS="rs" ; else MAYBE_RS="" ; fi
+AC_SUBST([MAYBE_RS])
AC_OUTPUT
@@ -873,6 +903,7 @@ echo "Building Go Library .......... : $have_go"
echo "Building D Library ........... : $have_d"
echo "Building NodeJS Library ...... : $have_nodejs"
echo "Building Lua Library ......... : $have_lua"
+echo "Building Rust Library ........ : $have_rs"
if test "$have_cpp" = "yes" ; then
echo
@@ -974,6 +1005,13 @@ if test "$have_lua" = "yes" ; then
echo "Lua Library:"
echo " Using Lua .............. : $LUA"
fi
+if test "$have_rs" = "yes" ; then
+ echo
+ echo "Rust Library:"
+ echo " Using Cargo................ : $CARGO"
+ echo " Using rustc................ : $RUSTC"
+ echo " Using Rust version......... : $($RUSTC --version)"
+fi
echo
echo "If something is missing that you think should be present,"
echo "please skim the output of configure to find the missing"