-
Notifications
You must be signed in to change notification settings - Fork 51
/
configure.ac
786 lines (759 loc) · 31.6 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
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
#-*-Mode:autoconf;coding:utf-8;tab-width:4;c-basic-offset:4;indent-tabs-mode:()-*-
# ex: set ft=config fenc=utf-8 sts=4 ts=4 sw=4 et nomod:
AC_INIT([CloudI], [1.7.1], [mjtruog at gmail dot com],
[cloudi], [http://cloudi.org/])
AC_SUBST(CLOUDI_CORE_RELEASE_VERSION, [1])
# paths to check for installations that are not standard but typically used
# (for any libraries that don't depend on executables for paths)
PATHS_NONSYSTEM_INC=""
AC_CHECK_FILE("/opt/local/include",
[PATHS_NONSYSTEM_INC="/opt/local/include $PATHS_NONSYSTEM_INC"])
AC_CHECK_FILE("/usr/local/include",
[PATHS_NONSYSTEM_INC="/usr/local/include $PATHS_NONSYSTEM_INC"])
PATHS_NONSYSTEM_LIB=""
AC_CHECK_FILE("/opt/local/lib",
[PATHS_NONSYSTEM_LIB="/opt/local/lib $PATHS_NONSYSTEM_LIB"])
AC_CHECK_FILE("/usr/local/lib",
[PATHS_NONSYSTEM_LIB="/usr/local/lib $PATHS_NONSYSTEM_LIB"])
AC_PREREQ([2.59])
AC_CONFIG_AUX_DIR(config)
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE([1.10 no-define no-dependencies foreign])
LT_PREREQ([2.4.2])
LT_INIT()
AC_PROG_MKDIR_P
AC_PROG_CC
AC_PROG_CXX
AC_PROG_SED
AM_PROG_CC_C_O
# now in autoconf 2.69
AC_SUBST(abs_top_srcdir, [`cd $srcdir; pwd`])
AC_SUBST(abs_top_builddir, [`pwd`])
AC_SUBST(cloudi_prefix, ["$libdir/cloudi-$VERSION"])
AC_SUBST(cloudi_logdir, ["$localstatedir/log/cloudi"])
AC_SUBST(cloudi_confdir, ["$sysconfdir/cloudi"])
AC_SUBST(cloudi_bindir, ["$cloudi_prefix/bin"])
AC_SUBST(CLOUDI_TMP_BIN_SCRIPT,
m4_maketemp(/tmp/cloudi_tmp_bin_script_XXXXXX))
AC_MSG_CHECKING([if the C CloudI API is enabled])
AC_ARG_ENABLE([c-support],
[AS_HELP_STRING([--enable-c-support],
[Enable the C CloudI API
@<:@default=yes@:>@ ])],
[
if test "x$enableval" = "xyes"; then
c_support="true"
elif test "x$enableval" = "xno"; then
c_support="false"
else
AC_MSG_ERROR([bad value "$enableval" for --enable-c-support])
fi
], [c_support="true"])
AC_MSG_RESULT([$c_support])
AC_MSG_CHECKING([if the C++ CloudI API is enabled])
AC_ARG_ENABLE([cxx-support],
[AS_HELP_STRING([--enable-cxx-support],
[Enable the C++ CloudI API
@<:@default=yes@:>@ ])],
[
if test "x$enableval" = "xyes"; then
cxx_support="true"
elif test "x$enableval" = "xno"; then
cxx_support="false"
else
AC_MSG_ERROR([bad value "$enableval" for --enable-cxx-support])
fi
], [cxx_support="true"])
if test "x$cxx_support" = "xtrue" ; then
if test "x$c_support" = "xfalse" ; then
AC_MSG_RESULT([failed])
AC_MSG_ERROR(
[--disable-c-support requires --disable-cxx-support])
fi
fi
AC_MSG_RESULT([$cxx_support])
AC_MSG_CHECKING([if the Go CloudI API is enabled])
AC_ARG_ENABLE([go-support],
[AS_HELP_STRING([--enable-go-support],
[Enable the Go CloudI API
@<:@default=no@:>@ ])],
[
if test "x$enableval" = "xyes"; then
go_support="true"
elif test "x$enableval" = "xno"; then
go_support="false"
else
AC_MSG_ERROR([bad value "$enableval" for --enable-go-support])
fi
], [go_support="false"])
AC_MSG_RESULT([$go_support])
AC_MSG_CHECKING([if the Haskell CloudI API is enabled])
AC_ARG_ENABLE([haskell-support],
[AS_HELP_STRING([--enable-haskell-support],
[Enable the Haskell CloudI API
@<:@default=no@:>@ ])],
[
if test "x$enableval" = "xyes"; then
haskell_support="true"
elif test "x$enableval" = "xno"; then
haskell_support="false"
else
AC_MSG_ERROR([bad value "$enableval" for --enable-haskell-support])
fi
], [haskell_support="false"])
AC_MSG_RESULT([$haskell_support])
AC_MSG_CHECKING([if the Java CloudI API is enabled])
AC_ARG_ENABLE([java-support],
[AS_HELP_STRING([--enable-java-support],
[Enable the Java CloudI API
@<:@default=yes@:>@ ])],
[
if test "x$enableval" = "xyes"; then
java_support="true"
elif test "x$enableval" = "xno"; then
java_support="false"
else
AC_MSG_ERROR([bad value "$enableval" for --enable-java-support])
fi
], [java_support="true"])
AC_MSG_RESULT([$java_support])
AC_MSG_CHECKING([if the JavaScript CloudI API is enabled])
AC_ARG_ENABLE([javascript-support],
[AS_HELP_STRING([--enable-javascript-support],
[Enable the JavaScript/node.js CloudI API
@<:@default=yes@:>@ ])],
[
if test "x$enableval" = "xyes"; then
javascript_support="true"
elif test "x$enableval" = "xno"; then
javascript_support="false"
else
AC_MSG_ERROR([bad value "$enableval" for --enable-javascript-support])
fi
], [javascript_support="true"])
AC_MSG_RESULT([$javascript_support])
AC_MSG_CHECKING([if the OCaml CloudI API is enabled])
AC_ARG_ENABLE([ocaml-support],
[AS_HELP_STRING([--enable-ocaml-support],
[Enable the OCaml CloudI API
@<:@default=no@:>@ ])],
[
if test "x$enableval" = "xyes"; then
ocaml_support="true"
elif test "x$enableval" = "xno"; then
ocaml_support="false"
else
AC_MSG_ERROR([bad value "$enableval" for --enable-ocaml-support])
fi
], [ocaml_support="false"])
AC_MSG_RESULT([$ocaml_support])
AC_MSG_CHECKING([if the Perl CloudI API is enabled])
AC_ARG_ENABLE([perl-support],
[AS_HELP_STRING([--enable-perl-support],
[Enable the Perl CloudI API
@<:@default=yes@:>@ ])],
[
if test "x$enableval" = "xyes"; then
perl_support="true"
elif test "x$enableval" = "xno"; then
perl_support="false"
else
AC_MSG_ERROR([bad value "$enableval" for --enable-perl-support])
fi
], [perl_support="true"])
AC_MSG_RESULT([$perl_support])
AC_MSG_CHECKING([if the PHP CloudI API is enabled])
AC_ARG_ENABLE([php-support],
[AS_HELP_STRING([--enable-php-support],
[Enable the PHP CloudI API
@<:@default=yes@:>@ ])],
[
if test "x$enableval" = "xyes"; then
php_support="true"
elif test "x$enableval" = "xno"; then
php_support="false"
else
AC_MSG_ERROR([bad value "$enableval" for --enable-php-support])
fi
], [php_support="true"])
AC_MSG_RESULT([$php_support])
AC_MSG_CHECKING([if the Python CloudI API is enabled])
AC_ARG_ENABLE([python-support],
[AS_HELP_STRING([--enable-python-support],
[Enable the Python CloudI API
@<:@default=yes@:>@ ])],
[
if test "x$enableval" = "xyes"; then
python_support="true"
elif test "x$enableval" = "xno"; then
python_support="false"
else
AC_MSG_ERROR([bad value "$enableval" for --enable-python-support])
fi
], [python_support="true"])
AC_MSG_RESULT([$python_support])
AC_MSG_CHECKING([if the Python/C CloudI API is enabled])
AC_ARG_ENABLE([python-c-support],
[AS_HELP_STRING([--enable-python-c-support],
[Enable the Python CloudI API with C integration
@<:@default=yes@:>@ ])],
[
if test "x$enableval" = "xyes"; then
python_c_support="true"
elif test "x$enableval" = "xno"; then
python_c_support="false"
else
AC_MSG_ERROR([bad value "$enableval" for --enable-python-c-support])
fi
], [python_c_support="true"])
if test "x$python_c_support" = "xtrue" ; then
if test "x$c_support" = "xfalse" ; then
AC_MSG_RESULT([failed])
AC_MSG_ERROR(
[--disable-c-support requires --disable-python-c-support])
elif test "x$cxx_support" = "xfalse" ; then
AC_MSG_RESULT([failed])
AC_MSG_ERROR(
[--disable-cxx-support requires --disable-python-c-support])
fi
fi
AC_MSG_RESULT([$python_c_support])
AC_MSG_CHECKING([if the Ruby CloudI API is enabled])
AC_ARG_ENABLE([ruby-support],
[AS_HELP_STRING([--enable-ruby-support],
[Enable the Ruby CloudI API
@<:@default=yes@:>@ ])],
[
if test "x$enableval" = "xyes"; then
ruby_support="true"
elif test "x$enableval" = "xno"; then
ruby_support="false"
else
AC_MSG_ERROR([bad value "$enableval" for --enable-ruby-support])
fi
], [ruby_support="true"])
AC_MSG_RESULT([$ruby_support])
AC_MSG_CHECKING([if the CloudI integration tests should be included])
AC_ARG_WITH([integration-tests],
[AS_HELP_STRING([--with-integration-tests@<:@=ARG@:>@],
[include the CloudI integration tests (ARG=yes),
or exclude the CloudI integration tests from
the installation (ARG=no)
@<:@ARG=yes@:>@ ])],
[
if test "x$withval" = "xno"; then
want_integration_tests="no"
elif test "x$withval" = "xyes"; then
want_integration_tests="yes"
else
AC_MSG_ERROR([--with-integration-tests needs yes or no, not $withval])
fi
],
[want_integration_tests="yes"])
if test "x$want_integration_tests" = "xyes"; then
integration_tests_included="true"
else
integration_tests_included="false"
fi
AC_MSG_RESULT([$integration_tests_included])
AM_CONDITIONAL([INTEGRATION_TESTS], [$integration_tests_included])
AC_MSG_CHECKING([if the CloudI integration tests should be ran])
AC_ARG_WITH([integration-tests-ran],
[AS_HELP_STRING([--with-integration-tests-ran@<:@=ARG@:>@],
[use the default CloudI configuration to run all the integration tests
(ARG=yes), or use a blank CloudI configuration so nothing is ran by
default within the installed CloudI configuration (ARG=no)
@<:@ARG=no@:>@ ])],
[
if test "x$withval" = "xno"; then
want_integration_tests_ran="no"
elif test "x$withval" = "xyes"; then
if test "x$want_integration_tests" = "xno"; then
AC_MSG_ERROR([--with-integration-tests-ran=yes
requires --with-integration-tests=yes])
fi
want_integration_tests_ran="yes"
else
AC_MSG_ERROR([--with-integration-tests-ran needs yes or no,
not $withval])
fi
],
[want_integration_tests_ran="no"])
if test "x$want_integration_tests_ran" = "xyes" -a \
"x$c_support" = "xtrue" -a "x$cxx_support" = "xtrue" -a \
"x$java_support" = "xtrue" -a "x$javascript_support" = "xtrue" -a \
"x$perl_support" = "xtrue" -a "x$php_support" = "xtrue" -a \
"x$python_support" = "xtrue" -a "x$python_c_support" = "xtrue" -a \
"x$ruby_support" = "xtrue" ; then
integration_tests_ran="true"
else
if test "x$want_integration_tests_ran" = "xyes" ; then
AC_MSG_ERROR([--with-integration-tests-ran=yes
requires all programming languages be enabled])
fi
integration_tests_ran="false"
fi
AC_MSG_RESULT([$integration_tests_ran])
# C requirements
# setrlimit resource values:
# IEEE Std 1003.1-2008 (“POSIX.1”)
AX_CHECK_HEADER_MACRO(sys/resource.h, RLIMIT_CORE)
AX_CHECK_HEADER_MACRO(sys/resource.h, RLIMIT_CPU)
AX_CHECK_HEADER_MACRO(sys/resource.h, RLIMIT_DATA)
AX_CHECK_HEADER_MACRO(sys/resource.h, RLIMIT_FSIZE)
AX_CHECK_HEADER_MACRO(sys/resource.h, RLIMIT_NOFILE)
AX_CHECK_HEADER_MACRO(sys/resource.h, RLIMIT_STACK)
# Common, but not standard (both BSD/SYSV)
AX_CHECK_HEADER_MACRO(sys/resource.h, RLIMIT_MEMLOCK)
AX_CHECK_HEADER_MACRO(sys/resource.h, RLIMIT_NPROC)
AX_CHECK_HEADER_MACRO(sys/resource.h, RLIMIT_RSS)
# Linux variations
# (Ubuntu)
AX_CHECK_HEADER_MACRO(sys/resource.h, RLIMIT_AS)
AX_CHECK_HEADER_MACRO(sys/resource.h, RLIMIT_MSGQUEUE)
AX_CHECK_HEADER_MACRO(sys/resource.h, RLIMIT_NICE)
AX_CHECK_HEADER_MACRO(sys/resource.h, RLIMIT_RTPRIO)
AX_CHECK_HEADER_MACRO(sys/resource.h, RLIMIT_RTTIME)
AX_CHECK_HEADER_MACRO(sys/resource.h, RLIMIT_SIGPENDING)
# (SmartOS)
AX_CHECK_HEADER_MACRO(sys/resource.h, RLIMIT_VMEM)
AC_CHECK_FUNC([chroot],
[AC_DEFINE([HAVE_CHROOT], [1],
[Define if chroot is available])])
# C++ requirements
AX_LIB_SOCKET_NSL
AX_BOOST_BASE([1.40], ,
[AC_MSG_ERROR([Boost >= 1.40 not found, see http://boost.org/])])
AX_BOOST_SYSTEM
AX_BOOST_CHECK_HEADER(boost/preprocessor.hpp, ,
[AC_MSG_ERROR([boost::preprocessor not found])], ,
$PATHS_NONSYSTEM_INC)
# C/C++ CloudI API support
if test "x$c_support" = "xtrue" -o "x$cxx_support" = "xtrue" -o \
"x$python_c_support" = "xtrue" ; then
AX_BOOST_THREAD
AX_CLOCK_GETTIME
AX_BOOST_CHECK_HEADER(boost/exception/all.hpp, ,
[AC_MSG_ERROR([boost::exception not found])], ,
$PATHS_NONSYSTEM_INC)
AX_BOOST_CHECK_HEADER(boost/unordered_map.hpp, ,
[AC_MSG_ERROR([boost::unordered_map not found])], ,
$PATHS_NONSYSTEM_INC)
# C++ CloudI API backtrace support
AC_ARG_WITH([cxx-backtrace],
[AS_HELP_STRING([--with-cxx-backtrace@<:@=ARG@:>@],
[the C++ CloudI API will provide the backtrace from
CloudI::API::backtrace() (ARG=yes),
or will not include backtrace support (ARG=no)
@<:@ARG=no@:>@ ])],
[
if test "x$withval" = "xyes"; then
AX_BACKTRACE()
elif test "x$withval" != "xno"; then
AC_MSG_ERROR([--with-cxx-backtrace needs yes or no, not $withval])
fi
])
AM_CONDITIONAL([C_SUPPORT], [true])
else
AM_CONDITIONAL([C_SUPPORT], [false])
fi
AM_CONDITIONAL([CXX_SUPPORT], [test "x$cxx_support" = "xtrue"])
# Go CloudI API support
if test "x$go_support" = "xtrue" ; then
AC_ARG_VAR([GO],[go gc executable (not gccgo)])
AC_PATH_PROGS([GO],[go])
if test "x$GO" = "x"; then
AC_MSG_ERROR([go not found])
fi
AC_SUBST(CONFIG_TESTS_GO_COUNT, ["[[{prefix, \"/tests/count/\"}, {file_path, \"$prefix/lib/cloudi-$VERSION/tests/count/count_go\"}, {dest_refresh, none}, {count_thread, 4}, {env, [{\"GOMAXPROCS\", \"4\"}]}, {options, [{nice, 10}]}]],"])
AC_SUBST(CONFIG_TESTS_GO_HTTP_REQ, ["[[{prefix, \"/tests/http_req/\"}, {file_path, \"$prefix/lib/cloudi-$VERSION/tests/http_req/http_req_go\"}, {dest_refresh, none}, {options, [{request_timeout_adjustment, true}, {nice, 10}]}]],"])
AC_SUBST(CONFIG_TESTS_GO_MESSAGING, ["[[{prefix, \"/tests/messaging/go/\"}, {file_path, \"$prefix/lib/cloudi-$VERSION/tests/messaging/messaging_go\"}, {dest_refresh, immediate_local}, {timeout_async, 10000}, {timeout_sync, 10000}, {count_thread, 4}, {env, [{\"GOMAXPROCS\", \"4\"}]}, {options, [{scope, cloudi_service_messaging_go}, {nice, 15}]}]],"])
AC_SUBST(CONFIG_TESTS_GO_MSG_SIZE, ["[[{prefix, \"/tests/msg_size/\"}, {file_path, \"$prefix/lib/cloudi-$VERSION/tests/msg_size/msg_size_go\"}, {options, [{request_timeout_adjustment, true}, {scope, cloudi_service_msg_size}, {nice, 15}]}]],"])
AC_SUBST(CONFIG_TESTS_GO_NULL, ["[[{prefix, \"/tests/null/response/\"}, {file_path, \"$prefix/lib/cloudi-$VERSION/tests/null/null_go\"}, {dest_refresh, none}, {options, [{response_timeout_immediate_max, limit_min}, {nice, 10}]}]],[[{prefix, \"/tests/null/timeout/\"}, {file_path, \"$prefix/lib/cloudi-$VERSION/tests/null/null_go\"}, {dest_refresh, none}, {options, [{response_timeout_immediate_max, limit_max}, {nice, 10}]}]],"])
fi
AM_CONDITIONAL([GO_SUPPORT], [test "x$go_support" = "xtrue"])
# Haskell CloudI API support
if test "x$haskell_support" = "xtrue" ; then
AC_ARG_VAR([GHC],[Glasgow Haskell Compiler executable])
AC_PATH_PROGS([GHC],[ghc])
if test "x$GHC" = "x"; then
AC_MSG_ERROR([Glasgow Haskell Compiler (GHC) not found])
fi
AC_ARG_VAR([CABAL],[Haskell Cabal (cabal-install) executable])
AC_PATH_PROGS([CABAL],[cabal])
if test "x$CABAL" = "x"; then
AC_MSG_ERROR([Haskell Cabal (cabal-install) not found])
fi
AC_SUBST([CABAL_SANDBOX], ["$abs_top_builddir/api/haskell/sandbox"])
AC_SUBST(CONFIG_TESTS_HASKELL_COUNT, ["[[{prefix, \"/tests/count/\"}, {file_path, \"$prefix/lib/cloudi-$VERSION/tests/count/count_haskell\"}, {dest_refresh, none}, {count_thread, 4}, {options, [{nice, 10}]}]],"])
AC_SUBST(CONFIG_TESTS_HASKELL_HTTP_REQ, ["[[{prefix, \"/tests/http_req/\"}, {file_path, \"$prefix/lib/cloudi-$VERSION/tests/http_req/http_req_haskell\"}, {dest_refresh, none}, {options, [{request_timeout_adjustment, true}, {nice, 10}]}]],"])
AC_SUBST(CONFIG_TESTS_HASKELL_MESSAGING, ["[[{prefix, \"/tests/messaging/haskell/\"}, {file_path, \"$prefix/lib/cloudi-$VERSION/tests/messaging/messaging_haskell\"}, {dest_refresh, immediate_local}, {timeout_async, 10000}, {timeout_sync, 10000}, {count_thread, 4}, {options, [{scope, cloudi_service_messaging_haskell}, {nice, 15}]}]],"])
AC_SUBST(CONFIG_TESTS_HASKELL_MSG_SIZE, ["[[{prefix, \"/tests/msg_size/\"}, {file_path, \"$prefix/lib/cloudi-$VERSION/tests/msg_size/msg_size_haskell\"}, {options, [{request_timeout_adjustment, true}, {scope, cloudi_service_msg_size}, {nice, 15}]}]],"])
AC_SUBST(CONFIG_TESTS_HASKELL_NULL, ["[[{prefix, \"/tests/null/response/\"}, {file_path, \"$prefix/lib/cloudi-$VERSION/tests/null/null_haskell\"}, {dest_refresh, none}, {options, [{response_timeout_immediate_max, limit_min}, {nice, 10}]}]],[[{prefix, \"/tests/null/timeout/\"}, {file_path, \"$prefix/lib/cloudi-$VERSION/tests/null/null_haskell\"}, {dest_refresh, none}, {options, [{response_timeout_immediate_max, limit_max}, {nice, 10}]}]],"])
fi
AM_CONDITIONAL([HASKELL_SUPPORT], [test "x$haskell_support" = "xtrue"])
# Java CloudI API support
if test "x$java_support" = "xtrue" ; then
AC_SUBST(javadir, ["$datarootdir/java"])
AC_ARG_VAR([JAVAC],[javac executable])
AC_ARG_VAR([JAVA],[java executable])
AC_ARG_VAR([JAR],[jar executable])
AC_PATH_PROG([JAVAC],[javac])
AX_PROG_JAVAC
AC_PATH_PROG([JAVA],[java])
AX_PROG_JAVA
AC_PATH_PROG([JAR],[jar])
AX_PROG_JAR
AX_CHECK_RQRD_CLASS(java.nio.ByteBuffer, ,
[AC_MSG_ERROR([java nio not found])])
AX_CHECK_RQRD_CLASS(java.lang.reflect.Constructor, ,
[AC_MSG_ERROR([java reflection not found])])
# new in jdk 5.0
AX_CHECK_RQRD_CLASS(java.util.concurrent.ExecutorService, ,
[AC_MSG_ERROR([java concurrent not found])])
fi
AM_CONDITIONAL([JAVA_SUPPORT], [test "x$java_support" = "xtrue"])
# Javascript/node.js CloudI API support
if test "x$javascript_support" = "xtrue" ; then
AC_ARG_VAR([NODE],[node executable])
AC_PATH_PROGS([NODE],[nodejs node])
if test "x$NODE" = "x" ; then
AC_MSG_ERROR([node.js not found])
fi
fi
AM_CONDITIONAL([JAVASCRIPT_SUPPORT], [test "x$javascript_support" = "xtrue"])
# OCaml CloudI API support
if test "x$ocaml_support" = "xtrue" ; then
AC_ARG_VAR([OCAMLC],[ocamlc executable])
AC_PATH_PROGS([OCAMLC],[ocamlc])
AC_ARG_VAR([OCAMLOPT],[ocamlopt executable])
AC_PATH_PROGS([OCAMLOPT],[ocamlopt])
if test "x$OCAMLC" = "x"; then
AC_MSG_ERROR([ocamlc not found])
fi
if test "x$OCAMLOPT" = "x"; then
AC_MSG_ERROR([ocamlopt not found])
fi
AC_SUBST([OCAMLFLAGS], ["-safe-string -w @A"])
AC_SUBST(CONFIG_TESTS_OCAML_COUNT, ["[[{prefix, \"/tests/count/\"}, {file_path, \"$prefix/lib/cloudi-$VERSION/tests/count/count_ocaml\"}, {dest_refresh, none}, {count_thread, 4}, {options, [{nice, 10}]}]],"])
AC_SUBST(CONFIG_TESTS_OCAML_HTTP_REQ, ["[[{prefix, \"/tests/http_req/\"}, {file_path, \"$prefix/lib/cloudi-$VERSION/tests/http_req/http_req_ocaml\"}, {dest_refresh, none}, {options, [{request_timeout_adjustment, true}, {nice, 10}]}]],"])
AC_SUBST(CONFIG_TESTS_OCAML_MESSAGING, ["[[{prefix, \"/tests/messaging/ocaml/\"}, {file_path, \"$prefix/lib/cloudi-$VERSION/tests/messaging/messaging_ocaml\"}, {dest_refresh, immediate_local}, {timeout_async, 10000}, {timeout_sync, 10000}, {count_thread, 4}, {options, [{scope, cloudi_service_messaging_ocaml}, {nice, 15}]}]],"])
AC_SUBST(CONFIG_TESTS_OCAML_MSG_SIZE, ["[[{prefix, \"/tests/msg_size/\"}, {file_path, \"$prefix/lib/cloudi-$VERSION/tests/msg_size/msg_size_ocaml\"}, {options, [{request_timeout_adjustment, true}, {scope, cloudi_service_msg_size}, {nice, 15}]}]],"])
AC_SUBST(CONFIG_TESTS_OCAML_NULL, ["[[{prefix, \"/tests/null/response/\"}, {file_path, \"$prefix/lib/cloudi-$VERSION/tests/null/null_ocaml\"}, {dest_refresh, none}, {options, [{response_timeout_immediate_max, limit_min}, {nice, 10}]}]],[[{prefix, \"/tests/null/timeout/\"}, {file_path, \"$prefix/lib/cloudi-$VERSION/tests/null/null_ocaml\"}, {dest_refresh, none}, {options, [{response_timeout_immediate_max, limit_max}, {nice, 10}]}]],"])
fi
AM_CONDITIONAL([OCAML_SUPPORT], [test "x$ocaml_support" = "xtrue"])
# Perl CloudI API support
if test "x$perl_support" = "xtrue" ; then
AC_ARG_VAR([PERL],[perl executable])
AC_PATH_PROGS([PERL],[perl])
if test "x$PERL" = "x" ; then
AC_MSG_ERROR([perl not found])
fi
fi
AM_CONDITIONAL([PERL_SUPPORT], [test "x$perl_support" = "xtrue"])
# PHP CloudI API support
if test "x$php_support" = "xtrue" ; then
AC_ARG_VAR([PHP],[php executable])
AC_PATH_PROGS([PHP],[php])
if test "x$PHP" = "x" ; then
AC_MSG_ERROR([php not found])
fi
fi
AM_CONDITIONAL([PHP_SUPPORT], [test "x$php_support" = "xtrue"])
# Python CloudI API support
if test "x$python_support" = "xtrue" -o "x$python_c_support" = "xtrue" ; then
AC_ARG_WITH([python-debug],
[AS_HELP_STRING([--with-python-debug@<:@=ARG@:>@],
[use the debug version of python libraries and the
python executable (ARG=yes), or use the normal version (ARG=no)
@<:@ARG=no@:>@ ])],
[
if test "x$withval" = "xno"; then
PYTHON_DEBUG="no"
elif test "x$withval" = "xyes"; then
PYTHON_DEBUG="yes"
else
AC_MSG_ERROR([--with-python-debug needs yes or no, not $withval])
fi
],
[PYTHON_DEBUG="no"])
AC_ARG_VAR([PYTHON],[python executable])
AC_ARG_WITH([python_version],
[AS_HELP_STRING([--with-python-version@<:@=ARG@:>@],
[specify the version of Python (ARG=2|3)
@<:@ARG=2@:>@ ])],
[
if test "$withval" = "2"; then
PYTHON_VERSION_REQUIRED="2"
elif test "$withval" = "3"; then
PYTHON_VERSION_REQUIRED="3"
else
AC_MSG_ERROR([Python version 2 or 3, not $withval])
fi
],
[PYTHON_VERSION_REQUIRED="3"])
if test "x$PYTHON_VERSION_REQUIRED" = "x2"; then
AS_IF([test "x$PYTHON_DEBUG" == "xno"],
[AC_PATH_PROGS([PYTHON],[python2 python2.7 python])],
[AC_PATH_PROGS([PYTHON],[python2-dbg python2.7-dbg python-dbg])])
AX_PROG_PYTHON_VERSION([2.7.0],
[AX_PYTHON_C],
[AC_MSG_ERROR([Python >= 2.7.0 not found])])
elif test "x$PYTHON_VERSION_REQUIRED" = "x3"; then
AS_IF([test "x$PYTHON_DEBUG" == "xno"],
[AC_PATH_PROGS([PYTHON],[python3 python3.2 python])],
[AC_PATH_PROGS([PYTHON],[python3-dbg python3.2-dbg python-dbg])])
AX_PROG_PYTHON_VERSION([3.0.0],
[AX_PYTHON_C],
[AC_MSG_ERROR([Python >= 3.0.0 not found])])
fi
AM_CONDITIONAL([PYTHON_SUPPORT], [true])
else
AM_CONDITIONAL([PYTHON_SUPPORT], [false])
fi
AM_CONDITIONAL([PYTHON_C_SUPPORT], [test "x$python_c_support" = "xtrue"])
# Ruby CloudI API support
if test "x$ruby_support" = "xtrue" ; then
AC_ARG_VAR([RUBY],[ruby executable])
AC_PATH_PROGS([RUBY],
[ruby1.9.4 ruby1.9.3 ruby1.9.2 ruby1.9.1 ruby1.9.0 ruby1.9 ruby])
AX_PROG_RUBY_VERSION([1.9.0], ,
[AC_MSG_ERROR([Ruby >= 1.9.0 not found])])
fi
AM_CONDITIONAL([RUBY_SUPPORT], [test "x$ruby_support" = "xtrue"])
# erlang checks
AC_ERLANG_NEED_ERLC()
AC_ERLANG_NEED_ERL()
AX_ERLANG_REQUIRE_OTP_VER([19.0], ,
[AC_MSG_ERROR([Erlang >= 19.0 not found])])
AC_ERLANG_SUBST_ERTS_VER
AC_ERLANG_SUBST_ROOT_DIR
AX_ERLANG_SUBST_OTP_VER
AC_ERLANG_SUBST_LIB_DIR
AC_ERLANG_CHECK_LIB([erl_interface])
AC_ERLANG_CHECK_LIB([ssl], , [AC_MSG_ERROR([Erlang ssl required for epgsql])])
AC_PATH_PROG([ESCRIPT],[escript], ,[`AS_DIRNAME([$ERLC])`])
AC_PATH_PROG([DIALYZER],[dialyzer], ,[`AS_DIRNAME([$ERLC])`])
AC_SUBST([ERLC_OPTS],
["-DERLANG_OTP_VERSION_${ERLANG_OTP_VER} -DERLANG_OTP_VERSION_${ERLANG_OTP_VER_MAJOR} -I $abs_top_srcdir/lib +debug_info +strict_validation +warn_bif_clash +warn_deprecated_function +warn_export_all +warn_export_vars +warn_exported_vars +warn_obsolete_guard +warn_shadow_vars +warn_unused_import +warn_unused_function +warn_unused_record +warn_unused_vars"])
if test "$ERLANG_OTP_VER_MAJOR" -ge 18 ; then
ERL_OPTS="+C multi_time_warp +c true"
else
ERL_OPTS=""
fi
AC_SUBST(ERL_OPTS)
# rebar dependency
AC_ARG_VAR([REBAR],[rebar executable])
AC_ARG_WITH([rebar],
[AS_HELP_STRING([--with-rebar@<:@=ARG@:>@],
[compile rebar executable for erlang dependency compilation (ARG=yes),
or use a preexisting rebar executable (ARG=no) @<:@ARG=yes@:>@ ])],
[want_rebar="$withval"], [want_rebar="yes"])
if test "x$want_rebar" = "xyes"; then
AC_CONFIG_COMMANDS([rebar],
[(cd $SRCDIR/external/rebar/ && \
$ESCRIPT bootstrap && \
mv ./rebar $BUILDDIR && \
echo "Rebar built" || exit 1)],
[ESCRIPT=$ESCRIPT
SRCDIR=$abs_top_srcdir
BUILDDIR=$abs_top_builddir])
REBAR="$abs_top_builddir/rebar"
else
AC_PATH_PROG([REBAR], [rebar], , ["$abs_top_builddir" $PATH])
if test -z "$REBAR"; then
AC_MSG_ERROR([rebar not found (use --with-rebar)])
fi
fi
AC_SUBST(REBAR)
# hexpi test
if test "x$want_integration_tests" = "xyes" -a \
"x$cxx_support" = "xtrue"; then
AX_GMP($PATHS_NONSYSTEM_INC, $PATHS_NONSYSTEM_LIB)
fi
# ZeroMQ dependency
AX_ZEROMQ($PATHS_NONSYSTEM_INC, $PATHS_NONSYSTEM_LIB)
AX_ZEROMQ_ERLZMQ($PATHS_NONSYSTEM_INC, $PATHS_NONSYSTEM_LIB)
if test "x$integration_tests_ran" = "xtrue" ; then
CLOUDI_CONF="cloudi_tests.conf"
else
CLOUDI_CONF="cloudi_minimal.conf"
fi
AC_SUBST(CLOUDI_CONF)
# Set a specific pid file path to be used
AC_ARG_VAR([CLOUDI_PID_FILE],
[CloudI pid file path
@<:@default='$localstatedir/log/cloudi/cloudi.pid'@:>@])
# Set a specific Distributed Erlang node name
AC_ARG_VAR([CLOUDI_ARG_NODE_NAME_LONG],
[CloudI distributed Erlang fully qualified node name])
AC_ARG_VAR([CLOUDI_ARG_NODE_NAME_SHORT],
[CloudI distributed Erlang short node name
@<:@default='cloudi'@:>@])
AS_IF([test -n "$CLOUDI_ARG_NODE_NAME_LONG"],
[CLOUDI_ARG_NODE_NAME="-name $CLOUDI_ARG_NODE_NAME_LONG"],
[test -n "$CLOUDI_ARG_NODE_NAME_SHORT"],
[CLOUDI_ARG_NODE_NAME="-sname $CLOUDI_ARG_NODE_NAME_SHORT"],
[CLOUDI_ARG_NODE_NAME="-sname cloudi"])
AC_SUBST(CLOUDI_ARG_NODE_NAME)
# Set a specific Distributed Erlang cookie
AC_ARG_VAR([CLOUDI_ARG_NODE_COOKIE],
[CloudI distributed Erlang cookie
@<:@default='cloudi'@:>@])
AS_IF([test -n "$CLOUDI_ARG_NODE_COOKIE"],
[CLOUDI_ARG_NODE_COOKIE="-setcookie '$CLOUDI_ARG_NODE_COOKIE'"],
[CLOUDI_ARG_NODE_COOKIE="-setcookie cloudi"])
AC_SUBST(CLOUDI_ARG_NODE_COOKIE)
AC_CONFIG_FILES([
cloudi_tests.conf
cloudi_minimal.conf
rebar_src.config
rebar_src_test.config
reltool.config
rel/files/cloudi
rel/files/erl
rel/files/nodetool
rel/files/vm.args
Makefile
lib/Makefile
lib/cloudi_core/Makefile
lib/cloudi_core/cxx_src/Makefile
lib/cloudi_core/src/cloudi_core.app.src
lib/cloudi_service_api_requests/src/cloudi_service_api_requests.app.src
lib/cloudi_service_db_mysql/src/cloudi_service_db_mysql.app.src
lib/cloudi_service_db_pgsql/src/cloudi_service_db_pgsql.app.src
lib/cloudi_service_filesystem/src/cloudi_service_filesystem.app.src
lib/cloudi_service_http_client/src/cloudi_service_http_client.app.src
lib/cloudi_service_http_cowboy/src/cloudi_service_http_cowboy.app.src
lib/cloudi_service_http_elli/src/cloudi_service_http_elli.app.src
lib/cloudi_service_http_rest/src/cloudi_service_http_rest.app.src
lib/cloudi_service_map_reduce/src/cloudi_service_map_reduce.app.src
lib/cloudi_service_monitoring/src/cloudi_service_monitoring.app.src
lib/cloudi_service_oauth1/src/cloudi_service_oauth1.app.src
lib/cloudi_service_queue/src/cloudi_service_queue.app.src
lib/cloudi_service_quorum/src/cloudi_service_quorum.app.src
lib/cloudi_service_router/src/cloudi_service_router.app.src
lib/cloudi_service_tcp/src/cloudi_service_tcp.app.src
lib/cloudi_service_udp/src/cloudi_service_udp.app.src
lib/cloudi_service_validate/src/cloudi_service_validate.app.src
lib/cloudi_service_zeromq/src/cloudi_service_zeromq.app.src
api/Makefile
api/c/Makefile
api/erlang/Makefile
api/go/Makefile
api/haskell/Makefile
api/haskell/cloudi.cabal
api/java/Makefile
api/java/org/Makefile
api/java/org/cloudi/Makefile
api/java/com/Makefile
api/java/com/ericsson/Makefile
api/java/com/ericsson/otp/Makefile
api/java/com/ericsson/otp/erlang/Makefile
api/java/jar/Makefile
api/javascript/Makefile
api/ocaml/Makefile
api/perl/Makefile
api/php/Makefile
api/python/Makefile
api/ruby/Makefile
service_api/Makefile
service_api/dashboard/Makefile
service_api/dashboard/css/Makefile
service_api/dashboard/css/images/Makefile
service_api/dashboard/js/Makefile
service_api/python/Makefile
service_api/python/jsonrpclib/Makefile
tests/Makefile
tests/count/Makefile
tests/count/c/Makefile
tests/count/erlang/Makefile
tests/count/erlang/src/Makefile
tests/count/gopath/Makefile
tests/count/haskell/Makefile
tests/count/haskell/count_haskell.cabal
tests/count/java/Makefile
tests/count/java/jar/Makefile
tests/count/java/org/Makefile
tests/count/java/org/cloudi/Makefile
tests/count/java/org/cloudi/tests/Makefile
tests/count/java/org/cloudi/tests/count/Makefile
tests/count/ocaml/Makefile
tests/echo/Makefile
tests/environment/Makefile
tests/hexpi/Makefile
tests/hexpi/cxx/Makefile
tests/hexpi/erlang/Makefile
tests/hexpi/erlang/src/Makefile
tests/http/Makefile
tests/http/java/Makefile
tests/http/java/jar/Makefile
tests/http/java/org/Makefile
tests/http/java/org/cloudi/Makefile
tests/http/java/org/cloudi/tests/Makefile
tests/http/java/org/cloudi/tests/http/Makefile
tests/http_req/Makefile
tests/http_req/c/Makefile
tests/http_req/erlang/Makefile
tests/http_req/erlang/src/Makefile
tests/http_req/gopath/Makefile
tests/http_req/haskell/Makefile
tests/http_req/haskell/http_req_haskell.cabal
tests/http_req/java/Makefile
tests/http_req/java/jar/Makefile
tests/http_req/java/org/Makefile
tests/http_req/java/org/cloudi/Makefile
tests/http_req/java/org/cloudi/tests/Makefile
tests/http_req/java/org/cloudi/tests/http_req/Makefile
tests/http_req/ocaml/Makefile
tests/messaging/Makefile
tests/messaging/cxx/Makefile
tests/messaging/erlang/Makefile
tests/messaging/erlang/src/Makefile
tests/messaging/gopath/Makefile
tests/messaging/haskell/Makefile
tests/messaging/haskell/messaging_haskell.cabal
tests/messaging/java/Makefile
tests/messaging/java/jar/Makefile
tests/messaging/java/org/Makefile
tests/messaging/java/org/cloudi/Makefile
tests/messaging/java/org/cloudi/tests/Makefile
tests/messaging/java/org/cloudi/tests/messaging/Makefile
tests/messaging/ocaml/Makefile
tests/msg_size/Makefile
tests/msg_size/cxx/Makefile
tests/msg_size/erlang/Makefile
tests/msg_size/erlang/src/Makefile
tests/msg_size/gopath/Makefile
tests/msg_size/haskell/Makefile
tests/msg_size/haskell/msg_size_haskell.cabal
tests/msg_size/java/Makefile
tests/msg_size/java/jar/Makefile
tests/msg_size/java/org/Makefile
tests/msg_size/java/org/cloudi/Makefile
tests/msg_size/java/org/cloudi/tests/Makefile
tests/msg_size/java/org/cloudi/tests/msg_size/Makefile
tests/msg_size/ocaml/Makefile
tests/null/Makefile
tests/null/c/Makefile
tests/null/erlang/Makefile
tests/null/erlang/src/Makefile
tests/null/gopath/Makefile
tests/null/haskell/Makefile
tests/null/haskell/null_haskell.cabal
tests/null/java/Makefile
tests/null/java/jar/Makefile
tests/null/java/org/Makefile
tests/null/java/org/cloudi/Makefile
tests/null/java/org/cloudi/tests/Makefile
tests/null/java/org/cloudi/tests/null_/Makefile
tests/null/ocaml/Makefile
tests/request_rate/Makefile
tests/request_rate/erlang/Makefile
tests/request_rate/erlang/src/Makefile
tests/service_api/Makefile
tests/websockets/Makefile
tests/zeromq/Makefile
])
AC_OUTPUT