6 |
|
AC_CONFIG_HEADER(config.h) |
7 |
|
|
8 |
|
dnl Options. |
9 |
< |
WANT_DGA=yes |
10 |
< |
WANT_UI=yes |
11 |
< |
AC_ARG_ENABLE(dga, [ --enable-dga use the DGA extension (default)], [WANT_DGA=$enableval], []) |
12 |
< |
AC_ARG_ENABLE(ui, [ --enable-ui use GTK user interface (default)], [WANT_UI=$enableval], []) |
9 |
> |
AC_ARG_ENABLE(xf86-dga, [ --enable-xf86-dga use the XFree86 DGA extension [default=yes]], [WANT_XF86_DGA=$enableval], [WANT_XF86_DGA=yes]) |
10 |
> |
AC_ARG_ENABLE(xf86-vidmode, [ --enable-xf86-vidmode use the XFree86 VidMode extension [default=yes]], [WANT_XF86_VIDMODE=$enableval], [WANT_XF86_VIDMODE=yes]) |
11 |
> |
AC_ARG_ENABLE(fbdev-dga, [ --enable-fbdev-dga use direct frame buffer access via /dev/fb [default=yes]], [WANT_FBDEV_DGA=$enableval], [WANT_FBDEV_DGA=yes]) |
12 |
> |
AC_ARG_WITH(esd, [ --with-esd support ESD for sound under Linux/FreeBSD [default=yes]], [WANT_ESD=$withval], [WANT_ESD=yes]) |
13 |
> |
AC_ARG_WITH(gtk, [ --with-gtk use GTK user interface [default=yes]], [WANT_GTK=$withval], [WANT_GTK=yes]) |
14 |
> |
AC_ARG_WITH(mon, [ --with-mon use mon as debugger [default=yes]], [WANT_MON=$withval], [WANT_MON=yes]) |
15 |
|
|
16 |
|
dnl Checks for programs. |
17 |
|
AC_PROG_CC |
20 |
|
AC_PROG_MAKE_SET |
21 |
|
AC_PROG_INSTALL |
22 |
|
|
23 |
+ |
dnl Check for i386 target CPU. |
24 |
+ |
HAVE_I386=no |
25 |
+ |
AC_MSG_CHECKING(for x86 target CPU) |
26 |
+ |
AC_EGREP_CPP(yes, |
27 |
+ |
[ |
28 |
+ |
#ifdef __i386__ |
29 |
+ |
yes |
30 |
+ |
#endif |
31 |
+ |
], [AC_MSG_RESULT(yes); HAVE_I386=yes], AC_MSG_RESULT(no)) |
32 |
+ |
|
33 |
+ |
dnl Check for SPARC target CPU. |
34 |
+ |
HAVE_SPARC=no |
35 |
+ |
AC_MSG_CHECKING(for SPARC target CPU) |
36 |
+ |
AC_EGREP_CPP(yes, |
37 |
+ |
[ |
38 |
+ |
#ifdef __sparc__ |
39 |
+ |
yes |
40 |
+ |
#endif |
41 |
+ |
], [AC_MSG_RESULT(yes); HAVE_SPARC=yes], AC_MSG_RESULT(no)) |
42 |
+ |
|
43 |
+ |
dnl Check for m68k target CPU. |
44 |
+ |
HAVE_M68K=no |
45 |
+ |
AC_MSG_CHECKING(for m68k target CPU) |
46 |
+ |
AC_EGREP_CPP(yes, |
47 |
+ |
[ |
48 |
+ |
#ifdef __m68k__ |
49 |
+ |
yes |
50 |
+ |
#endif |
51 |
+ |
], [AC_MSG_RESULT(yes); HAVE_M68K=yes], AC_MSG_RESULT(no)) |
52 |
+ |
|
53 |
+ |
dnl We use mon if possible. |
54 |
+ |
MONSRCS= |
55 |
+ |
if [[ "x$WANT_MON" = "xyes" ]]; then |
56 |
+ |
AC_MSG_CHECKING(for mon) |
57 |
+ |
if grep mon_init ../../../mon/src/mon.h >/dev/null 2>/dev/null; then |
58 |
+ |
AC_MSG_RESULT(yes) |
59 |
+ |
AC_DEFINE(ENABLE_MON) |
60 |
+ |
MONSRCS="../../../mon/src/mon.cpp ../../../mon/src/mon_6502.cpp ../../../mon/src/mon_68k.cpp ../../../mon/src/mon_8080.cpp ../../../mon/src/mon_cmd.cpp ../../../mon/src/mon_ppc.cpp ../../../mon/src/mon_x86.cpp" |
61 |
+ |
CXXFLAGS="$CXXFLAGS -I../../../mon/src" |
62 |
+ |
AC_CHECK_LIB(readline, readline) |
63 |
+ |
AC_CHECK_LIB(termcap, tputs) |
64 |
+ |
AC_CHECK_HEADERS(readline.h history.h readline/readline.h readline/history.h) |
65 |
+ |
else |
66 |
+ |
AC_MSG_RESULT(no) |
67 |
+ |
AC_MSG_WARN([Could not find mon, ignoring --with-mon.]) |
68 |
+ |
WANT_MON=no |
69 |
+ |
fi |
70 |
+ |
fi |
71 |
+ |
|
72 |
|
dnl Checks for libraries. |
73 |
+ |
AC_CHECK_LIB(posix4, sem_init) |
74 |
+ |
|
75 |
+ |
dnl We need X11. |
76 |
|
AC_PATH_XTRA |
77 |
|
if [[ "x$no_x" = "xyes" ]]; then |
78 |
|
AC_MSG_ERROR([You need X11 to run Basilisk II.]) |
79 |
|
fi |
26 |
– |
|
80 |
|
CFLAGS="$CFLAGS $X_CFLAGS" |
81 |
|
CXXFLAGS="$CXXFLAGS $X_CFLAGS" |
82 |
|
LIBS="$LIBS $X_PRE_LIBS $X_LIBS -lX11 -lXext $X_EXTRA_LIBS" |
30 |
– |
STATICLIBS= |
83 |
|
|
84 |
< |
dnl We need pthreads. |
85 |
< |
AC_CHECK_LIB(pthread, pthread_create, HAVE_PTHREADS=yes, HAVE_PTHREADS=no) |
86 |
< |
if [[ "x$HAVE_PTHREADS" = "xno" ]]; then |
87 |
< |
dnl Check even the libc_r (FreeBSD) |
88 |
< |
AC_CHECK_LIB(c_r, pthread_create, HAVE_PTHREADS=yes, HAVE_PTHREADS=no) |
89 |
< |
if [[ "x$HAVE_PTHREADS" = "xno" ]]; then |
90 |
< |
dnl Or maybe the user has PTL (NetBSD) |
91 |
< |
AC_CHECK_LIB(PTL, pthread_create, HAVE_PTHREADS=yes, HAVE_PTHREADS=no) |
92 |
< |
if [[ "x$HAVE_PTHREADS" = "xno" ]]; then |
93 |
< |
AC_MSG_ERROR([You need pthreads to run Basilisk II.]) |
94 |
< |
else |
43 |
< |
LIBS="$LIBS -lPTL" |
44 |
< |
fi |
45 |
< |
else |
46 |
< |
LIBS="$LIBS -lc_r" |
47 |
< |
fi |
48 |
< |
else |
49 |
< |
LIBS="$LIBS -lpthread" |
84 |
> |
dnl We want pthreads. Try libpthread first, then libc_r (FreeBSD), then PTL. |
85 |
> |
HAVE_PTHREADS=yes |
86 |
> |
AC_CHECK_LIB(pthread, pthread_create, , [ |
87 |
> |
AC_CHECK_LIB(c_r, pthread_create, , [ |
88 |
> |
AC_CHECK_LIB(PTL, pthread_create, , [ |
89 |
> |
HAVE_PTHREADS=no |
90 |
> |
]) |
91 |
> |
]) |
92 |
> |
]) |
93 |
> |
if [[ "x$HAVE_PTHREADS" = "xyes" ]]; then |
94 |
> |
AC_DEFINE(HAVE_PTHREADS) |
95 |
|
fi |
96 |
|
AC_CHECK_FUNCS(pthread_cancel) |
97 |
|
|
98 |
< |
dnl We use DGA if possible. |
99 |
< |
if [[ "x$WANT_DGA" = "xyes" ]]; then |
100 |
< |
AC_CHECK_LIB(Xxf86dga, XF86DGAQueryExtension, HAVE_DGA=yes, HAVE_DGA=no) |
101 |
< |
if [[ "x$HAVE_DGA" = "xno" ]]; then |
102 |
< |
AC_MSG_WARN([Could not find DGA extension, ignoring --enable-dga.]) |
58 |
< |
else |
59 |
< |
DEFINES="$DEFINES -DENABLE_DGA=1" |
60 |
< |
LIBS="$LIBS -lXxf86dga" |
98 |
> |
dnl If POSIX.4 semaphores are not available, we emulate them with pthread mutexes. |
99 |
> |
SEMSRC= |
100 |
> |
AC_CHECK_FUNCS(sem_init, , [ |
101 |
> |
if [ "x$HAVE_PTHREADS" = "xyes" ]; then |
102 |
> |
SEMSRC=posix_sem.cpp |
103 |
|
fi |
104 |
+ |
]) |
105 |
+ |
|
106 |
+ |
dnl We use DGA (XFree86 or fbdev) if possible. |
107 |
+ |
if [[ "x$WANT_XF86_DGA" = "xyes" ]]; then |
108 |
+ |
AC_CHECK_LIB(Xxf86dga, XF86DGAQueryExtension, [ |
109 |
+ |
AC_DEFINE(ENABLE_XF86_DGA) |
110 |
+ |
LIBS="$LIBS -lXxf86dga" |
111 |
+ |
if [[ "x$WANT_FBDEV_DGA" = "xyes" ]]; then |
112 |
+ |
AC_MSG_WARN([Cannot have both --enable-xf86-dga and --enable-fbdev-dga, ignoring --enable-fbdev-dga.]) |
113 |
+ |
WANT_FBDEV_DGA=no |
114 |
+ |
fi |
115 |
+ |
], [ |
116 |
+ |
AC_MSG_WARN([Could not find XFree86 DGA extension, ignoring --enable-xf86-dga.]) |
117 |
+ |
WANT_XF86_DGA=no |
118 |
+ |
]) |
119 |
+ |
fi |
120 |
+ |
if [[ "x$WANT_FBDEV_DGA" = "xyes" ]]; then |
121 |
+ |
AC_DEFINE(ENABLE_FBDEV_DGA) |
122 |
+ |
fi |
123 |
+ |
|
124 |
+ |
dnl We use XFree86 VidMode if possible. |
125 |
+ |
if [[ "x$WANT_XF86_VIDMODE" = "xyes" ]]; then |
126 |
+ |
AC_CHECK_LIB(Xxf86vm, XF86VidModeQueryExtension, [ |
127 |
+ |
AC_DEFINE(ENABLE_XF86_VIDMODE) |
128 |
+ |
LIBS="$LIBS -lXxf86vm" |
129 |
+ |
], [ |
130 |
+ |
AC_MSG_WARN([Could not find XFree86 VidMode extension, ignoring --enable-xf86-vidmode.]) |
131 |
+ |
WANT_XF86_VIDMODE=no |
132 |
+ |
]) |
133 |
|
fi |
134 |
|
|
135 |
|
dnl We use GTK+ if possible. |
136 |
< |
if [[ "x$WANT_UI" = "xyes" ]]; then |
137 |
< |
AM_PATH_GTK(1.2.0) |
138 |
< |
if [[ "x$no_gtk" = "xyes" ]]; then |
139 |
< |
echo "Did not find gtk+, disabling user interface." |
140 |
< |
WANT_UI=no |
141 |
< |
GTK_CFLAGS= |
142 |
< |
GTK_LIBS= |
143 |
< |
else |
144 |
< |
DEFINES="$DEFINES -DENABLE_GTK=1" |
145 |
< |
fi |
146 |
< |
CFLAGS="$CFLAGS $GTK_CFLAGS" |
147 |
< |
CXXFLAGS="$CXXFLAGS $GTK_CFLAGS" |
77 |
< |
LIBS="$LIBS $GTK_LIBS" |
136 |
> |
UISRCS=../dummy/prefs_editor_dummy.cpp |
137 |
> |
if [[ "x$WANT_GTK" = "xyes" ]]; then |
138 |
> |
AM_PATH_GTK(1.2.0, [ |
139 |
> |
AC_DEFINE(ENABLE_GTK) |
140 |
> |
CFLAGS="$CFLAGS $GTK_CFLAGS" |
141 |
> |
CXXFLAGS="$CXXFLAGS $GTK_CFLAGS" |
142 |
> |
LIBS="$LIBS $GTK_LIBS" |
143 |
> |
UISRCS=prefs_editor_gtk.cpp |
144 |
> |
], [ |
145 |
> |
AC_MSG_WARN([Could not find GTK+, disabling user interface.]) |
146 |
> |
WANT_GTK=no |
147 |
> |
]) |
148 |
|
fi |
149 |
|
|
150 |
< |
dnl We need POSIX.4 semaphores (and other POSIX.4 blessings). |
151 |
< |
SEMSRCS= |
152 |
< |
AC_CHECK_FUNCS(sem_init) |
153 |
< |
if [[ "x$ac_cv_func_sem_init" = "xno" ]]; then |
154 |
< |
AC_CHECK_LIB(posix4, sem_init, HAVE_LIBPOSIX4=yes, HAVE_LIBPOSIX4=no) |
155 |
< |
if [[ "x$HAVE_LIBPOSIX4" = "xno" ]]; then |
156 |
< |
dnl Emulate semaphores with pthread mutexes |
157 |
< |
SEMSRCS="posix_sem.cpp" |
158 |
< |
else |
159 |
< |
LIBS="$LIBS -lposix4" |
160 |
< |
fi |
150 |
> |
dnl We use ESD if possible. |
151 |
> |
if [[ "x$WANT_ESD" = "xyes" ]]; then |
152 |
> |
AM_PATH_ESD(0.2.8, [ |
153 |
> |
AC_DEFINE(ENABLE_ESD) |
154 |
> |
CFLAGS="$CFLAGS $ESD_CFLAGS" |
155 |
> |
CXXFLAGS="$CXXFLAGS $ESD_CFLAGS" |
156 |
> |
LIBS="$LIBS $ESD_LIBS" |
157 |
> |
], [ |
158 |
> |
AC_MSG_WARN([Could not find ESD, disabling ESD support.]) |
159 |
> |
WANT_ESD=no |
160 |
> |
]) |
161 |
|
fi |
162 |
|
|
163 |
|
dnl Checks for header files. |
180 |
|
|
181 |
|
dnl Checks for library functions. |
182 |
|
AC_CHECK_FUNCS(strdup cfmakeraw) |
183 |
< |
AC_CHECK_FUNCS(nanosleep clock_gettime timer_create) |
183 |
> |
AC_CHECK_FUNCS(clock_gettime timer_create) |
184 |
|
|
185 |
|
dnl Select system-dependant source files. |
186 |
< |
SYSSRCS="../dummy/ether_dummy.cpp ../dummy/scsi_dummy.cpp ../dummy/audio_dummy.cpp" |
187 |
< |
if MACHINE=`uname -a 2>/dev/null`; then |
186 |
> |
SERIALSRC=serial_unix.cpp |
187 |
> |
ETHERSRC=../dummy/ether_dummy.cpp |
188 |
> |
SCSISRC=../dummy/scsi_dummy.cpp |
189 |
> |
AUDIOSRC=../dummy/audio_dummy.cpp |
190 |
> |
EXTRASYSSRCS= |
191 |
> |
SUPPORTS_NATIVE_M68K=no |
192 |
> |
if MACHINE=`uname -s 2>/dev/null`; then |
193 |
|
case "$MACHINE" in |
194 |
|
Linux*) |
195 |
< |
SYSSRCS="Linux/ether_linux.cpp Linux/scsi_linux.cpp Linux/audio_linux.cpp" |
195 |
> |
ETHERSRC=Linux/ether_linux.cpp |
196 |
> |
SCSISRC=Linux/scsi_linux.cpp |
197 |
> |
AUDIOSRC=audio_oss_esd.cpp |
198 |
|
;; |
199 |
|
FreeBSD*3.*) |
200 |
+ |
AUDIOSRC=audio_oss_esd.cpp |
201 |
+ |
DEFINES="$DEFINES -DBSD_COMP" |
202 |
|
dnl Check for the CAM library |
203 |
|
AC_CHECK_LIB(cam, cam_open_btl, HAVE_LIBCAM=yes, HAVE_LIBCAM=no) |
204 |
|
if [[ "x$HAVE_LIBCAM" = "xno" ]]; then |
205 |
< |
AC_MSG_ERROR([Cannot find libcam for SCSI management.]) |
205 |
> |
AC_MSG_WARN([Cannot find libcam for SCSI management, disabling SCSI support.]) |
206 |
|
else |
207 |
|
dnl Check for the sys kernel includes |
208 |
|
AC_CHECK_HEADER(/sys/cam/cam.h) |
209 |
|
if [[ "x$ac_cv_header__sys_cam_cam_h" = "xno" ]]; then |
210 |
|
dnl In this case I should fix this thing including a "patch" |
211 |
|
dnl to access directly to the functions in the kernel :) --Orlando |
212 |
< |
AC_MSG_ERROR([Cannot find kernel includes for CAM library.]) |
212 |
> |
AC_MSG_WARN([Cannot find kernel includes for CAM library, disabling SCSI support.]) |
213 |
> |
else |
214 |
> |
SCSISRC=FreeBSD/scsi_freebsd.cpp |
215 |
> |
CXXFLAGS="$CXXFLAGS -I/sys" |
216 |
> |
CFLAGS="$CFLAGS -I/sys" |
217 |
> |
LIBS="$LIBS -lcam" |
218 |
> |
DEFINES="$DEFINES -DCAM" |
219 |
|
fi |
135 |
– |
SYSSRCS="../dummy/ether_dummy.cpp FreeBSD/scsi_freebsd.cpp ../dummy/audio_dummy.cpp" |
136 |
– |
CXXFLAGS="$CXXFLAGS -I/sys" |
137 |
– |
CFLAGS="$CFLAGS -I/sys" |
138 |
– |
LIBS="$LIBS -lcam" |
139 |
– |
DEFINES="$DEFINES -DBSD_COMP -DCAM" |
220 |
|
fi |
221 |
|
;; |
222 |
|
FreeBSD*) |
223 |
+ |
DEFINES="$DEFINES -DBSD_COMP" |
224 |
|
dnl Check for the SCSI library |
225 |
|
AC_CHECK_LIB(scsi, scsi_open, HAVE_LIBSCSI=yes, HAVE_LIBSCSI=no) |
226 |
|
if [[ "x$HAVE_LIBSCSI" = "xno" ]]; then |
227 |
< |
AC_MSG_ERROR([Cannot find libscsi for SCSI management.]) |
227 |
> |
AC_MSG_WARN([Cannot find libscsi for SCSI management, disabling SCSI support.]) |
228 |
|
else |
229 |
|
dnl Check for the sys kernel includes |
230 |
|
AC_CHECK_HEADER(scsi.h sys/scsiio.h) |
231 |
|
if [[ "x$ac_cv_header_scsi_h" = "xno" ]]; then |
232 |
< |
AC_MSG_ERROR([Cannot find includes for the SCSI library.]) |
232 |
> |
AC_MSG_WARN([Cannot find includes for the SCSI library, disabling SCSI support.]) |
233 |
> |
else |
234 |
> |
SCSISRC=FreeBSD/scsi_freebsd.cpp |
235 |
> |
LIBS="$LIBS -lscsi" |
236 |
|
fi |
153 |
– |
SYSSRCS="../dummy/ether_dummy.cpp FreeBSD/scsi_freebsd.cpp ../dummy/audio_dummy.cpp" |
154 |
– |
LIBS="$LIBS -lscsi" |
155 |
– |
DEFINES="$DEFINES -DBSD_COMP" |
237 |
|
fi |
238 |
|
;; |
239 |
+ |
NetBSD*) |
240 |
+ |
SUPPORTS_NATIVE_M68K=yes |
241 |
+ |
;; |
242 |
|
SunOS*) |
243 |
< |
SYSSRCS="../dummy/ether_dummy.cpp ../dummy/scsi_dummy.cpp Solaris/audio_solaris.cpp" |
243 |
> |
AUDIOSRC=Solaris/audio_solaris.cpp |
244 |
|
DEFINES="$DEFINES -DBSD_COMP -D_POSIX_PTHREAD_SEMANTICS" |
245 |
|
;; |
246 |
|
IRIX*) |
247 |
< |
SYSSRCS="../dummy/ether_dummy.cpp ../dummy/scsi_dummy.cpp ../dummy/audio_dummy.cpp Irix/unaligned.c" |
247 |
> |
EXTRASYSSRCS=Irix/unaligned.c |
248 |
|
DEFINES="$DEFINES -DCRTSCTS=CNEW_RTSCTS -DB230400=B115200" |
249 |
|
LIBS="$LIBS -lm" |
250 |
|
;; |
251 |
|
esac |
168 |
– |
if [[ "x$WANT_UI" = "xyes" ]]; then |
169 |
– |
SYSSRCS="$SYSSRCS prefs_editor_gtk.cpp" |
170 |
– |
else |
171 |
– |
SYSSRCS="$SYSSRCS ../dummy/prefs_editor_dummy.cpp" |
172 |
– |
fi |
252 |
|
fi |
253 |
< |
if [[ "x$SEMSRCS" != "x" ]]; then |
254 |
< |
SYSSRCS="$SYSSRCS $SEMSRCS" |
253 |
> |
if [[ "x$HAVE_PTHREADS" = "xno" ]]; then |
254 |
> |
dnl Serial, ethernet and audio support needs pthreads |
255 |
> |
AC_MSG_WARN([You don't have pthreads, disabling serial, ethernet and audio support.]) |
256 |
> |
SERIALSRC=../dummy/serial_dummy.cpp |
257 |
> |
ETHERSRC=../dummy/ether_dummy.cpp |
258 |
> |
AUDIOSRC=../dummy/audio_dummy.cpp |
259 |
|
fi |
260 |
< |
|
178 |
< |
dnl Defaults for UAE CPU. |
179 |
< |
CPUINCLUDES="-I../uae_cpu" |
180 |
< |
CPUSRCS="../uae_cpu/basilisk_glue.cpp ../uae_cpu/memory.cpp ../uae_cpu/newcpu.cpp ../uae_cpu/readcpu.cpp ../uae_cpu/fpp.cpp cpustbl.cpp cpudefs.cpp" |
181 |
< |
|
182 |
< |
dnl Check for i386. |
183 |
< |
HAVE_I386=no |
184 |
< |
AC_MSG_CHECKING(for x86 target CPU) |
185 |
< |
AC_EGREP_CPP(yes, |
186 |
< |
[ |
187 |
< |
#ifdef __i386__ |
188 |
< |
yes |
189 |
< |
#endif |
190 |
< |
], [AC_MSG_RESULT(yes); HAVE_I386=yes], AC_MSG_RESULT(no)) |
260 |
> |
SYSSRCS="$SERIALSRC $ETHERSRC $SCSISRC $AUDIOSRC $SEMSRC $UISRCS $MONSRCS $EXTRASYSSRCS" |
261 |
|
|
262 |
|
dnl Check for GAS. |
263 |
|
HAVE_GAS=no |
278 |
|
#endif |
279 |
|
], [AC_MSG_RESULT(yes); HAVE_GCC27=yes], AC_MSG_RESULT(no)) |
280 |
|
|
281 |
< |
dnl Set "-fomit-frame-pointer" on GCC. |
282 |
< |
if [[ "x$HAVE_GCC27" = "xyes" ]]; then |
281 |
> |
dnl Set "-fomit-frame-pointer" on i386 GCC 2.7 or higher. |
282 |
> |
if [[ "x$HAVE_GCC27" = "xyes" -a "x$HAVE_I386" = "xyes" ]]; then |
283 |
|
CFLAGS="$CFLAGS -fomit-frame-pointer" |
284 |
|
CXXFLAGS="$CXXFLAGS -fomit-frame-pointer" |
285 |
|
fi |
286 |
|
|
287 |
|
dnl Select appropriate CPU source and REGPARAM define. |
288 |
+ |
WANT_X86_ASSEMBLY=no |
289 |
+ |
WANT_SPARC_V8_ASSEMBLY=no |
290 |
+ |
WANT_SPARC_V9_ASSEMBLY=no |
291 |
+ |
WANT_NATIVE_M68K=no |
292 |
+ |
CPUSRCS="cpuemu1.cpp cpuemu2.cpp cpuemu3.cpp cpuemu4.cpp cpuemu5.cpp cpuemu6.cpp cpuemu7.cpp cpuemu8.cpp" |
293 |
+ |
FPUSRCS="../uae_cpu/fpp.cpp" |
294 |
|
if [[ "x$HAVE_GCC27" = "xyes" -a "x$HAVE_I386" = "xyes" ]]; then |
295 |
+ |
dnl i386 CPU |
296 |
|
DEFINES="$DEFINES -DREGPARAM=\"__attribute__((regparm(3)))\"" |
297 |
|
if [[ "x$HAVE_GAS" = "xyes" ]]; then |
298 |
+ |
WANT_X86_ASSEMBLY=yes |
299 |
|
DEFINES="$DEFINES -DX86_ASSEMBLY" |
300 |
< |
CPUSRCS="$CPUSRCS cpufast1.s cpufast2.s cpufast3.s cpufast4.s cpufast5.s cpufast6.s cpufast7.s cpufast8.s" |
301 |
< |
else |
224 |
< |
CPUSRCS="$CPUSRCS cpuemu1.cpp cpuemu2.cpp cpuemu3.cpp cpuemu4.cpp cpuemu5.cpp cpuemu6.cpp cpuemu7.cpp cpuemu8.cpp" |
300 |
> |
CPUSRCS="../uae_cpu/compiler.cpp cpufast1.s cpufast2.s cpufast3.s cpufast4.s cpufast5.s cpufast6.s cpufast7.s cpufast8.s" |
301 |
> |
FPUSRCS="../uae_cpu/fpu_x86.cpp" |
302 |
|
fi |
303 |
+ |
elif [[ "x$HAVE_GCC27" = "xyes" -a "x$HAVE_SPARC" = "xyes" -a "x$HAVE_GAS" = "xyes" ]]; then |
304 |
+ |
dnl SPARC CPU |
305 |
+ |
case "$MACHINE" in |
306 |
+ |
SunOS*) |
307 |
+ |
AC_MSG_CHECKING(SPARC CPU architecture) |
308 |
+ |
SPARC_TYPE=`Solaris/which_sparc` |
309 |
+ |
AC_MSG_RESULT($SPARC_TYPE) |
310 |
+ |
case "$SPARC_TYPE" in |
311 |
+ |
SPARC_V8) |
312 |
+ |
WANT_SPARC_V8_ASSEMBLY=yes |
313 |
+ |
DEFINES="$DEFINES -DSPARC_V8_ASSEMBLY" |
314 |
+ |
CFLAGS="$CFLAGS -Wa,-Av8" |
315 |
+ |
CXXFLAGS="$CXXFLAGS -Wa,-Av8" |
316 |
+ |
;; |
317 |
+ |
SPARC_V9) |
318 |
+ |
WANT_SPARC_V9_ASSEMBLY=yes |
319 |
+ |
DEFINES="$DEFINES -DSPARC_V9_ASSEMBLY" |
320 |
+ |
CFLAGS="$CFLAGS -Wa,-Av9" |
321 |
+ |
CXXFLAGS="$CXXFLAGS -Wa,-Av9" |
322 |
+ |
;; |
323 |
+ |
esac |
324 |
+ |
;; |
325 |
+ |
esac |
326 |
+ |
elif [[ "x$HAVE_M68K" = "xyes" -a "x$SUPPORTS_NATIVE_M68K" = "xyes" ]]; then |
327 |
+ |
dnl Native m68k, no emulation |
328 |
+ |
CPUSRCS="" |
329 |
+ |
AC_DEFINE(ENABLE_NATIVE_M68K) |
330 |
+ |
WANT_NATIVE_M68K=yes |
331 |
+ |
fi |
332 |
+ |
|
333 |
+ |
dnl UAE CPU sources for all non-m68k-native architectures. |
334 |
+ |
if [[ "x$WANT_NATIVE_M68K" = "xno" ]]; then |
335 |
+ |
CPUINCLUDES="-I../uae_cpu" |
336 |
+ |
CPUSRCS="../uae_cpu/basilisk_glue.cpp ../uae_cpu/memory.cpp ../uae_cpu/newcpu.cpp ../uae_cpu/readcpu.cpp $FPUSRCS cpustbl.cpp cpudefs.cpp $CPUSRCS" |
337 |
|
else |
338 |
< |
CPUSRCS="$CPUSRCS cpuemu1.cpp cpuemu2.cpp cpuemu3.cpp cpuemu4.cpp cpuemu5.cpp cpuemu6.cpp cpuemu7.cpp cpuemu8.cpp" |
338 |
> |
CPUINCLUDES="-I../native_cpu" |
339 |
> |
CPUSRCS="asm_support.s" |
340 |
|
fi |
341 |
|
|
342 |
|
dnl Generate Makefile. |
343 |
|
AC_SUBST(DEFINES) |
232 |
– |
AC_SUBST(STATICLIBS) |
344 |
|
AC_SUBST(SYSSRCS) |
345 |
|
AC_SUBST(CPUINCLUDES) |
346 |
|
AC_SUBST(CPUSRCS) |
347 |
|
AC_OUTPUT(Makefile) |
348 |
< |
echo "Configuration done. Now type \"make\"." |
348 |
> |
|
349 |
> |
dnl Print summary. |
350 |
> |
echo |
351 |
> |
echo Basilisk II configuration summary: |
352 |
> |
echo |
353 |
> |
echo XFree86 DGA support .............. : $WANT_XF86_DGA |
354 |
> |
echo XFree86 VidMode support .......... : $WANT_XF86_VIDMODE |
355 |
> |
echo fbdev DGA support ................ : $WANT_FBDEV_DGA |
356 |
> |
echo ESD sound support ................ : $WANT_ESD |
357 |
> |
echo GTK user interface ............... : $WANT_GTK |
358 |
> |
echo mon debugger support ............. : $WANT_MON |
359 |
> |
echo i386 assembly optimizations ...... : $WANT_X86_ASSEMBLY |
360 |
> |
echo SPARC V8 assembly optimizations .. : $WANT_SPARC_V8_ASSEMBLY |
361 |
> |
echo SPARC V9 assembly optimizations .. : $WANT_SPARC_V9_ASSEMBLY |
362 |
> |
echo Running m68k code natively ....... : $WANT_NATIVE_M68K |
363 |
> |
echo |
364 |
> |
echo "Configuration done. Now type \"make\" (or \"gmake\")." |