forked from 42ity/fty-metric-cache
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure.ac
1185 lines (1035 loc) · 46.7 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
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
################################################################################
# THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY #
# Read the zproject/README.md for information about making permanent changes. #
################################################################################
# Note: if your project needs a customized configure script (compared to
# the code below 100% generated by zproject), please check first if your
# use-case can be handled by acinclude.m4 support in zproject_autotools.gsl
# (to AC_DEFUN an AX_PROJECT_LOCAL_HOOK, AX_PROJECT_LOCAL_HOOK_CONFIGVARS
# and/or AX_PROJECT_LOCAL_HOOK_FINAL) so you can avoid changing this file
# which would complicate re-generation of your project in the future.
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.61)
#
AC_INIT([fty-metric-cache],[1.0.0],[[email protected]])
AC_CONFIG_AUX_DIR(config)
AC_CONFIG_MACRO_DIR(config)
AC_CONFIG_HEADERS([src/platform.h])
AM_INIT_AUTOMAKE([subdir-objects tar-ustar dist-zip foreign])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
# This defines PACKAGE_VERSION_... in src/platform.h
PV_MAJOR=`echo $PACKAGE_VERSION | cut -d . -f 1`
PV_MINOR=`echo $PACKAGE_VERSION | cut -d . -f 2`
PV_PATCH=`echo $PACKAGE_VERSION | cut -d . -f 3`
AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],[$PV_MAJOR],
[FTY_METRIC_CACHE major version])
AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR],[$PV_MINOR],
[FTY_METRIC_CACHE minor version])
AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCH],[$PV_PATCH],
[FTY_METRIC_CACHE patchlevel])
# This lets us use PACKAGE_VERSION in Makefiles
AC_SUBST(PACKAGE_VERSION)
#
# Libtool -version-info (ABI version)
#
# Currently 1:0:0 ("stable"). Don't change this unless you
# know exactly what you're doing and have read and understand
# http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
#
# libfty_metric_cache -version-info
LTVER="1:0:0"
AC_SUBST(LTVER)
# building in a subdirectory?
AM_CONDITIONAL([USING_VPATH], [test "x${srcdir}" != "x."])
# Capture c flags
FTY_METRIC_CACHE_ORIG_CFLAGS="${CFLAGS:-none}"
# Checks for programs
AC_PROG_CC
AC_PROG_CC_C99
AM_PROG_CC_C_O
AC_LIBTOOL_WIN32_DLL
AC_PROG_LIBTOOL
AC_PROG_SED
AC_PROG_AWK
PKG_PROG_PKG_CONFIG
# Check endianess of the system
AC_C_BIGENDIAN
# See if cppcheck is in PATH; this variable unblocks the "cppcheck" recipe
# (note that "make cppcheck.xml" can be used - and perhaps fail - regardless)
AC_CHECK_PROG([WITH_CPPCHECK], [cppcheck], [true], [false])
AM_CONDITIONAL(WITH_CPPCHECK, $WITH_CPPCHECK)
# Code coverage
AC_MSG_CHECKING([whether to enable GCov])
AC_ARG_WITH(gcov, [AS_HELP_STRING([--with-gcov=yes/no],
[With GCC Code Coverage reporting])],
[FTY_METRIC_CACHE_GCOV="$withval"])
if test "x${FTY_METRIC_CACHE_GCOV}" == "xyes"; then
CFLAGS="-O0 -g -fprofile-arcs -ftest-coverage"
if test "x${FTY_METRIC_CACHE_ORIG_CFLAGS}" != "xnone"; then
CFLAGS="${CFLAGS} ${FTY_METRIC_CACHE_ORIG_CFLAGS}"
fi
AM_CONDITIONAL(WITH_GCOV, true)
AC_MSG_RESULT([yes])
else
AM_CONDITIONAL(WITH_GCOV, false)
AC_MSG_RESULT([no])
fi
# Memory mis-use detection
AC_MSG_CHECKING([whether to enable ASan])
AC_ARG_ENABLE(address-sanitizer, [AS_HELP_STRING([--enable-address-sanitizer=yes/no],
[Build with GCC Address Sanitizer instrumentation])],
[FTY_METRIC_CACHE_ASAN="$enableval"])
if test "x${FTY_METRIC_CACHE_ASAN}" == "xyes"; then
CFLAGS="${CFLAGS} -fsanitize=address"
CXXFLAGS="${CXXFLAGS} -fsanitize=address"
AM_CONDITIONAL(ENABLE_ASAN, true)
AC_MSG_RESULT([yes])
else
AM_CONDITIONAL(ENABLE_ASAN, false)
AC_MSG_RESULT([no])
fi
# See if clang-format is in PATH; the result unblocks the relevant recipes
WITH_CLANG_FORMAT=""
AS_IF([test x"$CLANG_FORMAT" = x],
[AC_PATH_PROG([CLANG_FORMAT], [clang-format], [])],
[AC_CHECK_PROG([WITH_CLANG_FORMAT], [$CLANG_FORMAT], [true], [fail])])
AS_IF([test x"$CLANG_FORMAT" != x && test x"$WITH_CLANG_FORMAT" = x],
[AS_IF([test -x "$CLANG_FORMAT"],
[WITH_CLANG_FORMAT=true],
[AC_CHECK_PROG([WITH_CLANG_FORMAT], [$CLANG_FORMAT], [true], [false])])])
AS_IF([test "$WITH_CLANG_FORMAT" = fail],
[AC_MSG_ERROR([Caller explicitly referenced CLANG_FORMAT=$CLANG_FORMAT which was not found])])
AM_CONDITIONAL([WITH_CLANG_FORMAT], [$WITH_CLANG_FORMAT])
# Set pkgconfigdir
AC_ARG_WITH([pkgconfigdir], AS_HELP_STRING([--with-pkgconfigdir=PATH],
[Path to the pkgconfig directory [[LIBDIR/pkgconfig]]]),
[pkgconfigdir="$withval"], [pkgconfigdir='${libdir}/pkgconfig'])
AC_SUBST([pkgconfigdir])
# Use the provided pkgconfigdir not only to write our pkg-config data,
# but also as an additional location to look for other packages metadata.
AS_IF([test -n "${pkgconfigdir}" -a -d "${pkgconfigdir}"],
[AS_IF([test -z "${PKG_CONFIG_PATH}"],
[PKG_CONFIG_PATH="${pkgconfigdir}"],
[PKG_CONFIG_PATH="${pkgconfigdir}:${PKG_CONFIG_PATH}"])
export PKG_CONFIG_PATH
])
# Will be used to add flags to pkg-config useful when apps want to statically link
PKGCFG_LIBS_PRIVATE=""
# Archive user supplied flags
PREVIOUS_CFLAGS="${CFLAGS}"
PREVIOUS_LIBS="${LIBS}"
was_libsodium_check_lib_detected=no
search_libsodium="yes"
AC_ARG_WITH([libsodium],
[
AS_HELP_STRING([--with-libsodium],
[yes or no. Optionally specify libsodium prefix (directory where its include/ and lib/ are located), but that is only used if pkgconfig metadata is not found first])
],
[
search_libsodium="yes"
],
[
search_libsodium="yes"
])
AS_CASE([x"${with_libsodium}"],
[xyes], [search_libsodium="yes"],
[xno], [search_libsodium="no"])
dnl We do not abort right now, because the maintainer/developer may have
dnl something particular in mind, e.g. to build just parts of a project.
AS_IF([test x"${search_libsodium}" = xno],
[AC_MSG_WARN([Required dependency on libsodium was explicitly disabled during configuration by '--with-libsodium=no'; subsequent full build of fty-metric-cache may fail])])
AS_IF([test x"${search_libsodium}" = xyes], [
# Archive previously detected and supplied flags
PRE_SEARCH_CFLAGS="${CFLAGS}"
PRE_SEARCH_LIBS="${LIBS}"
found_pkgconfig=""
found_linkname=""
PKG_CHECK_MODULES([libsodium], [libsodium >= 0.0.0],
[
PKGCFG_LIBS_PRIVATE="$PKGCFG_LIBS_PRIVATE $libsodium_LIBS"
was_libsodium_check_lib_detected=pkgcfg
found_pkgconfig="libsodium"
],
[
AC_MSG_NOTICE([Package libsodium not found; falling back to defined compilability tests])
libsodium_synthetic_cflags=""
libsodium_synthetic_libs="-lsodium"
if test -n "${with_libsodium}" && test x"${with_libsodium}" != xyes && test x"${with_libsodium}" != xno; then
if test -r "${with_libsodium}/include/sodium.h"; then
libsodium_synthetic_cflags="-I${with_libsodium}/include"
libsodium_synthetic_libs="-L${with_libsodium}/lib -lsodium"
else
AC_MSG_ERROR([Header file ${with_libsodium}/include/sodium.h was not found. Please check libsodium prefix])
fi
else
AC_CHECK_HEADER([sodium.h], [],
AC_MSG_ERROR([Header file sodium.h was not found in default search paths])
)
fi
AC_CHECK_LIB([sodium], [sodium_init],
[
was_libsodium_check_lib_detected=yes
PKGCFG_LIBS_PRIVATE="$PKGCFG_LIBS_PRIVATE -lsodium"
found_linkname="sodium"
],
[AC_MSG_ERROR([cannot link with -lsodium, install libsodium])])
])
dnl END of PKG_CHECK_MODULES and/or direct tests for libsodium
AS_CASE(["x${was_libsodium_check_lib_detected}"],
[xpkgcfg], [
AC_SUBST([pkgconfig_name_libsodium],[${found_pkgconfig}])
CFLAGS="${libsodium_CFLAGS} ${CFLAGS}"
LIBS="${libsodium_LIBS} ${LIBS}"
],
[xyes], [
AC_SUBST([pkgconfig_name_libsodium],[${found_linkname}])
CFLAGS="${libsodium_synthetic_cflags} ${CFLAGS}"
LDFLAGS="${libsodium_synthetic_libs} ${LDFLAGS}"
LIBS="${libsodium_synthetic_libs} ${LIBS}"
AC_SUBST([libsodium_CFLAGS],[${libsodium_synthetic_cflags}])
AC_SUBST([libsodium_LIBS],[${libsodium_synthetic_libs}])
],
[xno], [
AC_SUBST([pkgconfig_name_libsodium],[libsodium])
AC_MSG_ERROR([Cannot find pkg-config metadata for libsodium 0.0.0 or higher])
])
])
dnl END of enabled attempts to search for libsodium
was_libzmq_check_lib_detected=no
search_libzmq="yes"
AC_ARG_WITH([libzmq],
[
AS_HELP_STRING([--with-libzmq],
[yes or no. Optionally specify libzmq prefix (directory where its include/ and lib/ are located), but that is only used if pkgconfig metadata is not found first])
],
[
search_libzmq="yes"
],
[
search_libzmq="yes"
])
AS_CASE([x"${with_libzmq}"],
[xyes], [search_libzmq="yes"],
[xno], [search_libzmq="no"])
dnl We do not abort right now, because the maintainer/developer may have
dnl something particular in mind, e.g. to build just parts of a project.
AS_IF([test x"${search_libzmq}" = xno],
[AC_MSG_WARN([Required dependency on libzmq was explicitly disabled during configuration by '--with-libzmq=no'; subsequent full build of fty-metric-cache may fail])])
AS_IF([test x"${search_libzmq}" = xyes], [
# Archive previously detected and supplied flags
PRE_SEARCH_CFLAGS="${CFLAGS}"
PRE_SEARCH_LIBS="${LIBS}"
found_pkgconfig=""
found_linkname=""
PKG_CHECK_MODULES([libzmq], [libzmq >= 0.0.0],
[
PKGCFG_LIBS_PRIVATE="$PKGCFG_LIBS_PRIVATE $libzmq_LIBS"
was_libzmq_check_lib_detected=pkgcfg
found_pkgconfig="libzmq"
],
[
AC_MSG_NOTICE([Package libzmq not found; falling back to defined compilability tests])
libzmq_synthetic_cflags=""
libzmq_synthetic_libs="-lzmq"
if test -n "${with_libzmq}" && test x"${with_libzmq}" != xyes && test x"${with_libzmq}" != xno; then
if test -r "${with_libzmq}/include/zmq.h"; then
libzmq_synthetic_cflags="-I${with_libzmq}/include"
libzmq_synthetic_libs="-L${with_libzmq}/lib -lzmq"
else
AC_MSG_ERROR([Header file ${with_libzmq}/include/zmq.h was not found. Please check libzmq prefix])
fi
else
AC_CHECK_HEADER([zmq.h], [],
AC_MSG_ERROR([Header file zmq.h was not found in default search paths])
)
fi
AC_CHECK_LIB([zmq], [zmq_init],
[
was_libzmq_check_lib_detected=yes
PKGCFG_LIBS_PRIVATE="$PKGCFG_LIBS_PRIVATE -lzmq"
found_linkname="zmq"
],
[AC_MSG_ERROR([cannot link with -lzmq, install libzmq])])
])
dnl END of PKG_CHECK_MODULES and/or direct tests for libzmq
AS_CASE(["x${was_libzmq_check_lib_detected}"],
[xpkgcfg], [
AC_SUBST([pkgconfig_name_libzmq],[${found_pkgconfig}])
CFLAGS="${libzmq_CFLAGS} ${CFLAGS}"
LIBS="${libzmq_LIBS} ${LIBS}"
],
[xyes], [
AC_SUBST([pkgconfig_name_libzmq],[${found_linkname}])
CFLAGS="${libzmq_synthetic_cflags} ${CFLAGS}"
LDFLAGS="${libzmq_synthetic_libs} ${LDFLAGS}"
LIBS="${libzmq_synthetic_libs} ${LIBS}"
AC_SUBST([libzmq_CFLAGS],[${libzmq_synthetic_cflags}])
AC_SUBST([libzmq_LIBS],[${libzmq_synthetic_libs}])
],
[xno], [
AC_SUBST([pkgconfig_name_libzmq],[libzmq])
AC_MSG_ERROR([Cannot find pkg-config metadata for libzmq 0.0.0 or higher])
])
])
dnl END of enabled attempts to search for libzmq
was_czmq_check_lib_detected=no
search_libczmq="yes"
AC_ARG_WITH([libczmq],
[
AS_HELP_STRING([--with-libczmq],
[yes or no. Optionally specify libczmq prefix (directory where its include/ and lib/ are located), but that is only used if pkgconfig metadata is not found first])
],
[
search_libczmq="yes"
],
[
search_libczmq="yes"
])
AS_CASE([x"${with_libczmq}"],
[xyes], [search_libczmq="yes"],
[xno], [search_libczmq="no"])
dnl We do not abort right now, because the maintainer/developer may have
dnl something particular in mind, e.g. to build just parts of a project.
AS_IF([test x"${search_libczmq}" = xno],
[AC_MSG_WARN([Required dependency on czmq was explicitly disabled during configuration by '--with-libczmq=no'; subsequent full build of fty-metric-cache may fail])])
AS_IF([test x"${search_libczmq}" = xyes], [
# Archive previously detected and supplied flags
PRE_SEARCH_CFLAGS="${CFLAGS}"
PRE_SEARCH_LIBS="${LIBS}"
found_pkgconfig=""
found_linkname=""
PKG_CHECK_MODULES([czmq], [libczmq >= 3.0.2],
[
PKGCFG_LIBS_PRIVATE="$PKGCFG_LIBS_PRIVATE $czmq_LIBS"
was_czmq_check_lib_detected=pkgcfg
found_pkgconfig="libczmq"
],
[
AC_MSG_NOTICE([Package libczmq not found with needed constraints; falling back to defined compilability tests])
czmq_synthetic_cflags=""
czmq_synthetic_libs="-lczmq"
if test -n "${with_libczmq}" && test x"${with_libczmq}" != xyes && test x"${with_libczmq}" != xno; then
if test -r "${with_libczmq}/include/czmq.h"; then
czmq_synthetic_cflags="-I${with_libczmq}/include"
czmq_synthetic_libs="-L${with_libczmq}/lib -lczmq"
else
AC_MSG_ERROR([Header file ${with_libczmq}/include/czmq.h was not found. Please check libczmq prefix])
fi
else
AC_CHECK_HEADER([czmq.h], [],
AC_MSG_ERROR([Header file czmq.h was not found in default search paths])
)
fi
AC_CHECK_LIB([czmq], [zhashx_test],
[
was_czmq_check_lib_detected=yes
PKGCFG_LIBS_PRIVATE="$PKGCFG_LIBS_PRIVATE -lczmq"
found_linkname="czmq"
],
[AC_MSG_ERROR([cannot link with -lczmq, install libczmq])])
])
dnl END of PKG_CHECK_MODULES and/or direct tests for libczmq
AS_CASE(["x${was_czmq_check_lib_detected}"],
[xpkgcfg], [
AC_SUBST([pkgconfig_name_libczmq],[${found_pkgconfig}])
CFLAGS="${czmq_CFLAGS} ${CFLAGS}"
LIBS="${czmq_LIBS} ${LIBS}"
],
[xyes], [
AC_SUBST([pkgconfig_name_libczmq],[${found_linkname}])
CFLAGS="${czmq_synthetic_cflags} ${CFLAGS}"
LDFLAGS="${czmq_synthetic_libs} ${LDFLAGS}"
LIBS="${czmq_synthetic_libs} ${LIBS}"
AC_SUBST([czmq_CFLAGS],[${czmq_synthetic_cflags}])
AC_SUBST([czmq_LIBS],[${czmq_synthetic_libs}])
],
[xno], [
AC_SUBST([pkgconfig_name_libczmq],[libczmq])
AC_MSG_ERROR([Cannot find pkg-config metadata for libczmq 3.0.2 or higher])
])
])
dnl END of enabled attempts to search for libczmq
was_malamute_check_lib_detected=no
search_libmlm="yes"
AC_ARG_WITH([libmlm],
[
AS_HELP_STRING([--with-libmlm],
[yes or no. Optionally specify libmlm prefix (directory where its include/ and lib/ are located), but that is only used if pkgconfig metadata is not found first])
],
[
search_libmlm="yes"
],
[
search_libmlm="yes"
])
AS_CASE([x"${with_libmlm}"],
[xyes], [search_libmlm="yes"],
[xno], [search_libmlm="no"])
dnl We do not abort right now, because the maintainer/developer may have
dnl something particular in mind, e.g. to build just parts of a project.
AS_IF([test x"${search_libmlm}" = xno],
[AC_MSG_WARN([Required dependency on malamute was explicitly disabled during configuration by '--with-libmlm=no'; subsequent full build of fty-metric-cache may fail])])
AS_IF([test x"${search_libmlm}" = xyes], [
# Archive previously detected and supplied flags
PRE_SEARCH_CFLAGS="${CFLAGS}"
PRE_SEARCH_LIBS="${LIBS}"
found_pkgconfig=""
found_linkname=""
PKG_CHECK_MODULES([malamute], [libmlm >= 1.0.0],
[
PKGCFG_LIBS_PRIVATE="$PKGCFG_LIBS_PRIVATE $malamute_LIBS"
was_malamute_check_lib_detected=pkgcfg
found_pkgconfig="libmlm"
],
[
AC_MSG_NOTICE([Package libmlm not found with needed constraints; falling back to defined compilability tests])
malamute_synthetic_cflags=""
malamute_synthetic_libs="-lmlm"
if test -n "${with_libmlm}" && test x"${with_libmlm}" != xyes && test x"${with_libmlm}" != xno; then
if test -r "${with_libmlm}/include/malamute.h"; then
malamute_synthetic_cflags="-I${with_libmlm}/include"
malamute_synthetic_libs="-L${with_libmlm}/lib -lmlm"
else
AC_MSG_ERROR([Header file ${with_libmlm}/include/malamute.h was not found. Please check libmlm prefix])
fi
else
AC_CHECK_HEADER([malamute.h], [],
AC_MSG_ERROR([Header file malamute.h was not found in default search paths])
)
fi
AC_CHECK_LIB([mlm], [mlm_server_test],
[
was_malamute_check_lib_detected=yes
PKGCFG_LIBS_PRIVATE="$PKGCFG_LIBS_PRIVATE -lmlm"
found_linkname="mlm"
],
[AC_MSG_ERROR([cannot link with -lmlm, install libmlm])])
])
dnl END of PKG_CHECK_MODULES and/or direct tests for libmlm
AS_CASE(["x${was_malamute_check_lib_detected}"],
[xpkgcfg], [
AC_SUBST([pkgconfig_name_libmlm],[${found_pkgconfig}])
CFLAGS="${malamute_CFLAGS} ${CFLAGS}"
LIBS="${malamute_LIBS} ${LIBS}"
],
[xyes], [
AC_SUBST([pkgconfig_name_libmlm],[${found_linkname}])
CFLAGS="${malamute_synthetic_cflags} ${CFLAGS}"
LDFLAGS="${malamute_synthetic_libs} ${LDFLAGS}"
LIBS="${malamute_synthetic_libs} ${LIBS}"
AC_SUBST([malamute_CFLAGS],[${malamute_synthetic_cflags}])
AC_SUBST([malamute_LIBS],[${malamute_synthetic_libs}])
],
[xno], [
AC_SUBST([pkgconfig_name_libmlm],[libmlm])
AC_MSG_ERROR([Cannot find pkg-config metadata for libmlm 1.0.0 or higher])
])
])
dnl END of enabled attempts to search for libmlm
was_fty_proto_check_lib_detected=no
search_libfty_proto="yes"
AC_ARG_WITH([libfty_proto],
[
AS_HELP_STRING([--with-libfty_proto],
[yes or no. Optionally specify libfty_proto prefix (directory where its include/ and lib/ are located), but that is only used if pkgconfig metadata is not found first])
],
[
search_libfty_proto="yes"
],
[
search_libfty_proto="yes"
])
AS_CASE([x"${with_libfty_proto}"],
[xyes], [search_libfty_proto="yes"],
[xno], [search_libfty_proto="no"])
dnl We do not abort right now, because the maintainer/developer may have
dnl something particular in mind, e.g. to build just parts of a project.
AS_IF([test x"${search_libfty_proto}" = xno],
[AC_MSG_WARN([Required dependency on fty_proto was explicitly disabled during configuration by '--with-libfty_proto=no'; subsequent full build of fty-metric-cache may fail])])
AS_IF([test x"${search_libfty_proto}" = xyes], [
# Archive previously detected and supplied flags
PRE_SEARCH_CFLAGS="${CFLAGS}"
PRE_SEARCH_LIBS="${LIBS}"
found_pkgconfig=""
found_linkname=""
PKG_CHECK_MODULES([fty_proto], [libfty_proto >= 1.0.0],
[
PKGCFG_LIBS_PRIVATE="$PKGCFG_LIBS_PRIVATE $fty_proto_LIBS"
was_fty_proto_check_lib_detected=pkgcfg
found_pkgconfig="libfty_proto"
],
[
AC_MSG_NOTICE([Package libfty_proto not found with needed constraints; falling back to defined compilability tests])
fty_proto_synthetic_cflags=""
fty_proto_synthetic_libs="-lfty_proto"
if test -n "${with_libfty_proto}" && test x"${with_libfty_proto}" != xyes && test x"${with_libfty_proto}" != xno; then
if test -r "${with_libfty_proto}/include/ftyproto.h"; then
fty_proto_synthetic_cflags="-I${with_libfty_proto}/include"
fty_proto_synthetic_libs="-L${with_libfty_proto}/lib -lfty_proto"
else
AC_MSG_ERROR([Header file ${with_libfty_proto}/include/ftyproto.h was not found. Please check libfty_proto prefix])
fi
else
AC_CHECK_HEADER([ftyproto.h], [],
AC_MSG_ERROR([Header file ftyproto.h was not found in default search paths])
)
fi
AC_CHECK_LIB([fty_proto], [fty_proto_test],
[
was_fty_proto_check_lib_detected=yes
PKGCFG_LIBS_PRIVATE="$PKGCFG_LIBS_PRIVATE -lfty_proto"
found_linkname="fty_proto"
],
[AC_MSG_ERROR([cannot link with -lfty_proto, install libfty_proto])])
])
dnl END of PKG_CHECK_MODULES and/or direct tests for libfty_proto
AS_CASE(["x${was_fty_proto_check_lib_detected}"],
[xpkgcfg], [
AC_SUBST([pkgconfig_name_libfty_proto],[${found_pkgconfig}])
CFLAGS="${fty_proto_CFLAGS} ${CFLAGS}"
LIBS="${fty_proto_LIBS} ${LIBS}"
],
[xyes], [
AC_SUBST([pkgconfig_name_libfty_proto],[${found_linkname}])
CFLAGS="${fty_proto_synthetic_cflags} ${CFLAGS}"
LDFLAGS="${fty_proto_synthetic_libs} ${LDFLAGS}"
LIBS="${fty_proto_synthetic_libs} ${LIBS}"
AC_SUBST([fty_proto_CFLAGS],[${fty_proto_synthetic_cflags}])
AC_SUBST([fty_proto_LIBS],[${fty_proto_synthetic_libs}])
],
[xno], [
AC_SUBST([pkgconfig_name_libfty_proto],[libfty_proto])
AC_MSG_ERROR([Cannot find pkg-config metadata for libfty_proto 1.0.0 or higher])
])
])
dnl END of enabled attempts to search for libfty_proto
was_log4cplus_check_lib_detected=no
search_log4cplus="yes"
AC_ARG_WITH([log4cplus],
[
AS_HELP_STRING([--with-log4cplus],
[yes or no. Optionally specify log4cplus prefix (directory where its include/ and lib/ are located), but that is only used if pkgconfig metadata is not found first])
],
[
search_log4cplus="yes"
],
[
search_log4cplus="yes"
])
AS_CASE([x"${with_log4cplus}"],
[xyes], [search_log4cplus="yes"],
[xno], [search_log4cplus="no"])
dnl We do not abort right now, because the maintainer/developer may have
dnl something particular in mind, e.g. to build just parts of a project.
AS_IF([test x"${search_log4cplus}" = xno],
[AC_MSG_WARN([Required dependency on log4cplus was explicitly disabled during configuration by '--with-log4cplus=no'; subsequent full build of fty-metric-cache may fail])])
AS_IF([test x"${search_log4cplus}" = xyes], [
# Archive previously detected and supplied flags
PRE_SEARCH_CFLAGS="${CFLAGS}"
PRE_SEARCH_LIBS="${LIBS}"
found_pkgconfig=""
found_linkname=""
PKG_CHECK_MODULES([log4cplus], [log4cplus >= 0.0.0],
[
PKGCFG_LIBS_PRIVATE="$PKGCFG_LIBS_PRIVATE $log4cplus_LIBS"
was_log4cplus_check_lib_detected=pkgcfg
found_pkgconfig="log4cplus"
],
[
AC_MSG_NOTICE([Package log4cplus not found; falling back to defined compilability tests])
log4cplus_synthetic_cflags=""
log4cplus_synthetic_libs="-llog4cplus"
if test -n "${with_log4cplus}" && test x"${with_log4cplus}" != xyes && test x"${with_log4cplus}" != xno; then
if test -r "${with_log4cplus}/include/log4cplus/logger.h"; then
log4cplus_synthetic_cflags="-I${with_log4cplus}/include"
log4cplus_synthetic_libs="-L${with_log4cplus}/lib -llog4cplus"
else
AC_MSG_ERROR([Header file ${with_log4cplus}/include/log4cplus/logger.h was not found. Please check log4cplus prefix])
fi
else
AC_CHECK_HEADER([log4cplus/logger.h], [],
AC_MSG_ERROR([Header file log4cplus/logger.h was not found in default search paths])
)
fi
AC_CHECK_LIB([log4cplus], [appender_test],
[
was_log4cplus_check_lib_detected=yes
PKGCFG_LIBS_PRIVATE="$PKGCFG_LIBS_PRIVATE -llog4cplus"
found_linkname="log4cplus"
],
[AC_MSG_ERROR([cannot link with -llog4cplus, install log4cplus])])
])
dnl END of PKG_CHECK_MODULES and/or direct tests for log4cplus
AS_CASE(["x${was_log4cplus_check_lib_detected}"],
[xpkgcfg], [
AC_SUBST([pkgconfig_name_log4cplus],[${found_pkgconfig}])
CFLAGS="${log4cplus_CFLAGS} ${CFLAGS}"
LIBS="${log4cplus_LIBS} ${LIBS}"
],
[xyes], [
AC_SUBST([pkgconfig_name_log4cplus],[${found_linkname}])
CFLAGS="${log4cplus_synthetic_cflags} ${CFLAGS}"
LDFLAGS="${log4cplus_synthetic_libs} ${LDFLAGS}"
LIBS="${log4cplus_synthetic_libs} ${LIBS}"
AC_SUBST([log4cplus_CFLAGS],[${log4cplus_synthetic_cflags}])
AC_SUBST([log4cplus_LIBS],[${log4cplus_synthetic_libs}])
],
[xno], [
AC_SUBST([pkgconfig_name_log4cplus],[log4cplus])
AC_MSG_ERROR([Cannot find pkg-config metadata for log4cplus 0.0.0 or higher])
])
])
dnl END of enabled attempts to search for log4cplus
was_fty_common_logging_check_lib_detected=no
search_libfty_common_logging="yes"
AC_ARG_WITH([libfty_common_logging],
[
AS_HELP_STRING([--with-libfty_common_logging],
[yes or no. Optionally specify libfty_common_logging prefix (directory where its include/ and lib/ are located), but that is only used if pkgconfig metadata is not found first])
],
[
search_libfty_common_logging="yes"
],
[
search_libfty_common_logging="yes"
])
AS_CASE([x"${with_libfty_common_logging}"],
[xyes], [search_libfty_common_logging="yes"],
[xno], [search_libfty_common_logging="no"])
dnl We do not abort right now, because the maintainer/developer may have
dnl something particular in mind, e.g. to build just parts of a project.
AS_IF([test x"${search_libfty_common_logging}" = xno],
[AC_MSG_WARN([Required dependency on fty_common_logging was explicitly disabled during configuration by '--with-libfty_common_logging=no'; subsequent full build of fty-metric-cache may fail])])
AS_IF([test x"${search_libfty_common_logging}" = xyes], [
# Archive previously detected and supplied flags
PRE_SEARCH_CFLAGS="${CFLAGS}"
PRE_SEARCH_LIBS="${LIBS}"
found_pkgconfig=""
found_linkname=""
PKG_CHECK_MODULES([fty_common_logging], [libfty_common_logging >= 0.0.0],
[
PKGCFG_LIBS_PRIVATE="$PKGCFG_LIBS_PRIVATE $fty_common_logging_LIBS"
was_fty_common_logging_check_lib_detected=pkgcfg
found_pkgconfig="libfty_common_logging"
],
[
AC_MSG_NOTICE([Package libfty_common_logging not found; falling back to defined compilability tests])
fty_common_logging_synthetic_cflags=""
fty_common_logging_synthetic_libs="-lfty-common-logging"
if test -n "${with_libfty_common_logging}" && test x"${with_libfty_common_logging}" != xyes && test x"${with_libfty_common_logging}" != xno; then
if test -r "${with_libfty_common_logging}/include/fty-log/fty_logger.h"; then
fty_common_logging_synthetic_cflags="-I${with_libfty_common_logging}/include"
fty_common_logging_synthetic_libs="-L${with_libfty_common_logging}/lib -lfty-common-logging"
else
AC_MSG_ERROR([Header file ${with_libfty_common_logging}/include/fty-log/fty_logger.h was not found. Please check libfty_common_logging prefix])
fi
else
AC_CHECK_HEADER([fty-log/fty_logger.h], [],
AC_MSG_ERROR([Header file fty-log/fty_logger.h was not found in default search paths])
)
fi
AC_CHECK_LIB([fty-common-logging], [fty_common_logging_selftest],
[
was_fty_common_logging_check_lib_detected=yes
PKGCFG_LIBS_PRIVATE="$PKGCFG_LIBS_PRIVATE -lfty-common-logging"
found_linkname="fty-common-logging"
],
[AC_MSG_ERROR([cannot link with -lfty-common-logging, install libfty_common_logging])])
])
dnl END of PKG_CHECK_MODULES and/or direct tests for libfty_common_logging
AS_CASE(["x${was_fty_common_logging_check_lib_detected}"],
[xpkgcfg], [
AC_SUBST([pkgconfig_name_libfty_common_logging],[${found_pkgconfig}])
CFLAGS="${fty_common_logging_CFLAGS} ${CFLAGS}"
LIBS="${fty_common_logging_LIBS} ${LIBS}"
],
[xyes], [
AC_SUBST([pkgconfig_name_libfty_common_logging],[${found_linkname}])
CFLAGS="${fty_common_logging_synthetic_cflags} ${CFLAGS}"
LDFLAGS="${fty_common_logging_synthetic_libs} ${LDFLAGS}"
LIBS="${fty_common_logging_synthetic_libs} ${LIBS}"
AC_SUBST([fty_common_logging_CFLAGS],[${fty_common_logging_synthetic_cflags}])
AC_SUBST([fty_common_logging_LIBS],[${fty_common_logging_synthetic_libs}])
],
[xno], [
AC_SUBST([pkgconfig_name_libfty_common_logging],[libfty_common_logging])
AC_MSG_ERROR([Cannot find pkg-config metadata for libfty_common_logging 0.0.0 or higher])
])
])
dnl END of enabled attempts to search for libfty_common_logging
CFLAGS="${PREVIOUS_CFLAGS}"
LIBS="${PREVIOUS_LIBS}"
AC_SUBST(pkg_config_libs_private, $PKGCFG_LIBS_PRIVATE)
# Platform specific checks
fty_metric_cache_on_mingw32="no"
fty_metric_cache_on_cygwin="no"
fty_metric_cache_on_android="no"
fty_metric_cache_on_linux="no"
fty_metric_cache_on_gnu="no"
# Host specific checks
AC_CANONICAL_HOST
# Man pages are built/installed if asciidoc and xmlto are present
# --with-docs=no overrides this
AC_ARG_WITH([docs],
AS_HELP_STRING([--with-docs],
[Build and install man pages [default=yes]]),
[with_docs=$withval])
if test "x$with_docs" = "xno"; then
fty_metric_cache_build_doc="no"
fty_metric_cache_install_man="no"
else
# Determine whether or not documentation should be built and installed.
fty_metric_cache_build_doc="yes"
fty_metric_cache_install_man="yes"
# Check for asciidoc and xmlto and don't build the docs if these are not installed.
AC_CHECK_PROG(fty_metric_cache_have_asciidoc, asciidoc, yes, no)
AC_CHECK_PROG(fty_metric_cache_have_xmlto, xmlto, yes, no)
if test "x$fty_metric_cache_have_asciidoc" = "xno" -o "x$fty_metric_cache_have_xmlto" = "xno"; then
if test "x$with_docs" = "xyes" ; then
AC_MSG_ERROR([Build with docs was explicitly requested, but tools are not available])
fi
fty_metric_cache_build_doc="no"
# Tarballs built with 'make dist' ship with prebuilt documentation.
if ! test -f doc/fty-metric-cache.7; then
fty_metric_cache_install_man="no"
AC_MSG_WARN([You are building an unreleased version of FTY-METRIC-CACHE and asciidoc or xmlto are not installed.])
AC_MSG_WARN([Documentation will not be built and manual pages will not be installed.])
fi
fi
fi
AC_MSG_CHECKING([whether to build documentation])
AC_MSG_RESULT([$fty_metric_cache_build_doc])
AC_MSG_CHECKING([whether to install manpages])
AC_MSG_RESULT([$fty_metric_cache_install_man])
# Set some default features required by libfty_metric_cache code.
CPPFLAGS="-DFTY_METRIC_CACHE_INTERNAL_BUILD -D_REENTRANT -D_THREAD_SAFE $CPPFLAGS"
# OS-specific tests
case "${host_os}" in
*linux*)
# Define on Linux to enable all library features
CPPFLAGS="-D_GNU_SOURCE -DLINUX $CPPFLAGS"
AC_DEFINE(FTY_METRIC_CACHE_HAVE_LINUX, 1, [Have Linux OS])
fty_metric_cache_on_linux="yes"
case "${host_os}" in
*android*)
AC_DEFINE(FTY_METRIC_CACHE_HAVE_ANDROID, 1, [Have Android OS])
fty_metric_cache_on_android="yes"
;;
esac
;;
*solaris*)
# Define on Solaris to enable all library features
CPPFLAGS="-D_PTHREADS $CPPFLAGS"
# Allow definitions of common OS-provided functions that are not in old standards
CPPFLAGS="-D__EXTENSIONS__ $CPPFLAGS"
AC_DEFINE(FTY_METRIC_CACHE_HAVE_SOLARIS, 1, [Have Solaris OS])
CFLAGS="${CFLAGS} -lsocket -lssp"
;;
*freebsd*)
# Define on FreeBSD to enable all library features
CPPFLAGS="-D__BSD_VISIBLE $CPPFLAGS"
AC_DEFINE(FTY_METRIC_CACHE_HAVE_FREEBSD, 1, [Have FreeBSD OS])
;;
*darwin*)
# Define on Darwin to enable all library features
CPPFLAGS="-D_DARWIN_C_SOURCE $CPPFLAGS"
AC_DEFINE(FTY_METRIC_CACHE_HAVE_OSX, 1, [Have DarwinOSX OS])
;;
*netbsd*)
# Define on NetBSD to enable all library features
CPPFLAGS="-D_NETBSD_SOURCE $CPPFLAGS"
AC_DEFINE(FTY_METRIC_CACHE_HAVE_NETBSD, 1, [Have NetBSD OS])
;;
*openbsd*)
# Define on OpenBSD to enable all library features
CPPFLAGS="-D_BSD_SOURCE $CPPFLAGS"
AC_DEFINE(FTY_METRIC_CACHE_HAVE_OPENBSD, 1, [Have OpenBSD OS])
;;
*nto-qnx*)
AC_DEFINE(FTY_METRIC_CACHE_HAVE_QNXNTO, 1, [Have QNX Neutrino OS])
;;
*aix*)
AC_DEFINE(FTY_METRIC_CACHE_HAVE_AIX, 1, [Have AIX OS])
;;
*hpux*)
# Define on HP-UX to enable all library features
CPPFLAGS="-D_POSIX_C_SOURCE=200112L"
AC_DEFINE(FTY_METRIC_CACHE_HAVE_HPUX, 1, [Have HPUX OS])
;;
*mingw32*)
# Disable format error due to incomplete ANSI C
CFLAGS="-Wno-error=format -Wno-unused-function -Wno-unused-variable -D_XOPEN_SOURCE $CFLAGS"
CPPFLAGS="-Wno-error=format -Wno-unused-function -Wno-unused-variable -D_XOPEN_SOURCE $CPPFLAGS"
AC_DEFINE(FTY_METRIC_CACHE_HAVE_WINDOWS, 1, [Have Windows OS])
AC_DEFINE(FTY_METRIC_CACHE_HAVE_MINGW32, 1, [Have MinGW32])
AC_CHECK_HEADERS(windows.h)
fty_metric_cache_on_mingw32="yes"
fty_metric_cache_install_man="no"
;;
*mingw64*)
# Define on MINGW64 to enable all libeary features
# Disable format error due to incomplete ANSI C
CFLAGS="-Wno-error=format -Wno-unused-function -Wno-unused-variable -D_XOPEN_SOURCE $CFLAGS"
CPPFLAGS="-Wno-error=format -Wno-unused-function -Wno-unused-variable -D_XOPEN_SOURCE $CPPFLAGS"
AC_DEFINE(FTY_METRIC_CACHE_HAVE_WINDOWS, 1, [Have Windows OS])
AC_DEFINE(FTY_METRIC_CACHE_HAVE_MINGW32, 1, [Have MinGW32])
AC_CHECK_HEADERS(windows.h)
fty_metric_cache_on_mingw32="yes"
fty_metric_cache_install_man="no"
;;
*cygwin*)
# Define on Cygwin to enable all library features
CPPFLAGS="-D_GNU_SOURCE $CPPFLAGS"
AC_DEFINE(FTY_METRIC_CACHE_HAVE_CYGWIN, 1, [Have Cygwin])
fty_metric_cache_on_cygwin="yes"
;;
gnu*)
# Define on GNU/Hurd to enable all library features
if test "x$GXX" = "xyes"; then
CPPFLAGS="-D_GNU_SOURCE $CPPFLAGS"
fi
AC_DEFINE(FTY_METRIC_CACHE_HAVE_GNU, 1, [Have GNU/Hurd OS])
fty_metric_cache_on_gnu="yes"
;;
*)
AC_MSG_ERROR([unsupported system: ${host_os}])
;;
esac
# Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS(errno.h arpa/inet.h netinet/tcp.h netinet/in.h stddef.h \
stdlib.h string.h sys/socket.h sys/time.h unistd.h \
limits.h ifaddrs.h)
AC_CHECK_HEADERS([net/if.h net/if_media.h linux/wireless.h], [], [],
[
#ifdef HAVE_SYS_SOCKET_H
# include <sys/socket.h>
#endif
#include <stdint.h>
])
# Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_STDBOOL
AC_C_CONST
AC_C_INLINE
AC_TYPE_SIZE_T
AC_TYPE_SSIZE_T
AC_HEADER_TIME
AC_TYPE_UINT32_T
AC_C_VOLATILE
AC_C_BIGENDIAN
AM_CONDITIONAL(ENABLE_SHARED, test "x$enable_shared" = "xyes")
AM_CONDITIONAL(ON_MINGW, test "x$fty_metric_cache_on_mingw32" = "xyes")
AM_CONDITIONAL(ON_CYGWIN, test "x$fty_metric_cache_on_cygwin" = "xyes")
AM_CONDITIONAL(ON_ANDROID, test "x$fty_metric_cache_on_android" = "xyes")
AM_CONDITIONAL(ON_LINUX, test "x$fty_metric_cache_on_linux" = "xyes")
AM_CONDITIONAL(ON_GNU, test "x$fty_metric_cache_on_gnu" = "xyes")
AM_CONDITIONAL(INSTALL_MAN, test "x$fty_metric_cache_install_man" = "xyes")
AM_CONDITIONAL(BUILD_DOC, test "x$fty_metric_cache_build_doc" = "xyes")
AC_ARG_ENABLE([dist_cmakefiles],
AS_HELP_STRING([--enable-dist_cmakefiles],
[Distribute CMakeLists.txt and related files [default depends: on if present and not cross compiling]]),
[enable_dist_cmakefiles=$enableval],
[AC_MSG_CHECKING([for presence of CMake recipes])
if test "x$cross_compiling" = "xyes"; then
enable_dist_cmakefiles=no
else
AC_CHECK_FILE($srcdir/CMakeLists.txt, [enable_dist_cmakefiles=yes], [enable_dist_cmakefiles=no])
fi
AC_MSG_RESULT([$enable_dist_cmakefiles])])
AM_CONDITIONAL(ENABLE_DIST_CMAKEFILES, test "x$enable_dist_cmakefiles" = "xyes")
# Check for fty-metric-cache intent
AC_ARG_ENABLE([fty-metric-cache],
AS_HELP_STRING([--enable-fty-metric-cache],
[Compile and install 'fty-metric-cache' [default=yes]]),
[enable_fty_metric_cache=$enableval],
[enable_fty_metric_cache=yes])
AM_CONDITIONAL([ENABLE_FTY_METRIC_CACHE], [test x$enable_fty_metric_cache != xno])
AM_COND_IF([ENABLE_FTY_METRIC_CACHE], [AC_MSG_NOTICE([ENABLE_FTY_METRIC_CACHE defined])])
# Check for fty-metric-cache-cli intent
AC_ARG_ENABLE([fty-metric-cache-cli],
AS_HELP_STRING([--enable-fty-metric-cache-cli],
[Compile and install 'fty-metric-cache-cli' [default=yes]]),
[enable_fty_metric_cache_cli=$enableval],
[enable_fty_metric_cache_cli=yes])
AM_CONDITIONAL([ENABLE_FTY_METRIC_CACHE_CLI], [test x$enable_fty_metric_cache_cli != xno])
AM_COND_IF([ENABLE_FTY_METRIC_CACHE_CLI], [AC_MSG_NOTICE([ENABLE_FTY_METRIC_CACHE_CLI defined])])
# Check for fty_metric_cache_selftest intent
AC_ARG_ENABLE([fty_metric_cache_selftest],
AS_HELP_STRING([--enable-fty_metric_cache_selftest],
[Compile 'fty_metric_cache_selftest' in src [default=yes]]),
[enable_fty_metric_cache_selftest=$enableval],
[enable_fty_metric_cache_selftest=yes])
AM_CONDITIONAL([ENABLE_FTY_METRIC_CACHE_SELFTEST], [test x$enable_fty_metric_cache_selftest != xno])
AM_COND_IF([ENABLE_FTY_METRIC_CACHE_SELFTEST], [AC_MSG_NOTICE([ENABLE_FTY_METRIC_CACHE_SELFTEST defined])])
# Checks for library functions.
AC_TYPE_SIGNAL
AC_CHECK_FUNCS(perror gettimeofday memset getifaddrs)
# enable specific system integration features
AC_ARG_WITH([systemd-units],
AS_HELP_STRING([--with-systemd-units],
[Build and install with systemd units integration [default=no]]),
[with_systemd_units=$withval],