-
Notifications
You must be signed in to change notification settings - Fork 1
/
configure.in
1137 lines (1008 loc) · 25.4 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
#*****************************************************************************
#* pce *
#*****************************************************************************
#*****************************************************************************
#* File name: configure.in *
#* Created: 2002-05-20 by Hampa Hug <[email protected]> *
#* Copyright: (C) 2002-2018 Hampa Hug <[email protected]> *
#*****************************************************************************
#*****************************************************************************
#* This program is free software. You can redistribute it and / or modify it *
#* under the terms of the GNU General Public License version 2 as published *
#* by the Free Software Foundation. *
#* *
#* This program is distributed in the hope that it will be useful, but *
#* WITHOUT ANY WARRANTY, without even the implied warranty of *
#* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General *
#* Public License for more details. *
#*****************************************************************************
AC_PREREQ(2.50)
AC_INIT(pce)
AC_CONFIG_SRCDIR(Makefile.in)
AC_CONFIG_HEADER(src/config.h)
#-----------------------------------------------------------------------------
# package version
AC_MSG_CHECKING([pce version])
if test ! -r "$srcdir/version" ; then
AC_MSG_RESULT([file 'version' not found in source directory])
exit 1
fi
read p PCE_VERSION_MAJ PCE_VERSION_MIN PCE_VERSION_MIC dstr r < "$srcdir/version"
PCE_VERSION_STR=$dstr
if test "x$dstr" = "xscm" ; then
if test -d "$srcdir/.git" ; then
tmp=gitlog.$$.tmp
( cd "$srcdir" && git log -1 --date=iso --abbrev=8 --pretty="format:%h %cd" HEAD ) > "$tmp" 2> /dev/null
read hash date time rest < "$tmp"
rm -f "$tmp"
date=`echo "$date" | sed -e "s/-//g"`
dirty=`cd "$srcdir" && git describe --tags --dirty --always 2> /dev/null`
case "$dirty" in
*-dirty)
dirty=-mod
;;
*)
dirty=""
;;
esac
PCE_VERSION_STR="$date-$hash$dirty"
fi
elif test "x$dstr" = "x" ; then
PCE_VERSION_STR="$PCE_VERSION_MAJ.$PCE_VERSION_MIN.$PCE_VERSION_MIC"
fi
AC_SUBST(PCE_VERSION_MAJ)
AC_SUBST(PCE_VERSION_MIN)
AC_SUBST(PCE_VERSION_MIC)
AC_SUBST(PCE_VERSION_STR)
AC_DEFINE_UNQUOTED(PCE_VERSION_MAJ, $PCE_VERSION_MAJ)
AC_DEFINE_UNQUOTED(PCE_VERSION_MIN, $PCE_VERSION_MIN)
AC_DEFINE_UNQUOTED(PCE_VERSION_MIC, $PCE_VERSION_MIC)
AC_DEFINE_UNQUOTED(PCE_VERSION_STR, "$PCE_VERSION_STR")
AC_MSG_RESULT([$PCE_VERSION_STR ($PCE_VERSION_MAJ.$PCE_VERSION_MIN.$PCE_VERSION_MIC)])
#-----------------------------------------------------------------------------
# host
AC_CANONICAL_HOST
AC_MSG_CHECKING([host OS])
PCE_HOST_LINUX=0
PCE_HOST_WINDOWS=0
PCE_HOST_SUNOS=0
PCE_HOST_NETBSD=0
case "$host_os" in
[[Ll]]inux*)
PCE_HOST_LINUX=1
AC_DEFINE(PCE_HOST_LINUX)
AC_MSG_RESULT([Linux])
;;
mingw*)
PCE_HOST_WINDOWS=1
AC_DEFINE(PCE_HOST_WINDOWS)
AC_MSG_RESULT([Windows])
;;
SunOS*)
PCE_HOST_SUNOS=1
AC_DEFINE(PCE_HOST_SUNOS)
AC_MSG_RESULT([SunOS])
;;
netbsd*)
PCE_HOST_NETBSD=1
AC_DEFINE(PCE_HOST_NETBSD)
AC_MSG_RESULT([NetBSD])
;;
*)
AC_MSG_RESULT([unknown ($host_os)])
;;
esac
AC_SUBST(PCE_HOST_LINUX)
AC_SUBST(PCE_HOST_WINDOWS)
AC_SUBST(PCE_HOST_SUNOS)
AC_SUBST(PCE_HOST_NETBSD)
AC_MSG_CHECKING([host cpu])
PCE_HOST_IA32=0
PCE_HOST_PPC=0
PCE_HOST_SPARC=0
case "$host_cpu" in
i?86)
PCE_HOST_IA32=1
AC_DEFINE(PCE_HOST_IA32)
AC_MSG_RESULT([IA32])
;;
powerpc*)
PCE_HOST_PPC=1
AC_DEFINE(PCE_HOST_PPC)
AC_MSG_RESULT([powerpc])
;;
sparc* | sun4*)
PCE_HOST_SPARC=1
AC_DEFINE(PCE_HOST_SPARC)
AC_MSG_RESULT([sparc])
;;
*)
AC_MSG_RESULT([unknown ($host_cpu)])
;;
esac
AC_SUBST(PCE_HOST_IA32)
AC_SUBST(PCE_HOST_PPC)
AC_SUBST(PCE_HOST_SPARC)
#-----------------------------------------------------------------------------
# Checks for programs
AC_PROG_CC
AC_PROG_INSTALL
case "$INSTALL" in
.*)
d=`dirname "$INSTALL"`
f=`basename "$INSTALL"`
INSTALL=`cd "$d" && pwd`/"$f"
;;
esac
AC_PATH_PROG(AR, ar, ar)
AC_PROG_RANLIB
AC_PROG_MAKE_SET
AC_PROG_LN_S
AC_PATH_PROG(NASM, nasm,)
if test -x "$NASM" ; then
PCE_HAVE_NASM=1
else
PCE_HAVE_NASM=0
fi
AC_SUBST(PCE_HAVE_NASM)
AC_PATH_PROG(IHEX, ihex,)
if test -x "$IHEX" ; then
PCE_HAVE_IHEX=1
else
PCE_HAVE_IHEX=0
fi
AC_SUBST(PCE_HAVE_IHEX)
#-----------------------------------------------------------------------------
# Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS( \
arpa/inet.h \
fcntl.h \
linux/if_tun.h \
linux/tcp.h \
limits.h \
netdb.h \
netinet/in.h \
poll.h \
sys/ioctl.h \
sys/poll.h \
sys/socket.h \
sys/soundcard.h \
sys/stat.h \
sys/time.h \
sys/types.h \
termios.h \
unistd.h
)
AC_CHECK_HEADER(stdint.h,
[AC_DEFINE(HAVE_STDINT_H)
PCE_HAVE_STDINT_H=1],
PCE_HAVE_STDINT_H=0
)
AC_SUBST(PCE_HAVE_STDINT_H)
AC_CHECK_HEADER(inttypes.h,
[AC_DEFINE(HAVE_INTTYPES_H)
PCE_HAVE_INTTYPES_H=1],
PCE_HAVE_INTTYPES_H=0
)
AC_SUBST(PCE_HAVE_INTTYPES_H)
#-----------------------------------------------------------------------------
# Checks for libraries
AC_FUNC_FSEEKO
AC_CHECK_FUNCS(ftruncate futimes gettimeofday nanosleep sleep usleep)
AC_SEARCH_LIBS(socket, socket)
AC_SEARCH_LIBS(accept, socket)
AC_SEARCH_LIBS(gethostbyname, nsl resolv socket)
AC_SEARCH_LIBS(inet_aton, nsl resolv socket)
AC_PATH_X
if test "x$no_x" = "xyes" ; then
PCE_ENABLE_X11=0
PCE_X11_CFLAGS=""
PCE_X11_LIBS=""
else
PCE_ENABLE_X11=1
if test -n "$x_includes" ; then
PCE_X11_CFLAGS="-I$x_includes"
else
PCE_X11_CFLAGS=""
fi
if test -n "$x_libraries" ; then
PCE_X11_LIBS="-L$x_libraries -lX11"
else
PCE_X11_LIBS="-lX11"
fi
AC_DEFINE(PCE_ENABLE_X11)
fi
AC_SUBST(PCE_ENABLE_X11)
AC_SUBST(PCE_X11_CFLAGS)
AC_SUBST(PCE_X11_LIBS)
PCE_ENABLE_SDL=0
PCE_ENABLE_SDL1=0
PCE_ENABLE_SDL2=0
AC_MSG_CHECKING([for SDL])
AC_ARG_WITH(sdl,
[AS_HELP_STRING([--with-sdl], [Build the SDL terminal [detected]])],
[
case "$withval" in
"no")
AC_MSG_RESULT([no (forced)])
;;
"1")
PCE_ENABLE_SDL=1
PCE_ENABLE_SDL1=1
AC_MSG_RESULT([1 (forced)])
;;
"2")
PCE_ENABLE_SDL=1
PCE_ENABLE_SDL2=1
AC_MSG_RESULT([2 (forced)])
;;
esac
],
[
if sdl2-config --version > /dev/null 2>&1 ; then
PCE_ENABLE_SDL=1
PCE_ENABLE_SDL2=1
AC_MSG_RESULT([2 (detected)])
elif sdl-config --version > /dev/null 2>&1 ; then
PCE_ENABLE_SDL=1
PCE_ENABLE_SDL1=1
AC_MSG_RESULT([1 (detected)])
else
AC_MSG_RESULT([no (detected)])
fi
]
)
if test "x$PCE_ENABLE_SDL1" != "x0" ; then
PCE_SDL_CFLAGS=`sdl-config --cflags`
PCE_SDL_LIBS=`sdl-config --libs`
AC_DEFINE(PCE_ENABLE_SDL)
AC_DEFINE(PCE_ENABLE_SDL1)
elif test "x$PCE_ENABLE_SDL2" != "x0" ; then
PCE_SDL_CFLAGS=`sdl2-config --cflags`
PCE_SDL_LIBS=`sdl2-config --libs`
AC_DEFINE(PCE_ENABLE_SDL)
AC_DEFINE(PCE_ENABLE_SDL2)
fi
AC_SUBST(PCE_ENABLE_SDL)
AC_SUBST(PCE_ENABLE_SDL1)
AC_SUBST(PCE_ENABLE_SDL2)
AC_SUBST(PCE_SDL_CFLAGS)
AC_SUBST(PCE_SDL_LIBS)
#-----------------------------------------------------------------------------
# Checks for options
AC_ARG_ENABLE(largefile,
[AS_HELP_STRING([--disable-largefile], [Disable large file support [no]])],
opt_large=$enableval
)
if test "$opt_large" = "no" ; then
PCE_LARGE_FILE="0"
else
AC_DEFINE(PCE_LARGE_FILE)
PCE_LARGE_FILE="1"
fi
AC_SUBST(PCE_LARGE_FILE)
if test -d "$srcdir/src/arch/ibmpc"; then have_ibmpc=1; else have_ibmpc=0; fi
if test -d "$srcdir/src/arch/macplus"; then have_macplus=1; else have_macplus=0; fi
if test -d "$srcdir/src/arch/rc759"; then have_rc759=1; else have_rc759=0; fi
if test -d "$srcdir/src/arch/sim405"; then have_sim405=1; else have_sim405=0; fi
if test -d "$srcdir/src/arch/sim6502"; then have_sim6502=1; else have_sim6502=0; fi
if test -d "$srcdir/src/arch/simarm"; then have_simarm=1; else have_simarm=0; fi
if test -d "$srcdir/src/arch/sims32"; then have_sims32=1; else have_sims32=0; fi
AC_MSG_CHECKING([whether to build the Atari ST emulator])
AC_ARG_ENABLE(atari-st,
[AS_HELP_STRING([--enable-atari-st], [Enable the Atari ST emulator [yes]])],
[
if test "x$enableval" = "xyes" ; then
PCE_BUILD_ATARIST=1
AC_MSG_RESULT([yes (forced)])
else
PCE_BUILD_ATARIST=0
AC_MSG_RESULT([no (forced)])
fi
],
[
PCE_BUILD_ATARIST=1
AC_MSG_RESULT([yes (default)])
]
)
AC_SUBST(PCE_BUILD_ATARIST)
if test $PCE_BUILD_ATARIST -eq 1 ; then
AC_DEFINE(PCE_BUILD_ATARIST)
fi
AC_MSG_CHECKING([whether to build the CPM-80 emulator])
AC_ARG_ENABLE(cpm80,
[AS_HELP_STRING([--enable-cpm80], [Enable the CPM-80 emulator [yes]])],
[
if test "x$enableval" = "xyes" ; then
PCE_BUILD_CPM80=1
AC_MSG_RESULT([yes (forced)])
else
PCE_BUILD_CPM80=0
AC_MSG_RESULT([no (forced)])
fi
],
[
PCE_BUILD_CPM80=1
AC_MSG_RESULT([yes (default)])
]
)
AC_SUBST(PCE_BUILD_CPM80)
if test "x$PCE_BUILD_CPM80" = "x1" ; then
AC_DEFINE(PCE_BUILD_CPM80)
fi
AC_MSG_CHECKING([whether to build the IBM PC emulator])
if test "x$have_ibmpc" != "x1" ; then
PCE_BUILD_IBMPC=0
AC_MSG_RESULT([no (no source)])
else
AC_ARG_ENABLE(ibmpc,
[AS_HELP_STRING([--enable-ibmpc], [Enable the IBM PC emulator [yes]])],
[
if test "x$enableval" = "xyes" ; then
PCE_BUILD_IBMPC=1
AC_MSG_RESULT([yes (forced)])
else
PCE_BUILD_IBMPC=0
AC_MSG_RESULT([no (forced)])
fi
],
[
PCE_BUILD_IBMPC=1
AC_MSG_RESULT([yes (default)])
]
)
fi
AC_SUBST(PCE_BUILD_IBMPC)
if test $PCE_BUILD_IBMPC -eq 1 ; then
AC_DEFINE(PCE_BUILD_IBMPC)
fi
AC_MSG_CHECKING([whether to build the IBM PC ROM])
AC_ARG_ENABLE(ibmpc-rom,
[AS_HELP_STRING([--enable-ibmpc-rom], [Build the IBM PC ROM from source [no]])],
[
if test "x$enableval" = "xyes" ; then
PCE_BUILD_IBMPC_ROM=1
AC_MSG_RESULT([yes])
else
PCE_BUILD_IBMPC_ROM=0
AC_MSG_RESULT([no])
fi
],
[
PCE_BUILD_IBMPC_ROM=0
AC_MSG_RESULT([no (default)])
]
)
AC_SUBST(PCE_BUILD_IBMPC_ROM)
AC_MSG_CHECKING([whether to build the Mac Plus emulator])
if test "x$have_macplus" != "x1" ; then
PCE_BUILD_MACPLUS=0
AC_MSG_RESULT([no (no source)])
else
AC_ARG_ENABLE(macplus,
[AS_HELP_STRING([--enable-macplus], [Enable the Mac Plus emulator [yes]])],
[
if test "x$enableval" = "xyes" ; then
PCE_BUILD_MACPLUS=1
AC_MSG_RESULT([yes (forced)])
else
PCE_BUILD_MACPLUS=0
AC_MSG_RESULT([no (forced)])
fi
],
[
PCE_BUILD_MACPLUS=1
AC_MSG_RESULT([yes (default)])
]
)
fi
AC_SUBST(PCE_BUILD_MACPLUS)
if test $PCE_BUILD_MACPLUS -eq 1 ; then
AC_DEFINE(PCE_BUILD_MACPLUS)
fi
AC_MSG_CHECKING([whether to build the Mac Plus ROM])
AC_ARG_ENABLE(macplus-rom,
[AS_HELP_STRING([--enable-macplus-rom], [Build the Mac Plus ROM from source [no]])],
[
if test "x$enableval" = "xyes" ; then
PCE_BUILD_MACPLUS_ROM=1
AC_MSG_RESULT([yes])
else
PCE_BUILD_MACPLUS_ROM=0
AC_MSG_RESULT([no])
fi
],
[
PCE_BUILD_MACPLUS_ROM=0
AC_MSG_RESULT([no (default)])
]
)
AC_SUBST(PCE_BUILD_MACPLUS_ROM)
AC_MSG_CHECKING([whether to build the RC759 Piccoline])
if test "x$have_rc759" != "x1" ; then
PCE_BUILD_RC759=0
AC_MSG_RESULT([no (no source)])
else
AC_ARG_ENABLE(rc759,
[AS_HELP_STRING([--enable-rc759], [Enable the RC759 Piccoline [yes]])],
[
if test "x$enableval" = "xyes" ; then
PCE_BUILD_RC759=1
AC_MSG_RESULT([yes (forced)])
else
PCE_BUILD_RC759=0
AC_MSG_RESULT([no (forced)])
fi
],
[
PCE_BUILD_RC759=1
AC_MSG_RESULT([yes (default)])
]
)
fi
AC_SUBST(PCE_BUILD_RC759)
if test $PCE_BUILD_RC759 -eq 1 ; then
AC_DEFINE(PCE_BUILD_RC759)
fi
AC_MSG_CHECKING([whether to build the PPC405 simulator])
if test "x$have_sim405" != "x1" ; then
PCE_BUILD_SIM405=0
AC_MSG_RESULT([no (no source)])
else
AC_ARG_ENABLE(sim405,
[AS_HELP_STRING([--enable-sim405], [Enable the PPC405 simulator [yes]])],
[
if test "x$enableval" = "xyes" ; then
PCE_BUILD_SIM405=1
AC_MSG_RESULT([yes (forced)])
else
PCE_BUILD_SIM405=0
AC_MSG_RESULT([no (forced)])
fi
],
[
PCE_BUILD_SIM405=1
AC_MSG_RESULT([yes (default)])
]
)
fi
AC_SUBST(PCE_BUILD_SIM405)
if test "x$PCE_BUILD_SIM405" = "x1" ; then
AC_DEFINE(PCE_BUILD_SIM405)
fi
AC_MSG_CHECKING([whether to build the 6502 simulator])
if test "x$have_sim6502" != "x1" ; then
PCE_BUILD_SIM6502=0
AC_MSG_RESULT([no (no source)])
else
AC_ARG_ENABLE(sim6502,
[AS_HELP_STRING([--enable-sim6502], [Enable the 6502 simulator [yes]])],
[
if test "x$enableval" = "xyes" ; then
PCE_BUILD_SIM6502=1
AC_MSG_RESULT([yes (forced)])
else
PCE_BUILD_SIM6502=0
AC_MSG_RESULT([no (forced)])
fi
],
[
PCE_BUILD_SIM6502=1
AC_MSG_RESULT([yes (default)])
]
)
fi
AC_SUBST(PCE_BUILD_SIM6502)
if test "x$PCE_BUILD_SIM6502" = "x1" ; then
AC_DEFINE(PCE_BUILD_SIM6502)
fi
AC_MSG_CHECKING([whether to build the sparc32 simulator])
if test "x$have_sims32" != "x1" ; then
PCE_BUILD_SIMS32=0
AC_MSG_RESULT([no (no source)])
else
AC_ARG_ENABLE(sims32,
[AS_HELP_STRING([--enable-sims32], [Enable the sparc32 simulator [yes]])],
[
if test "x$enableval" = "xyes" ; then
PCE_BUILD_SIMS32=1
AC_MSG_RESULT([yes (forced)])
else
PCE_BUILD_SIMS32=0
AC_MSG_RESULT([no (forced)])
fi
],
[
PCE_BUILD_SIMS32=1
AC_MSG_RESULT([yes (default)])
]
)
fi
AC_SUBST(PCE_BUILD_SIMS32)
if test "x$PCE_BUILD_SIMS32" = "x1" ; then
AC_DEFINE(PCE_BUILD_SIMS32)
fi
AC_MSG_CHECKING([whether to build the arm simulator])
if test "x$have_simarm" != "x1" ; then
PCE_BUILD_SIMARM=0
AC_MSG_RESULT([no (no source)])
else
AC_ARG_ENABLE(simarm,
[AS_HELP_STRING([--enable-simarm], [Enable the arm simulator [yes]])],
[
if test "x$enableval" = "xyes" ; then
PCE_BUILD_SIMARM=1
AC_MSG_RESULT([yes (forced)])
else
PCE_BUILD_SIMARM=0
AC_MSG_RESULT([no (forced)])
fi
],
[
PCE_BUILD_SIMARM=1
AC_MSG_RESULT([yes (default)])
]
)
fi
AC_SUBST(PCE_BUILD_SIMARM)
if test "x$PCE_BUILD_SIMARM" = "x1" ; then
AC_DEFINE(PCE_BUILD_SIMARM)
fi
AC_MSG_CHECKING([whether to enable tun])
AC_ARG_ENABLE(tun,
[AS_HELP_STRING([--enable-tun], [Enable tun networking [guessed]])],
[
if test "x$enableval" = "xyes" ; then
PCE_ENABLE_TUN=1
AC_MSG_RESULT([yes])
else
PCE_ENABLE_TUN=0
AC_MSG_RESULT([no])
fi
],
[
h1=$ac_cv_header_linux_if_tun_h
h2=$ac_cv_header_sys_ioctl_h
h3=$ac_cv_header_sys_poll_h
h4=$ac_cv_header_sys_socket_h
if test "x$h1" = "xyes" -a "x$h2" = "xyes" -a "x$h3" = "xyes" -a "x$h4" = "xyes" ; then
PCE_ENABLE_TUN=1
AC_MSG_RESULT([yes (guess)])
else
PCE_ENABLE_TUN=0
AC_MSG_RESULT([no (guess)])
fi
]
)
AC_SUBST(PCE_ENABLE_TUN)
if test "x$PCE_ENABLE_TUN" = "x1" ; then
AC_DEFINE(PCE_ENABLE_TUN)
fi
AC_MSG_CHECKING([whether to enable the posix file character driver])
AC_ARG_ENABLE(char-posix,
[AS_HELP_STRING([--enable-char-posix], [Enable the posix file character driver [guessed]])],
[
if test "x$enableval" = "xyes" ; then
PCE_ENABLE_CHAR_POSIX=1
AC_MSG_RESULT([yes])
else
PCE_ENABLE_CHAR_POSIX=0
AC_MSG_RESULT([no])
fi
],[
PCE_ENABLE_CHAR_POSIX=1
test "x$ac_cv_header_fcntl_h" = "xyes" || PCE_ENABLE_CHAR_POSIX=0
test "x$ac_cv_header_poll_h" = "xyes" || PCE_ENABLE_CHAR_POSIX=0
test "x$ac_cv_header_sys_stat_h" = "xyes" || PCE_ENABLE_CHAR_POSIX=0
test "x$ac_cv_header_unistd_h" = "xyes" || PCE_ENABLE_CHAR_POSIX=0
if test "x$PCE_ENABLE_CHAR_POSIX" = "x1" ; then
AC_MSG_RESULT([yes (guess)])
else
AC_MSG_RESULT([no (guess)])
fi
]
)
AC_SUBST(PCE_ENABLE_CHAR_POSIX)
if test "x$PCE_ENABLE_CHAR_POSIX" = "x1" ; then
AC_DEFINE(PCE_ENABLE_CHAR_POSIX)
fi
AC_MSG_CHECKING([whether to enable the PPP character driver])
AC_ARG_ENABLE(char-ppp,
[AS_HELP_STRING([--enable-char-ppp], [Enable the PPP character driver [guessed]])],
[
if test "x$enableval" = "xyes" ; then
PCE_ENABLE_CHAR_PPP=1
AC_MSG_RESULT([yes])
else
PCE_ENABLE_CHAR_PPP=0
AC_MSG_RESULT([no])
fi
],[
if test "x$PCE_ENABLE_TUN" = "x1" ; then
PCE_ENABLE_CHAR_PPP=1
AC_MSG_RESULT([yes (guess)])
else
PCE_ENABLE_CHAR_PPP=0
AC_MSG_RESULT([no (guess)])
fi
]
)
AC_SUBST(PCE_ENABLE_CHAR_PPP)
if test "x$PCE_ENABLE_CHAR_PPP" = "x1" ; then
AC_DEFINE(PCE_ENABLE_CHAR_PPP)
fi
AC_MSG_CHECKING([whether to enable the pty character driver])
AC_ARG_ENABLE(char-pty,
[AS_HELP_STRING([--enable-char-pty], [Enable the pty character driver [guessed]])],
[
if test "x$enableval" = "xyes" ; then
PCE_ENABLE_CHAR_PTY=1
AC_MSG_RESULT([yes])
else
PCE_ENABLE_CHAR_PTY=0
AC_MSG_RESULT([no])
fi
],[
PCE_ENABLE_CHAR_PTY=1
test "x$ac_cv_header_fcntl_h" = "xyes" || PCE_ENABLE_CHAR_PTY=0
test "x$ac_cv_header_termios_h" = "xyes" || PCE_ENABLE_CHAR_PTY=0
test "x$ac_cv_header_unistd_h" = "xyes" || PCE_ENABLE_CHAR_PTY=0
if test "x$PCE_ENABLE_CHAR_PTY" = "x1" ; then
AC_MSG_RESULT([yes (guess)])
else
AC_MSG_RESULT([no (guess)])
fi
]
)
AC_SUBST(PCE_ENABLE_CHAR_PTY)
if test "x$PCE_ENABLE_CHAR_PTY" = "x1" ; then
AC_DEFINE(PCE_ENABLE_CHAR_PTY)
fi
AC_MSG_CHECKING([whether to enable the SLIP character driver])
AC_ARG_ENABLE(char-slip,
[AS_HELP_STRING([--enable-char-slip], [Enable the SLIP character driver [guessed]])],
[
if test "x$enableval" = "xyes" ; then
PCE_ENABLE_CHAR_SLIP=1
AC_MSG_RESULT([yes])
else
PCE_ENABLE_CHAR_SLIP=0
AC_MSG_RESULT([no])
fi
],[
if test "x$PCE_ENABLE_TUN" = "x1" ; then
PCE_ENABLE_CHAR_SLIP=1
AC_MSG_RESULT([yes (guess)])
else
PCE_ENABLE_CHAR_SLIP=0
AC_MSG_RESULT([no (guess)])
fi
]
)
AC_SUBST(PCE_ENABLE_CHAR_SLIP)
if test "x$PCE_ENABLE_CHAR_SLIP" = "x1" ; then
AC_DEFINE(PCE_ENABLE_CHAR_SLIP)
fi
AC_MSG_CHECKING([whether to enable the TCP character driver])
AC_ARG_ENABLE(char-tcp,
[AS_HELP_STRING([--enable-char-tcp], [Enable the TCP character driver [guessed]])],
[
if test "x$enableval" = "xyes" ; then
PCE_ENABLE_CHAR_TCP=1
AC_MSG_RESULT([yes])
else
PCE_ENABLE_CHAR_TCP=0
AC_MSG_RESULT([no])
fi
],[
PCE_ENABLE_CHAR_TCP=1
test "x$ac_cv_header_arpa_inet_h" = "xyes" || PCE_ENABLE_CHAR_TCP=0
test "x$ac_cv_header_fcntl_h" = "xyes" || PCE_ENABLE_CHAR_TIOS=0
test "x$ac_cv_header_netinet_in_h" = "xyes" || PCE_ENABLE_CHAR_TCP=0
test "x$ac_cv_header_netdb_h" = "xyes" || PCE_ENABLE_CHAR_TCP=0
test "x$ac_cv_header_sys_socket_h" = "xyes" || PCE_ENABLE_CHAR_TCP=0
test "x$ac_cv_header_poll_h" = "xyes" || PCE_ENABLE_CHAR_TCP=0
test "x$ac_cv_header_unistd_h" = "xyes" || PCE_ENABLE_CHAR_TCP=0
if test "x$PCE_ENABLE_CHAR_TCP" = "x1" ; then
AC_MSG_RESULT([yes (guess)])
else
AC_MSG_RESULT([no (guess)])
fi
]
)
AC_SUBST(PCE_ENABLE_CHAR_TCP)
if test "x$PCE_ENABLE_CHAR_TCP" = "x1" ; then
AC_DEFINE(PCE_ENABLE_CHAR_TCP)
fi
AC_MSG_CHECKING([whether to enable the termios character driver])
AC_ARG_ENABLE(char-termios,
[AS_HELP_STRING([--enable-char-termios], [Enable the termios character driver [guessed]])],
[
if test "x$enableval" = "xyes" ; then
PCE_ENABLE_CHAR_TIOS=1
AC_MSG_RESULT([yes])
else
PCE_ENABLE_CHAR_TIOS=0
AC_MSG_RESULT([no])
fi
],[
PCE_ENABLE_CHAR_TIOS=1
test "x$ac_cv_header_fcntl_h" = "xyes" || PCE_ENABLE_CHAR_TIOS=0
test "x$ac_cv_header_sys_ioctl_h" = "xyes" || PCE_ENABLE_CHAR_TIOS=0
test "x$ac_cv_header_sys_poll_h" = "xyes" || PCE_ENABLE_CHAR_TIOS=0
test "x$ac_cv_header_termios_h" = "xyes" || PCE_ENABLE_CHAR_TIOS=0
test "x$ac_cv_header_unistd_h" = "xyes" || PCE_ENABLE_CHAR_TIOS=0
if test "x$PCE_ENABLE_CHAR_TIOS" = "x1" ; then
AC_MSG_RESULT([yes (guess)])
else
AC_MSG_RESULT([no (guess)])
fi
]
)
AC_SUBST(PCE_ENABLE_CHAR_TIOS)
if test "x$PCE_ENABLE_CHAR_TIOS" = "x1" ; then
AC_DEFINE(PCE_ENABLE_CHAR_TIOS)
fi
AC_MSG_CHECKING([whether to enable the windows COM character driver])
AC_ARG_ENABLE(char-wincom,
[AS_HELP_STRING([--enable-char-wincom], [Enable the windows COM character driver [guessed]])],
[
if test "x$enableval" = "xyes" ; then
PCE_ENABLE_CHAR_WINCOM=1
AC_MSG_RESULT([yes])
else
PCE_ENABLE_CHAR_WINCOM=0
AC_MSG_RESULT([no])
fi
],[
if test "x$PCE_HOST_WINDOWS" = "x1" ; then
PCE_ENABLE_CHAR_WINCOM=1
AC_MSG_RESULT([yes (guess)])
else
PCE_ENABLE_CHAR_WINCOM=0
AC_MSG_RESULT([no (guess)])
fi
]
)
AC_SUBST(PCE_ENABLE_CHAR_WINCOM)
if test "x$PCE_ENABLE_CHAR_WINCOM" = "x1" ; then
AC_DEFINE(PCE_ENABLE_CHAR_WINCOM)
fi
AC_MSG_CHECKING([whether to enable the OSS sound driver])
AC_ARG_ENABLE(sound-oss,
[AS_HELP_STRING([--enable-sound-oss], [Enable the OSS sound driver driver [guessed]])],
[
if test "x$enableval" = "xyes" ; then
PCE_ENABLE_SOUND_OSS=1
AC_MSG_RESULT([yes])
else
PCE_ENABLE_SOUND_OSS=0
AC_MSG_RESULT([no])
fi
],[
PCE_ENABLE_SOUND_OSS=1
test "x$ac_cv_header_fcntl_h" = "xyes" || PCE_ENABLE_SOUND_OSS=0
test "x$ac_cv_header_sys_ioctl_h" = "xyes" || PCE_ENABLE_SOUND_OSS=0
test "x$ac_cv_header_sys_soundcard_h" = "xyes" || PCE_ENABLE_SOUND_OSS=0
if test "x$PCE_ENABLE_SOUND_OSS" = "x1" ; then
AC_MSG_RESULT([yes (guess)])
else
AC_MSG_RESULT([no (guess)])
fi
]
)
AC_SUBST(PCE_ENABLE_SOUND_OSS)
if test "x$PCE_ENABLE_SOUND_OSS" = "x1" ; then
AC_DEFINE(PCE_ENABLE_SOUND_OSS)
fi
AC_MSG_CHECKING([whether to enable readline])
AC_ARG_ENABLE(readline,
[AS_HELP_STRING([--enable-readline], [Enable readline [guessed]])],
[
if test "x$enableval" = "xyes" ; then
PCE_ENABLE_READLINE=1
PCE_READLINE_LIBS="-lreadline -lhistory -lncurses"
AC_MSG_RESULT([yes])
else
PCE_ENABLE_READLINE=0
PCE_READLINE_LIBS=""
AC_MSG_RESULT([no])
fi
],
[
AC_MSG_RESULT([maybe])
AC_CHECK_LIB(ncurses, initscr, ok=1, ok=0)
if test "x$ok" = "x1" ; then
AC_CHECK_LIB(readline, rl_bind_key, ok=1, ok=0, -lncurses)
fi
if test "x$ok" = "x1" ; then
AC_CHECK_LIB(history, add_history, ok=1, ok=0)
fi
AC_MSG_CHECKING([whether to enable readline])
if test "x$ok" = "x1" ; then
PCE_ENABLE_READLINE=1
PCE_READLINE_LIBS="-lreadline -lhistory -lncurses"
AC_MSG_RESULT([yes (guess)])
else
PCE_ENABLE_READLINE=0
PCE_READLINE_LIBS=""
AC_MSG_RESULT([no (guess)])
fi
]
)
AC_SUBST(PCE_ENABLE_READLINE)
AC_SUBST(PCE_READLINE_LIBS)
if test "x$PCE_ENABLE_READLINE" = "x1" ; then
AC_DEFINE(PCE_ENABLE_READLINE)
fi
eval "pce_etcdir=$sysconfdir"
eval "pce_etcdir=$pce_etcdir"
eval "pce_datdir=$datadir"
eval "pce_datdir=$pce_datdir"
PCE_DIR_ETC=$pce_etcdir
PCE_DIR_DATA=$pce_datdir
AC_SUBST(PCE_DIR_ETC)
AC_SUBST(PCE_DIR_DATA)
AC_DEFINE_UNQUOTED(PCE_DIR_ETC, "$pce_etcdir")
AC_DEFINE_UNQUOTED(PCE_DIR_DATA, "$pce_datdir")
dnl --------------------------------------------------------------------------
emu1=""
emu2=""
if test "x$PCE_BUILD_ATARIST" = "x1" ; then
emu1="$emu1 atarist"
else
emu2="$emu2 atarist"
fi
if test "x$PCE_BUILD_CPM80" = "x1" ; then
emu1="$emu1 cpm80"
else
emu2="$emu2 cpm80"
fi
if test "x$PCE_BUILD_IBMPC" = "x1" ; then
emu1="$emu1 ibmpc"
else
emu2="$emu2 ibmpc"
fi
if test "x$PCE_BUILD_MACPLUS" = "x1" ; then
emu1="$emu1 macplus"
else
emu2="$emu2 macplus"
fi
if test "x$PCE_BUILD_RC759" = "x1" ; then
emu1="$emu1 rc759"
else
emu2="$emu2 rc759"
fi
if test "x$PCE_BUILD_SIM405" = "x1" ; then
emu1="$emu1 sim405"
else
emu2="$emu2 sim405"
fi
if test "x$PCE_BUILD_SIM6502" = "x1" ; then
emu1="$emu1 sim6502"
else
emu2="$emu2 sim6502"
fi
if test "x$PCE_BUILD_SIMARM" = "x1" ; then
emu1="$emu1 simarm"
else
emu2="$emu2 simarm"
fi
if test "x$PCE_BUILD_SIMS32" = "x1" ; then
emu1="$emu1 sims32"
else
emu2="$emu2 sims32"
fi
romext1=""
romext2=""
if test "x$PCE_BUILD_IBMPC_ROM" = "x1" ; then
romext1="$romext1 ibmpc"