forked from svanderburg/dysnomia
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure.ac
334 lines (270 loc) · 11.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
AC_PREREQ(2.61)
AC_INIT([dysnomia], m4_esyscmd([echo -n $(cat ./version)$VERSION_SUFFIX]))
AC_CONFIG_AUX_DIR([config])
AM_INIT_AUTOMAKE([1.9 tar-pax -Wall -Werror -Wno-extra-portability])
# Change libexecdir
libexecdir=\$\{exec_prefix\}/libexec/dysnomia
AC_SUBST(libexecdir)
# Define with options
AC_ARG_WITH([apache], AS_HELP_STRING([--with-apache], [Enable Apache HTTP web application script]))
AC_ARG_WITH([axis2], AS_HELP_STRING([--with-axis2], [Enable Apache Axis2 module. Also requires Tomcat enabled]))
AC_ARG_WITH([ejabberd], AS_HELP_STRING([--without-ejabberd], [Ignore presence of ejabberd and disable it]))
AC_ARG_WITH([iis], AS_HELP_STRING([--without-iis], [Ignore presence of Microsoft Internet Information Services]))
AC_ARG_WITH([mssql], AS_HELP_STRING([--without-mssql], [Ignore presence of Microsoft SQL server and disable it]))
AC_ARG_WITH([mysql], AS_HELP_STRING([--without-mysql], [Ignore presence of MySQL and disable it]))
AC_ARG_WITH([postgresql], AS_HELP_STRING([--without-postgresql], [Ignore presence of PostgreSQL and disable it]))
AC_ARG_WITH([mongodb], AS_HELP_STRING([--without-mongodb], [Ignore presence of MongoDB and disable it]))
AC_ARG_WITH([nginx], AS_HELP_STRING([--without-nginx], [Ignore presence of Nginx and disable it]))
AC_ARG_WITH([influxdb], AS_HELP_STRING([--without-influxdb], [Ignore presence of InfluxDB and disable it]))
AC_ARG_WITH([tomcat], AS_HELP_STRING([--with-tomcat], [Enable Apache Tomcat module and specifies location of the Apache Tomcat base directory]))
AC_ARG_WITH([subversion], AS_HELP_STRING([--with-subversion], [Enable subversion repository module]))
AC_ARG_WITH([job-template], AS_HELP_STRING([--with-job-template], [Specifies which template to use for the legacy wrapper and process modules. Possible options are: 'systemd' (the default), 'init.d' or 'direct']))
AC_ARG_WITH([systemd-rundir], AS_HELP_STRING([--with-systemd-rundir], [Specifies the state directory of systemd. Defaults to: '/etc/systemd-mutable']))
AC_ARG_WITH([systemd-path], AS_HELP_STRING([--with-systemd-path], [Specifies the path of the composed systemd jobs. Defaults to: '/run/current-system/sw/bin']))
AC_ARG_WITH([sysvinit-initd-dir], AS_HELP_STRING([--with-sysvinit-initd-dir], [Specifies the init.d directory in which sysvinit init scripts are stored. Defaults to: '/etc/init.d']))
AC_ARG_WITH([s6-rc], AS_HELP_STRING([--without-s6-rc], [Ignore presence of s6-rc and disable it]))
AC_ARG_WITH([supervisord], AS_HELP_STRING([--without-supervisord], [Ignore presence of supervisord and disable it]))
AC_ARG_WITH([systemd], AS_HELP_STRING([--without-systemd], [Ignore presence of systemd and disable it]))
AC_ARG_WITH([launchd], AS_HELP_STRING([--without-launchd], [Ignore presence of launchd and disable it]))
AC_ARG_WITH([cygrunsrv], AS_HELP_STRING([--without-cygrunsrv], [Ignore presence of cygrunsrv and disable it]))
AC_ARG_WITH([docker], AS_HELP_STRING([--without-docker], [Ignore presence of docker and disable it]))
AC_ARG_WITH([xinetd], AS_HELP_STRING([--without-xinetd], [Ignore presence of xinetd and disable it]))
# Define enable options
AC_ARG_ENABLE([legacy], AS_HELP_STRING([--enable-legacy]. [Enable legacy implemenations of the process and wrapper modules]), [enable_legacy=yes], [enable_legacy=no])
# Define environment variable options
AC_ARG_WITH(CATALINA_HOME, [Location of the Apache Tomcat Catalina servlet container])
# Checks for installed programs
AC_DEFUN([NEED_PROG],
[
AC_PATH_PROG($1, $2)
if test -z "$$1"; then
AC_MSG_ERROR([$2 is required])
fi
])
# Checks for programs
AC_PROG_INSTALL
NEED_PROG(getopt, getopt)
AC_PATH_PROGS(readlink, [greadlink readlink], [na])
if test "$readlink" = na; then
AC_MSG_ERROR([We need a GNU compatible readlink command, i.e. greadlink or readlink needed])
fi
AC_PATH_PROGS(xargs, [gxargs xargs], [na])
if test "$xargs" = na; then
AC_MSG_ERROR([We need a GNU compatible xargs command, i.e. gxargs or xargs needed])
fi
AC_PATH_PROGS(sed, [gsed sed], [na])
if test "$sed" = na; then
AC_MSG_ERROR([We need a GNU compatible gsed command, i.e. gsed or sed needed])
fi
AC_PATH_PROG(nc, nc, false)
AC_PATH_PROG(HELP2MAN, help2man, false)
AS_IF([test "x$with_apache" != "x" && test "x$with_apache" != "xno"],
[have_apache=yes],
[have_apache=no])
AS_IF([test "x$with_axis2" != "x" && test "x$with_axis2" != "xno"],
[have_axis2=yes],
[have_axis2=no])
AS_IF([test "x$with_ejabberd" != "xno"],
[AC_PATH_PROG(ejabberdctl, ejabberdctl)])
AS_IF([test "x$with_iis" != "xno"],
[AC_PATH_PROG(msdeploy, msdeploy)])
AS_IF([test "x$with_mssql" != "xno"],
[AC_PATH_PROG(osql, osql)])
AS_IF([test "x$with_mysql" != "xno"],
[AC_PATH_PROG(mysql, mysql)])
AC_PATH_PROG(mysqldump, mysqldump)
AS_IF([test "x$with_nginx" != "x" && test "x$with_nginx" != "xno"],
[have_nginx=yes],
[have_nginx=no])
AS_IF([test "x$with_postgresql" != "xno"],
[AC_PATH_PROG(createdb, createdb)])
AS_IF([test "x$with_postgresql" != "xno"],
[AC_PATH_PROG(psql, psql)])
AC_PATH_PROG(pg_dump, pg_dump)
AC_PATH_PROG(dropdb, dropdb)
AS_IF([test "x$with_mongo" != "xno"],
[AC_PATH_PROG(mongo, mongo)])
AC_PATH_PROG(mongodump, mongodump)
AC_PATH_PROG(mongorestore, mongorestore)
AS_IF([test "x$with_influxdb" != "xno"],
[AC_PATH_PROG(influx, influx)])
AC_PATH_PROG(influxd, influxd)
AS_IF([test "x$with_subversion" != "xno"],
[AC_PATH_PROG(svnadmin, svnadmin)])
AS_IF([test "x$with_tomcat" != "x" && test "x$with_tomcat" != "xno" || test "x$CATALINA_HOME" != "x"],
[have_tomcat=yes],
[have_tomcat=no])
AS_IF([test "x$with_job_template" = "x"],
[job_template=systemd],
[job_template=$with_job_template])
AS_IF([test "x$with_systemd_rundir" = "x"],
[systemd_rundir=/etc/systemd-mutable],
[systemd_rundir=$with_systemd_rundir])
AS_IF([test "x$with_systemd_path" = "x"],
[systemd_path=/run/current-system/sw/bin],
[systemd_path=$with_systemd_path])
AS_IF([test "x$with_sysvinit_initd_dir" = "x"],
[sysvinit_initd_dir=/etc/init.d],
[sysvinit_initd_dir=$sysvinit_initd_dir])
AS_IF([test "x$with_systemd" != "xno"],
[AC_PATH_PROG(systemctl, systemctl)])
AS_IF([test "x$with_s6_rc" != "xno"],
[AC_PATH_PROG(s6_rc, s6-rc)])
AC_PATH_PROG(s6_rc_init, s6-rc-init)
AC_PATH_PROG(s6_rc_update, s6-rc-update)
AC_PATH_PROG(s6_rc_compile, s6-rc-compile)
AS_IF([test "x$with_supervisord" != "xno"],
[AC_PATH_PROG(supervisorctl, supervisorctl)])
AS_IF([test "x$with_launchd" != "xno"],
[launchctl=/bin/launchctl
AC_SUBST(launchctl)
])
AS_IF([test "x$with_cygrunsrv" != "xno"],
[AC_PATH_PROG(cygrunsrv, cygrunsrv)])
AS_IF([test "x$with_docker" != "xno"],
[AC_PATH_PROG(docker, docker)])
AS_IF([test "x$with_xinetd" != "xno"],
[AC_PATH_PROG(xinetd, xinetd)])
# Check for which host we want to build and provide the corresponding scripts
AC_CANONICAL_HOST
case "${host_os}" in
linux*)
build_linux=yes
;;
*bsd*)
build_bsd=yes
;;
darwin*)
build_darwin=yes
;;
esac
# Substitute some variables
AC_SUBST(job_template)
AC_SUBST(systemd_rundir)
AC_SUBST(systemd_path)
AC_SUBST(sysvinit_initd_dir)
# Set automake conditionals
AM_CONDITIONAL(have_apache, [test x$have_apache != "xno"])
AM_CONDITIONAL(have_axis2, [test x$have_axis2 != "xno"])
AM_CONDITIONAL(have_ejabberd, [test x$ejabberdctl != "x"])
AM_CONDITIONAL(have_iis, [test "x$msdeploy" != "x"])
AM_CONDITIONAL(have_mssql, [test "x$osql" != "x"])
AM_CONDITIONAL(have_mysql, [test x$mysql != "x"])
AM_CONDITIONAL(have_postgresql, [test x$psql != "x"])
AM_CONDITIONAL(have_mongodb, [test x$mongo != "x"])
AM_CONDITIONAL(have_nginx, [test x$have_nginx != "xno"])
AM_CONDITIONAL(have_influxdb, [test x$influx != "x"])
AM_CONDITIONAL(have_tomcat, [test x$have_tomcat != "xno"])
AM_CONDITIONAL(have_subversion, [test x$svnadmin != "x"])
AM_CONDITIONAL(have_systemd, [test x$systemctl != "x"])
AM_CONDITIONAL(have_supervisord, [test x$supervisorctl != "x"])
AM_CONDITIONAL(have_s6_rc, [test x$s6_rc != "x"])
AM_CONDITIONAL(have_launchd, [test x$launchctl != "x"])
AM_CONDITIONAL(have_cygrunsrv, [test x$cygrunsrv != "x"])
AM_CONDITIONAL(have_docker, [test x$docker != "x"])
AM_CONDITIONAL(have_xinetd, [test x$xinetd != "x"])
AM_CONDITIONAL(have_webserver, [test x$have_apache != "xno" -o x$have_nginx != "xno" ])
AM_CONDITIONAL(enable_legacy, [test x$enable_legacy = "xyes"])
AM_CONDITIONAL(LINUX, [test x$build_linux = "xyes"])
AM_CONDITIONAL(BSD, [test x$build_bsd = "xyes"])
AM_CONDITIONAL(DARWIN, [test x$build_darwin = "xyes"])
# CATALINA_BASE setting
AS_IF([test "x$CATALINA_HOME" != "x"],
[AC_SUBST(CATALINA_BASE, $CATALINA_HOME)])
AS_IF([test "x$with_tomcat" != "x"],
[AC_SUBST(CATALINA_BASE, $with_tomcat)])
# Output
AS_IF([test "x$have_axis2" != "xno"],
[axis2_webservice=dysnomia-modules/axis2-webservice])
AS_IF([test "x$msdeploy" != "x"],
[iis_webapplication=dysnomia-modules/iis-webapplication])
AS_IF([test "x$osql" != "x"],
[mssql_database=dysnomia-modules/mssql-database])
AS_IF([test "x$mysql" != "x"],
[mysql_database=dysnomia-modules/mysql-database])
AS_IF([test "x$psql" != "x"],
[postgresql_database=dysnomia-modules/postgresql-database])
AS_IF([test "x$mongo" != "x"],
[mongo_database=dysnomia-modules/mongo-database])
AS_IF([test "x$have_nginx" != "xno"],
[nginx_webapplication=dysnomia-modules/nginx-webapplication])
AS_IF([test "x$influx" != "x"],
[influx_database=dysnomia-modules/influx-database])
AS_IF([test "x$ejabberdctl" != "x"],
[ejabberd_dump=dysnomia-modules/ejabberd-dump])
AS_IF([test "x$have_tomcat" != "xno"],
[tomcat_webapplication=dysnomia-modules/tomcat-webapplication])
AS_IF([test "x$svnadmin" != "x"],
[subversion_repository=dysnomia-modules/subversion-repository])
AS_IF([test "x$systemctl" != "x"],
[systemd_unit=dysnomia-modules/systemd-unit])
AS_IF([test "x$supervisorctl" != "x"],
[supervisord_program=dysnomia-modules/supervisord-program])
AS_IF([test "x$launchctl" != "x"],
[launchd_daemon=dysnomia-modules/launchd-daemon])
AS_IF([test "x$cygrunsrv" != "x"],
[cygrunsrv_service=dysnomia-modules/cygrunsrv-service])
AS_IF([test "x$docker" != "x"],
[docker_container=dysnomia-modules/docker-container])
AS_IF([test "x$xinetd" != "x"],
[xinetd_service=dysnomia-modules/xinetd-service])
AS_IF([test "x$s6_rc" != "x"],
[s6_rc_service=dysnomia-modules/s6-rc-service])
AC_CONFIG_FILES([
Makefile
scripts/dysnomia
scripts/dysnomia-containers
scripts/dysnomia-snapshots
scripts/usermgmt-commons
scripts/Makefile
scripts/darwin/dysnomia-addgroups
scripts/darwin/dysnomia-addusers
scripts/darwin/dysnomia-delgroups
scripts/darwin/dysnomia-delusers
scripts/darwin/Makefile
scripts/default/dysnomia-addgroups
scripts/default/dysnomia-addusers
scripts/default/dysnomia-delgroups
scripts/default/dysnomia-delusers
scripts/default/Makefile
scripts/freebsd/dysnomia-addgroups
scripts/freebsd/dysnomia-addusers
scripts/freebsd/dysnomia-delgroups
scripts/freebsd/dysnomia-delusers
scripts/freebsd/Makefile
dysnomia-modules/apache-webapplication
dysnomia-modules/nixos-configuration
dysnomia-modules/fileset
dysnomia-modules/generic-webapplication
dysnomia-modules/process
dysnomia-modules/wrapper
dysnomia-modules/sysvinit-script
dysnomia-modules/bsdrc-script
dysnomia-modules/managed-process
dysnomia-modules/util
dysnomia-modules/Makefile
dysnomia-modules/legacy/process
dysnomia-modules/legacy/wrapper
dysnomia-modules/legacy/Makefile
data/Makefile
nix/Makefile
$axis2_webservice
$docker_container
$ejabberd_dump
$iis_webapplication
$mssql_database
$mysql_database
$postgresql_database
$mongo_database
$nginx_webapplication
$influx_database
$tomcat_webapplication
$subversion_repository
$systemd_unit
$supervisord_program
$launchd_daemon
$cygrunsrv_service
$s6_rc_service
$xinetd_service
])
AC_OUTPUT