-
Notifications
You must be signed in to change notification settings - Fork 8
/
configure.ac
273 lines (239 loc) · 6.43 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
##*****************************************************************************
## $Id: configure.ac,v 1.83 2008-04-01 22:01:47 chu11 Exp $
##*****************************************************************************
## Process this file with autoconf to produce a configure script.
##*****************************************************************************
##
# Prologue.
##
AC_INIT([cerebro], [1.21.8])
AC_CONFIG_AUX_DIR([config])
AC_CONFIG_SRCDIR([README])
AC_CANONICAL_TARGET
##
# Automake support.
##
AM_INIT_AUTOMAKE([tar-ustar subdir-objects])
AC_CONFIG_HEADERS([config/config.h])
AM_MAINTAINER_MODE
# Update this information before a public release only!
# library versioning
#
# If the library source code has changed at all since the last update,
# then increment c:r: c:r+1:).
#
# If any interfaces have been added, removed, or changed since the
# last update, increment current, and set revision to 0.
#
# If any interfaces have been added since the last public release,
# then increment age.
#
# If any interfaces have been removed or changed since the last public
# release, then set age to 0.
#
LIBCEREBRO_CURRENT=1
LIBCEREBRO_REVISION=1
LIBCEREBRO_AGE=0
LIBCEREBRO_VERSION_INFO=$LIBCEREBRO_CURRENT:$LIBCEREBRO_REVISION:$LIBCEREBRO_AGE
AC_SUBST([LIBCEREBRO_VERSION_INFO])
LIBCEREBRO_ERROR_CURRENT=0
LIBCEREBRO_ERROR_REVISION=0
LIBCEREBRO_ERROR_AGE=0
LIBCEREBRO_ERROR_VERSION_INFO=$LIBCEREBRO_ERROR_CURRENT:$LIBCEREBRO_ERROR_REVISION:$LIBCEREBRO_ERROR_AGE
AC_SUBST([LIBCEREBRO_ERROR_VERSION_INFO])
##
# Checks for programs.
##
AC_PROG_CC
AC_PROG_MAKE_SET
LT_INIT
AC_LIB_LTDL
AM_CONDITIONAL(WITH_GNU_LD, test "$with_gnu_ld" = "yes")
##
# Check for systemd
##
RRA_WITH_SYSTEMD_UNITDIR
#
# Check for debugging
#
# Must be called before module checks
#
AC_DEBUG
##
# Checks for header files.
##
AC_HEADER_STDC
AC_HEADER_TIME
AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS( \
fcntl.h \
unistd.h \
getopt.h \
pthread.h \
signal.h \
)
#
# Check for default paths
#
# Must be called before module checks. Module dir must be calculated
# before metric control path.
#
AC_CEREBRO_MODULE_DIR
AC_CEREBRO_CONFIG_FILE
AC_CEREBRO_METRIC_CONTROL_PATH
#
# Check for static module compilation
#
AC_STATIC_MODULES
AM_CONDITIONAL(WITH_STATIC_MODULES, [test "$ac_with_static_modules" = "yes"])
#
# Check for cerebrod speaker only build
#
AC_CEREBROD_SPEAKER_ONLY
AC_CEREBROD_NO_THREADS
AM_CONDITIONAL(WITH_CEREBROD_SPEAKER_ONLY, [test "$ac_with_cerebrod_speaker_only" = "yes"])
AM_CONDITIONAL(WITH_CEREBROD_NO_THREADS, [test "$ac_with_cerebrod_no_threads" = "yes"])
#
# Check to build genders module
#
AC_GENDERS
AM_CONDITIONAL(WITH_GENDERS, [test "$ac_with_genders" = "yes"])
#
# Check to build hostsfile module
#
AC_HOSTSFILE
AC_HOSTSFILE_PATH
AM_CONDITIONAL(WITH_HOSTSFILE, [test "$ac_with_hostsfile" = "yes"])
#
# Check to build boottime module
#
AC_BOOTTIME
AM_CONDITIONAL(WITH_BOOTTIME, [test "$ac_with_boottime" = "yes"])
#
# Check to build loadavg modules
#
AC_LOADAVG
AM_CONDITIONAL(WITH_LOADAVG, [test "$ac_with_loadavg" = "yes"])
#
# Check to build memory modules
#
AC_MEMORY
AM_CONDITIONAL(WITH_MEMORY, [test "$ac_with_memory" = "yes"])
#
# Check to build net modules
#
AC_NETWORK
AM_CONDITIONAL(WITH_NETWORK, [test "$ac_with_network" = "yes"])
#
# Check to build slurm_state module
#
AC_SLURM_STATE
AC_SLURM_STATE_CONTROL_PATH
AM_CONDITIONAL(WITH_SLURM_STATE, [test "$ac_with_slurm_state" = "yes"])
#
# Check to build shutdown module
#
AC_SHUTDOWN
AM_CONDITIONAL(WITH_SHUTDOWN, [test "$ac_with_shutdown" = "yes"])
#
# Check to build updown module
#
AC_UPDOWN
AM_CONDITIONAL(WITH_UPDOWN, [test "$ac_with_updown" = "yes"])
#
# Determine which static module libraries do not need to be linked
# against under a static module build
#
AM_CONDITIONAL(WITH_CLUSTERLIST_STATIC_MODULES,
[(test "$ac_with_static_modules" = "yes") &&
(test "$ac_with_genders" = "yes" ||
test "$ac_with_hostsfile" = "yes")])
# Placeholder, please don't dailywtf me :-)
AM_CONDITIONAL(WITH_CONFIG_STATIC_MODULES,
[(test "$ac_with_static_modules" = "yes") &&
(test "1" = "2")])
AM_CONDITIONAL(WITH_EVENT_STATIC_MODULES,
[(test "$ac_with_static_modules" = "yes") &&
(test "$ac_with_updown_event" = "yes")])
AM_CONDITIONAL(WITH_METRIC_STATIC_MODULES,
[(test "$ac_with_static_modules" = "yes") &&
(test "$ac_with_boottime" = "yes" ||
test "$ac_with_loadavg" = "yes" ||
test "$ac_with_memory" = "yes" ||
test "$ac_with_network" = "yes" ||
test "$ac_with_slurm_state" = "yes")])
# Placeholder, please don't dailywtf me :-)
AM_CONDITIONAL(WITH_MONITOR_STATIC_MODULES,
[(test "$ac_with_static_modules" = "yes") &&
(test "1" = "2")])
##
# Checks for typedefs, structures, and compiler characteristics.
##
AC_C_BIGENDIAN
AC_C_CONST
AC_TYPE_UID_T
AC_STRUCT_SA_LEN
AC_IPV6
##
# Checks for library functions.
##
AC_CHECK_FUNCS( \
strcmp \
strlen \
strcpy \
strchr \
strsep \
strspn \
strtok_r \
getopt_long \
gethostbyname \
gethostbyname_r
)
AC_caolan_FUNC_WHICH_GETHOSTBYNAME_R
ACX_PTHREAD([], AC_MSG_ERROR([Posix threads required to build]))
# Don't define WITH_PTHREADS, libcommon will not be built with
# pthreads. Thread locking is the responsibility of binaries
# AC_DEFINE(WITH_PTHREADS, 1, [Define pthreads])
#
# Set LIBS and CFLAGS in Makefile.am, not here
# LIBS="$PTHREAD_LIBS $LIBS"
# CFLAGS="$PTHREAD_CFLAGS $CFLAGS"
AC_DEFINE(WITH_LSD_FATAL_ERROR_FUNC, 1, [Define lsd_fatal_error])
AC_CHECK_SIZEOF([long])
##
# Epilogue.
##
AC_CONFIG_FILES( \
cerebro.spec \
Makefile \
etc/Makefile \
man/Makefile \
man/cerebro-admin.8 \
man/cerebro-stat.8 \
man/cerebrod.8 \
man/cerebro_module.3 \
man/cerebro_module_devel.3 \
man/cerebro.conf.5 \
man/cerebro.7 \
src/Makefile \
src/cerebro-admin/Makefile \
src/cerebro-stat/Makefile \
src/cerebrod/Makefile \
src/libs/Makefile \
src/libs/cerebro/Makefile \
src/libs/cerebro_error/Makefile \
src/libs/common/Makefile \
src/libs/debug/Makefile \
src/libs/include/Makefile \
src/libs/include/cerebro/cerebro_metric_control_protocol.h \
src/libs/modules/Makefile \
src/libs/util/Makefile \
src/libs/wrappers/Makefile \
src/modules/Makefile \
src/modules/clusterlist/Makefile \
src/modules/config/Makefile \
src/modules/event/Makefile \
src/modules/metric/Makefile \
src/modules/monitor/Makefile \
)
AC_OUTPUT