forked from dosemu2/dosemu2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
570 lines (509 loc) · 17.6 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
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
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
dnl Process this file with autoconf to produce a configure script.
AC_INIT([dosemu2],m4_esyscmd(./getversion -s | tr -d '\n'),[https://github.com/dosemu2/dosemu2/issues],[dosemu2])
dnl AM_SILENT_RULES and AM_DEP_TRACK should not be used explicitly,
dnl AM_INIT_AUTOMAKE includes them
AM_SILENT_RULES
AM_DEP_TRACK
AM_MAINTAINER_MODE
AC_CONFIG_SRCDIR([src/include/emu.h])
AC_PREREQ([2.64])
AC_CONFIG_HEADERS([src/include/config.hh])
dnl Checks for programs.
: ${CFLAGS=""}
AC_PROG_CC
#AC_PROG_CC_C11([AC_DEFINE(HAVE_STD_C11)])
AC_DEFINE(HAVE_STD_C11)
AC_PROG_CPP
AC_USE_SYSTEM_EXTENSIONS
AC_PATH_PROGS([AS], [i386-elf-as as])
if test -z "$AS"; then
AC_MSG_ERROR(as not found)
fi
AC_PATH_PROGS([AS_LD], [i386-elf-ld ld])
if test -z "$AS_LD"; then
AC_MSG_ERROR(ld not found)
fi
AC_PATH_PROGS([OBJCOPY], [i386-elf-objcopy objcopy])
if test -z "$OBJCOPY"; then
AC_MSG_ERROR(objcopy not found)
fi
AC_SUBST(AS)
AC_SUBST(AS_LD)
AC_SUBST(OBJCOPY)
AC_ARG_WITH(target-bits-32, [AS_HELP_STRING([--with-target-bits-32],
[build for 32bit target (multilib in case of x86_64 host)])],
CPPFLAGS="$CPPFLAGS -m32"
LDFLAGS="$LDFLAGS -m32"
ASFLAGS="--32"
with_target_bits="32"
)
AC_PROG_INSTALL
AC_PROG_LEX([noyywrap])
if test -z "`echo $LEX | grep flex`" ; then
AC_CHECK_PROG(lex_ok, $LEX, "yes", "no")
fi
if test "$lex_ok" = "no"; then
AC_MSG_WARN(Your system doesn't seem to have lex or flex available.)
AC_MSG_ERROR(Install lex or flex and retry.)
fi
AC_PROG_LN_S
AC_CHECK_PROG([MAKE], [make], ["yes"])
if test "$MAKE" != "yes"; then
AC_MSG_ERROR(You don't have make installed)
fi
AC_CHECK_PROG([REALPATH], [realpath], ["yes"])
if test "$REALPATH" != "yes"; then
AC_MSG_ERROR(You don't have realpath installed)
fi
AC_PROG_RANLIB
AC_PROG_YACC
dnl The bison problem
if test -z "`echo $YACC | grep bison`" ; then
AC_MSG_WARN( )
AC_MSG_WARN(Your system doesn't seem to have bison available.)
AC_MSG_ERROR(Install bison and retry.)
fi
AC_PROG_GREP
AC_PROG_EGREP
AC_PROG_SED
AC_PROG_AWK
if test "$ac_cv_prog_AWK" != "gawk" ; then
AC_MSG_ERROR(Install gawk and retry.)
fi
AC_CHECK_PROG(PKG_CONFIG, pkg-config, yes)
if test -z "$PKG_CONFIG"; then
AC_MSG_ERROR(Install pkg-config and retry.)
fi
dnl Checks for libraries.
dnl Checks for header files.
dnl need largefile check here, dont remove, it defines magic macros
AC_SYS_LARGEFILE
dnl Checks for library functions.
AC_MSG_CHECKING([for static_assert support])
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <assert.h>]], [[
static_assert(sizeof(char) == 1, "sizeof doesn't work");
]])], [
AC_MSG_RESULT([yes])
AC_DEFINE(HAVE_STATIC_ASSERT)
], [
AC_MSG_RESULT([no])
])
AC_CHECK_LIB(rt, shm_open)
dnl below defines HAVE_xxx so needed even if AC_CHECK_LIB() succeeded
AC_CHECK_FUNCS([shm_open memfd_create renameat2])
AC_CHECK_DECLS([F_OFD_SETLK],, [
AC_MSG_ERROR([F_OFD_SETLK not available, your glibc is too old])
], [[#include <fcntl.h>]]
)
PKG_CHECK_MODULES([LIBBSD], [libbsd], [
dnl re-check for proper arch (multilib)
AC_CHECK_LIB(bsd, strlcpy,, [AC_MSG_ERROR(libbsd not found)])
], [
dnl extra check because on bsd these functions are available w/o lib
AC_CHECK_FUNC(strlcpy,, [AC_MSG_ERROR(libbsd not found)])
]
)
dnl Here is where we do our stuff
AC_ARG_WITH(confdir, [AS_HELP_STRING([--with-confdir=dir],
[directory suffix under sysconfdir. default: dosemu])],
confdir="$withval", confdir="dosemu")
AC_ARG_WITH(plugindir, [AS_HELP_STRING([--with-plugindir=dir],
[directory for dosemu plugins. default: ${libdir}/dosemu])],
plugindir="$withval", plugindir="${libdir}/dosemu")
AC_ARG_WITH(x11fontdir, [AS_HELP_STRING([--with-x11fontdir=dir],
[directory to install the VGA X11 font. default: ${datadir}/dosemu/Xfonts])],
x11fontdir="$withval", x11fontdir="${datadir}/dosemu/Xfonts")
AC_ARG_WITH(ttffontdir, [AS_HELP_STRING([--with-ttffontdir=dir],
[directory to install the ttf font. default: ${datadir}/fonts/oldschool])],
ttffontdir="$withval", ttffontdir="${datadir}/fonts/oldschool")
AC_ARG_WITH(fdtarball, [AS_HELP_STRING([--with-fdtarball=file],
[path to FreeDOS tarball])],
fdtarball="$withval")
AC_SUBST(confdir)
AC_SUBST(plugindir)
AC_SUBST(x11fontdir)
AC_SUBST(ttffontdir)
AC_SUBST(syshdimagedir)
AC_SUBST(fdtarball)
AC_DEFINE_DIR([SYSCONFDIR], [sysconfdir], [ System config dir ])
AC_DEFINE_DIR([CONFSUBDIR], [confdir], [ dosemu-specific config subdir ])
AC_DEFINE_DIR([DOSEMUPLUGINDIR], [plugindir], [ Directory for dosemu plugins ])
AC_DEFINE_DIR([DATADIR], [datadir], [ Where data are placed to ])
AC_DEFINE_DIR([LIBEXECDIR], [libexecdir], [ Where extra executables are placed to ])
AC_DEFINE_DIR([SYSTEM_XFONTS_PATH], [x11fontdir], [ Directory for x11 fonts ])
CONFIG_HOST='linux'
AC_SUBST(CONFIG_HOST)
machine=`"$CC" -dumpmachine | cut -d- -f1`
DOSEMU_CPPFLAGS="-imacros config.hh"
DOSEMU_CFLAGS="-Wall -Wstrict-prototypes -Wmissing-declarations \
-Wnested-externs -fms-extensions -pthread \
-Wno-unused-result -Wcast-qual -Wwrite-strings"
AX_CHECK_COMPILE_FLAG([-Waddress-of-packed-member],
[DOSEMU_CFLAGS="$DOSEMU_CFLAGS -Wno-address-of-packed-member"],, [-Werror])
AX_CHECK_COMPILE_FLAG([-Wstring-plus-int],
[DOSEMU_CFLAGS="$DOSEMU_CFLAGS -Wno-string-plus-int"],, [-Werror])
DOSEMU_LDFLAGS="-pthread"
AC_CHECK_LIB(m, pow)
AC_ARG_ENABLE(dlplugins,
AS_HELP_STRING([--disable-dlplugins], [do NOT use dynamically loaded plugins]))
if test "$enable_dlplugins" != "no"; then
AC_MSG_NOTICE(Using dynamically loaded plugins...)
AC_DEFINE(USE_DL_PLUGINS)
USE_DL_PLUGINS="USE_DL_PLUGINS=1"
AC_SUBST(USE_DL_PLUGINS)
DOSBIN_LDFLAGS="-rdynamic"
AC_SUBST(DOSBIN_LDFLAGS)
AC_CHECK_LIB(dl, dlopen)
else
AC_MSG_NOTICE(Not using dynamically loaded plugins...)
fi
SIG_PROTO_PFX="__attribute__((no_instrument_function))"
dnl check for stack protector disabling functionaity
AC_MSG_CHECKING([for __attribute__((optimize("no-stack-protector")))])
AX_SAVE_FLAGS([attr_check])
CFLAGS="-Wall -Werror -fstack-protector-all"
AC_COMPILE_IFELSE([AC_LANG_SOURCE([
void foo(void);
__attribute__((optimize("no-stack-protector")))
void foo(void)
{
}
])],
[
AC_MSG_RESULT([supported])
SIG_PROTO_PFX="$SIG_PROTO_PFX __attribute__((optimize(\"no-stack-protector\")))"
],
[
AC_MSG_RESULT([unsupported])
DOSEMU_CFLAGS="$DOSEMU_CFLAGS -fno-stack-protector"
])
AX_RESTORE_FLAGS([attr_check])
AC_DEFINE_UNQUOTED(SIG_PROTO_PFX, $SIG_PROTO_PFX)
dnl Check whether we have pthreads and whether to use it
AC_CHECK_LIB(pthread, pthread_create,,[
AC_MSG_ERROR([No libpthread found, please install glibc-devel package])
]
)
AC_CHECK_FUNCS([pthread_getname_np pthread_setname_np])
AC_CHECK_HEADERS([sys/kd.h scsi/sg.h linux/cdrom.h])
AC_CHECK_HEADERS([netipx/ipx.h linux/ipx.h netpacket/packet.h])
CONFIG_TIME=`date +"%F %T %z"`
AC_DEFINE_UNQUOTED(CONFIG_HOST, "$CONFIG_HOST")
AC_DEFINE_UNQUOTED(CONFIG_TIME, "$CONFIG_TIME")
dnl enable EXPERIMENTAL stuff
AC_ARG_ENABLE(experimental,
AS_HELP_STRING([--enable-experimental], [enable configuration of EXPERIMENTAL stuff]))
if test "$enable_experimental" = "yes"; then
AC_MSG_NOTICE(Allowing EXPERIMENTAL stuff to be configured...);
AC_DEFINE([EXPERIMENTAL], 1, [ Define this to enable experimental stuff ])
else
AC_MSG_NOTICE(EXPERIMENTAL stuff disabled...);
fi
dnl try to hook in available plug-ins
AC_ARG_ENABLE(plugins,
AS_HELP_STRING([--enable-plugins=list],
[comma-separated list of plugins, use + to append]))
def_plugins=`cat $srcdir/plugin_list | sed 's/$/,/g' | tr -d '\n' | sed 's/,$//'`
if test -z "$enable_plugins"; then
enable_plugins="$def_plugins"
fi
if test "${enable_plugins#\+}" != "$enable_plugins"; then
enable_plugins="$def_plugins,${enable_plugins#\+}"
fi
if test "$enable_plugins" = "no"; then
enable_plugins=""
fi
AC_ARG_WITH(plugin-options,
[AS_HELP_STRING([--with-plugin-options=PLUGIN,OPTS],
[Pass options OPTS to plugin PLUGIN])],
[
plu=`echo $withval |cut -d "," -f 1`
val=`echo $withval |cut -d "," -f 2`
export ${plu}_OPTS="$val"
]
)
if ! test -f Makefile.conf.in; then
AC_MSG_NOTICE([Populating makefiles...])
wd=`pwd`
abssrcdir=`cd $srcdir && pwd`
if test "${wd#$abssrcdir}" != "$wd" ; then
builddir=".${wd#$abssrcdir}"
else
builddir="$wd"
fi
mkdir -p `(cd $abssrcdir; find doc man etc src test -type d -print)`
for i in `(cd $abssrcdir; find . -path $builddir -prune -o -name Makefile -print -o -name *.mak -print)`; do
echo $LN_S -f $abssrcdir/${i#./} $i
$LN_S -f $abssrcdir/${i#./} $i
done
for i in `(cd $abssrcdir; find man -name '*.1')`; do
cp $abssrcdir/$i $i
done
fi
AC_MSG_NOTICE([Creating plug-in hooks...])
PLUGINSUBDIRS=
ST_PLUGINSUBDIRS=
$srcdir/scripts/mkpluginhooks clean
for i in $(echo $enable_plugins | tr ',' ' '); do
if test -z "$i"; then continue; fi
if $srcdir/scripts/plugctl.sh $i yes --disable-option-checking $ac_configure_args; then
PLUGINSUBDIRS="$PLUGINSUBDIRS plugin/$i"
if ! $EGREP 'USE_DL_PLUGINS|NO_LIB' $srcdir/src/plugin/$i/Makefile >/dev/null ; then
ST_PLUGINSUBDIRS="$ST_PLUGINSUBDIRS plugin/$i"
fi
fi
done
PLUGINS=`echo $PLUGINSUBDIRS | $SED 's/plugin\//\n\t/g'`
FDPP_PLU=`echo $PLUGINS | $EGREP 'fdpp'`
AC_ARG_ENABLE(fdpp,
[AS_HELP_STRING([--disable-fdpp], [compile without fdpp support])],,
enable_fdpp="yes"
)
AC_ARG_ENABLE(system_wa,
AS_HELP_STRING([--disable-system-wa], [compile without system-specific
work-arounds (mostly for linux kernel) that are not needed on this system]))
AS_IF([test "x$enable_system_wa" = "xno"], [
AC_MSG_NOTICE(Disasbling system-specific work-arounds)
AC_DEFINE(DISABLE_SYSTEM_WA)
AS_IF([test -z "$WARN_OUTDATED_WA" -a -z "$NOWARN_UNDISABLED_WA"], [
AC_DEFINE(WARN_UNDISABLED_WA)])
])
AS_IF([test -n "$WARN_OUTDATED_WA"], [
AC_MSG_NOTICE(Enabling compile-time warnings for outdated work-arounds)
AC_DEFINE(WARN_OUTDATED_WA)
])
dnl Do compilation for GDB
HAVE_LIBBFD=0
AC_ARG_ENABLE(debug,
AS_HELP_STRING([--enable-debug], [compile with debug info]))
if test "$enable_debug" = "yes"; then
AC_MSG_NOTICE(Compiling with debug info...)
AC_ARG_ENABLE(xbacktrace, AS_HELP_STRING([--enable-xbacktrace],
[enable extended backtrace functionality]))
if test "$enable_xbacktrace" = "yes"; then
AC_CHECK_HEADER(bfd.h, [
AC_CHECK_LIB(z, inflate)
dnl check iberty before bfd - order matters
AC_CHECK_LIB(iberty, lrealpath)
AC_CHECK_LIB(bfd, bfd_init)
if test "$ac_cv_lib_bfd_bfd_init" = "yes"; then
HAVE_LIBBFD=1
AC_DEFINE(HAVE_LIBBFD)
AC_DEFINE(HAVE_BACKTRACE)
fi
])
if test "$HAVE_LIBBFD" = "1"; then
AC_MSG_NOTICE(Enabling extended backtrace functionality)
else
AC_MSG_WARN(libbfd not available, no extended backtrace functionality)
fi
fi
AC_CHECK_HEADER([execinfo.h], [
AC_DEFINE(HAVE_EXECINFO)
if test "$HAVE_LIBBFD" != "1"; then
DOSEMU_LDFLAGS="$DOSEMU_LDFLAGS -rdynamic"
fi
AC_DEFINE(HAVE_BACKTRACE)
])
else
AC_MSG_NOTICE(Compiling without debug info...)
fi
AC_ARG_ENABLE(profile,
AS_HELP_STRING([--enable-profile], [compile with profile info]))
AC_ARG_ENABLE(asan, [AS_HELP_STRING(--enable-asan, [enable address sanitizer])])
AC_ARG_ENABLE(ubsan, [AS_HELP_STRING(--enable-ubsan, [enable UB sanitizer])])
AC_SUBST(OPTIONALSUBDIRS)
AC_SUBST(REQUIRED)
AC_SUBST(PLUGINSUBDIRS)
AC_SUBST(ST_PLUGINSUBDIRS)
RELEASE_DATE=`cd $srcdir && ./getversion -d`
AC_SUBST(RELEASE_DATE)
dnl CPU emulator
AC_ARG_ENABLE(cpuemu, [AS_HELP_STRING([--disable-cpuemu],
[do NOT compile with optional x86 emulation code])])
if test "$enable_cpuemu" != "no"; then
AC_MSG_CHECKING([for __attribute__((force_align_arg_pointer))])
AX_SAVE_FLAGS([attr_check2])
CFLAGS="-Wall -Werror"
AC_COMPILE_IFELSE([AC_LANG_SOURCE([
void foo(void);
__attribute__((force_align_arg_pointer))
void foo(void)
{
}
])],
[
AC_MSG_RESULT([supported])
AC_MSG_NOTICE(Compiling with x86 emulator)
AC_DEFINE_UNQUOTED(X86_EMULATOR)
X86_EMULATOR="X86_EMULATOR=1"
AC_SUBST(X86_EMULATOR)
],
[
AC_MSG_RESULT([unsupported])
AC_MSG_WARN(Compiling without x86 emulator)
]
)
AX_RESTORE_FLAGS([attr_check2])
fi
AC_ARG_WITH(target_cpu, [AS_HELP_STRING([--with-target-cpu=CPU],
[use the specified target CPU. default=auto])])
if test "$with_target_cpu" = ""; then
AC_MSG_NOTICE(Compiling with default target CPU...)
target_cpu=""
else
AC_MSG_NOTICE(Compiling with specified target CPU...)
target_cpu=$with_target_cpu
fi
AC_MSG_CHECKING([for $CC actually being clang])
if "$CC" -v 2>&1|grep 'clang' >/dev/null; then
AC_MSG_RESULT([yes])
AC_MSG_CHECKING([for clang >= 3.7])
clang_ver=`$CC -v 2>&1 | grep version | sed 's/.*version //' | cut -d " " -f 1`
clang_maj=`echo $clang_ver | cut -d "." -f 1`
clang_mid=`echo $clang_ver | cut -d "." -f 2`
if test $clang_maj -ge 3 -a $clang_mid -ge 7 -o $clang_maj -ge 4 ; then
AC_MSG_RESULT([yes, $clang_ver])
else
AC_MSG_RESULT([no, $clang_ver])
AC_MSG_ERROR([Need clang-3.7 or newer, or use gcc instead])
fi
DOSEMU_CFLAGS="$DOSEMU_CFLAGS -Wno-microsoft -Wno-incompatible-pointer-types \
-Wno-address-of-packed-member"
LDFLAGS="$LDFLAGS -Wno-unused-command-line-argument"
use_clang="yes"
else
CCAS="$CC"
AC_MSG_RESULT([no])
use_clang="no"
AC_MSG_CHECKING([for $CC actually being c++])
if "$CC" -v 2>&1 | grep 'COLLECT_GCC=g++' >/dev/null; then
AC_MSG_RESULT([yes, using -fpermissive])
DOSEMU_CFLAGS="$DOSEMU_CFLAGS -fpermissive"
else
AC_MSG_RESULT([no])
DOSEMU_CFLAGS="$DOSEMU_CFLAGS -fplan9-extensions"
fi
fi
if test "$machine" = "x86_64" -a "$with_target_bits" != "32" -a \
"$enable_profile" != "yes"; then
AC_MSG_NOTICE(Compiling as PIE for $machine...)
DOSEMU_CFLAGS="$DOSEMU_CFLAGS -fpie"
DOSEMU_LDFLAGS="$DOSEMU_LDFLAGS -pie"
else
AC_MSG_NOTICE(Compiling as non-PIE...)
DOSEMU_CFLAGS="$DOSEMU_CFLAGS -fno-pie"
AX_CHECK_COMPILE_FLAG([-no-pie],
[DOSEMU_LDFLAGS="$DOSEMU_LDFLAGS -no-pie"])
fi
if test "$enable_asan" = "yes"; then
AX_CHECK_LINK_FLAG([-fsanitize=address], [
DOSEMU_CFLAGS="$DOSEMU_CFLAGS -fsanitize=address"
LDFLAGS="$LDFLAGS -fsanitize=address"
AC_MSG_NOTICE(enabling address sanitizer)
])
fi
if test "$enable_ubsan" = "yes"; then
AX_CHECK_LINK_FLAG([-fsanitize=undefined], [
DOSEMU_CFLAGS="$DOSEMU_CFLAGS -fsanitize=undefined -fno-sanitize=alignment"
LDFLAGS="$LDFLAGS -fsanitize=undefined"
AC_MSG_NOTICE(enabling UB sanitizer)
])
fi
if test "$enable_profile" = "yes"; then
DOSEMU_CFLAGS="$DOSEMU_CFLAGS -pg -no-pie"
LDFLAGS="$LDFLAGS -pg -no-pie"
AC_MSG_NOTICE(enabling profiling)
fi
if test "$enable_debug" = "yes" ; then
DOSEMU_CFLAGS="$DOSEMU_CFLAGS -ggdb3"
if test -z "$CFLAGS" ; then
# simx86 is too slow on gcc without -O
DOSEMU_CFLAGS="$DOSEMU_CFLAGS -O0"
fi
if test "$use_clang" = "yes" ; then
DOSEMU_CFLAGS="$DOSEMU_CFLAGS -fdebug-macro"
fi
elif test -z "$CFLAGS" ; then
DOSEMU_CFLAGS="$DOSEMU_CFLAGS -O2"
fi
DOSEMU_CFLAGS="${DOSEMU_CFLAGS} ${OPT} ${PIPE}"
DOSEMU_CPPFLAGS="${DOSEMU_CPPFLAGS} -MD -DCFLAGS_STR=\"$DOSEMU_CFLAGS $CFLAGS\""
DOSEMU_VERSION=`cd $srcdir && ./getversion -b`
AS_LDFLAGS="-melf_i386"
AC_SUBST(ASFLAGS)
AC_SUBST(LDFLAGS)
AC_SUBST(AS_LDFLAGS)
AC_SUBST(DOSEMU_CFLAGS)
AC_SUBST(DOSEMU_CPPFLAGS)
AC_SUBST(DOSEMU_LDFLAGS)
AC_SUBST(LIBS)
AC_SUBST(HAVE_LIBBFD)
AC_SUBST(HAVE_LIBBSD)
AC_SUBST(DOSEMU_VERSION)
cmds_rev=3
cmds_ver=0.$cmds_rev
cmdsuff=$PACKAGE_TARNAME-cmds-$cmds_ver
AC_DEFINE_UNQUOTED(CMDS_SUFF, "$cmdsuff")
AC_DEFINE_UNQUOTED(CMDS_REV, $cmds_rev)
AC_SUBST(cmdsuff)
dnl Print some warnings (if neccessary)
if test "$enable_fdpp" != "no" -a -z "$FDPP_PLU"; then
AC_MSG_ERROR([fdpp not available!])
fi
dnl Create output files. If you add new ones, please do it in order.
man_files=`cd $srcdir && find man -name '*.in' | sed 's/\.in$//'`
AC_DEFUN([AC_DATAROOTDIR_CHECKED])
AC_CONFIG_FILES([Makefile.conf $man_files])
AC_OUTPUT
AC_MSG_RESULT()
AC_MSG_RESULT(Enabling plugins: $PLUGINS)
VID_PLU=`echo $PLUGINS | $EGREP 'sdl|X|term|sdl1'`
if test -z "$VID_PLU"; then
AC_MSG_RESULT()
AC_MSG_WARN([No video plugins available!])
fi
AUD_PLU=`echo $PLUGINS | $EGREP 'sdl|ao|sdl1'`
if test -z "$AUD_PLU"; then
AC_MSG_RESULT()
AC_MSG_WARN([No audio plugins available!])
fi
if test -z "$FDPP_PLU"; then
AC_MSG_RESULT()
AC_MSG_WARN([fdpp not available!])
fi
AH_TEMPLATE([CONFIG_HOST],
[ Define the host for which Dosemu is configured ])
AH_TEMPLATE([CONFIG_TIME],
[ Define the configure time ])
AH_TEMPLATE([SIG_PROTO_PFX],
[ Define the signal handling function prototype prefix ])
AH_TEMPLATE([HAVE_STD_C11],
[Define this if your compiler supports c11])
AH_TEMPLATE([HAVE_STATIC_ASSERT],
[Define this if your glibc defines static_assert])
AH_TEMPLATE(HAVE_LIBBFD,
[Define this if you have binutils-devel installed])
AH_TEMPLATE(HAVE_LIBBSD,
[Define this if you have bsd-devel installed])
AH_TEMPLATE(HAVE_EXECINFO,
[Define this if you have execinfo.h in libc])
AH_TEMPLATE([USE_DL_PLUGINS],
[ DEFINE this, if you want dynamically loaded plugins ])
AH_TEMPLATE([HAVE_BACKTRACE],
[ Define this for backtrace() functionality ])
AH_TEMPLATE([X86_EMULATOR],
[ Define this to use the X86 CPU emulator ])
AH_TEMPLATE([DISABLE_SYSTEM_WA],
[ Define this to disable system-specific work-arounds that are
unneeded on your system ])
AH_TEMPLATE([WARN_UNDISABLED_WA],
[ Define this to enable compile-time warnings for system-specific
work-arounds that were failed to disable ])
AH_TEMPLATE([WARN_OUTDATED_WA],
[ Define this to enable compile-time warnings for outdated
system-specific work-arounds ])
AH_TEMPLATE([CMDS_SUFF],
[ Commands directory suffix ])
AH_TEMPLATE([CMDS_REV],
[ Commands revision num ])