2
dnl This file is part of VICE, the Versatile Commodore Emulator.
3
dnl See README for copyright notice.
5
dnl Process this file with GNU autoconf to produce a configure script.
10
dnl Command-line options
17
VICE_ARG_WITH_LIST(xaw3d, [ --with-xaw3d use Xaw3d library instead of plain Xaw])
18
VICE_ARG_WITH_LIST(readline, [ --without-readline do not try to use the system's readline library])
19
VICE_ARG_WITH_LIST(midas, [ --with-midas use MIDAS sound system instead of Allegro for audio])
20
VICE_ARG_WITH_LIST(arts, [ --with-arts use aRts sound system])
21
VICE_ARG_WITH_LIST(pulse, [ --without-pulse do not use PulseAudio sound system])
22
VICE_ARG_WITH_LIST(alsa, [ --without-alsa do not use the ALSA sound system])
23
VICE_ARG_WITH_LIST(oss, [ --without-oss do not use the OSS sound system])
24
VICE_ARG_WITH_LIST(sdlsound, [ --with-sdlsound use SDL sound system])
25
VICE_ARG_WITH_LIST(resid, [ --without-resid do not use the reSID engine])
26
VICE_ARG_WITH_LIST(residfp, [ --without-residfp do not use the reSID-fp engine])
27
VICE_ARG_WITH_LIST(png, [ --without-png do not use the PNG screenshot system])
28
VICE_ARG_WITH_LIST(zlib, [ --without-zlib do not use the zlib support])
29
VICE_ARG_WITH_LIST(picasso96, [ --with-picasso96 use Amiga P96 grafix system instead of cgx])
30
VICE_ARG_WITH_LIST(cocoa, [ --with-cocoa enables native Cocoa UI on Macs])
31
VICE_ARG_ENABLE_LIST(textfield, [ --disable-textfield disable enhanced text field widget])
32
VICE_ARG_ENABLE_LIST(fullscreen, [ --disable-fullscreen disable XFree86 fullscreen detection])
33
VICE_ARG_ENABLE_LIST(gnomeui, [ --enable-gnomeui enables GNOME UI support])
34
VICE_ARG_ENABLE_LIST(sdlui, [ --enable-sdlui enables SDL UI support])
35
VICE_ARG_ENABLE_LIST(gp2x, [ --enable-gp2x enables GP2X support])
36
VICE_ARG_ENABLE_LIST(wiz, [ --enable-wiz enables WIZ support])
37
VICE_ARG_ENABLE_LIST(dingoo, [ --enable-dingoo enables native Dingoo support])
38
VICE_ARG_ENABLE_LIST(dingux, [ --enable-dingux enables Dingux (Dingoo Linux) support])
39
VICE_ARG_ENABLE_LIST(nls, [ --disable-nls disables national language support])
40
VICE_ARG_ENABLE_LIST(realdevice, [ --disable-realdevice disables access to real peripheral devices (CBM4Linux/OpenCBM)])
41
VICE_ARG_ENABLE_LIST(ffmpeg, [ --disable-ffmpeg disable FFmpeg library support])
42
VICE_ARG_ENABLE_LIST(quicktime, [ --enable-quicktime enables Apple QuickTime support])
43
VICE_ARG_ENABLE_LIST(ethernet, [ --enable-ethernet enables The Final Ethernet emulation])
44
VICE_ARG_ENABLE_LIST(ipv6, [ --disable-ipv6 disables the checking for IPv6 compatibility])
45
VICE_ARG_ENABLE_LIST(parsid, [ --enable-parsid enables ParSID support])
46
VICE_ARG_ENABLE_LIST(bundle, [ --disable-bundle do not use application bundles on Macs])
47
VICE_ARG_ENABLE_LIST(memmap, [ --enable-memmap enable the memmap feature])
48
VICE_ARG_ENABLE_LIST(editline, [ --disable-editline disable history in Cocoa UI's console])
49
VICE_ARG_ENABLE_LIST(lame, [ --disable-lame disable MP3 export with LAME])
50
VICE_ARG_ENABLE_LIST(static-lame, [ --enable-static-lame enable static LAME linking])
51
VICE_ARG_ENABLE_LIST(rs232, [ --disable-rs232 disable RS232 support])
52
VICE_ARG_ENABLE_LIST(midi, [ --disable-midi disable MIDI support])
53
VICE_ARG_ENABLE_LIST(embedded, [ --enable-embedded enable embedding of emulation data files])
54
VICE_ARG_ENABLE_LIST(hidmgr, [ --disable-hidmgr disable IOHIDManager joystick support on Mac])
55
VICE_ARG_ENABLE_LIST(hidutils, [ --disable-hidutils disable HID Uitlities joystick support on Mac])
56
VICE_ARG_ENABLE_LIST(debug, [ --enable-debug enable debug source options])
57
VICE_ARG_ENABLE_LIST(debug-code, [ --enable-debug-code enable debugging code])
59
dnl register ReSID(-fp) options here to pass arg checks
60
VICE_ARG_ENABLE_LIST(inline, [ --enable-inline enable inlining of functions [default=yes]])
61
VICE_ARG_ENABLE_LIST(arch, [ --enable-arch[[=arch]] enable architecture specific compilation [[default=yes]]], [], [enable_arch=yes])
62
VICE_ARG_ENABLE_LIST(sse, [ --enable-sse enable the use of SSE [[default=yes]]])
63
VICE_ARG_ENABLE_LIST(no-pic, [ --enable-no-pic enable the use of the no-pic switch [[default=yes]]])
65
dnl check for invalid options
68
dnl check for conflicting ui options
69
vice_ui_list="--enable-gnomeui --enable-sdlui --with-cocoa --enable-gp2x --enable-wiz"
73
for command_option in $@
75
for vice_ui in $vice_ui_list
77
if test x"$command_option" = x"$vice_ui"; then
78
if test x"$vice_ui_1" = "xnone"; then
87
if test x"$vice_ui_1" != "xnone" -a x"$vice_ui_2" != "xnone"; then
88
AC_MSG_ERROR([conflicting UI options: $vice_ui_1 $vice_ui_2])
91
if test x"$enable_dingoo" = "xyes" -a x"$enable_dingux" = "xyes"; then
92
AC_MSG_ERROR([conflicting UI options: --enable-dingoo --enable-dingux])
95
AC_SUBST(VICE_VERSION_MAJOR)
96
AC_SUBST(VICE_VERSION_MINOR)
97
AC_SUBST(VICE_VERSION_BUILD)
99
if test x"$VICE_VERSION_BUILD" = "x" -o x"$VICE_VERSION_BUILD" = "x0" ; then
100
VICE_VERSION=$VICE_VERSION_MAJOR"."$VICE_VERSION_MINOR
102
VICE_VERSION=$VICE_VERSION_MAJOR"."$VICE_VERSION_MINOR"."$VICE_VERSION_BUILD
103
AC_DEFINE(UNSTABLE,,[Define if this version is unstable.])
105
AC_SUBST(VICE_VERSION)
107
AM_INIT_AUTOMAKE(vice, $VICE_VERSION)
108
AM_CONFIG_HEADER(src/config.h)
110
if test x"$VICE_VERSION_BUILD" = "x" -o x"$VICE_VERSION_BUILD" = "x0" ; then
111
VERSION_RC=$VICE_VERSION_MAJOR","$VICE_VERSION_MINOR",0,0"
113
VERSION_RC=$VICE_VERSION_MAJOR","$VICE_VERSION_MINOR","$VICE_VERSION_BUILD",0"
117
AC_DEFINE(VERSION_RC,"$VERSION_RC",[Win32 Version string.])
133
dnl Try to find out which system we are on...
136
if test x"$enable_memmap" = "xyes"; then
137
AC_DEFINE(FEATURE_CPUMEMHISTORY,,[Use the memmap feature.])
140
dnl check for debug build
141
if test x"$enable_debug" = "xyes"; then
149
dnl check whether to build debug code
150
if test x"$enable_debug_code" = "xyes"; then
151
AC_DEFINE(DEBUG,,[Enable debugging code])
154
if test x"$enable_gnomeui" = "xyes" ; then
155
AC_DEFINE(USE_GNOMEUI,,[Use GNOME UI.])
158
AM_CONDITIONAL(GNOMEUI, test x"$enable_gnomeui" = "xyes")
160
if test x"$with_cocoa" = "xyes" ; then
161
AC_DEFINE(MACOSX_COCOA,,[Use Cocoa on Macs.])
164
AM_CONDITIONAL(MACOSX_COCOA, test x"$with_cocoa" = "xyes")
166
if test x"$enable_textfield" != "xno"; then
167
AC_DEFINE(ENABLE_TEXTFIELD,,[Enable support for the TextField widget.])
168
echo "using TextField widget."
170
echo "using ugly Athena text widget."
176
dnl --- setup Objective-C ---
178
if test -z "x${OBJCFLAGS}"; then
179
OBJCFLAGS="${CFLAGS}"
181
OBJCDEPMODE="depmode=${CC}"
184
dnl AC_SUBST(OBJCDEPMODE)
185
_AM_DEPENDENCIES([OBJC])
187
if test x"$host_os" = "xminixvmd"; then
188
AR="\$(top_srcdir)/src/arch/unix/minix/minix-ar.sh"
189
AC_DEFINE(MINIXVMD,,[are we compiling under Minix-Vmd])
190
CFLAGS="$CFLAGS -I/usr/include/bsdcompat"
193
if test x"$host_os" = "xminix"; then
194
AC_DEFINE(MINIX_SUPPORT,,[do we need minix support])
195
CFLAGS="$CFLAGS -D_MINIX -D_POSIX_SOURCE"
196
MINIX_RELEASE=`uname -r`
197
MINIX_VERSION=`uname -v`
198
if test x"$MINIX_RELEASE" != "x3"; then
199
AC_MSG_ERROR([VICE works only on minix 3 and up])
201
case "$MINIX_VERSION" in
203
AC_DEFINE(MINIX_HAS_RECV_SEND,,[Define if this version of minix has the recv and send prototypes])
206
AM_CONDITIONAL(MINIX_SUPPORT, true)
208
AM_CONDITIONAL(MINIX_SUPPORT, false)
211
if test x"$host_os" = "xcygwin32" -o x"$host_os" = "xcygwin"; then
212
if test x"$with_x" = "xyes"; then
218
if test x"$host_os" = "xbeos"; then
219
if test x"$with_x" = "xyes"; then
226
dnl disable toolchain checking for ppc-beos
227
if test x"$host_os" = "xbeos" -a x"$host_cpu" = "xpowerpc"; then
231
dnl Enable the SDL UI by default for syllable.
232
if test x"$host_os" = "xsyllable"; then
236
dnl Disable nls for the SDL UI
237
if test x"$enable_sdlui" = "xyes"; then
242
if test "x$CC" = "xgcc"; then
246
dnl test for openwatcom CC for library conversion
247
if test x"$CC" = "xowcc"; then
249
AM_CONDITIONAL(OWCC, true)
250
AC_DEFINE(WATCOM_COMPILE,,[owcc is being used.])
252
AM_CONDITIONAL(OWCC, false)
255
if test x"$enable_arch" = "xno"; then
259
if test x"$enable_arch" = "xyes"; then
260
AC_MSG_CHECKING([if the compiler supports -march=native])
262
CFLAGS="$CFLAGS -march=native"
267
march="-march=native" ],
273
AC_MSG_CHECKING([if the compiler supports -march=$enable_arch])
275
CFLAGS="$CFLAGS -march=$enable_arch"
280
march="-march=$enable_arch" ],
288
AC_SUBST(ENABLE_ARCH)
290
dnl Check for needed external programs.
292
AC_CHECK_PROG(AR, ar, ar, ar)
293
AC_CHECK_TOOL(RANLIB, ranlib, :)
294
AC_CHECK_TOOL(STRIP, strip, :)
301
AC_CHECK_PROGS(MAKEINFO, makeinfo, no)
303
AC_CHECK_PROGS(TEXI2DVI, texi2dvi, no)
304
AC_CHECK_PROGS(PDFTEX, pdftex, no)
305
if test x"$TEXI2DVI" = "xno" -o x"$PDFTEX" = "xno"; then
306
AM_CONDITIONAL(BUILD_PDF, false)
308
AM_CONDITIONAL(BUILD_PDF, true)
311
AC_CHECK_PROGS(DOS2UNIX, dos2unix, dos2unix)
313
dnl Setup crosscompiling.
314
if test x"$host_vendor" = "xgo32" -o x"$host_vendor" = "xmsdos" -o x"$host_os" = "xmsdosdjgpp"; then
316
dnl Some GCC cross-compilers are installed with a different name
317
dnl instead of using the GCC architecture targeting features.
318
dnl Check for the most common ones.
320
dnl This is used by subsequent tests.
326
if test x"$with_midas" = "xyes" ; then
327
AC_DEFINE(USE_MIDAS_SOUND,,
328
[Use MIDAS Sound System instead of the Allegro library.])
330
echo "configuring support for MIDAS Sound System"
333
echo "using Allegro sound driver"
336
AM_CONDITIONAL(HAVE_RAWDRIVE, false)
338
dnl We always have a joystick and mouse on MSDOS.
339
AC_DEFINE(HAS_JOYSTICK,,[Enable joystick emulation.])
340
AC_DEFINE(HAVE_MOUSE,,[Enable 1351 mouse support])
341
AC_DEFINE(HAS_SINGLE_CANVAS,,[Is only one canvas supported?])
342
AC_DEFINE(HAVE_CATWEASELMKIII,,[Support for Catweasel MKIII.])
343
AC_DEFINE(HAVE_HARDSID,,[Support for HardSID.])
345
if test x"$enable_parsid" = "xyes"; then
346
AC_DEFINE(HAVE_PARSID,,[Support for ParSID.])
352
elif test x"$host_os" = "xamigaos" -o x"$host_os" = "xamigaos4" -o x"$host_os" = "xamithlon" -o x"$host_os" = "xaros" -o x"$host_os" = "xmorphos" -o x"$host_os" = "xwarpos" -o x"$host_os" = "xpowerup"; then
353
AM_CONDITIONAL(HAVE_RAWDRIVE, true)
355
if test x"$enable_sdlui" != "xyes"; then
356
if test x"$enable_rs232" != "xno"; then
357
AC_DEFINE(HAVE_RS232,,[Enable RS232 emulation.])
359
AC_DEFINE(HAVE_RAWDRIVE,,[Support for block device disk image access.])
360
AC_DEFINE(HAS_JOYSTICK,,[Enable joystick emulation.])
361
AC_DEFINE(HAVE_MOUSE,,[Enable 1351 mouse support])
364
AC_DEFINE(AMIGA_SUPPORT,,[Should we enable Amigaos support.])
372
if test x"$host_os" = "xmorphos"; then
373
AC_DEFINE(AMIGA_MORPHOS,,[Should we enable Amiga Morphos support.])
374
CFLAGS="$CFLAGS -noixemul"
375
AC_DEFINE(HAVE_HTONL,,[Define to 1 if you have the htonl function.])
376
AC_DEFINE(HAVE_HTONS,,[Define to 1 if you have the htons function.])
377
AC_DEFINE(HAVE_NETWORK,,[Enable netplay support])
378
AC_CHECK_HEADERS(proto/openpci.h, openpci_present=yes,,)
379
if test x"$enable_sdlui" != "xyes"; then
380
AC_DEFINE(HAVE_XVIDEO,,[Enable XVideo (overlay) support.])
382
if test x"$openpci_present" = "xyes"; then
383
AC_DEFINE(HAVE_CATWEASELMKIII,,[Support for Catweasel MKIII.])
384
AC_DEFINE(HAVE_HARDSID,,[Support for HardSID.])
390
if test x"$host_os" = "xaros"; then
391
AC_DEFINE(AMIGA_AROS,,[Should we enable AROS support.])
392
AC_DEFINE(HAVE_HTONL,,[Define to 1 if you have the htonl function.])
393
AC_DEFINE(HAVE_HTONS,,[Define to 1 if you have the htons function.])
394
AC_DEFINE(HAVE_NETWORK,,[Enable netplay support])
395
AC_CHECK_HEADERS(aros/_timeval.h)
396
AC_MSG_CHECKING(if common library bases are auto resolved)
397
aros_common_resolve=no
398
AC_TRY_LINK([#include <proto/asl.h>],
399
[AbortAslRequest(0)],
400
aros_common_resolve=yes)
401
if test x"$aros_common_resolve" = "xyes"; then
403
AC_DEFINE(WORKING_AROS_AUTO,,[Define to 1 if aros can handle auto resolving of library bases.])
411
if test x"$host_os" = "xamigaos" -a x"$host_cpu" = "xm68k"; then
412
CFLAGS="$CFLAGS -mc68020 -noixemul"
413
AC_DEFINE(AMIGA_M68K,,[Should we enable M68K AmigaOS support.])
414
AC_DEFINE(HAVE_HTONL,,[Define to 1 if you have the htonl function.])
415
AC_DEFINE(HAVE_HTONS,,[Define to 1 if you have the htons function.])
416
AC_DEFINE(HAVE_NETWORK,,[Enable netplay support])
417
AC_CHECK_HEADERS(proto/openpci.h, openpci_present=yes,,)
418
if test x"$openpci_present" = "xyes"; then
419
AC_DEFINE(HAVE_CATWEASELMKIII,,[Support for Catweasel MKIII.])
420
AC_DEFINE(HAVE_HARDSID,,[Support for HardSID.])
426
if test x"$is_amigaos4" = "xyes"; then
427
AC_DEFINE(AMIGA_OS4,,[Should we enable AmigaOS4 support.])
428
AC_DEFINE(HAVE_CATWEASELMKIII,,[Support for Catweasel MKIII.])
429
AC_DEFINE(HAVE_HARDSID,,[Support for HardSID.])
431
LIBS="$LIBS -lsupc++ -lgcc_eh"
436
CFLAGS="$CFLAGS -finline-functions"
438
if test x"$enable_sdlui" = "xyes" -a x"is_amigaos4" = "xyes"; then
442
elif test x"$host_os" = "xcygwin32" -o x"$host_os" = "xcygwin" -o x"$host_os" = "xmingw32" -o x"$host_os" = "xmingw32msvc"; then
444
dnl This is used by subsequent tests.
450
AC_CHECK_HEADERS([commctrl.h shlobj.h winioctl.h], [], [], [#include <windows.h>])
452
AC_DEFINE(HAS_JOYSTICK,,[Enable joystick emulation.])
453
AC_DEFINE(HAVE_MOUSE,,[Enable 1351 mouse support])
454
AC_DEFINE(HAVE_HTONL,,[Define to 1 if you have the htonl function.])
455
AC_DEFINE(HAVE_HTONS,,[Define to 1 if you have the htons function.])
456
AC_DEFINE(HAVE_NETWORK,,[Enable netplay support])
457
AC_DEFINE(HAVE_CATWEASELMKIII,,[Support for Catweasel MKIII.])
458
AC_DEFINE(HAVE_HARDSID,,[Support for HardSID.])
459
if test x"$enable_parsid" = "xyes"; then
460
AC_DEFINE(HAVE_PARSID,,[Support for ParSID.])
462
if test x"$enable_midi" != "xno"; then
463
AC_DEFINE(HAVE_MIDI,,[Enable support for MIDI.])
465
AC_DEFINE(HAVE_TFE,,[Support for The final Ethernet.])
466
if test x"$enable_rs232" != "xno"; then
467
AC_DEFINE(HAVE_RS232,,[Enable RS232 emulation.])
470
if test x"$enable_sdlui" != "xyes"; then
471
AC_TRY_LINK([#include <windows.h>],
472
[LARGE_INTEGER li; return (int) li.QuadPart],
473
AC_DEFINE(HAS_LONGLONG_INTEGER,,
474
[Support 64bit integer for Win32 performance counter]),)
475
AC_TRY_LINK([#include <windows.h>],
476
[HGLOBAL hGlobal; UnlockResource(hGlobal); return 0],
477
AC_DEFINE(HAS_UNLOCKRESOURCE,,[Do we have UnlockResource()?]),)
480
AM_CONDITIONAL(HAVE_RAWDRIVE, false)
482
dinput_header_no_lib="no"
484
dnl don't use dinput for owcc
485
if test x"$CC" != "xowcc"; then
486
AC_CHECK_HEADER(dinput.h,
487
[ AC_DEFINE(HAVE_DINPUT,,[Use DirectInput joystick driver]) ]
488
[ AC_MSG_CHECKING(for -ldinput) ]
489
[SAVELIBS="$LIBS"] [ LIBS="-ldinput $LIBS" ]
491
AC_LANG_PROGRAM([#include <dinput.h>],[return DirectInputCreateA(0,0,0,0);])
493
[ AC_DEFINE(HAVE_DINPUT_LIB, [], [dinput.lib or libdinput.a are present]) ]
494
[ AC_MSG_RESULT(yes) ],
495
[ dinput_header_no_lib="yes" ]
497
[ AC_MSG_RESULT(no) ]
501
elif test x"$host_os" = "xbeos"; then
503
dnl This is used by subsequent tests.
509
if test x"$enable_sdlui" != "xyes"; then
510
AC_DEFINE(HAS_JOYSTICK,,[Enable joystick emulation.])
511
AC_DEFINE(HAVE_MOUSE,,[Enable 1351 mouse support])
513
AM_CONDITIONAL(HAVE_RAWDRIVE, false)
515
elif test x"$host_os" = "xgp2x" -o x"$host_os" = "xlinux-gp2x" -o x"$host_vendor" = "xgp2x" -o "$host_os" = "xopen2x" -o x"$host_os" = "xlinux-open2x" -o x"$host_vendor" = "xopen2x" -o x"$enable_gp2x" = "xyes"; then
517
dnl This is used by subsequent tests.
524
CFLAGS="$CFLAGS -fomit-frame-pointer -mcpu=arm920t -msoft-float"
526
if test x"$enable_sdlui" != "xyes"; then
527
AC_DEFINE(HAVE_MOUSE,,[Enable 1351 mouse support])
528
AC_DEFINE(DEBUG_ZFILE,,[Use debugging of the zfile])
529
AC_DEFINE(GP2X,,[Enable GP2X compilation])
531
AC_DEFINE(GP2X_SDL,,[Enable SDL GP2X compilation])
533
AM_CONDITIONAL(HAVE_RAWDRIVE, false)
534
elif test x"$enable_dingoo" = "xyes"; then
535
dnl This is used by subsequent tests.
540
CFLAGS="-G0 -O3 -I$DINGOO_SDK/include -I$DINGOO_SDK/src/SDL/include -I$DINGOO_SDK/src -I$DINGOO_SDK/src/SDL/src"
541
CFLAGS="$CFLAGS -I$MIPSTOOLS/mipsel-linux-include -msplit-addresses -mips32"
542
CFLAGS="$CFLAGS -mno-abicalls -fno-pic -finline-functions -fomit-frame-pointer"
543
CFLAGS="$CFLAGS -msoft-float -fno-exceptions -D_DEBUG -DMPU_JZ4740"
544
CFLAGS="$CFLAGS -fcommon -falign-loops -falign-jumps -falign-labels"
545
CFLAGS="$CFLAGS -fdelayed-branch"
546
LIBS="-Wl,-z,muldefs -static -nodefaultlibs -nostdlib -Wl,--script,$DINGOO_SDK/lib/dingoo.xn -L$DINGOO_SDK/lib -lm -lSDL -lfgl -lsml -lc -ljz4740 -lgcc"
547
AC_DEFINE(HAVE_MOUSE,,[Enable 1351 mouse support])
548
AC_DEFINE(DINGOO_NATIVE,,[Enable native DINGOO compilation])
549
AC_DEFINE(DINGOO,,[Enable DINGOO compilation])
556
elif test x"$host_os" = "xwiz" -o x"$host_os" = "xlinux-wiz" -o x"$host_vendor" = "xwiz" -o x"$enable_wiz" = "xyes"; then
558
dnl This is used by subsequent tests.
565
CFLAGS="$CFLAGS -fomit-frame-pointer -msoft-float"
567
if test x"$enable_sdlui" != "xyes"; then
568
AC_DEFINE(HAVE_MOUSE,,[Enable 1351 mouse support])
569
AC_DEFINE(DEBUG_ZFILE,,[Use debugging of the zfile])
570
AC_DEFINE(WIZ,,[Enable WIZ compilation])
572
AC_DEFINE(WIZ_SDL,,[Enable SDL WIZ compilation])
574
AM_CONDITIONAL(HAVE_RAWDRIVE, false)
575
elif test x"$host_os" = "xdingux" -o x"$host_os" = "xdingoo" -o x"$host_os" = "xlinux-uclibc-dingux" -o x"$host_os" = "xlinux-uclibc-dingoo" -o x"$host_vendor" = "xdingux" -o x"$host_vendor" = "xdingoo" -o x"$enable_dingux" = "xyes"; then
577
dnl This is used by subsequent tests.
584
CFLAGS="$CFLAGS -fexpensive-optimizations -fomit-frame-pointer -frename-registers"
586
if test x"$enable_sdlui" != "xyes"; then
587
AC_DEFINE(HAVE_MOUSE,,[Enable 1351 mouse support])
588
AC_DEFINE(DEBUG_ZFILE,,[Use debugging of the zfile])
589
AC_DEFINE(DINGUX,,[Enable DINGUX compilation])
591
AC_DEFINE(DINGUX_SDL,,[Enable SDL DINGUX compilation])
593
AM_CONDITIONAL(HAVE_RAWDRIVE, false)
596
dnl Check for host os with version attached. Typically on UN*X like systems.
605
dnl disable toolchain checking for macosx
608
if test x"$with_cocoa" = "xyes" ; then
614
if test -z "$user_cflags" ; then
615
if test x"$GCC" = "xyes" ; then
616
warnings_cxx="-Wall -Winline"
617
warnings_c="-Wstrict-prototypes $warnings_cxx"
618
optimization_c="-O3 $march"
619
optimization_cxx="-fno-exceptions $optimization_c"
620
if test x"$ac_cv_prog_cc_g" = "xyes" ; then
621
CFLAGS="-g $optimization_c $warnings_c"
622
CXXFLAGS="-g $optimization_cxx $warnings_cxx"
624
CFLAGS="$optimization_c $warnings_c"
625
CXXFLAGS="$optimization_cxx $warnings_cxx"
630
if test "$GCC" = yes -a "$enable_no_pic" != "no" ; then
631
CFLAGS="$CFLAGS -mdynamic-no-pic"
632
CXXFLAGS="$CXXFLAGS -mdynamic-no-pic"
635
AM_CONDITIONAL(HAVE_RAWDRIVE, true)
636
if test x"$enable_rs232" != "xno"; then
637
AC_DEFINE(HAVE_RS232,,[Enable RS232 emulation.])
640
AC_DEFINE(HAVE_RAWDRIVE,,[Support for block device disk image access.])
641
AC_DEFINE(HAVE_MOUSE,,[Enable 1351 mouse support])
643
AC_DEFINE(MACOSX_SUPPORT,,[Enable Mac OS X specific code.])
644
if test "x$enable_bundle" != "xno" -o "x$enable_sdlui" = "xyes"; then
645
echo "enabled Mac application bundles"
646
AC_DEFINE(MACOSX_BUNDLE,,[Enable Mac OS X application bundles.])
648
echo "disabled Mac application bundles"
652
dnl All other UN*X systems
655
dnl special handling of sco unixware 7.x
658
LIBS="-lxti -lsocket -lnsl $LIBS"
664
LIBS="$LIBS -lbe -ltracker -ldevice -lgame"
667
if test x"$CC" = "xccc"; then
668
echo "Using Compaq C Compiler cflags."
669
CFLAGS="-w0 -g3 -migrate -fast -inline speed -unroll 0 -arch host -tune host"
670
AC_DEFINE(__DECALPHA__,1,[define when using the alpha compaq compiler])
675
if test x"$CC" = "xcc"; then
676
echo "Using Sun C Compiler cflags."
682
if test x"$CC" = "xcc"; then
683
echo "Using SGI C Compiler cflags."
684
CFLAGS="-O2 -woff all"
689
if test x"$CC" = "xcc"; then
690
echo "Using Tru64 C Compiler cflags."
691
CFLAGS="-fast -O2 -std -g3 -non_shared"
699
if test -z "$user_cflags" ; then
701
dnl Check for the type of compiler first.
702
if test x"$GCC" = "xyes" ; then
704
warnings_cxx="-Wall -Wno-inline"
705
if test x"$enable_gnomeui" != "xyes" ; then
706
warnings_c="-Wstrict-prototypes $warnings_cxx"
708
dnl "-Wstrict-prototypes" gives zillions of warnings in gtk headers
709
dnl warnings_gnome="-DGTK_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGNOME_DISABLE_DEPRECATED -DG_DISABLE_DEPRECATED"
710
warnings_c="$warnings_gnome $warnings_cxx"
713
dnl Set appropriate optimization options (better than the default -g -O)
715
dnl If the user has specified her own `CFLAGS', we do not override them.
717
optimization_c="-O3 $march"
718
optimization_cxx="-fno-exceptions $optimization_c"
719
dnl Use -g if available.
720
if test x"$ac_cv_prog_cc_g" = "xyes" ; then
721
CFLAGS="-g $optimization_c $warnings_c"
722
CXXFLAGS="-g $optimization_cxx $warnings_cxx"
724
CFLAGS="$optimization_c $warnings_c"
725
CXXFLAGS="$optimization_cxx $warnings_cxx"
728
dnl Check whether the options are OK.
733
dnl (If not on GCC, just keep the defaults, which are very conservative).
737
AM_CONDITIONAL(HAVE_RAWDRIVE, true)
739
AC_DEFINE(HAVE_RAWDRIVE,,[Support for block device disk image access.])
740
AC_DEFINE(HAVE_MOUSE,,[Enable 1351 mouse support])
741
if test x"$is_beos_x11" != "xyes"; then
742
if test x"$enable_midi" != "xno"; then
743
AC_DEFINE(HAVE_MIDI,,[Enable support for MIDI.])
745
if test x"$enable_rs232" != "xno"; then
746
AC_DEFINE(HAVE_RS232,,[Enable RS232 emulation.])
750
AC_CHECK_HEADER(linux/hardsid.h,
751
[ AC_DEFINE(HAVE_HARDSID,,[Support for HardSID.]) ],)
757
dnl This enables the embedded data files feature, which should
758
dnl only be used for developing new ports or for ports for which
759
dnl the loading of the datafiles is hard/impossible.
760
if test x"$enable_embedded" = "xyes"; then
761
AC_DEFINE(USE_EMBEDDED,,[Use embedded data files.])
762
AM_CONDITIONAL(EMBEDDED, true)
764
AM_CONDITIONAL(EMBEDDED, false)
767
AM_CONDITIONAL(USE_MIDAS_SOUND, test x"$with_midas" = "xyes")
769
dnl check for texi to amigaguide program
770
AC_CHECK_PROGS(MAKEGUIDE, makeguide, no)
771
if test x"$MAKEGUIDE" != "xno"; then
772
AM_CONDITIONAL(BUILD_AMIGAGUIDE, true)
774
if test x"$MAKEINFO" != "xno"; then
775
AC_MSG_CHECKING([if the makeinfo supports amigaguide])
776
agresult=`$MAKEINFO --help 2>&1 | grep amiga`
777
if test x"$agresult" != "x"; then
780
AM_CONDITIONAL(BUILD_AMIGAGUIDE, true)
783
AM_CONDITIONAL(BUILD_AMIGAGUIDE, false)
786
AM_CONDITIONAL(BUILD_AMIGAGUIDE, false)
791
dnl check for windows chm compiler
792
AC_CHECK_PROGS(HHC, hhc, no)
793
if test x"$HHC" = "xno"; then
794
AM_CONDITIONAL(BUILD_CHM, false)
796
AM_CONDITIONAL(BUILD_CHM, true)
799
dnl check for windows hlp compiler programs
800
AC_CHECK_PROGS(MAKERTF, makertf, no)
801
AC_CHECK_PROGS(HCRTF, hcrtf, no)
802
if test x"$MAKERTF" = "xno" -o x"$HCRTF" = "xno"; then
803
AM_CONDITIONAL(BUILD_HLP, false)
805
AM_CONDITIONAL(BUILD_HLP, true)
808
dnl check for os/2 ipf compiler programs
809
AC_CHECK_PROGS(TEXI2IPF, texi2ipf, no)
810
AC_CHECK_PROGS(IPFC, wipfc, no)
811
if test x"$TEXI2IPF" != "xno"; then
812
if test x"$IPFC" = "xno"; then
813
AC_CHECK_PROGS(IPFC, ipfc, no)
815
if test x"$IPFC" != "xno"; then
816
AM_CONDITIONAL(BUILD_IPF, true)
818
AM_CONDITIONAL(BUILD_IPF, false)
821
AM_CONDITIONAL(BUILD_IPF, false)
824
dnl Extension for executable files in this system
828
dnl Its has been rejected to use the full GNU gettext package
829
dnl delivered within the source. This is a minimum replacement implementing
830
dnl a simple check to find `libintl.h' and `gettext'.
833
dnl Add new languages here
834
ALL_LINGUAS="da de es fr hu it ko nl pl ru sv tr"
836
dnl These rules are solely for the distribution goal. While doing this
837
dnl we only have to keep exactly one list of the available catalogs
839
for lang in $ALL_LINGUAS; do
840
GMOFILES="$GMOFILES $lang.gmo"
841
POFILES="$POFILES $lang.po"
846
if test x"$enable_nls" != "xno" -a x"$is_unix" = "xyes"; then
847
AC_CHECK_HEADER(libintl.h,
848
[AC_CACHE_CHECK([for gettext in libc], gt_cv_func_gettext_libc,
849
[AC_TRY_LINK([#include <libintl.h>], [return (int) gettext ("")],
850
gt_cv_func_gettext_libc=yes, gt_cv_func_gettext_libc=no)])
852
AC_CACHE_CHECK([for gettext in libintl], gt_cv_func_gettext_libintl,
855
AC_TRY_LINK([#include <libintl.h>], [return (int) gettext ("")],
856
INTLLIBS=-lintl gt_cv_func_gettext_libintl=yes, gt_cv_func_gettext_libintl=no)
859
if test "$gt_cv_func_gettext_libc" = "yes" \
860
|| test "$gt_cv_func_gettext_libintl" = "yes"; then
861
AC_DEFINE(HAVE_GETTEXT,,[Define if gettext if available.])
862
AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
863
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
864
if test "$MSGFMT" != "no"; then
865
AC_CHECK_FUNCS(dcgettext)
866
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
867
AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
868
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
869
AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
870
return _nl_msg_cat_cntr],
878
AC_DEFINE(ENABLE_NLS,,[Define if NLS support is enabled.])
879
AC_DEFINE(HAVE_LIBINTL_H,,[use libintl for NLS.])
880
AC_DEFINE_UNQUOTED(DATADIRNAME, "$DATADIRNAME",[NLS datadirname.])
881
dnl this is prefixed with PREFIX
882
AC_DEFINE(NLS_LOCALEDIR, PREFIX"/"DATADIRNAME"/locale",[NLS local directory.])
884
AC_MSG_WARN([libintl.h not found, disabling NLS])
888
dnl Test whether we really found GNU xgettext.
889
if test "$XGETTEXT" != ":"; then
890
dnl If it is no GNU xgettext we define it as : so that the
891
dnl Makefiles still can work.
892
if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
896
[found xgettext program is not GNU xgettext; ignore it])
901
dnl Test wether GMSGFMT is there. Should fix `make dist'.
902
if test "$GMSGFMT" = "" ; then
906
# We need to process the po/ directory.
910
[case "$CONFIG_FILES" in *po/Makefile.in*)
911
sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
914
dnl Make all variables we use known to autoconf.
915
AC_SUBST(USE_INCLUDED_LIBINTL)
917
AC_SUBST(DATADIRNAME)
925
dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
926
dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
927
dnl Try to locate is.
929
if test -n "$ac_aux_dir"; then
930
MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
932
if test -z "$MKINSTALLDIRS"; then
933
MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
935
AC_SUBST(MKINSTALLDIRS)
937
dnl currently no catgets support, can't check it.
941
if test x"$is_unix" = "xyes"; then
942
AC_MSG_WARN([disabling NLS on user request])
947
if test x"$USE_NLS" = "x" ; then
950
if test "$MSGFMT" = "no" ; then
951
dnl Fallback to shipped .gmo
952
dnl Those should work on x86 linux systems.
953
AC_MSG_WARN([msgfmt not found, falling back to default catalogs (x86/Linux)])
958
AC_SUBST(NLS_LOCALEDIR)
960
dnl Check for a perl interpreter.
961
AC_PATH_PROG(PERL, perl)
964
if test x"$POSUB" = "xpo"; then
965
AM_CONDITIONAL(PO_SUBDIR_USED, true)
967
AM_CONDITIONAL(PO_SUBDIR_USED, false)
970
dnl Check if --param inline-unit-growth=60 can be used.
972
CFLAGS="$CFLAGS --param inline-unit-growth=60"
973
AC_MSG_CHECKING([if the compiler accepts --param inline-unit-growth=60])
977
INLINE_UNIT_GROWTH="--param inline-unit-growth=60"
980
INLINE_UNIT_GROWTH=""
983
AC_SUBST(INLINE_UNIT_GROWTH)
985
dnl Check if --param max-inline-insns-single=600 can be used.
987
CFLAGS="$CFLAGS --param max-inline-insns-single=600"
988
AC_MSG_CHECKING([if the compiler accepts --param max-inline-insns-single=600])
992
MAX_INLINE_INSN_SINGLE="--param max-inline-insns-single=600"
995
MAX_INLINE_INSN_SINGLE=""
998
AC_SUBST(MAX_INLINE_INSN_SINGLE)
1000
dnl Check and setup aRts compilation.
1001
if test x"$with_arts" = "xyes"; then
1002
AC_CHECK_PROGS(artsc_config, artsc-config, no)
1003
if test x"$artsc_config" = "xno"; then
1004
AC_MSG_WARN([artsc-config not found. aRts will not be configured])
1011
dnl Set output drivers to none
1013
GFXOUTPUT_DRIVERS=""
1033
dnl disable reSID-FP for certain platforms
1034
if test x"$host_os" = "xamigaos" -a x"$host_cpu" = "xm68k"; then
1038
if test x"$is_unix_gp2x" = "xyes" -o x"$is_unix_wiz" = "xyes"; then
1042
if test x"$host_os" = "xbeos" -a x"$host_cpu" = "xpowerpc"; then
1046
dnl disable reSID for certain platforms
1048
if test x"$with_resid" = "xno" -a x"$with_residfp" = "xno"; then
1049
dnl Do not attempt to configure reSID(-fp).
1050
dnl NOTE: no_recursion is set because directories specified with
1051
dnl AC_CONFIG_SUBDIRS are always recursed into regardless of where the
1053
dnl Another workaround must be found if other self-contained packages go
1056
dnl A workaround for an autoconf bug when not using/checking the C++
1057
dnl compiler, we'll define am__fastdepCXX_TRUE as #
1058
am__fastdepCXX_TRUE=#
1059
am__fastdepCXX_FALSE=
1065
dnl when using --host=, check if the C++ compiler is the intended cross compiler
1066
if [[ x"$ac_cv_prog_cc_cross" != "xno" -a x"$toolchain_check" != "xno" ]]; then
1067
if test x"$CXX" != "x" ; then
1068
if test -n "$ac_tool_prefix"; then
1070
for cxx_compiler in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
1072
if test x"$ac_tool_prefix$cxx_compiler" = x"$CXX"; then
1077
if test x"$valid_cxx" = "xno"; then
1078
AC_MSG_WARN([$CXX is not the intended cross-compiler, ReSID and ReSID-fp will not be configured])
1087
dnl disable resid and residfp when no C++ compiler is found
1088
if test x"$CXX" != "x" ; then
1091
dnl Set CXXFLAGS. Use -fno-exceptions for G++ if supported.
1092
if test "$ac_test_CXXFLAGS" != set; then
1093
if test "$GXX" = yes; then
1094
CXXFLAGS="$CFLAGS -fno-exceptions"
1095
AC_MSG_CHECKING([whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works])
1098
[ AC_MSG_RESULT(yes) ],
1109
if test x"$with_resid" = "xyes" -o x"$with_resid" = "x"; then
1110
AC_DEFINE(HAVE_RESID,,[This version provides ReSID support.])
1111
AC_CONFIG_SUBDIRS(src/resid)
1113
RESID_LIBS="\$(top_builddir)/src/resid/libresid.a"
1114
RESID_INCLUDES="-I\$(top_builddir)/src/resid"
1117
AC_DEFINE(HAVE_RESID_DTV,,[This version provides ReSID-DTV support.])
1118
AC_CONFIG_SUBDIRS(src/resid-dtv)
1119
RESID_DTV_DIR=resid-dtv
1120
RESID_DTV_LIBS="\$(top_builddir)/src/resid-dtv/libresiddtv.a"
1121
RESID_DTV_INCLUDES="-I\$(top_builddir)/src/resid-dtv"
1122
RESID_DTV_DEP=libresiddtv
1125
if test x"$with_residfp" != "xno"; then
1126
AC_DEFINE(HAVE_RESID_FP,,[This version provides ReSID_FP support.])
1127
AC_CONFIG_SUBDIRS(src/resid-fp)
1128
RESID_FP_DIR=resid-fp
1129
RESID_FP_LIBS="\$(top_builddir)/src/resid-fp/libresidfp.a"
1130
RESID_FP_INCLUDES="-I\$(top_builddir)/src/resid-fp"
1131
RESID_FP_DEP=libresidfp
1139
AM_CONDITIONAL(HAVE_RESID, test x"$with_resid" != "xno")
1142
AC_SUBST(RESID_LIBS)
1143
AC_SUBST(RESID_INCLUDES)
1146
if test x"$with_residfp" = "xno"; then
1147
AM_CONDITIONAL(HAVE_RESID_FP, false)
1149
AM_CONDITIONAL(HAVE_RESID_FP, true)
1152
AC_SUBST(RESID_FP_DIR)
1153
AC_SUBST(RESID_FP_LIBS)
1154
AC_SUBST(RESID_FP_INCLUDES)
1155
AC_SUBST(RESID_FP_DEP)
1157
AM_CONDITIONAL(HAVE_RESID_DTV, test x"$with_resid" != "xno")
1158
AC_SUBST(RESID_DTV_DIR)
1159
AC_SUBST(RESID_DTV_LIBS)
1160
AC_SUBST(RESID_DTV_INCLUDES)
1161
AC_SUBST(RESID_DTV_DEP)
1163
dnl Check for typedefs, structures, and compiler characteristics.
1164
AC_CHECK_HEADERS(sys/types.h)
1170
dnl Check whether inline functions are available.
1172
if test x"$ac_cv_c_inline" = "xno" ; then
1173
CFLAGS="$CFLAGS -DNO_INLINE"
1176
dnl Define the type sizes.
1177
if [[ x"$ac_cv_prog_cc_cross" != "xyes" ]]; then
1180
dnl if cross-compiling, we have to do this by hand
1181
echo "warning: assuming sizeof(unsigned short) == 2,"
1182
echo " sizeof(unsigned int) == 4,"
1183
echo " sizeof(unsigned long) == 4"
1186
if test x"$cross_compiling" = "xyes"; then
1187
AM_CONDITIONAL(CROSS, true)
1190
AM_CONDITIONAL(CROSS, false)
1195
AC_CHECK_SIZEOF(unsigned short, 2)
1196
AC_CHECK_SIZEOF(unsigned int, 4)
1197
AC_CHECK_SIZEOF(unsigned long, 4)
1200
dnl Check whether gcc needs -traditional.
1201
AC_PROG_GCC_TRADITIONAL
1204
dnl Check for header files.
1206
AC_CHECK_HEADERS(direct.h errno.h fcntl.h limits.h regex.h unistd.h strings.h \
1207
sys/dirent.h sys/ioctl.h sys/stat.h inttypes.h libgen.h \
1208
dir.h io.h process.h signal.h alloca.h wchar.h stdint.h sys/time.h)
1210
AC_CHECK_HEADER(regexp.h,,,[#define INIT register char *sp = instring;
1211
#define GETC() (*sp++)
1212
#define PEEKC() (*sp)
1213
#define UNGETC(c) -- sp
1214
#define RETURN(ptr) return NULL;
1215
#define ERROR(val) _RegExpError(val)
1219
dnl ----- Dynamic Lib Loading Support -----
1222
dnl check for dlopen support on unix systems
1223
if test x"$is_unix" = "xyes"; then
1224
AC_CHECK_HEADER(dlfcn.h,,)
1225
if test x"$ac_cv_header_dlfcn_h" = "xyes" ; then
1226
AC_CHECK_FUNC(dlopen,
1228
AC_DEFINE(HAVE_DYNLIB_SUPPORT,,
1229
[Support for dynamic library loading.])
1232
if test x"$dynlib_support" != "xyes" ; then
1233
AC_CHECK_LIB(dl, dlopen,
1234
[ DYNLIB_LIBS="-ldl";
1235
AC_DEFINE(HAVE_DYNLIB_SUPPORT,,
1236
[Support for dynamic library loading.])
1242
elif test x"$is_win32" = "xyes" ; then
1243
AC_DEFINE(HAVE_DYNLIB_SUPPORT,,[Support for dynamic library loading.])
1245
AC_SUBST(DYNLIB_LIBS)
1247
dnl ----- Joystick support -----
1249
if test x"$is_unix_x11" = "xyes" -a x"$enable_sdlui" != "xyes" ; then
1250
AC_CHECK_HEADER(linux/joystick.h,
1251
[ AC_DEFINE(HAS_JOYSTICK,,[Enable joystick emulation.])
1252
AC_DEFINE(LINUX_JOYSTICK,,
1253
[Enable support for Linux style joysticks.])],)
1254
if test x"$ac_cv_header_linux_joystick_h" = "xyes" ; then
1255
AC_MSG_CHECKING(whether linux/joystick.h supports digital joysticks)
1256
AC_TRY_COMPILE([ #include <linux/joystick.h> ],
1257
[ struct DJS_DATA_TYPE djs; ],
1258
[ AC_DEFINE(HAS_DIGITAL_JOYSTICK,,
1259
[Enable emulation for digital joysticks.])
1260
AC_MSG_RESULT(yes) ], AC_MSG_RESULT(no))
1263
AC_CHECK_HEADER(machine/joystick.h,
1264
[ AC_DEFINE(HAS_JOYSTICK,,[Enable joystick emulation.])
1265
AC_DEFINE(HAVE_MACHINE_JOYSTICK_H,,
1266
[Define to 1 if you have the <machine/joystick.h> header file.])
1267
AC_DEFINE(BSD_JOYSTICK,,
1268
[Enable support for BSD style joysticks.])],)
1270
if test x"$ac_cv_header_machine_joystick_h" != "xyes"; then
1271
AC_CHECK_HEADER(sys/joystick.h,
1272
[ AC_DEFINE(HAS_JOYSTICK,,[Enable joystick emulation.])
1273
AC_DEFINE(HAVE_SYS_JOYSTICK_H,,
1274
[Define to 1 if you have the <sys/joystick.h> header file.])
1275
AC_DEFINE(BSD_JOYSTICK,,
1276
[Enable support for BSD style joysticks.])],)
1279
dnl NetBSD/FreeBSD USB joystick support
1283
AC_CHECK_LIB(usbhid, hid_get_report_desc, usbhid_lib=yes)
1284
if test x"$usbhid_lib" = "xyes" ; then
1285
AC_CHECK_HEADER(usbhid.h,
1286
[AC_DEFINE(HAVE_USBHID_H,1,
1287
[Define to 1 if you have the <usbhid.h> header file.])
1289
AC_CHECK_HEADER(libusbhid.h,
1290
[AC_DEFINE(HAVE_LIBUSBHID_H,1,
1291
[Define to 1 if you have the <libusbhid.h> header file.])
1294
if test x"$usb_header" = "xyes" ; then
1295
AC_DEFINE(HAS_USB_JOYSTICK,,[Enable emulation for USB joysticks.])
1299
AC_CHECK_LIB(usb, hid_get_report_desc, usb_lib=yes)
1300
if test x"$usb_lib" = "xyes"; then
1301
AC_CHECK_HEADER(usb.h,
1302
[AC_DEFINE(HAVE_USB_H,1,
1303
[Define to 1 if you have the <usb.h> header file.])
1305
AC_CHECK_HEADER(libusb.h,
1306
[AC_DEFINE(HAVE_LIBUSB_H,1,
1307
[Define to 1 if you have the <libusb.h> header file.])
1309
if test x"$usb_header" = "xyes" ; then
1310
AC_DEFINE(HAS_USB_JOYSTICK,,[Enable emulation for USB joysticks.])
1317
if test x"$is_unix_macosx" = "xyes" -a x"$enable_sdlui" != "xyes" ; then
1318
dnl --- Mac joystick support ---
1320
dnl check for HID Manager
1321
if test x"$enable_hidmgr" != "xno" ; then
1322
AC_CHECK_HEADER(IOKit/hid/IOHIDManager.h,,)
1323
if test x"$ac_cv_header_IOKit_hid_IOHIDManager_h" = "xyes" ; then
1324
AC_MSG_CHECKING(whether we can link the (mac) IOHIDManager)
1326
LIBS="$LIBS -framework IOKit -framework CoreServices"
1327
AC_TRY_LINK([#include <IOKit/hid/IOHIDManager.h>],
1328
[IOHIDManagerCreate(NULL,0)],
1329
[AC_MSG_RESULT(yes);
1330
JOY_LIBS="-framework IOKit -framework CoreServices";
1331
AC_DEFINE(HAS_JOYSTICK,,[Enable Joystick emulation.])
1332
AC_DEFINE(MAC_JOYSTICK,,[Enable Mac Joystick support.])
1333
AC_DEFINE(HAS_HIDMGR,,[Enable Mac IOHIDManager Joystick driver.])
1342
dnl check for HID utility library
1343
if test x"$enable_hidutils" != "xno" ; then
1344
AC_CHECK_HEADER(HID_Utilities_External.h,,)
1345
if test x"$ac_cv_header_HID_Utilities_External_h" = "xyes" ; then
1346
AC_MSG_CHECKING(whether we can link the (mac) HIDUtilities library)
1348
LIBS="$LIBS -lHIDUtilities -framework IOKit -framework CoreServices"
1349
AC_TRY_LINK([#include <HID_Utilities_External.h>],
1350
[HIDCountDevices()],
1351
[AC_MSG_RESULT(yes);
1352
JOY_LIBS="-lHIDUtilities -framework IOKit -framework CoreServices";
1353
AC_DEFINE(HAS_JOYSTICK,,[Enable Joystick emulation.])
1354
AC_DEFINE(MAC_JOYSTICK,,[Enable Mac Joystick support.])],
1363
dnl Check for math library
1364
AC_CHECK_HEADERS(math.h)
1365
AC_CHECK_LIB(m, sqrt,,,$LIBS)
1368
dnl ----- ZLib -----
1371
if test x"$with_zlib" != "xno" ; then
1372
AC_CHECK_HEADER(zlib.h,,)
1373
if test x"$ac_cv_header_zlib_h" = "xyes" ; then
1374
ac_cv_lib_z_zlibVersion=yes
1375
AC_CHECK_LIB(z, zlibVersion,
1377
AC_DEFINE(HAVE_ZLIB,,
1378
[Can we use the ZLIB compression library?]) ],,)
1385
dnl ----- Netplay Support -----
1388
if test x"$is_unix_x11" = "xyes" -o x"$is_dos" = "xyes" -o x"$is_unix_macosx" = "xyes"; then
1390
if test x"$host_os" != "xqnx"; then
1391
dnl Check for needed network headers
1392
UNIX_NETWORK_HEADERS_PRESENT=yes
1393
AC_CHECK_HEADERS(sys/types.h unistd.h sys/socket.h sys/time.h sys/select.h netinet/in.h arpa/inet.h netdb.h,,
1394
[UNIX_NETWORK_HEADERS_PRESENT=no],)
1396
LIBS="-lsocket -lunix $LIBS"
1399
if test x"$UNIX_NETWORK_HEADERS_PRESENT" = "xyes"; then
1401
dnl Check for possible extra needed network libraries
1402
AC_CHECK_LIB(intl, dgettext,[ NETPLAY_LIBS="-lintl $NETPLAY_LIBS";
1403
LIBS="-lintl $LIBS"],,)
1404
AC_CHECK_LIB(nsl, gethostbyname,[ NETPLAY_LIBS="-lnsl $NETPLAY_LIBS";
1405
LIBS="-lnsl $LIBS"],,)
1406
AC_CHECK_LIB(socket, gethostbyname,[ NETPLAY_LIBS="-lsocket $NETPLAY_LIBS";
1407
LIBS="-lsocket $LIBS"],,)
1408
AC_CHECK_LIB(bsd, gethostbyname,[ NETPLAY_LIBS="-lbsd $NETPLAY_LIBS";
1409
LIBS="-lbsd $LIBS"],,)
1410
AC_CHECK_LIB(net, gethostbyname,[ NETPLAY_LIBS="-lnet $NETPLAY_LIBS";
1411
LIBS="-lnet $LIBS"],,)
1412
AC_CHECK_LIB(inet, gethostbyname,[ NETPLAY_LIBS="-linet $NETPLAY_LIBS";
1413
LIBS="-linet $LIBS"],,)
1414
AC_CHECK_LIB(watt, gethostbyname,[ NETPLAY_LIBS="-lwatt $NETPLAY_LIBS";
1415
LIBS="-lwatt $LIBS"],,)
1417
dnl Check for needed functions
1418
UNIX_NETWORK_FUNCS_PRESENT=yes
1420
AC_CHECK_FUNCS(socket send bind listen gethostbyname connect recv accept,,
1421
[UNIX_NETWORK_FUNCS_PRESENT=no],)
1423
if test x"$UNIX_NETWORK_FUNCS_PRESENT" = "xyes"; then
1424
AC_DEFINE(HAVE_NETWORK,,[Enable netplay support])
1425
AC_CHECK_FUNCS(htons htonl)
1426
AC_CHECK_FUNCS(getdtablesize getrlimit)
1427
AC_MSG_CHECKING([For socklen_t])
1428
AC_TRY_COMPILE([#include <sys/types.h>
1429
#include <sys/socket.h>],
1430
[socklen_t foo; foo = 1235;],
1431
[AC_DEFINE(HAVE_SOCKLEN_T,,[Define if the socklen_t type is present.])
1432
AC_MSG_RESULT(yes)],
1433
[AC_MSG_RESULT(no)])
1435
AC_MSG_CHECKING([for in_addr_t])
1436
AC_TRY_COMPILE([#include <sys/types.h>
1439
#include <netinet/in.h>], [in_addr_t foo;],
1440
[AC_DEFINE(HAVE_IN_ADDR_T,,[Define if the in_addr_t type is present.])
1441
AC_MSG_RESULT(yes)],
1442
[AC_MSG_RESULT(no)])
1445
elif test x"$is_beos" = "xyes"; then
1447
dnl Check for needed network headers
1448
BEOS_NETWORK_HEADERS_PRESENT=yes
1449
AC_CHECK_HEADERS(socket.h netdb.h byteorder.h,,
1450
[BEOS_NETWORK_HEADERS_PRESENT=no],)
1452
if test x"$BEOS_NETWORK_HEADERS_PRESENT" = "xyes"; then
1454
dnl Check for possible extra needed network libraries
1455
AC_CHECK_LIB(net, gethostbyname,[ NETPLAY_LIBS="-lnet -lnetapi $NETPLAY_LIBS";
1456
LIBS="-lnet -lnetapi $LIBS"],,)
1458
dnl Check for needed functions
1460
BEOS_NETWORK_FUNCS_PRESENT=yes
1462
AC_CHECK_FUNCS(socket send bind listen gethostbyname connect recv accept,,
1463
[BEOS_NETWORK_FUNCS_PRESENT=no],)
1465
if test x"$BEOS_NETWORK_FUNCS_PRESENT" = "xyes"; then
1466
AC_DEFINE(HAVE_NETWORK,,[Enable netplay support])
1467
AC_CHECK_FUNCS(getdtablesize getrlimit)
1472
dnl Check for availability of IPV6
1473
if test x"$is_unix_x11" = "xyes" -o x"$is_dos" = "xyes" -o x"$is_unix_macosx" = "xyes" ; then
1474
if test x"$UNIX_NETWORK_FUNCS_PRESENT" = "xyes"; then
1475
AC_MSG_CHECKING([if IPV6 should be enabled])
1476
if test x"$enable_ipv6" != "xno"; then
1479
#include <sys/socket.h>
1480
#include <sys/types.h>
1481
#include <netinet/in.h>], [
1482
struct sockaddr_storage ss;
1483
struct in6_addr in6;
1484
socket(AF_INET6, SOCK_STREAM, 0);
1490
AC_MSG_RESULT($have_ipv6)
1492
if test $have_ipv6 = yes; then
1493
have_broken_ss_family=no
1495
dnl on some platforms, the structure sockaddr doesn't have a
1496
dnl ss_family, but __ss_family. If we find no ss_family then we
1497
dnl check for __ss_family, and if found define NEED_PREFIXED_SS_FAMILY.
1498
AC_MSG_CHECKING([struct sockaddr::ss_family])
1500
#include <sys/socket.h>
1501
#include <sys/types.h>], [
1502
struct sockaddr_storage ss ;
1508
AC_MSG_RESULT($have_ss_family)
1509
if test x"$have_ss_family" = "xno" ; then
1510
AC_MSG_CHECKING([broken struct sockaddr::ss_family])
1512
#include <sys/socket.h>
1513
#include <sys/types.h>], [
1514
struct sockaddr_storage ss ;
1515
ss.__ss_family = 0 ;
1517
have_broken_ss_family=yes,
1518
have_broken_ss_family=no
1520
AC_MSG_RESULT($have_broken_ss_family)
1521
if test x$have_broken_ss_family = xyes ; then
1522
AC_DEFINE(NEED_PREFIXED_SS_FAMILY, [],
1523
[Whether struct sockaddr::__ss_family exists])
1524
AC_DEFINE(ss_family, __ss_family,
1525
[ss_family is not defined here, use __ss_family instead])
1527
AC_MSG_WARN(ss_family and __ss_family not found)
1531
have_gethostbyname2=no
1532
AC_CHECK_FUNC(gethostbyname2, have_gethostbyname2=yes)
1533
if test $have_gethostbyname2 = yes; then
1534
AC_DEFINE([HAVE_GETHOSTBYNAME2], [], [Define if gethostbyname2 can be used])
1535
AC_DEFINE([HAVE_IPV6], [], [Define if ipv6 can be used])
1537
have_getipnodebyname=no
1538
AC_CHECK_FUNC(getipnodebyname, have_getipnodebyname=yes)
1539
if test $have_getipnodebyname = yes; then
1540
AC_DEFINE([HAVE_GETIPNODEBYNAME], [], [Define if getipnodebyname can be used])
1541
AC_DEFINE([HAVE_IPV6], [], [Define if ipv6 can be used])
1551
AC_SUBST(NETPLAY_LIBS)
1554
dnl ----- FFMPEG -----
1558
AC_MSG_CHECKING([for FFMPEG support])
1559
if test x"$enable_ffmpeg" != "xno"; then
1560
if test x"$is_win32" = "xyes" ; then
1562
AC_MSG_RESULT([yes (internal)])
1563
GFXOUTPUT_DRIVERS="$GFXOUTPUT_DRIVERS ffmpegdrv.o ffmpeglib.o"
1564
AC_DEFINE([HAVE_FFMPEG],,[Have FFMPEG av* libs available])
1565
AC_DEFINE([HAVE_FFMPEG_SWSCALE],,[Have FFMPEG swscale lib available])
1566
AC_DEFINE([HAVE_FFMPEG_HEADER_SUBDIRS],,[FFMPEG uses subdirs for headers])
1567
FFMPEG_INCLUDES="-I\$(top_srcdir)/src/lib/libffmpeg"
1568
elif test x"$is_unix" = "xyes" -a x"$dynlib_support" = "xyes" ; then
1569
dnl --- unix (requires dynlib support) ---
1570
AC_MSG_RESULT([via pkg-config])
1571
PKG_CHECK_MODULES(FFMPEG_AV, [libavcodec libavformat libavutil],
1573
old_CPPFLAGS=$CPPFLAGS
1574
CFLAGS="$CFLAGS $FFMPEG_AV_CFLAGS"
1575
CPPFLAGS="$CPPFLAGS $FFMPEG_AV_CFLAGS"
1577
AC_CHECK_HEADER(libavformat/avformat.h,
1578
[AC_DEFINE([HAVE_FFMPEG_HEADER_SUBDIRS],,[FFMPEG uses subdirs for headers])],
1579
[AC_CHECK_HEADER(avformat.h,,
1580
[AC_MSG_ERROR([No suitable FFMPEG header found!])])])
1583
CPPFLAGS=$old_CPPFLAGS
1585
PKG_CHECK_MODULES(FFMPEG_SWSCALE, [libswscale],
1587
[echo "no. trying img_convert"]
1589
[AC_CHECK_LIB(avcodec, img_convert,[have_imgconvert=yes])]
1592
if (test x"${have_swscale}" = x"yes") || (test x"${have_imgconvert}" = x"yes") ; then
1593
AC_DEFINE([HAVE_FFMPEG],,[Have FFMPEG av* libs available])
1594
FFMPEG_INCLUDES="$FFMPEG_AV_CFLAGS"
1595
GFXOUTPUT_DRIVERS="$GFXOUTPUT_DRIVERS ffmpegdrv.o ffmpeglib.o"
1597
if (test x"${have_swscale}" = x"yes") ; then
1598
AC_DEFINE([HAVE_FFMPEG_SWSCALE],,[Have FFMPEG swscale lib available])
1599
FFMPEG_INCLUDES="$FFMPEG_INCLUDES $FFMPEG_SWSCALE_CFLAGS"
1602
[echo "no. disabled."]
1605
AC_MSG_RESULT([not available])
1608
AC_MSG_RESULT([disabled])
1610
AC_SUBST(FFMPEG_INCLUDES)
1611
AC_SUBST(FFMPEG_LIBS)
1613
dnl ----- Apple QuickTime -----
1616
if test x"$enable_quicktime" = "xyes" -o x"$is_unix_macosx" = "xyes"; then
1618
dnl ---- Mac OS X -----
1619
if test x"$is_unix_macosx" = x"yes" ; then
1620
AC_CHECK_HEADER(QuickTime/QuickTime.h,,)
1621
if test x"$ac_cv_header_QuickTime_QuickTime_h" = "xyes" ; then
1622
AC_CHECK_HEADER(CoreVideo/CVPixelBuffer.h,,)
1623
if test x"$ac_cv_header_CoreVideo_CVPixelBuffer_h" = "xyes" ; then
1624
AC_MSG_CHECKING(whether we can link the QuickTime framework)
1626
LIBS="${LIBS} -framework QuickTime -framework CoreVideo"
1627
AC_TRY_LINK([#include <QuickTime/Movies.h>
1628
#include <CoreVideo/CVPixelBuffer.h>],
1629
[EnterMovies(); CVPixelBufferGetTypeID();],
1630
[AC_MSG_RESULT(yes);
1631
GFXOUTPUT_DRIVERS="$GFXOUTPUT_DRIVERS quicktimedrv.o"
1632
QUICKTIME_LIBS="-framework QuickTime -framework CoreVideo"
1633
AC_DEFINE(HAVE_QUICKTIME,,[Enable QuickTime support.])],
1634
[AC_MSG_RESULT(no)])
1639
dnl ----- Windows -----
1640
if test x"$is_win32" = x"yes" ; then
1645
AC_SUBST(QUICKTIME_INCLUDES)
1646
AC_SUBST(QUICKTIME_LIBS)
1648
dnl ----- Ethernet -----
1651
if test x"$is_dos" = "xyes" ; then
1652
if test x"$enable_ethernet" = "xyes"; then
1654
AC_CHECK_LIB(watt, gethostbyname,[ AC_DEFINE(DOS_TCP,,[Can we use the dos WATTCP library?])
1655
TFE_LIBS="-lwatt $TFE_LIBS";
1656
LIBS="-lwatt $LIBS"],,)
1658
AC_CHECK_LIB(pcap, pcap_open_live,[ AC_DEFINE(DOS_TFE,,[Can we use the dos PCAP library?])
1659
AC_DEFINE(HAVE_TFE,,[Support for The Final Ethernet])
1660
TFE_LIBS="arch/msdos/libpcap_nodma.a $TFE_LIBS";
1661
DOS_TFE_PCAP_LIB="libpcap_nodma.a";
1662
LIBS="-lpcap $LIBS"],,)
1664
AC_CHECK_LIB(net, libnet_write_link_layer,[ AC_DEFINE(HAVE_DOS_LIBNET,,[Can we use the dos NET library?])
1665
TFE_LIBS="-lnet $TFE_LIBS"],,)
1669
if test x"$is_win32" = "xno"; then
1670
if test x"$enable_ethernet" = "xyes"; then
1672
AC_CHECK_LIB(pcap, pcap_inject,[
1673
AC_DEFINE(HAVE_TFE,,[Support for The Final Ethernet])
1674
AC_DEFINE(HAVE_PCAP_INJECT,,[A libpcap version with pcap_inject is available])
1677
AC_CHECK_LIB(pcap, pcap_sendpacket,[
1678
AC_DEFINE(HAVE_TFE,,[Support for The Final Ethernet])
1679
AC_DEFINE(HAVE_PCAP_SENDPACKET,,[A libpcap version with pcap_sendpacket is available])
1684
AC_CHECK_LIB(pcap, pcap_open_live,[
1685
AC_CHECK_LIB(net, libnet_init,[
1686
AC_DEFINE(HAVE_TFE,,[Support for The Final Ethernet])
1687
AC_DEFINE(VICE_USE_LIBNET_1_1,,[Support for The Final Ethernet])
1688
TFE_LIBS="-lpcap `libnet-config --libs`"
1689
CFLAGS="$CFLAGS `libnet-config --defines`"
1693
AC_CHECK_LIB(pcap, pcap_open_live,[
1694
AC_CHECK_LIB(net, libnet_write_link_layer,[
1695
AC_DEFINE(HAVE_TFE,,[Support for The Final Ethernet])
1696
TFE_LIBS="-lpcap `libnet-config --libs`"
1697
CFLAGS="$CFLAGS `libnet-config --defines`"
1702
AC_SUBST(DOS_TFE_PCAP_LIB)
1705
dnl Check and setup SDL compilation.
1706
if test x"$with_sdlsound" = "xyes" -o x"$enable_sdlui" = "xyes"; then
1708
if test x"$enable_dingoo" = "xyes"; then
1709
SOUND_DRIVERS="$SOUND_DRIVERS soundsdl.o"
1710
AC_DEFINE(USE_SDL_AUDIO,,[Enable sdl sound support.])
1711
if test x"$enable_sdlui" = "xyes"; then
1712
AC_DEFINE(USE_SDLUI,,[Enable sdl ui support.])
1714
AC_DEFINE(HAVE_FULLSCREEN,,[Enable Fullscreen support.])
1715
elif test x"$is_unix_macosx" = "xyes"; then
1716
LIBS="$LIBS -lSDLmain -framework SDL -framework Cocoa -framework OpenGL -framework CoreVideo"
1717
CFLAGS="$CFLAGS -I/Library/Frameworks/SDL.framework/Headers -I/System/Library/Frameworks/OpenGL.framework/Headers"
1718
CXXFLAGS="$CXXFLAGS -I/Library/Frameworks/SDL.framework/Headers -I/System/Library/Frameworks/OpenGL.framework/Headers"
1719
SOUND_DRIVERS="$SOUND_DRIVERS soundsdl.o"
1720
AC_DEFINE(USE_SDL_AUDIO,,[Enable SDL sound support.])
1721
if test x"$enable_sdlui" = "xyes"; then
1722
AC_DEFINE(USE_SDLUI,,[Enable SDL UI support.])
1724
AC_DEFINE(HAVE_HWSCALE,,[Enable arbitrary window scaling])
1725
AC_DEFINE(HAVE_FULLSCREEN,,[Enable Fullscreen support.])
1726
AC_CHECK_FUNCS(SDL_NumJoysticks)
1727
elif test x"$host_os" = "xmingw32ce" -o x"$host_os" = "xcegcc"; then
1728
LIBS="$LIBS -lSDL -lwinsock"
1729
SOUND_DRIVERS="$SOUND_DRIVERS soundsdl.o"
1730
AC_DEFINE(USE_SDL_AUDIO,,[Enable SDL sound support.])
1731
if test x"$enable_sdlui" = "xyes"; then
1732
AC_DEFINE(USE_SDLUI,,[Enable SDL UI support.])
1734
AC_DEFINE(CEGCC_COMPILE,,[Enable cegcc support.])
1735
elif test x"$is_amiga" = "xyes"; then
1736
if test x"$enable_sdlui" = "xyes"; then
1737
AC_DEFINE(USE_SDLUI,,[Enable SDL UI support.])
1739
AC_CHECK_HEADER(inline/SDL.h,[SDL_AMIGA_INLINE=yes], [SDL_AMIGA_INLINE=no],)
1740
AC_CHECK_HEADER(ppcinline/powersdl.h,[POWERSDL_AMIGA_INLINE=yes], [POWERSDL_AMIGA_INLINE=no],)
1741
AC_CHECK_LIB(debug, kprintf, [LIBS="$LIBS -ldebug"])
1742
AC_CHECK_LIB(GL, AROSMesaCreateContext, [LIBS="$LIBS -lGL"])
1743
if test x"$SDL_AMIGA_INLINE" = "xyes"; then
1744
AC_DEFINE(SDL_AMIGA_INLINE,,[Enable amiga shared SDL library support.])
1745
AC_DEFINE(HAVE_SDL_NUMJOYSTICKS,, [Define to 1 if you have the `SDL_NumJoysticks' function.])
1746
elif test x"$POWERSDL_AMIGA_INLINE" = "xyes"; then
1747
AC_DEFINE(POWERSDL_AMIGA_INLINE,,[Enable morphos shared SDL library support.])
1748
AC_DEFINE(HAVE_SDL_NUMJOYSTICKS,, [Define to 1 if you have the `SDL_NumJoysticks' function.])
1750
AC_CHECK_LIB(SDL, SDL_SetVideoMode, [found_sdl_lib=yes], [found_sdl_lib=no])
1751
if test x"$found_sdl_lib" = "xno"; then
1752
AC_MSG_ERROR([static SDL lib missing])
1756
AC_CHECK_LIB(SDL, SDL_OpenAudio, [found_sdl_sound=yes], [found_sdl_sound=no])
1757
if test x"$found_sdl_sound" = "xyes"; then
1758
SOUND_DRIVERS="$SOUND_DRIVERS soundsdl.o";
1759
AC_DEFINE(USE_SDL_AUDIO,,[Enable SDL sound support.])
1761
AC_CHECK_FUNCS(SDL_NumJoysticks)
1763
AC_CHECK_HEADER(SDL/SDL.h, [found_sdl_h=yes], [found_sdl_h=no],)
1764
if test x"$found_sdl_h" = "xyes"; then
1765
AC_DEFINE(USE_SDL_PREFIX,,[Enable SDL prefix for header inclusion.])
1766
if test x"$found_sdl_sound" = "xyes"; then
1767
AC_CHECK_HEADER(SDL/SDL_audio.h, [], [AC_MSG_ERROR([SDL headers missing])],)
1770
AC_CHECK_HEADER(SDL.h, [found_sdl_h=yes], [found_sdl_h=no],)
1771
if test x"$found_sdl_h" = "xno"; then
1772
AC_MSG_ERROR([SDL headers missing])
1774
if test x"$found_sdl_sound" = "xyes"; then
1775
AC_CHECK_HEADER(SDL_audio.h, [], [AC_MSG_ERROR([SDL headers missing])],)
1780
dnl check for sdl-config
1781
AC_CHECK_TOOLS(sdl_config, sdl-config, no)
1784
old_cxxflags=$CXXFLAGS
1787
dnl if no sdl-config was found we assume that there are no extra CFLAGS
1788
dnl and that libSDL can be found in the default lib search path
1789
if test x"$sdl_config" = "xno"; then
1792
CFLAGS="$CFLAGS `$sdl_config --cflags`"
1793
CXXFLAGS="$CXXFLAGS `$sdl_config --cflags`"
1794
LIBS="$LIBS `$sdl_config --libs`"
1798
AC_CHECK_HEADERS(SDL/SDL_audio.h,[AC_CHECK_LIB(SDL, SDL_OpenAudio,
1799
[SOUND_DRIVERS="$SOUND_DRIVERS soundsdl.o";
1801
AC_DEFINE(USE_SDL_PREFIX,,[Enable SDL prefix for header inclusion.])
1802
AC_DEFINE(USE_SDL_AUDIO,,[Enable SDL sound support.])],
1803
[CFLAGS=$old_cflags; CXXFLAGS=$old_cxxflags; LIBS=$old_libs; break],$SOUND_LIBS $EXTRA_SDL_LIBS)],
1804
[CFLAGS=$old_cflags; CXXFLAGS=$old_cxxflags; LIBS=$old_libs; break])
1806
if test x"$ac_cv_lib_SDL_SDL_OpenAudio" != "xyes"; then
1807
unset ac_cv_lib_SDL_SDL_OpenAudio
1808
AC_CHECK_HEADERS(SDL_audio.h,[AC_CHECK_LIB(SDL, SDL_OpenAudio,
1809
[SOUND_DRIVERS="$SOUND_DRIVERS soundsdl.o";
1811
AC_DEFINE(USE_SDL_AUDIO,,[Enable SDL sound support.])],
1812
[CFLAGS=$old_cflags; CXXFLAGS=$old_cxxflags; LIBS=$old_libs; break],$SOUND_LIBS $EXTRA_SDL_LIBS)],
1813
[CFLAGS=$old_cflags; CXXFLAGS=$old_cxxflags; LIBS=$old_libs; break])
1816
if test x"$ac_cv_lib_SDL_SDL_OpenAudio" != "xyes"; then
1819
SOUND_LIBS="$SOUND_LIBS $EXTRA_SDL_LIBS"
1822
if test x"$enable_sdlui" = "xyes"; then
1823
AC_CHECK_HEADERS(SDL/SDL.h,[AC_CHECK_LIB(SDL, SDL_SetVideoMode,
1824
[use_sdl_prefix=yes;
1825
AC_DEFINE(USE_SDL_PREFIX,,[Enable SDL prefix for header inclusion.])
1826
AC_DEFINE(USE_SDLUI,,[Enable SDL UI support.])],
1827
[CFLAGS=$old_cflags; CXXFLAGS=$old_cxxflags; LIBS=$old_libs; break],$EXTRA_SDL_LIBS)],
1828
[CFLAGS=$old_cflags; CXXFLAGS=$old_cxxflags; LIBS=$old_libs; break])
1830
if test x"$ac_cv_lib_SDL_SDL_SetVideoMode" != "xyes"; then
1831
unset ac_cv_lib_SDL_SDL_SetVideoMode
1832
AC_CHECK_HEADERS(SDL.h,[AC_CHECK_LIB(SDL, SDL_SetVideoMode,
1834
AC_DEFINE(USE_SDLUI,,[Enable SDL UI support.])],
1835
[CFLAGS=$old_cflags; CXXFLAGS=$old_cxxflags; LIBS=$old_libs; break],$EXTRA_SDL_LIBS)],
1836
[CFLAGS=$old_cflags; CXXFLAGS=$old_cxxflags; LIBS=$old_libs; break])
1839
if test x"$ac_cv_lib_SDL_SDL_SetVideoMode" != "xyes"; then
1840
AC_MSG_ERROR([SDL headers and/or libraries missing])
1842
AC_DEFINE(HAVE_FULLSCREEN,,[Enable Fullscreen support.])
1845
if test x"$ac_cv_lib_SDL_SDL_OpenAudio" != "xyes"; then
1846
LIBS="$LIBS $EXTRA_SDL_LIBS"
1849
AC_CHECK_FUNCS(SDL_NumJoysticks)
1851
dnl check for opengl libs.
1852
AC_MSG_CHECKING(whether we can use the GL library)
1856
if test x"$use_sdl_prefix" = "xyes"; then
1857
AC_TRY_LINK([#include <SDL/SDL_opengl.h>],
1858
[glViewport(1,2,3,4)],
1859
[AC_MSG_RESULT(yes);
1860
have_opengl_lib=yes],
1864
AC_TRY_LINK([#include <SDL_opengl.h>],
1865
[glViewport(1,2,3,4)],
1866
[AC_MSG_RESULT(yes);
1867
have_opengl_lib=yes],
1872
if test x"$have_opengl_lib" != "xyes"; then
1873
AC_MSG_CHECKING(whether we can use the opengl32 library)
1875
LIBS="$LIBS -lopengl32"
1876
if test x"$use_sdl_prefix" = "xyes"; then
1877
AC_TRY_LINK([#include <SDL/SDL_opengl.h>],
1878
[glViewport(1,2,3,4)],
1879
[AC_MSG_RESULT(yes);
1880
have_opengl_lib=yes],
1884
AC_TRY_LINK([#include <SDL_opengl.h>],
1885
[glViewport(1,2,3,4)],
1886
[AC_MSG_RESULT(yes);
1887
have_opengl_lib=yes],
1893
if test x"$have_opengl_lib" = "xyes"; then
1894
AC_DEFINE(HAVE_HWSCALE,,[Enable arbitrary window scaling])
1897
dnl check for the SDL_main.h header
1898
if test x"$use_sdl_prefix" = "xyes"; then
1899
AC_CHECK_HEADERS(SDL/SDL_main.h)
1901
AC_CHECK_HEADERS(SDL_main.h)
1904
AC_MSG_CHECKING(whether we can use the SDLmain library)
1906
LIBS="$LIBS -lSDLmain -lSDL $EXTRA_SDL_LIBS"
1907
if test x"$use_sdl_prefix" = "xyes"; then
1908
AC_TRY_LINK([#include <SDL/SDL_main.h>
1909
int main(int argc, char *argv[])
1912
#define main something_else],
1914
[AC_MSG_RESULT(yes);
1919
AC_TRY_LINK([#include <SDL_main.h>
1920
int main(int argc, char *argv[])
1923
#define main something_else],
1925
[AC_MSG_RESULT(yes);
1931
if test x"$have_sdlmain" != "xyes"; then
1932
AC_MSG_CHECKING(whether we can use the SDLmain library when adding -lmingw32)
1934
LIBS="$LIBS -lmingw32 -lSDLmain -lSDL"
1935
if test x"$use_sdl_prefix" = "xyes"; then
1936
AC_TRY_LINK([#include <SDL/SDL_main.h>
1937
int main(int argc, char *argv[])
1940
#define main something_else],
1942
[AC_MSG_RESULT(yes);
1947
AC_TRY_LINK([#include <SDL_main.h>
1948
int main(int argc, char *argv[])
1951
#define main something_else],
1953
[AC_MSG_RESULT(yes);
1960
if test x"$have_sdlmain" = "xyes"; then
1961
AC_DEFINE(HAVE_SDLMAIN,,[Enable SDLmain replacement])
1964
AC_MSG_CHECKING(whether we can use directx sound)
1966
LIBS="$LIBS -ldsound"
1967
AC_TRY_LINK([#define DIRECTSOUND_VERSION 0x500
1968
#include <dsound.h>],
1969
[LPDIRECTSOUNDBUFFER buffer=NULL;
1970
IDirectSoundBuffer_Restore(buffer);],
1971
[AC_MSG_RESULT(yes);
1972
SOUND_DRIVERS="$SOUND_DRIVERS sounddx.o";
1973
SOUND_LIBS="$SOUND_LIBS -ldsound";
1974
AC_DEFINE(USE_DXSOUND,,[Enable directx sound support.])
1975
AC_DEFINE(HAVE_DSOUND_LIB, [], [dsound.lib or libdsound.a are present])],
1976
[AC_MSG_RESULT(no)])
1979
if test x"$is_unix_gp2x" = "xyes" -o x"$is_unix_wiz" = "xyes"; then
1980
LIBS="$LIBS -lpthread"
1986
dnl ----- Sound Drivers -----
1987
if test x"$is_unix" = "xyes"; then
1988
AC_CHECK_HEADERS(cwsid.h, AC_DEFINE(HAVE_CATWEASELMKIII,,
1989
[Support for Catweasel MKIII.]), )
1991
if test x"$with_pulse" != "xno"; then
1992
AC_CHECK_HEADERS(pulse/simple.h,[AC_CHECK_LIB(pulse-simple, pa_simple_new,
1993
[SOUND_DRIVERS="$SOUND_DRIVERS soundpulse.o";
1994
SOUND_LIBS="$SOUND_LIBS -lpulse-simple -lpulse";
1995
AC_DEFINE(USE_PULSE,,[Enable pulseaudio support.])],,$SOUND_LIBS)])
1998
if test x"$with_arts" = "xyes"; then
2001
CFLAGS="$CFLAGS `artsc-config --cflags`"
2002
LIBS="$LIBS `artsc-config --libs`"
2003
AC_CHECK_HEADERS(artsc.h,[AC_CHECK_LIB(artsc, arts_init,
2004
[SOUND_DRIVERS="$SOUND_DRIVERS soundarts.o"; break],
2005
[CFLAGS=$old_cflags; LIBS=$old_libs; with_arts=no; break],$SOUND_LIBS)],
2006
[CFLAGS=$old_cflags; LIBS=$old_libs; with_arts=no; break])
2009
if test x"$with_arts" = "xyes"; then
2010
AC_DEFINE(USE_ARTS,,[Enable aRts support.])
2013
if test x"$with_alsa" != "xno" -a x"$is_unix_gp2x" != "xyes" -a x"$is_unix_wiz" != "xyes"; then
2014
AC_CHECK_HEADERS(alsa/asoundlib.h,[AC_CHECK_LIB(asound, snd_pcm_open,
2015
[SOUND_DRIVERS="$SOUND_DRIVERS soundalsa.o";
2016
SOUND_LIBS="$SOUND_LIBS -lasound";
2017
AC_DEFINE(USE_ALSA,,[Enable alsa support.])],,$SOUND_LIBS)])
2018
AC_CHECK_LIB(asound, snd_pcm_avail,
2019
[AC_DEFINE(HAVE_SND_PCM_AVAIL,,[Use more accurate buffer fill reporting])])
2022
if test x"$with_oss" != "xno" -a x"$host_os" != "uwin"; then
2023
AC_CHECK_HEADERS(linux/soundcard.h machine/soundcard.h sys/soundcard.h soundcard.h,
2024
[SOUND_DRIVERS="$SOUND_DRIVERS sounduss.o";
2025
AC_DEFINE(USE_OSS,,[Enable oss support.])])
2026
AC_CHECK_LIB(ossaudio, _oss_ioctl,,,$SOUND_LIBS)
2029
AC_CHECK_HEADERS(dmedia/audio.h, [AC_CHECK_LIB(audio, ALseterrorhandler,
2030
[SOUND_DRIVERS="$SOUND_DRIVERS soundsgi.o";
2031
SOUND_LIBS="$SOUND_LIBS -laudio";
2032
AC_DEFINE(USE_DMEDIA,,[Enable sgi sound support.])],,$SOUND_LIBS)])
2034
AC_CHECK_HEADERS(sys/audioio.h,
2035
[SOUND_DRIVERS="$SOUND_DRIVERS soundsun.o"; break])
2039
AC_CHECK_HEADERS(sys/audio.h,
2040
[SOUND_DRIVERS="$SOUND_DRIVERS soundhpux.o"; break])
2046
AC_CHECK_HEADERS(UMS/UMSAudioDevice.h,[AC_CHECK_HEADERS(UMS/UMSBAUDDevice.h,
2047
[AC_CHECK_LIB(UMSobj, UMSAudioDevice_initialize,
2048
[SOUND_DRIVERS="$SOUND_DRIVERS soundaix.o";
2049
SOUND_LIBS="$SOUND_LIBS -lUMSobj";
2050
AC_DEFINE(USE_AIX_AUDIO,,[Enable aix sound support.])],,$SOUND_LIBS)])])
2053
if test x"$is_amiga" = "xyes" -a x"$enable_sdlui" != "xyes"; then
2054
AC_CHECK_HEADERS(devices/ahi.h,
2055
[SOUND_DRIVERS="$SOUND_DRIVERS soundahi.o"; break])
2059
if test x"$enable_lame" != "xno" ; then
2061
AC_CHECK_HEADER(lame/lame.h,,)
2063
dnl the header is available!
2064
if test "$ac_cv_header_lame_lame_h" != "no" ; then
2065
AC_MSG_CHECKING([for lame lib linking])
2066
if test x"$dynlib_support" = "xyes" -a x"$enable_static_lame" != "xyes" ; then
2068
SOUND_DRIVERS="$SOUND_DRIVERS soundmp3.o lamelib.o"
2069
AC_DEFINE(USE_LAMEMP3,,[Enable lamemp3 support.])
2070
AC_MSG_RESULT([dynlib])
2072
dnl try static linking
2073
AC_MSG_RESULT([trying static])
2074
AC_CHECK_LIB(mp3lame, lame_encode_buffer,[ADD_MPGDECODER=0],,)
2075
if test "$ac_cv_lib_mp3lame_lame_encode_buffer" = "no"; then
2076
unset ac_cv_lib_mp3lame_lame_encode_buffer
2077
AC_CHECK_LIB(mp3lame, lame_encode_buffer,[ADD_MPGDECODER=1],,[-lmpgdecoder])
2079
if test "$ac_cv_lib_mp3lame_lame_encode_buffer" != "no"; then
2080
SOUND_DRIVERS="$SOUND_DRIVERS soundmp3.o";
2081
SOUND_LIBS="$SOUND_LIBS -lmp3lame";
2082
if test "$ADD_MPGDECODER" = "1" ; then
2083
SOUND_LIBS="$SOUND_LIBS -lmpgdecoder";
2085
AC_DEFINE(USE_LAMEMP3,,[Enable lamemp3 support.])
2086
AC_DEFINE(HAVE_STATIC_LAME,,[Static linking for lame libs])
2093
AC_PATH_PROGS(FCCACHE, fc-cache, false)
2094
if test x"$FCCACHE" = "xfalse"; then
2095
AM_CONDITIONAL(HAVE_FC_CACHE, false)
2097
AM_CONDITIONAL(HAVE_FC_CACHE, true)
2100
if test x"$is_amigaos4" = "xyes"; then
2101
if test x"$enable_sdlui" != "xyes"; then
2102
AC_MSG_CHECKING(whether devices/timer.h defines TimeVal)
2103
AC_TRY_COMPILE([ #include <devices/timer.h> ],
2104
[ struct TimeVal djs; ],
2105
[ AC_DEFINE(AMIGA_OS4_ALT,,
2106
[Enable alternate OS4 includes.])
2107
AC_MSG_RESULT(yes) ], AC_MSG_RESULT(no))
2110
dnl for AmigaOS4 native resid needs to be configured without dependency tracking
2111
if test x"$cross_compiling" != "xyes"; then
2112
ac_configure_args="$ac_configure_args --disable-dependency-tracking"
2116
if test x"$is_dos" = "xyes"; then
2117
if test x"$with_midas" = "xyes"; then
2118
AC_CHECK_HEADERS(midasdll.h,
2119
[SOUND_DRIVERS="$SOUND_DRIVERS soundmidas.o"; break])
2121
AC_CHECK_HEADERS(allegro.h,
2122
[SOUND_DRIVERS="$SOUND_DRIVERS soundallegro.o"; break])
2126
dsound_header_no_lib="no"
2128
if test x"$is_win32" = "xyes"; then
2129
if test x"$enable_sdlui" != "xyes"; then
2130
SOUND_DRIVERS="$SOUND_DRIVERS soundwmm.o"
2131
AC_MSG_CHECKING(whether we can use directx sound)
2132
AC_CHECK_HEADER(dsound.h,
2133
[ AC_DEFINE(USE_DXSOUND,,[Enable directx sound support.]) ]
2134
[ SOUND_DRIVERS="$SOUND_DRIVERS sounddx.o" ]
2135
[ AC_MSG_CHECKING(for -ldsound) ]
2136
[ old_LIBS="$LIBS" ]
2137
[ LIBS="$LIBS -ldsound" ]
2140
[#define DIRECTSOUND_VERSION 0x500
2141
#include <dsound.h>],
2142
[LPDIRECTSOUNDBUFFER buffer=NULL;
2143
IDirectSoundBuffer_Restore(buffer);]
2146
[ AC_DEFINE(HAVE_DSOUND_LIB, [], [dsound.lib or libdsound.a are present]) ]
2147
[ AC_MSG_RESULT(yes) ]
2148
[ SOUND_LIBS="$SOUND_LIBS -ldsound" ],
2149
[ AC_MSG_RESULT(no) ]
2150
[ dsound_header_no_lib="yes" ]
2152
[ LIBS="$old_LIBS" ]
2155
if test x"$dsound_header_no_lib" == "xyes" -o x"$dinput_header_no_lib" == "xyes"; then
2156
AC_MSG_CHECKING(if CoInitialize can be linked)
2157
LIBS="$LIBS -lole32"
2160
[#include <objbase.h>],
2161
[CoInitialize(NULL);]
2164
[ AC_MSG_RESULT(yes) ],
2165
[ AC_MSG_ERROR(no) ]
2169
AC_PATH_TOOL(WINDRES, windres, windres)
2170
AC_PATH_PROGS(WRC, wrc , windres)
2171
if test x"$WRC" != "xwindres"; then
2172
WRC_VERSION=`($WRC --version) 2>/dev/null`
2173
case "$WRC_VERSION" in
2179
AC_MSG_WARN([WRC found, but is not the Wine Resource Compiler])
2184
AC_MSG_WARN([WRC not found, WRC is required for propper internationalization support])
2187
dnl if windres is used, test for propper ISO codepage support
2188
if test x"$WRC" = x"$WINDRES"; then
2189
AC_MSG_CHECKING(if windres supports iso codepages)
2190
rm -f test.rc test.res
2191
echo >test.rc "#pragma code_page(29852)"
2192
echo >>test.rc "STRINGTABLE"
2193
echo >>test.rc "BEGIN"
2194
echo >>test.rc "1, \"test\""
2195
echo >>test.rc "END"
2196
$WINDRES test.rc -o test.res 2>/dev/null
2197
if test -e "test.res"; then
2200
AC_DEFINE(WINDRES_CP_IGNORE,,[Have windres ignore code page pragmas])
2203
rm -f test.rc test.res
2206
SOUND_DRIVERS="$SOUND_DRIVERS soundwmm.o"
2210
if test x"$is_beos" = "xyes" -o x"$is_beos_x11" = "xyes"; then
2211
SOUND_DRIVERS="$SOUND_DRIVERS soundbeos.o"
2214
if test x"$is_unix_macosx" = "xyes" -a x"$enable_sdlui" != "xyes"; then
2216
dnl --- check for CoreAudio ---
2217
AC_CHECK_HEADER(CoreAudio/CoreAudio.h,,)
2218
if test x"$ac_cv_header_CoreAudio_CoreAudio_h" = "xyes" ; then
2219
AC_CHECK_HEADER(AudioToolbox/AudioToolbox.h,,)
2220
if test x"$ac_cv_header_AudioToolbox_AudioToolbox_h" = "xyes" ; then
2221
AC_MSG_CHECKING(whether we can link the CoreAudio framework)
2223
LIBS="${LIBS} -framework CoreAudio -framework AudioToolbox"
2224
AC_TRY_LINK([#include <CoreAudio/CoreAudio.h>],
2225
[AudioDeviceStart(0,0);],
2226
[AC_MSG_RESULT(yes);
2227
SOUND_DRIVERS="$SOUND_DRIVERS soundcoreaudio.o";
2228
SOUND_LIBS="$SOUND_LIBS -framework CoreAudio -framework AudioToolbox";
2229
AC_DEFINE(USE_COREAUDIO,,[Enable CoreAudio support.])],
2230
[AC_MSG_RESULT(no)])
2233
AC_CHECK_HEADER(AudioUnit/AudioUnit.h,,)
2234
if test x"$ac_cv_header_AudioUnit_AudioUnit_h" = "xyes" ; then
2235
AC_MSG_CHECKING(whether we can link the AudioUnit framework)
2237
LIBS="${LIBS} -framework AudioUnit"
2238
AC_TRY_LINK([#include <AudioUnit/AudioUnit.h>],
2239
[AudioOutputUnitStart(NULL);],
2240
[AC_MSG_RESULT(yes);
2241
SOUND_LIBS="$SOUND_LIBS -framework AudioUnit";
2242
AC_DEFINE(HAVE_AUDIO_UNIT,,[Enable AudioUnit support.])],
2243
[AC_MSG_RESULT(no)])
2249
dnl --- check for CoreMIDI ---
2250
if test x"$enable_midi" != "xno"; then
2251
AC_MSG_CHECKING(whether we can link the CoreMIDI framework)
2253
LIBS="$LIBS -framework CoreMidi -framework CoreServices"
2254
AC_TRY_LINK([#include <CoreMIDI/MIDIServices.h>],
2255
[MIDIGetNumberOfDevices()],
2256
[AC_MSG_RESULT(yes);
2257
AC_DEFINE(HAVE_MIDI,,[Enable MIDI emulation.])],
2263
AC_SUBST(SOUND_DRIVERS)
2264
AC_SUBST(SOUND_LIBS)
2266
dnl Check for ParSID support
2267
if test x"$is_unix" = "xyes" -a x"$is_unix_gp2x" != "xyes" -a x"$is_unix_wiz" != "xyes"; then
2269
if test x"$enable_parsid" = "xyes"; then
2270
dnl Check for needed parallel port io headers
2272
LIBIEEE1284_HEADERS_PRESENT=yes
2273
QNX_MMAN_HEADERS_PRESENT=yes
2274
BSD_SET_IOPERM_HEADERS_PRESENT=yes
2277
AC_CHECK_HEADERS(ieee1284.h,,[LIBIEEE1284_HEADERS_PRESENT=no],)
2278
AC_CHECK_HEADERS(sys/mman.h hw/inout.h,,[QNX_MMAN_HEADERS_PRESENT=no],)
2279
AC_CHECK_HEADERS(machine/sysarch.h,,[BSD_SET_IOPERM_HEADERS_PRESENT=no],)
2280
AC_CHECK_HEADERS(unistd.h sys/io.h machine/pio.h)
2285
AC_CHECK_HEADERS(machine/cpufunc.h)
2289
if test x"$LIBIEEE1284_HEADERS_PRESENT" = "xyes"; then
2290
AC_CHECK_LIB(ieee1284, ieee1284_find_ports,[LIBS="-lieee1284 $LIBS"; PARSID_SUPPORT=yes],,)
2291
if test x"$PARSID_SUPPORT" = "xyes"; then
2292
AC_DEFINE(HAVE_LIBIEEE1284,,[Define to 1 if you have the `ieee1284' library (-lieee1284).])
2296
if test x"$PARSID_SUPPORT" = "xno"; then
2297
if test x"$QNX_MMAN_HEADERS_PRESENT" = "xyes"; then
2298
QNX_MMAN_FUNCS_PRESENT=yes
2299
AC_CHECK_FUNCS(mmap_device_io in8 out8,,[QNX_MMAN_FUNCS_PRESENT=no])
2300
if test x"$QNX_MMAN_FUNCS_PRESENT" = "xyes"; then
2306
if test x"$PARSID_SUPPORT" = "xno"; then
2307
if test x"$BSD_SET_IOPERM_HEADERS_PRESENT" = "xyes"; then
2308
AC_CHECK_LIB(amd64, amd64_set_ioperm,[LIBS="-lamd64 $LIBS"; PARSID_SUPPORT=yes],,)
2309
if test x"$PARSID_SUPPORT" = "xyes"; then
2310
AC_DEFINE(HAVE_LIBAMD64,,[Define to 1 if you have the `amd64' library (-lamd64).])
2315
if test x"$PARSID_SUPPORT" = "xno"; then
2316
if test x"$BSD_SET_IOPERM_HEADERS_PRESENT" = "xyes"; then
2317
AC_CHECK_LIB(i386, i386_get_ioperm,[LIBS="-li386 $LIBS"],,)
2318
AC_CHECK_FUNCS(i386_set_ioperm,[PARSID_SUPPORT=yes],)
2322
if test x"$PARSID_SUPPORT" = "xno"; then
2323
AC_CHECK_FUNCS(ioperm,[PARSID_SUPPORT=yes],)
2326
if test x"$PARSID_SUPPORT" = "xyes"; then
2327
AC_DEFINE(HAVE_PARSID,,[Support for ParSID.])
2332
dnl Check for library functions
2333
if test x"$is_dos" = "xno" -a x"$is_win32" = "xno"; then
2338
AC_CHECK_TYPES(u_short)
2339
AC_CHECK_TYPES(socklen_t, [], [], [[#include <sys/socket.h>]])
2340
dnl some platforms have some of the functions in libbsd,
2341
dnl so we check it out first.
2342
AC_CHECK_LIB(bsd,gettimeofday,,,$LIBS)
2343
AC_CHECK_FUNCS(gettimeofday memmove atexit strerror strcasecmp strncasecmp dirname mkstemp swab getcwd getpwuid rewinddir)
2344
AC_CHECK_FUNCS(strdup, [have_strdup_func=yes], [have_strdup_func=no])
2346
if test x"$have_strdup_func" = "xno"; then
2347
AC_MSG_CHECKING(whether strdup is defined as a macro)
2348
AC_TRY_LINK([#include <string.h>],
2349
[char *something = strdup("something")],
2350
[AC_MSG_RESULT(yes); have_strdup_func=yes],
2351
[AC_MSG_RESULT(no); have_strdup_func=no])
2354
if test x"$have_strdup_func" = "xyes"; then
2355
AC_DEFINE(HAVE_STRDUP,,[Define to 1 if you have the `strdup' function.])
2360
dnl if usleep is not defined, compile our own version for it (usleep.o)
2361
if test x"$is_win32" = "xno" -a x"$is_amiga_aros" = "xno"; then
2362
AC_REPLACE_FUNCS(usleep)
2365
AC_CHECK_FUNC(nanosleep,
2366
[ AC_DEFINE(HAVE_NANOSLEEP,,[Use nanosleep instead of usleep]) ])
2373
dnl ----- Readline -----
2374
dnl Check whether we have GNU readline. If not, use our replacement.
2375
dnl The user can force us to use the replacement with `--without-readline'.
2378
if test x"$is_unix_x11" = "xyes" -a x"$enable_sdlui" != "xyes"; then
2379
if test x"$with_readline" != "xno" ; then
2381
unset ac_cv_lib_readline_readline
2383
AC_CHECK_LIB(readline, readline,
2384
[ READLINE="" READLINE_LIBS="-lreadline"],
2387
if test "$ac_cv_lib_readline_readline" = "no"; then
2388
unset ac_cv_lib_readline_readline
2389
AC_CHECK_LIB(readline, readline,
2390
[ READLINE="" READLINE_LIBS="-lreadline -ltermcap"],
2394
if test "$ac_cv_lib_readline_readline" = "no"; then
2395
unset ac_cv_lib_readline_readline
2396
AC_CHECK_LIB(readline, readline,
2397
[ READLINE="" READLINE_LIBS="-lreadline -lncurses"],
2401
if test "$ac_cv_lib_readline_readline" = "no"; then
2402
unset ac_cv_lib_readline_readline
2403
AC_CHECK_LIB(readline, readline,
2404
[ READLINE="" READLINE_LIBS="-lreadline -lcurses"],
2405
[ READLINE="\$(top_builddir)/src/arch/unix/readline/libreadline.a" ],
2409
if test "$ac_cv_lib_readline_readline" = "yes"; then
2410
AC_CHECK_LIB(readline, rl_readline_name,
2411
[ AC_DEFINE(HAVE_RLNAME,,
2412
[Does the `readline' library support `rl_readline_name'?]) ],,)
2416
READLINE="\$(top_builddir)/src/arch/unix/readline/libreadline.a"
2418
dnl ----- editline support for Cocoa -----
2419
elif test x"$enable_editline" != "xno" -a x"$with_cocoa" = "xyes" ; then
2421
AC_CHECK_HEADER(histedit.h,
2422
[AC_MSG_CHECKING(whether we can link the editline library)
2424
LIBS="${LIBS} -ledit"
2425
AC_TRY_LINK([#include <histedit.h>],
2427
[AC_MSG_RESULT(yes);
2428
AC_DEFINE(HAVE_EDITLINE,,[Have editline library])
2429
EDITLINE_LIBS="-ledit"],
2430
[AC_MSG_RESULT(no)])
2436
AM_CONDITIONAL(NEED_READLINE, test x"$READLINE" != "x")
2438
AC_SUBST(READLINE_LIBS)
2439
AC_SUBST(EDITLINE_LIBS)
2441
dnl check Amiga graphics support
2442
if test x"$is_amiga" = "xyes" -a x"$enable_sdlui" != "xyes"; then
2445
if test x"$with_picasso96" != "xyes"; then
2446
AC_CHECK_HEADERS(proto/cybergraphics.h,[cgx_present=yes],,)
2449
if test x"$cgx_present" = "xno"; then
2450
AC_CHECK_HEADERS(proto/Picasso96.h,[p96_present=yes],,)
2451
if test x"$p96_present" = "xno"; then
2452
AC_CHECK_HEADERS(proto/Picasso96API.h,[p96_present=yes],,)
2453
if test x"$p96_present" = "xno"; then
2454
AC_MSG_ERROR([No CGX or P96 headers found])
2461
dnl Configure graphics output drivers
2465
if test x"$with_png" != "xno" ; then
2466
dnl Check for the PNG library.
2467
AC_CHECK_HEADER(png.h,,)
2468
if test x"$ac_cv_header_png_h" = "xyes" ; then
2469
unset ac_cv_lib_png_png_sig_cmp
2470
AC_CHECK_LIB(png, png_sig_cmp,
2471
[ GFXOUTPUT_LIBS="-lpng $GFXOUTPUT_LIBS";
2472
GFXOUTPUT_DRIVERS="$GFXOUTPUT_DRIVERS pngdrv.o";
2473
AC_DEFINE(HAVE_PNG,,[Can we use the PNG library?]) ],,)
2474
if test "$ac_cv_lib_png_png_sig_cmp" = "no"; then
2475
unset ac_cv_lib_png_png_sig_cmp
2476
AC_CHECK_LIB(png, png_sig_cmp,
2477
[ GFXOUTPUT_LIBS="-lpng -lz $GFXOUTPUT_LIBS";
2478
GFXOUTPUT_DRIVERS="$GFXOUTPUT_DRIVERS pngdrv.o";
2479
AC_DEFINE(HAVE_PNG,,
2480
[Can we use the PNG library?]) ],,"-lz")
2485
dnl Check for the GIF or UNGIF library.
2486
AC_CHECK_HEADER(gif_lib.h,,)
2487
if test x"$ac_cv_header_gif_lib_h" = "xyes" ; then
2488
AC_CHECK_LIB(ungif, EGifPutLine, [
2489
GFXOUTPUT_LIBS="-lungif $GFXOUTPUT_LIBS";
2490
GFXOUTPUT_DRIVERS="$GFXOUTPUT_DRIVERS gifdrv.o";
2491
AC_DEFINE(HAVE_GIF,,[Can we use the GIF or UNGIF library?]) ],,)
2492
if test "$ac_cv_lib_ungif_EGifPutLine" = "no"; then
2493
AC_CHECK_LIB(gif, EGifPutLine, [
2494
GFXOUTPUT_LIBS="-lgif $GFXOUTPUT_LIBS";
2495
GFXOUTPUT_DRIVERS="$GFXOUTPUT_DRIVERS gifdrv.o";
2496
AC_DEFINE(HAVE_GIF,,[Can we use the GIF or UNGIF library?]) ],,)
2500
dnl Check for the JPEG library.
2501
AC_CHECK_HEADER(jpeglib.h,,)
2502
if test x"$ac_cv_header_jpeglib_h" = "xyes" ; then
2503
AC_CHECK_LIB(jpeg, jpeg_CreateCompress, [
2504
GFXOUTPUT_LIBS="-ljpeg $GFXOUTPUT_LIBS";
2505
GFXOUTPUT_DRIVERS="$GFXOUTPUT_DRIVERS jpegdrv.o";
2506
AC_DEFINE(HAVE_JPEG,,[Can we use the JPEG library?]) ],,)
2510
AC_SUBST(GFXOUTPUT_DRIVERS)
2511
AC_SUBST(GFXOUTPUT_LIBS)
2514
dnl Check for libraries and header files
2515
if test x"$is_unix_x11" = "xyes" -a x"$enable_sdlui" != "xyes"; then
2522
have_xvideo_header="no"
2523
have_xvideo_lib="no"
2525
if [[ x"${enable_gnomeui}" = "xyes" ]] ; then
2529
PKG_CHECK_MODULES(GTK, [gtk+-2.0])
2531
dnl PKG_CHECK_MODULES(VTE, [vte-2.90], have_vte=yes, AC_MSG_RESULT(no))
2532
dnl if test x"$have_vte" = "xno"; then
2533
PKG_CHECK_MODULES(VTE, [vte])
2536
PKG_CHECK_MODULES(GTKGL, [gtkglext-1.0],
2537
AC_DEFINE(HAVE_HWSCALE,,[Enable arbitrary window scaling]),
2540
X_LIBS="$GTK_LIBS $GTKGL_LIBS $X_LIBS $VTE_LIBS"
2541
LINK_X_LIBS="$GTK_LIBS $GTKGL_LIBS $LINK_X_LIBS $VTE_LIBS"
2543
if test "$ac_cv_lib_readline_readline" = "no"; then
2544
AC_MSG_ERROR(The Xaw port needs Readline)
2546
LINK_X_LIBS=${READLINE_LIBS} ${LINK_X_LIBS}
2547
AC_DEFINE(USE_COLOR_MANAGEMENT,,[Enable new color management code.])
2549
AC_CHECK_LIB(w, wslen,[ X_LIBS="-lw $X_LIBS";
2550
LINK_X_LIBS="-lw $LINK_X_LIBS"],,$X_LIBS)
2552
AC_CHECK_LIB(intl, dgettext,[ X_LIBS="-lintl $X_LIBS";
2553
LINK_X_LIBS="-lintl $LINK_X_LIBS"],,$X_LIBS)
2555
dnl instead of assuming that libsocket needs libnsl, we
2556
dnl will check the existance of libnsl first.
2557
AC_CHECK_LIB(nsl, gethostbyname,[ X_LIBS="-lnsl $X_LIBS";
2558
LINK_X_LIBS="-lnsl $LINK_X_LIBS"],,$X_LIBS)
2559
AC_CHECK_LIB(socket, gethostbyname,[ X_LIBS="-lsocket $X_LIBS";
2560
LINK_X_LIBS="-lsocket $LINK_X_LIBS"],,$X_LIBS)
2561
AC_CHECK_LIB(bsd, gethostbyname,[ X_LIBS="-lbsd $X_LIBS";
2562
LINK_X_LIBS="-lbsd $LINK_X_LIBS"],,$X_LIBS)
2563
if test x"$ac_cv_lib_ICE_IceConnectionNumber" != "xyes"; then
2564
unset ac_cv_lib_ICE_IceConnectionNumber
2566
AC_CHECK_LIB(ICE, IceConnectionNumber,[ X_LIBS="-lICE $X_LIBS";
2567
LINK_X_LIBS="-lICE $LINK_X_LIBS"],,$X_LIBS)
2568
AC_CHECK_LIB(SM, SmFreeProperty,[ X_LIBS="-lSM $X_LIBS";
2569
LINK_X_LIBS="-lSM $LINK_X_LIBS"],,$X_LIBS)
2571
dnl This is necessary because CPP tests use `CPPFLAGS' instead.
2572
dnl FIXME: Are we sure `AC_PATH_XTRA' will always put only X11
2573
dnl include paths in? Let's hope so.
2574
CPPFLAGS="$CPPFLAGS $X_CFLAGS"
2578
AC_CHECK_LIB(X11, XCreateWindow,
2579
[ X_LIBS="-lX11 $X_LIBS";
2580
LINK_X_LIBS="-lX11 $LINK_X_LIBS"],,$X_LIBS)
2582
if test x"$ac_cv_lib_X11_XCreateWindow" != "xyes"; then
2583
unset ac_cv_lib_X11_XCreateWindow
2584
AC_CHECK_LIB(X11, XCreateWindow,
2585
[ X_LIBS="-lX11 -lXext $X_LIBS";
2586
LINK_X_LIBS="-lX11 -lXext $LINK_X_LIBS"],
2587
[ MISSING_X_LIBS="$MISSING_X_LIBS X11" ],$X_LIBS -lXext)
2590
AC_CHECK_LIB(Xext, XQueryExtension,
2591
[ X_LIBS="-lXext $X_LIBS";
2592
LINK_X_LIBS="-lXext $LINK_X_LIBS"],,$X_LIBS)
2594
dnl the solution to the X_ShmAttach prototype split can be much simpler
2595
dnl without involving the pkgconfig requirement, relying on pkgconfig
2596
dnl for simple header checks could lead to the 'problem' not being 'caught'
2597
dnl if pkgconfig is not installed.
2599
dnl since xext 7.1 and up have the shmproto.h file and lower versions
2600
dnl don't have the file we just check for the header and set the define
2601
dnl when the header is present.
2603
AC_CHECK_HEADER(X11/extensions/shmproto.h,
2604
[ AC_DEFINE(HAVE_X11_EXTENSIONS_SHMPROTO_H,,[Use new XShm header]) ]
2605
,,[#include <X11/Xlibint.h>])
2607
AC_MSG_CHECKING(for X11/extensions/Xvlib.h)
2608
AC_TRY_LINK([#include <X11/Xlib.h>
2609
#include <X11/extensions/Xvlib.h>],
2611
[AC_MSG_RESULT(yes); have_xvideo_header="yes"],
2612
[AC_MSG_RESULT(no); have_xvideo_header="no"])
2614
AC_CHECK_LIB(Xv, XvQueryExtension,
2615
[ X_LIBS="-lXv $X_LIBS";
2616
LINK_X_LIBS="-lXv $LINK_X_LIBS";
2617
have_xvideo_lib="yes" ],,$X_LIBS)
2619
if test x"$have_xvideo_header" != "xno" -a x"$have_xvideo_lib" != "xno"; then
2620
AC_DEFINE(HAVE_XVIDEO,,[Enable XVideo support.])
2621
AC_DEFINE(HAVE_HWSCALE,,[Enable arbitrary window scaling])
2624
AC_CHECK_LIB(Xt, XtToolkitInitialize,
2625
[ X_LIBS="-lXt $X_LIBS";
2626
LINK_X_LIBS="-lXt $LINK_X_LIBS"],
2627
[ MISSING_X_LIBS="$MISSING_X_LIBS Xt" ],$X_LIBS)
2629
AC_CHECK_LIB(Xmu, XInternAtom,
2630
[ X_LIBS="-lXmu $X_LIBS";
2631
LINK_X_LIBS="-lXmu $LINK_X_LIBS"],
2632
[ MISSING_X_LIBS="$MISSING_X_LIBS Xmu" ],$X_LIBS)
2634
dnl check for Xpm, on some systems Xpm is required for correct Xaw usage.
2635
AC_CHECK_LIB(Xpm, XpmCreatePixmapFromData,
2636
[ X_LIBS="-lXpm $X_LIBS";
2637
LINK_X_LIBS="-lXpm $LINK_X_LIBS";
2638
AC_DEFINE(HAVE_LIBXPM,,[Is libXpm available?]) ],,$X_LIBS)
2640
dnl Check for Xaw. Use Xaw3d if requested.
2641
if test x"$with_xaw3d" != "xyes" ; then
2642
AC_CHECK_LIB(Xaw, XawFormDoLayout,
2643
[ X_LIBS="-lXaw $X_LIBS";
2644
LINK_X_LIBS="-lXaw $LINK_X_LIBS"],
2645
[ MISSING_X_LIBS="$MISSING_X_LIBS Xaw" ],
2646
$X_LIBS $X_PRE_LIBS)
2648
AC_CHECK_LIB(Xaw3d, XawFormDoLayout,
2649
[ X_LIBS="-lXaw3d $X_LIBS";
2650
LINK_X_LIBS="-lXaw3d $LINK_X_LIBS"],
2651
[ MISSING_X_LIBS="$MISSING_X_LIBS Xaw3d" ],
2652
$X_LIBS $X_PRE_LIBS)
2655
AC_CHECK_HEADER(X11/extensions/XShm.h,,,[#include <X11/Xlib.h>])
2656
if test x"$ac_cv_header_X11_extensions_XShm_h" = "xyes" ; then
2657
AC_CHECK_LIB(Xext, XShmAttach,
2658
[ AC_DEFINE(USE_MITSHM,,
2659
[Enable MITSHM extensions.]) ],,$X_LIBS)
2662
if test x"$MISSING_X_LIBS" != "x"; then
2663
AC_MSG_ERROR([The following important X11 libraries were not found: $MISSING_X_LIBS])
2666
AC_CHECK_HEADERS(X11/Sunkeysym.h X11/xpm.h xpm.h)
2669
AC_CHECK_HEADER(GL/glx.h,,,[#include <GL/gl.h>])
2670
if test x"$ac_cv_header_GL_glx_h" = "xyes" ; then
2671
AC_CHECK_LIB(GL, glXWaitVideoSyncSGI,
2672
[ X_LIBS="-lGL $X_LIBS";
2673
LINK_X_LIBS="-lGL $LINK_X_LIBS";
2674
VICE_SYNC="openGL_sync.o $VICE_SYNC";
2675
AC_DEFINE(USE_XF86_EXTENSIONS,,[Enable XF86 extensions.])
2676
AC_DEFINE(HAVE_OPENGL_SYNC,,
2677
[Enable openGL synchronization])],,$X_LIBS)
2681
dnl Check for XFree86 header and library extensions.
2682
FULLSCREEN_DRIVERS=""
2684
if test x"$enable_fullscreen" != "xno"; then
2686
dnl currently fullscreen gnomeui is done with X11 dependent libs,
2687
dnl so check for X11
2688
if test x"$enable_gnomeui" = "xyes"; then
2689
AC_CHECK_LIB(X11, XCreateWindow,
2690
[ X_LIBS="-lX11 $X_LIBS";
2691
LINK_X_LIBS="-lX11 $LINK_X_LIBS"],,$X_LIBS)
2693
AC_CHECK_HEADER(X11/extensions/xf86vmode.h,,,[#include <X11/Xlib.h>])
2694
if test x"$ac_cv_header_X11_extensions_xf86vmode_h" = "xyes" ; then
2695
AC_CHECK_LIB(Xxf86vm, XF86VidModeQueryVersion,
2696
[ X_LIBS="-lXxf86vm $X_LIBS";
2697
LINK_X_LIBS="-lXxf86vm $LINK_X_LIBS";
2698
FULLSCREEN_DRIVERS="$FULLSCREEN_DRIVERS vidmode.o";
2699
AC_DEFINE(USE_XF86_VIDMODE_EXT,,
2700
[Enable XF86 VidMode extensions.])
2701
AC_DEFINE(HAVE_FULLSCREEN,,[Enable Fullscreen support.])
2702
AC_DEFINE(USE_XF86_EXTENSIONS,,
2703
[Enable XF86 extensions.])],,$X_LIBS)
2705
AC_CHECK_HEADER(X11/extensions/Xrandr.h,,,[#include <X11/Xlib.h>])
2706
if test x"$ac_cv_header_X11_extensions_Xrandr_h" = "xyes" ; then
2707
AC_CHECK_LIB(Xrandr, XRRConfigCurrentRate,
2708
[ X_LIBS="-lXrandr $X_LIBS";
2709
LINK_X_LIBS="-lXrandr $LINK_X_LIBS";
2710
FULLSCREEN_DRIVERS="$FULLSCREEN_DRIVERS xrandr.o";
2711
AC_DEFINE(USE_XF86_EXTENSIONS,,[Enable XF86 extensions.])
2712
AC_DEFINE(HAVE_FULLSCREEN,,[Enable Fullscreen support.])
2713
AC_DEFINE(HAVE_XRANDR,,
2714
[Enable XRandR extension.])],,$X_LIBS)
2718
X_LIBS="$PATH_X_LIBS $LINK_X_LIBS"
2719
AC_SUBST(FULLSCREEN_DRIVERS)
2722
LIBS="$LIBS $X_LIBS"
2723
AC_CHECK_FUNCS(_XlcConvert _XlcCurrentLC _XlcOpenConverter _XlcCloseConverter,,[xlc_funcs_present=no],)
2725
if test x"$xlc_funcs_present" != "xno"; then
2726
AC_DEFINE(XLC_FUNCS_PRESENT,,[Enable _Xlc_* functions.])
2729
elif test x"$is_dos" = "xyes"; then
2731
dnl On MS-DOS, we already know what we want.
2733
if test x"$enable_sdlui" = "xyes"; then
2734
LIBS="$LIBS $LIBMIDAS"
2736
LIBS="$LIBS -lalleg $LIBMIDAS"
2740
elif test x"$is_amiga" = "xyes"; then
2742
dnl On Amiga, we already know what we want.
2743
if test x"$is_amiga_aros" != "xyes"; then
2744
if test x"$host_os" != "xmorphos" -a x"$host_os" != "xwarpos" -a x"$host_os" != "xpowerup"; then
2748
if test x"$enable_sdlui" != "xyes"; then
2754
if test x"$enable_sdlui" != "xyes"; then
2755
AC_DEFINE(HAS_TRANSLATION,,[Enable internationalization support])
2758
elif test x"$is_beos" = "xyes"; then
2760
dnl On BEOS, we already know what we want.
2762
LIBS="$LIBS -lbe -ltracker -ldevice -lgame"
2765
elif test x"$is_unix_gp2x" = "xyes" -o x"$is_unix_wiz" = "xyes"; then
2767
dnl on GP2X (and WIZ) we need static libs.
2769
LDFLAGS="$LDFLAGS -static"
2770
LIBS="$LIBS -lpthread"
2773
elif test x"$is_win32" = "xyes" -a x"$enable_sdlui" != "xyes"; then
2775
dnl On Windows, we already know what we want.
2777
if test x"$host_cpu" = "xx86_64" -o x"$host_cpu" = "xamd64"; then
2778
LIBS="$LIBS -lkernel32 -luser32 -lgdi32 -lwinmm -lcomdlg32 -lcomctl32 -lws2_32 -lversion"
2780
LIBS="$LIBS -lkernel32 -luser32 -lgdi32 -lwinmm -lcomdlg32 -lcomctl32 -lwsock32 -lversion"
2783
AC_CHECK_HEADER(d3d9.h,
2784
[ AC_DEFINE(HAVE_D3D9_H,,[Support for DirectX9.]) ],)
2785
AC_CHECK_LIB(dxguid, GUID_SysMouse,[LIBS="$LIBS -ldxguid";
2786
AC_DEFINE(HAVE_GUIDLIB,,
2787
[Is the GUID lib of DX SDK present?])],,$LIBS)
2789
AC_MSG_CHECKING([whether DWORD is defined as unsigned long or unsigned int in the Mingw32 headers])
2790
AC_TRY_COMPILE([#include <windows.h>
2792
unsigned long test; ],
2794
[ AC_DEFINE(DWORD_IS_LONG,,
2795
[Is DWORD defined as long or int in the Windows header files?])
2796
AC_MSG_RESULT(unsigned long) ], AC_MSG_RESULT(unsigned int))
2798
vsid_LDFLAGS="-mwindows"
2799
x64_LDFLAGS="-mwindows"
2800
x128_LDFLAGS="-mwindows"
2801
xvic_LDFLAGS="-mwindows"
2802
xpet_LDFLAGS="-mwindows"
2803
xplus4_LDFLAGS="-mwindows"
2804
xcbm2_LDFLAGS="-mwindows"
2806
if test x"$CC" != "xowcc"; then
2807
VSID_WINRES="\$(top_builddir)/src/arch/win32/resvsid.o"
2808
X64_WINRES="\$(top_builddir)/src/arch/win32/resc64.o"
2809
X64DTV_WINRES="\$(top_builddir)/src/arch/win32/resc64dtv.o"
2810
X128_WINRES="\$(top_builddir)/src/arch/win32/resc128.o"
2811
XVIC_WINRES="\$(top_builddir)/src/arch/win32/resvic20.o"
2812
XPET_WINRES="\$(top_builddir)/src/arch/win32/respet.o"
2813
XPLUS4_WINRES="\$(top_builddir)/src/arch/win32/resplus4.o"
2814
XCBM2_WINRES="\$(top_builddir)/src/arch/win32/rescbm2.o"
2815
XCBM5X0_WINRES="\$(top_builddir)/src/arch/win32/rescbm5x0.o"
2820
if test -z "$WINDRES" ; then
2826
AC_DEFINE(HAS_TRANSLATION,,[Enable internationalization support])
2829
dnl CBM4Linux/OpenCBM
2830
AC_MSG_CHECKING([for OpenCBM support])
2831
if test x"$enable_realdevice" != "xno"; then
2832
if test x"$host_os" = "xcygwin32" -o x"$host_os" = "xcygwin" -o x"$host_os" = "xmingw32" -o x"$host_os" = "xmingw32msvc"; then
2833
AC_DEFINE(HAVE_OPENCBM,,[Support for OpenCBM (former CBM4Linux).])
2834
AM_CONDITIONAL(HAVE_REALDEVICE, true)
2835
AC_MSG_RESULT([yes])
2837
if test x"$dynlib_support" = "xyes"; then
2838
AC_DEFINE(HAVE_OPENCBM,,[Support for OpenCBM (former CBM4Linux).])
2839
AM_CONDITIONAL(HAVE_REALDEVICE, true)
2840
AC_MSG_RESULT([yes])
2842
AM_CONDITIONAL(HAVE_REALDEVICE, false)
2843
AC_MSG_RESULT([no (dynamic lib support missing)])
2847
AM_CONDITIONAL(HAVE_REALDEVICE, false)
2848
AC_MSG_RESULT([no (realdevice disabled)])
2851
AC_SUBST(vsid_LDFLAGS)
2852
AC_SUBST(x64_LDFLAGS)
2853
AC_SUBST(x128_LDFLAGS)
2854
AC_SUBST(xvic_LDFLAGS)
2855
AC_SUBST(xpet_LDFLAGS)
2856
AC_SUBST(xplus4_LDFLAGS)
2857
AC_SUBST(xcbm2_LDFLAGS)
2859
AC_SUBST(VSID_WINRES)
2860
AC_SUBST(X64_WINRES)
2861
AC_SUBST(X64DTV_WINRES)
2862
AC_SUBST(X128_WINRES)
2863
AC_SUBST(XVIC_WINRES)
2864
AC_SUBST(XPET_WINRES)
2865
AC_SUBST(XPLUS4_WINRES)
2866
AC_SUBST(XCBM2_WINRES)
2867
AC_SUBST(XCBM5X0_WINRES)
2870
dnl disable building of x64dtv for native gp2x, wiz, and dingoo
2871
if test x"$is_unix_gp2x" = "xyes" -o x"$is_unix_wiz" = "xyes" -o x"$is_unix_dingux" = "xyes"; then
2872
if test x"$enable_sdlui" != "xyes"; then
2873
AM_CONDITIONAL(SUPPORT_X64DTV, false)
2875
AM_CONDITIONAL(SUPPORT_X64DTV, true)
2878
AM_CONDITIONAL(SUPPORT_X64DTV, true)
2881
dnl disable building of x64sc for gp2x, wiz, dingoo and disabled resid configurations
2882
if test x"$is_unix_gp2x" = "xyes" -o x"$is_unix_wiz" = "xyes" -o x"$enable_dingoo" = "xyes" -o x"$is_unix_dingux" = "xyes" -o x"$with_resid" = "xno"; then
2883
AM_CONDITIONAL(SUPPORT_X64SC, false)
2885
AM_CONDITIONAL(SUPPORT_X64SC, true)
2888
dnl Setup the system-specific object files.
2889
if test x"$enable_sdlui" = "xyes"; then
2890
ARCH_DIR="\$(top_builddir)/src/arch/sdl"
2891
ARCH_SRC_DIR="\$(top_srcdir)/src/arch/sdl"
2892
ARCH_LIBS="$ARCH_DIR/libarch.a"
2893
if test x"$is_win32" = "xyes"; then
2894
ARCH_INCLUDES="-I$ARCH_SRC_DIR -I\$(top_srcdir)/src/arch/win32/msvc/wpcap"
2896
ARCH_INCLUDES="-I$ARCH_SRC_DIR -I\$(top_srcdir)/src/arch"
2898
AC_DEFINE(HAS_JOYSTICK,,[Enable joystick emulation.])
2899
AC_DEFINE(HAVE_MOUSE,,[Enable 1351 mouse support])
2900
AM_CONDITIONAL(SDL_COMPILE, true)
2902
AM_CONDITIONAL(SDL_COMPILE, false)
2907
if test x"$is_unix" = "xyes"; then
2909
if test x"$enable_sdlui" != "xyes"; then
2910
ARCH_DIR="\$(top_builddir)/src/arch/unix"
2911
ARCH_SRC_DIR="\$(top_srcdir)/src/arch/unix"
2912
ARCH_EXTRA_SUBDIR="gui x11"
2914
if test x"$is_unix_x11" = "xyes" ; then
2915
if test x"$enable_gnomeui" != "xyes" ; then
2916
ARCH_LIBS="$ARCH_DIR/libarch.a $ARCH_DIR/gui/libarchgui.a $ARCH_DIR/x11/libx11ui.a $ARCH_DIR/x11/xaw/libxawui.a $ARCH_DIR/x11/xaw/widgets/libwidgets.a $ARCH_DIR/libarch.a $ARCH_DIR/gui/libarchgui.a $ARCH_DIR/x11/libx11ui.a"
2917
ARCH_INCLUDES="-I$ARCH_SRC_DIR"
2918
AC_DEFINE(USE_XAWUI,,[Are we using the Unix/X11/Xaw ui?])
2920
ARCH_LIBS="$ARCH_DIR/libarch.a $ARCH_DIR/gui/libarchgui.a $ARCH_DIR/x11/gnome/libgnomeui.a $ARCH_DIR/x11/libx11ui.a"
2921
ARCH_INCLUDES="-I$ARCH_SRC_DIR $GTK_CFLAGS $GTKGL_CFLAGS $VTE_CFLAGS"
2924
AC_DEFINE(HAVE_READLINE,,[Are we using the readline library replacement?])
2926
AC_CHECK_HEADERS(stdlib.h,AC_DEFINE(HAVE_STDLIB,,[We are using stdlib.h]))
2928
if test x"$READLINE" != x ; then
2929
ARCH_EXTRA_SUBDIR="$ARCH_EXTRA_SUBDIR readline"
2933
AC_DEFINE(UNIX_COMPILE,,[Are we compiling for unix?])
2936
if test x"$is_unix_gp2x" = "xyes" -a x"$enable_sdlui" != "xyes"; then
2937
ARCH_LIBS="$ARCH_DIR/libarch.a $ARCH_DIR/gp2x/libarchgp2x.a $ARCH_DIR/gp2x/minimal/libarchgp2xsys.a"
2938
ARCH_INCLUDES="-I$ARCH_SRC_DIR -I$ARCH_SRC_DIR/gp2x -I$ARCH_SRC_DIR/gp2x/minimal"
2939
ARCH_EXTRA_SUBDIR="gp2x gp2x/minimal"
2942
if test x"$is_unix_wiz" = "xyes" -a x"$enable_sdlui" != "xyes"; then
2943
ARCH_LIBS="$ARCH_DIR/libarch.a $ARCH_DIR/gp2x/libarchgp2x.a $ARCH_DIR/gp2x/wiz/libarchwizsys.a"
2944
ARCH_INCLUDES="-I$ARCH_SRC_DIR -I$ARCH_SRC_DIR/gp2x -I$ARCH_SRC_DIR/gp2x/wiz"
2945
ARCH_EXTRA_SUBDIR="gp2x gp2x/wiz"
2948
if test x"$is_unix_macosx" = "xyes" ; then
2949
ARCH_MAKE_BINDIST_DIR="\$(top_srcdir)/src/arch/unix/macosx"
2950
if test x"$enable_sdlui" = "xyes"; then
2951
UNIX_MACOSX_UITYPE=sdl
2952
elif test x"$with_cocoa" = "xyes" ; then
2953
ARCH_LIBS="$ARCH_DIR/macosx/cocoa/menu/libarchmacosxcocoamenu.a $ARCH_DIR/macosx/cocoa/dialog/libarchmacosxcocoadialog.a $ARCH_DIR/macosx/cocoa/libarchmacosxcocoa.a $ARCH_DIR/macosx/cocoa/view/libarchmacosxcocoaview.a $ARCH_DIR/macosx/libarchmacosx.a $ARCH_DIR/libarch.a $ARCH_LIBS"
2954
ARCH_INCLUDES="-I$ARCH_SRC_DIR/macosx/cocoa/menu -I$ARCH_SRC_DIR/macosx/cocoa/dialog -I$ARCH_SRC_DIR/macosx/cocoa/view -I$ARCH_SRC_DIR/macosx/cocoa -I$ARCH_SRC_DIR/macosx -I$ARCH_SRC_DIR $ARCH_INCLUDES"
2955
ARCH_EXTRA_SUBDIR="macosx macosx/cocoa macosx/cocoa/view macosx/cocoa/menu macosx/cocoa/dialog"
2956
UI_LIBS="-framework Cocoa -framework OpenGL -framework Carbon -framework CoreVideo"
2957
UNIX_MACOSX_UITYPE=cocoa
2959
ARCH_LIBS="$ARCH_DIR/macosx/libarchmacosx.a $ARCH_LIBS"
2960
ARCH_INCLUDES="-I$ARCH_SRC_DIR/macosx $ARCH_INCLUDES"
2961
ARCH_EXTRA_SUBDIR="$ARCH_EXTRA_SUBDIR macosx"
2962
UI_LIBS="$UI_LIBS -framework CoreVideo"
2963
if test x"$enable_gnomeui" != "xyes" ; then
2964
UNIX_MACOSX_UITYPE=x11
2966
UNIX_MACOSX_UITYPE=gtk
2970
AC_SUBST(UNIX_MACOSX_UITYPE)
2972
AM_CONDITIONAL(DINGOO_NATIVE_COMPILE, false)
2973
AM_CONDITIONAL(SUPPORT_CMDLINE_TOOLS, true)
2974
AM_CONDITIONAL(UNIX_COMPILE, true)
2975
AM_CONDITIONAL(WIN32_COMPILE, false)
2976
AM_CONDITIONAL(MSDOS_COMPILE, false)
2977
AM_CONDITIONAL(OS2_COMPILE, false)
2978
AM_CONDITIONAL(BEOS_COMPILE, false)
2979
AM_CONDITIONAL(AMIGA_COMPILE, false)
2980
AM_CONDITIONAL(HAVE_TRANSLATION, false)
2981
openserver5compile=no
2982
openserver6compile=no
2996
AM_CONDITIONAL(UNIX_RHAPSODY_COMPILE, true)
2997
AC_DEFINE(RHAPSODY_COMPILE,,[Enable Rhapsody 5.x support])
3001
AM_CONDITIONAL(UNIX_OPENSTEP_COMPILE, true)
3002
AC_DEFINE(OPENSTEP_COMPILE,,[Enable OpenStep 4.x support])
3006
AM_CONDITIONAL(UNIX_NEXTSTEP_COMPILE, true)
3007
AC_DEFINE(NEXTSTEP_COMPILE,,[Enable NextStep 3.x support])
3011
AM_CONDITIONAL(UNIX_SKYOS_COMPILE, true)
3015
AM_CONDITIONAL(UNIX_QNX4_COMPILE, true)
3019
AM_CONDITIONAL(UNIX_QNX6_COMPILE, true)
3023
AM_CONDITIONAL(UNIX_SOLARIS_COMPILE, true)
3024
sol_version=`uname -r`
3025
if test x"$sol_version" = "x5.7"; then
3026
ac_configure_args="$ac_configure_args --disable-sse"
3030
openserver5compile=yes
3031
AM_CONDITIONAL(UNIX_OPENSERVER5_COMPILE, true)
3032
AC_DEFINE(OPENSERVER5_COMPILE,,[Enable SCO Openserver 5.x support])
3035
openserver6compile=yes
3036
AM_CONDITIONAL(UNIX_OPENSERVER6_COMPILE, true)
3037
AC_DEFINE(OPENSERVER6_COMPILE,,[Enable SCO Openserver 6.x support])
3041
AM_CONDITIONAL(UNIX_UNIXWARE_COMPILE, true)
3042
AC_DEFINE(UNIXWARE_COMPILE,,[Enable SCO Unixware 7.x support])
3046
AM_CONDITIONAL(UNIX_HPUX_COMPILE, true)
3050
AM_CONDITIONAL(SYLLABLE_COMPILE, true)
3056
if test x"$skyoscompile" = "xno"; then
3057
AM_CONDITIONAL(UNIX_SKYOS_COMPILE, false)
3060
if test x"$qnx4compile" = "xno"; then
3061
AM_CONDITIONAL(UNIX_QNX4_COMPILE, false)
3064
if test x"$qnx6compile" = "xno"; then
3065
AM_CONDITIONAL(UNIX_QNX6_COMPILE, false)
3068
if test x"$nextstepcompile" = "xno"; then
3069
AM_CONDITIONAL(UNIX_NEXTSTEP_COMPILE, false)
3072
if test x"$openstepcompile" = "xno"; then
3073
AM_CONDITIONAL(UNIX_OPENSTEP_COMPILE, false)
3076
if test x"$rhapsodycompile" = "xno"; then
3077
AM_CONDITIONAL(UNIX_RHAPSODY_COMPILE, false)
3080
if test x"$solariscompile" = "xno"; then
3081
AM_CONDITIONAL(UNIX_SOLARIS_COMPILE, false)
3084
if test x"$openserver5compile" = "xno"; then
3085
AM_CONDITIONAL(UNIX_OPENSERVER5_COMPILE, false)
3088
if test x"$openserver6compile" = "xno"; then
3089
AM_CONDITIONAL(UNIX_OPENSERVER6_COMPILE, false)
3092
if test x"$unixwarecompile" = "xno"; then
3093
AM_CONDITIONAL(UNIX_UNIXWARE_COMPILE, false)
3096
if test x"$hpuxcompile" = "xno"; then
3097
AM_CONDITIONAL(UNIX_HPUX_COMPILE, false)
3100
if test x"$syllablecompile" = "xno"; then
3101
AM_CONDITIONAL(SYLLABLE_COMPILE, false)
3104
if test x"$is_unix_gp2x" = "xyes" ; then
3105
AM_CONDITIONAL(UNIX_GP2X_COMPILE, true)
3106
AM_CONDITIONAL(MAKE_BINDIST, true)
3108
AM_CONDITIONAL(UNIX_GP2X_COMPILE, false)
3111
if test x"$is_unix_wiz" = "xyes" ; then
3112
AM_CONDITIONAL(UNIX_WIZ_COMPILE, true)
3113
AM_CONDITIONAL(MAKE_BINDIST, true)
3115
AM_CONDITIONAL(UNIX_WIZ_COMPILE, false)
3118
if test x"$is_unix_dingux" = "xyes" ; then
3119
AM_CONDITIONAL(UNIX_DINGUX_COMPILE, true)
3120
AM_CONDITIONAL(MAKE_BINDIST, true)
3122
AM_CONDITIONAL(UNIX_DINGUX_COMPILE, false)
3125
if test x"$is_unix_macosx" = "xyes" ; then
3126
AM_CONDITIONAL(UNIX_MACOSX_COMPILE, true)
3127
if test x"$enable_bundle" != "xno" ; then
3128
AM_CONDITIONAL(MAKE_BINDIST, true)
3130
AM_CONDITIONAL(MAKE_BINDIST, false)
3133
AM_CONDITIONAL(UNIX_MACOSX_COMPILE, false)
3136
if test x"$is_unix_gp2x" != "xyes" -a x"$is_unix_wiz" != "xyes" -a x"$is_unix_dingux" != "xyes" -a x"$is_unix_macosx" != "xyes"; then
3137
AM_CONDITIONAL(MAKE_BINDIST, false)
3140
elif test x"$enable_dingoo" = "xyes" ; then
3141
AM_CONDITIONAL(DINGOO_NATIVE_COMPILE, true)
3142
AM_CONDITIONAL(SUPPORT_CMDLINE_TOOLS, false)
3143
AC_DEFINE(HAVE_ATEXIT,,[Dingoo has atexit])
3144
AM_CONDITIONAL(HAVE_RAWDRIVE, false)
3145
AM_CONDITIONAL(UNIX_COMPILE, true)
3146
AM_CONDITIONAL(WIN32_COMPILE, false)
3147
AM_CONDITIONAL(MSDOS_COMPILE, false)
3148
AM_CONDITIONAL(OS2_COMPILE, false)
3149
AM_CONDITIONAL(BEOS_COMPILE, false)
3150
AM_CONDITIONAL(AMIGA_COMPILE, false)
3151
AM_CONDITIONAL(UNIX_RHAPSODY_COMPILE, false)
3152
AM_CONDITIONAL(UNIX_OPENSTEP_COMPILE, false)
3153
AM_CONDITIONAL(UNIX_NEXTSTEP_COMPILE, false)
3154
AM_CONDITIONAL(UNIX_SKYOS_COMPILE, false)
3155
AM_CONDITIONAL(UNIX_QNX4_COMPILE, false)
3156
AM_CONDITIONAL(UNIX_QNX6_COMPILE, false)
3157
AM_CONDITIONAL(UNIX_SOLARIS_COMPILE, false)
3158
AM_CONDITIONAL(UNIX_OPENSERVER5_COMPILE, false)
3159
AM_CONDITIONAL(UNIX_OPENSERVER6_COMPILE, false)
3160
AM_CONDITIONAL(UNIX_UNIXWARE_COMPILE, false)
3161
AM_CONDITIONAL(UNIX_HPUX_COMPILE, false)
3162
AM_CONDITIONAL(UNIX_GP2X_COMPILE, false)
3163
AM_CONDITIONAL(UNIX_WIZ_COMPILE, false)
3164
AM_CONDITIONAL(UNIX_DINGUX_COMPILE, false)
3165
AM_CONDITIONAL(UNIX_MACOSX_COMPILE, false)
3166
AM_CONDITIONAL(SYLLABLE_COMPILE, false)
3167
AM_CONDITIONAL(HAVE_TRANSLATION, false)
3168
AM_CONDITIONAL(MAKE_BINDIST, true)
3169
AM_CONDITIONAL(SUPPORT_X64DTV, true)
3171
elif test x"$is_win32" = "xyes"; then
3172
if test x"$enable_sdlui" != "xyes"; then
3173
ARCH_DIR="\$(top_builddir)/src/arch/win32"
3174
ARCH_SRC_DIR="\$(top_srcdir)/src/arch/win32"
3175
ARCH_LIBS="$ARCH_DIR/libarch.a"
3176
ARCH_INCLUDES="-I\$(top_srcdir)/src/arch/win32"
3177
if test x"$host_os" = "xcygwin32" -o x"$host_os" = "xcygwin"; then
3178
AC_DEFINE([PLATFORM], ["win32 x86 cygwin"],[The current arch, cpu and compiler used.])
3180
if test x"$host_cpu" = "xx86_64" -o x"$host_cpu" = "xamd64"; then
3181
AC_DEFINE([PLATFORM], ["win64 x64 mingw"], [The current arch, cpu and compiler used.])
3183
if test x"$CC" = "xowcc"; then
3184
AC_DEFINE([PLATFORM], ["win32 x86 owcc"], [The current arch, cpu and compiler used.])
3186
AC_DEFINE([PLATFORM], ["win32 x86 mingw"], [The current arch, cpu and compiler used.])
3191
AC_DEFINE(WIN32_COMPILE,,[Are we compiling for win32?])
3193
if test x"$enable_sdlui" = "xyes"; then
3194
if test x"$host_cpu" = "xx86_64" -o x"$host_cpu" = "xamd64"; then
3195
SDL_EXTRA_LIBS="$UI_LIBS -lwinmm -lws2_32"
3197
SDL_EXTRA_LIBS="$UI_LIBS -lwinmm -lwsock32"
3201
AM_CONDITIONAL(WIN32_COMPILE, true)
3202
AM_CONDITIONAL(UNIX_COMPILE, false)
3203
AM_CONDITIONAL(UNIX_GP2X_COMPILE, false)
3204
AM_CONDITIONAL(UNIX_WIZ_COMPILE, false)
3205
AM_CONDITIONAL(UNIX_DINGUX_COMPILE, false)
3206
AM_CONDITIONAL(UNIX_SKYOS_COMPILE, false)
3207
AM_CONDITIONAL(UNIX_QNX4_COMPILE, false)
3208
AM_CONDITIONAL(UNIX_QNX6_COMPILE, false)
3209
AM_CONDITIONAL(UNIX_SOLARIS_COMPILE, false)
3210
AM_CONDITIONAL(UNIX_RHAPSODY_COMPILE, false)
3211
AM_CONDITIONAL(UNIX_OPENSTEP_COMPILE, false)
3212
AM_CONDITIONAL(UNIX_NEXTSTEP_COMPILE, false)
3213
AM_CONDITIONAL(UNIX_OPENSERVER5_COMPILE, false)
3214
AM_CONDITIONAL(UNIX_OPENSERVER6_COMPILE, false)
3215
AM_CONDITIONAL(UNIX_UNIXWARE_COMPILE, false)
3216
AM_CONDITIONAL(UNIX_HPUX_COMPILE, false)
3217
AM_CONDITIONAL(SYLLABLE_COMPILE, false)
3218
AM_CONDITIONAL(MSDOS_COMPILE, false)
3219
AM_CONDITIONAL(OS2_COMPILE, false)
3220
AM_CONDITIONAL(BEOS_COMPILE, false)
3221
AM_CONDITIONAL(AMIGA_COMPILE, false)
3222
AM_CONDITIONAL(UNIX_MACOSX_COMPILE, false)
3223
AM_CONDITIONAL(DINGOO_NATIVE_COMPILE, false)
3224
AM_CONDITIONAL(SUPPORT_CMDLINE_TOOLS, true)
3225
AM_CONDITIONAL(HAVE_TRANSLATION, true)
3226
AM_CONDITIONAL(MAKE_BINDIST, true)
3227
elif test x"$is_amiga" = "xyes"; then
3228
if test x"$enable_sdlui" != "xyes"; then
3229
ARCH_DIR="\$(top_builddir)/src/arch/amigaos"
3230
ARCH_SRC_DIR="\$(top_srcdir)/src/arch/amigaos"
3231
ARCH_LIBS="$ARCH_DIR/libarch.a"
3232
ARCH_INCLUDES="-I\$(top_srcdir)/src/arch/amigaos"
3234
AM_CONDITIONAL(UNIX_COMPILE, false)
3235
AM_CONDITIONAL(UNIX_GP2X_COMPILE, false)
3236
AM_CONDITIONAL(UNIX_WIZ_COMPILE, false)
3237
AM_CONDITIONAL(UNIX_DINGUX_COMPILE, false)
3238
AM_CONDITIONAL(UNIX_SKYOS_COMPILE, false)
3239
AM_CONDITIONAL(UNIX_QNX4_COMPILE, false)
3240
AM_CONDITIONAL(UNIX_QNX6_COMPILE, false)
3241
AM_CONDITIONAL(UNIX_SOLARIS_COMPILE, false)
3242
AM_CONDITIONAL(UNIX_RHAPSODY_COMPILE, false)
3243
AM_CONDITIONAL(UNIX_OPENSTEP_COMPILE, false)
3244
AM_CONDITIONAL(UNIX_NEXTSTEP_COMPILE, false)
3245
AM_CONDITIONAL(UNIX_OPENSERVER5_COMPILE, false)
3246
AM_CONDITIONAL(UNIX_OPENSERVER6_COMPILE, false)
3247
AM_CONDITIONAL(UNIX_UNIXWARE_COMPILE, false)
3248
AM_CONDITIONAL(UNIX_HPUX_COMPILE, false)
3249
AM_CONDITIONAL(SYLLABLE_COMPILE, false)
3250
AM_CONDITIONAL(WIN32_COMPILE, false)
3251
AM_CONDITIONAL(MSDOS_COMPILE, false)
3252
AM_CONDITIONAL(OS2_COMPILE, false)
3253
AM_CONDITIONAL(BEOS_COMPILE, false)
3254
AM_CONDITIONAL(AMIGA_COMPILE, true)
3255
AM_CONDITIONAL(UNIX_MACOSX_COMPILE, false)
3256
AM_CONDITIONAL(DINGOO_NATIVE_COMPILE, false)
3257
AM_CONDITIONAL(SUPPORT_CMDLINE_TOOLS, true)
3258
AM_CONDITIONAL(HAVE_TRANSLATION, true)
3259
AM_CONDITIONAL(MAKE_BINDIST, true)
3260
elif test x"$is_dos" = "xyes"; then
3261
ARCH_INCLUDES="-I\$(top_srcdir)/src/arch/msdos"
3262
ARCH_DIR="\$(top_builddir)/src/arch/msdos"
3263
ARCH_SRC_DIR="\$(top_srcdir)/src/arch/msdos"
3264
if test x"$ac_cv_lib_pcap_pcap_open_live" = "xyes"; then
3265
ARCH_LIBS="$ARCH_DIR/libarch.a $ARCH_DIR/libpcap_nodma.a"
3267
ARCH_LIBS="$ARCH_DIR/libarch.a"
3269
AM_CONDITIONAL(UNIX_COMPILE, false)
3270
AM_CONDITIONAL(UNIX_GP2X_COMPILE, false)
3271
AM_CONDITIONAL(UNIX_WIZ_COMPILE, false)
3272
AM_CONDITIONAL(UNIX_DINGUX_COMPILE, false)
3273
AM_CONDITIONAL(UNIX_SKYOS_COMPILE, false)
3274
AM_CONDITIONAL(UNIX_QNX4_COMPILE, false)
3275
AM_CONDITIONAL(UNIX_QNX6_COMPILE, false)
3276
AM_CONDITIONAL(UNIX_SOLARIS_COMPILE, false)
3277
AM_CONDITIONAL(UNIX_RHAPSODY_COMPILE, false)
3278
AM_CONDITIONAL(UNIX_OPENSTEP_COMPILE, false)
3279
AM_CONDITIONAL(UNIX_NEXTSTEP_COMPILE, false)
3280
AM_CONDITIONAL(UNIX_OPENSERVER5_COMPILE, false)
3281
AM_CONDITIONAL(UNIX_OPENSERVER6_COMPILE, false)
3282
AM_CONDITIONAL(UNIX_UNIXWARE_COMPILE, false)
3283
AM_CONDITIONAL(UNIX_HPUX_COMPILE, false)
3284
AM_CONDITIONAL(SYLLABLE_COMPILE, false)
3285
AM_CONDITIONAL(WIN32_COMPILE, false)
3286
AM_CONDITIONAL(MSDOS_COMPILE, true)
3287
AM_CONDITIONAL(OS2_COMPILE, false)
3288
AM_CONDITIONAL(BEOS_COMPILE, false)
3289
AM_CONDITIONAL(AMIGA_COMPILE, false)
3290
AM_CONDITIONAL(UNIX_MACOSX_COMPILE, false)
3291
AM_CONDITIONAL(DINGOO_NATIVE_COMPILE, false)
3292
AM_CONDITIONAL(SUPPORT_CMDLINE_TOOLS, true)
3293
AM_CONDITIONAL(HAVE_TRANSLATION, false)
3294
AM_CONDITIONAL(MAKE_BINDIST, true)
3295
elif test x"$is_os2" = "xyes"; then
3296
ARCH_INCLUDES="-I\$(top_srcdir)/src/arch/os2"
3297
ARCH_DIR="\$(top_builddir)/src/arch/os2"
3298
ARCH_SRC_DIR="\$(top_srcdir)/src/arch/os2"
3299
ARCH_LIBS="$ARCH_DIR/libarch.a"
3300
AM_CONDITIONAL(UNIX_COMPILE, false)
3301
AM_CONDITIONAL(UNIX_GP2X_COMPILE, false)
3302
AM_CONDITIONAL(UNIX_WIZ_COMPILE, false)
3303
AM_CONDITIONAL(UNIX_DINGUX_COMPILE, false)
3304
AM_CONDITIONAL(UNIX_SKYOS_COMPILE, false)
3305
AM_CONDITIONAL(UNIX_QNX4_COMPILE, false)
3306
AM_CONDITIONAL(UNIX_QNX6_COMPILE, false)
3307
AM_CONDITIONAL(UNIX_SOLARIS_COMPILE, false)
3308
AM_CONDITIONAL(UNIX_RHAPSODY_COMPILE, false)
3309
AM_CONDITIONAL(UNIX_OPENSTEP_COMPILE, false)
3310
AM_CONDITIONAL(UNIX_NEXTSTEP_COMPILE, false)
3311
AM_CONDITIONAL(UNIX_OPENSERVER5_COMPILE, false)
3312
AM_CONDITIONAL(UNIX_OPENSERVER6_COMPILE, false)
3313
AM_CONDITIONAL(UNIX_UNIXWARE_COMPILE, false)
3314
AM_CONDITIONAL(UNIX_HPUX_COMPILE, false)
3315
AM_CONDITIONAL(SYLLABLE_COMPILE, false)
3316
AM_CONDITIONAL(WIN32_COMPILE, false)
3317
AM_CONDITIONAL(MSDOS_COMPILE, false)
3318
AM_CONDITIONAL(OS2_COMPILE, true)
3319
AM_CONDITIONAL(BEOS_COMPILE, false)
3320
AM_CONDITIONAL(AMIGA_COMPILE, false)
3321
AM_CONDITIONAL(UNIX_MACOSX_COMPILE, false)
3322
AM_CONDITIONAL(DINGOO_NATIVE_COMPILE, false)
3323
AM_CONDITIONAL(SUPPORT_CMDLINE_TOOLS, true)
3324
AM_CONDITIONAL(HAVE_TRANSLATION, false)
3325
AM_CONDITIONAL(MAKE_BINDIST, true)
3326
elif test x"$is_beos" = "xyes"; then
3327
if test x"$enable_sdlui" != "xyes"; then
3328
ARCH_INCLUDES="-I\$(top_srcdir)/src/arch/beos"
3329
ARCH_DIR="\$(top_builddir)/src/arch/beos"
3330
ARCH_SRC_DIR="\$(top_srcdir)/src/arch/beos"
3331
ARCH_LIBS="$ARCH_DIR/libarch.a"
3333
AM_CONDITIONAL(UNIX_COMPILE, false)
3334
AM_CONDITIONAL(UNIX_GP2X_COMPILE, false)
3335
AM_CONDITIONAL(UNIX_WIZ_COMPILE, false)
3336
AM_CONDITIONAL(UNIX_DINGUX_COMPILE, false)
3337
AM_CONDITIONAL(UNIX_SKYOS_COMPILE, false)
3338
AM_CONDITIONAL(UNIX_QNX4_COMPILE, false)
3339
AM_CONDITIONAL(UNIX_QNX6_COMPILE, false)
3340
AM_CONDITIONAL(UNIX_SOLARIS_COMPILE, false)
3341
AM_CONDITIONAL(UNIX_RHAPSODY_COMPILE, false)
3342
AM_CONDITIONAL(UNIX_OPENSTEP_COMPILE, false)
3343
AM_CONDITIONAL(UNIX_NEXTSTEP_COMPILE, false)
3344
AM_CONDITIONAL(UNIX_OPENSERVER5_COMPILE, false)
3345
AM_CONDITIONAL(UNIX_OPENSERVER6_COMPILE, false)
3346
AM_CONDITIONAL(UNIX_UNIXWARE_COMPILE, false)
3347
AM_CONDITIONAL(UNIX_HPUX_COMPILE, false)
3348
AM_CONDITIONAL(SYLLABLE_COMPILE, false)
3349
AM_CONDITIONAL(WIN32_COMPILE, false)
3350
AM_CONDITIONAL(MSDOS_COMPILE, false)
3351
AM_CONDITIONAL(OS2_COMPILE, false)
3352
AM_CONDITIONAL(BEOS_COMPILE, true)
3353
AM_CONDITIONAL(AMIGA_COMPILE, false)
3354
AM_CONDITIONAL(UNIX_MACOSX_COMPILE, false)
3355
AM_CONDITIONAL(DINGOO_NATIVE_COMPILE, false)
3356
AM_CONDITIONAL(SUPPORT_CMDLINE_TOOLS, true)
3357
AM_CONDITIONAL(HAVE_TRANSLATION, false)
3358
AM_CONDITIONAL(MAKE_BINDIST, true)
3360
AC_MSG_WARN([No architecture defined!])
3363
dnl Check wether we have gcc
3364
if test x"$GCC" = "xyes" ; then
3365
AC_DEFINE(USE_GCC,, [Define when using gcc] )
3368
dnl Check wether we have gcc and solaris /usr/openwin stuff.
3369
dnl The headers there give zillions of warnings because of implicit int
3370
dnl declarations. gcc's >= 2.6.3 know the `-Wno-implicit-int' option so I
3371
dnl don't care about checking it out. MP
3373
if test x"$GCC" = "xyes" ; then
3376
if echo ${CFLAGS} ${ARCH_INCLUDES} | grep "I/usr/openwin/include" > /dev/null 2>&1 ; then
3377
CFLAGS="${CFLAGS} -Wno-implicit-int"
3385
AC_SUBST(HAVE_READLINE)
3386
AC_SUBST(ARCH_INCLUDES)
3389
AC_SUBST(ARCH_SRC_DIR)
3390
AC_SUBST(ARCH_MAKE_BINDIST_DIR)
3391
AC_SUBST(ARCH_EXTRA_SUBDIR)
3393
AC_SUBST(SDL_EXTRA_LIBS)
3394
AC_SUBST(SOUND_USS_OBJ)
3395
AC_SUBST(SOUND_SGI_OBJ)
3396
AC_SUBST(SOUND_HPUX_OBJ)
3397
AC_SUBST(SOUND_AIX_OBJ)
3398
AC_SUBST(SOUND_MIDAS_OBJ)
3399
AC_SUBST(SOUND_SDL_OBJ)
3401
if test "$prefix" = NONE && test "$exec_prefix" = NONE; then
3402
PREFIX="$ac_default_prefix"
3403
elif test "$prefix" = NONE; then
3404
PREFIX="$exec_prefix"
3409
AC_DEFINE_UNQUOTED(PREFIX, "$PREFIX",
3410
[Where do we want to install the executable?])
3412
dnl Fix for po directory Makefile
3415
AM_CONDITIONAL(PO_SRCDIR_PREFIX, false)
3418
AM_CONDITIONAL(PO_SRCDIR_PREFIX, true)
3422
dnl Path for keymaps, ROMs etc.
3425
VICEDIR="$PREFIX/share/vice"
3426
AM_CONDITIONAL(ALTERNATE_DOCDIR, true)
3429
VICEDIR="$PREFIX/lib/vice"
3430
AM_CONDITIONAL(ALTERNATE_DOCDIR, true)
3433
if test x"$host_cpu" = "xx86_64"; then
3434
VICEDIR="$PREFIX/lib/vice"
3435
AM_CONDITIONAL(ALTERNATE_DOCDIR, false)
3437
VICEDIR="$PREFIX/lib/vice"
3438
AM_CONDITIONAL(ALTERNATE_DOCDIR, false)
3442
VICEDIR="$PREFIX/lib/vice"
3443
AM_CONDITIONAL(ALTERNATE_DOCDIR, false)
3449
dnl Now produce the directories & Makefiles.
3451
mkdir -p arch/amigaos
3455
mkdir -p arch/os2/dialogs
3456
mkdir -p arch/os2/icons
3457
mkdir -p arch/os2/kbd
3458
mkdir -p arch/os2/snippets
3459
mkdir -p arch/os2/vac++
3461
mkdir -p arch/sdl/win32-msvc
3462
mkdir -p arch/sdl/win32-watcom
3463
mkdir -p arch/sdl/win64-msvc
3464
mkdir -p arch/sdl/winmips-msvc
3465
mkdir -p arch/sdl/dingoo-files
3466
mkdir -p arch/sdl/syllable-files
3467
mkdir -p arch/sdl/xbox
3469
mkdir -p arch/unix/gp2x
3470
mkdir -p arch/unix/gp2x/minimal
3471
mkdir -p arch/unix/gp2x/wiz
3472
mkdir -p arch/unix/gui
3473
mkdir -p arch/unix/readline
3474
mkdir -p arch/unix/x11
3475
mkdir -p arch/unix/x11/gnome
3476
mkdir -p arch/unix/x11/xaw
3477
mkdir -p arch/unix/x11/xaw/widgets
3478
mkdir -p arch/unix/macosx
3479
mkdir -p arch/unix/macosx/cocoa
3480
mkdir -p arch/unix/macosx/cocoa/view
3481
mkdir -p arch/unix/macosx/cocoa/menu
3482
mkdir -p arch/unix/macosx/cocoa/dialog
3484
mkdir -p arch/win32/utils
3494
mkdir -p drive/iec/c64exp
3495
mkdir -p drive/iec/plus4exp
3496
mkdir -p drive/iec128dcr
3497
mkdir -p drive/iecieee
3502
mkdir -p gfxoutputdrv
3504
mkdir -p imagecontents
3532
if test x"$srcdir" != "x." ; then
3535
rm -f "$BINDIR/C64" "$BINDIR/PET" "$BINDIR/VIC20"
3536
$LN_S "../$srcdir/../bin/C64" "$BINDIR/C64"
3537
$LN_S "../$srcdir/../bin/PET" "$BINDIR/PET"
3538
$LN_S "../$srcdir/../bin/VIC20" "$BINDIR/VIC20"
3555
data/C64DTV/Makefile
3556
data/CBM-II/Makefile
3557
data/DRIVES/Makefile
3560
data/PRINTER/Makefile
3568
src/gentranslate_h.sh
3570
src/arch/amigaos/Makefile
3571
src/arch/amigaos/genintl_h.sh
3572
src/arch/beos/Makefile
3573
src/arch/msdos/Makefile
3574
src/arch/os2/Makefile
3575
src/arch/os2/dialogs/Makefile
3576
src/arch/os2/kbd/Makefile
3577
src/arch/os2/snippets/Makefile
3578
src/arch/os2/vac++/Makefile
3579
src/arch/sdl/Makefile
3580
src/arch/sdl/win32-msvc/Makefile
3581
src/arch/sdl/win32-watcom/Makefile
3582
src/arch/sdl/win64-msvc/Makefile
3583
src/arch/sdl/winmips-msvc/Makefile
3584
src/arch/sdl/dingoo-files/Makefile
3585
src/arch/sdl/syllable-files/Makefile
3586
src/arch/sdl/xbox/Makefile
3587
src/arch/unix/Makefile
3588
src/arch/unix/gp2x/Makefile
3589
src/arch/unix/gp2x/minimal/Makefile
3590
src/arch/unix/gp2x/wiz/Makefile
3591
src/arch/unix/gui/Makefile
3592
src/arch/unix/next_open_rhap/vice.info
3593
src/arch/unix/readline/Makefile
3594
src/arch/unix/x11/Makefile
3595
src/arch/unix/x11/gnome/Makefile
3596
src/arch/unix/x11/xaw/Makefile
3597
src/arch/unix/x11/xaw/widgets/Makefile
3598
src/arch/unix/macosx/Makefile
3599
src/arch/unix/macosx/cocoa/Makefile
3600
src/arch/unix/macosx/cocoa/view/Makefile
3601
src/arch/unix/macosx/cocoa/menu/Makefile
3602
src/arch/unix/macosx/cocoa/dialog/Makefile
3603
src/arch/unix/macosx/Resources/Makefile
3604
src/arch/unix/macosx/Resources/English.lproj/Makefile
3605
src/arch/win32/Makefile
3606
src/arch/win32/vice-version.bat
3607
src/arch/win32/utils/Makefile
3608
src/arch/win64/Makefile
3611
src/c64/cart/Makefile
3616
src/diskimage/Makefile
3618
src/drive/iec/Makefile
3619
src/drive/iec/c64exp/Makefile
3620
src/drive/iec/plus4exp/Makefile
3621
src/drive/iec128dcr/Makefile
3622
src/drive/iecieee/Makefile
3623
src/drive/ieee/Makefile
3624
src/drive/tcbm/Makefile
3626
src/fsdevice/Makefile
3627
src/gfxoutputdrv/Makefile
3629
src/imagecontents/Makefile
3631
src/lib/p64/Makefile
3632
src/monitor/Makefile
3633
src/parallel/Makefile
3635
src/platform/Makefile
3637
src/printerdrv/Makefile
3639
src/rs232drv/Makefile
3643
src/sounddrv/Makefile
3645
src/userport/Makefile
3649
src/vic20/cart/Makefile
3651
src/viciisc/Makefile
3657
dnl Local Variables:
3659
dnl compile-command: "autoconf"