This repository has been archived by the owner on Aug 13, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure
executable file
·213 lines (180 loc) · 4.5 KB
/
configure
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
#!/bin/sh
prefix='/usr'
bindir='$(prefix)/bin'
datadir='$(prefix)/share'
libdir='$(prefix)/lib'
libexecdir='$(prefix)/libexec'
statedir='/var/spool/cron'
mandir='$(datadir)/man'
docdir='$(datadir)/doc/$(package)'
unitdir='$(libdir)/systemd/system'
generatordir='$(libdir)/systemd/system-generators'
enable_runparts=yes
enable_setgid=no
use_loglevelmax=no
enable_boot=yes
enable_minutely=no
enable_hourly=yes
enable_daily=yes
enable_weekly=yes
enable_monthly=yes
enable_quarterly=no
enable_semi_annually=no
enable_yearly=yes
ARGS=$(getopt -n "$(basename "${0}")" -o '' -l '
prefix:,
bindir:,
confdir:,
datadir:,
libdir:,
libexecdir:,
statedir:,
mandir:,
docdir:,
unitdir:,
generatordir:,
enable-boot::,
enable-minutely::,
enable-hourly::,
enable-daily::,
enable-weekly::,
enable-monthly::,
enable-quarterly::,
enable-semi_annually::,
enable-yearly::,
enable-setgid::,
enable-runparts::,
use-loglevelmax::,
' -- "${@}")
if [ $? -ne 0 ]; then
exit 1
fi
set_enable_flag()
{
if [ -z ${2} ]; then
eval "enable_${1}=yes"
elif [ ${2} = 'yes' ] || [ ${2} = 'no' ]; then
eval "enable_${1}=${2}"
else
echo "ERROR: Unknown value for enable-${1}: '${2}'. Expected 'yes' or 'no'."
fi
}
eval set -- "${ARGS}"
while true;
do
case "${1}" in
'--prefix')
prefix="${2}"
shift 2;;
'--bindir')
bindir="${2}"
shift 2;;
'--confdir')
print "--confdir ${2} is ignored"
shift 2;;
'--datadir')
datadir="${2}"
shift 2;;
'--libdir')
libdir="${2}"
shift 2;;
'--libexecdir')
libexecdir="${2}"
shift 2;;
'--statedir')
statedir="${2}"
shift 2;;
'--mandir')
mandir="${2}"
shift 2;;
'--docdir')
docdir="${2}"
shift 2;;
'--unitdir')
unitdir="${2}"
shift 2;;
'--generatordir')
generatordir="${2}"
shift 2;;
'--enable-boot')
set_enable_flag boot ${2}
shift 2;;
'--enable-minutely')
set_enable_flag minutely ${2}
shift 2;;
'--enable-hourly')
set_enable_flag hourly ${2}
shift 2;;
'--enable-daily')
set_enable_flag daily ${2}
shift 2;;
'--enable-weekly')
set_enable_flag weekly ${2}
shift 2;;
'--enable-monthly')
set_enable_flag monthly ${2}
shift 2;;
'--enable-quarterly')
set_enable_flag quarterly ${2}
shift 2;;
'--enable-semi_annually')
set_enable_flag semi_annually ${2}
shift 2;;
'--enable-yearly')
set_enable_flag yearly ${2}
shift 2;;
'--enable-setgid')
set_enable_flag setgid ${2}
shift 2;;
'--enable-runparts')
set_enable_flag runparts ${2}
shift 2;;
'--use-loglevelmax')
case "${2}" in
'alert'|'crit'|'err'|'warning'|'notice'|'info'|'debug')
use_loglevelmax="${2}";;
*)
echo "ERROR: Unknown value for use-loglevelmax: '${2}'. Expected 'alert', 'crit', 'err', 'warning', 'notice', 'info', or 'debug'.";;
esac
shift 2;;
'--')
shift
break;;
esac
done
check_sched_enabled()
{
if eval [ "\"\${enable_${1}}\"" = \'yes\' ]; then
schedules="${schedules} ${2}"
else
schedules_not="${schedules_not} ${2}"
fi
}
check_sched_enabled boot boot
check_sched_enabled minutely minutely
check_sched_enabled hourly hourly
check_sched_enabled daily daily
check_sched_enabled weekly weekly
check_sched_enabled monthly monthly
check_sched_enabled quarterly quarterly
check_sched_enabled semi_annually semi-annually
check_sched_enabled yearly yearly
sed "
1i\
# Generated by $0
s|@schedules@|${schedules}|g
s|@schedules_not@|${schedules_not}|g
s|@enable_runparts@|${enable_runparts}|g
s|@enable_setgid@|${enable_setgid}|g
s|@prefix@|${prefix}|g
s|@bindir@|${bindir}|g
s|@datadir@|${datadir}|g
s|@libdir@|${libdir}|g
s|@libexecdir@|${libexecdir}|g
s|@statedir@|${statedir}|g
s|@mandir@|${mandir}|g
s|@docdir@|${docdir}|g
s|@unitdir@|${unitdir}|g
s|@generatordir@|${generatordir}|g
s|@use_loglevelmax@|${use_loglevelmax}|g
" Makefile.in > Makefile