-
Notifications
You must be signed in to change notification settings - Fork 4
/
configure.in
3653 lines (3230 loc) · 127 KB
/
configure.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
dnl
dnl This file is part of VICE, the Versatile Commodore Emulator.
dnl See README for copyright notice.
dnl
dnl Process this file with GNU autoconf to produce a configure script.
dnl
AC_INIT(src/maincpu.c)
dnl Command-line options
VICE_ARG_INIT()
VICE_VERSION_MAJOR=2
VICE_VERSION_MINOR=4
VICE_VERSION_BUILD=0
VICE_ARG_WITH_LIST(xaw3d, [ --with-xaw3d use Xaw3d library instead of plain Xaw])
VICE_ARG_WITH_LIST(readline, [ --without-readline do not try to use the system's readline library])
VICE_ARG_WITH_LIST(midas, [ --with-midas use MIDAS sound system instead of Allegro for audio])
VICE_ARG_WITH_LIST(arts, [ --with-arts use aRts sound system])
VICE_ARG_WITH_LIST(pulse, [ --without-pulse do not use PulseAudio sound system])
VICE_ARG_WITH_LIST(alsa, [ --without-alsa do not use the ALSA sound system])
VICE_ARG_WITH_LIST(oss, [ --without-oss do not use the OSS sound system])
VICE_ARG_WITH_LIST(sdlsound, [ --with-sdlsound use SDL sound system])
VICE_ARG_WITH_LIST(resid, [ --without-resid do not use the reSID engine])
VICE_ARG_WITH_LIST(residfp, [ --without-residfp do not use the reSID-fp engine])
VICE_ARG_WITH_LIST(png, [ --without-png do not use the PNG screenshot system])
VICE_ARG_WITH_LIST(zlib, [ --without-zlib do not use the zlib support])
VICE_ARG_WITH_LIST(picasso96, [ --with-picasso96 use Amiga P96 grafix system instead of cgx])
VICE_ARG_WITH_LIST(cocoa, [ --with-cocoa enables native Cocoa UI on Macs])
VICE_ARG_ENABLE_LIST(textfield, [ --disable-textfield disable enhanced text field widget])
VICE_ARG_ENABLE_LIST(fullscreen, [ --disable-fullscreen disable XFree86 fullscreen detection])
VICE_ARG_ENABLE_LIST(gnomeui, [ --enable-gnomeui enables GNOME UI support])
VICE_ARG_ENABLE_LIST(sdlui, [ --enable-sdlui enables SDL UI support])
VICE_ARG_ENABLE_LIST(gp2x, [ --enable-gp2x enables GP2X support])
VICE_ARG_ENABLE_LIST(wiz, [ --enable-wiz enables WIZ support])
VICE_ARG_ENABLE_LIST(dingoo, [ --enable-dingoo enables native Dingoo support])
VICE_ARG_ENABLE_LIST(dingux, [ --enable-dingux enables Dingux (Dingoo Linux) support])
VICE_ARG_ENABLE_LIST(nls, [ --disable-nls disables national language support])
VICE_ARG_ENABLE_LIST(realdevice, [ --disable-realdevice disables access to real peripheral devices (CBM4Linux/OpenCBM)])
VICE_ARG_ENABLE_LIST(ffmpeg, [ --disable-ffmpeg disable FFmpeg library support])
VICE_ARG_ENABLE_LIST(quicktime, [ --enable-quicktime enables Apple QuickTime support])
VICE_ARG_ENABLE_LIST(ethernet, [ --enable-ethernet enables The Final Ethernet emulation])
VICE_ARG_ENABLE_LIST(ipv6, [ --disable-ipv6 disables the checking for IPv6 compatibility])
VICE_ARG_ENABLE_LIST(parsid, [ --enable-parsid enables ParSID support])
VICE_ARG_ENABLE_LIST(bundle, [ --disable-bundle do not use application bundles on Macs])
VICE_ARG_ENABLE_LIST(memmap, [ --enable-memmap enable the memmap feature])
VICE_ARG_ENABLE_LIST(editline, [ --disable-editline disable history in Cocoa UI's console])
VICE_ARG_ENABLE_LIST(lame, [ --disable-lame disable MP3 export with LAME])
VICE_ARG_ENABLE_LIST(static-lame, [ --enable-static-lame enable static LAME linking])
VICE_ARG_ENABLE_LIST(rs232, [ --disable-rs232 disable RS232 support])
VICE_ARG_ENABLE_LIST(midi, [ --disable-midi disable MIDI support])
VICE_ARG_ENABLE_LIST(embedded, [ --enable-embedded enable embedding of emulation data files])
VICE_ARG_ENABLE_LIST(hidmgr, [ --disable-hidmgr disable IOHIDManager joystick support on Mac])
VICE_ARG_ENABLE_LIST(hidutils, [ --disable-hidutils disable HID Uitlities joystick support on Mac])
VICE_ARG_ENABLE_LIST(debug, [ --enable-debug enable debug source options])
VICE_ARG_ENABLE_LIST(debug-code, [ --enable-debug-code enable debugging code])
dnl register ReSID(-fp) options here to pass arg checks
VICE_ARG_ENABLE_LIST(inline, [ --enable-inline enable inlining of functions [default=yes]])
VICE_ARG_ENABLE_LIST(arch, [ --enable-arch[[=arch]] enable architecture specific compilation [[default=yes]]], [], [enable_arch=yes])
VICE_ARG_ENABLE_LIST(sse, [ --enable-sse enable the use of SSE [[default=yes]]])
VICE_ARG_ENABLE_LIST(no-pic, [ --enable-no-pic enable the use of the no-pic switch [[default=yes]]])
dnl check for invalid options
VICE_ARG_LIST_CHECK()
dnl check for conflicting ui options
vice_ui_list="--enable-gnomeui --enable-sdlui --with-cocoa --enable-gp2x --enable-wiz"
vice_ui_1=none
vice_ui_2=none
for command_option in $@
do
for vice_ui in $vice_ui_list
do
if test x"$command_option" = x"$vice_ui"; then
if test x"$vice_ui_1" = "xnone"; then
vice_ui_1=$vice_ui
else
vice_ui_2=$vice_ui
fi
fi
done
done
if test x"$vice_ui_1" != "xnone" -a x"$vice_ui_2" != "xnone"; then
AC_MSG_ERROR([conflicting UI options: $vice_ui_1 $vice_ui_2])
fi
if test x"$enable_dingoo" = "xyes" -a x"$enable_dingux" = "xyes"; then
AC_MSG_ERROR([conflicting UI options: --enable-dingoo --enable-dingux])
fi
AC_SUBST(VICE_VERSION_MAJOR)
AC_SUBST(VICE_VERSION_MINOR)
AC_SUBST(VICE_VERSION_BUILD)
if test x"$VICE_VERSION_BUILD" = "x" -o x"$VICE_VERSION_BUILD" = "x0" ; then
VICE_VERSION=$VICE_VERSION_MAJOR"."$VICE_VERSION_MINOR
else
VICE_VERSION=$VICE_VERSION_MAJOR"."$VICE_VERSION_MINOR"."$VICE_VERSION_BUILD
AC_DEFINE(UNSTABLE,,[Define if this version is unstable.])
fi
AC_SUBST(VICE_VERSION)
AM_INIT_AUTOMAKE(vice, $VICE_VERSION)
AM_CONFIG_HEADER(src/config.h)
if test x"$VICE_VERSION_BUILD" = "x" -o x"$VICE_VERSION_BUILD" = "x0" ; then
VERSION_RC=$VICE_VERSION_MAJOR","$VICE_VERSION_MINOR",0,0"
else
VERSION_RC=$VICE_VERSION_MAJOR","$VICE_VERSION_MINOR","$VICE_VERSION_BUILD",0"
fi
AC_SUBST(VERSION_RC)
AC_DEFINE(VERSION_RC,"$VERSION_RC",[Win32 Version string.])
is_unix=no
is_unix_gp2x=no
is_unix_wiz=no
is_unix_dingux=no
is_unix_x11=no
is_unix_macosx=no
is_dos=no
is_win32=no
is_win32_x11=no
is_os2=no
is_beos=no
is_beos_x11=no
is_amiga=no
dnl Try to find out which system we are on...
AC_CANONICAL_HOST
if test x"$enable_memmap" = "xyes"; then
AC_DEFINE(FEATURE_CPUMEMHISTORY,,[Use the memmap feature.])
fi
dnl check for debug build
if test x"$enable_debug" = "xyes"; then
DEBUGBUILD=1
else
DEBUGBUILD=0
fi
AC_SUBST(DEBUGBUILD)
dnl check whether to build debug code
if test x"$enable_debug_code" = "xyes"; then
AC_DEFINE(DEBUG,,[Enable debugging code])
fi
if test x"$enable_gnomeui" = "xyes" ; then
AC_DEFINE(USE_GNOMEUI,,[Use GNOME UI.])
fi
AM_CONDITIONAL(GNOMEUI, test x"$enable_gnomeui" = "xyes")
if test x"$with_cocoa" = "xyes" ; then
AC_DEFINE(MACOSX_COCOA,,[Use Cocoa on Macs.])
fi
AM_CONDITIONAL(MACOSX_COCOA, test x"$with_cocoa" = "xyes")
if test x"$enable_textfield" != "xno"; then
AC_DEFINE(ENABLE_TEXTFIELD,,[Enable support for the TextField widget.])
echo "using TextField widget."
else
echo "using ugly Athena text widget."
fi
user_cflags=$CFLAGS
AC_PROG_CC
dnl --- setup Objective-C ---
OBJC="${CC}"
if test -z "x${OBJCFLAGS}"; then
OBJCFLAGS="${CFLAGS}"
fi
OBJCDEPMODE="depmode=${CC}"
AC_SUBST(OBJC)
AC_SUBST(OBJCFLAGS)
dnl AC_SUBST(OBJCDEPMODE)
_AM_DEPENDENCIES([OBJC])
if test x"$host_os" = "xminixvmd"; then
AR="\$(top_srcdir)/src/arch/unix/minix/minix-ar.sh"
AC_DEFINE(MINIXVMD,,[are we compiling under Minix-Vmd])
CFLAGS="$CFLAGS -I/usr/include/bsdcompat"
fi
if test x"$host_os" = "xminix"; then
AC_DEFINE(MINIX_SUPPORT,,[do we need minix support])
CFLAGS="$CFLAGS -D_MINIX -D_POSIX_SOURCE"
MINIX_RELEASE=`uname -r`
MINIX_VERSION=`uname -v`
if test x"$MINIX_RELEASE" != "x3"; then
AC_MSG_ERROR([VICE works only on minix 3 and up])
fi
case "$MINIX_VERSION" in
1.3*)
AC_DEFINE(MINIX_HAS_RECV_SEND,,[Define if this version of minix has the recv and send prototypes])
;;
esac
AM_CONDITIONAL(MINIX_SUPPORT, true)
else
AM_CONDITIONAL(MINIX_SUPPORT, false)
fi
if test x"$host_os" = "xcygwin32" -o x"$host_os" = "xcygwin"; then
if test x"$with_x" = "xyes"; then
host_os=cygwin-x11
is_win32_x11=yes
fi
fi
if test x"$host_os" = "xbeos"; then
if test x"$with_x" = "xyes"; then
host_os=x11beos
is_beos_x11=yes
is_unix=yes
fi
fi
dnl disable toolchain checking for ppc-beos
if test x"$host_os" = "xbeos" -a x"$host_cpu" = "xpowerpc"; then
toolchain_check=no
fi
dnl Enable the SDL UI by default for syllable.
if test x"$host_os" = "xsyllable"; then
enable_sdlui=yes
fi
dnl Disable nls for the SDL UI
if test x"$enable_sdlui" = "xyes"; then
enable_nls=no
fi
if test "x$CC" = "xgcc"; then
GCC=yes
fi
dnl test for openwatcom CC for library conversion
if test x"$CC" = "xowcc"; then
CFLAGS="$CFLAGS -O2"
AM_CONDITIONAL(OWCC, true)
AC_DEFINE(WATCOM_COMPILE,,[owcc is being used.])
else
AM_CONDITIONAL(OWCC, false)
fi
if test x"$enable_arch" = "xno"; then
march=""
ENABLE_ARCH=no
else
if test x"$enable_arch" = "xyes"; then
AC_MSG_CHECKING([if the compiler supports -march=native])
ORIG_CFLAGS=$CFLAGS
CFLAGS="$CFLAGS -march=native"
AC_TRY_COMPILE([],
[int test;],
[ AC_MSG_RESULT(yes)
ENABLE_ARCH=yes
march="-march=native" ],
[ AC_MSG_RESULT(no)
ENABLE_ARCH=no
march="" ])
CFLAGS=$ORIG_CFLAGS
else
AC_MSG_CHECKING([if the compiler supports -march=$enable_arch])
ORIG_CFLAGS=$CFLAGS
CFLAGS="$CFLAGS -march=$enable_arch"
AC_TRY_COMPILE([],
[int test;],
[ AC_MSG_RESULT(yes)
ENABLE_ARCH=yes
march="-march=$enable_arch" ],
[ AC_MSG_RESULT(no)
ENABLE_ARCH=no
march="" ])
CFLAGS=$ORIG_CFLAGS
fi
fi
AC_SUBST(ENABLE_ARCH)
dnl Check for needed external programs.
AC_PROG_CPP
AC_CHECK_PROG(AR, ar, ar, ar)
AC_CHECK_TOOL(RANLIB, ranlib, :)
AC_CHECK_TOOL(STRIP, strip, :)
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_YACC
AM_PROG_LEX
AM_PROG_AS
AC_CHECK_PROGS(MAKEINFO, makeinfo, no)
AC_CHECK_PROGS(TEXI2DVI, texi2dvi, no)
AC_CHECK_PROGS(PDFTEX, pdftex, no)
if test x"$TEXI2DVI" = "xno" -o x"$PDFTEX" = "xno"; then
AM_CONDITIONAL(BUILD_PDF, false)
else
AM_CONDITIONAL(BUILD_PDF, true)
fi
AC_CHECK_PROGS(DOS2UNIX, dos2unix, dos2unix)
dnl Setup crosscompiling.
if test x"$host_vendor" = "xgo32" -o x"$host_vendor" = "xmsdos" -o x"$host_os" = "xmsdosdjgpp"; then
dnl Some GCC cross-compilers are installed with a different name
dnl instead of using the GCC architecture targeting features.
dnl Check for the most common ones.
dnl This is used by subsequent tests.
ac_cv_prog_gcc=yes
GCC=yes
is_dos=yes
if test x"$with_midas" = "xyes" ; then
AC_DEFINE(USE_MIDAS_SOUND,,
[Use MIDAS Sound System instead of the Allegro library.])
LIBMIDAS="-lmidas"
echo "configuring support for MIDAS Sound System"
else
LIBMIDAS=""
echo "using Allegro sound driver"
fi
AM_CONDITIONAL(HAVE_RAWDRIVE, false)
dnl We always have a joystick and mouse on MSDOS.
AC_DEFINE(HAS_JOYSTICK,,[Enable joystick emulation.])
AC_DEFINE(HAVE_MOUSE,,[Enable 1351 mouse support])
AC_DEFINE(HAS_SINGLE_CANVAS,,[Is only one canvas supported?])
AC_DEFINE(HAVE_CATWEASELMKIII,,[Support for Catweasel MKIII.])
AC_DEFINE(HAVE_HARDSID,,[Support for HardSID.])
if test x"$enable_parsid" = "xyes"; then
AC_DEFINE(HAVE_PARSID,,[Support for ParSID.])
fi
dnl disable resid
with_resid=no
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
AM_CONDITIONAL(HAVE_RAWDRIVE, true)
if test x"$enable_sdlui" != "xyes"; then
if test x"$enable_rs232" != "xno"; then
AC_DEFINE(HAVE_RS232,,[Enable RS232 emulation.])
fi
AC_DEFINE(HAVE_RAWDRIVE,,[Support for block device disk image access.])
AC_DEFINE(HAS_JOYSTICK,,[Enable joystick emulation.])
AC_DEFINE(HAVE_MOUSE,,[Enable 1351 mouse support])
fi
AC_DEFINE(AMIGA_SUPPORT,,[Should we enable Amigaos support.])
is_amigaos4=yes
is_amigaos3=no
is_amiga_aros=no
is_amiga_morphos=no
openpci_present=no
if test x"$host_os" = "xmorphos"; then
AC_DEFINE(AMIGA_MORPHOS,,[Should we enable Amiga Morphos support.])
CFLAGS="$CFLAGS -noixemul"
AC_DEFINE(HAVE_HTONL,,[Define to 1 if you have the htonl function.])
AC_DEFINE(HAVE_HTONS,,[Define to 1 if you have the htons function.])
AC_DEFINE(HAVE_NETWORK,,[Enable netplay support])
AC_CHECK_HEADERS(proto/openpci.h, openpci_present=yes,,)
if test x"$enable_sdlui" != "xyes"; then
AC_DEFINE(HAVE_XVIDEO,,[Enable XVideo (overlay) support.])
fi
if test x"$openpci_present" = "xyes"; then
AC_DEFINE(HAVE_CATWEASELMKIII,,[Support for Catweasel MKIII.])
AC_DEFINE(HAVE_HARDSID,,[Support for HardSID.])
fi
is_amiga_morphos=yes
is_amigaos4=no
fi
if test x"$host_os" = "xaros"; then
AC_DEFINE(AMIGA_AROS,,[Should we enable AROS support.])
AC_DEFINE(HAVE_HTONL,,[Define to 1 if you have the htonl function.])
AC_DEFINE(HAVE_HTONS,,[Define to 1 if you have the htons function.])
AC_DEFINE(HAVE_NETWORK,,[Enable netplay support])
AC_CHECK_HEADERS(aros/_timeval.h)
AC_MSG_CHECKING(if common library bases are auto resolved)
aros_common_resolve=no
AC_TRY_LINK([#include <proto/asl.h>],
[AbortAslRequest(0)],
aros_common_resolve=yes)
if test x"$aros_common_resolve" = "xyes"; then
AC_MSG_RESULT(yes)
AC_DEFINE(WORKING_AROS_AUTO,,[Define to 1 if aros can handle auto resolving of library bases.])
else
AC_MSG_RESULT(no)
fi
is_amigaos4=no
is_amiga_aros=yes
fi
if test x"$host_os" = "xamigaos" -a x"$host_cpu" = "xm68k"; then
CFLAGS="$CFLAGS -mc68020 -noixemul"
AC_DEFINE(AMIGA_M68K,,[Should we enable M68K AmigaOS support.])
AC_DEFINE(HAVE_HTONL,,[Define to 1 if you have the htonl function.])
AC_DEFINE(HAVE_HTONS,,[Define to 1 if you have the htons function.])
AC_DEFINE(HAVE_NETWORK,,[Enable netplay support])
AC_CHECK_HEADERS(proto/openpci.h, openpci_present=yes,,)
if test x"$openpci_present" = "xyes"; then
AC_DEFINE(HAVE_CATWEASELMKIII,,[Support for Catweasel MKIII.])
AC_DEFINE(HAVE_HARDSID,,[Support for HardSID.])
fi
is_amigaos4=no
is_amigaos3=yes
fi
if test x"$is_amigaos4" = "xyes"; then
AC_DEFINE(AMIGA_OS4,,[Should we enable AmigaOS4 support.])
AC_DEFINE(HAVE_CATWEASELMKIII,,[Support for Catweasel MKIII.])
AC_DEFINE(HAVE_HARDSID,,[Support for HardSID.])
with_picasso96=yes
LIBS="$LIBS -lsupc++ -lgcc_eh"
fi
is_amiga=yes
CFLAGS="$CFLAGS -finline-functions"
if test x"$enable_sdlui" = "xyes" -a x"is_amigaos4" = "xyes"; then
LIBS="$LIBS -lunix"
fi
elif test x"$host_os" = "xcygwin32" -o x"$host_os" = "xcygwin" -o x"$host_os" = "xmingw32" -o x"$host_os" = "xmingw32msvc"; then
dnl This is used by subsequent tests.
ac_cv_prog_gcc=yes
GCC=yes
is_win32=yes
AC_CHECK_HEADERS([commctrl.h shlobj.h winioctl.h], [], [], [#include <windows.h>])
AC_DEFINE(HAS_JOYSTICK,,[Enable joystick emulation.])
AC_DEFINE(HAVE_MOUSE,,[Enable 1351 mouse support])
AC_DEFINE(HAVE_HTONL,,[Define to 1 if you have the htonl function.])
AC_DEFINE(HAVE_HTONS,,[Define to 1 if you have the htons function.])
AC_DEFINE(HAVE_NETWORK,,[Enable netplay support])
AC_DEFINE(HAVE_CATWEASELMKIII,,[Support for Catweasel MKIII.])
AC_DEFINE(HAVE_HARDSID,,[Support for HardSID.])
if test x"$enable_parsid" = "xyes"; then
AC_DEFINE(HAVE_PARSID,,[Support for ParSID.])
fi
if test x"$enable_midi" != "xno"; then
AC_DEFINE(HAVE_MIDI,,[Enable support for MIDI.])
fi
AC_DEFINE(HAVE_TFE,,[Support for The final Ethernet.])
if test x"$enable_rs232" != "xno"; then
AC_DEFINE(HAVE_RS232,,[Enable RS232 emulation.])
fi
if test x"$enable_sdlui" != "xyes"; then
AC_TRY_LINK([#include <windows.h>],
[LARGE_INTEGER li; return (int) li.QuadPart],
AC_DEFINE(HAS_LONGLONG_INTEGER,,
[Support 64bit integer for Win32 performance counter]),)
AC_TRY_LINK([#include <windows.h>],
[HGLOBAL hGlobal; UnlockResource(hGlobal); return 0],
AC_DEFINE(HAS_UNLOCKRESOURCE,,[Do we have UnlockResource()?]),)
fi
AM_CONDITIONAL(HAVE_RAWDRIVE, false)
dinput_header_no_lib="no"
dnl don't use dinput for owcc
if test x"$CC" != "xowcc"; then
AC_CHECK_HEADER(dinput.h,
[ AC_DEFINE(HAVE_DINPUT,,[Use DirectInput joystick driver]) ]
[ AC_MSG_CHECKING(for -ldinput) ]
[SAVELIBS="$LIBS"] [ LIBS="-ldinput $LIBS" ]
[ AC_LINK_IFELSE([
AC_LANG_PROGRAM([#include <dinput.h>],[return DirectInputCreateA(0,0,0,0);])
],
[ AC_DEFINE(HAVE_DINPUT_LIB, [], [dinput.lib or libdinput.a are present]) ]
[ AC_MSG_RESULT(yes) ],
[ dinput_header_no_lib="yes" ]
[ LIBS="$SAVELIBS" ]
[ AC_MSG_RESULT(no) ]
)]
)
fi
elif test x"$host_os" = "xbeos"; then
dnl This is used by subsequent tests.
ac_cv_prog_gcc=yes
GCC=yes
is_beos=yes
if test x"$enable_sdlui" != "xyes"; then
AC_DEFINE(HAS_JOYSTICK,,[Enable joystick emulation.])
AC_DEFINE(HAVE_MOUSE,,[Enable 1351 mouse support])
fi
AM_CONDITIONAL(HAVE_RAWDRIVE, false)
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
dnl This is used by subsequent tests.
ac_cv_prog_gcc=yes
GCC=yes
is_unix=yes
is_unix_gp2x=yes
CFLAGS="$CFLAGS -fomit-frame-pointer -mcpu=arm920t -msoft-float"
if test x"$enable_sdlui" != "xyes"; then
AC_DEFINE(HAVE_MOUSE,,[Enable 1351 mouse support])
AC_DEFINE(DEBUG_ZFILE,,[Use debugging of the zfile])
AC_DEFINE(GP2X,,[Enable GP2X compilation])
else
AC_DEFINE(GP2X_SDL,,[Enable SDL GP2X compilation])
fi
AM_CONDITIONAL(HAVE_RAWDRIVE, false)
elif test x"$enable_dingoo" = "xyes"; then
dnl This is used by subsequent tests.
ac_cv_prog_gcc=yes
GCC=yes
is_unix=no
is_unix_dingoo=no
CFLAGS="-G0 -O3 -I$DINGOO_SDK/include -I$DINGOO_SDK/src/SDL/include -I$DINGOO_SDK/src -I$DINGOO_SDK/src/SDL/src"
CFLAGS="$CFLAGS -I$MIPSTOOLS/mipsel-linux-include -msplit-addresses -mips32"
CFLAGS="$CFLAGS -mno-abicalls -fno-pic -finline-functions -fomit-frame-pointer"
CFLAGS="$CFLAGS -msoft-float -fno-exceptions -D_DEBUG -DMPU_JZ4740"
CFLAGS="$CFLAGS -fcommon -falign-loops -falign-jumps -falign-labels"
CFLAGS="$CFLAGS -fdelayed-branch"
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"
AC_DEFINE(HAVE_MOUSE,,[Enable 1351 mouse support])
AC_DEFINE(DINGOO_NATIVE,,[Enable native DINGOO compilation])
AC_DEFINE(DINGOO,,[Enable DINGOO compilation])
with_png="no"
dynlib_support="no"
with_resid=no
with_residfp=no
enable_sdlui=yes
enable_embedded=yes
elif test x"$host_os" = "xwiz" -o x"$host_os" = "xlinux-wiz" -o x"$host_vendor" = "xwiz" -o x"$enable_wiz" = "xyes"; then
dnl This is used by subsequent tests.
ac_cv_prog_gcc=yes
GCC=yes
is_unix=yes
is_unix_wiz=yes
CFLAGS="$CFLAGS -fomit-frame-pointer -msoft-float"
if test x"$enable_sdlui" != "xyes"; then
AC_DEFINE(HAVE_MOUSE,,[Enable 1351 mouse support])
AC_DEFINE(DEBUG_ZFILE,,[Use debugging of the zfile])
AC_DEFINE(WIZ,,[Enable WIZ compilation])
else
AC_DEFINE(WIZ_SDL,,[Enable SDL WIZ compilation])
fi
AM_CONDITIONAL(HAVE_RAWDRIVE, false)
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
dnl This is used by subsequent tests.
ac_cv_prog_gcc=yes
GCC=yes
is_unix=yes
is_unix_dingux=yes
CFLAGS="$CFLAGS -fexpensive-optimizations -fomit-frame-pointer -frename-registers"
if test x"$enable_sdlui" != "xyes"; then
AC_DEFINE(HAVE_MOUSE,,[Enable 1351 mouse support])
AC_DEFINE(DEBUG_ZFILE,,[Use debugging of the zfile])
AC_DEFINE(DINGUX,,[Enable DINGUX compilation])
else
AC_DEFINE(DINGUX_SDL,,[Enable SDL DINGUX compilation])
fi
AM_CONDITIONAL(HAVE_RAWDRIVE, false)
else
dnl Check for host os with version attached. Typically on UN*X like systems.
case "$host_os" in
dnl Mac OS X Host
darwin*)
is_unix=yes
is_unix_macosx=yes
dnl disable toolchain checking for macosx
toolchain_check=no
if test x"$with_cocoa" = "xyes" ; then
is_unix_x11=no
else
is_unix_x11=yes
fi
if test -z "$user_cflags" ; then
if test x"$GCC" = "xyes" ; then
warnings_cxx="-Wall -Winline"
warnings_c="-Wstrict-prototypes $warnings_cxx"
optimization_c="-O3 $march"
optimization_cxx="-fno-exceptions $optimization_c"
if test x"$ac_cv_prog_cc_g" = "xyes" ; then
CFLAGS="-g $optimization_c $warnings_c"
CXXFLAGS="-g $optimization_cxx $warnings_cxx"
else
CFLAGS="$optimization_c $warnings_c"
CXXFLAGS="$optimization_cxx $warnings_cxx"
fi
fi
fi
if test "$GCC" = yes -a "$enable_no_pic" != "no" ; then
CFLAGS="$CFLAGS -mdynamic-no-pic"
CXXFLAGS="$CXXFLAGS -mdynamic-no-pic"
fi
AM_CONDITIONAL(HAVE_RAWDRIVE, true)
if test x"$enable_rs232" != "xno"; then
AC_DEFINE(HAVE_RS232,,[Enable RS232 emulation.])
fi
AC_DEFINE(HAVE_RAWDRIVE,,[Support for block device disk image access.])
AC_DEFINE(HAVE_MOUSE,,[Enable 1351 mouse support])
AC_DEFINE(MACOSX_SUPPORT,,[Enable Mac OS X specific code.])
if test "x$enable_bundle" != "xno" -o "x$enable_sdlui" = "xyes"; then
echo "enabled Mac application bundles"
AC_DEFINE(MACOSX_BUNDLE,,[Enable Mac OS X application bundles.])
else
echo "disabled Mac application bundles"
fi
;;
dnl All other UN*X systems
*)
dnl special handling of sco unixware 7.x
case "$host_os" in
sco3.2v7*)
LIBS="-lxti -lsocket -lnsl $LIBS"
;;
esac
case "$host" in
*x11beos*)
LIBS="$LIBS -lbe -ltracker -ldevice -lgame"
;;
alpha*-*-linux*)
if test x"$CC" = "xccc"; then
echo "Using Compaq C Compiler cflags."
CFLAGS="-w0 -g3 -migrate -fast -inline speed -unroll 0 -arch host -tune host"
AC_DEFINE(__DECALPHA__,1,[define when using the alpha compaq compiler])
fi
;;
sparc-*-sunos4*)
if test x"$CC" = "xcc"; then
echo "Using Sun C Compiler cflags."
CFLAGS="-O -xCC"
fi
;;
*-sgi-irix*)
if test x"$CC" = "xcc"; then
echo "Using SGI C Compiler cflags."
CFLAGS="-O2 -woff all"
fi
;;
alpha*-dec-osf*)
if test x"$CC" = "xcc"; then
echo "Using Tru64 C Compiler cflags."
CFLAGS="-fast -O2 -std -g3 -non_shared"
fi
;;
esac
is_unix=yes
is_unix_x11=yes
if test -z "$user_cflags" ; then
dnl Check for the type of compiler first.
if test x"$GCC" = "xyes" ; then
warnings_cxx="-Wall -Wno-inline"
if test x"$enable_gnomeui" != "xyes" ; then
warnings_c="-Wstrict-prototypes $warnings_cxx"
else
dnl "-Wstrict-prototypes" gives zillions of warnings in gtk headers
dnl warnings_gnome="-DGTK_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGNOME_DISABLE_DEPRECATED -DG_DISABLE_DEPRECATED"
warnings_c="$warnings_gnome $warnings_cxx"
fi
dnl Set appropriate optimization options (better than the default -g -O)
dnl if using GCC.
dnl If the user has specified her own `CFLAGS', we do not override them.
optimization_c="-O3 $march"
optimization_cxx="-fno-exceptions $optimization_c"
dnl Use -g if available.
if test x"$ac_cv_prog_cc_g" = "xyes" ; then
CFLAGS="-g $optimization_c $warnings_c"
CXXFLAGS="-g $optimization_cxx $warnings_cxx"
else
CFLAGS="$optimization_c $warnings_c"
CXXFLAGS="$optimization_cxx $warnings_cxx"
fi
dnl Check whether the options are OK.
AC_PROG_CC
fi
dnl (If not on GCC, just keep the defaults, which are very conservative).
fi
AM_CONDITIONAL(HAVE_RAWDRIVE, true)
AC_DEFINE(HAVE_RAWDRIVE,,[Support for block device disk image access.])
AC_DEFINE(HAVE_MOUSE,,[Enable 1351 mouse support])
if test x"$is_beos_x11" != "xyes"; then
if test x"$enable_midi" != "xno"; then
AC_DEFINE(HAVE_MIDI,,[Enable support for MIDI.])
fi
if test x"$enable_rs232" != "xno"; then
AC_DEFINE(HAVE_RS232,,[Enable RS232 emulation.])
fi
fi
AC_CHECK_HEADER(linux/hardsid.h,
[ AC_DEFINE(HAVE_HARDSID,,[Support for HardSID.]) ],)
;;
esac
fi
dnl This enables the embedded data files feature, which should
dnl only be used for developing new ports or for ports for which
dnl the loading of the datafiles is hard/impossible.
if test x"$enable_embedded" = "xyes"; then
AC_DEFINE(USE_EMBEDDED,,[Use embedded data files.])
AM_CONDITIONAL(EMBEDDED, true)
else
AM_CONDITIONAL(EMBEDDED, false)
fi
AM_CONDITIONAL(USE_MIDAS_SOUND, test x"$with_midas" = "xyes")
dnl check for texi to amigaguide program
AC_CHECK_PROGS(MAKEGUIDE, makeguide, no)
if test x"$MAKEGUIDE" != "xno"; then
AM_CONDITIONAL(BUILD_AMIGAGUIDE, true)
else
if test x"$MAKEINFO" != "xno"; then
AC_MSG_CHECKING([if the makeinfo supports amigaguide])
agresult=`$MAKEINFO --help 2>&1 | grep amiga`
if test x"$agresult" != "x"; then
AC_MSG_RESULT([yes])
MAKEGUIDE=$MAKEINFO
AM_CONDITIONAL(BUILD_AMIGAGUIDE, true)
else
AC_MSG_RESULT([no])
AM_CONDITIONAL(BUILD_AMIGAGUIDE, false)
fi
else
AM_CONDITIONAL(BUILD_AMIGAGUIDE, false)
fi
fi
AC_SUBST(MAKEGUIDE)
dnl check for windows chm compiler
AC_CHECK_PROGS(HHC, hhc, no)
if test x"$HHC" = "xno"; then
AM_CONDITIONAL(BUILD_CHM, false)
else
AM_CONDITIONAL(BUILD_CHM, true)
fi
dnl check for windows hlp compiler programs
AC_CHECK_PROGS(MAKERTF, makertf, no)
AC_CHECK_PROGS(HCRTF, hcrtf, no)
if test x"$MAKERTF" = "xno" -o x"$HCRTF" = "xno"; then
AM_CONDITIONAL(BUILD_HLP, false)
else
AM_CONDITIONAL(BUILD_HLP, true)
fi
dnl check for os/2 ipf compiler programs
AC_CHECK_PROGS(TEXI2IPF, texi2ipf, no)
AC_CHECK_PROGS(IPFC, wipfc, no)
if test x"$TEXI2IPF" != "xno"; then
if test x"$IPFC" = "xno"; then
AC_CHECK_PROGS(IPFC, ipfc, no)
fi
if test x"$IPFC" != "xno"; then
AM_CONDITIONAL(BUILD_IPF, true)
else
AM_CONDITIONAL(BUILD_IPF, false)
fi
else
AM_CONDITIONAL(BUILD_IPF, false)
fi
dnl Extension for executable files in this system
AC_EXEEXT
dnl NLS stuff
dnl Its has been rejected to use the full GNU gettext package
dnl delivered within the source. This is a minimum replacement implementing
dnl a simple check to find `libintl.h' and `gettext'.
dnl
dnl Add new languages here
ALL_LINGUAS="da de es fr hu it ko nl pl ru sv tr"
dnl These rules are solely for the distribution goal. While doing this
dnl we only have to keep exactly one list of the available catalogs
dnl in configure.in.
for lang in $ALL_LINGUAS; do
GMOFILES="$GMOFILES $lang.gmo"
POFILES="$POFILES $lang.po"
done
AC_SUBST(GMOFILES)
AC_SUBST(POFILES)
if test x"$enable_nls" != "xno" -a x"$is_unix" = "xyes"; then
AC_CHECK_HEADER(libintl.h,
[AC_CACHE_CHECK([for gettext in libc], gt_cv_func_gettext_libc,
[AC_TRY_LINK([#include <libintl.h>], [return (int) gettext ("")],
gt_cv_func_gettext_libc=yes, gt_cv_func_gettext_libc=no)])
AC_CACHE_CHECK([for gettext in libintl], gt_cv_func_gettext_libintl,
[save_libs="$LIBS"
LIBS="-lintl $LIBS"
AC_TRY_LINK([#include <libintl.h>], [return (int) gettext ("")],
INTLLIBS=-lintl gt_cv_func_gettext_libintl=yes, gt_cv_func_gettext_libintl=no)
LIBS="$save_libs"])
if test "$gt_cv_func_gettext_libc" = "yes" \
|| test "$gt_cv_func_gettext_libintl" = "yes"; then
AC_DEFINE(HAVE_GETTEXT,,[Define if gettext if available.])
AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
if test "$MSGFMT" != "no"; then
AC_CHECK_FUNCS(dcgettext)
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
return _nl_msg_cat_cntr],
[CATOBJEXT=.gmo
DATADIRNAME=share],
[CATOBJEXT=.mo
DATADIRNAME=lib])
INSTOBJEXT=.mo
fi
USE_NLS=yes
AC_DEFINE(ENABLE_NLS,,[Define if NLS support is enabled.])
AC_DEFINE(HAVE_LIBINTL_H,,[use libintl for NLS.])
AC_DEFINE_UNQUOTED(DATADIRNAME, "$DATADIRNAME",[NLS datadirname.])
dnl this is prefixed with PREFIX
AC_DEFINE(NLS_LOCALEDIR, PREFIX"/"DATADIRNAME"/locale",[NLS local directory.])
else
AC_MSG_WARN([libintl.h not found, disabling NLS])
USE_NLS=no
fi
])
dnl Test whether we really found GNU xgettext.
if test "$XGETTEXT" != ":"; then
dnl If it is no GNU xgettext we define it as : so that the
dnl Makefiles still can work.
if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
: ;
else
AC_MSG_RESULT(
[found xgettext program is not GNU xgettext; ignore it])
XGETTEXT=":"
fi
fi
dnl Test wether GMSGFMT is there. Should fix `make dist'.
if test "$GMSGFMT" = "" ; then
GMSGFMT=":"
fi
# We need to process the po/ directory.
POSUB=po
AC_OUTPUT_COMMANDS(
[case "$CONFIG_FILES" in *po/Makefile.in*)
sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
esac])
dnl Make all variables we use known to autoconf.
AC_SUBST(USE_INCLUDED_LIBINTL)
AC_SUBST(CATALOGS)
AC_SUBST(DATADIRNAME)
AC_SUBST(INSTOBJEXT)
AC_SUBST(INTLDEPS)
AC_SUBST(INTLLIBS)
AC_SUBST(INTLOBJS)
AC_SUBST(POSUB)
AC_SUBST(GENCAT)
dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
dnl Try to locate is.
MKINSTALLDIRS=
if test -n "$ac_aux_dir"; then
MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
fi
if test -z "$MKINSTALLDIRS"; then
MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
fi
AC_SUBST(MKINSTALLDIRS)
dnl currently no catgets support, can't check it.
GENCAT=
AC_SUBST(GENCAT)
else
if test x"$is_unix" = "xyes"; then
AC_MSG_WARN([disabling NLS on user request])
fi
USE_NLS=no
fi
if test x"$USE_NLS" = "x" ; then
USE_NLS=no
fi
if test "$MSGFMT" = "no" ; then
dnl Fallback to shipped .gmo
dnl Those should work on x86 linux systems.
AC_MSG_WARN([msgfmt not found, falling back to default catalogs (x86/Linux)])
CATOBJEXT=".gmo"
fi
AC_SUBST(CATOBJEXT)
AC_SUBST(USE_NLS)
AC_SUBST(NLS_LOCALEDIR)
dnl Check for a perl interpreter.
AC_PATH_PROG(PERL, perl)
AC_SUBST(PERL)
if test x"$POSUB" = "xpo"; then
AM_CONDITIONAL(PO_SUBDIR_USED, true)
else
AM_CONDITIONAL(PO_SUBDIR_USED, false)
fi
dnl Check if --param inline-unit-growth=60 can be used.
old_CFLAGS=$CFLAGS
CFLAGS="$CFLAGS --param inline-unit-growth=60"
AC_MSG_CHECKING([if the compiler accepts --param inline-unit-growth=60])
AC_TRY_COMPILE([],
[int test;],
[ AC_MSG_RESULT(yes)
INLINE_UNIT_GROWTH="--param inline-unit-growth=60"
],
[ AC_MSG_RESULT(no)
INLINE_UNIT_GROWTH=""
])
CFLAGS=$old_CFLAGS
AC_SUBST(INLINE_UNIT_GROWTH)
dnl Check if --param max-inline-insns-single=600 can be used.
old_CFLAGS=$CFLAGS
CFLAGS="$CFLAGS --param max-inline-insns-single=600"
AC_MSG_CHECKING([if the compiler accepts --param max-inline-insns-single=600])
AC_TRY_COMPILE([],
[int test;],
[ AC_MSG_RESULT(yes)
MAX_INLINE_INSN_SINGLE="--param max-inline-insns-single=600"
],
[ AC_MSG_RESULT(no)
MAX_INLINE_INSN_SINGLE=""
])
CFLAGS=$old_CFLAGS
AC_SUBST(MAX_INLINE_INSN_SINGLE)
dnl Check and setup aRts compilation.