forked from pmattes/x3270
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.in
328 lines (307 loc) · 11.3 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
dnl Copyright (c) 2015-2016, 2018, 2020 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.0)
AC_PREREQ(2.50)
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(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(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)
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
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
fi
dnl Handle missing Windows tools.
if test "$mingw64_found" = "no" -o "$mingw32_found" = "no"
then AC_MSG_WARN(Disabling Windows cross-compile)
enable_windows=no
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
fi
if test "x$enable_windows" = xno; then
enable_wc3270=no
enable_ws3270=no
enable_wb3270=no
enable_wpr3287=no
enable_wx3270if=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_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_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_wc3270=yes
enable_ws3270=yes
enable_wb3270=yes
enable_wpr3287=yes
enable_wx3270if=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_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_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_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_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_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
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 -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
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)
fi
T_ALL=""
T_CLEAN=""
T_CLOBBER=""
T_INSTALL=""
T_INSTALL_MAN=""
T_LIB=""
T_LIB_CLEAN=""
T_LIB_CLOBBER=""
T_UNIX_CLEAN=""
T_UNIX_CLOBBER=""
T_WINDOWS_CLEAN=""
T_WINDOWS_CLOBBER=""
for i in x3270 c3270 s3270 b3270 tcl3270 pr3287 x3270if wc3270 ws3270 wb3270 wc3270 wpr3287 wx3270if; 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
w*) ;;
*) T_INSTALL="$T_INSTALL $i-install"
T_INSTALL_MAN="$T_INSTALL_MAN $i-install.man"
esac
fi
done
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"
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)
T_UNIX_CLEAN="$T_UNIX_CLEAN x3270-clean"
T_UNIX_CLOBBER="$T_UNIX_CLOBBER x3270-clobber"
fi
if test "x$enable_c3270" = xyes; then
AC_CONFIG_SUBDIRS(c3270)
T_UNIX_CLEAN="$T_UNIX_CLEAN c3270-clean"
T_UNIX_CLOBBER="$T_UNIX_CLOBBER c3270-clobber"
fi
if test "x$enable_s3270" = xyes; then
AC_CONFIG_SUBDIRS(s3270)
T_UNIX_CLEAN="$T_UNIX_CLEAN s3270-clean"
T_UNIX_CLOBBER="$T_UNIX_CLOBBER s3270-clobber"
fi
if test "x$enable_b3270" = xyes; then
AC_CONFIG_SUBDIRS(b3270)
T_UNIX_CLEAN="$T_UNIX_CLEAN b3270-clean"
T_UNIX_CLOBBER="$T_UNIX_CLOBBER b3270-clobber"
fi
if test "x$enable_tcl3270" = xyes; then
AC_CONFIG_SUBDIRS(tcl3270)
T_UNIX_CLEAN="$T_UNIX_CLEAN tcl3270-clean"
T_UNIX_CLOBBER="$T_UNIX_CLOBBER tcl3270-clobber"
fi
if test "x$enable_pr3287" = xyes; then
AC_CONFIG_SUBDIRS(pr3287)
T_UNIX_CLEAN="$T_UNIX_CLEAN pr3287-clean"
T_UNIX_CLOBBER="$T_UNIX_CLOBBER pr3287-clobber"
fi
if test "x$enable_x3270if" = xyes; then
AC_CONFIG_SUBDIRS(x3270if)
T_UNIX_CLEAN="$T_UNIX_CLEAN x3270if-clean"
T_UNIX_CLOBBER="$T_UNIX_CLOBBER x3270if-clobber"
fi
if test "x$enable_wc3270" = xyes; then
T_WINDOWS_CLEAN="$T_WINDOWS_CLEAN wc3270-clean"
T_WINDOWS_CLOBBER="$T_WINDOWS_CLOBBER wc3270-clobber"
fi
if test "x$enable_ws3270" = xyes; then
T_WINDOWS_CLEAN="$T_WINDOWS_CLEAN ws3270-clean"
T_WINDOWS_CLOBBER="$T_WINDOWS_CLOBBER ws3270-clobber"
fi
if test "x$enable_wb3270" = xyes; then
T_WINDOWS_CLEAN="$T_WINDOWS_CLEAN wb3270-clean"
T_WINDOWS_CLOBBER="$T_WINDOWS_CLOBBER wb3270-clobber"
fi
if test "x$enable_wpr3287" = xyes; then
T_WINDOWS_CLEAN="$T_WINDOWS_CLEAN wpr3287-clean"
T_WINDOWS_CLOBBER="$T_WINDOWS_CLOBBER wpr3287-clobber"
fi
if test "x$enable_wx3270if" = xyes; then
T_WINDOWS_CLEAN="$T_WINDOWS_CLEAN wwx3270if-clean"
T_WINDOWS_CLOBBER="$T_WINDOWS_CLOBBER wwx3270if-clobber"
fi
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_CLEAN)
AC_SUBST(T_UNIX_CLOBBER)
AC_SUBST(T_WINDOWS_CLEAN)
AC_SUBST(T_WINDOWS_CLOBBER)
dnl Generate to top-level Makefile.
AC_OUTPUT(Makefile)