2009-03-30 22:52:44 +00:00
|
|
|
#
|
|
|
|
# Licensed to the Apache Software Foundation (ASF) under one
|
|
|
|
# or more contributor license agreements. See the NOTICE file
|
|
|
|
# distributed with this work for additional information
|
|
|
|
# regarding copyright ownership. The ASF licenses this file
|
|
|
|
# to you 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.
|
|
|
|
#
|
|
|
|
|
2010-08-19 21:02:19 +00:00
|
|
|
AC_PREREQ(2.65)
|
2006-08-23 22:03:34 +00:00
|
|
|
|
2010-09-28 17:44:45 +00:00
|
|
|
AC_INIT([thrift], [0.6.0-dev])
|
2006-08-23 22:03:34 +00:00
|
|
|
|
|
|
|
AC_CONFIG_AUX_DIR([.])
|
|
|
|
|
|
|
|
AM_INIT_AUTOMAKE
|
|
|
|
|
2007-09-05 00:47:32 +00:00
|
|
|
AC_ARG_VAR([PY_PREFIX], [Prefix for installing Python modules.
|
|
|
|
(Normal --prefix is ignored for Python because
|
|
|
|
Python has different conventions.)
|
|
|
|
Default = "/usr"])
|
2008-03-04 21:10:29 +00:00
|
|
|
AS_IF([test "x$PY_PREFIX" = x], [PY_PREFIX="/usr"])
|
2007-09-05 00:47:32 +00:00
|
|
|
|
2008-07-11 01:26:16 +00:00
|
|
|
AC_ARG_VAR([JAVA_PREFIX], [Prefix for installing the Java lib jar.
|
|
|
|
(Normal --prefix is ignored for Java because
|
|
|
|
Java has different conevntions.)
|
|
|
|
Default = "/usr/local/lib"])
|
|
|
|
AS_IF([test "x$JAVA_PREFIX" = x], [JAVA_PREFIX="/usr/local/lib"])
|
2007-12-28 18:25:33 +00:00
|
|
|
|
2010-05-12 21:31:58 +00:00
|
|
|
AC_ARG_VAR([RUBY_PREFIX], [Prefix for installing Ruby modules.
|
|
|
|
(Normal --prefix is ignored for Ruby because
|
|
|
|
Ruby has different conventions.)
|
|
|
|
Default = none, let ruby setup decide])
|
|
|
|
|
2010-05-02 22:39:31 +00:00
|
|
|
AC_ARG_VAR([PHP_PREFIX], [Prefix for installing PHP modules.
|
|
|
|
(Normal --prefix is ignored for PHP because
|
|
|
|
PHP has different conventions.)
|
|
|
|
Default = "/usr/lib/php"])
|
|
|
|
AS_IF([test "x$PHP_PREFIX" = x], [PHP_PREFIX="/usr/lib/php"])
|
|
|
|
|
2010-08-25 17:09:02 +00:00
|
|
|
AC_ARG_VAR([PHP_CONFIG_PREFIX],
|
|
|
|
[Prefix for installing PHP extension module .ini file.
|
|
|
|
(Normal --prefix is ignored for PHP because PHP has
|
|
|
|
different conventions.)
|
|
|
|
Default = "/etc/php.d"])
|
|
|
|
AS_IF([test "x$PHP_CONFIG_PREFIX" = x], [PHP_CONFIG_PREFIX="/etc/php.d"])
|
|
|
|
|
2010-06-11 17:57:32 +00:00
|
|
|
AC_ARG_VAR([PERL_PREFIX], [Prefix for installing Perl modules.
|
|
|
|
(Normal --prefix is ignored for Perl because
|
|
|
|
Perl has different conventions.)
|
|
|
|
Default = "/usr/local/lib"])
|
|
|
|
AS_IF([test "x$PERL_PREFIX" = x], [PERL_PREFIX="/usr/local"])
|
|
|
|
|
2010-09-27 17:22:17 +00:00
|
|
|
AC_ARG_VAR([CABAL_CONFIGURE_FLAGS],
|
|
|
|
[Extra flags to pass to cabal: "cabal Setup.lhs configure $CABAL_CONFIGURE_FLAGS".
|
|
|
|
(Typically used to set --user or force --global.)])
|
|
|
|
|
|
|
|
AC_SUBST(CABAL_CONFIGURE_FLAGS)
|
|
|
|
|
2007-12-28 18:25:33 +00:00
|
|
|
AC_PROG_CC
|
|
|
|
AC_PROG_CPP
|
|
|
|
AC_PROG_CXX
|
|
|
|
AC_PROG_INSTALL
|
|
|
|
AC_PROG_LIBTOOL
|
|
|
|
AC_PROG_MAKE_SET
|
|
|
|
AC_PROG_YACC
|
|
|
|
AC_PROG_LEX
|
|
|
|
AM_PROG_LEX
|
2008-02-11 23:24:47 +00:00
|
|
|
AC_PROG_LN_S
|
|
|
|
AC_PROG_MKDIR_P
|
2007-12-28 18:25:33 +00:00
|
|
|
|
|
|
|
AC_LANG([C++])
|
|
|
|
|
2010-08-31 16:51:21 +00:00
|
|
|
AX_THRIFT_LIB(cpp, [C++], yes)
|
|
|
|
have_cpp=no
|
|
|
|
if test "$with_cpp" = "yes"; then
|
2010-08-31 16:51:28 +00:00
|
|
|
AX_BOOST_BASE([1.33.1])
|
|
|
|
if test "x$succeeded" == "xyes" ; then
|
|
|
|
have_cpp="yes"
|
|
|
|
fi
|
2010-08-31 16:51:21 +00:00
|
|
|
|
|
|
|
AX_LIB_EVENT([1.0])
|
|
|
|
have_libevent=$success
|
|
|
|
|
|
|
|
AX_LIB_ZLIB([1.2.3])
|
|
|
|
have_zlib=$success
|
|
|
|
fi
|
|
|
|
AM_CONDITIONAL([WITH_CPP], [test "$have_cpp" = "yes"])
|
|
|
|
AM_CONDITIONAL([AMX_HAVE_LIBEVENT], [test "$have_libevent" = "yes"])
|
|
|
|
AM_CONDITIONAL([AMX_HAVE_ZLIB], [test "$have_zlib" = "yes"])
|
2007-12-28 18:25:33 +00:00
|
|
|
|
2010-10-27 12:30:11 +00:00
|
|
|
AX_THRIFT_LIB(c_glib, [C (GLib)], no)
|
|
|
|
if test "$with_c_glib" = "yes"; then
|
|
|
|
PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.0], have_glib2=yes, have_glib2=no)
|
|
|
|
PKG_CHECK_MODULES([GOBJECT], [gobject-2.0 >= 2.0], have_gobject2=yes, have_gobject2=no)
|
|
|
|
if test "$have_glib2" = "yes" -a "$have_gobject2" = "yes" ; then
|
|
|
|
have_c_glib="yes"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
AM_CONDITIONAL(WITH_C_GLIB, [test "$have_glib2" = "yes" -a "$have_gobject2" = "yes"])
|
|
|
|
|
2008-03-02 07:00:26 +00:00
|
|
|
AX_THRIFT_LIB(csharp, [C#], yes)
|
|
|
|
if test "$with_csharp" = "yes"; then
|
2009-02-13 03:09:52 +00:00
|
|
|
PKG_CHECK_MODULES(MONO, mono >= 2.0.0, net_3_5=yes, net_3_5=no)
|
|
|
|
PKG_CHECK_MODULES(MONO, mono >= 1.2.4, have_mono=yes, have_mono=no)
|
2010-08-31 16:51:20 +00:00
|
|
|
if test "$have_mono" = "yes" ; then
|
|
|
|
have_csharp="yes"
|
|
|
|
fi
|
2008-03-02 07:00:26 +00:00
|
|
|
fi
|
2010-08-31 16:51:20 +00:00
|
|
|
AM_CONDITIONAL(WITH_MONO, [test "$have_csharp" = "yes"])
|
2009-02-13 03:09:52 +00:00
|
|
|
AM_CONDITIONAL(NET_2_0, [test "$net_3_5" = "no"])
|
2008-02-06 22:10:12 +00:00
|
|
|
|
2008-03-02 07:00:22 +00:00
|
|
|
AX_THRIFT_LIB(java, [Java], yes)
|
|
|
|
if test "$with_java" = "yes"; then
|
2009-03-13 21:25:29 +00:00
|
|
|
AX_JAVAC_AND_JAVA
|
2010-08-12 00:27:14 +00:00
|
|
|
AC_PATH_PROG([ANT], [ant])
|
2009-08-14 20:04:15 +00:00
|
|
|
AX_CHECK_JAVA_CLASS(org.slf4j.Logger)
|
|
|
|
have_slf4j="$success"
|
|
|
|
AX_CHECK_JAVA_CLASS(org.slf4j.impl.SimpleLogger)
|
|
|
|
have_slf4j_simple="$success"
|
2009-05-22 19:50:29 +00:00
|
|
|
AX_CHECK_JAVA_CLASS(org.apache.commons.lang.builder.HashCodeBuilder)
|
|
|
|
have_hashcode="$success"
|
2009-08-14 20:04:15 +00:00
|
|
|
if test "x$have_slf4j_simple" = "xyes" && test "x$have_slf4j" = "xyes" && test "x$have_hashcode" = "xyes" ; then
|
2009-05-12 23:16:55 +00:00
|
|
|
ANT_FLAGS="$ANT_FLAGS -Dnoivy="
|
|
|
|
fi
|
2009-05-22 19:50:33 +00:00
|
|
|
AC_SUBST(CLASSPATH)
|
2009-05-12 23:16:55 +00:00
|
|
|
AC_SUBST(ANT_FLAGS)
|
2010-08-31 16:51:20 +00:00
|
|
|
if test "x$JAVAC" != "x" && test "x$JAVAC" != "x" && test "x$ANT" != "x" ; then
|
|
|
|
have_java="yes"
|
|
|
|
fi
|
2008-03-02 07:00:22 +00:00
|
|
|
fi
|
2010-08-31 16:51:20 +00:00
|
|
|
AM_CONDITIONAL([WITH_JAVA], [test "$have_java" = "yes"])
|
2008-02-06 22:10:12 +00:00
|
|
|
|
2008-03-04 07:09:12 +00:00
|
|
|
AX_THRIFT_LIB(erlang, [Erlang], yes)
|
|
|
|
if test "$with_erlang" = "yes"; then
|
2010-05-18 16:52:48 +00:00
|
|
|
AC_ERLANG_PATH_ERL
|
|
|
|
AC_ERLANG_PATH_ERLC
|
2010-08-24 20:45:24 +00:00
|
|
|
if test -n "$ERLC" ; then
|
|
|
|
AC_ERLANG_SUBST_LIB_DIR
|
|
|
|
# Install into the detected Erlang directory instead of $libdir/erlang/lib
|
|
|
|
ERLANG_INSTALL_LIB_DIR="$ERLANG_LIB_DIR"
|
|
|
|
AC_ERLANG_SUBST_INSTALL_LIB_SUBDIR(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
|
|
|
|
fi
|
2010-08-31 16:51:20 +00:00
|
|
|
if test -n "$ERL" -a -n "$ERLC" ; then
|
|
|
|
have_erlang="yes"
|
|
|
|
fi
|
2008-03-04 07:09:12 +00:00
|
|
|
fi
|
2010-08-31 16:51:20 +00:00
|
|
|
AM_CONDITIONAL(WITH_ERLANG, [test "$have_erlang" = "yes"])
|
2008-03-04 07:09:12 +00:00
|
|
|
|
2010-08-31 16:51:20 +00:00
|
|
|
AX_THRIFT_LIB(python, [Python], yes)
|
|
|
|
if test "$with_python" = "yes"; then
|
2008-06-11 01:16:37 +00:00
|
|
|
AM_PATH_PYTHON(2.4,, :)
|
2010-08-31 16:51:20 +00:00
|
|
|
if test "x$PYTHON" != "x" && test "x$PYTHON" != "x:" ; then
|
|
|
|
have_python="yes"
|
|
|
|
fi
|
2008-06-11 01:16:37 +00:00
|
|
|
fi
|
2010-08-31 16:51:20 +00:00
|
|
|
AM_CONDITIONAL(WITH_PYTHON, [test "$have_python" = "yes"])
|
2008-06-11 01:16:37 +00:00
|
|
|
|
2010-10-08 17:46:06 +00:00
|
|
|
AC_PATH_PROG([TRIAL], [trial])
|
|
|
|
|
2009-02-01 04:47:30 +00:00
|
|
|
AX_THRIFT_LIB(perl, [Perl], yes)
|
|
|
|
if test "$with_perl" = "yes"; then
|
|
|
|
AC_PATH_PROG([PERL], [perl])
|
2010-08-31 16:51:22 +00:00
|
|
|
if test -n "$PERL" ; then
|
|
|
|
AC_PROG_PERL_MODULES([Bit::Vector], success="yes", success="no")
|
|
|
|
have_perl_bit_vector="$success"
|
2010-08-19 05:23:59 +00:00
|
|
|
fi
|
2010-08-31 16:51:22 +00:00
|
|
|
if test -n "$PERL" -a "$have_perl_bit_vector" = "yes" ; then
|
2010-08-31 16:51:20 +00:00
|
|
|
have_perl="yes"
|
|
|
|
fi
|
2009-02-01 04:47:30 +00:00
|
|
|
fi
|
2010-08-31 16:51:20 +00:00
|
|
|
AM_CONDITIONAL(WITH_PERL, [test "$have_perl" = "yes"])
|
2009-02-01 04:47:30 +00:00
|
|
|
|
2010-05-02 22:39:31 +00:00
|
|
|
AX_THRIFT_LIB(php, [PHP], yes)
|
|
|
|
if test "$with_php" = "yes"; then
|
|
|
|
AC_PATH_PROG([PHP], [php])
|
2010-08-31 16:51:20 +00:00
|
|
|
if test -n "$PHP" ; then
|
|
|
|
have_php="yes"
|
|
|
|
fi
|
2010-05-02 22:39:31 +00:00
|
|
|
fi
|
2010-08-31 16:51:20 +00:00
|
|
|
AM_CONDITIONAL(WITH_PHP, [test "$have_php" = "yes"])
|
2010-05-02 22:39:31 +00:00
|
|
|
|
2010-08-25 17:09:02 +00:00
|
|
|
AX_THRIFT_LIB(php_extension, [PHP_EXTENSION], yes)
|
|
|
|
if test "$with_php_extension" = "yes"; then
|
|
|
|
AC_PATH_PROG([PHP_CONFIG], [php-config])
|
2010-10-05 16:45:50 +00:00
|
|
|
if test -n "$PHP_CONFIG" ; then
|
|
|
|
AC_CONFIG_SUBDIRS([lib/php/src/ext/thrift_protocol])
|
|
|
|
have_php_extension="yes"
|
|
|
|
fi
|
2010-08-25 17:09:02 +00:00
|
|
|
fi
|
2010-10-05 16:45:50 +00:00
|
|
|
AM_CONDITIONAL(WITH_PHP_EXTENSION, [test "$have_php_extension" = "yes"])
|
2010-08-25 17:09:02 +00:00
|
|
|
|
2008-07-08 00:47:49 +00:00
|
|
|
AX_THRIFT_LIB(ruby, [Ruby], yes)
|
2010-08-31 16:51:20 +00:00
|
|
|
have_ruby=no
|
2008-07-08 00:47:49 +00:00
|
|
|
if test "$with_ruby" = "yes"; then
|
|
|
|
AC_PATH_PROG([RUBY], [ruby])
|
2009-04-07 16:31:04 +00:00
|
|
|
AC_PATH_PROG([RSPEC], [spec])
|
2010-08-31 16:51:20 +00:00
|
|
|
if test "x$RUBY" != "x" ; then
|
|
|
|
have_ruby="yes"
|
|
|
|
fi
|
2008-07-08 00:47:49 +00:00
|
|
|
fi
|
2010-08-31 16:51:20 +00:00
|
|
|
AM_CONDITIONAL(WITH_RUBY, [test "$have_ruby" = "yes"])
|
|
|
|
AM_CONDITIONAL(HAVE_RSPEC, [test "x$RSPEC" != "x"])
|
2009-04-07 16:31:04 +00:00
|
|
|
|
2010-09-27 17:22:17 +00:00
|
|
|
AX_THRIFT_LIB(haskell, [Haskell], yes)
|
|
|
|
have_haskell=no
|
|
|
|
RUNHASKELL=true
|
2010-10-06 00:12:33 +00:00
|
|
|
CABAL=true
|
2010-09-27 17:22:17 +00:00
|
|
|
if test "$with_haskell" = "yes"; then
|
2010-10-06 00:12:33 +00:00
|
|
|
AC_PATH_PROG([CABAL], [cabal])
|
2010-09-27 17:22:17 +00:00
|
|
|
AC_PATH_PROG([RUNHASKELL], [runhaskell])
|
2010-10-06 00:12:33 +00:00
|
|
|
if test "x$CABAL" != "x" -a "x$RUNHASKELL" != "x"; then
|
2010-09-27 17:22:17 +00:00
|
|
|
have_haskell="yes"
|
|
|
|
else
|
|
|
|
RUNHASKELL=true
|
2010-10-06 00:12:33 +00:00
|
|
|
CABAL=true
|
2010-09-27 17:22:17 +00:00
|
|
|
fi
|
|
|
|
fi
|
2010-10-06 00:12:33 +00:00
|
|
|
AC_SUBST(CABAL)
|
2010-09-27 17:22:17 +00:00
|
|
|
AC_SUBST(RUNHASKELL)
|
|
|
|
AM_CONDITIONAL(WITH_HASKELL, [test "$have_haskell" = "yes"])
|
2008-07-08 00:47:49 +00:00
|
|
|
|
2007-12-28 18:25:33 +00:00
|
|
|
AC_C_CONST
|
|
|
|
AC_C_INLINE
|
|
|
|
AC_C_VOLATILE
|
|
|
|
|
|
|
|
AC_HEADER_STDBOOL
|
|
|
|
AC_HEADER_STDC
|
|
|
|
AC_HEADER_TIME
|
|
|
|
AC_CHECK_HEADERS([arpa/inet.h])
|
2010-08-17 17:43:58 +00:00
|
|
|
AC_CHECK_HEADERS([sys/param.h])
|
2007-12-28 18:25:33 +00:00
|
|
|
AC_CHECK_HEADERS([fcntl.h])
|
|
|
|
AC_CHECK_HEADERS([inttypes.h])
|
2008-02-11 23:24:47 +00:00
|
|
|
AC_CHECK_HEADERS([limits.h])
|
2007-12-28 18:25:33 +00:00
|
|
|
AC_CHECK_HEADERS([netdb.h])
|
|
|
|
AC_CHECK_HEADERS([netinet/in.h])
|
|
|
|
AC_CHECK_HEADERS([pthread.h])
|
|
|
|
AC_CHECK_HEADERS([stddef.h])
|
2008-02-19 22:47:29 +00:00
|
|
|
AC_CHECK_HEADERS([stdlib.h])
|
2007-12-28 18:25:33 +00:00
|
|
|
AC_CHECK_HEADERS([sys/socket.h])
|
|
|
|
AC_CHECK_HEADERS([sys/time.h])
|
|
|
|
AC_CHECK_HEADERS([unistd.h])
|
|
|
|
AC_CHECK_HEADERS([libintl.h])
|
|
|
|
AC_CHECK_HEADERS([malloc.h])
|
|
|
|
|
|
|
|
AC_CHECK_LIB(pthread, pthread_create)
|
2009-05-21 02:28:19 +00:00
|
|
|
dnl NOTE(dreiss): I haven't been able to find any really solid docs
|
|
|
|
dnl on what librt is and how it fits into various Unix systems.
|
|
|
|
dnl My best guess is that it is where glibc stashes its implementation
|
|
|
|
dnl of the POSIX Real-Time Extensions. This seems necessary on Linux,
|
|
|
|
dnl and we haven't yet found a system where this is a problem.
|
|
|
|
AC_CHECK_LIB(rt, clock_gettime)
|
2009-10-21 05:51:28 +00:00
|
|
|
AC_CHECK_LIB(socket, setsockopt)
|
2007-12-28 18:25:33 +00:00
|
|
|
|
|
|
|
AC_TYPE_INT16_T
|
|
|
|
AC_TYPE_INT32_T
|
|
|
|
AC_TYPE_INT64_T
|
|
|
|
AC_TYPE_INT8_T
|
|
|
|
AC_TYPE_MODE_T
|
|
|
|
AC_TYPE_OFF_T
|
|
|
|
AC_TYPE_SIZE_T
|
2008-04-21 18:07:43 +00:00
|
|
|
AC_TYPE_SSIZE_T
|
2007-12-28 18:25:33 +00:00
|
|
|
AC_TYPE_UINT16_T
|
|
|
|
AC_TYPE_UINT32_T
|
|
|
|
AC_TYPE_UINT64_T
|
|
|
|
AC_TYPE_UINT8_T
|
2008-05-09 07:17:34 +00:00
|
|
|
AC_CHECK_TYPES([ptrdiff_t], [], [exit 1])
|
2007-12-28 18:25:33 +00:00
|
|
|
|
2008-02-11 23:24:47 +00:00
|
|
|
AC_STRUCT_TM
|
|
|
|
|
2009-05-21 02:28:16 +00:00
|
|
|
dnl NOTE(dreiss): AI_ADDRCONFIG is not defined on OpenBSD.
|
|
|
|
AC_CHECK_DECL([AI_ADDRCONFIG], [],
|
|
|
|
[AC_DEFINE([AI_ADDRCONFIG], 0,
|
|
|
|
[Define if the AI_ADDRCONFIG symbol is unavailable])],
|
|
|
|
[
|
|
|
|
#include <sys/types.h>
|
|
|
|
#include <sys/socket.h>
|
|
|
|
#include <netdb.h>
|
|
|
|
])
|
|
|
|
|
2007-12-28 18:25:33 +00:00
|
|
|
AC_FUNC_ALLOCA
|
2010-10-27 12:30:11 +00:00
|
|
|
AC_FUNC_FORK
|
2007-12-28 18:25:33 +00:00
|
|
|
AC_FUNC_MALLOC
|
2008-02-11 23:24:47 +00:00
|
|
|
AC_FUNC_MEMCMP
|
2007-12-28 18:25:33 +00:00
|
|
|
AC_FUNC_REALLOC
|
|
|
|
AC_FUNC_SELECT_ARGTYPES
|
|
|
|
AC_FUNC_STAT
|
|
|
|
AC_FUNC_STRERROR_R
|
2008-02-11 23:24:47 +00:00
|
|
|
AC_FUNC_STRFTIME
|
2007-12-28 18:25:33 +00:00
|
|
|
AC_FUNC_VPRINTF
|
|
|
|
AC_CHECK_FUNCS([strtoul])
|
|
|
|
AC_CHECK_FUNCS([bzero])
|
2008-02-11 23:24:47 +00:00
|
|
|
AC_CHECK_FUNCS([ftruncate])
|
2007-12-28 18:25:33 +00:00
|
|
|
AC_CHECK_FUNCS([gethostbyname])
|
|
|
|
AC_CHECK_FUNCS([gettimeofday])
|
|
|
|
AC_CHECK_FUNCS([memmove])
|
|
|
|
AC_CHECK_FUNCS([memset])
|
|
|
|
AC_CHECK_FUNCS([mkdir])
|
|
|
|
AC_CHECK_FUNCS([realpath])
|
|
|
|
AC_CHECK_FUNCS([select])
|
|
|
|
AC_CHECK_FUNCS([socket])
|
|
|
|
AC_CHECK_FUNCS([strchr])
|
|
|
|
AC_CHECK_FUNCS([strdup])
|
2008-02-11 23:24:47 +00:00
|
|
|
AC_CHECK_FUNCS([strerror])
|
2007-12-28 18:25:33 +00:00
|
|
|
AC_CHECK_FUNCS([strstr])
|
|
|
|
AC_CHECK_FUNCS([strtol])
|
|
|
|
AC_CHECK_FUNCS([sqrt])
|
2009-05-21 02:28:19 +00:00
|
|
|
dnl The following functions are optional.
|
2010-10-27 12:30:11 +00:00
|
|
|
AC_CHECK_FUNCS([alarm])
|
2009-05-21 02:28:19 +00:00
|
|
|
AC_CHECK_FUNCS([clock_gettime])
|
|
|
|
AC_CHECK_FUNCS([sched_get_priority_min])
|
|
|
|
AC_CHECK_FUNCS([sched_get_priority_max])
|
2007-12-28 18:25:33 +00:00
|
|
|
|
2010-08-31 16:51:31 +00:00
|
|
|
if test "$cross_compiling" = "no" ; then
|
|
|
|
AX_SIGNED_RIGHT_SHIFT
|
|
|
|
fi
|
2009-04-02 21:37:17 +00:00
|
|
|
|
2010-10-06 17:09:37 +00:00
|
|
|
dnl autoscan thinks we need this macro because we have a member function
|
|
|
|
dnl called "error". Invoke the macro but don't run the check so autoscan
|
|
|
|
dnl thinks we are in the clear. It's highly unlikely that we will ever
|
|
|
|
dnl actually use the function that this checks for.
|
|
|
|
if false ; then
|
|
|
|
AC_FUNC_ERROR_AT_LINE
|
|
|
|
fi
|
|
|
|
|
2008-02-27 01:55:33 +00:00
|
|
|
AX_THRIFT_GEN(cpp, [C++], yes)
|
|
|
|
AM_CONDITIONAL([THRIFT_GEN_cpp], [test "$ax_thrift_gen_cpp" = "yes"])
|
2010-10-27 12:30:11 +00:00
|
|
|
AX_THRIFT_GEN(c_glib, [C (GLib)], yes)
|
|
|
|
AM_CONDITIONAL([THRIFT_GEN_c_glib], [test "$ax_thrift_gen_c_glib" = "yes"])
|
2008-02-27 02:39:25 +00:00
|
|
|
AX_THRIFT_GEN(java, [Java], yes)
|
|
|
|
AM_CONDITIONAL([THRIFT_GEN_java], [test "$ax_thrift_gen_java" = "yes"])
|
2010-04-22 21:17:39 +00:00
|
|
|
AX_THRIFT_GEN(as3, [AS3], yes)
|
|
|
|
AM_CONDITIONAL([THRIFT_GEN_as3], [test "$ax_thrift_gen_as3" = "yes"])
|
2008-03-27 21:41:31 +00:00
|
|
|
AX_THRIFT_GEN(csharp, [C#], yes)
|
|
|
|
AM_CONDITIONAL([THRIFT_GEN_csharp], [test "$ax_thrift_gen_csharp" = "yes"])
|
2008-03-27 21:41:49 +00:00
|
|
|
AX_THRIFT_GEN(py, [Python], yes)
|
|
|
|
AM_CONDITIONAL([THRIFT_GEN_py], [test "$ax_thrift_gen_py" = "yes"])
|
2008-03-27 21:42:11 +00:00
|
|
|
AX_THRIFT_GEN(rb, [Ruby], yes)
|
|
|
|
AM_CONDITIONAL([THRIFT_GEN_rb], [test "$ax_thrift_gen_rb" = "yes"])
|
2008-03-27 21:42:34 +00:00
|
|
|
AX_THRIFT_GEN(perl, [Perl], yes)
|
|
|
|
AM_CONDITIONAL([THRIFT_GEN_perl], [test "$ax_thrift_gen_perl" = "yes"])
|
2009-02-17 20:28:30 +00:00
|
|
|
AX_THRIFT_GEN(php, [PHP], yes)
|
|
|
|
AM_CONDITIONAL([THRIFT_GEN_php], [test "$ax_thrift_gen_php" = "yes"])
|
2009-02-17 20:28:01 +00:00
|
|
|
AX_THRIFT_GEN(erl, [Erlang], yes)
|
|
|
|
AM_CONDITIONAL([THRIFT_GEN_erl], [test "$ax_thrift_gen_erl" = "yes"])
|
2008-03-27 21:41:02 +00:00
|
|
|
AX_THRIFT_GEN(cocoa, [Cocoa], yes)
|
|
|
|
AM_CONDITIONAL([THRIFT_GEN_cocoa], [test "$ax_thrift_gen_cocoa" = "yes"])
|
2008-03-27 21:40:42 +00:00
|
|
|
AX_THRIFT_GEN(st, [Smalltalk], yes)
|
|
|
|
AM_CONDITIONAL([THRIFT_GEN_st], [test "$ax_thrift_gen_st" = "yes"])
|
2008-03-27 21:40:11 +00:00
|
|
|
AX_THRIFT_GEN(ocaml, [OCaml], yes)
|
|
|
|
AM_CONDITIONAL([THRIFT_GEN_ocaml], [test "$ax_thrift_gen_ocaml" = "yes"])
|
2008-03-27 21:40:26 +00:00
|
|
|
AX_THRIFT_GEN(hs, [Haskell], yes)
|
|
|
|
AM_CONDITIONAL([THRIFT_GEN_hs], [test "$ax_thrift_gen_hs" = "yes"])
|
2009-02-17 20:28:13 +00:00
|
|
|
AX_THRIFT_GEN(xsd, [XSD], yes)
|
|
|
|
AM_CONDITIONAL([THRIFT_GEN_xsd], [test "$ax_thrift_gen_xsd" = "yes"])
|
2008-10-21 00:09:23 +00:00
|
|
|
AX_THRIFT_GEN(html, [HTML], yes)
|
|
|
|
AM_CONDITIONAL([THRIFT_GEN_html], [test "$ax_thrift_gen_html" = "yes"])
|
2010-02-15 03:24:55 +00:00
|
|
|
AX_THRIFT_GEN(js, [JavaScript], yes)
|
|
|
|
AM_CONDITIONAL([THRIFT_GEN_js], [test "$ax_thrift_gen_js" = "yes"])
|
2010-09-20 17:49:09 +00:00
|
|
|
AX_THRIFT_GEN(javame, [JavaME], yes)
|
|
|
|
AM_CONDITIONAL([THRIFT_GEN_javame], [test "$ax_thrift_gen_javame" = "yes"])
|
2008-02-27 01:55:33 +00:00
|
|
|
|
2010-10-27 12:30:11 +00:00
|
|
|
# --- Coverage hooks ---
|
|
|
|
|
|
|
|
AC_ARG_ENABLE(coverage,
|
|
|
|
[ --enable-coverage turn on -fprofile-arcs -ftest-coverage],
|
|
|
|
[case "${enableval}" in
|
|
|
|
yes) ENABLE_COVERAGE=1 ;;
|
|
|
|
no) ENABLE_COVERAGE=0 ;;
|
|
|
|
*) AC_MSG_ERROR(bad value ${enableval} for --enable-cov) ;;
|
|
|
|
esac],
|
|
|
|
[ENABLE_COVERAGE=2])
|
|
|
|
|
|
|
|
if test "x[$]ENABLE_COVERAGE" = "x1"; then
|
|
|
|
AC_MSG_WARN(enable coverage)
|
|
|
|
GCOV_CFLAGS="`echo \"[$]CFLAGS\" | perl -pe 's/-O\d+//g;'` -fprofile-arcs -ftest-coverage"
|
|
|
|
GCOV_CXXFLAGS="`echo \"[$]CXXFLAGS\" | perl -pe 's/-O\d+//g;'` -fprofile-arcs -ftest-coverage"
|
|
|
|
GCOV_LDFLAGS="-XCClinker -fprofile-arcs -XCClinker -ftest-coverage"
|
|
|
|
fi
|
|
|
|
|
|
|
|
AC_SUBST(ENABLE_COVERAGE)
|
|
|
|
AC_SUBST(GCOV_CFLAGS)
|
|
|
|
AC_SUBST(GCOV_CXXFLAGS)
|
|
|
|
AC_SUBST(GCOV_LDFLAGS)
|
|
|
|
|
2007-12-28 18:25:33 +00:00
|
|
|
AC_CONFIG_HEADERS(config.h:config.hin)
|
|
|
|
|
|
|
|
AC_CONFIG_FILES([
|
|
|
|
Makefile
|
|
|
|
compiler/cpp/Makefile
|
2010-05-03 21:33:00 +00:00
|
|
|
compiler/cpp/version.h
|
2007-12-28 18:25:33 +00:00
|
|
|
lib/Makefile
|
|
|
|
lib/cpp/Makefile
|
2010-08-31 16:51:19 +00:00
|
|
|
lib/cpp/test/Makefile
|
2007-12-28 18:25:33 +00:00
|
|
|
lib/cpp/thrift-nb.pc
|
|
|
|
lib/cpp/thrift-z.pc
|
2010-10-06 00:12:33 +00:00
|
|
|
lib/cpp/thrift.pc
|
2010-10-27 12:30:11 +00:00
|
|
|
lib/c_glib/Makefile
|
|
|
|
lib/c_glib/thrift_c_glib.pc
|
|
|
|
lib/c_glib/test/Makefile
|
2008-02-06 22:10:12 +00:00
|
|
|
lib/csharp/Makefile
|
2010-05-02 22:54:22 +00:00
|
|
|
lib/erl/Makefile
|
2010-09-07 03:35:30 +00:00
|
|
|
lib/erl/src/Makefile
|
2010-09-27 17:22:17 +00:00
|
|
|
lib/hs/Makefile
|
2008-02-23 22:07:39 +00:00
|
|
|
lib/java/Makefile
|
2009-02-01 04:47:30 +00:00
|
|
|
lib/perl/Makefile
|
|
|
|
lib/perl/test/Makefile
|
2010-05-02 22:39:31 +00:00
|
|
|
lib/php/Makefile
|
2007-12-28 18:25:33 +00:00
|
|
|
lib/py/Makefile
|
2008-07-08 00:47:49 +00:00
|
|
|
lib/rb/Makefile
|
2008-02-04 21:14:14 +00:00
|
|
|
test/Makefile
|
2010-10-06 00:12:33 +00:00
|
|
|
test/hs/Makefile
|
2008-02-15 01:10:23 +00:00
|
|
|
test/py/Makefile
|
2010-10-08 17:46:06 +00:00
|
|
|
test/py.twisted/Makefile
|
2008-07-08 00:47:49 +00:00
|
|
|
test/rb/Makefile
|
2007-12-28 18:25:33 +00:00
|
|
|
])
|
2006-08-23 22:03:34 +00:00
|
|
|
|
|
|
|
AC_OUTPUT
|
2010-08-31 16:51:20 +00:00
|
|
|
|
|
|
|
|
|
|
|
echo
|
|
|
|
echo "$PACKAGE $VERSION"
|
|
|
|
echo
|
|
|
|
echo "Building code generators ..... :$thrift_generators"
|
|
|
|
echo
|
2010-08-31 16:51:21 +00:00
|
|
|
echo "Building C++ Library ......... : $have_cpp"
|
2010-10-27 12:30:11 +00:00
|
|
|
echo "Building C (GLib) Library .... : $have_c_glib"
|
2010-08-31 16:51:20 +00:00
|
|
|
echo "Building Java Library ........ : $have_java"
|
|
|
|
echo "Building C# Library .......... : $have_csharp"
|
|
|
|
echo "Building Python Library ...... : $have_python"
|
|
|
|
echo "Building Ruby Library ........ : $have_ruby"
|
2010-09-27 17:22:17 +00:00
|
|
|
echo "Building Haskell Library ..... : $have_haskell"
|
2010-08-31 16:51:20 +00:00
|
|
|
echo "Building Perl Library ........ : $have_perl"
|
|
|
|
echo "Building PHP Library ......... : $have_php"
|
|
|
|
echo "Building Erlang Library ...... : $have_erlang"
|
|
|
|
if test "$have_cpp" = "yes" ; then
|
|
|
|
echo
|
|
|
|
echo "Building TZlibTransport ...... : $have_zlib"
|
|
|
|
echo "Building TNonblockingServer .. : $have_libevent"
|
|
|
|
fi
|
|
|
|
if test "$have_java" = "yes" ; then
|
|
|
|
echo
|
|
|
|
echo "Using javac .................. : $JAVAC"
|
|
|
|
echo "Using java ................... : $JAVA"
|
|
|
|
echo "Using ant .................... : $ANT"
|
|
|
|
fi
|
|
|
|
if test "$have_csharp" = "yes" ; then
|
|
|
|
echo
|
|
|
|
echo "Using .NET 3.5 ............... : $net_3_5"
|
|
|
|
fi
|
|
|
|
if test "$have_python" = "yes" ; then
|
|
|
|
echo
|
|
|
|
echo "Using Python ................. : $PYTHON"
|
|
|
|
fi
|
2010-10-05 16:45:50 +00:00
|
|
|
if test "$have_php" = "yes" ; then
|
|
|
|
echo
|
|
|
|
echo "Using php-config ............. : $PHP_CONFIG"
|
|
|
|
fi
|
2010-08-31 16:51:20 +00:00
|
|
|
if test "$have_ruby" = "yes" ; then
|
|
|
|
echo
|
|
|
|
echo "Using Ruby ................... : $RUBY"
|
|
|
|
echo "Using rspec .................. : $RSPEC"
|
|
|
|
fi
|
2010-09-27 17:22:17 +00:00
|
|
|
if test "$have_haskell" = "yes" ; then
|
|
|
|
echo
|
|
|
|
echo "Using Haskell ................ : $RUNHASKELL"
|
2010-10-06 00:12:33 +00:00
|
|
|
echo "Using Cabal .................. : $CABAL"
|
2010-09-27 17:22:17 +00:00
|
|
|
fi
|
2010-08-31 16:51:20 +00:00
|
|
|
if test "$have_perl" = "yes" ; then
|
|
|
|
echo
|
|
|
|
echo "Using Perl ................... : $PERL"
|
|
|
|
fi
|
|
|
|
if test "$have_erlang" = "yes" ; then
|
|
|
|
echo
|
|
|
|
echo "Using erlc ................... : $ERLC"
|
|
|
|
fi
|
|
|
|
echo
|
|
|
|
echo "If something is missing that you think should be present,"
|
|
|
|
echo "please skim the output of configure to find the missing"
|
|
|
|
echo "component. Details are present in config.log."
|