Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 259 lines (229 sloc) 7.77 kb
235bc43 THRIFT-387. Add license to configure.ac
dreiss authored
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
4aabc43 Uber configure.ac/Makefile.am and configure.ac/Makefile.am for lib/php a...
marc authored
20 AC_PREREQ(2.59)
21
4b956bd Version bump to 20080411.
dreiss authored
22 AC_INIT([thrift], [20080411])
4aabc43 Uber configure.ac/Makefile.am and configure.ac/Makefile.am for lib/php a...
marc authored
23
24 AC_CONFIG_AUX_DIR([.])
25
26 AM_INIT_AUTOMAKE
27
1c66284 Thrift: Python installation.
dreiss authored
28 AC_ARG_VAR([PY_PREFIX], [Prefix for installing Python modules.
29 (Normal --prefix is ignored for Python because
30 Python has different conventions.)
31 Default = "/usr"])
5a37122 Fix a typo in configure.ac.
dreiss authored
32 AS_IF([test "x$PY_PREFIX" = x], [PY_PREFIX="/usr"])
1c66284 Thrift: Python installation.
dreiss authored
33
b1098fd [THRIFT-70] Allow the Java install prefix to be configured.
dreiss authored
34 AC_ARG_VAR([JAVA_PREFIX], [Prefix for installing the Java lib jar.
35 (Normal --prefix is ignored for Java because
36 Java has different conevntions.)
37 Default = "/usr/local/lib"])
38 AS_IF([test "x$JAVA_PREFIX" = x], [JAVA_PREFIX="/usr/local/lib"])
1b90162 Thrift: Revamp build to use a single configure.ac.
dreiss authored
39
40 AC_PROG_CC
41 AC_PROG_CPP
42 AC_PROG_CXX
43 AC_PROG_INSTALL
44 AC_PROG_LIBTOOL
45 AC_PROG_MAKE_SET
46 AC_PROG_YACC
47 AC_PROG_LEX
48 AM_PROG_LEX
0f5c77d Thrift: Add some macros to configure.ac.
dreiss authored
49 AC_PROG_LN_S
50 AC_PROG_MKDIR_P
1b90162 Thrift: Revamp build to use a single configure.ac.
dreiss authored
51
52 AC_LANG([C++])
53 AX_BOOST_BASE([1.33.1])
54
55 AX_LIB_EVENT([1.0])
56 AM_CONDITIONAL([AMX_HAVE_LIBEVENT], [test "$success" = "yes"])
57
58 AX_LIB_ZLIB([1.2.3])
59 AM_CONDITIONAL([AMX_HAVE_ZLIB], [test "$success" = "yes"])
60
2f00a7d Allow the C# library to be excluded from the build.
dreiss authored
61 AX_THRIFT_LIB(csharp, [C#], yes)
62 if test "$with_csharp" = "yes"; then
6f76cdd THRIFT-309. Make Thrift's C# mapping .NET 2.0 (Mono 1.2.4) compatible
dreiss authored
63 PKG_CHECK_MODULES(MONO, mono >= 2.0.0, net_3_5=yes, net_3_5=no)
64 PKG_CHECK_MODULES(MONO, mono >= 1.2.4, have_mono=yes, have_mono=no)
2f00a7d Allow the C# library to be excluded from the build.
dreiss authored
65 fi
c02fe80 Rename AM_CONDITIONALs from ENABLE_* to WITH_*.
dreiss authored
66 AM_CONDITIONAL(WITH_MONO, [test "$have_mono" = "yes"])
6f76cdd THRIFT-309. Make Thrift's C# mapping .NET 2.0 (Mono 1.2.4) compatible
dreiss authored
67 AM_CONDITIONAL(NET_2_0, [test "$net_3_5" = "no"])
17b660b Thrift: Add a Makefile to build the C# library with Mono.
dreiss authored
68
781318c Allow the Java library to be excluded from the build.
dreiss authored
69 AX_THRIFT_LIB(java, [Java], yes)
70 if test "$with_java" = "yes"; then
987159d THRIFT-300. A reimplementation of ax_java
dreiss authored
71 AX_JAVAC_AND_JAVA
781318c Allow the Java library to be excluded from the build.
dreiss authored
72 AC_PATH_PROG([ANT], [ant])
598394f THRIFT-558. java: Replace use of log4j by commons-logging in Java libra...
bryanduxbury authored
73 AX_CHECK_JAVA_CLASS(org.slf4j.Logger)
74 have_slf4j="$success"
75 AX_CHECK_JAVA_CLASS(org.slf4j.impl.SimpleLogger)
76 have_slf4j_simple="$success"
f8b9ab9 THRIFT-450. java: Check for Apache Commons Lang also
dreiss authored
77 AX_CHECK_JAVA_CLASS(org.apache.commons.lang.builder.HashCodeBuilder)
78 have_hashcode="$success"
598394f THRIFT-558. java: Replace use of log4j by commons-logging in Java libra...
bryanduxbury authored
79 if test "x$have_slf4j_simple" = "xyes" && test "x$have_slf4j" = "xyes" && test "x$have_hashcode" = "xyes" ; then
8fac5e4 THRIFT-450. Don't use Ivy if log4j is already available
dreiss authored
80 ANT_FLAGS="$ANT_FLAGS -Dnoivy="
81 fi
04b4e61 THRIFT-450. java: Propagate CLASSPATH from ./configure to make and ant
dreiss authored
82 AC_SUBST(CLASSPATH)
8fac5e4 THRIFT-450. Don't use Ivy if log4j is already available
dreiss authored
83 AC_SUBST(ANT_FLAGS)
781318c Allow the Java library to be excluded from the build.
dreiss authored
84 fi
c02fe80 Rename AM_CONDITIONALs from ENABLE_* to WITH_*.
dreiss authored
85 AM_CONDITIONAL([WITH_JAVA],
dff9ab9 Add automake support for building the Java library.
dreiss authored
86 [test -n "$ANT" -a -n "$JAVA" -a -n "$JAVAC"])
17b660b Thrift: Add a Makefile to build the C# library with Mono.
dreiss authored
87
1ad0a4f [thrift] Erlang build tweaks
cpiro authored
88 AX_THRIFT_LIB(erlang, [Erlang], yes)
89 if test "$with_erlang" = "yes"; then
90 AC_PATH_PROG([ERLC], [erlc])
91 fi
c02fe80 Rename AM_CONDITIONALs from ENABLE_* to WITH_*.
dreiss authored
92 AM_CONDITIONAL(WITH_ERLANG, [test -n "$ERLC"])
1ad0a4f [thrift] Erlang build tweaks
cpiro authored
93
d5e55a2 Allow Thrift to be built without the Python library.
dreiss authored
94 AX_THRIFT_LIB(py, [Python], yes)
95 if test "$with_py" = "yes"; then
96 AM_PATH_PYTHON(2.4,, :)
97 fi
c02fe80 Rename AM_CONDITIONALs from ENABLE_* to WITH_*.
dreiss authored
98 AM_CONDITIONAL(WITH_PYTHON, [test -n "$PYTHON" -a "$PYTHON" != ":"])
d5e55a2 Allow Thrift to be built without the Python library.
dreiss authored
99
3af4fc0 THRIFT-199: integrate perl into automake
jake authored
100 AX_THRIFT_LIB(perl, [Perl], yes)
101 if test "$with_perl" = "yes"; then
102 AC_PATH_PROG([PERL], [perl])
103 fi
104 AM_CONDITIONAL(WITH_PERL, [test -n "$PERL"])
105
9d4a144 Merge branch 'fastbinary'
kclark authored
106 AX_THRIFT_LIB(ruby, [Ruby], yes)
107 if test "$with_ruby" = "yes"; then
108 AC_PATH_PROG([RUBY], [ruby])
91aea22 THRIFT-175. Specs in Ruby library should be run during make check
bryanduxbury authored
109 AC_PATH_PROG([RSPEC], [spec])
9d4a144 Merge branch 'fastbinary'
kclark authored
110 fi
43a887d s/ENABLE_RUBY/WITH_RUBY/ for consistency.
dreiss authored
111 AM_CONDITIONAL(WITH_RUBY, [test -n "$RUBY"])
91aea22 THRIFT-175. Specs in Ruby library should be run during make check
bryanduxbury authored
112 AM_CONDITIONAL(HAVE_RSPEC, [test -n "$RSPEC"])
113
9d4a144 Merge branch 'fastbinary'
kclark authored
114
1b90162 Thrift: Revamp build to use a single configure.ac.
dreiss authored
115 AC_C_CONST
116 AC_C_INLINE
117 AC_C_VOLATILE
118
119 AC_HEADER_STDBOOL
120 AC_HEADER_STDC
121 AC_HEADER_TIME
122 AC_CHECK_HEADERS([arpa/inet.h])
123 AC_CHECK_HEADERS([endian.h])
124 AC_CHECK_HEADERS([fcntl.h])
125 AC_CHECK_HEADERS([inttypes.h])
0f5c77d Thrift: Add some macros to configure.ac.
dreiss authored
126 AC_CHECK_HEADERS([limits.h])
1b90162 Thrift: Revamp build to use a single configure.ac.
dreiss authored
127 AC_CHECK_HEADERS([netdb.h])
128 AC_CHECK_HEADERS([netinet/in.h])
129 AC_CHECK_HEADERS([pthread.h])
130 AC_CHECK_HEADERS([stddef.h])
6d2cd87 Thrift: Add "#include <cstdlib>" in a few places and s/malloc/std::mallo...
dreiss authored
131 AC_CHECK_HEADERS([stdlib.h])
1b90162 Thrift: Revamp build to use a single configure.ac.
dreiss authored
132 AC_CHECK_HEADERS([sys/socket.h])
133 AC_CHECK_HEADERS([sys/time.h])
134 AC_CHECK_HEADERS([unistd.h])
135 AC_CHECK_HEADERS([libintl.h])
136 AC_CHECK_HEADERS([malloc.h])
137
138 AC_CHECK_LIB(pthread, pthread_create)
67c0230 cpp: Deal with systems without sched_get_priority_{min,max} (OpenBSD)
dreiss authored
139 dnl NOTE(dreiss): I haven't been able to find any really solid docs
140 dnl on what librt is and how it fits into various Unix systems.
141 dnl My best guess is that it is where glibc stashes its implementation
142 dnl of the POSIX Real-Time Extensions. This seems necessary on Linux,
143 dnl and we haven't yet found a system where this is a problem.
144 AC_CHECK_LIB(rt, clock_gettime)
ca5831b THRIFT-606. cpp: Fix build on Solaris Nevada
dreiss authored
145 AC_CHECK_LIB(socket, setsockopt)
1b90162 Thrift: Revamp build to use a single configure.ac.
dreiss authored
146
147 AC_TYPE_INT16_T
148 AC_TYPE_INT32_T
149 AC_TYPE_INT64_T
150 AC_TYPE_INT8_T
151 AC_TYPE_MODE_T
152 AC_TYPE_OFF_T
153 AC_TYPE_SIZE_T
0195e75 Check for ssize_t in configure.ac.
dreiss authored
154 AC_TYPE_SSIZE_T
1b90162 Thrift: Revamp build to use a single configure.ac.
dreiss authored
155 AC_TYPE_UINT16_T
156 AC_TYPE_UINT32_T
157 AC_TYPE_UINT64_T
158 AC_TYPE_UINT8_T
d4c8abc Check for ptrdiff_t and fail if we don't have it.
dreiss authored
159 AC_CHECK_TYPES([ptrdiff_t], [], [exit 1])
1b90162 Thrift: Revamp build to use a single configure.ac.
dreiss authored
160
0f5c77d Thrift: Add some macros to configure.ac.
dreiss authored
161 AC_STRUCT_TM
162
0764b6b cpp: Deal with systems without AI_ADDRCONFIG (OpenBSD)
dreiss authored
163 dnl NOTE(dreiss): AI_ADDRCONFIG is not defined on OpenBSD.
164 AC_CHECK_DECL([AI_ADDRCONFIG], [],
165 [AC_DEFINE([AI_ADDRCONFIG], 0,
166 [Define if the AI_ADDRCONFIG symbol is unavailable])],
167 [
168 #include <sys/types.h>
169 #include <sys/socket.h>
170 #include <netdb.h>
171 ])
172
1b90162 Thrift: Revamp build to use a single configure.ac.
dreiss authored
173 AC_FUNC_ALLOCA
174 AC_FUNC_MALLOC
0f5c77d Thrift: Add some macros to configure.ac.
dreiss authored
175 AC_FUNC_MEMCMP
1b90162 Thrift: Revamp build to use a single configure.ac.
dreiss authored
176 AC_FUNC_REALLOC
177 AC_FUNC_SELECT_ARGTYPES
178 AC_FUNC_STAT
179 AC_FUNC_STRERROR_R
0f5c77d Thrift: Add some macros to configure.ac.
dreiss authored
180 AC_FUNC_STRFTIME
1b90162 Thrift: Revamp build to use a single configure.ac.
dreiss authored
181 AC_FUNC_VPRINTF
182 AC_CHECK_FUNCS([strtoul])
183 AC_CHECK_FUNCS([bzero])
0f5c77d Thrift: Add some macros to configure.ac.
dreiss authored
184 AC_CHECK_FUNCS([ftruncate])
1b90162 Thrift: Revamp build to use a single configure.ac.
dreiss authored
185 AC_CHECK_FUNCS([gethostbyname])
186 AC_CHECK_FUNCS([gettimeofday])
187 AC_CHECK_FUNCS([memmove])
188 AC_CHECK_FUNCS([memset])
189 AC_CHECK_FUNCS([mkdir])
190 AC_CHECK_FUNCS([realpath])
191 AC_CHECK_FUNCS([select])
192 AC_CHECK_FUNCS([socket])
193 AC_CHECK_FUNCS([strchr])
194 AC_CHECK_FUNCS([strdup])
0f5c77d Thrift: Add some macros to configure.ac.
dreiss authored
195 AC_CHECK_FUNCS([strerror])
1b90162 Thrift: Revamp build to use a single configure.ac.
dreiss authored
196 AC_CHECK_FUNCS([strstr])
197 AC_CHECK_FUNCS([strtol])
198 AC_CHECK_FUNCS([sqrt])
67c0230 cpp: Deal with systems without sched_get_priority_{min,max} (OpenBSD)
dreiss authored
199 dnl The following functions are optional.
200 AC_CHECK_FUNCS([clock_gettime])
201 AC_CHECK_FUNCS([sched_get_priority_min])
202 AC_CHECK_FUNCS([sched_get_priority_max])
1b90162 Thrift: Revamp build to use a single configure.ac.
dreiss authored
203
d604902 THRIFT-333. cpp: Initial TCompactProtocol implementation
dreiss authored
204 AX_SIGNED_RIGHT_SHIFT
205
dc86f12 Allow the Thrift compiler to be built without the C++ generator.
dreiss authored
206 AX_THRIFT_GEN(cpp, [C++], yes)
207 AM_CONDITIONAL([THRIFT_GEN_cpp], [test "$ax_thrift_gen_cpp" = "yes"])
2eb30f3 Allow the Thrift compiler to be built without the Java generator.
dreiss authored
208 AX_THRIFT_GEN(java, [Java], yes)
209 AM_CONDITIONAL([THRIFT_GEN_java], [test "$ax_thrift_gen_java" = "yes"])
cd3b732 Allow the Thrift compiler to be built without the C# generator.
dreiss authored
210 AX_THRIFT_GEN(csharp, [C#], yes)
211 AM_CONDITIONAL([THRIFT_GEN_csharp], [test "$ax_thrift_gen_csharp" = "yes"])
927fe12 Allow the Thrift compiler to be built without the Python generator.
dreiss authored
212 AX_THRIFT_GEN(py, [Python], yes)
213 AM_CONDITIONAL([THRIFT_GEN_py], [test "$ax_thrift_gen_py" = "yes"])
0dbe303 Allow the Thrift compiler to be built without the Ruby generator.
dreiss authored
214 AX_THRIFT_GEN(rb, [Ruby], yes)
215 AM_CONDITIONAL([THRIFT_GEN_rb], [test "$ax_thrift_gen_rb" = "yes"])
3e05598 Allow the Thrift compiler to be built without the Perl generator.
dreiss authored
216 AX_THRIFT_GEN(perl, [Perl], yes)
217 AM_CONDITIONAL([THRIFT_GEN_perl], [test "$ax_thrift_gen_perl" = "yes"])
19120d4 Allow the Thrift compiler to be built without the PHP generator.
dreiss authored
218 AX_THRIFT_GEN(php, [PHP], yes)
219 AM_CONDITIONAL([THRIFT_GEN_php], [test "$ax_thrift_gen_php" = "yes"])
6f482e8 Allow the Thrift compiler to be built without the Erlang generator.
dreiss authored
220 AX_THRIFT_GEN(erl, [Erlang], yes)
221 AM_CONDITIONAL([THRIFT_GEN_erl], [test "$ax_thrift_gen_erl" = "yes"])
2d9dada Allow the Thrift compiler to be built without the Cocoa generator.
dreiss authored
222 AX_THRIFT_GEN(cocoa, [Cocoa], yes)
223 AM_CONDITIONAL([THRIFT_GEN_cocoa], [test "$ax_thrift_gen_cocoa" = "yes"])
a1d58c8 Allow the Thrift compiler to be built without the Smalltalk generator.
dreiss authored
224 AX_THRIFT_GEN(st, [Smalltalk], yes)
225 AM_CONDITIONAL([THRIFT_GEN_st], [test "$ax_thrift_gen_st" = "yes"])
bd4419f Allow the Thrift compiler to be built without the OCaml generator.
dreiss authored
226 AX_THRIFT_GEN(ocaml, [OCaml], yes)
227 AM_CONDITIONAL([THRIFT_GEN_ocaml], [test "$ax_thrift_gen_ocaml" = "yes"])
793569d Allow the Thrift compiler to be built without the Haskell generator.
dreiss authored
228 AX_THRIFT_GEN(hs, [Haskell], yes)
229 AM_CONDITIONAL([THRIFT_GEN_hs], [test "$ax_thrift_gen_hs" = "yes"])
6c8eedc Allow the Thrift compiler to be built without the XSD generator.
dreiss authored
230 AX_THRIFT_GEN(xsd, [XSD], yes)
231 AM_CONDITIONAL([THRIFT_GEN_xsd], [test "$ax_thrift_gen_xsd" = "yes"])
6a6f823 THRIFT-173. Commit the html generator
dreiss authored
232 AX_THRIFT_GEN(html, [HTML], yes)
233 AM_CONDITIONAL([THRIFT_GEN_html], [test "$ax_thrift_gen_html" = "yes"])
8c1ba11 THRIFT-550: Added javascript support
jake authored
234 AX_THRIFT_GEN(js, [JavaScript], yes)
235 AM_CONDITIONAL([THRIFT_GEN_js], [test "$ax_thrift_gen_js" = "yes"])
dc86f12 Allow the Thrift compiler to be built without the C++ generator.
dreiss authored
236
1b90162 Thrift: Revamp build to use a single configure.ac.
dreiss authored
237 AC_CONFIG_HEADERS(config.h:config.hin)
238
239 AC_CONFIG_FILES([
240 Makefile
241 compiler/cpp/Makefile
242 lib/Makefile
243 lib/cpp/Makefile
244 lib/cpp/thrift.pc
245 lib/cpp/thrift-nb.pc
246 lib/cpp/thrift-z.pc
17b660b Thrift: Add a Makefile to build the C# library with Mono.
dreiss authored
247 lib/csharp/Makefile
dff9ab9 Add automake support for building the Java library.
dreiss authored
248 lib/java/Makefile
3af4fc0 THRIFT-199: integrate perl into automake
jake authored
249 lib/perl/Makefile
250 lib/perl/test/Makefile
1b90162 Thrift: Revamp build to use a single configure.ac.
dreiss authored
251 lib/py/Makefile
9d4a144 Merge branch 'fastbinary'
kclark authored
252 lib/rb/Makefile
3f2f6fc Thrift: "make check" support.
dreiss authored
253 test/Makefile
1a7b878 Thrift: Python test improvements.
dreiss authored
254 test/py/Makefile
9d4a144 Merge branch 'fastbinary'
kclark authored
255 test/rb/Makefile
1b90162 Thrift: Revamp build to use a single configure.ac.
dreiss authored
256 ])
4aabc43 Uber configure.ac/Makefile.am and configure.ac/Makefile.am for lib/php a...
marc authored
257
258 AC_OUTPUT
Something went wrong with that request. Please try again.