2006-08-23 22:03:34 +00:00
|
|
|
AC_PREREQ(2.59)
|
|
|
|
|
2007-09-18 19:46:00 +00:00
|
|
|
AC_INIT([thrift], [20070917])
|
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
|
|
|
|
2007-12-28 18:25:33 +00:00
|
|
|
AM_PATH_PYTHON(2.4,, :)
|
2006-08-23 22:03:34 +00:00
|
|
|
|
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++])
|
|
|
|
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"])
|
|
|
|
|
2008-03-02 07:00:26 +00:00
|
|
|
AX_THRIFT_LIB(csharp, [C#], yes)
|
|
|
|
if test "$with_csharp" = "yes"; then
|
|
|
|
PKG_CHECK_MODULES(MONO, mono >= 1.2.6, have_mono=yes, have_mono=no)
|
|
|
|
fi
|
2008-02-06 22:10:12 +00:00
|
|
|
AM_CONDITIONAL(ENABLE_MONO, [test "$have_mono" = "yes"])
|
|
|
|
|
2008-03-02 07:00:22 +00:00
|
|
|
AX_THRIFT_LIB(java, [Java], yes)
|
|
|
|
if test "$with_java" = "yes"; then
|
|
|
|
AC_PATH_PROG([ANT], [ant])
|
|
|
|
AX_PROG_JAVAC
|
|
|
|
AX_PROG_JAVA
|
|
|
|
fi
|
2008-02-23 22:07:39 +00:00
|
|
|
AM_CONDITIONAL([ENABLE_JAVA],
|
|
|
|
[test -n "$ANT" -a -n "$JAVA" -a -n "$JAVAC"])
|
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
|
|
|
|
AC_PATH_PROG([ERLC], [erlc])
|
|
|
|
fi
|
|
|
|
|
|
|
|
AM_CONDITIONAL(ENABLE_ERLANG, [test -n "$ERLC"])
|
|
|
|
|
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])
|
|
|
|
AC_CHECK_HEADERS([endian.h])
|
|
|
|
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)
|
|
|
|
AC_CHECK_LIB(rt, sched_get_priority_min)
|
|
|
|
|
|
|
|
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
|
|
|
|
AC_TYPE_UINT16_T
|
|
|
|
AC_TYPE_UINT32_T
|
|
|
|
AC_TYPE_UINT64_T
|
|
|
|
AC_TYPE_UINT8_T
|
|
|
|
|
2008-02-11 23:24:47 +00:00
|
|
|
AC_STRUCT_TM
|
|
|
|
|
2007-12-28 18:25:33 +00:00
|
|
|
AC_FUNC_ALLOCA
|
|
|
|
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])
|
|
|
|
AC_CHECK_FUNCS([clock_gettime])
|
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])
|
|
|
|
|
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"])
|
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"])
|
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-02-27 01:55:33 +00:00
|
|
|
|
2007-12-28 18:25:33 +00:00
|
|
|
AC_CONFIG_HEADERS(config.h:config.hin)
|
|
|
|
|
|
|
|
AC_CONFIG_FILES([
|
|
|
|
Makefile
|
|
|
|
compiler/cpp/Makefile
|
|
|
|
lib/Makefile
|
|
|
|
lib/cpp/Makefile
|
|
|
|
lib/cpp/thrift.pc
|
|
|
|
lib/cpp/thrift-nb.pc
|
|
|
|
lib/cpp/thrift-z.pc
|
2008-02-06 22:10:12 +00:00
|
|
|
lib/csharp/Makefile
|
2008-02-23 22:07:39 +00:00
|
|
|
lib/java/Makefile
|
2007-12-28 18:25:33 +00:00
|
|
|
lib/py/Makefile
|
|
|
|
if/Makefile
|
2008-02-04 21:14:14 +00:00
|
|
|
test/Makefile
|
2008-02-15 01:10:23 +00:00
|
|
|
test/py/Makefile
|
2008-02-23 22:07:46 +00:00
|
|
|
test/java/Makefile
|
2007-12-28 18:25:33 +00:00
|
|
|
])
|
2006-08-23 22:03:34 +00:00
|
|
|
|
|
|
|
AC_OUTPUT
|