-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure.ac
668 lines (566 loc) · 20.2 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
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
# See doc: http://www.gnu.org/software/hello/manual/autoconf/Generic-Programs.html
# AC_PREREQ(2.59)
AC_INIT([uniset3], [3.0.0], [email protected])
AM_INIT_AUTOMAKE([subdir-objects])
LIBVER=3:0:0
AC_SUBST(LIBVER)
# AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_HEADER(uniset-config.h)
dnl Initialize maintainer mode
AM_MAINTAINER_MODE
dnl Checks for programs.
AC_PROG_INSTALL
AC_PROG_CC
AC_PROG_CXX
AC_PROG_CPP
AC_LANG_CPLUSPLUS
AC_PROG_LN_S
AC_PROG_MAKE_SET
dnl Initialize libtool
AC_DISABLE_STATIC
AC_ENABLE_SHARED(yes)
AC_ENABLE_STATIC(no)
AM_PROG_LIBTOOL
ASTYLE_OPT="-A1 -T -C -S -L -w -N -Y -M -f -p --mode=c --lineend=linux --align-reference=type --align-pointer=type --suffix=none --style=ansi --convert-tabs -s4"
AC_SUBST(ASTYLE_OPT)
# Checks for libraries.
PKG_CHECK_MODULES(XML, libxml-2.0)
PKG_CHECK_MODULES(SIGC, sigc++-2.0)
PKG_CHECK_MODULES(PROTOBUF, protobuf)
AC_PATH_PROG([GRPC_CPP_PLUGIN], [grpc_cpp_plugin])
test "x$GRPC_CPP_PLUGIN" = "x" && AC_MSG_ERROR([*** grpc_cpp_plugin not found.])
AC_SUBST(GRPC_CPP_PLUGIN)
AC_PATH_PROG([PROTOC], [protoc])
test "x$PROTOC" = "x" && AC_MSG_ERROR([*** protoc not found.])
PKG_CHECK_MODULES(GRPC, grpc++)
checklibev=true
PKG_CHECK_MODULES(EV, libev, [ checklibev=false; ], [ checklibev=true; ])
if test $checklibev = true; then
AC_CHECK_HEADER(ev++.h,,exit)
AC_SEARCH_LIBS(ev_run,ev,[],[],exit)
EV_LIBS="-lev"
EV_CFLAGS=
AC_SUBST(EV_LIBS)
AC_SUBST(EV_CFLAGS)
AC_MSG_RESULT([ok])
fi
#check rest api support
AC_MSG_CHECKING([REST API support])
buildapi=true
AC_ARG_ENABLE(api, AC_HELP_STRING([--disable-api], [disable REST API support]),
[ if test $enableval = yes; then buildapi=true; else buildapi=false; fi],[ buildapi=true; ])
REST_API_CFLAGS=
REST_API_CLIBS=
DISABLE_REST_API=
if test ${buildapi} = true; then
AC_MSG_RESULT([enabled])
REST_API_CLIBS="-lPocoJSON"
else
AC_MSG_RESULT([disabled])
REST_API_CFLAGS="-DDISABLE_REST_API"
DISABLE_REST_API=1
fi
AM_CONDITIONAL(DISABLE_REST_API, test ${buildapi} = false)
AM_CONDITIONAL(ENABLE_REST_API, test ${buildapi} = true)
AC_SUBST(DISABLE_REST_API)
AC_SUBST(REST_API_CFLAGS)
AC_SUBST(REST_API_CLIBS)
#check libpoco support
AC_MSG_CHECKING([libpoco support])
#AC_SEARCH_LIBS(ServerSocket,PocoNet,,exit)
AC_CHECK_HEADER(Poco/Net/Socket.h,,exit)
POCO_LIBS="-lPocoFoundation -lPocoNet"
if test ${buildapi} = true; then
POCO_LIBS="$POCO_LIBS -lPocoJSON"
fi
POCO_CFLAGS="-IPoco"
AC_SUBST(POCO_LIBS)
AC_SUBST(POCO_CFLAGS)
poco_old=
AC_CHECK_HEADERS([Poco/Version.h],,poco_old=1)
if test -n "$poco_old"; then
POCO_CFLAGS="${POCO_CFLAGS} -DPOCO_OLD_VERSION"
fi
#AC_MSG_CHECKING([check json])
#if test -a "/usr/include/json.hpp"; then
# AC_MSG_RESULT([ok])
#else
# AC_MSG_ERROR([json.hpp not found])
#fi
#check sqlite support
AC_MSG_CHECKING([sqlite support])
buildsqlite=true
AC_ARG_ENABLE(sqlite, AC_HELP_STRING([--disable-sqlite], [disable SQLite support]),
[ if test $enableval = yes; then buildsqlite=true; else buildsqlite=false; fi],[ buildsqlite=true; ])
if test ${buildsqlite} = true; then
AC_MSG_RESULT([enabled])
PKG_CHECK_MODULES(SQLITE3, sqlite3)
else
AC_MSG_RESULT([disabled])
fi
AM_CONDITIONAL(DISABLE_SQLITE, test ${buildsqlite} = false)
AM_CONDITIONAL(ENABLE_SQLITE, test ${buildsqlite} = true)
# check xsltproc
AC_CHECK_PROG([XSLTPROC],[xsltproc],[yes])
test "x$XSLTPROC" = "x" && AC_MSG_ERROR([*** xsltproc not found.])
#check mysql support
AC_MSG_CHECKING([mysql support])
buildmysql=true
AC_ARG_ENABLE(mysql, AC_HELP_STRING([--disable-mysql], [disable MySQL support]),
[ if test $enableval = yes; then buildmysql=true; else buildmysql=false; fi],[ buildmysql=true; ])
if test ${buildmysql} = true; then
AC_MSG_RESULT([enabled])
AC_CHECK_HEADERS([mysql/mysql.h])
AC_CHECK_LIB([mysqlclient],mysql_init,,exit)
else
AC_MSG_RESULT([disabled])
fi
AM_CONDITIONAL(DISABLE_MYSQL, test ${buildmysql} = false)
AM_CONDITIONAL(ENABLE_MYSQL, test ${buildmysql} = true)
#check pgsql support
AC_MSG_CHECKING([postgresql support])
buildpgsql=true
AC_ARG_ENABLE(pgsql, AC_HELP_STRING([--disable-pgsql], [disable PostgreSQL support]),
[ if test $enableval = yes; then buildpgsql=true; else buildpgsql=false; fi],[ buildpgsql=true; ])
if test ${buildpgsql} = true; then
AC_MSG_RESULT([enabled])
PKG_CHECK_MODULES(PGSQL,libpqxx)
AC_SUBST(PGSQL_LIBS)
AC_SUBST(PGSQL_CFLAGS)
else
AC_MSG_RESULT([disabled])
fi
AM_CONDITIONAL(DISABLE_PGSQL, test ${buildpgsql} = false)
AM_CONDITIONAL(ENABLE_PGSQL, test ${buildpgsql} = true)
#check opentsdb support
AC_MSG_CHECKING([OpenTSDB backend])
buildtsdb=true
AC_ARG_ENABLE(opentsdb, AC_HELP_STRING([--disable-opentsdb], [disable OpenTSDB backend]),
[ if test $enableval = yes; then buildtsdb=true; else buildtsdb=false; fi],[ buildtsdb=true; ])
if test ${buildtsdb} = true; then
AC_MSG_RESULT([enabled])
else
AC_MSG_RESULT([disabled])
fi
AM_CONDITIONAL(DISABLE_OPENTSDB, test ${buildtsdb} = false)
AM_CONDITIONAL(ENABLE_OPENTSDB, test ${buildtsdb} = true)
#check clickhouse support
AC_MSG_CHECKING([clickhouse support])
buildclickhouse=true
AC_ARG_ENABLE(clickhouse, AC_HELP_STRING([--disable-clickhouse], [disable ClickHouse support]),
[ if test $enableval = yes; then buildclickhouse=true; else buildclickhouse=false; fi],[ buildclickhouse=true; ])
CLICKHOUSE_LIBS=
CLICKHOUSE_CFLAGS=
if test ${buildclickhouse} = true; then
AC_MSG_RESULT([enabled])
#CPPFLAGS="${CPPFLAGS} -I/usr/include/clickhouse-cpp"
AC_CHECK_HEADER(/usr/include/clickhouse-cpp/client.h,,exit)
CLICKHOUSE_LIBS="-lclickhouse-cpp"
CLICKHOUSE_CFLAGS="-I/usr/include/clickhouse-cpp"
else
AC_MSG_RESULT([disabled])
fi
AM_CONDITIONAL(DISABLE_CLICKHOUSE, test ${buildclickhouse} = false)
AM_CONDITIONAL(ENABLE_CLICKHOUSE, test ${buildclickhouse} = true)
AC_SUBST(CLICKHOUSE_LIBS)
AC_SUBST(CLICKHOUSE_CFLAGS)
#check opc-ua support
AC_MSG_CHECKING([opc-ua support])
buildopcua=true
AC_ARG_ENABLE(opcua, AC_HELP_STRING([--disable-opcua], [disable OPC-UA support]),
[ if test $enableval = yes; then buildopcua=true; else buildopcua=false; fi],[ buildopcua=true; ])
if test ${buildopcua} = true; then
AC_MSG_RESULT([enabled])
PKG_CHECK_MODULES(OPEN62541PP, open62541pp)
PKG_CHECK_MODULES(OPEN62541, open62541)
else
AC_MSG_RESULT([disabled])
fi
AM_CONDITIONAL(DISABLE_OPCUA, test ${buildopcua} = false)
AM_CONDITIONAL(ENABLE_OPCUA, test ${buildopcua} = true)
#check io support
AC_MSG_CHECKING([io support])
buildio=true
AC_ARG_ENABLE(io, AC_HELP_STRING([--disable-io], [disable IO support]),
[ if test $enableval = yes; then buildio=true; else buildio=false; fi],[ buildio=true; ])
if test ${buildio} = true; then
AC_MSG_RESULT([enabled])
# check comedilib
PKG_CHECK_MODULES(COMEDI,comedilib)
AC_SUBST(COMEDI_LIBS)
AC_SUBST(COMEDI_CFLAGS)
else
AC_MSG_RESULT([disabled])
fi
AM_CONDITIONAL(DISABLE_IO, test ${buildio} = false)
AM_CONDITIONAL(ENABLE_IO, test ${buildio} = true)
#check sys/io.h support
AC_MSG_CHECKING([sys/io.h support])
buildcom485f=true
#AC_CHECK_HEADERS
AC_ARG_ENABLE(com485f, AC_HELP_STRING([--disable-com485f], [disable sys/io.h support]),
[ if test $enableval = yes; then buildcom485f=true; else buildcom485f=false; fi],[ buildcom485f=true; ])
COMPORT_485F_CFLAGS=
COMPORT_485F_CLIBS=
DISABLE_COMPORT_485F=
if test ${buildcom485f} = true; then
AC_MSG_RESULT([enabled])
else
AC_MSG_RESULT([disabled])
COMPORT_485F_CFLAGS="-DDISABLE_COMPORT_485F"
DISABLE_COMPORT_485F=1
fi
AM_CONDITIONAL(DISABLE_COMPORT_485F, test ${buildcom485f} = false)
AC_SUBST(DISABLE_COMPORT_485F)
AC_SUBST(COMPORT_485F_CFLAGS)
#AC_SUBST(COMPORT_485F_CLIBS)
#check logicproc build
AC_MSG_CHECKING([build logic processor extension])
buildlproc=true
AC_ARG_ENABLE(logicproc, AC_HELP_STRING([--disable-logicproc], [disable build LogicProcessor extension]),
[ if test $enableval = yes; then buildlproc=true; else buildlproc=false; fi],[ buildlproc=true; ])
if test ${buildlproc} = true; then
AC_MSG_RESULT([enabled])
else
AC_MSG_RESULT([disabled])
fi
AM_CONDITIONAL(DISABLE_LOGICPROC, test ${buildlproc} = false)
AM_CONDITIONAL(ENABLE_LOGICPROC, test ${buildlproc} = true)
#check build extensions
ext=true
AC_MSG_CHECKING([Extensions])
AC_ARG_ENABLE(extensions,AC_HELP_STRING([--disable-extensions], [disable build uniset extensions]),
[ if test $enableval = yes; then ext=true; else ext=false; fi],[ ext=true; ])
if test ${ext} = true; then
AC_MSG_RESULT([enabled])
else
AC_MSG_RESULT([disabled])
fi
AM_CONDITIONAL(HAVE_EXTENTIONS, test ${ext} = true)
#check python support
AC_MSG_CHECKING([python support])
buildpython=true
AC_ARG_ENABLE(python, AC_HELP_STRING([--disable-python], [disable Python support]),
[ if test $enableval = yes; then buildpython=true; else buildpython=false; fi],[ buildpython=true; ])
if test ${buildpython} = true; then
AC_MSG_RESULT([enabled])
AM_PATH_PYTHON(3.0)
dnl Python
PKG_CHECK_MODULES(PYTHON,python3,,exit)
# AC_CHECK_PROG(SWIG, swig, yes, exit)
AC_MSG_CHECKING([netdata python plugin])
netdata=true
AC_ARG_ENABLE(netdata,AC_HELP_STRING([--disable-netdata], [disable build netdata python plugin]),
[ if test $enableval = yes; then netdata=true; else netdata=false; fi],[ netdata=true; ])
if test ${netdata} = true; then
AC_MSG_RESULT([enabled])
else
AC_MSG_RESULT([disabled])
fi
AM_CONDITIONAL(HAVE_NETDATA, test ${netdata} = true)
else
AC_MSG_RESULT([disabled])
AM_CONDITIONAL(HAVE_NETDATA, false)
fi
AM_CONDITIONAL(DISABLE_PYTHON, test ${buildpython} = false)
AM_CONDITIONAL(ENABLE_PYTHON, test ${buildpython} = true)
#check mqtt support
AC_MSG_CHECKING([mqtt support])
buildmqtt=true
AC_ARG_ENABLE(mqtt, AC_HELP_STRING([--disable-mqtt], [disable MQTT support]),
[ if test $enableval = yes; then buildmqtt=true; else buildmqtt=false; fi],[ buildmqtt=true; ])
if test ${buildmqtt} = true; then
AC_MSG_RESULT([enabled])
AC_CHECK_HEADER(mosquittopp.h)
MQTT_LIBS=-lmosquittopp
MQTT_CFLAGS=
AC_SUBST(MQTT_LIBS)
AC_SUBST(MQTT_CFLAGS)
else
AC_MSG_RESULT([disabled])
fi
AM_CONDITIONAL(DISABLE_MQTT, test ${buildmqtt} = false)
AM_CONDITIONAL(ENABLE_MQTT, test ${buildmqtt} = true)
# check Doxygen
DOXYGEN=""
docs=false
dox=
AC_MSG_CHECKING([Generate docs])
AC_ARG_ENABLE(docs,AC_HELP_STRING([--enable-docs], [enable build docs]),
[ if test $enableval = yes; then docs=true; else docs=false; fi],[ docs=false; ])
if test ${docs} = true; then
AC_MSG_RESULT([yes])
AC_PATH_PROG([DOXYGEN], [doxygen])
test "x$DOXYGEN" = "x" && AC_MSG_WARN([*** Doxygen not found])
else
DOXYGEN=
AC_MSG_RESULT([no])
fi
AC_SUBST(DOXYGEN)
AM_CONDITIONAL(HAVE_DOXYGEN, test x$DOXYGEN != x)
if test "x$UNISET_CODEGEN" = x ; then
UNISET_CODEGEN="sh \$(top_builddir)/Utilities/codegen/uniset3-codegen --path \$(top_builddir)/Utilities/codegen/"
fi
AC_SUBST(UNISET_CODEGEN)
echo "UNISET_CODEGEN: $UNISET_CODEGEN"
UNISET_CFLAGS="-I \$(top_builddir) -I \$(top_builddir)/include"
AC_SUBST(UNISET_CFLAGS)
UNISET_LIBS="\$(top_builddir)/lib/libUniSet3.la"
AC_SUBST(UNISET_LIBS)
UNISET_EXT_CFLAGS="-I \$(top_builddir)/extensions/include"
AC_SUBST(UNISET_EXT_CFLAGS)
UNISET_EXT_LIBS="\$(top_builddir)/extensions/lib/libUniSet3Extensions.la"
AC_SUBST(UNISET_EXT_LIBS)
#AC_LANG_PUSH([C++])
#AC_CHECK_HEADERS([catch.hpp],,exit)
#AC_LANG_POP([C++])
CATCH_VERSION_MAJOR=1
CATCH_CFLAGS="-I\$(top_builddir)/contrib/catch2"
CATCH_FILE="contrib/catch2/catch.hpp"
AC_MSG_CHECKING([catch version in $CATCH_FILE])
CATCH_RESULT=
if cat ${CATCH_FILE} | grep -q "Catch v2."; then
CATCH_VERSION_MAJOR=2;
fi
AC_MSG_RESULT([$CATCH_VERSION_MAJOR])
#check logdb support
AC_MSG_CHECKING([logdb build])
buildlogdb=true
AC_ARG_ENABLE(logdb, AC_HELP_STRING([--disable-logdb], [disable LogDB build]),
[ if test $enableval = yes; then buildlogdb=true; else buildlogdb=false; fi],[ buildlogdb=true; ])
if test ${buildsqlite} = true; then
if test ${buildlogdb} = true; then
AC_MSG_RESULT([enabled])
else
AC_MSG_RESULT([disabled])
fi
else
buildlogdb=false
AC_MSG_RESULT([disabled (sqlite disabled)])
fi
AM_CONDITIONAL(DISABLE_LOGDB, test ${buildlogdb} = false)
AM_CONDITIONAL(ENABLE_LOGDB, test ${buildlogdb} = true)
#check uwebsocket
AC_MSG_CHECKING([uwebsocket build])
uwebsocket=true
AC_ARG_ENABLE(uwebsocket, AC_HELP_STRING([--disable-uwebsocket], [disable UWebSocketGate build]),
[ if test $enableval = yes; then uwebsocket=true; else uwebsocket=false; fi],[ uwebsocket=true; ])
if test ${buildapi} = true; then
if test ${uwebsocket} = true; then
AC_MSG_RESULT([enabled])
else
AC_MSG_RESULT([disabled])
fi
else
uwebsocket=false
AC_MSG_RESULT([disabled (uwebsocketgate disabled)])
fi
AM_CONDITIONAL(DISABLE_UWEBSOCKETGATE, test ${uwebsocket} = false)
AM_CONDITIONAL(ENABLE_UWEBSOCKETGATE, test ${uwebsocket} = true)
COV_LIBS=
COV_CFLAGS=
AC_MSG_CHECKING([tests support])
buildtests=true
buildgcov=false
AC_ARG_ENABLE(tests, AC_HELP_STRING([--disable-tests], [disable tests build]),
[ if test $enableval = yes; then buildtests=true; else buildtests=false; fi],[ buildtests=true; ])
if test ${buildtests} = true; then
AC_MSG_RESULT([yes])
# AC_LANG_PUSH([C++])
# AC_CHECK_HEADERS([catch.hpp],,exit)
# AC_LANG_POP([C++])
dnl Initialize test suite
AC_CONFIG_TESTDIR(testsuite)
AC_CONFIG_TESTDIR(tests)
AC_CONFIG_TESTDIR(extensions/tests)
AC_CONFIG_TESTDIR(extensions/LogicProcessor/tests)
AC_CONFIG_TESTDIR(extensions/ModbusSlave/tests)
AC_CONFIG_TESTDIR(extensions/ModbusMaster/tests)
AC_CONFIG_TESTDIR(extensions/UNetUDP/tests)
AC_CONFIG_TESTDIR(extensions/SharedMemory/tests)
AC_CONFIG_TESTDIR(extensions/IOControl/tests)
AC_CONFIG_TESTDIR(extensions/LogDB/tests)
AC_CONFIG_TESTDIR(extensions/Backend-ClickHouse/tests)
AC_CONFIG_TESTDIR(extensions/URepository/tests)
AC_CONFIG_TESTDIR(extensions/HttpAPIGateway/tests)
AC_CONFIG_TESTDIR(extensions/UWebSocketGate/tests)
AC_CONFIG_TESTDIR(extensions/OPCUAServer/tests)
AC_CONFIG_TESTDIR(extensions/OPCUAExchange/tests)
TESTSUITE_DIR="\$(top_builddir)/testsuite"
AC_SUBST(TESTSUITE_DIR)
#check gcov
AC_MSG_CHECKING([test coverage])
AC_ARG_ENABLE(coverage, AC_HELP_STRING([--enable-coverage], [enable gcov support]),
[ if test $enableval = yes; then buildgcov=true; else buildgcov=false; fi],[])
if test ${buildgcov} = true; then
AC_MSG_RESULT([yes])
COV_LIBS="-lgcov"
COV_CFLAGS="-fprofile-arcs -ftest-coverage -g -ggdb"
AC_PATH_PROG([LCOV], [lcov])
test "x$LCOV" = "x" && AC_MSG_ERROR([*** lcov not found (install lcov or use --disable-coverage)])
AC_SUBST(LCOV)
AC_PATH_PROG([LCOV_GENHTML], [genhtml])
test "x$LCOV_GENHTML" = "x" && AC_MSG_ERROR([*** genhtml not found (install lcov or use --disable-coverage)])
AC_SUBST(LCOV_GENHTML)
else
AC_MSG_RESULT([no])
fi
else
AC_MSG_RESULT([no])
fi
AC_SUBST(COV_LIBS)
AC_SUBST(COV_CFLAGS)
AM_CONDITIONAL(HAVE_COVERAGE, test ${buildgcov} = true)
AM_CONDITIONAL(HAVE_TESTS, test ${buildtests} = true)
# -D_GLIBCXX_USE_NANOSLEEP - for std::this_thread::sleep_for
# -Weffc++ -Wno-unused-variable -Werror -Wctor-dtor-privacy
CXX_EXTRA_FLAGS="-Wnon-virtual-dtor -Woverloaded-virtual -Woverflow -D_GLIBCXX_USE_NANOSLEEP -fstack-protector"
# export
LDFLAGS="$LDFLAGS ${GRPC_LIBS} ${PROTOBUF_LIBS} ${XML_LIBS} ${SIGC_LIBS} ${COV_LIBS} ${POCO_LIBS} ${EV_LIBS}"
# all developer liked options add to autogen.sh, please
CXXFLAGS="-I\$(top_builddir)/include $CXXFLAGS -funsigned-char -g ${CATCH_CFLAGS} -D_GNU_SOURCE ${REST_API_CFLAGS} ${COMPORT_485F_CFLAGS} ${GRPC_CFLAGS} ${PROTOBUF_CFLAGS} ${XML_CFLAGS} ${SIGC_CFLAGS} ${COV_CFLAGS} ${POCO_CFLAGS} ${EV_CFLAGS} $CXX_EXTRA_FLAGS"
AC_SUBST(LDFLAGS)
AC_SUBST(CXXFLAGS)
# check of platform (32bit or 64 bit)
SIZE_OF_TRANSPORT_MESSAGE=85
AC_MSG_CHECKING([test 64-bit OS])
AC_TRY_COMPILE([],[int assert[(sizeof(long) == 8) ? 1: -1]], result="yes", result="no")
AC_MSG_RESULT($result)
if test "$result" = "yes"; then
SIZE_OF_TRANSPORT_MESSAGE=160
fi
AC_SUBST(SIZE_OF_TRANSPORT_MESSAGE)
# Checks for header files.
AC_HEADER_DIRENT
AC_HEADER_STDC
AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS([fcntl.h sys/time.h sys/socket.h syslog.h termios.h unistd.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_STDBOOL
AC_C_CONST
AC_TYPE_SIZE_T
AC_HEADER_TIME
AC_STRUCT_TM
AC_C_VOLATILE
# Checks for library functions.
#AC_FUNC_CLOSEDIR_VOID
#AC_FUNC_ERROR_AT_LINE
#AC_FUNC_MALLOC
AC_FUNC_SELECT_ARGTYPES
AC_TYPE_SIGNAL
AC_CHECK_FUNCS([atexit getcwd])
AC_CONFIG_FILES([Makefile
libUniSet3.pc
lib/Makefile
proto/Makefile
proto/UniSetTypes/Makefile
proto/Processes/Makefile
proto/Log/Makefile
contrib/Makefile
contrib/cityhash102/Makefile
contrib/murmurhash/Makefile
src/Core/Makefile
src/Communications/Makefile
src/Communications/Modbus/Makefile
src/Communications/TCP/Makefile
src/Communications/Http/Makefile
src/Communications/GRPC/Makefile
src/ObjectRepository/Makefile
src/Processes/Makefile
src/Services/Makefile
src/Timers/Makefile
src/Various/Makefile
src/Log/Makefile
src/Makefile
include/Makefile
include/modbus/Makefile
tests/Makefile
tests/UniXmlTest/Makefile
tests/MQPerfTest/Makefile
tests/GRPCTest/Makefile
tests/PocoTest/Makefile
tests/UHttpTest/Makefile
tests/TCPSocketTest/Makefile
tests/Open62541Test/Makefile
docs/Makefile
docs/UniSetDox.cfg
docs/UniSetDoxDevel.cfg
Utilities/Makefile
Utilities/scripts/Makefile
Utilities/Admin/Makefile
Utilities/NullController/Makefile
Utilities/SViewer-text/Makefile
Utilities/SMonit/Makefile
Utilities/MBTester/Makefile
Utilities/SImitator/Makefile
Utilities/codegen/Makefile
Utilities/codegen/uniset3-codegen
Utilities/codegen/tests/Makefile
Utilities/ULog/Makefile
extensions/Makefile
extensions/libUniSet3Extensions.pc
extensions/lib/Makefile
extensions/include/Makefile
extensions/DBServer-MySQL/Makefile
extensions/DBServer-MySQL/libUniSet3MySQL.pc
extensions/DBServer-SQLite/Makefile
extensions/DBServer-SQLite/libUniSet3SQLite.pc
extensions/DBServer-PostgreSQL/Makefile
extensions/DBServer-PostgreSQL/libUniSet3PostgreSQL.pc
extensions/IOControl/Makefile
extensions/IOControl/libUniSet3IOControl.pc
extensions/IOControl/tests/Makefile
extensions/ModbusMaster/Makefile
extensions/ModbusMaster/libUniSet3RTU.pc
extensions/ModbusMaster/libUniSet3MBTCPMaster.pc
extensions/ModbusMaster/tests/Makefile
extensions/ModbusSlave/Makefile
extensions/ModbusSlave/libUniSet3MBSlave.pc
extensions/ModbusSlave/tests/Makefile
extensions/ModbusSlave/epoll-test/Makefile
extensions/LogicProcessor/Makefile
extensions/LogicProcessor/libUniSet3LogicProcessor.pc
extensions/LogicProcessor/tests/Makefile
extensions/SMViewer/Makefile
extensions/UNetUDP/Makefile
extensions/UNetUDP/libUniSet3UNetUDP.pc
extensions/UNetUDP/proto/Makefile
extensions/UNetUDP/tests/Makefile
extensions/SharedMemory/Makefile
extensions/SharedMemory/tests/Makefile
extensions/SharedMemory/libUniSet3SharedMemory.pc
extensions/MQTTPublisher/Makefile
extensions/MQTTPublisher/libUniSet3MQTTPublisher.pc
extensions/Backend-OpenTSDB/Makefile
extensions/Backend-OpenTSDB/libUniSet3BackendOpenTSDB.pc
extensions/Backend-ClickHouse/Makefile
extensions/Backend-ClickHouse/uniset3-clickhouse-admin
extensions/Backend-ClickHouse/libUniSet3BackendClickHouse.pc
extensions/Backend-ClickHouse/tests/Makefile
extensions/tests/Makefile
extensions/tests/MQPerfTest/Makefile
extensions/LogDB/Makefile
extensions/LogDB/tests/Makefile
extensions/URepository/Makefile
extensions/URepository/tests/Makefile
extensions/UWebSocketGate/Makefile
extensions/UWebSocketGate/tests/Makefile
extensions/UWebSocketGate/libUniSet3UWebSocketGate.pc
extensions/OPCUAServer/Makefile
extensions/OPCUAServer/tests/Makefile
extensions/OPCUAServer/libUniSet3OPCUAServer.pc
extensions/OPCUAExchange/Makefile
extensions/OPCUAExchange/tests/Makefile
extensions/OPCUAExchange/libUniSet3OPCUAExchange.pc
extensions/HttpAPIGateway/Makefile
extensions/HttpAPIGateway/tests/Makefile
extensions/HttpAPIGateway/libUniSet3HttpAPIGateway.pc
testsuite/Makefile
wrappers/Makefile
wrappers/python/lib/Makefile
wrappers/python/lib/lib/Makefile
wrappers/python/netdata-plugin/Makefile
wrappers/python/Makefile])
AC_OUTPUT