Blame | Last modification | View Log | RSS feed
## 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.#AC_PREREQ(2.59)AC_INIT([thrift], [0.2.0])AC_CONFIG_AUX_DIR([.])AM_INIT_AUTOMAKEAC_ARG_VAR([PY_PREFIX], [Prefix for installing Python modules.(Normal --prefix is ignored for Python becausePython has different conventions.)Default = "/usr"])AS_IF([test "x$PY_PREFIX" = x], [PY_PREFIX="/usr"])AC_ARG_VAR([JAVA_PREFIX], [Prefix for installing the Java lib jar.(Normal --prefix is ignored for Java becauseJava has different conevntions.)Default = "/usr/local/lib"])AS_IF([test "x$JAVA_PREFIX" = x], [JAVA_PREFIX="/usr/local/lib"])AC_PROG_CCAC_PROG_CPPAC_PROG_CXXAC_PROG_INSTALLAC_PROG_LIBTOOLAC_PROG_MAKE_SETAC_PROG_YACCAC_PROG_LEXAM_PROG_LEXAC_PROG_LN_SAC_PROG_MKDIR_PAC_LANG([C++])AX_BOOST_BASE([1.33.1])AX_LIB_EVENT([1.0])AM_CONDITIONAL([AMX_HAVE_LIBEVENT], [test "$success" = "yes"])AX_LIB_ZLIB([1.2.3])AM_CONDITIONAL([AMX_HAVE_ZLIB], [test "$success" = "yes"])AX_THRIFT_LIB(csharp, [C#], yes)if test "$with_csharp" = "yes"; thenPKG_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)fiAM_CONDITIONAL(WITH_MONO, [test "$have_mono" = "yes"])AM_CONDITIONAL(NET_2_0, [test "$net_3_5" = "no"])AX_THRIFT_LIB(java, [Java], yes)if test "$with_java" = "yes"; thenAX_JAVAC_AND_JAVAAC_PATH_PROG([ANT], [ant])AX_CHECK_JAVA_CLASS(org.slf4j.Logger)have_slf4j="$success"AX_CHECK_JAVA_CLASS(org.slf4j.impl.SimpleLogger)have_slf4j_simple="$success"AX_CHECK_JAVA_CLASS(org.apache.commons.lang.builder.HashCodeBuilder)have_hashcode="$success"if test "x$have_slf4j_simple" = "xyes" && test "x$have_slf4j" = "xyes" && test "x$have_hashcode" = "xyes" ; thenANT_FLAGS="$ANT_FLAGS -Dnoivy="fiAC_SUBST(CLASSPATH)AC_SUBST(ANT_FLAGS)fiAM_CONDITIONAL([WITH_JAVA],[test -n "$ANT" -a -n "$JAVA" -a -n "$JAVAC"])AX_THRIFT_LIB(erlang, [Erlang], yes)if test "$with_erlang" = "yes"; thenAC_PATH_PROG([ERLC], [erlc])fiAM_CONDITIONAL(WITH_ERLANG, [test -n "$ERLC"])AX_THRIFT_LIB(py, [Python], yes)if test "$with_py" = "yes"; thenAM_PATH_PYTHON(2.4,, :)fiAM_CONDITIONAL(WITH_PYTHON, [test -n "$PYTHON" -a "$PYTHON" != ":"])AX_THRIFT_LIB(perl, [Perl], yes)if test "$with_perl" = "yes"; thenAC_PATH_PROG([PERL], [perl])fiAM_CONDITIONAL(WITH_PERL, [test -n "$PERL"])AX_THRIFT_LIB(ruby, [Ruby], yes)if test "$with_ruby" = "yes"; thenAC_PATH_PROG([RUBY], [ruby])AC_PATH_PROG([RSPEC], [spec])fiAM_CONDITIONAL(WITH_RUBY, [test -n "$RUBY"])AM_CONDITIONAL(HAVE_RSPEC, [test -n "$RSPEC"])AC_C_CONSTAC_C_INLINEAC_C_VOLATILEAC_HEADER_STDBOOLAC_HEADER_STDCAC_HEADER_TIMEAC_CHECK_HEADERS([arpa/inet.h])AC_CHECK_HEADERS([endian.h])AC_CHECK_HEADERS([fcntl.h])AC_CHECK_HEADERS([inttypes.h])AC_CHECK_HEADERS([limits.h])AC_CHECK_HEADERS([netdb.h])AC_CHECK_HEADERS([netinet/in.h])AC_CHECK_HEADERS([pthread.h])AC_CHECK_HEADERS([stddef.h])AC_CHECK_HEADERS([stdlib.h])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)dnl NOTE(dreiss): I haven't been able to find any really solid docsdnl on what librt is and how it fits into various Unix systems.dnl My best guess is that it is where glibc stashes its implementationdnl 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)AC_CHECK_LIB(socket, setsockopt)AC_TYPE_INT16_TAC_TYPE_INT32_TAC_TYPE_INT64_TAC_TYPE_INT8_TAC_TYPE_MODE_TAC_TYPE_OFF_TAC_TYPE_SIZE_TAC_TYPE_SSIZE_TAC_TYPE_UINT16_TAC_TYPE_UINT32_TAC_TYPE_UINT64_TAC_TYPE_UINT8_TAC_CHECK_TYPES([ptrdiff_t], [], [exit 1])AC_STRUCT_TMdnl 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>])AC_FUNC_ALLOCAAC_FUNC_MALLOCAC_FUNC_MEMCMPAC_FUNC_REALLOCAC_FUNC_SELECT_ARGTYPESAC_FUNC_STATAC_FUNC_STRERROR_RAC_FUNC_STRFTIMEAC_FUNC_VPRINTFAC_CHECK_FUNCS([strtoul])AC_CHECK_FUNCS([bzero])AC_CHECK_FUNCS([ftruncate])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])AC_CHECK_FUNCS([strerror])AC_CHECK_FUNCS([strstr])AC_CHECK_FUNCS([strtol])AC_CHECK_FUNCS([sqrt])dnl The following functions are optional.AC_CHECK_FUNCS([clock_gettime])AC_CHECK_FUNCS([sched_get_priority_min])AC_CHECK_FUNCS([sched_get_priority_max])AX_SIGNED_RIGHT_SHIFTAX_THRIFT_GEN(cpp, [C++], yes)AM_CONDITIONAL([THRIFT_GEN_cpp], [test "$ax_thrift_gen_cpp" = "yes"])AX_THRIFT_GEN(java, [Java], yes)AM_CONDITIONAL([THRIFT_GEN_java], [test "$ax_thrift_gen_java" = "yes"])AX_THRIFT_GEN(csharp, [C#], yes)AM_CONDITIONAL([THRIFT_GEN_csharp], [test "$ax_thrift_gen_csharp" = "yes"])AX_THRIFT_GEN(py, [Python], yes)AM_CONDITIONAL([THRIFT_GEN_py], [test "$ax_thrift_gen_py" = "yes"])AX_THRIFT_GEN(rb, [Ruby], yes)AM_CONDITIONAL([THRIFT_GEN_rb], [test "$ax_thrift_gen_rb" = "yes"])AX_THRIFT_GEN(perl, [Perl], yes)AM_CONDITIONAL([THRIFT_GEN_perl], [test "$ax_thrift_gen_perl" = "yes"])AX_THRIFT_GEN(php, [PHP], yes)AM_CONDITIONAL([THRIFT_GEN_php], [test "$ax_thrift_gen_php" = "yes"])AX_THRIFT_GEN(erl, [Erlang], yes)AM_CONDITIONAL([THRIFT_GEN_erl], [test "$ax_thrift_gen_erl" = "yes"])AX_THRIFT_GEN(cocoa, [Cocoa], yes)AM_CONDITIONAL([THRIFT_GEN_cocoa], [test "$ax_thrift_gen_cocoa" = "yes"])AX_THRIFT_GEN(st, [Smalltalk], yes)AM_CONDITIONAL([THRIFT_GEN_st], [test "$ax_thrift_gen_st" = "yes"])AX_THRIFT_GEN(ocaml, [OCaml], yes)AM_CONDITIONAL([THRIFT_GEN_ocaml], [test "$ax_thrift_gen_ocaml" = "yes"])AX_THRIFT_GEN(hs, [Haskell], yes)AM_CONDITIONAL([THRIFT_GEN_hs], [test "$ax_thrift_gen_hs" = "yes"])AX_THRIFT_GEN(xsd, [XSD], yes)AM_CONDITIONAL([THRIFT_GEN_xsd], [test "$ax_thrift_gen_xsd" = "yes"])AX_THRIFT_GEN(html, [HTML], yes)AM_CONDITIONAL([THRIFT_GEN_html], [test "$ax_thrift_gen_html" = "yes"])AC_CONFIG_HEADERS(config.h:config.hin)AC_CONFIG_FILES([Makefilecompiler/cpp/Makefilelib/Makefilelib/cpp/Makefilelib/cpp/thrift.pclib/cpp/thrift-nb.pclib/cpp/thrift-z.pclib/csharp/Makefilelib/java/Makefilelib/perl/Makefilelib/perl/test/Makefilelib/py/Makefilelib/rb/Makefiletest/Makefiletest/py/Makefiletest/rb/Makefile])AC_OUTPUT