David Reiss | feab773 | 2009-03-30 22:52:44 +0000 | [diff] [blame] | 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 | |
T Jake Luciani | 03ec1e4 | 2011-01-27 02:53:57 +0000 | [diff] [blame] | 20 | AC_PREREQ(2.65) |
Marc Slemko | b09f588 | 2006-08-23 22:03:34 +0000 | [diff] [blame] | 21 | |
Jake Farrell | 6fcecd4 | 2012-10-11 20:34:25 +0000 | [diff] [blame] | 22 | AC_INIT([thrift], [1.0.0-dev]) |
Marc Slemko | b09f588 | 2006-08-23 22:03:34 +0000 | [diff] [blame] | 23 | |
| 24 | AC_CONFIG_AUX_DIR([.]) |
| 25 | |
jfarrell | 92f24b2 | 2013-08-17 15:47:13 -0400 | [diff] [blame] | 26 | AM_INIT_AUTOMAKE([1.11 tar-ustar]) |
Bryan Duxbury | b005c1f | 2011-02-09 17:05:11 +0000 | [diff] [blame] | 27 | PKG_PROG_PKG_CONFIG |
Marc Slemko | b09f588 | 2006-08-23 22:03:34 +0000 | [diff] [blame] | 28 | |
David Reiss | d683219 | 2007-09-05 00:47:32 +0000 | [diff] [blame] | 29 | AC_ARG_VAR([PY_PREFIX], [Prefix for installing Python modules. |
| 30 | (Normal --prefix is ignored for Python because |
| 31 | Python has different conventions.) |
| 32 | Default = "/usr"]) |
David Reiss | cdd6f3c | 2008-03-04 21:10:29 +0000 | [diff] [blame] | 33 | AS_IF([test "x$PY_PREFIX" = x], [PY_PREFIX="/usr"]) |
David Reiss | d683219 | 2007-09-05 00:47:32 +0000 | [diff] [blame] | 34 | |
David Reiss | f0c21a7 | 2008-07-11 01:26:16 +0000 | [diff] [blame] | 35 | AC_ARG_VAR([JAVA_PREFIX], [Prefix for installing the Java lib jar. |
| 36 | (Normal --prefix is ignored for Java because |
Christian Lavoie | afc6d8f | 2011-02-20 02:39:19 +0000 | [diff] [blame] | 37 | Java has different conventions.) |
David Reiss | f0c21a7 | 2008-07-11 01:26:16 +0000 | [diff] [blame] | 38 | Default = "/usr/local/lib"]) |
| 39 | AS_IF([test "x$JAVA_PREFIX" = x], [JAVA_PREFIX="/usr/local/lib"]) |
David Reiss | 832b262 | 2007-12-28 18:25:33 +0000 | [diff] [blame] | 40 | |
Bryan Duxbury | 3f0b526 | 2010-05-12 21:31:58 +0000 | [diff] [blame] | 41 | AC_ARG_VAR([RUBY_PREFIX], [Prefix for installing Ruby modules. |
| 42 | (Normal --prefix is ignored for Ruby because |
| 43 | Ruby has different conventions.) |
| 44 | Default = none, let ruby setup decide]) |
| 45 | |
Bryan Duxbury | 6a68187 | 2010-05-02 22:39:31 +0000 | [diff] [blame] | 46 | AC_ARG_VAR([PHP_PREFIX], [Prefix for installing PHP modules. |
| 47 | (Normal --prefix is ignored for PHP because |
| 48 | PHP has different conventions.) |
| 49 | Default = "/usr/lib/php"]) |
| 50 | AS_IF([test "x$PHP_PREFIX" = x], [PHP_PREFIX="/usr/lib/php"]) |
| 51 | |
Bryan Duxbury | 89200e1 | 2010-08-25 17:09:02 +0000 | [diff] [blame] | 52 | AC_ARG_VAR([PHP_CONFIG_PREFIX], |
| 53 | [Prefix for installing PHP extension module .ini file. |
| 54 | (Normal --prefix is ignored for PHP because PHP has |
| 55 | different conventions.) |
| 56 | Default = "/etc/php.d"]) |
| 57 | AS_IF([test "x$PHP_CONFIG_PREFIX" = x], [PHP_CONFIG_PREFIX="/etc/php.d"]) |
| 58 | |
Jake Farrell | 05e0cdb | 2011-05-05 13:45:26 +0000 | [diff] [blame] | 59 | AC_ARG_VAR([INSTALLDIRS], [When installing Perl modules, specifies which |
| 60 | of the sets of installation directories |
| 61 | to choose: perl, site or vendor. |
| 62 | Default = "vendor"]) |
| 63 | AS_IF([test "x$INSTALLDIRS" = x], [INSTALLDIRS="vendor"]) |
| 64 | |
David Reiss | c07057e | 2010-06-11 17:57:32 +0000 | [diff] [blame] | 65 | AC_ARG_VAR([PERL_PREFIX], [Prefix for installing Perl modules. |
| 66 | (Normal --prefix is ignored for Perl because |
| 67 | Perl has different conventions.) |
Jake Farrell | 05e0cdb | 2011-05-05 13:45:26 +0000 | [diff] [blame] | 68 | Ignored, when INSTALLDIRS set to site or vendor. |
David Reiss | c07057e | 2010-06-11 17:57:32 +0000 | [diff] [blame] | 69 | Default = "/usr/local/lib"]) |
| 70 | AS_IF([test "x$PERL_PREFIX" = x], [PERL_PREFIX="/usr/local"]) |
| 71 | |
Anthony F. Molinaro | a5df7c7 | 2010-09-27 17:22:17 +0000 | [diff] [blame] | 72 | AC_ARG_VAR([CABAL_CONFIGURE_FLAGS], |
| 73 | [Extra flags to pass to cabal: "cabal Setup.lhs configure $CABAL_CONFIGURE_FLAGS". |
| 74 | (Typically used to set --user or force --global.)]) |
| 75 | |
| 76 | AC_SUBST(CABAL_CONFIGURE_FLAGS) |
| 77 | |
Jake Farrell | b95b0ff | 2012-03-22 21:49:10 +0000 | [diff] [blame] | 78 | AC_ARG_VAR([D_IMPORT_PREFIX], [Prefix for installing D modules. |
| 79 | [INCLUDEDIR/d2]]) |
| 80 | AS_IF([test "x$D_IMPORT_PREFIX" = x], [D_IMPORT_PREFIX="${includedir}/d2"]) |
| 81 | |
| 82 | AC_ARG_VAR([DMD_LIBEVENT_FLAGS], [DMD flags for linking libevent (auto-detected if not set).]) |
| 83 | AC_ARG_VAR([DMD_OPENSSL_FLAGS], [DMD flags for linking OpenSSL (auto-detected if not set).]) |
| 84 | |
David Reiss | 832b262 | 2007-12-28 18:25:33 +0000 | [diff] [blame] | 85 | AC_PROG_CC |
| 86 | AC_PROG_CPP |
| 87 | AC_PROG_CXX |
| 88 | AC_PROG_INSTALL |
| 89 | AC_PROG_LIBTOOL |
| 90 | AC_PROG_MAKE_SET |
| 91 | AC_PROG_YACC |
| 92 | AC_PROG_LEX |
| 93 | AM_PROG_LEX |
David Reiss | 7ed4b98 | 2008-02-11 23:24:47 +0000 | [diff] [blame] | 94 | AC_PROG_LN_S |
| 95 | AC_PROG_MKDIR_P |
Christian Lavoie | afc6d8f | 2011-02-20 02:39:19 +0000 | [diff] [blame] | 96 | AC_PROG_AWK |
| 97 | AC_PROG_RANLIB |
David Reiss | 832b262 | 2007-12-28 18:25:33 +0000 | [diff] [blame] | 98 | |
| 99 | AC_LANG([C++]) |
jfarrell | 84cd284 | 2014-01-14 21:51:59 -0500 | [diff] [blame] | 100 | AX_CXX_COMPILE_STDCXX_11([noext]) |
David Reiss | 832b262 | 2007-12-28 18:25:33 +0000 | [diff] [blame] | 101 | |
David Reiss | ea4c981 | 2010-08-31 16:51:21 +0000 | [diff] [blame] | 102 | AX_THRIFT_LIB(cpp, [C++], yes) |
| 103 | have_cpp=no |
| 104 | if test "$with_cpp" = "yes"; then |
Roger Meier | 6bb0a7a | 2012-05-11 10:44:32 +0000 | [diff] [blame] | 105 | AX_BOOST_BASE([1.40.0]) |
Jake Farrell | 3ad8081 | 2011-06-09 19:14:22 +0000 | [diff] [blame] | 106 | if test "x$succeeded" = "xyes" ; then |
David Reiss | ef5e81b | 2010-08-31 16:51:28 +0000 | [diff] [blame] | 107 | have_cpp="yes" |
| 108 | fi |
David Reiss | 5cc3ba8 | 2010-08-31 16:51:20 +0000 | [diff] [blame] | 109 | |
David Reiss | ea4c981 | 2010-08-31 16:51:21 +0000 | [diff] [blame] | 110 | AX_LIB_EVENT([1.0]) |
| 111 | have_libevent=$success |
David Reiss | 832b262 | 2007-12-28 18:25:33 +0000 | [diff] [blame] | 112 | |
David Reiss | ea4c981 | 2010-08-31 16:51:21 +0000 | [diff] [blame] | 113 | AX_LIB_ZLIB([1.2.3]) |
| 114 | have_zlib=$success |
Chris Piro | 20c81ad | 2013-03-07 11:32:48 -0500 | [diff] [blame] | 115 | |
Jake Farrell | d6d3e37 | 2012-07-27 16:01:33 +0000 | [diff] [blame] | 116 | AX_THRIFT_LIB(qt4, [Qt], yes) |
| 117 | have_qt=no |
| 118 | if test "$with_qt4" = "yes"; then |
| 119 | PKG_CHECK_MODULES([QT], [QtCore >= 4.3, QtNetwork >= 4.3], have_qt=yes, have_qt=no) |
| 120 | fi |
Roger Meier | 86e8986 | 2012-02-10 19:53:20 +0000 | [diff] [blame] | 121 | if test "$have_qt" = "yes"; then |
| 122 | AC_PATH_PROGS([QT_MOC], [moc-qt4 moc]) |
| 123 | have_qt=$success |
| 124 | fi |
David Reiss | ea4c981 | 2010-08-31 16:51:21 +0000 | [diff] [blame] | 125 | fi |
| 126 | AM_CONDITIONAL([WITH_CPP], [test "$have_cpp" = "yes"]) |
| 127 | AM_CONDITIONAL([AMX_HAVE_LIBEVENT], [test "$have_libevent" = "yes"]) |
| 128 | AM_CONDITIONAL([AMX_HAVE_ZLIB], [test "$have_zlib" = "yes"]) |
Roger Meier | 86e8986 | 2012-02-10 19:53:20 +0000 | [diff] [blame] | 129 | AM_CONDITIONAL([AMX_HAVE_QT], [test "$have_qt" = "yes"]) |
David Reiss | 832b262 | 2007-12-28 18:25:33 +0000 | [diff] [blame] | 130 | |
Roger Meier | 3217723 | 2012-05-01 11:19:53 +0000 | [diff] [blame] | 131 | AX_THRIFT_LIB(c_glib, [C (GLib)], yes) |
Roger Meier | 213a664 | 2010-10-27 12:30:11 +0000 | [diff] [blame] | 132 | if test "$with_c_glib" = "yes"; then |
| 133 | PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.0], have_glib2=yes, have_glib2=no) |
| 134 | PKG_CHECK_MODULES([GOBJECT], [gobject-2.0 >= 2.0], have_gobject2=yes, have_gobject2=no) |
| 135 | if test "$have_glib2" = "yes" -a "$have_gobject2" = "yes" ; then |
| 136 | have_c_glib="yes" |
| 137 | fi |
| 138 | fi |
| 139 | AM_CONDITIONAL(WITH_C_GLIB, [test "$have_glib2" = "yes" -a "$have_gobject2" = "yes"]) |
| 140 | |
David Reiss | 520b5ee | 2008-03-02 07:00:26 +0000 | [diff] [blame] | 141 | AX_THRIFT_LIB(csharp, [C#], yes) |
| 142 | if test "$with_csharp" = "yes"; then |
David Reiss | d831a21 | 2009-02-13 03:09:52 +0000 | [diff] [blame] | 143 | PKG_CHECK_MODULES(MONO, mono >= 2.0.0, net_3_5=yes, net_3_5=no) |
| 144 | PKG_CHECK_MODULES(MONO, mono >= 1.2.4, have_mono=yes, have_mono=no) |
David Reiss | 5cc3ba8 | 2010-08-31 16:51:20 +0000 | [diff] [blame] | 145 | if test "$have_mono" = "yes" ; then |
| 146 | have_csharp="yes" |
| 147 | fi |
David Reiss | 520b5ee | 2008-03-02 07:00:26 +0000 | [diff] [blame] | 148 | fi |
David Reiss | 5cc3ba8 | 2010-08-31 16:51:20 +0000 | [diff] [blame] | 149 | AM_CONDITIONAL(WITH_MONO, [test "$have_csharp" = "yes"]) |
David Reiss | d831a21 | 2009-02-13 03:09:52 +0000 | [diff] [blame] | 150 | AM_CONDITIONAL(NET_2_0, [test "$net_3_5" = "no"]) |
David Reiss | 1fdb592 | 2008-02-06 22:10:12 +0000 | [diff] [blame] | 151 | |
David Reiss | 62d3981 | 2008-03-02 07:00:22 +0000 | [diff] [blame] | 152 | AX_THRIFT_LIB(java, [Java], yes) |
| 153 | if test "$with_java" = "yes"; then |
David Reiss | d9cdf42 | 2009-03-13 21:25:29 +0000 | [diff] [blame] | 154 | AX_JAVAC_AND_JAVA |
Bryan Duxbury | 38bab12 | 2010-08-12 00:27:14 +0000 | [diff] [blame] | 155 | AC_PATH_PROG([ANT], [ant]) |
Jake Farrell | 210d766 | 2011-05-25 21:07:29 +0000 | [diff] [blame] | 156 | AX_CHECK_ANT_VERSION($ANT, 1.7) |
David Reiss | fff84d1 | 2009-05-22 19:50:33 +0000 | [diff] [blame] | 157 | AC_SUBST(CLASSPATH) |
David Reiss | 4ca0c8e | 2009-05-12 23:16:55 +0000 | [diff] [blame] | 158 | AC_SUBST(ANT_FLAGS) |
David Reiss | 5cc3ba8 | 2010-08-31 16:51:20 +0000 | [diff] [blame] | 159 | if test "x$JAVAC" != "x" && test "x$JAVAC" != "x" && test "x$ANT" != "x" ; then |
| 160 | have_java="yes" |
| 161 | fi |
David Reiss | 62d3981 | 2008-03-02 07:00:22 +0000 | [diff] [blame] | 162 | fi |
David Reiss | 5cc3ba8 | 2010-08-31 16:51:20 +0000 | [diff] [blame] | 163 | AM_CONDITIONAL([WITH_JAVA], [test "$have_java" = "yes"]) |
David Reiss | 1fdb592 | 2008-02-06 22:10:12 +0000 | [diff] [blame] | 164 | |
Christopher Piro | b6f18c2 | 2008-03-04 07:09:12 +0000 | [diff] [blame] | 165 | AX_THRIFT_LIB(erlang, [Erlang], yes) |
| 166 | if test "$with_erlang" = "yes"; then |
David Reiss | 9e2fd79 | 2010-05-18 16:52:48 +0000 | [diff] [blame] | 167 | AC_ERLANG_PATH_ERL |
| 168 | AC_ERLANG_PATH_ERLC |
David Reiss | 31e1b6e | 2010-08-24 20:45:24 +0000 | [diff] [blame] | 169 | if test -n "$ERLC" ; then |
| 170 | AC_ERLANG_SUBST_LIB_DIR |
| 171 | # Install into the detected Erlang directory instead of $libdir/erlang/lib |
| 172 | ERLANG_INSTALL_LIB_DIR="$ERLANG_LIB_DIR" |
| 173 | AC_ERLANG_SUBST_INSTALL_LIB_SUBDIR(AC_PACKAGE_NAME, AC_PACKAGE_VERSION) |
| 174 | fi |
David Reiss | 5cc3ba8 | 2010-08-31 16:51:20 +0000 | [diff] [blame] | 175 | if test -n "$ERL" -a -n "$ERLC" ; then |
| 176 | have_erlang="yes" |
| 177 | fi |
Christopher Piro | b6f18c2 | 2008-03-04 07:09:12 +0000 | [diff] [blame] | 178 | fi |
David Reiss | 5cc3ba8 | 2010-08-31 16:51:20 +0000 | [diff] [blame] | 179 | AM_CONDITIONAL(WITH_ERLANG, [test "$have_erlang" = "yes"]) |
Christopher Piro | b6f18c2 | 2008-03-04 07:09:12 +0000 | [diff] [blame] | 180 | |
David Reiss | 5cc3ba8 | 2010-08-31 16:51:20 +0000 | [diff] [blame] | 181 | AX_THRIFT_LIB(python, [Python], yes) |
| 182 | if test "$with_python" = "yes"; then |
David Reiss | 1a14091 | 2008-06-11 01:16:37 +0000 | [diff] [blame] | 183 | AM_PATH_PYTHON(2.4,, :) |
David Reiss | 5cc3ba8 | 2010-08-31 16:51:20 +0000 | [diff] [blame] | 184 | if test "x$PYTHON" != "x" && test "x$PYTHON" != "x:" ; then |
| 185 | have_python="yes" |
| 186 | fi |
David Reiss | 1a14091 | 2008-06-11 01:16:37 +0000 | [diff] [blame] | 187 | fi |
David Reiss | 5cc3ba8 | 2010-08-31 16:51:20 +0000 | [diff] [blame] | 188 | AM_CONDITIONAL(WITH_PYTHON, [test "$have_python" = "yes"]) |
David Reiss | 1a14091 | 2008-06-11 01:16:37 +0000 | [diff] [blame] | 189 | |
Roger Meier | 50e4349 | 2010-10-08 17:46:06 +0000 | [diff] [blame] | 190 | AC_PATH_PROG([TRIAL], [trial]) |
| 191 | |
T Jake Luciani | 1952e54 | 2009-02-01 04:47:30 +0000 | [diff] [blame] | 192 | AX_THRIFT_LIB(perl, [Perl], yes) |
| 193 | if test "$with_perl" = "yes"; then |
| 194 | AC_PATH_PROG([PERL], [perl]) |
David Reiss | dcc7e9b | 2010-08-31 16:51:22 +0000 | [diff] [blame] | 195 | if test -n "$PERL" ; then |
| 196 | AC_PROG_PERL_MODULES([Bit::Vector], success="yes", success="no") |
| 197 | have_perl_bit_vector="$success" |
Roger Meier | aae8acb | 2014-01-15 13:55:09 +0100 | [diff] [blame] | 198 | AC_PROG_PERL_MODULES([Class::Accessor], success="yes", success="no") |
| 199 | have_perl_class_accessor="$success" |
Bryan Duxbury | 1237369 | 2010-08-19 05:23:59 +0000 | [diff] [blame] | 200 | fi |
David Reiss | dcc7e9b | 2010-08-31 16:51:22 +0000 | [diff] [blame] | 201 | if test -n "$PERL" -a "$have_perl_bit_vector" = "yes" ; then |
Roger Meier | aae8acb | 2014-01-15 13:55:09 +0100 | [diff] [blame] | 202 | if test -n "$PERL" -a "$have_perl_class_accessor" = "yes" ; then |
| 203 | have_perl="yes" |
| 204 | fi |
David Reiss | 5cc3ba8 | 2010-08-31 16:51:20 +0000 | [diff] [blame] | 205 | fi |
T Jake Luciani | 1952e54 | 2009-02-01 04:47:30 +0000 | [diff] [blame] | 206 | fi |
David Reiss | 5cc3ba8 | 2010-08-31 16:51:20 +0000 | [diff] [blame] | 207 | AM_CONDITIONAL(WITH_PERL, [test "$have_perl" = "yes"]) |
T Jake Luciani | 1952e54 | 2009-02-01 04:47:30 +0000 | [diff] [blame] | 208 | |
Bryan Duxbury | 6a68187 | 2010-05-02 22:39:31 +0000 | [diff] [blame] | 209 | AX_THRIFT_LIB(php, [PHP], yes) |
| 210 | if test "$with_php" = "yes"; then |
| 211 | AC_PATH_PROG([PHP], [php]) |
David Reiss | 5cc3ba8 | 2010-08-31 16:51:20 +0000 | [diff] [blame] | 212 | if test -n "$PHP" ; then |
| 213 | have_php="yes" |
| 214 | fi |
Bryan Duxbury | 6a68187 | 2010-05-02 22:39:31 +0000 | [diff] [blame] | 215 | fi |
David Reiss | 5cc3ba8 | 2010-08-31 16:51:20 +0000 | [diff] [blame] | 216 | AM_CONDITIONAL(WITH_PHP, [test "$have_php" = "yes"]) |
Bryan Duxbury | 6a68187 | 2010-05-02 22:39:31 +0000 | [diff] [blame] | 217 | |
Bryan Duxbury | 89200e1 | 2010-08-25 17:09:02 +0000 | [diff] [blame] | 218 | AX_THRIFT_LIB(php_extension, [PHP_EXTENSION], yes) |
| 219 | if test "$with_php_extension" = "yes"; then |
| 220 | AC_PATH_PROG([PHP_CONFIG], [php-config]) |
Anthony F. Molinaro | ddcf32a | 2010-10-05 16:45:50 +0000 | [diff] [blame] | 221 | if test -n "$PHP_CONFIG" ; then |
| 222 | AC_CONFIG_SUBDIRS([lib/php/src/ext/thrift_protocol]) |
| 223 | have_php_extension="yes" |
| 224 | fi |
Bryan Duxbury | 89200e1 | 2010-08-25 17:09:02 +0000 | [diff] [blame] | 225 | fi |
Anthony F. Molinaro | ddcf32a | 2010-10-05 16:45:50 +0000 | [diff] [blame] | 226 | AM_CONDITIONAL(WITH_PHP_EXTENSION, [test "$have_php_extension" = "yes"]) |
Bryan Duxbury | 89200e1 | 2010-08-25 17:09:02 +0000 | [diff] [blame] | 227 | |
Roger Meier | 33b720a | 2012-01-24 18:42:46 +0000 | [diff] [blame] | 228 | AC_PATH_PROG([PHPUNIT], [phpunit]) |
| 229 | AM_CONDITIONAL(HAVE_PHPUNIT, [test "x$PHPUNIT" != "x"]) |
| 230 | |
Kevin Clark | 4bd8916 | 2008-07-08 00:47:49 +0000 | [diff] [blame] | 231 | AX_THRIFT_LIB(ruby, [Ruby], yes) |
David Reiss | 5cc3ba8 | 2010-08-31 16:51:20 +0000 | [diff] [blame] | 232 | have_ruby=no |
Kevin Clark | 4bd8916 | 2008-07-08 00:47:49 +0000 | [diff] [blame] | 233 | if test "$with_ruby" = "yes"; then |
| 234 | AC_PATH_PROG([RUBY], [ruby]) |
Jake Farrell | 9c39f77 | 2011-08-30 19:12:10 +0000 | [diff] [blame] | 235 | AC_PATH_PROG([BUNDLER], [bundle]) |
jfarrell | 507740c | 2014-01-22 22:20:21 -0500 | [diff] [blame^] | 236 | if test "x$RUBY" != "x" -a "x$BUNDLER" != "x"; then |
David Reiss | 5cc3ba8 | 2010-08-31 16:51:20 +0000 | [diff] [blame] | 237 | have_ruby="yes" |
| 238 | fi |
Kevin Clark | 4bd8916 | 2008-07-08 00:47:49 +0000 | [diff] [blame] | 239 | fi |
David Reiss | 5cc3ba8 | 2010-08-31 16:51:20 +0000 | [diff] [blame] | 240 | AM_CONDITIONAL(WITH_RUBY, [test "$have_ruby" = "yes"]) |
Jake Farrell | 9c39f77 | 2011-08-30 19:12:10 +0000 | [diff] [blame] | 241 | AM_CONDITIONAL(HAVE_BUNDLER, [test "x$BUNDLER" != "x"]) |
Bryan Duxbury | ec47358 | 2009-04-07 16:31:04 +0000 | [diff] [blame] | 242 | |
Anthony F. Molinaro | a5df7c7 | 2010-09-27 17:22:17 +0000 | [diff] [blame] | 243 | AX_THRIFT_LIB(haskell, [Haskell], yes) |
| 244 | have_haskell=no |
| 245 | RUNHASKELL=true |
Bryan Duxbury | c657447 | 2010-10-06 00:12:33 +0000 | [diff] [blame] | 246 | CABAL=true |
Anthony F. Molinaro | a5df7c7 | 2010-09-27 17:22:17 +0000 | [diff] [blame] | 247 | if test "$with_haskell" = "yes"; then |
Bryan Duxbury | c657447 | 2010-10-06 00:12:33 +0000 | [diff] [blame] | 248 | AC_PATH_PROG([CABAL], [cabal]) |
Anthony F. Molinaro | a5df7c7 | 2010-09-27 17:22:17 +0000 | [diff] [blame] | 249 | AC_PATH_PROG([RUNHASKELL], [runhaskell]) |
Bryan Duxbury | c657447 | 2010-10-06 00:12:33 +0000 | [diff] [blame] | 250 | if test "x$CABAL" != "x" -a "x$RUNHASKELL" != "x"; then |
Anthony F. Molinaro | a5df7c7 | 2010-09-27 17:22:17 +0000 | [diff] [blame] | 251 | have_haskell="yes" |
| 252 | else |
| 253 | RUNHASKELL=true |
Bryan Duxbury | c657447 | 2010-10-06 00:12:33 +0000 | [diff] [blame] | 254 | CABAL=true |
Anthony F. Molinaro | a5df7c7 | 2010-09-27 17:22:17 +0000 | [diff] [blame] | 255 | fi |
| 256 | fi |
Bryan Duxbury | c657447 | 2010-10-06 00:12:33 +0000 | [diff] [blame] | 257 | AC_SUBST(CABAL) |
Anthony F. Molinaro | a5df7c7 | 2010-09-27 17:22:17 +0000 | [diff] [blame] | 258 | AC_SUBST(RUNHASKELL) |
| 259 | AM_CONDITIONAL(WITH_HASKELL, [test "$have_haskell" = "yes"]) |
Kevin Clark | 4bd8916 | 2008-07-08 00:47:49 +0000 | [diff] [blame] | 260 | |
Christian Lavoie | afc6d8f | 2011-02-20 02:39:19 +0000 | [diff] [blame] | 261 | AX_THRIFT_LIB(go, [Go], yes) |
| 262 | if test "$with_go" = "yes"; then |
Jens Geyer | 0e87c46 | 2013-06-18 22:25:07 +0200 | [diff] [blame] | 263 | AC_PATH_PROG([GO], [go]) |
| 264 | if [[ -x "$GO" ]] ; then |
Christian Lavoie | afc6d8f | 2011-02-20 02:39:19 +0000 | [diff] [blame] | 265 | have_go="yes" |
| 266 | fi |
| 267 | fi |
| 268 | AM_CONDITIONAL(WITH_GO, [test "$have_go" = "yes"]) |
| 269 | |
Jake Farrell | b95b0ff | 2012-03-22 21:49:10 +0000 | [diff] [blame] | 270 | |
| 271 | AX_THRIFT_LIB(d, [D], yes) |
| 272 | if test "$with_d" = "yes"; then |
| 273 | AX_DMD |
| 274 | AC_SUBST(DMD) |
| 275 | if test "x$DMD" != "x"; then |
| 276 | have_d="yes" |
| 277 | fi |
| 278 | fi |
| 279 | |
| 280 | # Determine actual name of the generated D library for use in the command line |
| 281 | # when compiling tests. This is needed because the -l<lib> syntax doesn't work |
| 282 | # with OPTLINK (Windows). |
| 283 | lib_prefix=lib |
| 284 | lib_suffix=a |
| 285 | case "$host_os" in |
| 286 | cygwin* | mingw* | pw32* | cegcc*) |
| 287 | lib_prefix="" |
| 288 | lib_suffix=lib |
| 289 | ;; |
| 290 | esac |
| 291 | D_LIB_NAME="${lib_prefix}thriftd.${lib_suffix}" |
| 292 | AC_SUBST(D_LIB_NAME) |
| 293 | D_EVENT_LIB_NAME="${lib_prefix}thriftd-event.${lib_suffix}" |
| 294 | AC_SUBST(D_EVENT_LIB_NAME) |
| 295 | D_SSL_LIB_NAME="${lib_prefix}thriftd-ssl.${lib_suffix}" |
| 296 | AC_SUBST(D_SSL_LIB_NAME) |
| 297 | |
| 298 | if test "$have_d" = "yes"; then |
| 299 | AX_CHECK_D_MODULE(deimos.event2.event) |
| 300 | have_deimos_event2=$success |
| 301 | |
| 302 | with_d_event_tests="no" |
| 303 | if test "$have_deimos_event2" = "yes"; then |
| 304 | if test "x$DMD_LIBEVENT_FLAGS" = "x"; then |
| 305 | if test "$dmd_optlink" = "yes"; then |
| 306 | AC_MSG_WARN([D libevent interface found, but cannot auto-detect \ |
| 307 | linker flags for OPTLINK. Please set DMD_LIBEVENT_FLAGS manually.]) |
| 308 | else |
| 309 | AX_LIB_EVENT([2.0]) |
| 310 | if test "$success" = "yes"; then |
| 311 | DMD_LIBEVENT_FLAGS=$(echo "$LIBEVENT_LDFLAGS $LIBEVENT_LIBS" | \ |
| 312 | sed -e 's/^ *//g;s/ *$//g;s/^\(.\)/-L\1/g;s/ */ -L/g') |
| 313 | with_d_event_tests="yes" |
| 314 | else |
| 315 | AC_MSG_WARN([D libevent interface present, but libevent library not found.]) |
| 316 | fi |
| 317 | fi |
| 318 | else |
| 319 | with_d_event_tests="yes" |
| 320 | fi |
| 321 | fi |
| 322 | |
| 323 | AX_CHECK_D_MODULE(deimos.openssl.ssl) |
| 324 | have_deimos_openssl=$success |
| 325 | |
| 326 | with_d_ssl_tests="no" |
| 327 | if test "$have_deimos_openssl" = "yes"; then |
| 328 | if test "x$DMD_OPENSSL_FLAGS" = "x"; then |
| 329 | if test "$dmd_optlink" = "yes"; then |
| 330 | AC_MSG_WARN([D OpenSSL interface found, but cannot auto-detect \ |
| 331 | linker flags for OPTLINK. Please set DMD_OPENSSL_FLAGS manually.]) |
| 332 | else |
| 333 | AX_CHECK_OPENSSL([with_d_ssl_tests="yes"]) |
| 334 | if test "$with_d_ssl_tests" = "yes"; then |
| 335 | DMD_OPENSSL_FLAGS=$(echo "$OPENSSL_LDFLAGS $OPENSSL_LIBS" | \ |
| 336 | sed -e 's/^ *//g;s/ *$//g;s/^\(.\)/-L\1/g;s/ */ -L/g') |
| 337 | else |
| 338 | AC_MSG_WARN([D OpenSSL interface present, but OpenSSL library not found.]) |
| 339 | fi |
| 340 | fi |
| 341 | else |
| 342 | with_d_ssl_tests="yes" |
| 343 | fi |
| 344 | fi |
| 345 | fi |
| 346 | |
| 347 | AM_CONDITIONAL(WITH_D, [test "$have_d" = "yes"]) |
| 348 | AM_CONDITIONAL(DMD_OPTLINK, [test "$dmd_optlink" = "yes"]) |
| 349 | AC_SUBST(DMD_OF_DIRSEP, "$dmd_of_dirsep") |
| 350 | AM_CONDITIONAL(HAVE_DEIMOS_EVENT2, [test "$have_deimos_event2" = "yes"]) |
| 351 | AM_CONDITIONAL(WITH_D_EVENT_TESTS, [test "$with_d_event_tests" = "yes"]) |
| 352 | AC_SUBST(DMD_LIBEVENT_FLAGS) |
| 353 | AM_CONDITIONAL(HAVE_DEIMOS_OPENSSL, [test "$have_deimos_openssl" = "yes"]) |
| 354 | AM_CONDITIONAL(WITH_D_SSL_TESTS, [test "$with_d_ssl_tests" = "yes"]) |
| 355 | AC_SUBST(DMD_OPENSSL_FLAGS) |
| 356 | |
| 357 | |
Jake Farrell | 627f1a0 | 2011-09-14 03:43:49 +0000 | [diff] [blame] | 358 | have_tests=yes |
| 359 | if test "$with_tests" = "no"; then |
| 360 | have_tests="no" |
| 361 | fi |
| 362 | AM_CONDITIONAL(WITH_TESTS, [test "$have_tests" = "yes"]) |
| 363 | |
Roger Meier | 6e96965 | 2011-12-13 00:36:01 +0000 | [diff] [blame] | 364 | AM_CONDITIONAL(MINGW, false) |
| 365 | case "${host_os}" in |
| 366 | *mingw*) |
| 367 | mingw32_support="yes" |
| 368 | AC_CHECK_HEADER(windows.h) |
| 369 | AM_CONDITIONAL(MINGW, true) |
| 370 | ;; |
| 371 | *) |
| 372 | AC_ISC_POSIX |
| 373 | ;; |
| 374 | esac |
| 375 | |
David Reiss | 832b262 | 2007-12-28 18:25:33 +0000 | [diff] [blame] | 376 | AC_C_CONST |
| 377 | AC_C_INLINE |
| 378 | AC_C_VOLATILE |
| 379 | |
| 380 | AC_HEADER_STDBOOL |
| 381 | AC_HEADER_STDC |
| 382 | AC_HEADER_TIME |
Christian Lavoie | afc6d8f | 2011-02-20 02:39:19 +0000 | [diff] [blame] | 383 | AC_HEADER_SYS_WAIT |
| 384 | AC_TYPE_SIGNAL |
David Reiss | 832b262 | 2007-12-28 18:25:33 +0000 | [diff] [blame] | 385 | AC_CHECK_HEADERS([arpa/inet.h]) |
Bryan Duxbury | 184d262 | 2010-08-17 17:43:58 +0000 | [diff] [blame] | 386 | AC_CHECK_HEADERS([sys/param.h]) |
David Reiss | 832b262 | 2007-12-28 18:25:33 +0000 | [diff] [blame] | 387 | AC_CHECK_HEADERS([fcntl.h]) |
| 388 | AC_CHECK_HEADERS([inttypes.h]) |
David Reiss | 7ed4b98 | 2008-02-11 23:24:47 +0000 | [diff] [blame] | 389 | AC_CHECK_HEADERS([limits.h]) |
David Reiss | 832b262 | 2007-12-28 18:25:33 +0000 | [diff] [blame] | 390 | AC_CHECK_HEADERS([netdb.h]) |
| 391 | AC_CHECK_HEADERS([netinet/in.h]) |
| 392 | AC_CHECK_HEADERS([pthread.h]) |
| 393 | AC_CHECK_HEADERS([stddef.h]) |
David Reiss | d7a16f4 | 2008-02-19 22:47:29 +0000 | [diff] [blame] | 394 | AC_CHECK_HEADERS([stdlib.h]) |
David Reiss | 832b262 | 2007-12-28 18:25:33 +0000 | [diff] [blame] | 395 | AC_CHECK_HEADERS([sys/socket.h]) |
| 396 | AC_CHECK_HEADERS([sys/time.h]) |
Roger Meier | 2fa9c31 | 2011-09-05 19:15:53 +0000 | [diff] [blame] | 397 | AC_CHECK_HEADERS([sys/un.h]) |
| 398 | AC_CHECK_HEADERS([sys/poll.h]) |
| 399 | AC_CHECK_HEADERS([sys/resource.h]) |
David Reiss | 832b262 | 2007-12-28 18:25:33 +0000 | [diff] [blame] | 400 | AC_CHECK_HEADERS([unistd.h]) |
| 401 | AC_CHECK_HEADERS([libintl.h]) |
| 402 | AC_CHECK_HEADERS([malloc.h]) |
Roger Meier | 9d9c4b9 | 2011-02-23 20:27:54 +0000 | [diff] [blame] | 403 | AC_CHECK_HEADERS([openssl/ssl.h]) |
| 404 | AC_CHECK_HEADERS([openssl/rand.h]) |
| 405 | AC_CHECK_HEADERS([openssl/x509v3.h]) |
Roger Meier | 12d7053 | 2011-12-14 23:35:28 +0000 | [diff] [blame] | 406 | AC_CHECK_HEADERS([sched.h]) |
Roger Meier | 9357636 | 2013-03-15 19:49:23 +0100 | [diff] [blame] | 407 | AC_CHECK_HEADERS([wchar.h]) |
David Reiss | 832b262 | 2007-12-28 18:25:33 +0000 | [diff] [blame] | 408 | |
| 409 | AC_CHECK_LIB(pthread, pthread_create) |
David Reiss | e4ca179 | 2009-05-21 02:28:19 +0000 | [diff] [blame] | 410 | dnl NOTE(dreiss): I haven't been able to find any really solid docs |
| 411 | dnl on what librt is and how it fits into various Unix systems. |
| 412 | dnl My best guess is that it is where glibc stashes its implementation |
| 413 | dnl of the POSIX Real-Time Extensions. This seems necessary on Linux, |
| 414 | dnl and we haven't yet found a system where this is a problem. |
| 415 | AC_CHECK_LIB(rt, clock_gettime) |
David Reiss | 9b90344 | 2009-10-21 05:51:28 +0000 | [diff] [blame] | 416 | AC_CHECK_LIB(socket, setsockopt) |
Roger Meier | 6869112 | 2011-09-09 06:19:35 +0000 | [diff] [blame] | 417 | |
| 418 | if test "$have_cpp" = "yes" ; then |
| 419 | # mingw toolchain used to build "Thrift Compiler for Windows" |
| 420 | # does not support libcrypto, so we just check if we building the cpp library |
Jake Farrell | 012dfda | 2011-08-29 18:18:55 +0000 | [diff] [blame] | 421 | AC_CHECK_LIB(crypto, |
| 422 | BN_init, |
| 423 | [AC_CHECK_LIB(ssl, |
| 424 | SSL_ctrl, |
| 425 | [LIBS="-lssl -lcrypto $LIBS"], |
| 426 | [AC_MSG_ERROR(["Error: libssl required"])], |
| 427 | -lcrypto |
| 428 | )], |
| 429 | [AC_MSG_ERROR(["Error: libcrypto required."])] |
| 430 | ) |
Roger Meier | 6869112 | 2011-09-09 06:19:35 +0000 | [diff] [blame] | 431 | fi |
David Reiss | 832b262 | 2007-12-28 18:25:33 +0000 | [diff] [blame] | 432 | |
| 433 | AC_TYPE_INT16_T |
| 434 | AC_TYPE_INT32_T |
| 435 | AC_TYPE_INT64_T |
| 436 | AC_TYPE_INT8_T |
| 437 | AC_TYPE_MODE_T |
| 438 | AC_TYPE_OFF_T |
| 439 | AC_TYPE_SIZE_T |
David Reiss | 847a294 | 2008-04-21 18:07:43 +0000 | [diff] [blame] | 440 | AC_TYPE_SSIZE_T |
David Reiss | 832b262 | 2007-12-28 18:25:33 +0000 | [diff] [blame] | 441 | AC_TYPE_UINT16_T |
| 442 | AC_TYPE_UINT32_T |
| 443 | AC_TYPE_UINT64_T |
| 444 | AC_TYPE_UINT8_T |
David Reiss | 33fc5ad | 2008-05-09 07:17:34 +0000 | [diff] [blame] | 445 | AC_CHECK_TYPES([ptrdiff_t], [], [exit 1]) |
David Reiss | 832b262 | 2007-12-28 18:25:33 +0000 | [diff] [blame] | 446 | |
David Reiss | 7ed4b98 | 2008-02-11 23:24:47 +0000 | [diff] [blame] | 447 | AC_STRUCT_TM |
| 448 | |
David Reiss | 85a8f7b | 2009-05-21 02:28:16 +0000 | [diff] [blame] | 449 | dnl NOTE(dreiss): AI_ADDRCONFIG is not defined on OpenBSD. |
| 450 | AC_CHECK_DECL([AI_ADDRCONFIG], [], |
| 451 | [AC_DEFINE([AI_ADDRCONFIG], 0, |
| 452 | [Define if the AI_ADDRCONFIG symbol is unavailable])], |
| 453 | [ |
| 454 | #include <sys/types.h> |
| 455 | #include <sys/socket.h> |
| 456 | #include <netdb.h> |
| 457 | ]) |
| 458 | |
David Reiss | 832b262 | 2007-12-28 18:25:33 +0000 | [diff] [blame] | 459 | AC_FUNC_ALLOCA |
Roger Meier | 213a664 | 2010-10-27 12:30:11 +0000 | [diff] [blame] | 460 | AC_FUNC_FORK |
David Reiss | 832b262 | 2007-12-28 18:25:33 +0000 | [diff] [blame] | 461 | AC_FUNC_MALLOC |
David Reiss | 7ed4b98 | 2008-02-11 23:24:47 +0000 | [diff] [blame] | 462 | AC_FUNC_MEMCMP |
David Reiss | 832b262 | 2007-12-28 18:25:33 +0000 | [diff] [blame] | 463 | AC_FUNC_REALLOC |
| 464 | AC_FUNC_SELECT_ARGTYPES |
| 465 | AC_FUNC_STAT |
| 466 | AC_FUNC_STRERROR_R |
David Reiss | 7ed4b98 | 2008-02-11 23:24:47 +0000 | [diff] [blame] | 467 | AC_FUNC_STRFTIME |
David Reiss | 832b262 | 2007-12-28 18:25:33 +0000 | [diff] [blame] | 468 | AC_FUNC_VPRINTF |
| 469 | AC_CHECK_FUNCS([strtoul]) |
| 470 | AC_CHECK_FUNCS([bzero]) |
David Reiss | 7ed4b98 | 2008-02-11 23:24:47 +0000 | [diff] [blame] | 471 | AC_CHECK_FUNCS([ftruncate]) |
David Reiss | 832b262 | 2007-12-28 18:25:33 +0000 | [diff] [blame] | 472 | AC_CHECK_FUNCS([gethostbyname]) |
| 473 | AC_CHECK_FUNCS([gettimeofday]) |
| 474 | AC_CHECK_FUNCS([memmove]) |
| 475 | AC_CHECK_FUNCS([memset]) |
| 476 | AC_CHECK_FUNCS([mkdir]) |
| 477 | AC_CHECK_FUNCS([realpath]) |
| 478 | AC_CHECK_FUNCS([select]) |
| 479 | AC_CHECK_FUNCS([socket]) |
| 480 | AC_CHECK_FUNCS([strchr]) |
| 481 | AC_CHECK_FUNCS([strdup]) |
David Reiss | 7ed4b98 | 2008-02-11 23:24:47 +0000 | [diff] [blame] | 482 | AC_CHECK_FUNCS([strerror]) |
David Reiss | 832b262 | 2007-12-28 18:25:33 +0000 | [diff] [blame] | 483 | AC_CHECK_FUNCS([strstr]) |
| 484 | AC_CHECK_FUNCS([strtol]) |
| 485 | AC_CHECK_FUNCS([sqrt]) |
David Reiss | e4ca179 | 2009-05-21 02:28:19 +0000 | [diff] [blame] | 486 | dnl The following functions are optional. |
Roger Meier | 213a664 | 2010-10-27 12:30:11 +0000 | [diff] [blame] | 487 | AC_CHECK_FUNCS([alarm]) |
David Reiss | e4ca179 | 2009-05-21 02:28:19 +0000 | [diff] [blame] | 488 | AC_CHECK_FUNCS([clock_gettime]) |
| 489 | AC_CHECK_FUNCS([sched_get_priority_min]) |
| 490 | AC_CHECK_FUNCS([sched_get_priority_max]) |
David Reiss | 832b262 | 2007-12-28 18:25:33 +0000 | [diff] [blame] | 491 | |
David Reiss | 79db3e1 | 2010-08-31 16:51:31 +0000 | [diff] [blame] | 492 | if test "$cross_compiling" = "no" ; then |
| 493 | AX_SIGNED_RIGHT_SHIFT |
| 494 | fi |
David Reiss | e4d4ea0 | 2009-04-02 21:37:17 +0000 | [diff] [blame] | 495 | |
David Reiss | 5ddabb8 | 2010-10-06 17:09:37 +0000 | [diff] [blame] | 496 | dnl autoscan thinks we need this macro because we have a member function |
| 497 | dnl called "error". Invoke the macro but don't run the check so autoscan |
| 498 | dnl thinks we are in the clear. It's highly unlikely that we will ever |
| 499 | dnl actually use the function that this checks for. |
| 500 | if false ; then |
| 501 | AC_FUNC_ERROR_AT_LINE |
| 502 | fi |
| 503 | |
Roger Meier | 213a664 | 2010-10-27 12:30:11 +0000 | [diff] [blame] | 504 | # --- Coverage hooks --- |
| 505 | |
| 506 | AC_ARG_ENABLE(coverage, |
| 507 | [ --enable-coverage turn on -fprofile-arcs -ftest-coverage], |
| 508 | [case "${enableval}" in |
| 509 | yes) ENABLE_COVERAGE=1 ;; |
| 510 | no) ENABLE_COVERAGE=0 ;; |
| 511 | *) AC_MSG_ERROR(bad value ${enableval} for --enable-cov) ;; |
| 512 | esac], |
| 513 | [ENABLE_COVERAGE=2]) |
| 514 | |
| 515 | if test "x[$]ENABLE_COVERAGE" = "x1"; then |
| 516 | AC_MSG_WARN(enable coverage) |
| 517 | GCOV_CFLAGS="`echo \"[$]CFLAGS\" | perl -pe 's/-O\d+//g;'` -fprofile-arcs -ftest-coverage" |
| 518 | GCOV_CXXFLAGS="`echo \"[$]CXXFLAGS\" | perl -pe 's/-O\d+//g;'` -fprofile-arcs -ftest-coverage" |
| 519 | GCOV_LDFLAGS="-XCClinker -fprofile-arcs -XCClinker -ftest-coverage" |
| 520 | fi |
| 521 | |
| 522 | AC_SUBST(ENABLE_COVERAGE) |
| 523 | AC_SUBST(GCOV_CFLAGS) |
| 524 | AC_SUBST(GCOV_CXXFLAGS) |
| 525 | AC_SUBST(GCOV_LDFLAGS) |
| 526 | |
Roger Meier | 3faaedf | 2011-10-02 10:51:45 +0000 | [diff] [blame] | 527 | AC_ARG_ENABLE(boostthreads, |
| 528 | [ --enable-boostthreads use boost threads, instead of POSIX pthread (experimental) ], |
| 529 | [case "${enableval}" in |
| 530 | yes) ENABLE_BOOSTTHREADS=1 ;; |
| 531 | no) ENABLE_BOOSTTHREADS=0 ;; |
| 532 | *) AC_MSG_ERROR(bad value ${enableval} for --enable-cov) ;; |
| 533 | esac], |
| 534 | [ENABLE_BOOSTTHREADS=2]) |
| 535 | |
| 536 | |
| 537 | if test "x[$]ENABLE_BOOSTTHREADS" = "x1"; then |
| 538 | AC_MSG_WARN(enable boostthreads) |
| 539 | AC_DEFINE([USE_BOOST_THREAD], [1], [experimental --enable-boostthreads that replaces POSIX pthread by boost::thread]) |
Roger Meier | 3831578 | 2011-11-06 11:29:41 +0000 | [diff] [blame] | 540 | LIBS="-lboost_thread $LIBS" |
Roger Meier | 3faaedf | 2011-10-02 10:51:45 +0000 | [diff] [blame] | 541 | fi |
| 542 | |
| 543 | AM_CONDITIONAL([WITH_BOOSTTHREADS], [test "x[$]ENABLE_BOOSTTHREADS" = "x1"]) |
| 544 | |
David Reiss | 832b262 | 2007-12-28 18:25:33 +0000 | [diff] [blame] | 545 | AC_CONFIG_HEADERS(config.h:config.hin) |
Roger Meier | 58fe536 | 2013-06-22 22:05:22 +0200 | [diff] [blame] | 546 | AC_CONFIG_HEADERS(lib/cpp/src/thrift/config.h:config.hin) |
Jake Farrell | 240df17 | 2013-06-04 23:59:34 -0400 | [diff] [blame] | 547 | # gruard against pre defined config.h |
| 548 | AH_TOP([ |
| 549 | #ifndef CONFIG_H |
| 550 | #define CONFIG_H |
| 551 | ]) |
| 552 | AH_BOTTOM([ |
| 553 | #endif |
| 554 | ]) |
| 555 | |
David Reiss | 832b262 | 2007-12-28 18:25:33 +0000 | [diff] [blame] | 556 | |
| 557 | AC_CONFIG_FILES([ |
| 558 | Makefile |
| 559 | compiler/cpp/Makefile |
Bryan Duxbury | a1e268c | 2010-05-03 21:33:00 +0000 | [diff] [blame] | 560 | compiler/cpp/version.h |
Jake Farrell | 16b7641 | 2012-06-22 03:51:38 +0000 | [diff] [blame] | 561 | compiler/cpp/src/windows/version.h |
David Reiss | 832b262 | 2007-12-28 18:25:33 +0000 | [diff] [blame] | 562 | lib/Makefile |
| 563 | lib/cpp/Makefile |
David Reiss | 351e22b | 2010-08-31 16:51:19 +0000 | [diff] [blame] | 564 | lib/cpp/test/Makefile |
David Reiss | 832b262 | 2007-12-28 18:25:33 +0000 | [diff] [blame] | 565 | lib/cpp/thrift-nb.pc |
| 566 | lib/cpp/thrift-z.pc |
Roger Meier | 86e8986 | 2012-02-10 19:53:20 +0000 | [diff] [blame] | 567 | lib/cpp/thrift-qt.pc |
Bryan Duxbury | c657447 | 2010-10-06 00:12:33 +0000 | [diff] [blame] | 568 | lib/cpp/thrift.pc |
Roger Meier | 213a664 | 2010-10-27 12:30:11 +0000 | [diff] [blame] | 569 | lib/c_glib/Makefile |
| 570 | lib/c_glib/thrift_c_glib.pc |
| 571 | lib/c_glib/test/Makefile |
David Reiss | 1fdb592 | 2008-02-06 22:10:12 +0000 | [diff] [blame] | 572 | lib/csharp/Makefile |
Jake Farrell | b95b0ff | 2012-03-22 21:49:10 +0000 | [diff] [blame] | 573 | lib/d/Makefile |
| 574 | lib/d/test/Makefile |
Bryan Duxbury | 7173bd9 | 2010-05-02 22:54:22 +0000 | [diff] [blame] | 575 | lib/erl/Makefile |
Jens Geyer | 0e87c46 | 2013-06-18 22:25:07 +0200 | [diff] [blame] | 576 | lib/go/Makefile |
Jens Geyer | a7da488 | 2013-07-18 00:33:05 +0200 | [diff] [blame] | 577 | lib/go/test/Makefile |
Anthony F. Molinaro | a5df7c7 | 2010-09-27 17:22:17 +0000 | [diff] [blame] | 578 | lib/hs/Makefile |
David Reiss | f8dcf03 | 2008-02-23 22:07:39 +0000 | [diff] [blame] | 579 | lib/java/Makefile |
Roger Meier | f249576 | 2011-03-17 19:13:36 +0000 | [diff] [blame] | 580 | lib/js/test/Makefile |
T Jake Luciani | 1952e54 | 2009-02-01 04:47:30 +0000 | [diff] [blame] | 581 | lib/perl/Makefile |
| 582 | lib/perl/test/Makefile |
Bryan Duxbury | 6a68187 | 2010-05-02 22:39:31 +0000 | [diff] [blame] | 583 | lib/php/Makefile |
Roger Meier | 33b720a | 2012-01-24 18:42:46 +0000 | [diff] [blame] | 584 | lib/php/test/Makefile |
David Reiss | 832b262 | 2007-12-28 18:25:33 +0000 | [diff] [blame] | 585 | lib/py/Makefile |
Kevin Clark | 4bd8916 | 2008-07-08 00:47:49 +0000 | [diff] [blame] | 586 | lib/rb/Makefile |
David Reiss | 8180c0c | 2008-02-04 21:14:14 +0000 | [diff] [blame] | 587 | test/Makefile |
Roger Meier | d3b9dca | 2011-06-24 14:01:10 +0000 | [diff] [blame] | 588 | test/cpp/Makefile |
Bryan Duxbury | c657447 | 2010-10-06 00:12:33 +0000 | [diff] [blame] | 589 | test/hs/Makefile |
Roger Meier | eaa61d8 | 2012-01-12 21:38:29 +0000 | [diff] [blame] | 590 | test/nodejs/Makefile |
Roger Meier | b33967b | 2012-01-21 09:18:05 +0000 | [diff] [blame] | 591 | test/php/Makefile |
Roger Meier | 01b568c | 2012-01-10 21:30:02 +0000 | [diff] [blame] | 592 | test/perl/Makefile |
David Reiss | 9ff3b9d | 2008-02-15 01:10:23 +0000 | [diff] [blame] | 593 | test/py/Makefile |
Roger Meier | 50e4349 | 2010-10-08 17:46:06 +0000 | [diff] [blame] | 594 | test/py.twisted/Makefile |
Chris Piro | 20c81ad | 2013-03-07 11:32:48 -0500 | [diff] [blame] | 595 | test/py.tornado/Makefile |
Kevin Clark | 4bd8916 | 2008-07-08 00:47:49 +0000 | [diff] [blame] | 596 | test/rb/Makefile |
Roger Meier | fa89932 | 2012-10-22 19:27:38 +0000 | [diff] [blame] | 597 | tutorial/Makefile |
Roger Meier | 18a90d1 | 2012-10-24 18:40:06 +0000 | [diff] [blame] | 598 | tutorial/cpp/Makefile |
Jens Geyer | 0e87c46 | 2013-06-18 22:25:07 +0200 | [diff] [blame] | 599 | tutorial/go/Makefile |
Roger Meier | fa89932 | 2012-10-22 19:27:38 +0000 | [diff] [blame] | 600 | tutorial/java/Makefile |
| 601 | tutorial/js/Makefile |
Roger Meier | 1d66d06 | 2012-10-26 21:46:18 +0000 | [diff] [blame] | 602 | tutorial/py/Makefile |
| 603 | tutorial/py.twisted/Makefile |
Chris Piro | 20c81ad | 2013-03-07 11:32:48 -0500 | [diff] [blame] | 604 | tutorial/py.tornado/Makefile |
Roger Meier | ed817d0 | 2013-06-09 23:10:06 +0200 | [diff] [blame] | 605 | tutorial/rb/Makefile |
David Reiss | 832b262 | 2007-12-28 18:25:33 +0000 | [diff] [blame] | 606 | ]) |
Marc Slemko | b09f588 | 2006-08-23 22:03:34 +0000 | [diff] [blame] | 607 | |
| 608 | AC_OUTPUT |
David Reiss | 5cc3ba8 | 2010-08-31 16:51:20 +0000 | [diff] [blame] | 609 | |
| 610 | |
| 611 | echo |
| 612 | echo "$PACKAGE $VERSION" |
| 613 | echo |
David Reiss | ea4c981 | 2010-08-31 16:51:21 +0000 | [diff] [blame] | 614 | echo "Building C++ Library ......... : $have_cpp" |
Roger Meier | 213a664 | 2010-10-27 12:30:11 +0000 | [diff] [blame] | 615 | echo "Building C (GLib) Library .... : $have_c_glib" |
David Reiss | 5cc3ba8 | 2010-08-31 16:51:20 +0000 | [diff] [blame] | 616 | echo "Building Java Library ........ : $have_java" |
| 617 | echo "Building C# Library .......... : $have_csharp" |
| 618 | echo "Building Python Library ...... : $have_python" |
| 619 | echo "Building Ruby Library ........ : $have_ruby" |
Anthony F. Molinaro | a5df7c7 | 2010-09-27 17:22:17 +0000 | [diff] [blame] | 620 | echo "Building Haskell Library ..... : $have_haskell" |
David Reiss | 5cc3ba8 | 2010-08-31 16:51:20 +0000 | [diff] [blame] | 621 | echo "Building Perl Library ........ : $have_perl" |
| 622 | echo "Building PHP Library ......... : $have_php" |
| 623 | echo "Building Erlang Library ...... : $have_erlang" |
Christian Lavoie | afc6d8f | 2011-02-20 02:39:19 +0000 | [diff] [blame] | 624 | echo "Building Go Library .......... : $have_go" |
Jake Farrell | b95b0ff | 2012-03-22 21:49:10 +0000 | [diff] [blame] | 625 | echo "Building D Library ........... : $have_d" |
Jake Farrell | c9c972b | 2012-07-24 17:28:24 +0000 | [diff] [blame] | 626 | |
David Reiss | 5cc3ba8 | 2010-08-31 16:51:20 +0000 | [diff] [blame] | 627 | if test "$have_cpp" = "yes" ; then |
| 628 | echo |
Roger Meier | 86e8986 | 2012-02-10 19:53:20 +0000 | [diff] [blame] | 629 | echo "C++ Library:" |
| 630 | echo " Build TZlibTransport ...... : $have_zlib" |
| 631 | echo " Build TNonblockingServer .. : $have_libevent" |
| 632 | echo " Build TQTcpServer (Qt) .... : $have_qt" |
David Reiss | 5cc3ba8 | 2010-08-31 16:51:20 +0000 | [diff] [blame] | 633 | fi |
| 634 | if test "$have_java" = "yes" ; then |
| 635 | echo |
Roger Meier | 86e8986 | 2012-02-10 19:53:20 +0000 | [diff] [blame] | 636 | echo "Java Library:" |
| 637 | echo " Using javac ............... : $JAVAC" |
| 638 | echo " Using java ................ : $JAVA" |
| 639 | echo " Using ant ................. : $ANT" |
David Reiss | 5cc3ba8 | 2010-08-31 16:51:20 +0000 | [diff] [blame] | 640 | fi |
| 641 | if test "$have_csharp" = "yes" ; then |
| 642 | echo |
Roger Meier | 86e8986 | 2012-02-10 19:53:20 +0000 | [diff] [blame] | 643 | echo "C# Library:" |
| 644 | echo " Using .NET 3.5 ............ : $net_3_5" |
David Reiss | 5cc3ba8 | 2010-08-31 16:51:20 +0000 | [diff] [blame] | 645 | fi |
| 646 | if test "$have_python" = "yes" ; then |
| 647 | echo |
Roger Meier | 86e8986 | 2012-02-10 19:53:20 +0000 | [diff] [blame] | 648 | echo "Python Library:" |
| 649 | echo " Using Python .............. : $PYTHON" |
David Reiss | 5cc3ba8 | 2010-08-31 16:51:20 +0000 | [diff] [blame] | 650 | fi |
Anthony F. Molinaro | ddcf32a | 2010-10-05 16:45:50 +0000 | [diff] [blame] | 651 | if test "$have_php" = "yes" ; then |
| 652 | echo |
Roger Meier | 86e8986 | 2012-02-10 19:53:20 +0000 | [diff] [blame] | 653 | echo "PHP Library:" |
| 654 | echo " Using php-config .......... : $PHP_CONFIG" |
Anthony F. Molinaro | ddcf32a | 2010-10-05 16:45:50 +0000 | [diff] [blame] | 655 | fi |
David Reiss | 5cc3ba8 | 2010-08-31 16:51:20 +0000 | [diff] [blame] | 656 | if test "$have_ruby" = "yes" ; then |
| 657 | echo |
Roger Meier | 86e8986 | 2012-02-10 19:53:20 +0000 | [diff] [blame] | 658 | echo "Ruby Library:" |
| 659 | echo " Using Ruby ................ : $RUBY" |
David Reiss | 5cc3ba8 | 2010-08-31 16:51:20 +0000 | [diff] [blame] | 660 | fi |
Anthony F. Molinaro | a5df7c7 | 2010-09-27 17:22:17 +0000 | [diff] [blame] | 661 | if test "$have_haskell" = "yes" ; then |
| 662 | echo |
Roger Meier | 86e8986 | 2012-02-10 19:53:20 +0000 | [diff] [blame] | 663 | echo "Haskell Library:" |
| 664 | echo " Using Haskell ............. : $RUNHASKELL" |
| 665 | echo " Using Cabal ............... : $CABAL" |
Anthony F. Molinaro | a5df7c7 | 2010-09-27 17:22:17 +0000 | [diff] [blame] | 666 | fi |
David Reiss | 5cc3ba8 | 2010-08-31 16:51:20 +0000 | [diff] [blame] | 667 | if test "$have_perl" = "yes" ; then |
| 668 | echo |
Roger Meier | 86e8986 | 2012-02-10 19:53:20 +0000 | [diff] [blame] | 669 | echo "Perl Library:" |
| 670 | echo " Using Perl ................ : $PERL" |
David Reiss | 5cc3ba8 | 2010-08-31 16:51:20 +0000 | [diff] [blame] | 671 | fi |
| 672 | if test "$have_erlang" = "yes" ; then |
| 673 | echo |
Roger Meier | 86e8986 | 2012-02-10 19:53:20 +0000 | [diff] [blame] | 674 | echo "Erlang Library:" |
| 675 | echo " Using erlc ................ : $ERLC" |
David Reiss | 5cc3ba8 | 2010-08-31 16:51:20 +0000 | [diff] [blame] | 676 | fi |
Christian Lavoie | afc6d8f | 2011-02-20 02:39:19 +0000 | [diff] [blame] | 677 | if test "$have_go" = "yes" ; then |
| 678 | echo |
Roger Meier | 86e8986 | 2012-02-10 19:53:20 +0000 | [diff] [blame] | 679 | echo "Go Library:" |
Jens Geyer | 0e87c46 | 2013-06-18 22:25:07 +0200 | [diff] [blame] | 680 | echo " Using Go................... : $GO" |
Jens Geyer | a7da488 | 2013-07-18 00:33:05 +0200 | [diff] [blame] | 681 | echo " Using Go version........... : $($GO version)" |
Christian Lavoie | afc6d8f | 2011-02-20 02:39:19 +0000 | [diff] [blame] | 682 | fi |
Jake Farrell | b95b0ff | 2012-03-22 21:49:10 +0000 | [diff] [blame] | 683 | if test "$have_d" = "yes" ; then |
| 684 | echo |
Jens Geyer | bcca1d9 | 2013-12-26 19:24:30 +0100 | [diff] [blame] | 685 | echo "D Library:" |
| 686 | echo " Using D Compiler .......... : $DMD" |
| 687 | echo " Building D libevent tests . : $with_d_event_tests" |
| 688 | echo " Building D SSL tests ...... : $with_d_ssl_tests" |
Jake Farrell | b95b0ff | 2012-03-22 21:49:10 +0000 | [diff] [blame] | 689 | fi |
David Reiss | 5cc3ba8 | 2010-08-31 16:51:20 +0000 | [diff] [blame] | 690 | echo |
| 691 | echo "If something is missing that you think should be present," |
| 692 | echo "please skim the output of configure to find the missing" |
| 693 | echo "component. Details are present in config.log." |