forked from scalaris-team/scalaris
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
495 lines (420 loc) · 18.8 KB
/
configure.ac
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
# Copyright 2007-2015 Konrad-Zuse-Zentrum für Informationstechnik Berlin
#
# Licensed 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.65)
AC_INIT(scalaris, 0.8.2+git, scalaris@googlegroups.com)
EMAKEFILEDEFINES=
EDOCMACROS=
DIALYZER_FLAGS=
AC_PATH_PROG(FALSE, false)
AC_SUBST(FALSE)
###########################################################
#
# check tokyo cabinet and toke
#
###########################################################
ENABLE_TOKE=
TOKEPREFIX=
AC_ARG_ENABLE([toke],
AS_HELP_STRING([--disable-toke],
[disable support for tokyo cabinet through toke]),
[TOKEPREFIX=no])
AC_ARG_ENABLE([toke],
AS_HELP_STRING([--enable-toke@<:@=DIR@:>@],
[enable support for tokyo cabinet through toke]),
[ENABLE_TOKE=yes
TOKEPREFIX=$enableval])
###########################################################
#
# check browser for 'make test-vts'
#
###########################################################
BROWSER=
AC_ARG_WITH([browser],
[AS_HELP_STRING([--with-browser=BROWSER],
[absolute path of the browser to use for 'make test-vts'])],
[if test -n "$withval"; then
BROWSER="$withval"
AS_IF([test ! -x "$BROWSER"],
[AC_MSG_WARN(["$BROWSER" was not found or is not executable ('make test-vts' will likely fail)])])
fi],
[AC_PATH_PROG([BROWSER], [xdg-open])])
AC_SUBST(BROWSER)
AS_IF([test "$BROWSER" = ""],
[AC_MSG_WARN([xdg-open was not found ('make test-vts' will likely fail)])])
###########################################################
#
# check screen availability for 'scalarisctl -d --screen'
#
###########################################################
AC_PATH_PROG(SCREEN, screen, [$FALSE])
if test "$ac_cv_path_SCREEN" = "$FALSE" ; then
AC_MSG_NOTICE([screen not found - you won't be able to run scalaris deamonized with screen, i.e. 'scalarisctl -d --screen'])
fi
###########################################################
#
# check sudo, runuser availability for the init.d script
#
###########################################################
AC_PATH_PROG(SUDO, sudo, [$FALSE])
RUNUSER=""
AC_ARG_ENABLE([runuser],
AS_HELP_STRING([--disable-runuser],
[disable support for runuser (use sudo instead)]))
AS_IF([test "$enable_runuser" != "no"],
[AC_PATH_PROG(RUNUSER, runuser, "", [$PATH$PATH_SEPARATOR/usr/sbin])])
if test "$ac_cv_path_SUDO" = "$FALSE" -a "$ac_cv_path_RUNUSER" = ""; then
AC_MSG_NOTICE([sudo or runuser not found - you won't be able to use our init.d script])
fi
###########################################################
#
# check systemd support
#
###########################################################
INSTALL_INIT=install-initd
SYSTEMD_UNITDIR=
AC_ARG_WITH([systemd],
[AS_HELP_STRING([--with-systemd[[=UNITDIR]]],
[use systemd, optionally specify the directory for systemd service files])],
[if test -d "$withval"; then
SYSTEMD_UNITDIR="$withval"
INSTALL_INIT="install-systemd"
else
if test "$withval" = "yes"; then
SYSTEMD_UNITDIR="\${prefix}/lib/systemd/system/"
INSTALL_INIT="install-systemd"
fi
fi],
[])
AC_SUBST(INSTALL_INIT)
AC_SUBST(SYSTEMD_UNITDIR)
###########################################################
#
# check whether to compile to native code using HiPE
#
###########################################################
COMPILE_NATIVE=no
AC_ARG_ENABLE([native],
AS_HELP_STRING([--enable-native],
[enable compilation to native code using HiPE]),
[COMPILE_NATIVE=yes])
###########################################################
#
# check wether to enable debugging, e.g. enable the ASSERT macro
#
###########################################################
AC_ARG_ENABLE([debug],
AS_HELP_STRING([--enable-debug], [enable debugging mode]),
[AS_IF([test "no" != "$enableval"],
[EMAKEFILEDEFINES="${EMAKEFILEDEFINES}, {d, enable_debug}"
EDOCMACROS="${EDOCMACROS}, {enable_debug, true}"
DIALYZER_FLAGS="${DIALYZER_FLAGS} -Denable_debug"])])
###########################################################
#
# check erlang
#
###########################################################
AC_LANG([Erlang])
AC_ERLANG_NEED_ERLC
AC_ERLANG_NEED_ERL
AC_ERLANG_SUBST_ROOT_DIR
AC_ERLANG_SUBST_LIB_DIR
AC_CACHE_CHECK([for Erlang/OTP ERTS version],
[erlang_cv_erts_ver],
[AC_LANG_PUSH([Erlang])[]dnl
AC_RUN_IFELSE(
[AC_LANG_PROGRAM([], [dnl
Version = erlang:system_info(version),
file:write_file("conftest.out", Version),
ReturnValue = 0,
halt(ReturnValue)])],
[erlang_cv_erts_ver=`cat conftest.out`],
[AC_MSG_FAILURE([test Erlang program execution failed])])
AC_LANG_POP([Erlang])[]dnl
])
AC_SUBST([ERLANG_ERTS_VER], [$erlang_cv_erts_ver])
# split erlang erts version:
set `echo $erlang_cv_erts_ver | sed 's/\./ /g'`
ERTS_MAJOR=$1
ERTS_MINOR=$2
ERTS_MAINT=${3:-0}
# require Erlang >= R14B04, i.e. ERTS >= 5.8.5
AS_IF([test $ERTS_MAJOR -gt 5 -o \
'(' $ERTS_MAJOR -eq 5 -a $ERTS_MINOR -gt 8 ')' -o \
'(' $ERTS_MAJOR -eq 5 -a $ERTS_MINOR -eq 8 -a $ERTS_MAINT -ge 5 ')'],
[],
[AC_MSG_FAILURE([Erlang >= R14B04 required])])
AC_PATH_PROG(EPMD, epmd, [$FALSE], "$PATH:$ERLANG_ROOT_DIR/bin:$ERLANG_ROOT_DIR/erts-$ERLANG_ERTS_VER/bin")
AS_IF([test "x$COMPILE_NATIVE" != xno], [EMAKEFILEDEFINES="${EMAKEFILEDEFINES}, native"])
# required libs:
ERLANG_UNAVAILABLE_LIBS=
AC_ERLANG_CHECK_LIB(erts, , ERLANG_UNAVAILABLE_LIBS="$ERLANG_UNAVAILABLE_LIBS erts")
AC_ERLANG_CHECK_LIB(kernel, , ERLANG_UNAVAILABLE_LIBS="$ERLANG_UNAVAILABLE_LIBS kernel")
AC_CHECK_FILE($ERLANG_LIB_DIR_kernel/include/inet.hrl, ,
AC_MSG_FAILURE([kernel/include/inet.hrl not found - you won't be able to compile the erlang sources]))
AC_ERLANG_CHECK_LIB(stdlib, , ERLANG_UNAVAILABLE_LIBS="$ERLANG_UNAVAILABLE_LIBS stdlib")
AC_ERLANG_CHECK_LIB(compiler, , ERLANG_UNAVAILABLE_LIBS="$ERLANG_UNAVAILABLE_LIBS compiler")
AC_ERLANG_CHECK_LIB(crypto, , ERLANG_UNAVAILABLE_LIBS="$ERLANG_UNAVAILABLE_LIBS crypto")
AC_ERLANG_CHECK_LIB(os_mon, , ERLANG_UNAVAILABLE_LIBS="$ERLANG_UNAVAILABLE_LIBS os_mon")
AC_ERLANG_CHECK_LIB(tools, , ERLANG_UNAVAILABLE_LIBS="$ERLANG_UNAVAILABLE_LIBS tools")
AC_ERLANG_CHECK_LIB(inets, , ERLANG_UNAVAILABLE_LIBS="$ERLANG_UNAVAILABLE_LIBS inets")
AC_ERLANG_CHECK_LIB(ssl, , ERLANG_UNAVAILABLE_LIBS="$ERLANG_UNAVAILABLE_LIBS ssl")
AC_ERLANG_CHECK_LIB(xmerl, , ERLANG_UNAVAILABLE_LIBS="$ERLANG_UNAVAILABLE_LIBS xmerl")
AS_IF([test "x$ERLANG_UNAVAILABLE_LIBS" != x], AC_MSG_FAILURE([$ERLANG_UNAVAILABLE_LIBS not found - you won't be able to compile or run the erlang sources]))
# libs for optional build tasks:
AC_ERLANG_CHECK_LIB(common_test, , AC_MSG_NOTICE([erlang-common_test not found - you won't be able to run the unit tests without common_test]))
AC_ERLANG_CHECK_LIB(edoc, , AC_MSG_NOTICE([erlang-edoc not found - you won't be able to create the documentation or run 'make install']))
AC_ERLANG_CHECK_LIB(hanoidb,
[EMAKEFILEDEFINES="${EMAKEFILEDEFINES}, {d, have_hanoidb}"
EDOCMACROS="${EDOCMACROS}, {have_hanoidb, true}"
DIALYZER_FLAGS="${DIALYZER_FLAGS} -Dhave_hanoidb"],
[AC_MSG_NOTICE([erlang-hanoidb not found - you won't be able to use the db_hanoidb back-end (if configured in scalaris.hrl)])])
AC_ERLANG_CHECK_LIB(erlang_js, , AC_MSG_NOTICE([erlang_js not found - you won't be able to use JavaScript Map-Reduce jobs]))
AC_CHECK_FILE($ERLANG_LIB_DIR_common_test/priv/bin/run_test,
[RUN_TEST_FILE=$ERLANG_LIB_DIR_common_test/priv/bin/run_test],
[AC_CHECK_FILE($ac_cv_erlang_root_dir/bin/run_test,
[RUN_TEST_FILE=$ac_cv_erlang_root_dir/bin/run_test],
[AC_PATH_PROG([RUN_TEST_FILE],[run_test],"")])])
AC_CHECK_FILE($ERLANG_LIB_DIR_common_test/priv/bin/ct_run,
[CT_RUN_FILE=$ERLANG_LIB_DIR_common_test/priv/bin/ct_run],
[AC_CHECK_FILE($ac_cv_erlang_root_dir/bin/ct_run,
[CT_RUN_FILE=$ac_cv_erlang_root_dir/bin/ct_run],
[AC_PATH_PROG([CT_RUN_FILE],[ct_run],"")])])
AC_MSG_CHECKING([for unit-test runner])
if test -n "$RUN_TEST_FILE"; then
AC_SUBST(RUN_TEST,"$RUN_TEST_FILE")
AC_MSG_RESULT([$RUN_TEST_FILE])
elif test -n "$CT_RUN_FILE"; then
AC_SUBST(RUN_TEST,"$CT_RUN_FILE")
AC_MSG_RESULT([$CT_RUN_FILE])
else
AC_MSG_RESULT([neither run_test nor ct_run found - on erlang < R14 consider running install.sh in the common_test directory otherwise you won't be able to run the unit tests])
fi
ERLANG_TOKE_FLAGS=
AS_IF([test "x$TOKEPREFIX" != xno],
[
ERLANG_TOKE_MESSAGE=
AS_IF([test "x$TOKEPREFIX" != x], [export ERL_LIBS="$TOKEPREFIX"])
AC_ERLANG_CHECK_LIB(toke,
[AC_CHECK_FILE($ERLANG_LIB_DIR_toke/priv/libtoke.so,
[EMAKEFILEDEFINES="${EMAKEFILEDEFINES}, {d, have_toke}"
EDOCMACROS="${EDOCMACROS}, {have_toke, true}"
DIALYZER_FLAGS="${DIALYZER_FLAGS} -Dhave_toke"
ERLANG_TOKE_FLAGS="-pa $ERLANG_LIB_DIR_toke/ebin"
],
[ERLANG_TOKE_MESSAGE="toke library libtoke.so not found"])
],
[ERLANG_TOKE_MESSAGE="toke erlang library not found"])
AS_IF([test "x$TOKEPREFIX" != x], [export ERL_LIBS=""])
AS_IF([test "x$ERLANG_TOKE_MESSAGE" != x],
[AS_IF([test "x$ENABLE_TOKE" != xyes],
[ERLANG_TOKE_MESSAGE="$ERLANG_TOKE_MESSAGE, disabling toke support..."
AC_MSG_NOTICE($ERLANG_TOKE_MESSAGE)],
AC_MSG_FAILURE($ERLANG_TOKE_MESSAGE))])
])
AC_SUBST([ERLANG_TOKE_FLAGS])
crypto_start=`"${ERL}" -noshell -eval 'io:format("~p~n", [[crypto:start()]]), erlang:halt().' | tail -1`
AS_IF([test "${crypto_start}" = "ok"],
[AC_MSG_NOTICE([crypto:start() is available])],
[AC_MSG_FAILURE([cannot start the crypto subsystem])])
crypto_hash=`"${ERL}" -noshell -eval 'code:load_file(crypto), io:format("~p~n", [[erlang:function_exported(crypto,hash,2)]]), erlang:halt().' | tail -1`
AS_IF([test "${crypto_hash}" = "true"],
[EMAKEFILEDEFINES="${EMAKEFILEDEFINES}, {d, with_crypto_hash}"
EDOCMACROS="${EDOCMACROS}, {with_crypto_hash, true}"
DIALYZER_FLAGS="${DIALYZER_FLAGS} -Dwith_crypto_hash"
AC_MSG_NOTICE([crypto:hash/2 is available and usable])],
[AC_MSG_NOTICE([crypto:hash/2 is not available or not usable, falling back to crypto:md5/1 and crypto:sha1/1])])
ct_line=`"${ERL}" -noshell -eval 'code:load_file(ct_line), io:format("~p~n", [[erlang:function_exported(ct_line,parse_transform,2)]]), erlang:halt().' | tail -1`
AS_IF([test "${ct_line}" = "true"],
[EMAKEFILEDEFINES="${EMAKEFILEDEFINES}, {d, have_ctline_support}"
EDOCMACROS="${EDOCMACROS}, {have_ctline_support, true}"
DIALYZER_FLAGS="${DIALYZER_FLAGS} -Dhave_ctline_support"
AC_MSG_NOTICE([ct_line is available])],
[AC_MSG_NOTICE([ct_line is not available])])
AC_RUN_IFELSE(
[AC_LANG_PROGRAM([-callback init() -> ok.], [ok])],
[EMAKEFILEDEFINES="${EMAKEFILEDEFINES}, {d, have_callback_support}"
EDOCMACROS="${EDOCMACROS}, {have_callback_support, true}"
DIALYZER_FLAGS="${DIALYZER_FLAGS} -Dhave_callback_support"
AC_MSG_NOTICE([-callback is available])],
[AC_MSG_NOTICE([-callback is not available])])
###########################################################
#
# check for file:send_file/5 for yaws
#
###########################################################
YAWS_OPTIONS=
HAVE_ERLANG_SENDFILE=false
AC_MSG_CHECKING([for file:sendfile/5])
file_sendfile=`"${ERL}" -noshell -eval 'code:ensure_loaded(file), io:format("~p~n",[[erlang:function_exported(file,sendfile,5)]]), erlang:halt().' | tail -1`
if test "$file_sendfile" = true; then
AS_IF([test $ERTS_MAJOR -gt 5 -o \
'(' $ERTS_MAJOR -eq 5 -a $ERTS_MINOR -gt 9 ')' -o \
'(' $ERTS_MAJOR -eq 5 -a $ERTS_MINOR -eq 9 -a $ERTS_MAINT -ge 1 ')'],
[AC_MSG_RESULT([yes])
HAVE_ERLANG_SENDFILE=true],
[AC_MSG_RESULT([no])])
else
AC_MSG_RESULT([no])
fi
AS_IF([test "$HAVE_ERLANG_SENDFILE" = true],
[YAWS_OPTIONS=", {d, 'HAVE_ERLANG_SENDFILE'}"
YAWS_OPTIONS_DIALYZER=" -DHAVE_ERLANG_SENDFILE"
AC_MSG_NOTICE([using file:sendfile/5 for yaws])],
[YAWS_OPTIONS=""
YAWS_OPTIONS_DIALYZER=""
AC_MSG_NOTICE([using fallback gen_tcp:send/2 for yaws])])
AS_IF([test "${crypto_hash}" = "true"],
[YAWS_OPTIONS="${YAWS_OPTIONS}, {d, 'HAVE_CRYPTO_HASH'}"
YAWS_OPTIONS_DIALYZER="${YAWS_OPTIONS_DIALYZER} -DHAVE_CRYPTO_HASH"])
###########################################################
#
# all defines together...
#
###########################################################
EMAKEFILEDEFINES="${EMAKEFILEDEFINES}"
EDOCMACROS="${EDOCMACROS#, }"
DIALYZER_FLAGS="${DIALYZER_FLAGS## }${YAWS_OPTIONS_DIALYZER}"
AC_SUBST(EMAKEFILEDEFINES)
AC_SUBST(EDOCMACROS)
AC_SUBST(DIALYZER_FLAGS)
AC_SUBST(EMAKEFILECOMPILECOMPAT)
AC_SUBST(YAWS_OPTIONS)
###########################################################
#
# check java-functions, build-classpath availability for java-api/scalaris
#
###########################################################
JAVAFUNCTIONS=
AC_ARG_WITH([java-functions],
[AS_HELP_STRING([--with-java-functions=JAVAFUNCTIONS],
[use the given java-functions script for java-api/scalaris (default is /usr/share/java-utils/java-functions)])],
[with_java_functions=$withval],
[with_java_functions=/usr/share/java-utils/java-functions])
AC_CHECK_FILE($with_java_functions, [JAVAFUNCTIONS=$with_java_functions],
[JAVAFUNCTIONS=$with_java_functions
AC_MSG_WARN([java-functions was not found in "$with_java_functions" (java-api/scalaris may fail)])])
AC_SUBST(JAVAFUNCTIONS)
BUILDCLASSPATH=
AC_ARG_WITH([build-classpath],
[AS_HELP_STRING([--with-build-classpath=BUILDCLASSPATH],
[absolute path of the build-classpath script to use for java-api/scalaris])],
[if test -n "$withval"; then
BUILDCLASSPATH="$withval"
fi],
[AC_PATH_PROG([BUILDCLASSPATH], [build-classpath])])
AC_SUBST(BUILDCLASSPATH)
AS_IF([test ! -x "$BUILDCLASSPATH"],
[AC_MSG_WARN([build-classpath was not found in "$BUILDCLASSPATH" or is not executable (java-api/scalaris may fail)])])
###########################################################
#
# check ruby
#
###########################################################
ENABLERUBYINSTALL=
RUBYSITELIBDIR=
AC_ARG_WITH([ruby-sitelibdir],
[AS_HELP_STRING([--with-ruby-sitelibdir=SITELIBDIR],
[where to install ruby libraries])],
[if test -n "$withval"; then
RUBYSITELIBDIR="$withval"
ENABLERUBYINSTALL="install-ruby"
fi],
[])
AC_SUBST(ENABLERUBYINSTALL)
AC_SUBST(RUBYSITELIBDIR)
###########################################################
#
# check python, python3
#
###########################################################
PYTHON2SITELIBDIR=
ENABLEPYTHON2INSTALL=
AC_CACHE_CHECK([for python 2.x >= 2.6], [ac_cv_path_PYTHON2],
[AC_PATH_PROGS_FEATURE_CHECK([PYTHON2], [python python2],
[[$ac_path_PYTHON2 -V 2>&1 | grep "^Python 2.[6789]" > /dev/null && \
PYTHON2SITELIBDIR=`$ac_path_PYTHON2 -c 'from distutils.sysconfig import get_python_lib; print(get_python_lib(0,0,prefix="${prefix}"))' 2>/dev/null` && \
ac_cv_path_PYTHON2=$ac_path_PYTHON2 ac_path_PYTHON2_found=:]],
[AC_MSG_RESULT([not found])])])
AS_IF([test "$ac_cv_path_PYTHON2" != ""],
[PYTHON2=$ac_cv_path_PYTHON2
AC_MSG_CHECKING([for python 2.x sitelibdir])
AC_MSG_RESULT([$PYTHON2SITELIBDIR])
ENABLEPYTHON2INSTALL="install-python"],
[PYTHON2=$FALSE])
AC_SUBST(PYTHON2)
AC_SUBST(PYTHON2SITELIBDIR)
AC_SUBST(ENABLEPYTHON2INSTALL)
PYTHON3SITELIBDIR=
ENABLEPYTHON3INSTALL=
AC_CACHE_CHECK([for python 3.x], [ac_cv_path_PYTHON3],
[AC_PATH_PROGS_FEATURE_CHECK([PYTHON3], [python3 python],
[[$ac_path_PYTHON3 -V 2>&1 | grep "^Python 3." > /dev/null && \
PYTHON3SITELIBDIR=`$ac_path_PYTHON3 -c 'from distutils.sysconfig import get_python_lib; print(get_python_lib(0,0,prefix="${prefix}"))' 2>/dev/null` && \
ac_cv_path_PYTHON3=$ac_path_PYTHON3 ac_path_PYTHON3_found=:]],
[AC_MSG_RESULT([not found])])])
PYTHON3=
PYTHON3_2TO3=
ENABLEPYTHON3=python3-not-found
ENABLEPYTHON3INSTALL=
AS_IF([test "$ac_cv_path_PYTHON3" != ""],
[PYTHON3=$ac_cv_path_PYTHON3
AC_MSG_CHECKING([for python 3.x sitelibdir])
AC_MSG_RESULT([$PYTHON3SITELIBDIR])
AC_PATH_PROG([PYTHON3_2TO3], [2to3], "")
AS_IF([test -x "$PYTHON3_2TO3"],
[ENABLEPYTHON3="python3-compile"
ENABLEPYTHON3INSTALL="install-python3"],
[AC_MSG_WARN([2to3 not found - you won't be able to build the Python3 API])])],
[PYTHON3=$FALSE])
AC_SUBST(PYTHON3)
AC_SUBST(PYTHON3_2TO3)
AC_SUBST(PYTHON3SITELIBDIR)
AC_SUBST(ENABLEPYTHON3)
AC_SUBST(ENABLEPYTHON3INSTALL)
###########################################################
#
# check MACOSX vs. Linux for flexbisonparse driver
#
###########################################################
case `uname -s` in
linux*)
DRIVER_OS=LINUX
;;
Linux*)
DRIVER_OS=LINUX
;;
Darwin*)
DRIVER_OS=MACOSX
;;
darwin*)
DRIVER_OS=MACOSX
;;
esac
echo "detected OS is: '$DRIVER_OS'"
AC_SUBST(DRIVER_OS)
mkdir -p ~/.yaws 2> /dev/null
mkdir -p python3-api
cp python-api/scalaris.in python3-api/
sed -i -e "s|python-api|python3-api|g" \
-e "s|@PYTHONSITELIBDIR@|@PYTHON3SITELIBDIR@|g" \
-e "s|PYTHON2|PYTHON3|g" python3-api/scalaris.in
AC_CONFIG_FILES([Emakefile Makefile bin/scalarisctl java-api/scalaris java-api/scalaris-java.conf contrib/init.d/scalaris contrib/init.d/scalaris-monitor python-api/scalaris python3-api/scalaris ruby-api/scalaris])
AC_OUTPUT
chmod u+x bin/scalarisctl
chmod u+x java-api/scalaris
chmod u+x python-api/scalaris
chmod u+x python3-api/scalaris
chmod u+x ruby-api/scalaris
chmod u+x contrib/init.d/scalaris
chmod u+x contrib/init.d/scalaris-monitor