-
Notifications
You must be signed in to change notification settings - Fork 51
/
configure.ac
1132 lines (1030 loc) · 40 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
dnl Process this file with autoconf to produce a configure script.
AC_PREREQ(2.64)
AC_INIT([ovis-ldms],
m4_esyscmd([config/git-version-gen --prefix 'v' .tarball-version]),
[ovis-help@sandia.gov])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_SRCDIR([m4/Ovis-top.m4])
AC_CONFIG_AUX_DIR(config)
AM_CONFIG_HEADER(config.h)
AC_REQUIRE_AUX_FILE([tap-driver.sh])
AC_PROG_CC
gl_EARLY
AM_INIT_AUTOMAKE([foreign tar-pax])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
AX_PREFIX_CONFIG_H_G(ovis-ldms-config.h,,,[
#ifndef OVIS_FLEX
/* If OVIS_LDMS_FLEXIBLE_ARRAY_MEMBER is undefined or 1, we use 0
for flexible array size on non ISO C compilers,
else we use empty [] per c99.
If a compiler is found not supporting both flex arrays and
0 size array declarations, it will need an OVIS_FLEX value of 1
and all sizeof calls on the affected structures will need
offsetof instead, as outlined in ac_c_flexible_array_member source.
*/
#if (OVIS_LDMS_FLEXIBLE_ARRAY_MEMBER + 0)
#define OVIS_FLEX 0
#else
#define OVIS_FLEX
#endif
/* A union of flexible array types is not allowed by gcc 4.
If this changes in a future compiler, this define may need changing.
The ldms metric value union needs this.
*/
#define OVIS_FLEX_UNION 0
#endif
])
AM_PROG_LIBTOOL
gl_INIT
AC_LIB_RPATH
dnl if LEX is not available, the configure still won't fail
AC_PROG_LEX
AC_PROG_LN_S
AC_PATH_PROG(FLEX, flex)
if test -z "$FLEX"; then
AC_MSG_ERROR([You need the 'flex' lexer generator to compile LDMS])
fi
AC_ARG_VAR([BISON], [bison command])
AC_CHECK_PROG([BISON], [bison -y], [bison -y], [no])
AS_IF([test "x$BISON" = "xno"], [AC_MSG_ERROR([bison not found])])
dnl Checks for programs
AC_PROG_CXX
dnl Checks for typedefs, structures, and compiler characteristics.
AC_CHECK_SIZEOF(long)
AC_CHECK_SIZEOF(long double)
dnl Needed for per-product flags
AC_PROG_CC_C_O
AM_PROG_CC_C_O
AC_C_CONST
AC_C_FLEXIBLE_ARRAY_MEMBER
OVIS_PKGLIBDIR
AC_LIB_HAVE_LINKFLAGS([jansson], [], [#include <jansson.h>])
AS_IF([test "x$HAVE_LIBJANSSON" = xno],
[AC_MSG_ERROR([libjansson or jansson.h not found])])
AM_CONDITIONAL([HAVE_LIBJANSSON], [test "x$HAVE_LIBJANSSON" = xyes])
dnl change sharedstatedir default
test "$sharedstatedir" = '${prefix}/com' && sharedstatedir='${prefix}/var/lib'
#
# link and include flags for build to ensure self-consistency
#
# ideally, this should yield from lib/src ldms/src
# "-I$(top_builddir)/lib/src -I$(top_builddir)/ldms/src -I$(top_srcdir)/lib/src -I$(top_srcdir)/ldms/src"
# when all the includes are fixed.
dnl contrib should never be in this list
OPTION_INCLUDE_FLAGS([OVIS],[ \
. \
lib/src \
lib/src/coll \
lib/src/third \
lib/src/ovis_util \
lib/src/ovis_auth \
lib/src/ovis_ctrl \
lib/src/ovis_ev \
lib/src/ovis_event \
lib/src/ovis_json \
lib/src/ovis_log \
lib/src/zap \
lib/src/mmalloc \
ldms/src \
ldms/src/core \
ldms/src/auth \
ldms/src/ldmsd \
ldms/src/sampler \
ldms/src/store \
])
dnl contrib subdirs should never be in this list
OPTION_LIB_FLAGS([OVIS],[ \
lib/src/coll \
lib/src/third \
lib/src/ovis_util \
lib/src/ovis_auth \
lib/src/ovis_ctrl \
lib/src/ovis_ev \
lib/src/ovis_event \
lib/src/ovis_json \
lib/src/ovis_log \
lib/src/zap \
lib/src/mmalloc \
ldms/src/core \
ldms/src/auth \
ldms/src/ldmsd \
ldms/src/sampler \
ldms/src/sampler/lustre \
ldms/src/store \
])
## stuff from lib
AC_SEARCH_LIBS([clock_gettime],[rt posix4],[LDFLAGS_GETTIME=$LIBS])
AC_SUBST([LDFLAGS_GETTIME])
LIBS=""
OPTION_DEFAULT_ENABLE([ovis_event], [ENABLE_OVIS_EVENT])
OPTION_DEFAULT_ENABLE([mmalloc], [ENABLE_MMALLOC])
OPTION_DEFAULT_ENABLE([ovis_ctrl], [ENABLE_OVIS_CTRL])
OPTION_DEFAULT_ENABLE([ovis_auth], [ENABLE_OVIS_AUTH])
OPTION_DEFAULT_ENABLE([zap], [ENABLE_ZAP])
OPTION_DEFAULT_DISABLE([rdma], [ENABLE_RDMA])
OPTION_DEFAULT_DISABLE([nola], [ENABLE_NOLA])
OPTION_DEFAULT_DISABLE([ugni], [ENABLE_UGNI])
dnl dnl OPTION_DEFAULT_DISABLE([sos], [ENABLE_SOS])
dnl dnl OPTION_WITH_OR_BUILD([sos],[../sos],[sos/src sos/include ods/src ods/include])
# PKG_PROG_PKG_CONFIG before all PKG_CHECK_MODULES may or not be called, per pkg.m4.
m4_ifndef([PKG_CHECK_MODULES],
[m4_fatal([pkg.m4 not found. Please install pkg-config (Ubuntu) or pkgconfig (RHEL) package])])
PKG_PROG_PKG_CONFIG
# <rdc/rdc.h> fails to include <assert.h> in at least rocm 6.2.1, hence the
# include of assert.h here.
AC_LIB_HAVE_LINKFLAGS([rdc_bootstrap], [], [
#include <assert.h>
#include <rdc/rdc.h>
])
AM_CONDITIONAL([HAVE_LIBRDC_BOOTSTRAP], [test "x$HAVE_LIBRDC_BOOTSTRAP" = xyes])
AC_LIB_HAVE_LINKFLAGS([rdc_ras], [], [])
AC_ARG_ENABLE([rdc],
[AS_HELP_STRING([--enable-rdc], [Include components that depend upon AMD rdc tooling. @<:@default=no@:>@ for GPUs.])],
[],
[enable_rdc="check"])
AS_IF([test "x$enable_rdc" = xyes],[
AS_IF([test "x$HAVE_LIBRDC_BOOTSTRAP" = xno],[
AC_MSG_ERROR([librdc_bootstrap or rdc/rdc.h not found])
])
])
AM_CONDITIONAL([ENABLE_RDC], [test "x$enable_rdc" != xno -a "x$HAVE_LIBRDC_BOOTSTRAP" = xyes])
have_zap=0
if test "$disable_zap" != "yes"; then
have_zap=1
dnl we need libibverbs-devel and librdmacm-devel to support rdma
if test "$enable_rdma" = "yes"; then
AC_CHECK_HEADER([infiniband/verbs.h],
[ AC_DEFINE([HAVE_VERBS_H] , [1], [Define to 1 if you have infiniband/verbs.h.])
IBVERBS_ENUM_CHECK([ibvwct_enums])
if test "$ibvwct_enums" = "1"; then
AC_DEFINE([HAVE_VERBS_IBVWCT_ENUMS], [1],
[Defined to 1 if you have IBV_WC_T* enum values in verbs.h.])
fi
],
[AC_MSG_ERROR([Missing header. libibverbs-devel not installed?])])
AC_CHECK_HEADER([rdma/rdma_cma.h],
[AC_DEFINE([HAVE_RDMA_CMA_H], [1],
[Define to 1 if you have rdma/rdma_cma.h.])],
[AC_MSG_ERROR([Missing header. librdmacm-devel not installed?])])
fi
if test "$enable_ugni" = "yes"; then
PKG_CHECK_MODULES([UGNI], [cray-ugni],
[AC_DEFINE([HAVE_CRAY_UGNI],[1],[if cray-ugni module present.])],
AC_MSG_ERROR([pkg-config cray-ugni failed])
)
PKG_CHECK_MODULES([RCA], [cray-rca],
[AC_DEFINE([HAVE_CRAY_RCA],[1],[if cray-rca module present.])],
AC_MSG_ERROR([pkg-config cray-rca failed])
)
fi
OPTION_WITH_CHECK([libfabric], [LIBFABRIC], [rdma/fabric.h],
[fabric], [fi_getinfo] )
fi
OPTION_WITH([libibverbs], [LIBIBVERBS])
OPTION_WITH([librdmacm], [LIBRDMACM])
dnl next bits need to be outside 'if' or cray fails.
AM_CONDITIONAL([ENABLE_libibverbs], [test "$HAVE_libibverbs" = "yes"])
AM_CONDITIONAL([ENABLE_librdmacm], [test "$HAVE_librdmacm" = "yes"])
AC_DEFINE_UNQUOTED([HAVE_ZAP],["$have_zap"],[configured with zap transport (1) or not (0)])
AX_CHECK_OPENSSL([],[AC_MSG_ERROR([openssl not found, and required by ldms])])
have_auth=0
if test "$enable_ovis_auth" = "yes"; then
have_auth=1
AUTH_LIB="-lovis_auth"
else
AUTH_LIB=""
fi
AC_SUBST([AUTH_LIB])
AC_SUBST([HAVE_AUTH],[$have_auth])
AC_DEFINE_UNQUOTED([HAVE_AUTH],[$have_auth],[configured with authentication (1) or not (0)])
OPTION_DEFAULT_ENABLE([sock], [ENABLE_SOCK])
OPTION_DEFAULT_DISABLE([ugni], [ENABLE_UGNI])
OPTION_DEFAULT_DISABLE([zaptest], [ENABLE_ZAPTEST])
OPTION_DEFAULT_DISABLE([ovis_event_test], [ENABLE_OVIS_EVENT_TEST])
OPTION_DEFAULT_DISABLE([ovis_ev_test], [ENABLE_OVIS_EV_TEST])
OPTION_DEFAULT_DISABLE([etc], [ENABLE_ETC])
## stuff from ldms
OPTION_DEFAULT_ENABLE([scripts], [ENABLE_SCRIPTS])
OPTION_DEFAULT_DISABLE([slurmtest], [ENABLE_SLURMTEST])
OPTION_DEFAULT_DISABLE([developer], [ENABLE_DEVELOPER])
OPTION_DOC
OPTION_DEFAULT_DISABLE([ldms-test], [ENABLE_LDMS_TEST])
OPTION_DEFAULT_ENABLE([mmap], [ENABLE_MMAP])
OPTION_DEFAULT_ENABLE([perf], [ENABLE_PERF])
OPTION_DEFAULT_DISABLE([yaml], [ENABLE_YAML])
dnl Options for store
OPTION_DEFAULT_ENABLE([store], [ENABLE_STORE])
OPTION_DEFAULT_ENABLE([flatfile], [ENABLE_FLATFILE])
OPTION_DEFAULT_ENABLE([csv], [ENABLE_CSV])
OPTION_DEFAULT_DISABLE([rabbitkw], [ENABLE_RABBITKW])
OPTION_DEFAULT_DISABLE([rabbitv3], [ENABLE_RABBITV3])
dnl AMQP
OPTION_DEFAULT_DISABLE([amqp], [ENABLE_AMQP])
dnl Options for contributed stores
OPTION_DEFAULT_DISABLE([tutorial-store],[ENABLE_TUTORIAL_STORE])
AC_ARG_ENABLE([timescale-store],
[AS_HELP_STRING([--enable-timescale-store], [enable timescaledb store plugin])],
[],
[enable_timescale_store="check"])
AS_IF([test "x$enable_timescale_store" != xno ],[
AC_LIB_HAVE_LINKFLAGS([pq], [], [#include <libpq-fe.h>])
AS_IF([test "x$enable_timescale_store" != xcheck],[
AS_IF([test "x$HAVE_LIBPQ" = xno],
[AC_MSG_ERROR([libpq or headers not found])])
])
])
AM_CONDITIONAL([ENABLE_TIMESCALE_STORE], [test "x$HAVE_LIBPQ" = xyes])
OPTION_DEFAULT_DISABLE([gpcdlocal], [ENABLE_GPCDLOCAL],[Required access to gpcd-support repository])
OPTION_WITH_OR_BUILD([gpcdlocal],[../gpcd-support],[gpcd],[gpcdlocal.sh], ,[gpcd])
OPTION_DEFAULT_DISABLE([sos], [ENABLE_SOS])
OPTION_WITH_OR_BUILD([sos],[../sos],[sos/src sos/include ods/src ods/include])
# This test is only for the older "kafka" store
OPTION_WITH_CHECK([kafka], [KAFKA], [librdkafka/rdkafka.h],
[rdkafka], [rd_kafka_new] )
AC_LIB_HAVE_LINKFLAGS([rdkafka], [], [#include <librdkafka/rdkafka.h>])
AC_LIB_HAVE_LINKFLAGS([avro], [], [#include <avro.h>])
AC_LIB_HAVE_LINKFLAGS([serdes], [], [#include <unistd.h>
#include <libserdes/serdes.h>
#include <libserdes/serdes-avro.h>])
AC_ARG_ENABLE([store-avro-kafka],
[AC_HELP_STRING([--enable-store-avro-kafka], [require the store-avro-kafka @<:@default=check@:>@])],
[],
[enable_store_avro_kafka="check"])
AS_IF([test "x$enable_store_avro_kafka" != xno],[
AS_IF([test "x$HAVE_LIBRDKAFKA" = xno],[
AS_IF([test "x$enable_store_avro_kafka" = xyes],
[AC_MSG_ERROR([store_avro_kafka requires librdkakfa])],
[enable_store_avro_kafka="no"])
])
AS_IF([test "x$HAVE_LIBAVRO" = xno],[
AS_IF([test "x$enable_store_avro_kafka" = xyes],
[AC_MSG_ERROR([store_avro_kafka requires libavro])],
[enable_store_avro_kafka="no"])
])
AS_IF([test "x$HAVE_LIBSERDES" = xno],[
AS_IF([test "x$enable_store_avro_kafka" = xyes],
[AC_MSG_ERROR([store_avro_kafka requires libserdes])],
[enable_store_avro_kafka="no"])
])
])
AM_CONDITIONAL([ENABLE_STORE_AVRO_KAFKA], [test "x$enable_store_avro_kafka" != xno])
dnl Options for sampler
OPTION_DEFAULT_ENABLE([sampler], [ENABLE_SAMPLER])
OPTION_DEFAULT_DISABLE([kgnilnd], [ENABLE_KGNILND])
OPTION_DEFAULT_ENABLE([lustre], [ENABLE_LUSTRE])
OPTION_DEFAULT_DISABLE([jobid], [ENABLE_JOBID])
OPTION_DEFAULT_ENABLE([clock], [ENABLE_CLOCK])
OPTION_DEFAULT_ENABLE([synthetic], [ENABLE_SYNTHETIC])
OPTION_DEFAULT_ENABLE([varset], [ENABLE_VARSET])
OPTION_DEFAULT_ENABLE([lnet_stats], [ENABLE_LNET_STATS])
OPTION_DEFAULT_ENABLE([meminfo], [ENABLE_MEMINFO])
OPTION_DEFAULT_DISABLE([gpumetrics], [ENABLE_GPU_METRICS])
OPTION_DEFAULT_ENABLE([coretemp], [ENABLE_CORETEMP])
OPTION_DEFAULT_DISABLE([filesingle], [ENABLE_FILESINGLE])
OPTION_DEFAULT_DISABLE([msr_interlagos], [ENABLE_MSR_INTERLAGOS])
OPTION_DEFAULT_ENABLE([array_example], [ENABLE_ARRAY_EXAMPLE])
OPTION_DEFAULT_ENABLE([hello_stream], [ENABLE_HELLO_STREAM])
OPTION_DEFAULT_ENABLE([blob_stream], [ENABLE_BLOB_STREAM])
OPTION_DEFAULT_DISABLE([perfevent], [ENABLE_PERFEVENT])
OPTION_DEFAULT_DISABLE([mpi_sampler], [ENABLE_MPI_SAMPLER])
OPTION_DEFAULT_DISABLE([mpi_noprofile], [ENABLE_MPI_NOPROFILE])
if test -z "$ENABLE_MPI_SAMPLER_TRUE" ; then
AX_MPI([:],[ AC_MSG_ERROR([MPICC required by mpi_sampler ])])
fi
OPTION_DEFAULT_ENABLE([procinterrupts], [ENABLE_PROCINTERRUPTS])
OPTION_DEFAULT_ENABLE([procnet], [ENABLE_PROCNET])
OPTION_DEFAULT_ENABLE([procnetdev], [ENABLE_PROCNETDEV])
OPTION_DEFAULT_ENABLE([procnfs], [ENABLE_PROCNFS])
OPTION_DEFAULT_ENABLE([dstat], [ENABLE_DSTAT])
OPTION_DEFAULT_ENABLE([procstat], [ENABLE_PROCSTAT])
OPTION_DEFAULT_ENABLE([llnl-edac], [ENABLE_LLNL_EDAC])
AM_CONDITIONAL([ENABLE_LLNL], [test "x$ENABLE_LLNL_EDAC_FALSE" = "x#"])
OPTION_DEFAULT_DISABLE([fptrans], [ENABLE_FPTRANS])
OPTION_DEFAULT_ENABLE([tsampler], [ENABLE_TSAMPLER])
OPTION_DEFAULT_ENABLE([cray_power_sampler], [ENABLE_CRAY_POWER_SAMPLER])
dnl cray_power_sampler won't build with --disable-tsampler
OPTION_DEFAULT_ENABLE([loadavg], [ENABLE_LOADAVG])
OPTION_DEFAULT_ENABLE([vmstat], [ENABLE_VMSTAT])
OPTION_DEFAULT_ENABLE([procdiskstats], [ENABLE_PROCDISKSTATS])
OPTION_DEFAULT_DISABLE([cray_system_sampler], [ENABLE_CRAY_SYSTEM_SAMPLER])
dnl spaceless names in the cray_system_sampler. Default is with spaces for reverse compatibility
OPTION_DEFAULT_ENABLE([spaceless_names], [ENABLE_SPACELESS_NAMES])
dnl aries_mmr is not part of the cray_system_sampler
OPTION_DEFAULT_DISABLE([aries-mmr], [ENABLE_ARIES_MMR], [Requires --enable-gpcd or --with-aries-libgpcd=libdir,incdir])
dnl linkstatus is not part of the cray_system_sampler
OPTION_DEFAULT_DISABLE([aries_linkstatus], [ENABLE_ARIES_LINKSTATUS], [Requires gpcdr to be set up with status metrics])
OPTION_DEFAULT_DISABLE([atasmart], [ENABLE_ATASMART])
OPTION_DEFAULT_ENABLE([generic_sampler], [ENABLE_GENERIC_SAMPLER])
OPTION_DEFAULT_DISABLE([switchx], [ENABLE_SWITCHX])
OPTION_WITH([switchx], [SWITCHX],[/usr/local])
OPTION_DEFAULT_DISABLE([darshan], [ENABLE_DARSHAN])
OPTION_DEFAULT_DISABLE([kokkos], [ENABLE_KOKKOS])
OPTION_DEFAULT_DISABLE([proc-streams], [ENABLE_PROC_STREAMS])
OPTION_DEFAULT_ENABLE([jobinfo-sampler], [ENABLE_JOBINFO])
OPTION_DEFAULT_DISABLE([ibm_occ], [ENABLE_IBM_OCC_SAMPLER])
OPTION_DEFAULT_DISABLE([appinfo], [ENABLE_APPINFO])
OPTION_DEFAULT_ENABLE([app-sampler], [ENABLE_APP_SAMPLER])
OPTION_DEFAULT_DISABLE([store-app], [ENABLE_STORE_APP])
OPTION_DEFAULT_DISABLE([test_sampler], [ENABLE_TEST_SAMPLER])
OPTION_DEFAULT_DISABLE([list_sampler], [ENABLE_LIST_SAMPLER])
OPTION_DEFAULT_DISABLE([record_sampler], [ENABLE_RECORD_SAMPLER])
dnl test_sampler, list_sampler and record_sampler will also build with --enable-ldms-test
AM_CONDITIONAL([ENABLE_TEST_SAMPLER_LDMS_TEST], [test "x$ENABLE_LDMS_TEST_FALSE" = "x#" -o "x$ENABLE_TEST_SAMPLER_FALSE" = "x#"])
AM_CONDITIONAL([ENABLE_LIST_SAMPLER_LDMS_TEST], [test "x$ENABLE_LDMS_TEST_FALSE" = "x#" -o "x$ENABLE_LIST_SAMPLER_FALSE" = "x#"])
AM_CONDITIONAL([ENABLE_RECORD_SAMPLER_LDMS_TEST], [test "x$ENABLE_LDMS_TEST_FALSE" = "x#" -o "x$ENABLE_RECORD_SAMPLER_FALSE" = "x#"])
OPTION_DEFAULT_DISABLE([grptest], [ENABLE_GRPTEST])
dnl grptest will also build with --enable-ldms-test
AM_CONDITIONAL([ENABLE_GRPTEST_LDMS_TEST], [test "x$ENABLE_LDMS_TEST_FALSE" = "x#" -o "x$ENABLE_GRPTEST_FALSE" = "x#"])
dnl options for contributed samplers
OPTION_DEFAULT_DISABLE([ipmireader], [ENABLE_IPMIREADER])
OPTION_DEFAULT_DISABLE([tutorial-sampler],[ENABLE_TUTORIAL_SAMPLER])
dnl Variorum dependency support
AC_ARG_ENABLE([variorum],
[AS_HELP_STRING([--enable-variorum], [require components that depend upon libvariorum (and libjansson) @<:@default=check@:>@])],
[],
[enable_variorum="check"])
AS_IF([test "x$enable_variorum" != xno],[
AC_LIB_HAVE_LINKFLAGS([variorum], [], [#include <variorum.h>
#include <variorum_topology.h>])
AS_IF([test "x$enable_variorum" != xcheck],[
AS_IF([test "x$HAVE_LIBVARIORUM" = xno],
[AC_MSG_ERROR([libvariorum or headers not found])])
])
AS_IF([test "x$enable_variorum" != xcheck],[
AS_IF([test "x$HAVE_LIBJANSSON" = xno],
[AC_MSG_ERROR([libjansson or headers not found])])
])
])
AM_CONDITIONAL([ENABLE_VARIORUM_SAMPLER], [test "x$enable_variorum" != no -a "x$HAVE_LIBVARIORUM" = xyes -a "x$HAVE_LIBJANSSON" = xyes])
dnl check for libcurl if influx is configured
OPTION_DEFAULT_DISABLE([influx], [ENABLE_INFLUX])
if test -z "$ENABLE_INFLUX_TRUE"; then
TMPLIBS="$LIBS"
LIBS=""
AC_CHECK_LIB(curl, curl_version, [],
AC_MSG_ERROR([libcurl not found (required by influx).]))
AC_CHECK_HEADER(curl/curl.h, [],
AC_MSG_ERROR([`curl.h` not found (required by influx).]))
LIBS="$TMPLIBS"
fi
AC_ARG_ENABLE([papi],
[AS_HELP_STRING([--enable-papi], [require components that depend upon libpapi (and libpfm) @<:@default=check@:>@])],
[],
[enable_papi="check"])
AS_IF([test "x$enable_papi" != xno],[
AC_LIB_HAVE_LINKFLAGS([papi], [], [#include <papi.h>])
AS_IF([test "x$enable_papi" != xcheck],[
AS_IF([test "x$HAVE_LIBPAPI" = xno],
[AC_MSG_ERROR([libpapi or headers not found])])
])
AC_LIB_HAVE_LINKFLAGS([pfm], [], [#include <perfmon/pfmlib_perf_event.h>])
AS_IF([test "x$enable_papi" != xcheck],[
AS_IF([test "x$HAVE_LIBPFM" = xno],
[AC_MSG_ERROR([libpfm or headers not found])])
])
])
AM_CONDITIONAL([HAVE_LIBPAPI], [test "x$HAVE_LIBPAPI" = xyes])
AM_CONDITIONAL([HAVE_LIBPFM], [test "x$HAVE_LIBPFM" = xyes])
AC_LIB_HAVE_LINKFLAGS([ibmad], [], [#include <infiniband/mad.h>])
AM_CONDITIONAL([HAVE_LIBIBMAD], [test "x$HAVE_LIBIBMAD" = xyes])
AC_LIB_HAVE_LINKFLAGS([ibumad], [], [#include <infiniband/umad.h>])
AM_CONDITIONAL([HAVE_LIBIBUMAD], [test "x$HAVE_LIBIBUMAD" = xyes])
AC_LIB_HAVE_LINKFLAGS([osmcomp], [], [])
AM_CONDITIONAL([HAVE_LIBOSMCOMP], [test "x$HAVE_LIBOSMCOMP" = xyes])
CPPFLAGS_BACKUP=$CPPFLAGS
CPPFLAGS="$CPPFLAGS -I/usr/include/infiniband"
AC_CHECK_HEADERS([iba/ib_types.h], [], [])
AC_CHECK_HEADERS([complib/cl_nodenamemap.h], [], [])
CPPFLAGS=$CPPFLAGS_BACKUP
AM_CONDITIONAL([HAVE_IBA_IB_TYPES_H], [test "x$ac_cv_header_iba_ib_types_h" = xyes])
AM_CONDITIONAL([HAVE_COMPLIB_CL_NODENAMEMAP_H], [test "x$ac_cv_header_complib_cl_nodenamemap_h" = xyes])
AC_ARG_ENABLE([infiniband],
[AS_HELP_STRING([--enable-infiniband], [require components that depend upon libibmad and libibumad @<:@default=check@:>@])],
[],
[enable_infiniband="check"])
AM_CONDITIONAL([ENABLE_INFINIBAND], [test "x$enable_infiniband" != xno])
AS_IF([test "x$enable_infiniband" = xyes],[
AS_IF([test "x$HAVE_LIBIBMAD" = xno],
[AC_MSG_ERROR([infiniband required libibmad or <infiniband/mad.h> not found])])
AS_IF([test "x$HAVE_LIBIBUMAD" = xno],
[AC_MSG_ERROR([infiniband required libibumad or <infiniband/umad.h> not found])])
AS_IF([test "x$ac_cv_header_iba_ib_types_h" = xno],
[AC_MSG_ERROR([infiniband required <infiniband/iba/ib_types.h> not found ])])
])
AC_ARG_ENABLE([ibnet],
[AS_HELP_STRING([--enable-ibnet], [require the ibnet plugin @<:@default=check@:>@])],
[],
[enable_ibnet="check"])
AM_CONDITIONAL([ENABLE_IBNET], [test "x$enable_ibnet" != xno])
AS_IF([test "$enable_ibnet" = xyes],[
AC_MSG_NOTICE([Disable ibnet module NOT requested])
AS_IF([test "x$HAVE_LIBIBMAD" = xno],
[AC_MSG_ERROR([ibnet required libibmad or <infiniband/mad.h> not found])])
AS_IF([test "x$HAVE_LIBIBUMAD" = xno],
[AC_MSG_ERROR([ibnet required libibumad or <infiniband/umad.h> not found])])
AS_IF([test "x$HAVE_LIBOSMCOMP" = xno],
[AC_MSG_ERROR([ibnet required libosmcomp not found])])
AS_IF([test "x$ac_cv_header_complib_cl_nodenamemap_h" = xno],
[AC_MSG_ERROR([ibnet required <infiniband/complib/cl_nodenamemap.h> not found ])])
])
AC_ARG_ENABLE([opa2],
[AS_HELP_STRING([--enable-opa2], [require the opa2 plugin @<:@default=check@:>@])],
[],
[enable_opa2="check"])
AM_CONDITIONAL([ENABLE_OPA2], [test "x$enable_opa2" != xno])
AS_IF([test "x$enable_opa2" = xyes],[
AS_IF([test "x$HAVE_LIBIBMAD" = xno],
[AC_MSG_ERROR([opa2 required libibmad or <infiniband/mad.h> not found])])
AS_IF([test "x$HAVE_LIBIBUMAD" = xno],
[AC_MSG_ERROR([opa2 required libibumad or <infiniband/umad.h> not found])])
])
# enable tx2mon by default only when sensible.
AC_ARG_ENABLE([tx2mon],
[AS_HELP_STRING([--enable-tx2mon], [require components that depend upon tx2mon header) @<:@default=check@:>@])],
[],
[enable_tx2mon="check"])
AS_IF([test "x$enable_tx2mon" != xno],[
AC_CHECK_HEADER([tx2mon/mc_oper_region.h], [HAVE_TX2MON=yes; enable_tx2mon=yes], [HAVE_TX2MON=no], [#include <stdint.h>])
AS_IF([test "x$enable_tx2mon" != xcheck],[
AS_IF([test "x$HAVE_TX2MON" = xno], [AC_MSG_ERROR([tx2mon headers not found. Install tx2mon package and (at runtime) kernel module on ThunderX2 platforms.])])
])
])
AM_CONDITIONAL([HAVE_TX2MON], [test "x$HAVE_TX2MON" = xyes])
AM_CONDITIONAL([ENABLE_TX2MON], [test "$enable_tx2mon" = "yes"])
if test -z "$ENABLE_KOKKOS_TRUE"; then
dnl kokkos needs sos (not the storesos).
CHECK_SOS=1
fi
if test -z "$ENABLE_DARSHAN_TRUE"; then
dnl darshan needs sos (not the storesos).
CHECK_SOS=1
fi
if test -z "$ENABLE_PROC_STREAMS_TRUE"; then
dnl linux_proc_sampler stream stores need sos
CHECK_SOS=1
fi
if test -z "$ENABLE_STORE_APP_TRUE"; then
dnl kokkos needs sos (not the storesos).
CHECK_SOS=1
fi
dnl Other libraries
OPTION_DEFAULT_DISABLE([gemini-gpcdr], [ENABLE_GEMINI_GPCDR]) dnl use gpcdr for gemini (not mutually exclusive)
OPTION_DEFAULT_DISABLE([aries-gpcdr], [ENABLE_ARIES_GPCDR]) dnl use gpcdr for aries (not mutually exclusive)
OPTION_DEFAULT_DISABLE([cray-nvidia], [ENABLE_CRAY_NVIDIA])
OPTION_DEFAULT_DISABLE([cray-nvidia-inc], [ENABLE_CRAY_NVIDIA_INC])
OPTION_WITH([cray-nvidia-inc], [CRAY_NVIDIA_INC]) dnl for the path to nvidia include
dnl Will need to have the NVIDIA library in the LD_LIBRARY_PATH
OPTION_DEFAULT_DISABLE([cray-hss-devel], [ENABLE_CRAY_HSS_DEVEL])
OPTION_WITH([cray-hss-devel], [CRAY_HSS_DEVEL],[/usr])
# for aries_mmr
OPTION_ARIES_MMR
dnl munge
OPTION_DEFAULT_DISABLE([munge], [ENABLE_MUNGE])
OPTION_WITH([munge], [MUNGE])
LDMSD_PLUGIN_LIBPATH=${pkglibdir}
AC_SUBST(LDMSD_PLUGIN_LIBPATH)
dnl Check for pthread support
AC_CHECK_LIB(pthread, pthread_mutex_init, [],
AC_MSG_ERROR([pthread library not found. ldms requires libpthread.]))
dnl save LIBS variable.
TMPLIBS="$LIBS"
LIBS=""
dnl no clock_gettime on osx. see
dnl https://developer.apple.com/library/mac/qa/qa1398/_index.html
AC_SEARCH_LIBS([clock_gettime],[rt posix4],[LDFLAGS_GETTIME=$LIBS])
LIBS=""
AC_SUBST([LDFLAGS_GETTIME])
OVIS_AUTH_LIBS="${AUTH_LIB} ${LDFLAGS_GETTIME} ${OPENSSL_LIBS}"
AC_SUBST(OVIS_AUTH_LIBS)
dnl Check for libreadline
AX_LIB_READLINE
LDFLAGS_READLINE=$LIBS
AC_SUBST([LDFLAGS_READLINE])
LIBS=$TMPLIBS
dnl GEOPM telemetry support
AC_MSG_CHECKING([for GEOPM telemetry library])
AC_ARG_WITH([geopm],
[AS_HELP_STRING([--with-geopm],
[build GEOPM telemetry sampler @<:@default=check@:>@])],
[AS_IF([test "x$withval" != xyes -a "x$withval" != xno],
[GEOPM_CFLAGS="-I$withval/include"
GEOPM_LDFLAGS="-L$withval/lib64 -L$withval/lib"]
)],
[with_geopm=check])
have_geopm=no
AC_SUBST([GEOPM_CFLAGS])
AC_SUBST([GEOPM_LDFLAGS])
AS_IF([test "x$with_geopm" != xno], [
save_LDFLAGS=$LDFLAGS
LDFLAGS="$LDFLAGS $GEOPM_LDFLAGS"
save_CFLAGS=$CFLAGS
CFLAGS="$CFLAGS $GEOPM_CFLAGS"
save_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$CPPFLAGS $GEOPM_CFLAGS"
AC_CHECK_HEADER(geopm_pio.h, [have_geopm=yes], [have_geopm=no])
AC_CHECK_HEADER(geopm_topo.h, [have_geopm=yes], [have_geopm=no])
AC_CHECK_LIB([geopmd], [geopm_pio_push_signal], [have_geopm=yes], [have_geopm=no])
AC_CHECK_LIB([geopmd], [geopm_pio_reset], [have_geopm=yes], [have_geopm=no])
CPPFLAGS=$save_CPPFLAGS
CFLAGS=$save_CFLAGS
LDFLAGS=$save_LDFLAGS
])
AM_CONDITIONAL([ENABLE_GEOPM_SAMPLER], [test x$have_geopm = xyes])
AM_COND_IF([ENABLE_GEOPM_SAMPLER],[
AC_DEFINE([ENABLE_GEOPM_SAMPLER], [], [Build GEOPM telemetry sampler])
])
AC_MSG_RESULT([$with_geopm])
dnl DAOS telemetry support
AC_ARG_WITH([daos],
[AS_HELP_STRING([--with-daos],
[build DAOS telemetry sampler @<:@default=check@:>@])],
[AS_IF([test "x$withval" != xyes -a "x$withval" != xno],
[DAOS_CFLAGS="-I$withval/include"
DAOS_LDFLAGS="-L$withval/lib64"]
)],
[with_daos=check])
have_daos=no
AC_SUBST([DAOS_CFLAGS])
AC_SUBST([DAOS_LDFLAGS])
AS_IF([test "x$with_daos" != xno], [
save_LDFLAGS=$LDFLAGS
LDFLAGS="$LDFLAGS $DAOS_LDFLAGS"
save_CFLAGS=$CFLAGS
CFLAGS="$CFLAGS $DAOS_CFLAGS"
save_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$CPPFLAGS $DAOS_CFLAGS"
AC_CHECK_HEADER(gurt/common.h, [have_daos=yes], [have_daos=no])
AC_CHECK_HEADER(gurt/telemetry_common.h, [have_daos=yes], [have_daos=no])
AC_CHECK_HEADER(gurt/telemetry_consumer.h, [have_daos=yes], [have_daos=no])
AC_CHECK_LIB([gurt], [d_tm_init], [have_daos=yes], [have_daos=no])
CPPFLAGS=$save_CPPFLAGS
CFLAGS=$save_CFLAGS
LDFLAGS=$save_LDFLAGS
])
AM_CONDITIONAL([ENABLE_DAOS_SAMPLER], [test x$have_daos = xyes])
AM_COND_IF([ENABLE_DAOS_SAMPLER],[
AC_DEFINE([ENABLE_DAOS_SAMPLER], [], [Build DAOS telemetry sampler])
])
AC_MSG_CHECKING([for DAOS telemetry support])
AC_MSG_RESULT([$have_daos])
dnl Munge library check
if test -z "$ENABLE_MUNGE_TRUE"; then
AC_CHECK_LIB(munge, munge_encode, [], AC_MSG_ERROR([libmunge not found]))
dnl Reset LIBS variable.
LIBS=""
AC_CHECK_HEADER(munge.h, [], AC_MSG_ERROR([munge.h not found]))
fi
AC_ARG_WITH([slurm],
[AS_HELP_STRING([--with-slurm],
[support SLURM jobid information and more @<:@default=check@:>@])],
[AS_IF([test "x$withval" != xyes -a "x$withval" != xno],
[SLURM_CFLAGS="-I $withval/include"])],
[with_slurm=check])
have_slurm=no
AC_SUBST([SLURM_CFLAGS])
AS_IF([test "x$with_slurm" != no],[
save_CFLAGS=$CFLAGS
CFLAGS="$CFLAGS $SLURM_CFLAGS"
AC_CHECK_HEADER([slurm/spank.h], [have_slurm=yes], [have_slurm=no])
CFLAGS=$save_CFLAGS
AS_IF([test "x$have_slurm=" = xno],[
AS_IF([test "x$with_slurm" != xcheck],
[AC_MSG_ERROR([<slurm/spank.h> not found. slurm installed?])],
[AC_MSG_WARN([Disabling SLURM support.])])])
])
AM_CONDITIONAL([HAVE_SLURM], [test "x$have_slurm" = xyes])
AC_CHECK_HEADER([linux/netlink.h], [have_netlink=yes], [have_netlink=no])
AM_CONDITIONAL([HAVE_NETLINK], [test "x$have_netlink" = xyes])
if test -z "$ENABLE_SOS_TRUE"; then
CHECK_SOS=1
fi
if test -n "$CHECK_SOS"; then
if test "x$WITH_SOS" != "xbuild"; then
OCFLAGS=$CFLAGS
CFLAGS=$SOS_INCDIR_FLAG
AC_CHECK_HEADERS(sos/sos.h,
[],
AC_MSG_FAILURE([sos/sos.h not found])
)
AC_CHECK_LIB( sos, sos_container_open,
[],
AC_MSG_FAILURE(libsos not found: required by either --enable-sos or --enable-kokkos),
[ $SOS_LIB64DIR_FLAG $SOS_LIBDIR_FLAG ]
)
CFLAGS=$OCFLAGS
LIBS=""
else
AC_MSG_NOTICE([Using staged ovis-sos $OVIS_SOS_LIB64DIR_FLAG $OVIS_SOS_LIBDIR_FLAG])
fi
fi
if test -n "$SOS_LIB64DIR"; then
soslibdir="$SOS_LIB64DIR"
plugins_rpath="$plugins_rpath:$SOS_LIB64DIR"
fi
if test -n "$SOS_LIBDIR"; then
soslibdir="$SOS_LIBDIR"
plugins_rpath="$plugins_rpath:$SOS_LIBDIR"
fi
AC_SUBST(soslibdir)
if test -z "$ENABLE_ATASMART_TRUE" ; then
AC_CHECK_LIB(atasmart, sk_disk_smart_read_data, [],
AC_MSG_ERROR([libatasmart not found. sampler_atasmart requires libatasmart and libatasmart-devel.]))
fi
if test -z "$ENABLE_RABBITV3_TRUE" -o -z "$ENABLE_RABBITKW_TRUE"; then
AC_CHECK_LIB(rabbitmq, amqp_version, [],
AC_MSG_ERROR([librabbitmq not found. store_rabbitv3 requires librabbitmq and amqp headers.]))
AC_LANG_PUSH([C])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
[[#include <amqp.h>
#if ((AMQP_VERSION_MINOR < 7) && (AMQP_VERSION_MAJOR < 1))
#error "librabbitmq version < 0.7 not supported"
#endif
]])],
[AC_DEFINE([HAVE_RABBITMQ],[],[Is librabbitmq >= 0.7.0 available?])],
[ AC_MSG_ERROR([librabbitmq version > 0.7 not found])])
AC_LANG_POP([C])
fi
if test -z "$ENABLE_YAML_TRUE"; then
AC_CHECK_LIB(yaml, yaml_parser_load, [],
AC_MSG_ERROR([libyaml not found. please add --disable-yaml to disable yaml support.]))
dnl Reset LIBS variable.
LIBS=""
fi
if test -z "$ENABLE_SOS_TRUE"; then
if test "x$WITH_SOS" != "xbuild"; then
OCFLAGS=$CFLAGS
CFLAGS=$SOS_INCDIR_FLAG
AC_CHECK_HEADERS(sos/sos.h,
[],
AC_MSG_FAILURE([sos/sos.h not found])
)
AC_CHECK_LIB(sos, sos_container_open,
[],
AC_MSG_FAILURE(libsos not found: required by --enable-sos),
[ $SOS_LIB64DIR_FLAG $SOS_LIBDIR_FLAG ]
)
CFLAGS=$OCFLAGS
LIBS=""
else
AC_MSG_NOTICE([Using staged ovis-sos $OPVIS_SOS_LIB64DIR_FLAG $OVIS_SOS_LIBDIR_FLAG])
fi
fi
AC_ARG_ENABLE([python],
[AS_HELP_STRING([--disable-python], [disable the LDMS python API])],
[want_python=$enableval],
[want_python="check"])
dnl --disable-ldms-python is deprecated, and we should remove it in 5.X
AC_ARG_ENABLE([ldms-python],
[AS_HELP_STRING([--disable-ldms-python], [disable the LDMS python API (deprecated)])],
[want_python=$enableval])
AC_ARG_VAR([CYTHON], [Cython compiler command])
dnl ldms's python APIs and programs
dnl We make the assumption that if AM_PATH_PYTHON succeeds, that AX_PYTHON_DEVEL
dnl is very likely to succeed as well.
python_found=false
cython_found=false
AS_IF([test "x$want_python" != xno], [
AM_PATH_PYTHON([3.6],
[AX_PYTHON_DEVEL([>='3.6'])
pkgpythondir="${pythondir}/ovis_ldms"
pkgpyexecdir="${pkgpythondir}"
AX_PYTHON_MODULE_VERSION(["argparse"], 1.1, "python")
python_found=true
CYTHON_CHECK([0.25], [$PYTHON_VERSION],
[cython_found=true], [cython_found=false])],
[python_found=false
cython_found=false])
AS_IF([test "$python_found" = false],
[AS_IF([test "x$want_python" = xyes],
[AC_MSG_ERROR([python not found])],
[AC_MSG_WARN([python not found])])])
AS_IF([test "$cython_found" = false],
[AS_IF([test "x$want_python" = xyes],
[AC_MSG_ERROR([cython not found])],
[AC_MSG_WARN([cython not found])])])
])
AM_CONDITIONAL([ENABLE_PYTHON], [test "$python_found" = true -a "$cython_found" = true])
OPTION_WITH_PORT([LDMSD],[411])
dnl if cray_sampler set some other variables
if test "x$enable_cray_system_sampler" = "xyes"
then
if test -z "$ENABLE_SPACELESS_NAMES_TRUE"; then
AC_DEFINE([HAVE_SPACELESS_NAMES],[1],[cray_system_sampler: Using spaceless names.])
fi
if !(test -z "$ENABLE_GEMINI_GPCDR_TRUE") && !(test -z "$ENABLE_ARIES_GPCDR_TRUE")
then
AC_MSG_ERROR([Must enable at least one of gemini-gpcdr, and aries-gpcdr with --enable-cray-system-sampler.])
fi
if test -z "$ENABLE_GEMINI_GPCDR_TRUE"
then
gpcdrfile="/sys/devices/virtual/gni/gpcdr0/metricsets/links/metrics"
if ! test -f $gpcdrfile; then
AC_MSG_WARN([
++++++++++++++++++++++++++++++++++++++++++++
GEMINI gpcdr interface not available:
$gpcdrfile
We hope your runtime environment has it.
++++++++++++++++++++++++++++++++++++++++++++
])
fi
AC_MSG_RESULT([Building gpcdr interface for GEMINI HSN metrics.])
fi
if test -z "$ENABLE_ARIES_GPCDR_TRUE"
then
gpcdrfile1="/sys/devices/virtual/gni/gpcdr0/metricsets/linktraffic/metrics"
gpcdrfile2="/sys/devices/virtual/gni/gpcdr0/metricsets/linkstalled/metrics"
gpcdrfile3="/sys/devices/virtual/gni/gpcdr0/metricsets/linksendstatus/metrics"
gpcdrfile4="/sys/devices/virtual/gni/gpcdr0/metricsets/linkrecvstatus/metrics"
if !(test -f $gpcdrfile1) || !(test -f $gpcdrfile2) || !(test -f $gpcdrfile3) || !(test -f $gpcdrfile4)
then
AC_MSG_WARN([
++++++++++++++++++++++++++++++++++++++++++++
ARIES gpcdr interface not available:
$gpcdrfile1 $gpcdrfile2 $gpcdrfile3 $gpcdrfile4
We hope your runtime environment has it.
++++++++++++++++++++++++++++++++++++++++++++
])
fi
AC_MSG_RESULT([Building gpcdr interface for ARIES HSN metrics.])
fi
if test -z "$ENABLE_CRAY_NVIDIA_TRUE"
then
AC_DEFINE([HAVE_CRAY_NVIDIA],[1],[cray_system_sampler: Including option for NVIDIA metrics.])
AC_MSG_RESULT([cray_system_sampler: Including option for NVIDIA metrics.])
else
AC_MSG_RESULT([cray_system_sampler: Not including option for NVIDIA metrics.])
fi
if test -z "$ENABLE_LUSTRE_TRUE"
then
AC_DEFINE([HAVE_LUSTRE],[1],[cray_system_sampler: Include option for LUSTRE metrics.])
AC_MSG_RESULT([cray_system_sampler: Including option for LUSTRE metrics.])
else
AC_MSG_RESULT([cray_system_sampler: Not including option for LUSTRE metrics.])
fi
fi
dnl Reset LIBS variable.
LIBS=""
## stuff from top
OPTION_DEFAULT_DISABLE([csv_check], [ENABLE_CSV_CHECK],[ requires C++,boost])
OPTION_EXTRA_BUILD_DIRS([third-plugins], [ENABLE_THIRD_PLUGINS], [THIRD_PLUGINS_DIRS])
if test -z "$ENABLE_CSV_CHECK_TRUE"
then
AC_LANG_PUSH([C++])
BOOST_REQUIRE( , AC_MSG_ERROR([csv_check enabled but boost not found.]))
BOOST_STRING_ALGO
AC_LANG_POP([C++])
LIBS=""
fi
OPTION_GITINFO
OPTION_HOSTINFO
AC_ARG_WITH([dcgm],
[AS_HELP_STRING([--with-dcgm],
[Include code that depends on Nvidia DCGM @<:@default=check@:>@])],
[],
[with_dcgm=check])
LIBDCGM=
AS_IF([test "x$with_dcgm" != xno],
[AC_CHECK_LIB([dcgm], [dcgmInit],
[have_dcgm=true],
[have_dcgm=false
if test "x$with_dcgm" != xcheck; then
AC_MSG_FAILURE([--with-dcgm was given, but test for dcgm failed])
fi
])],
[have_dcgm=false])
AM_CONDITIONAL([HAVE_DCGM], [test x$have_dcgm = xtrue])
AM_CONDITIONAL([SYSCONFDIR_NOT_ETC], [test "${sysconfdir}" != "/etc"])
AC_LIB_HAVE_LINKFLAGS([cxi], [], [
#include <stddef.h> /* libcxi.h fails to include this */
#include <libcxi/libcxi.h>
#include <cassini_cntr_desc.h> /* needed at least starting with shs-2.1.0 */
])
AM_CONDITIONAL([HAVE_LIBCXI], [test "x$HAVE_LIBCXI" = xyes])
AC_ARG_ENABLE([slingshot],
[AS_HELP_STRING([--enable-slingshot], [require the slinghost related plugins @<:@default=check@:>@])],
[],
[enable_slingshot="check"])
AM_CONDITIONAL([ENABLE_SLINGSHOT], [test "x$enable_slingshot" != xno -a "x$HAVE_LIBCXI" = xyes])
AS_IF([test "x$enable_slingshot" = xyes],[
AS_IF([test "x$HAVE_LIBCXI" = xno],
[AC_MSG_ERROR([libcxi or its headers not found])])
])
AC_ARG_ENABLE([zfs],
[AS_HELP_STRING([--enable-zfs], [require the zfs related plugins @<:@default=check@:>@])],
[],
[enable_zfs="check"])
AC_SEARCH_LIBS([zpool_vdev_name], [zfs],[HAVE_ZFS=yes])
AM_CONDITIONAL([ENABLE_ZFS], [test "x$enable_zfs" != xno -a "x$HAVE_ZFS" = xyes])
AS_IF([test "x$enable_zfs" = xyes],[
AS_IF([test "x$HAVE_ZFS" = xno],
[AC_MSG_ERROR([libzfs or its headers not found])])
])
# define substitutions for configvars and other sed-generated files.
# note carefully the escapes.
OVIS_DO_SUBST([LDMS_SUBST_RULE], ["sed \
-e 's,[[@]]VERSION[[@]],\$(VERSION),g' \
-e 's,[[@]]mandir[[@]],\$(mandir),g' \
-e 's,[[@]]localedir[[@]],\$(localedir),g' \
-e 's,[[@]]libdir[[@]],\$(libdir),g' \
-e 's,[[@]]psdir[[@]],\$(psdir),g' \
-e 's,[[@]]pdfdir[[@]],\$(pdfdir),g' \
-e 's,[[@]]dvidir[[@]],\$(dvidir),g' \
-e 's,[[@]]htmldir[[@]],\$(htmldir),g' \
-e 's,[[@]]infodir[[@]],\$(infodir),g' \
-e 's,[[@]]docdir[[@]],\$(docdir),g' \
-e 's,[[@]]includedir[[@]],\$(includedir),g' \
-e 's,[[@]]localstatedir[[@]],\$(localstatedir),g' \
-e 's,[[@]]sharedstatedir[[@]],\$(sharedstatedir),g' \
-e 's,[[@]]sysconfdir[[@]],\$(sysconfdir),g' \
-e 's,[[@]]datadir[[@]],\$(datadir),g' \
-e 's,[[@]]datarootdir[[@]],\$(datarootdir),g' \
-e 's,[[@]]libexecdir[[@]],\$(libexecdir),g' \
-e 's,[[@]]sbindir[[@]],\$(sbindir),g' \
-e 's,[[@]]bindir[[@]],\$(bindir),g' \
-e 's,[[@]]prefix[[@]],\$(prefix),g' \
-e 's,[[@]]exec_prefix[[@]],\$(exec_prefix),g' \
-e 's,[[@]]LDMSD_PLUGIN_LIBPATH[[@]],\$(LDMSD_PLUGIN_LIBPATH),g' \
-e 's,[[@]]ZAP_LIBPATH[[@]],\$(ZAP_LIBPATH),g' \
-e 's,[[@]]pkglibdir[[@]],\$(pkglibdir),g' \
-e 's,[[@]]plugins_rpath[[@]],\$(plugins_rpath),g' \
-e 's,[[@]]pythondir[[@]],\$(pythondir),g' \
-e 's,[[@]]SOS_LIB64DIR[[@]],\$(SOS_LIB64DIR),g' \
-e 's,[[@]]SOS_LIBDIR[[@]],\$(SOS_LIBDIR),g' \
"
])
AC_SUBST(ac_configure_args)
AC_SUBST(configure_input)
AC_CONFIG_FILES([Makefile
util/Makefile
util/relocation/Makefile
lib/Doxyfile
lib/Makefile
lib/src/Makefile
lib/src/ovis_json/Makefile
lib/src/third/Makefile
lib/src/coll/Makefile
lib/src/mmalloc/Makefile
lib/src/ovis_ev/Makefile
lib/src/ovis_event/Makefile
lib/src/ovis_ctrl/Makefile
lib/src/ovis_util/Makefile
lib/src/ovis_auth/Makefile
lib/src/ovis_ref/Makefile
lib/src/ovis_log/Makefile
lib/src/zap/Makefile
lib/src/zap/rdma/Makefile
lib/src/zap/fabric/Makefile
lib/src/zap/sock/Makefile
lib/src/zap/ugni/Makefile
lib/src/zap/test/Makefile
lib/etc/Makefile
lib/etc/ovis/Makefile
lib/etc/ld.so.conf.d/Makefile
gnulib/Makefile
ldms/Makefile
ldms/src/Makefile
ldms/src/core/Makefile
ldms/src/auth/Makefile
ldms/src/store/Makefile
ldms/src/sampler/Makefile
ldms/src/decomp/Makefile
ldms/src/decomp/static/Makefile
ldms/src/decomp/as_is/Makefile
ldms/src/decomp/flex/Makefile
ldms/src/contrib/Makefile
ldms/src/sampler/blob_stream/Makefile
ldms/src/store/stream/Makefile
ldms/src/store/test/Makefile
ldms/src/store/kokkos/Makefile
ldms/src/store/proc_store/Makefile
ldms/src/store/darshan/Makefile
ldms/src/store/kokkos_appmon/Makefile