1 |
|
dnl Process this file with autoconf to produce a configure script. |
2 |
|
dnl Written in 2002 by Christian Bauer |
3 |
|
|
4 |
< |
AC_INIT([SheepShaver], 2.2, [Christian.Bauer@uni-mainz.de], SheepShaver) |
4 |
> |
AC_INIT([SheepShaver], 2.3, [Christian.Bauer@uni-mainz.de], SheepShaver) |
5 |
|
AC_CONFIG_SRCDIR(main_unix.cpp) |
6 |
|
AC_PREREQ(2.52) |
7 |
|
AC_CONFIG_HEADER(config.h) |
14 |
|
dnl cores for the configure tests since some are intended to dump core. |
15 |
|
ulimit -c 0 |
16 |
|
|
17 |
+ |
dnl Invite Cygwin users to build within the Windows/ directory |
18 |
+ |
case $target_os in |
19 |
+ |
*cygwin* | *mingw32*) |
20 |
+ |
AC_MSG_ERROR([You can only build the Windows version from its directory, Cygwin/X11 is not supported.]) |
21 |
+ |
;; |
22 |
+ |
esac |
23 |
+ |
|
24 |
|
dnl Options. |
25 |
|
AC_ARG_ENABLE(jit, [ --enable-jit enable JIT compiler [default=yes]], [WANT_JIT=$enableval], [WANT_JIT=yes]) |
26 |
|
AC_ARG_ENABLE(ppc-emulator, [ --enable-ppc-emulator use the selected PowerPC emulator [default=auto]], [WANT_EMULATED_PPC=$enableval], [WANT_EMULATED_PPC=auto]) |
27 |
+ |
AC_ARG_ENABLE(fbdev-dga, [ --enable-fbdev-dga use direct frame buffer access via /dev/fb0 [default=yes]], [WANT_FBDEV_DGA=$enableval], [WANT_FBDEV_DGA=yes]) |
28 |
|
AC_ARG_ENABLE(xf86-dga, [ --enable-xf86-dga use the XFree86 DGA extension [default=yes]], [WANT_XF86_DGA=$enableval], [WANT_XF86_DGA=yes]) |
29 |
< |
AC_ARG_ENABLE(xf86-vidmode, [ --enable-xf86-vidmode use the XFree86 VidMode extension [default=no]], [WANT_XF86_VIDMODE=$enableval], [WANT_XF86_VIDMODE=no]) |
29 |
> |
AC_ARG_ENABLE(xf86-vidmode, [ --enable-xf86-vidmode use the XFree86 VidMode extension [default=yes]], [WANT_XF86_VIDMODE=$enableval], [WANT_XF86_VIDMODE=yes]) |
30 |
|
AC_ARG_ENABLE(vosf, [ --enable-vosf enable video on SEGV signals [default=yes]], [WANT_VOSF=$enableval], [WANT_VOSF=yes]) |
31 |
+ |
AC_ARG_ENABLE(standalone-gui,[ --enable-standalone-gui enable a standalone GUI prefs editor [default=no]], [WANT_STANDALONE_GUI=$enableval], [WANT_STANDALONE_GUI=no]) |
32 |
|
AC_ARG_WITH(esd, [ --with-esd support ESD for sound under Linux/FreeBSD [default=yes]], [WANT_ESD=$withval], [WANT_ESD=yes]) |
33 |
< |
AC_ARG_WITH(gtk, [ --with-gtk use GTK user interface [default=yes]], [WANT_GTK=$withval], [WANT_GTK=yes]) |
33 |
> |
AC_ARG_WITH(gtk, [ --with-gtk use GTK user interface [default=yes]], |
34 |
> |
[case "$withval" in |
35 |
> |
gtk1) WANT_GTK="gtk";; |
36 |
> |
gtk|gtk2) WANT_GTK="$withval";; |
37 |
> |
yes) WANT_GTK="gtk2 gtk";; |
38 |
> |
*) WANT_GTK="no";; |
39 |
> |
esac], |
40 |
> |
[WANT_GTK="gtk2 gtk"]) |
41 |
|
AC_ARG_WITH(mon, [ --with-mon use mon as debugger [default=yes]], [WANT_MON=$withval], [WANT_MON=yes]) |
42 |
|
AC_ARG_WITH(dgcc, [ --with-dgcc=COMPILER use C++ COMPILER to compile synthetic opcodes], [DYNGEN_CC=$withval]) |
43 |
|
|
64 |
|
AC_PROG_MAKE_SET |
65 |
|
AC_PROG_INSTALL |
66 |
|
AC_PROG_EGREP |
67 |
< |
AC_CHECK_PROGS(FILE, [file false]) |
67 |
> |
AC_PATH_PROGS(FILE, [file false]) |
68 |
> |
AC_PATH_PROG(PERL, [perl]) |
69 |
|
|
70 |
|
dnl Check for PowerPC target CPU. |
71 |
|
HAVE_PPC=no |
126 |
|
|
127 |
|
dnl Checks for libraries. |
128 |
|
AC_CHECK_LIB(posix4, sem_init) |
129 |
+ |
AC_CHECK_LIB(m, cos) |
130 |
|
|
131 |
|
dnl Do we need SDL? |
132 |
|
WANT_SDL=no |
144 |
|
if [[ "x$WANT_SDL" = "xyes" ]]; then |
145 |
|
AC_PATH_PROG(sdl_config, "sdl-config") |
146 |
|
if [[ -n "$sdl_config" ]]; then |
147 |
< |
case $target_os in |
148 |
< |
# Special treatment for Cygwin so that we can still use the POSIX layer |
149 |
< |
*cygwin*) |
150 |
< |
sdl_cflags="-I`$sdl_config --prefix`/include/SDL" |
151 |
< |
sdl_libs="-L`$sdl_config --exec-prefix`/lib -lSDL" |
152 |
< |
;; |
135 |
< |
*) |
136 |
< |
sdl_cflags=`$sdl_config --cflags` |
137 |
< |
if [[ "x$WANT_SDL_STATIC" = "xyes" ]]; then |
138 |
< |
sdl_libs=`$sdl_config --static-libs` |
139 |
< |
else |
140 |
< |
sdl_libs=`$sdl_config --libs` |
141 |
< |
fi |
142 |
< |
;; |
143 |
< |
esac |
147 |
> |
sdl_cflags=`$sdl_config --cflags` |
148 |
> |
if [[ "x$WANT_SDL_STATIC" = "xyes" ]]; then |
149 |
> |
sdl_libs=`$sdl_config --static-libs` |
150 |
> |
else |
151 |
> |
sdl_libs=`$sdl_config --libs` |
152 |
> |
fi |
153 |
|
CFLAGS="$CFLAGS $sdl_cflags" |
154 |
|
CXXFLAGS="$CXXFLAGS $sdl_cflags" |
155 |
|
LIBS="$LIBS $sdl_libs" |
177 |
|
dnl We need pthreads on non-PowerPC systems. Try libpthread first, then libc_r (FreeBSD), then PTL. |
178 |
|
HAVE_PTHREADS=yes |
179 |
|
case $EMULATED_PPC:$target_os in |
180 |
< |
no:linux*) |
180 |
> |
no:linux*|no:netbsd*) |
181 |
|
dnl We do have our own pthread_cancel() implementation |
182 |
|
AC_DEFINE(HAVE_PTHREAD_CANCEL, 1, [Define if you have the pthread_cancel function.]) |
183 |
|
;; |
185 |
|
AC_CHECK_LIB(pthread, pthread_create, , [ |
186 |
|
AC_CHECK_LIB(c_r, pthread_create, , [ |
187 |
|
AC_CHECK_LIB(PTL, pthread_create, , [ |
188 |
< |
AC_MSG_ERROR([You need pthreads to run Basilisk II.]) |
188 |
> |
dnl XXX remove when no pthreads case is merged |
189 |
> |
AC_MSG_ERROR([You need pthreads to run SheepShaver.]) |
190 |
> |
HAVE_PTHREADS=no |
191 |
|
]) |
192 |
|
]) |
193 |
|
]) |
194 |
|
AC_CHECK_FUNCS(pthread_cancel) |
195 |
+ |
AC_CHECK_FUNCS(pthread_cond_init pthread_testcancel) |
196 |
|
AC_CHECK_FUNCS(pthread_mutexattr_setprotocol) |
197 |
|
AC_CHECK_FUNCS(pthread_mutexattr_settype) |
198 |
|
AC_CHECK_FUNCS(pthread_mutexattr_setpshared) |
187 |
– |
if [[ "x$HAVE_PTHREADS" = "xyes" ]]; then |
188 |
– |
AC_DEFINE(HAVE_PTHREADS, 1, [Define if pthreads are available.]) |
189 |
– |
fi |
199 |
|
dnl If POSIX.4 semaphores are not available, we emulate them with pthread mutexes. |
200 |
|
SEMSRC= |
201 |
|
AC_CHECK_FUNCS(sem_init, , [ |
205 |
|
]) |
206 |
|
;; |
207 |
|
esac |
208 |
+ |
if [[ "x$HAVE_PTHREADS" = "xyes" ]]; then |
209 |
+ |
AC_DEFINE(HAVE_PTHREADS, 1, [Define if pthreads are available.]) |
210 |
+ |
fi |
211 |
+ |
|
212 |
+ |
dnl We use FBDev DGA if possible. |
213 |
+ |
if [[ "x$WANT_FBDEV_DGA" = "xyes" ]]; then |
214 |
+ |
AC_CHECK_HEADER(linux/fb.h, [ |
215 |
+ |
AC_DEFINE(ENABLE_FBDEV_DGA, 1, [Define if using Linux fbdev extension.]) |
216 |
+ |
], [ |
217 |
+ |
AC_MSG_WARN([Could not find Linux FBDev extension, ignoring --enable-fbdev-dga.]) |
218 |
+ |
WANT_FBDEV_DGA=no |
219 |
+ |
]) |
220 |
+ |
fi |
221 |
|
|
222 |
|
dnl We use XFree86 DGA if possible. |
223 |
|
if [[ "x$WANT_XF86_DGA" = "xyes" ]]; then |
243 |
|
|
244 |
|
dnl We use GTK+ if possible. |
245 |
|
UISRCS=../dummy/prefs_editor_dummy.cpp |
246 |
< |
if [[ "x$WANT_GTK" = "xyes" ]]; then |
246 |
> |
case "x$WANT_GTK" in |
247 |
> |
xgtk2*) |
248 |
> |
AM_PATH_GTK_2_0(1.3.15, [ |
249 |
> |
GUI_CFLAGS="$GTK_CFLAGS" |
250 |
> |
GUI_LIBS="$GTK_LIBS" |
251 |
> |
WANT_GTK=gtk2 |
252 |
> |
], [ |
253 |
> |
case "x${WANT_GTK}x" in |
254 |
> |
*gtkx) |
255 |
> |
AC_MSG_WARN([Could not find GTK+ 2.0, trying with GTK+ 1.2.]) |
256 |
> |
WANT_GTK=gtk |
257 |
> |
;; |
258 |
> |
*) |
259 |
> |
AC_MSG_WARN([Could not find GTK+, disabling user interface.]) |
260 |
> |
WANT_GTK=no |
261 |
> |
;; |
262 |
> |
esac |
263 |
> |
]) |
264 |
> |
;; |
265 |
> |
esac |
266 |
> |
if [[ "x$WANT_GTK" = "xgtk" ]]; then |
267 |
|
AM_PATH_GTK(1.2.0, [ |
268 |
< |
AC_DEFINE(ENABLE_GTK, 1, [Define if using GTK.]) |
269 |
< |
CFLAGS="$CFLAGS $GTK_CFLAGS" |
228 |
< |
CXXFLAGS="$CXXFLAGS $GTK_CFLAGS" |
229 |
< |
LIBS="$LIBS $GTK_LIBS" |
230 |
< |
UISRCS=prefs_editor_gtk.cpp |
268 |
> |
GUI_CFLAGS="$GTK_CFLAGS" |
269 |
> |
GUI_LIBS="$GTK_LIBS" |
270 |
|
], [ |
271 |
|
AC_MSG_WARN([Could not find GTK+, disabling user interface.]) |
272 |
|
WANT_GTK=no |
273 |
|
]) |
274 |
|
fi |
275 |
+ |
if [[ "x$WANT_GTK" != "xno" -a "x$WANT_STANDALONE_GUI" = "xno" ]]; then |
276 |
+ |
AC_DEFINE(ENABLE_GTK, 1, [Define if using GTK.]) |
277 |
+ |
UISRCS=prefs_editor_gtk.cpp |
278 |
+ |
fi |
279 |
+ |
AC_SUBST(GUI_CFLAGS) |
280 |
+ |
AC_SUBST(GUI_LIBS) |
281 |
+ |
|
282 |
+ |
dnl Build external GUI if requested. |
283 |
+ |
if [[ "$WANT_STANDALONE_GUI" != "yes" ]]; then |
284 |
+ |
WANT_STANDALONE_GUI=no |
285 |
+ |
fi |
286 |
+ |
if [[ "$WANT_GTK" = "no" ]]; then |
287 |
+ |
WANT_STANDALONE_GUI=no |
288 |
+ |
fi |
289 |
+ |
AC_SUBST(STANDALONE_GUI, [$WANT_STANDALONE_GUI]) |
290 |
|
|
291 |
|
dnl We use ESD if possible. |
292 |
|
if [[ "x$WANT_ESD" = "xyes" ]]; then |
307 |
|
dnl Checks for header files. |
308 |
|
AC_HEADER_STDC |
309 |
|
AC_HEADER_SYS_WAIT |
310 |
< |
AC_CHECK_HEADERS(malloc.h) |
310 |
> |
AC_CHECK_HEADERS(malloc.h stdint.h) |
311 |
|
AC_CHECK_HEADERS(mach/vm_map.h mach/mach_init.h sys/mman.h) |
258 |
– |
AC_CHECK_HEADERS(sys/time.h sys/times.h sys/socket.h) |
312 |
|
AC_CHECK_HEADERS(unistd.h fcntl.h byteswap.h dirent.h) |
313 |
< |
AC_CHECK_HEADERS(linux/if.h, [], [], [ |
314 |
< |
#if HAVE_SYS_SOCKET_H |
315 |
< |
# include <sys/socket.h> |
313 |
> |
AC_CHECK_HEADERS(sys/socket.h sys/ioctl.h sys/filio.h sys/bitypes.h sys/wait.h) |
314 |
> |
AC_CHECK_HEADERS(sys/time.h sys/poll.h sys/select.h arpa/inet.h) |
315 |
> |
AC_CHECK_HEADERS(linux/if.h linux/if_tun.h net/if.h net/if_tun.h, [], [], [ |
316 |
> |
#ifdef HAVE_SYS_TYPES_H |
317 |
> |
#include <sys/types.h> |
318 |
> |
#endif |
319 |
> |
#ifdef HAVE_SYS_SOCKET_H |
320 |
> |
#include <sys/socket.h> |
321 |
|
#endif |
322 |
|
]) |
323 |
< |
AC_CHECK_HEADERS(linux/if_tun.h net/if.h net/if_tun.h) |
323 |
> |
AC_CHECK_HEADERS(AvailabilityMacros.h) |
324 |
> |
AC_CHECK_HEADERS(IOKit/storage/IOBlockStorageDevice.h) |
325 |
|
AC_CHECK_HEADERS(fenv.h) |
326 |
|
|
327 |
|
dnl Checks for typedefs, structures, and compiler characteristics. |
342 |
|
AC_HEADER_TIME |
343 |
|
AC_STRUCT_TM |
344 |
|
|
345 |
+ |
dnl Check whether sys/socket.h defines type socklen_t. |
346 |
+ |
dnl (extracted from ac-archive/Miscellaneous) |
347 |
+ |
AC_CACHE_CHECK([for socklen_t], |
348 |
+ |
ac_cv_type_socklen_t, [ |
349 |
+ |
AC_TRY_COMPILE([ |
350 |
+ |
#include <sys/types.h> |
351 |
+ |
#include <sys/socket.h> |
352 |
+ |
], [socklen_t len = 42; return 0;], |
353 |
+ |
ac_cv_type_socklen_t=yes, ac_cv_type_socklen_t=no, |
354 |
+ |
dnl When cross-compiling, do not assume anything. |
355 |
+ |
ac_cv_type_socklen_t="guessing no" |
356 |
+ |
) |
357 |
+ |
]) |
358 |
+ |
if [[ "x$ac_cv_type_socklen_t" != "xyes" ]]; then |
359 |
+ |
AC_DEFINE(socklen_t, int, [Define to 'int' if <sys/types.h> doesn't define.]) |
360 |
+ |
fi |
361 |
+ |
|
362 |
|
dnl Check whether struct sigaction has sa_restorer member. |
363 |
|
AC_CACHE_CHECK([whether struct sigaction has sa_restorer], |
364 |
|
ac_cv_signal_sa_restorer, [ |
375 |
|
fi |
376 |
|
|
377 |
|
dnl Checks for library functions. |
378 |
< |
AC_CHECK_FUNCS(strdup strlcpy cfmakeraw) |
378 |
> |
AC_CHECK_FUNCS(strdup strerror strlcpy cfmakeraw) |
379 |
|
AC_CHECK_FUNCS(nanosleep) |
380 |
|
AC_CHECK_FUNCS(sigaction signal) |
381 |
|
AC_CHECK_FUNCS(mmap mprotect munmap) |
382 |
|
AC_CHECK_FUNCS(vm_allocate vm_deallocate vm_protect) |
307 |
– |
AC_CHECK_FUNCS(posix_memalign memalign valloc) |
383 |
|
AC_CHECK_FUNCS(exp2f log2f exp2 log2) |
384 |
+ |
AC_CHECK_FUNCS(floorf roundf ceilf truncf floor round ceil trunc) |
385 |
+ |
AC_CHECK_FUNCS(poll inet_aton) |
386 |
|
|
387 |
|
dnl Darwin seems to define mach_task_self() instead of task_self(). |
388 |
|
AC_CHECK_FUNCS(mach_task_self task_self) |
394 |
|
;; |
395 |
|
*:*) |
396 |
|
AC_SEARCH_LIBS(clock_gettime, [rt posix4]) |
397 |
< |
AC_CHECK_FUNCS(clock_gettime) |
397 |
> |
AC_CHECK_FUNCS(clock_gettime clock_nanosleep) |
398 |
|
;; |
399 |
|
esac |
400 |
|
|
442 |
|
) |
443 |
|
dnl (end of code from openssh-3.2.2p1 configure.ac) |
444 |
|
|
445 |
+ |
dnl Check for systems where POSIX-style non-blocking I/O (O_NONBLOCK) |
446 |
+ |
dnl doesn't work or is unimplemented. On these systems (mostly older |
447 |
+ |
dnl ones), use the old BSD-style FIONBIO approach instead. [tcl.m4] |
448 |
+ |
AC_CACHE_CHECK([FIONBIO vs. O_NONBLOCK for non-blocking I/O], |
449 |
+ |
ac_cv_nonblocking_io, [ |
450 |
+ |
case "$host" in |
451 |
+ |
*-*-osf*) |
452 |
+ |
ac_cv_nonblocking_io=FIONBIO |
453 |
+ |
;; |
454 |
+ |
*-*-sunos4*) |
455 |
+ |
ac_cv_nonblocking_io=FIONBIO |
456 |
+ |
;; |
457 |
+ |
*-*-ultrix*) |
458 |
+ |
ac_cv_nonblocking_io=FIONBIO |
459 |
+ |
;; |
460 |
+ |
*) |
461 |
+ |
ac_cv_nonblocking_io=O_NONBLOCK |
462 |
+ |
;; |
463 |
+ |
esac |
464 |
+ |
]) |
465 |
+ |
if [[ "$ac_cv_nonblocking_io" = "FIONBIO" ]]; then |
466 |
+ |
AC_DEFINE(USE_FIONBIO, 1, [Define if BSD-style non-blocking I/O is to be used]) |
467 |
+ |
fi |
468 |
+ |
|
469 |
+ |
dnl Check whether compiler supports byte bit-fields |
470 |
+ |
AC_CACHE_CHECK([whether compiler supports byte bit-fields], |
471 |
+ |
ac_cv_have_byte_bitfields, [ |
472 |
+ |
AC_LANG_SAVE |
473 |
+ |
AC_LANG_CPLUSPLUS |
474 |
+ |
AC_TRY_RUN([ |
475 |
+ |
struct A { |
476 |
+ |
unsigned char b1:4; |
477 |
+ |
unsigned char b2:4; |
478 |
+ |
unsigned char c; |
479 |
+ |
unsigned short s; |
480 |
+ |
unsigned char a[4]; |
481 |
+ |
}; |
482 |
+ |
|
483 |
+ |
int main(void) { |
484 |
+ |
A a; |
485 |
+ |
return ! (sizeof(A) == 8 && &a.c == ((unsigned char *)&a + 1)); |
486 |
+ |
}], |
487 |
+ |
[ac_cv_have_byte_bitfields=yes], |
488 |
+ |
[ac_cv_have_byte_bitfields=no], |
489 |
+ |
dnl When cross-compiling, assume only GCC supports this |
490 |
+ |
[if [[ "$GCC" = "yes" ]]; then |
491 |
+ |
ac_cv_have_byte_bitfields="guessing yes" |
492 |
+ |
else |
493 |
+ |
ac_cv_have_byte_bitfields="guessing no" |
494 |
+ |
fi] |
495 |
+ |
) |
496 |
+ |
AC_LANG_RESTORE |
497 |
+ |
]) |
498 |
+ |
|
499 |
|
dnl AC_CHECK_FRAMEWORK($1=NAME, $2=INCLUDES) |
500 |
< |
AC_DEFUN(AC_CHECK_FRAMEWORK, [ |
500 |
> |
AC_DEFUN([AC_CHECK_FRAMEWORK], [ |
501 |
|
AS_VAR_PUSHDEF([ac_Framework], [ac_cv_framework_$1])dnl |
502 |
|
AC_CACHE_CHECK([whether compiler supports framework $1], |
503 |
|
ac_Framework, [ |
504 |
|
saved_LIBS="$LIBS" |
505 |
|
LIBS="$LIBS -framework $1" |
506 |
|
AC_TRY_LINK( |
507 |
< |
[$2], [int main(void) { return 0; }], |
507 |
> |
[$2], [], |
508 |
|
[AS_VAR_SET(ac_Framework, yes)], [AS_VAR_SET(ac_Framework, no); LIBS="$saved_LIBS"] |
509 |
|
) |
510 |
|
]) |
517 |
|
dnl Check for some MacOS X frameworks |
518 |
|
AC_CHECK_FRAMEWORK(Carbon, [#include <Carbon/Carbon.h>]) |
519 |
|
AC_CHECK_FRAMEWORK(IOKit, [#include <IOKit/IOKitLib.h>]) |
520 |
+ |
AC_CHECK_FRAMEWORK(CoreFoundation, [#include <CoreFoundation/CoreFoundation.h>]) |
521 |
|
|
522 |
|
dnl Select system-dependant sources. |
523 |
|
SERIALSRC=serial_unix.cpp |
528 |
|
EXTRASYSSRCS= |
529 |
|
case "$target_os" in |
530 |
|
linux*) |
531 |
< |
ETHERSRC=Linux/ether_linux.cpp |
531 |
> |
ETHERSRC=ether_unix.cpp |
532 |
|
AUDIOSRC=audio_oss_esd.cpp |
533 |
|
SCSISRC=Linux/scsi_linux.cpp |
534 |
|
if [[ "x$EMULATED_PPC" = "xno" ]]; then |
535 |
< |
EXTRASYSSRCS="Linux/paranoia.cpp Linux/sheepthreads.c Linux/asm_linux.S" |
535 |
> |
EXTRASYSSRCS="paranoia.cpp Linux/sheepthreads.c ppc_asm.S" |
536 |
> |
fi |
537 |
> |
;; |
538 |
> |
freebsd*) |
539 |
> |
ETHERSRC=ether_unix.cpp |
540 |
> |
;; |
541 |
> |
netbsd*) |
542 |
> |
ETHERSRC=ether_unix.cpp |
543 |
> |
if [[ "x$EMULATED_PPC" = "xno" ]]; then |
544 |
> |
EXTRASYSSRCS="paranoia.cpp NetBSD/sheepthreads.c ppc_asm.S" |
545 |
|
fi |
546 |
|
;; |
547 |
|
darwin*) |
548 |
+ |
ETHERSRC=ether_unix.cpp |
549 |
|
if [[ "x$EMULATED_PPC" = "xno" ]]; then |
550 |
< |
EXTRASYSSRCS="Darwin/paranoia.cpp Linux/asm_linux.S" |
550 |
> |
EXTRASYSSRCS="paranoia.cpp ppc_asm.S" |
551 |
|
fi |
552 |
< |
if [[ "x$ac_cv_framework_IOKit" = "xyes" ]]; then |
552 |
> |
if [[ "x$ac_cv_framework_IOKit" = "xyes" -a "x$ac_cv_framework_CoreFoundation" = "xyes" ]]; then |
553 |
|
EXTRASYSSRCS="$EXTRASYSSRCS ../MacOSX/sys_darwin.cpp" |
554 |
|
fi |
555 |
|
if [[ "x$ac_cv_framework_Carbon" = "xyes" ]]; then |
556 |
|
EXTFSSRC=../MacOSX/extfs_macosx.mm |
557 |
|
fi |
558 |
|
;; |
559 |
< |
cygwin*) |
560 |
< |
SERIALSRC="../dummy/serial_dummy.cpp" |
559 |
> |
irix*) |
560 |
> |
AUDIOSRC=Irix/audio_irix.cpp |
561 |
> |
LIBS="$LIBS -laudio" |
562 |
> |
WANT_ESD=no |
563 |
> |
|
564 |
> |
dnl Check if our compiler supports -IPA (MIPSPro) |
565 |
> |
HAVE_IPA=no |
566 |
> |
ocflags="$CFLAGS" |
567 |
> |
CFLAGS=`echo " $CFLAGS -IPA" | sed -e "s/ -g //g"` |
568 |
> |
AC_MSG_CHECKING(if "-IPA" works) |
569 |
> |
dnl Do a test compile of an empty function |
570 |
> |
AC_TRY_COMPILE([#if defined __GNUC__ |
571 |
> |
# error GCC does not support IPA yet |
572 |
> |
#endif],, [AC_MSG_RESULT(yes); HAVE_IPA=yes], AC_MSG_RESULT(no)) |
573 |
> |
CFLAGS="$ocflags" |
574 |
> |
;; |
575 |
> |
esac |
576 |
> |
|
577 |
> |
dnl Is the slirp library supported? |
578 |
> |
case "$ac_cv_have_byte_bitfields" in |
579 |
> |
yes|"guessing yes") |
580 |
> |
CAN_SLIRP=yes |
581 |
> |
ETHERSRC=ether_unix.cpp |
582 |
|
;; |
583 |
|
esac |
584 |
+ |
if [[ -n "$CAN_SLIRP" ]]; then |
585 |
+ |
AC_DEFINE(HAVE_SLIRP, 1, [Define if slirp library is supported]) |
586 |
+ |
SLIRP_SRCS="\ |
587 |
+ |
../slirp/bootp.c ../slirp/ip_output.c ../slirp/tcp_input.c \ |
588 |
+ |
../slirp/cksum.c ../slirp/mbuf.c ../slirp/tcp_output.c \ |
589 |
+ |
../slirp/debug.c ../slirp/misc.c ../slirp/tcp_subr.c \ |
590 |
+ |
../slirp/if.c ../slirp/sbuf.c ../slirp/tcp_timer.c \ |
591 |
+ |
../slirp/ip_icmp.c ../slirp/slirp.c ../slirp/tftp.c \ |
592 |
+ |
../slirp/ip_input.c ../slirp/socket.c ../slirp/udp.c" |
593 |
+ |
fi |
594 |
+ |
AC_SUBST(SLIRP_SRCS) |
595 |
|
|
596 |
|
dnl SDL overrides |
597 |
|
if [[ "x$WANT_SDL" = "xyes" ]]; then |
604 |
|
if [[ "x$ac_cv_framework_Carbon" = "xyes" ]]; then |
605 |
|
EXTRASYSSRCS="$EXTRASYSSRCS ../MacOSX/clip_macosx.cpp" |
606 |
|
else |
607 |
< |
case "$target_os" in |
434 |
< |
cygwin*) |
435 |
< |
EXTRASYSSRCS="$EXTRASYSSRCS ../Windows/clip_windows.cpp" |
436 |
< |
;; |
437 |
< |
*) |
438 |
< |
EXTRASYSSRCS="$EXTRASYSSRCS ../dummy/clip_dummy.cpp" |
439 |
< |
;; |
440 |
< |
esac |
607 |
> |
EXTRASYSSRCS="$EXTRASYSSRCS ../dummy/clip_dummy.cpp" |
608 |
|
fi |
609 |
|
else |
610 |
|
VIDEOSRCS="video_x.cpp" |
623 |
|
dnl $1 -- the macro to define |
624 |
|
dnl $2 -- the value to translate |
625 |
|
dnl $3 -- template name |
626 |
< |
AC_DEFUN(AC_TRANSLATE_DEFINE, [ |
626 |
> |
AC_DEFUN([AC_TRANSLATE_DEFINE], [ |
627 |
|
if [[ "x$2" = "xyes" -o "x$2" = "xguessing yes" ]]; then |
628 |
|
AC_DEFINE($1, 1, $3) |
629 |
|
fi |
1032 |
|
|
1033 |
|
dnl Check addressing mode to use |
1034 |
|
AC_MSG_CHECKING([for addressing mode to use]) |
868 |
– |
case "$os_target" in |
869 |
– |
cygwin*) |
870 |
– |
WANT_ADDRESSING_MODE="direct,cygwin-hack" |
871 |
– |
NATMEM_OFFSET= |
872 |
– |
;; |
873 |
– |
esac |
1035 |
|
if [[ "$EMULATED_PPC" != "yes" ]]; then |
1036 |
|
if [[ "$WANT_ADDRESSING_MODE" != "real" ]]; then |
1037 |
|
AC_MSG_WARN([Running in native PowerPC mode, force use of Real Addressing.]) |
1113 |
|
fi |
1114 |
|
AC_MSG_RESULT($WANT_ADDRESSING_MODE) |
1115 |
|
|
1116 |
+ |
dnl Utility macro used by next two tests. |
1117 |
+ |
dnl AC_EXAMINE_OBJECT(C source code, |
1118 |
+ |
dnl commands examining object file, |
1119 |
+ |
dnl [commands to run if compile failed]): |
1120 |
+ |
dnl |
1121 |
+ |
dnl Compile the source code to an object file; then convert it into a |
1122 |
+ |
dnl printable representation. All unprintable characters and |
1123 |
+ |
dnl asterisks (*) are replaced by dots (.). All white space is |
1124 |
+ |
dnl deleted. Newlines (ASCII 0x10) in the input are preserved in the |
1125 |
+ |
dnl output, but runs of newlines are compressed to a single newline. |
1126 |
+ |
dnl Finally, line breaks are forcibly inserted so that no line is |
1127 |
+ |
dnl longer than 80 columns and the file ends with a newline. The |
1128 |
+ |
dnl result of all this processing is in the file conftest.dmp, which |
1129 |
+ |
dnl may be examined by the commands in the second argument. |
1130 |
+ |
dnl |
1131 |
+ |
AC_DEFUN([gcc_AC_EXAMINE_OBJECT], |
1132 |
+ |
[AC_LANG_SAVE |
1133 |
+ |
AC_LANG_C |
1134 |
+ |
dnl Next bit cribbed from AC_TRY_COMPILE. |
1135 |
+ |
cat > conftest.$ac_ext <<EOF |
1136 |
+ |
[#line __oline__ "configure" |
1137 |
+ |
#include "confdefs.h" |
1138 |
+ |
$1 |
1139 |
+ |
]EOF |
1140 |
+ |
if AC_TRY_EVAL(ac_compile); then |
1141 |
+ |
od -c conftest.o | |
1142 |
+ |
sed ['s/^[0-7]*[ ]*/ / |
1143 |
+ |
s/\*/./g |
1144 |
+ |
s/ \\n/*/g |
1145 |
+ |
s/ [0-9][0-9][0-9]/./g |
1146 |
+ |
s/ \\[^ ]/./g'] | |
1147 |
+ |
tr -d ' |
1148 |
+ |
' | tr -s '*' ' |
1149 |
+ |
' | fold | sed '$a\ |
1150 |
+ |
' > conftest.dmp |
1151 |
+ |
$2 |
1152 |
+ |
ifelse($3, , , else |
1153 |
+ |
$3 |
1154 |
+ |
)dnl |
1155 |
+ |
fi |
1156 |
+ |
rm -rf conftest* |
1157 |
+ |
AC_LANG_RESTORE]) |
1158 |
+ |
|
1159 |
+ |
dnl Floating point format probe. |
1160 |
+ |
dnl The basic concept is the same as the above: grep the object |
1161 |
+ |
dnl file for an interesting string. We have to watch out for |
1162 |
+ |
dnl rounding changing the values in the object, however; this is |
1163 |
+ |
dnl handled by ignoring the least significant byte of the float. |
1164 |
+ |
dnl |
1165 |
+ |
dnl Does not know about VAX G-float or C4x idiosyncratic format. |
1166 |
+ |
dnl It does know about PDP-10 idiosyncratic format, but this is |
1167 |
+ |
dnl not presently supported by GCC. S/390 "binary floating point" |
1168 |
+ |
dnl is in fact IEEE (but maybe we should have that in EBCDIC as well |
1169 |
+ |
dnl as ASCII?) |
1170 |
+ |
dnl |
1171 |
+ |
AC_DEFUN([gcc_AC_C_FLOAT_FORMAT], |
1172 |
+ |
[AC_CACHE_CHECK(floating point format, ac_cv_c_float_format, |
1173 |
+ |
[gcc_AC_EXAMINE_OBJECT( |
1174 |
+ |
[/* This will not work unless sizeof(double) == 8. */ |
1175 |
+ |
extern char sizeof_double_must_be_8 [sizeof(double) == 8 ? 1 : -1]; |
1176 |
+ |
|
1177 |
+ |
/* This structure must have no internal padding. */ |
1178 |
+ |
struct possibility { |
1179 |
+ |
char prefix[8]; |
1180 |
+ |
double candidate; |
1181 |
+ |
char postfix[8]; |
1182 |
+ |
}; |
1183 |
+ |
|
1184 |
+ |
#define C(cand) { "\nformat:", cand, ":tamrof\n" } |
1185 |
+ |
struct possibility table [] = |
1186 |
+ |
{ |
1187 |
+ |
C( 3.25724264705901305206e+01), /* @@IEEEFP - IEEE 754 */ |
1188 |
+ |
C( 3.53802595280598432000e+18), /* D__float - VAX */ |
1189 |
+ |
C( 5.32201830133125317057e-19), /* D.PDP-10 - PDP-10 - the dot is 0x13a */ |
1190 |
+ |
C( 1.77977764695171661377e+10), /* IBMHEXFP - s/390 format, ascii */ |
1191 |
+ |
C(-5.22995989424860458374e+10) /* IBMHEXFP - s/390 format, EBCDIC */ |
1192 |
+ |
};], |
1193 |
+ |
[if grep 'format:.@IEEEF.:tamrof' conftest.dmp >/dev/null 2>&1; then |
1194 |
+ |
ac_cv_c_float_format='IEEE (big-endian)' |
1195 |
+ |
elif grep 'format:.I@@PFE.:tamrof' conftest.dmp >/dev/null 2>&1; then |
1196 |
+ |
ac_cv_c_float_format='IEEE (big-endian)' |
1197 |
+ |
elif grep 'format:.FEEEI@.:tamrof' conftest.dmp >/dev/null 2>&1; then |
1198 |
+ |
ac_cv_c_float_format='IEEE (little-endian)' |
1199 |
+ |
elif grep 'format:.EFP@@I.:tamrof' conftest.dmp >/dev/null 2>&1; then |
1200 |
+ |
ac_cv_c_float_format='IEEE (little-endian)' |
1201 |
+ |
elif grep 'format:.__floa.:tamrof' conftest.dmp >/dev/null 2>&1; then |
1202 |
+ |
ac_cv_c_float_format='VAX D-float' |
1203 |
+ |
elif grep 'format:..PDP-1.:tamrof' conftest.dmp >/dev/null 2>&1; then |
1204 |
+ |
ac_cv_c_float_format='PDP-10' |
1205 |
+ |
elif grep 'format:.BMHEXF.:tamrof' conftest.dmp >/dev/null 2>&1; then |
1206 |
+ |
ac_cv_c_float_format='IBM 370 hex' |
1207 |
+ |
else |
1208 |
+ |
AC_MSG_ERROR(Unknown floating point format) |
1209 |
+ |
fi], |
1210 |
+ |
[AC_MSG_ERROR(compile failed)]) |
1211 |
+ |
]) |
1212 |
+ |
# IEEE is the default format. If the float endianness isn't the same |
1213 |
+ |
# as the integer endianness, we have to set FLOAT_WORDS_BIG_ENDIAN |
1214 |
+ |
# (which is a tristate: yes, no, default). This is only an issue with |
1215 |
+ |
# IEEE; the other formats are only supported by a few machines each, |
1216 |
+ |
# all with the same endianness. |
1217 |
+ |
format=IEEE_FLOAT_FORMAT |
1218 |
+ |
fbigend= |
1219 |
+ |
case $ac_cv_c_float_format in |
1220 |
+ |
'IEEE (big-endian)' ) |
1221 |
+ |
if test $ac_cv_c_bigendian = no; then |
1222 |
+ |
fbigend=1 |
1223 |
+ |
fi |
1224 |
+ |
;; |
1225 |
+ |
'IEEE (little-endian)' ) |
1226 |
+ |
if test $ac_cv_c_bigendian = yes; then |
1227 |
+ |
fbigend=0 |
1228 |
+ |
fi |
1229 |
+ |
;; |
1230 |
+ |
'VAX D-float' ) |
1231 |
+ |
format=VAX_FLOAT_FORMAT |
1232 |
+ |
;; |
1233 |
+ |
'PDP-10' ) |
1234 |
+ |
format=PDP10_FLOAT_FORMAT |
1235 |
+ |
;; |
1236 |
+ |
'IBM 370 hex' ) |
1237 |
+ |
format=IBM_FLOAT_FORMAT |
1238 |
+ |
;; |
1239 |
+ |
esac |
1240 |
+ |
AC_DEFINE_UNQUOTED(HOST_FLOAT_FORMAT, $format, |
1241 |
+ |
[Define to the floating point format of the host machine.]) |
1242 |
+ |
if test -n "$fbigend"; then |
1243 |
+ |
AC_DEFINE_UNQUOTED(HOST_FLOAT_WORDS_BIG_ENDIAN, $fbigend, |
1244 |
+ |
[Define to 1 if the host machine stores floating point numbers in |
1245 |
+ |
memory with the word containing the sign bit at the lowest address, |
1246 |
+ |
or to 0 if it does it the other way around. |
1247 |
+ |
|
1248 |
+ |
This macro should not be defined if the ordering is the same as for |
1249 |
+ |
multi-word integers.]) |
1250 |
+ |
fi |
1251 |
+ |
]) |
1252 |
+ |
|
1253 |
+ |
dnl Check for host float format |
1254 |
+ |
gcc_AC_C_FLOAT_FORMAT |
1255 |
+ |
|
1256 |
|
dnl Platform specific binary postprocessor |
1257 |
|
AC_PATH_PROG(BLESS, "true") |
1258 |
|
if [[ "x$ac_cv_pagezero_hack" = "xyes" ]]; then |
1263 |
|
dnl Check for GCC 2.7 or higher. |
1264 |
|
HAVE_GCC27=no |
1265 |
|
AC_MSG_CHECKING(for GCC 2.7 or higher) |
1266 |
< |
AC_EGREP_CPP(xyes, |
1267 |
< |
[#if __GNUC__ - 1 > 1 || __GNUC_MINOR__ - 1 > 5 |
1268 |
< |
xyes |
1269 |
< |
#endif |
1270 |
< |
], [AC_MSG_RESULT(yes); HAVE_GCC27=yes], AC_MSG_RESULT(no)) |
1266 |
> |
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#if ! (__GNUC__ - 1 > 1 || __GNUC_MINOR__ - 1 > 5) |
1267 |
> |
# error gcc < 2.7 |
1268 |
> |
typedef syntax error; |
1269 |
> |
#endif |
1270 |
> |
]])], |
1271 |
> |
[AC_MSG_RESULT(yes); HAVE_GCC27=yes], |
1272 |
> |
[AC_MSG_RESULT(no)]) |
1273 |
|
|
1274 |
|
dnl Check for GCC 3.0 or higher. |
1275 |
|
HAVE_GCC30=no |
1276 |
|
AC_MSG_CHECKING(for GCC 3.0 or higher) |
1277 |
< |
AC_EGREP_CPP(xyes, |
1278 |
< |
[#if __GNUC__ >= 3 |
1279 |
< |
xyes |
1280 |
< |
#endif |
1281 |
< |
], [AC_MSG_RESULT(yes); HAVE_GCC30=yes], AC_MSG_RESULT(no)) |
1277 |
> |
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#if ! (__GNUC__ >= 3) |
1278 |
> |
# error gcc < 3 |
1279 |
> |
typedef syntax error; |
1280 |
> |
#endif |
1281 |
> |
]])], |
1282 |
> |
[AC_MSG_RESULT(yes); HAVE_GCC30=yes], |
1283 |
> |
[AC_MSG_RESULT(no)]) |
1284 |
|
|
1285 |
|
dnl Check for ICC. |
1286 |
|
AC_MSG_CHECKING(for ICC) |
1291 |
|
AC_MSG_RESULT($HAVE_ICC) |
1292 |
|
|
1293 |
|
dnl Determine the generated object format |
1294 |
< |
AC_CACHE_CHECK([whether the compiler can generate ELF objects], |
1294 |
> |
AC_CACHE_CHECK([the format of compiler generated objects], |
1295 |
|
ac_cv_object_format, [ |
1296 |
|
echo 'int i;' > conftest.$ac_ext |
1297 |
|
ac_cv_object_format=no |
1300 |
|
*"ELF"*) |
1301 |
|
ac_cv_object_format=elf |
1302 |
|
;; |
1303 |
+ |
*"Mach-O"*) |
1304 |
+ |
ac_cv_object_format=mach |
1305 |
+ |
;; |
1306 |
|
*) |
1307 |
|
ac_cv_object_format=unknown |
1308 |
|
;; |
1311 |
|
rm -rf conftest* |
1312 |
|
]) |
1313 |
|
|
1314 |
+ |
dnl Add -fno-strict-aliasing for slirp sources |
1315 |
+ |
if [[ "x$HAVE_GCC30" = "xyes" ]]; then |
1316 |
+ |
SAVED_CFLAGS="$CFLAGS" |
1317 |
+ |
CFLAGS="$CFLAGS -fno-strict-aliasing" |
1318 |
+ |
AC_CACHE_CHECK([whether the compiler supports -fno-strict-aliasing], |
1319 |
+ |
ac_cv_gcc_no_strict_aliasing, [ |
1320 |
+ |
AC_TRY_COMPILE([],[], |
1321 |
+ |
[ac_cv_gcc_no_strict_aliasing=yes; AC_SUBST(SLIRP_CFLAGS, "-fno-strict-aliasing")], |
1322 |
+ |
[ac_cv_gcc_no_strict_aliasing=no]) |
1323 |
+ |
]) |
1324 |
+ |
CFLAGS="$SAVED_CFLAGS" |
1325 |
+ |
fi |
1326 |
+ |
|
1327 |
+ |
dnl Add -mdynamic-no-pic for MacOS X (XXX icc10 will support MacOS X) |
1328 |
+ |
if [[ "x$HAVE_GCC30" = "xyes" -a "x$HAVE_ICC" = "xno" ]]; then |
1329 |
+ |
SAVED_CFLAGS="$CFLAGS" |
1330 |
+ |
CFLAGS="$CFLAGS -mdynamic-no-pic" |
1331 |
+ |
AC_CACHE_CHECK([whether the compiler supports -mdynamic-no-pic], |
1332 |
+ |
ac_cv_gcc_mdynamic_no_pic, [ |
1333 |
+ |
AC_TRY_COMPILE([],[],[ac_cv_gcc_mdynamic_no_pic=yes],[ac_cv_gcc_mdynamic_no_pic=no]) |
1334 |
+ |
]) |
1335 |
+ |
if [[ "x$ac_cv_gcc_mdynamic_no_pic" = "xyes" ]]; then |
1336 |
+ |
CXXFLAGS="$CXXFLAGS -mdynamic-no-pic" |
1337 |
+ |
else |
1338 |
+ |
CFLAGS="$SAVED_CFLAGS" |
1339 |
+ |
fi |
1340 |
+ |
fi |
1341 |
+ |
|
1342 |
|
dnl CPU emulator sources |
1343 |
|
if [[ "x$EMULATED_PPC" = "xyes" ]]; then |
1344 |
|
CPUSRCS="\ |
1345 |
|
../kpx_cpu/src/mathlib/ieeefp.cpp \ |
1346 |
+ |
../kpx_cpu/src/mathlib/mathlib.cpp \ |
1347 |
|
../kpx_cpu/src/cpu/ppc/ppc-cpu.cpp \ |
1348 |
|
../kpx_cpu/src/cpu/ppc/ppc-decode.cpp \ |
1349 |
|
../kpx_cpu/src/cpu/ppc/ppc-execute.cpp \ |
1364 |
|
i?86:elf) |
1365 |
|
ac_cv_use_dyngen=yes |
1366 |
|
;; |
1367 |
+ |
mips:elf) |
1368 |
+ |
ac_cv_use_dyngen=yes |
1369 |
+ |
;; |
1370 |
+ |
powerpc:mach) |
1371 |
+ |
ac_cv_use_dyngen=yes |
1372 |
+ |
;; |
1373 |
+ |
i?86:mach) |
1374 |
+ |
ac_cv_use_dyngen=yes |
1375 |
+ |
;; |
1376 |
|
*:*) |
1377 |
|
ac_cv_use_dyngen=no |
1378 |
|
;; |
1382 |
|
if [[ "x$HAVE_GCC27" = "xyes" -a "x$HAVE_ICC" = "xno" ]]; then |
1383 |
|
DYNGEN_CC=$CXX |
1384 |
|
else |
1385 |
< |
for p in /usr/bin /usr/local/bin; do |
1385 |
> |
for p in /usr/bin /usr/local/bin /usr/freeware/bin; do |
1386 |
|
gxx="$p/g++" |
1387 |
|
if [[ -x "$gxx" ]]; then |
1388 |
|
DYNGEN_CC="$gxx" |
1390 |
|
done |
1391 |
|
fi |
1392 |
|
fi |
1393 |
< |
if [[ -z "$DYNGEN_CC" ]] || ! { echo '#include <limits>' | $DYNGEN_CC -xc++ -c -o /dev/null - >& /dev/null; }; then |
1393 |
> |
if [[ -z "$DYNGEN_CC" ]]; then |
1394 |
|
ac_cv_use_dyngen=no |
1395 |
|
fi |
1396 |
|
]) |
1397 |
|
if [[ "x$ac_cv_use_dyngen" = "xyes" ]]; then |
1398 |
|
case $host_cpu in |
1399 |
|
i?86) |
1400 |
< |
DYNGEN_OP_FLAGS="-fomit-frame-pointer -mpreferred-stack-boundary=2" |
1055 |
< |
if [[ "x$HAVE_GCC30" = "xyes" ]]; then |
1056 |
< |
DYNGEN_OP_FLAGS="$DYNGEN_OP_FLAGS -falign-functions=0" |
1057 |
< |
else |
1058 |
< |
DYNGEN_OP_FLAGS="$DYNGEN_OP_FLAGS -malign-functions=0" |
1059 |
< |
fi |
1060 |
< |
saved_CPPFLAGS=$CPPFLAGS |
1061 |
< |
CPPFLAGS="$CPPFLAGS -mmmx" |
1062 |
< |
AC_CHECK_HEADERS(mmintrin.h, [DYNGEN_OP_FLAGS="$DYNGEN_OP_FLAGS -mmmx"]) |
1063 |
< |
CPPFLAGS="$CPPFLAGS -msse" |
1064 |
< |
AC_CHECK_HEADERS(xmmintrin.h, [DYNGEN_OP_FLAGS="$DYNGEN_OP_FLAGS -msse"]) |
1065 |
< |
CPPFLAGS="$CPPFLAGS -msse2" |
1066 |
< |
AC_CHECK_HEADERS(emmintrin.h, [DYNGEN_OP_FLAGS="$DYNGEN_OP_FLAGS -msse2"]) |
1067 |
< |
CPPFLAGS=$saved_CPPFLAGS |
1400 |
> |
DYNGEN_OP_FLAGS="-fomit-frame-pointer" |
1401 |
|
;; |
1402 |
< |
x86_64) |
1403 |
< |
AC_CHECK_HEADERS(mmintrin.h xmmintrin.h emmintrin.h) |
1402 |
> |
mips) |
1403 |
> |
DYNGEN_OP_FLAGS="-fno-delayed-branch -mno-abicalls" |
1404 |
|
;; |
1405 |
+ |
powerpc) |
1406 |
+ |
if [[ "x$ac_cv_object_format" = "xmach" ]]; then |
1407 |
+ |
DYNGEN_OP_FLAGS="-mdynamic-no-pic" |
1408 |
+ |
fi |
1409 |
+ |
;; |
1410 |
+ |
esac |
1411 |
+ |
have_dyngen_gcc3=no |
1412 |
+ |
case "x`$DYNGEN_CC -dumpversion`" in |
1413 |
+ |
x[12].*) ;; |
1414 |
+ |
x*) have_dyngen_gcc3=yes ;; |
1415 |
|
esac |
1416 |
< |
DYNGEN_OP_FLAGS="$DYNGEN_OP_FLAGS -finline-limit=10000" |
1417 |
< |
if [[ "x$HAVE_GCC30" = "xyes" ]]; then |
1416 |
> |
if [[ "x$have_dyngen_gcc3" = "xyes" ]]; then |
1417 |
> |
DYNGEN_OP_FLAGS="$DYNGEN_OP_FLAGS -falign-functions=0" |
1418 |
> |
else |
1419 |
> |
DYNGEN_OP_FLAGS="$DYNGEN_OP_FLAGS -malign-functions=0" |
1420 |
> |
fi |
1421 |
> |
DYNGEN_OP_FLAGS="$DYNGEN_OP_FLAGS -finline-functions -finline-limit=10000 -fno-exceptions -g0" |
1422 |
> |
if [[ "x$have_dyngen_gcc3" = "xyes" ]]; then |
1423 |
|
DYNGEN_OP_FLAGS="$DYNGEN_OP_FLAGS -fno-reorder-blocks -fno-optimize-sibling-calls" |
1424 |
|
fi |
1425 |
+ |
if [[ "x$DYNGEN_CC" != "x$CXX" ]]; then |
1426 |
+ |
DYNGEN_CFLAGS="-O2 $CFLAGS" |
1427 |
+ |
DYNGEN_CXXFLAGS="-O2 $CXXFLAGS" |
1428 |
+ |
else |
1429 |
+ |
DYNGEN_CFLAGS="\$(CFLAGS)" |
1430 |
+ |
DYNGEN_CXXFLAGS="\$(CXXFLAGS)" |
1431 |
+ |
fi |
1432 |
|
else |
1433 |
|
WANT_JIT=no |
1434 |
|
fi |
1451 |
|
AC_CACHE_CHECK([whether static data regions are executable], |
1452 |
|
ac_cv_have_static_data_exec, [ |
1453 |
|
AC_TRY_RUN([int main(void) { |
1454 |
< |
#if defined(__powerpc__) |
1454 |
> |
#if defined(__powerpc__) || defined(__ppc__) |
1455 |
|
static unsigned int p[8] = {0x4e800020,}; |
1456 |
|
asm volatile("dcbst 0,%0" : : "r" (p) : "memory"); |
1457 |
|
asm volatile("sync" : : : "memory"); |
1477 |
|
CPPFLAGS="$CPPFLAGS -DUSE_JIT" |
1478 |
|
fi |
1479 |
|
|
1480 |
+ |
dnl Higher level optimizations with MIPSPro compilers are possible |
1481 |
+ |
if [[ "x$HAVE_IPA" = "xyes" ]]; then |
1482 |
+ |
CFLAGS="`echo $CFLAGS | sed -e 's/-g//g'` -O3 -OPT:Olimit=0 -IPA" |
1483 |
+ |
CXXFLAGS="`echo $CXXFLAGS | sed -e 's/-g//g'` -O3 -OPT:Olimit=0 -IPA" |
1484 |
+ |
CXXFLAGS="-LANG:std $CXXFLAGS" |
1485 |
+ |
LDFLAGS="$LDFLAGS -O3 -OPT:Olimit=0 -IPA" |
1486 |
+ |
fi |
1487 |
+ |
|
1488 |
|
dnl Generate Makefile. |
1489 |
+ |
AC_SUBST(PERL) |
1490 |
|
AC_SUBST(USE_DYNGEN, [$ac_cv_use_dyngen]) |
1491 |
|
AC_SUBST(DYNGENSRCS) |
1492 |
|
AC_SUBST(DYNGEN_CC) |
1493 |
+ |
AC_SUBST(DYNGEN_CFLAGS) |
1494 |
+ |
AC_SUBST(DYNGEN_CXXFLAGS) |
1495 |
|
AC_SUBST(DYNGEN_OP_FLAGS) |
1496 |
|
AC_SUBST(SYSSRCS) |
1497 |
|
AC_SUBST(CPUSRCS) |
1507 |
|
echo SheepShaver configuration summary: |
1508 |
|
echo |
1509 |
|
echo SDL support ...................... : $SDL_SUPPORT |
1510 |
+ |
echo FBDev DGA support ................ : $WANT_FBDEV_DGA |
1511 |
|
echo XFree86 DGA support .............. : $WANT_XF86_DGA |
1512 |
|
echo XFree86 VidMode support .......... : $WANT_XF86_VIDMODE |
1513 |
|
echo Using PowerPC emulator ........... : $EMULATED_PPC |