-
Notifications
You must be signed in to change notification settings - Fork 20
/
configure.in
379 lines (355 loc) · 12.5 KB
/
configure.in
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
dnl Copyright (c) 2015-2024 Paul Mattes.
dnl All rights reserved.
dnl
dnl Redistribution and use in source and binary forms, with or without
dnl modification, are permitted provided that the following conditions are met:
dnl * Redistributions of source code must retain the above copyright
dnl notice, this list of conditions and the following disclaimer.
dnl * Redistributions in binary form must reproduce the above copyright
dnl notice, this list of conditions and the following disclaimer in the
dnl documentation and/or other materials provided with the distribution.
dnl * Neither the names of Paul Mattes nor the names of his contributors
dnl may be used to endorse or promote products derived from this software
dnl without specific prior written permission.
dnl
dnl THIS SOFTWARE IS PROVIDED BY PAUL MATTES "AS IS" AND ANY EXPRESS OR IMPLIED
dnl WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
dnl MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
dnl EVENT SHALL PAUL MATTES BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
dnl SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
dnl TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
dnl PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
dnl LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
dnl NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
dnl SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
dnl Process this file with autoconf to produce a configure script.
AC_INIT([suite3270],[4.3])
AC_PREREQ([2.69])
AC_CANONICAL_HOST
AC_ARG_ENABLE(unix,[ --enable-unix build all Unix emulators])
AC_ARG_ENABLE(windows,[ --enable-windows build all Windows emulators])
AC_ARG_ENABLE(x3270,[ --enable-x3270 build x3270])
AC_ARG_ENABLE(c3270,[ --enable-c3270 build c3270])
AC_ARG_ENABLE(s3270,[ --enable-s3270 build s3270])
AC_ARG_ENABLE(b3270,[ --enable-b3270 build b3270])
AC_ARG_ENABLE(tcl3270,[ --enable-tcl3270 build tcl3270])
AC_ARG_ENABLE(pr3287,[ --enable-pr3287 build pr3287])
AC_ARG_ENABLE(x3270if,[ --enable-x3270if build x3270if])
AC_ARG_ENABLE(playback,[ --enable-playback build playback])
AC_ARG_ENABLE(unix-lib,[ --enable-lib build Unix libraries])
AC_ARG_ENABLE(wc3270,[ --enable-wc3270 build wc3270])
AC_ARG_ENABLE(ws3270,[ --enable-ws3270 build Windows s3270])
AC_ARG_ENABLE(wb3270,[ --enable-wb3270 build Windows b3270])
AC_ARG_ENABLE(wpr3287,[ --enable-wpr3287 build Windows pr3287])
AC_ARG_ENABLE(wx3270if,[ --enable-wx3270if build Windows x3270if])
AC_ARG_ENABLE(wplayback,[ --enable-wplayback build Windows playback])
AC_ARG_ENABLE(windows-lib,[ --enable-windows-lib build Windows libraries])
AC_CHECK_PROG(mingw64_found,x86_64-w64-mingw32-gcc,yes,no)
AC_CHECK_PROG(mingw32_found,i686-w64-mingw32-gcc,yes,no)
AC_CHECK_PROG(windres_found,windres,yes,no)
dnl You can use Msys to build Windows binaries, but not Unix-like ones.
case "$host_os" in
*msys|*mingw*) enable_unix=no
esac
dnl Handle expansion of enable-unix.
if test "x$enable_unix" = xyes; then
if test "x$enable_x3270" != xno; then enable_x3270=yes; fi
if test "x$enable_c3270" != xno; then enable_c3270=yes; fi
if test "x$enable_s3270" != xno; then enable_s3270=yes; fi
if test "x$enable_b3270" != xno; then enable_b3270=yes; fi
if test "x$enable_tcl3270" != xno; then enable_tcl3270=yes; fi
if test "x$enable_pr3287" != xno; then enable_pr3287=yes; fi
if test "x$enable_x3270if" != xno; then enable_x3270if=yes; fi
if test "x$enable_playback" != xno; then enable_playback=yes; fi
fi
if test "x$enable_unix" = xno; then
enable_x3270=no
enable_c3270=no
enable_s3270=no
enable_b3270=no
enable_tcl3270=no
enable_pr3287=no
enable_x3270if=no
enable_playback=no
fi
dnl Handle missing Windows tools.
WIN32_SUFFIX=-32
WIN64_SUFFIX=-64
if test "$mingw64_found" = "no" -a "$mingw32_found" = "no"
then AC_MSG_WARN(Disabling Windows cross-compile)
enable_windows=no
else if test "$mingw64_found" = "no"
then WIN64_SUFFIX=-32
fi
if test "$mingw32_found" = "no"
then WIN32_SUFFIX=-64
fi
if test "$windres_found" = "yes"
then WINDRES_SET="WINDRES=windres"
fi
fi
dnl Handle expansion of enable-windows.
if test "x$enable_windows" = xyes; then
if test "x$enable_wc3270" != xno; then enable_wc3270=yes; fi
if test "x$enable_ws3270" != xno; then enable_ws3270=yes; fi
if test "x$enable_wb3270" != xno; then enable_wb3270=yes; fi
if test "x$enable_wpr3287" != xno; then enable_wpr3287=yes; fi
if test "x$enable_wx3270if" != xno; then enable_wx3270if=yes; fi
if test "x$enable_wplayback" != xno; then enable_wplayback=yes; fi
fi
if test "x$enable_windows" = xno; then
enable_wc3270=no
enable_ws3270=no
enable_wb3270=no
enable_wpr3287=no
enable_wx3270if=no
enable_wplayback=no
enable_windows_lib=no
fi
dnl Handle all-default case.
if test "x$enable_x3270" = x -a \
"x$enable_c3270" = x -a \
"x$enable_s3270" = x -a \
"x$enable_b3270" = x -a \
"x$enable_tcl3270" = x -a \
"x$enable_pr3287" = x -a \
"x$enable_x3270if" = x -a \
"x$enable_playback" = x -a \
"x$enable_unix_lib" = x -a \
"x$enable_wc3270" = x -a \
"x$enable_ws3270" = x -a \
"x$enable_wb3270" = x -a \
"x$enable_wpr3287" = x -a \
"x$enable_wx3270if" = x -a \
"x$enable_wplayback" = x -a \
"x$enable_windows_lib" = x; then
AC_MSG_NOTICE(configuring all emulators... use --enable or --disable options to pick a subset)
enable_x3270=yes
enable_c3270=yes
enable_s3270=yes
enable_b3270=yes
enable_tcl3270=yes
enable_pr3287=yes
enable_x3270if=yes
enable_playback=yes
enable_wc3270=yes
enable_ws3270=yes
enable_wb3270=yes
enable_wpr3287=yes
enable_wx3270if=yes
enable_wplayback=yes
fi
dnl Handle the just-disable case.
lparen="("
rparen=")"
if test "x$enable_x3270" != xyes -a \
"x$enable_c3270" != xyes -a \
"x$enable_s3270" != xyes -a \
"x$enable_b3270" != xyes -a \
"x$enable_tcl3270" != xyes -a \
"x$enable_pr3287" != xyes -a \
"x$enable_x3270if" != xyes -a \
"x$enable_playback" != xyes -a \
"x$enable_unix_lib" != xyes -a \
"x$enable_wc3270" != xyes -a \
"x$enable_ws3270" != xyes -a \
"x$enable_wb3270" != xyes -a \
"x$enable_wpr3287" != xyes -a \
"x$enable_wx3270if" != xyes -a \
"x$enable_wplayback" != xyes -a \
"x$enable_windows_lib" != xyes -a \
$lparen "x$enable_x3270" = xno -o \
"x$enable_c3270" = xno -o \
"x$enable_s3270" = xno -o \
"x$enable_b3270" = xno -o \
"x$enable_tcl3270" = xno -o \
"x$enable_pr3287" = xno -o \
"x$enable_x3270if" = xno -o \
"x$enable_playback" = xno -o \
"x$enable_unix_lib" = xno -o \
"x$enable_wc3270" = xno -o \
"x$enable_ws3270" = xno -o \
"x$enable_wb3270" = xno -o \
"x$enable_wpr3287" = xno -o \
"x$enable_wx3270if" = xno -o \
"x$enable_wplayback" = xno -o \
"x$enable_windows_lib" = xno $rparen; then
dnl Enable everything that wasn't explicitly disabled.
if test "x$enable_x3270" != xno; then enable_x3270=yes; fi
if test "x$enable_c3270" != xno; then enable_c3270=yes; fi
if test "x$enable_s3270" != xno; then enable_s3270=yes; fi
if test "x$enable_b3270" != xno; then enable_b3270=yes; fi
if test "x$enable_tcl3270" != xno; then enable_tcl3270=yes; fi
if test "x$enable_pr3287" != xno; then enable_pr3287=yes; fi
if test "x$enable_x3270if" != xno; then enable_x3270if=yes; fi
if test "x$enable_playback" != xno; then enable_playback=yes; fi
if test "x$enable_wc3270" != xno; then enable_wc3270=yes; fi
if test "x$enable_ws3270" != xno; then enable_ws3270=yes; fi
if test "x$enable_wb3270" != xno; then enable_wb3270=yes; fi
if test "x$enable_wpr3287" != xno; then enable_wpr3287=yes; fi
if test "x$enable_wx3270if" != xno; then enable_wx3270if=yes; fi
if test "x$enable_wplayback" != xno; then enable_wplayback=yes; fi
fi
dnl Handle dependencies.
if test "x$enable_tcl3270" = xyes; then
enable_s3270=yes
fi
if test "x$enable_x3270" = xyes -o \
"x$enable_c3270" = xyes -o \
"x$enable_s3270" = xyes -o \
"x$enable_b3270" = xyes -o \
"x$enable_tcl3270" = xyes; then
enable_x3270if=yes
fi
if test "x$enable_wc3270" = xyes -o \
"x$enable_ws3270" = xyes -o \
"x$enable_wb3270" = xyes; then
enable_wx3270if=yes
fi
if test "x$enable_x3270" = xyes -o \
"x$enable_c3270" = xyes; then
enable_pr3287=yes
fi
if test "x$enable_wc3270" = xyes; then
enable_wpr3287=yes
fi
if test "x$enable_x3270" = xyes -o \
"x$enable_c3270" = xyes -o \
"x$enable_s3270" = xyes -o \
"x$enable_b3270" = xyes -o \
"x$enable_pr3287" = xyes; then
enable_unix_lib=yes
fi
if test "x$enable_wc3270" = xyes -o \
"x$enable_ws3270" = xyes -o \
"x$enable_wb3270" = xyes -o \
"x$enable_wpr3287" = xyes; then
enable_windows_lib=yes
fi
unset do_ibm_hosts
if test "x$enable_x3270" = xyes -o "x$enable_c3270" = xyes; then do_ibm_hosts=yes; fi
dnl Start recursing.
if test "x$enable_unix_lib" = xyes; then
AC_CONFIG_SUBDIRS(lib)
fi
if test "x$enable_windows_lib" = xyes; then
AC_CONFIG_SUBDIRS(lib/w32xx)
AC_CONFIG_SUBDIRS(lib/w3270)
fi
if test "x$do_ibm_hosts" = xyes; then
AC_CONFIG_SUBDIRS(ibm_hosts)
fi
T_ALL=""
T_CLEAN=""
T_CLOBBER=""
T_INSTALL=""
T_INSTALL_MAN=""
T_LIB=""
T_LIB_CLEAN=""
T_LIB_CLOBBER=""
T_UNIX_ALL=""
T_UNIX_CLEAN=""
T_UNIX_CLOBBER=""
T_WINDOWS_ALL=""
T_WINDOWS_CLEAN=""
T_WINDOWS_CLOBBER=""
T_TEST=""
T_ALLTESTS=""
T_TEST_CLEAN=""
T_TEST_CLOBBER=""
for i in x3270 c3270 s3270 b3270 tcl3270 pr3287 x3270if playback wc3270 ws3270 wb3270 wc3270 wpr3287 wx3270if wplayback; do
eval x=\$enable_$i
if test "x$x" = xyes; then
T_ALL="$T_ALL $i"
T_CLEAN="$T_CLEAN $i-clean"
T_CLOBBER="$T_CLOBBER $i-clobber"
case "$i" in
playback)
T_UNIX_ALL="$T_UNIX_ALL $i"
;;
w*) T_WINDOWS_ALL="$T_WINDOWS_ALL $i"
T_WINDOWS_CLEAN="$T_WINDOWS $i-clean"
T_WINDOWS_CLOBBER="$T_WINDOWS_CLOBBER $i-clobber"
;;
*) T_UNIX_ALL="$T_UNIX_ALL $i"
T_INSTALL="$T_INSTALL $i-install"
T_INSTALL_MAN="$T_INSTALL_MAN $i-install.man"
T_TEST="$T_TEST $i"
T_UNIX_CLEAN="$T_UNIX_CLEAN $i-clean"
T_UNIX_CLOBBER="$T_UNIX_CLOBBER $i-clobber"
esac
fi
done
T_ALLTESTS=$T_TEST
if test "x$enable_unix_lib" = xyes; then
T_CLEAN="$T_CLEAN unix-lib-clean"
T_CLOBBER="$T_CLOBBER unix-lib-clobber"
T_LIB="$T_LIB unix-lib"
T_LIB_CLEAN="$T_LIB_CLEAN unix-lib-clean"
T_LIB_CLOBBER="$T_LIB_CLOBBER unix-lib-clobber"
T_UNIX_CLEAN="$T_UNIX_CLEAN unix-lib-clean"
T_UNIX_CLOBBER="$T_UNIX_CLOBBER unix-lib-clobber"
T_ALLTESTS="$T_ALLTESTS unix-lib-test"
fi
if test "x$enable_windows_lib" = xyes; then
T_CLEAN="$T_CLEAN windows-lib-clean"
T_CLOBBER="$T_CLOBBER windows-lib-clobber"
T_LIB="$T_LIB windows-lib"
T_LIB_CLEAN="$T_LIB_CLEAN windows-lib-clean"
T_LIB_CLOBBER="$T_LIB_CLOBBER windows-lib-clobber"
T_WINDOWS_CLEAN="$T_WINDOWS_CLEAN windows-lib-clean"
T_WINDOWS_CLOBBER="$T_WINDOWS_CLOBBER windows-lib-clobber"
fi
if test "x$enable_x3270" = xyes; then AC_CONFIG_SUBDIRS(x3270)
fi
if test "x$enable_c3270" = xyes; then AC_CONFIG_SUBDIRS(c3270)
fi
if test "x$enable_s3270" = xyes; then AC_CONFIG_SUBDIRS(s3270)
fi
if test "x$enable_b3270" = xyes; then AC_CONFIG_SUBDIRS(b3270)
fi
if test "x$enable_tcl3270" = xyes; then AC_CONFIG_SUBDIRS(tcl3270)
fi
if test "x$enable_pr3287" = xyes; then AC_CONFIG_SUBDIRS(pr3287)
fi
if test "x$enable_x3270if" = xyes; then AC_CONFIG_SUBDIRS(x3270if)
fi
if test "x$enable_playback" = xyes; then AC_CONFIG_SUBDIRS(playback)
fi
if test "x$enable_ws3270" = xyes; then AC_CONFIG_SUBDIRS(ws3270)
fi
if test "x$enable_wc3270" = xyes; then AC_CONFIG_SUBDIRS(wc3270)
fi
if test "x$enable_wb3270" = xyes; then AC_CONFIG_SUBDIRS(wb3270)
fi
AC_CONFIG_SUBDIRS(mitm)
AC_CONFIG_SUBDIRS(mkfb)
AC_CONFIG_SUBDIRS(mkkeypad)
AC_CONFIG_SUBDIRS(mkicon)
AC_SUBST(host)
AC_SUBST(T_ALL)
AC_SUBST(T_CLEAN)
AC_SUBST(T_CLOBBER)
AC_SUBST(T_INSTALL)
AC_SUBST(T_INSTALL_MAN)
AC_SUBST(T_LIB)
AC_SUBST(T_LIB_CLEAN)
AC_SUBST(T_LIB_CLOBBER)
AC_SUBST(T_UNIX_ALL)
AC_SUBST(T_UNIX_CLEAN)
AC_SUBST(T_UNIX_CLOBBER)
AC_SUBST(T_WINDOWS_ALL)
AC_SUBST(T_WINDOWS_CLEAN)
AC_SUBST(T_WINDOWS_CLOBBER)
AC_SUBST(T_TEST)
AC_SUBST(T_ALLTESTS)
AC_SUBST(T_TEST_CLEAN)
AC_SUBST(T_TEST_CLOBBER)
AC_SUBST(WIN32_SUFFIX)
AC_SUBST(WIN64_SUFFIX)
AC_SUBST(WINDRES_SET)
dnl Generate to top-level Makefile.
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
dnl Gather warnings.
find . -type f -name config.log | xargs ls -t | xargs grep WARNING; true