1 |
gbeauche |
1.1 |
dnl Process this file with autoconf to produce a configure script. |
2 |
|
|
dnl Written in 2002 by Christian Bauer |
3 |
|
|
|
4 |
gbeauche |
1.40 |
AC_INIT([SheepShaver], 2.3, [Christian.Bauer@uni-mainz.de], SheepShaver) |
5 |
gbeauche |
1.1 |
AC_CONFIG_SRCDIR(main_unix.cpp) |
6 |
|
|
AC_PREREQ(2.52) |
7 |
|
|
AC_CONFIG_HEADER(config.h) |
8 |
|
|
|
9 |
|
|
dnl Canonical system information. |
10 |
|
|
AC_CANONICAL_HOST |
11 |
|
|
AC_CANONICAL_TARGET |
12 |
|
|
|
13 |
gbeauche |
1.2 |
dnl Some systems do not put corefiles in the currect directory, avoid saving |
14 |
|
|
dnl cores for the configure tests since some are intended to dump core. |
15 |
|
|
ulimit -c 0 |
16 |
|
|
|
17 |
gbeauche |
1.33 |
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 |
gbeauche |
1.1 |
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 |
gbeauche |
1.21 |
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 |
gbeauche |
1.1 |
AC_ARG_ENABLE(xf86-dga, [ --enable-xf86-dga use the XFree86 DGA extension [default=yes]], [WANT_XF86_DGA=$enableval], [WANT_XF86_DGA=yes]) |
29 |
gbeauche |
1.22 |
AC_ARG_ENABLE(xf86-vidmode, [ --enable-xf86-vidmode use the XFree86 VidMode extension [default=yes]], [WANT_XF86_VIDMODE=$enableval], [WANT_XF86_VIDMODE=yes]) |
30 |
gbeauche |
1.1 |
AC_ARG_ENABLE(vosf, [ --enable-vosf enable video on SEGV signals [default=yes]], [WANT_VOSF=$enableval], [WANT_VOSF=yes]) |
31 |
|
|
AC_ARG_WITH(esd, [ --with-esd support ESD for sound under Linux/FreeBSD [default=yes]], [WANT_ESD=$withval], [WANT_ESD=yes]) |
32 |
gbeauche |
1.20 |
AC_ARG_WITH(gtk, [ --with-gtk use GTK user interface [default=yes]], |
33 |
|
|
[case "$withval" in |
34 |
|
|
gtk1) WANT_GTK="gtk";; |
35 |
|
|
gtk|gtk2) WANT_GTK="$withval";; |
36 |
|
|
yes) WANT_GTK="gtk2 gtk";; |
37 |
|
|
*) WANT_GTK="no";; |
38 |
|
|
esac], |
39 |
|
|
[WANT_GTK="gtk2 gtk"]) |
40 |
gbeauche |
1.1 |
AC_ARG_WITH(mon, [ --with-mon use mon as debugger [default=yes]], [WANT_MON=$withval], [WANT_MON=yes]) |
41 |
|
|
AC_ARG_WITH(dgcc, [ --with-dgcc=COMPILER use C++ COMPILER to compile synthetic opcodes], [DYNGEN_CC=$withval]) |
42 |
|
|
|
43 |
gbeauche |
1.8 |
dnl Addressing mode |
44 |
|
|
AC_ARG_ENABLE(addressing, |
45 |
|
|
[ --enable-addressing=AM set the addressing mode to use [default=real]], |
46 |
|
|
[case "$enableval" in |
47 |
|
|
real) WANT_ADDRESSING_MODE="real";; |
48 |
|
|
direct) WANT_ADDRESSING_MODE="direct";; |
49 |
gbeauche |
1.13 |
direct,0x*) WANT_ADDRESSING_MODE="direct"; NATMEM_OFFSET=`echo "$enableval" | sed -n '/direct,\(0[[xX]][[0-9A-Fa-f]]*\([[UuLl]]\{1,2\}\)\?\)$/s//\1/p'`;; |
50 |
gbeauche |
1.8 |
esac], |
51 |
|
|
[WANT_ADDRESSING_MODE="real"] |
52 |
|
|
) |
53 |
|
|
|
54 |
gbeauche |
1.1 |
dnl SDL options. |
55 |
|
|
AC_ARG_ENABLE(sdl-static, [ --enable-sdl-static use SDL static libraries for linking [default=no]], [WANT_SDL_STATIC=$enableval], [WANT_SDL_STATIC=no]) |
56 |
|
|
AC_ARG_ENABLE(sdl-video, [ --enable-sdl-video use SDL for video graphics [default=no]], [WANT_SDL_VIDEO=$enableval], [WANT_SDL_VIDEO=no]) |
57 |
gbeauche |
1.7 |
AC_ARG_ENABLE(sdl-audio, [ --enable-sdl-audio use SDL for audio [default=no]], [WANT_SDL_AUDIO=$enableval], [WANT_SDL_AUDIO=no]) |
58 |
gbeauche |
1.1 |
|
59 |
|
|
dnl Checks for programs. |
60 |
|
|
AC_PROG_CC |
61 |
|
|
AC_PROG_CPP |
62 |
|
|
AC_PROG_CXX |
63 |
|
|
AC_PROG_MAKE_SET |
64 |
|
|
AC_PROG_INSTALL |
65 |
gbeauche |
1.3 |
AC_PROG_EGREP |
66 |
gbeauche |
1.16 |
AC_PATH_PROGS(FILE, [file false]) |
67 |
|
|
AC_PATH_PROG(PERL, [perl]) |
68 |
gbeauche |
1.1 |
|
69 |
|
|
dnl Check for PowerPC target CPU. |
70 |
|
|
HAVE_PPC=no |
71 |
|
|
AC_MSG_CHECKING(for PowerPC target CPU) |
72 |
|
|
AC_EGREP_CPP(yes, |
73 |
|
|
[ |
74 |
|
|
#ifdef __powerpc__ |
75 |
|
|
yes |
76 |
|
|
#endif |
77 |
|
|
#ifdef __ppc__ |
78 |
|
|
yes |
79 |
|
|
#endif |
80 |
|
|
], [AC_MSG_RESULT(yes); HAVE_PPC=yes], AC_MSG_RESULT(no)) |
81 |
|
|
|
82 |
|
|
dnl We use native CPU if possible. |
83 |
|
|
EMULATED_PPC=yes |
84 |
|
|
case $WANT_EMULATED_PPC in |
85 |
|
|
auto) [[ "x$HAVE_PPC" = "xyes" ]] && EMULATED_PPC=no;; |
86 |
|
|
no) EMULATED_PPC=no;; |
87 |
|
|
esac |
88 |
|
|
if [[ "x$EMULATED_PPC" = "xyes" ]]; then |
89 |
|
|
AC_DEFINE(EMULATED_PPC, 1, [Define if using a PowerPC CPU emulator.]) |
90 |
|
|
fi |
91 |
|
|
|
92 |
|
|
dnl We use mon if possible. |
93 |
|
|
MONSRCS= |
94 |
|
|
case "x$WANT_MON" in |
95 |
|
|
x/* | x.*) |
96 |
|
|
mon_srcdir=$WANT_MON |
97 |
|
|
WANT_MON=yes |
98 |
|
|
;; |
99 |
|
|
xyes) |
100 |
|
|
mon_srcdir=../../../mon/src |
101 |
|
|
;; |
102 |
|
|
esac |
103 |
|
|
if [[ "x$WANT_MON" = "xyes" ]]; then |
104 |
|
|
AC_MSG_CHECKING(for mon) |
105 |
|
|
if grep mon_init $mon_srcdir/mon.h >/dev/null 2>/dev/null; then |
106 |
|
|
AC_MSG_RESULT(yes) |
107 |
|
|
AC_DEFINE(ENABLE_MON, 1, [Define if using "mon".]) |
108 |
|
|
MONSRCS="$mon_srcdir/mon.cpp $mon_srcdir/mon_6502.cpp $mon_srcdir/mon_z80.cpp $mon_srcdir/mon_cmd.cpp $mon_srcdir/mon_lowmem.cpp $mon_srcdir/mon_disass.cpp $mon_srcdir/mon_ppc.cpp $mon_srcdir/disass/floatformat.c $mon_srcdir/disass/i386-dis.c $mon_srcdir/disass/m68k-dis.c $mon_srcdir/disass/m68k-opc.c" |
109 |
|
|
CXXFLAGS="$CXXFLAGS -I$mon_srcdir -I$mon_srcdir/disass" |
110 |
|
|
AC_CHECK_LIB(ncurses, tgetent, , |
111 |
|
|
AC_CHECK_LIB(termcap, tgetent, , |
112 |
|
|
AC_CHECK_LIB(termlib, tgetent, , |
113 |
|
|
AC_CHECK_LIB(terminfo, tgetent, , |
114 |
|
|
AC_CHECK_LIB(Hcurses, tgetent, , |
115 |
|
|
AC_CHECK_LIB(curses, tgetent)))))) |
116 |
|
|
AC_CHECK_LIB(readline, readline) |
117 |
|
|
AC_CHECK_HEADERS(readline.h history.h readline/readline.h readline/history.h) |
118 |
|
|
else |
119 |
|
|
AC_MSG_RESULT(no) |
120 |
|
|
AC_MSG_WARN([Could not find mon, ignoring --with-mon.]) |
121 |
|
|
WANT_MON=no |
122 |
|
|
fi |
123 |
|
|
fi |
124 |
gbeauche |
1.11 |
AC_SUBST(MONSRCS) |
125 |
gbeauche |
1.1 |
|
126 |
|
|
dnl Checks for libraries. |
127 |
|
|
AC_CHECK_LIB(posix4, sem_init) |
128 |
gbeauche |
1.42 |
AC_CHECK_LIB(m, cos) |
129 |
gbeauche |
1.1 |
|
130 |
|
|
dnl Do we need SDL? |
131 |
|
|
WANT_SDL=no |
132 |
|
|
if [[ "x$WANT_SDL_VIDEO" = "xyes" ]]; then |
133 |
|
|
WANT_SDL=yes |
134 |
|
|
WANT_XF86_DGA=no |
135 |
|
|
WANT_XF86_VIDMODE=no |
136 |
|
|
WANT_FBDEV_DGA=no |
137 |
gbeauche |
1.7 |
SDL_SUPPORT="$SDL_SUPPORT video" |
138 |
|
|
fi |
139 |
|
|
if [[ "x$WANT_SDL_AUDIO" = "xyes" ]]; then |
140 |
|
|
WANT_SDL=yes |
141 |
|
|
SDL_SUPPORT="$SDL_SUPPORT audio" |
142 |
gbeauche |
1.1 |
fi |
143 |
|
|
if [[ "x$WANT_SDL" = "xyes" ]]; then |
144 |
|
|
AC_PATH_PROG(sdl_config, "sdl-config") |
145 |
|
|
if [[ -n "$sdl_config" ]]; then |
146 |
gbeauche |
1.33 |
sdl_cflags=`$sdl_config --cflags` |
147 |
|
|
if [[ "x$WANT_SDL_STATIC" = "xyes" ]]; then |
148 |
|
|
sdl_libs=`$sdl_config --static-libs` |
149 |
|
|
else |
150 |
|
|
sdl_libs=`$sdl_config --libs` |
151 |
|
|
fi |
152 |
gbeauche |
1.1 |
CFLAGS="$CFLAGS $sdl_cflags" |
153 |
|
|
CXXFLAGS="$CXXFLAGS $sdl_cflags" |
154 |
|
|
LIBS="$LIBS $sdl_libs" |
155 |
|
|
else |
156 |
|
|
WANT_SDL=no |
157 |
gbeauche |
1.15 |
WANT_SDL_VIDEO=no |
158 |
|
|
WANT_SDL_AUDIO=no |
159 |
gbeauche |
1.1 |
fi |
160 |
gbeauche |
1.7 |
SDL_SUPPORT=`echo "$SDL_SUPPORT" | sed -e "s/^ //"` |
161 |
|
|
else |
162 |
|
|
SDL_SUPPORT="none" |
163 |
gbeauche |
1.1 |
fi |
164 |
|
|
|
165 |
|
|
dnl We need X11, if not using SDL. |
166 |
gbeauche |
1.15 |
if [[ "x$WANT_SDL_VIDEO" != "xyes" ]]; then |
167 |
gbeauche |
1.1 |
AC_PATH_XTRA |
168 |
|
|
if [[ "x$no_x" = "xyes" ]]; then |
169 |
|
|
AC_MSG_ERROR([You need X11 to run SheepShaver.]) |
170 |
|
|
fi |
171 |
|
|
CFLAGS="$CFLAGS $X_CFLAGS" |
172 |
|
|
CXXFLAGS="$CXXFLAGS $X_CFLAGS" |
173 |
|
|
LIBS="$LIBS $X_PRE_LIBS $X_LIBS -lX11 -lXext $X_EXTRA_LIBS" |
174 |
|
|
fi |
175 |
|
|
|
176 |
|
|
dnl We need pthreads on non-PowerPC systems. Try libpthread first, then libc_r (FreeBSD), then PTL. |
177 |
|
|
HAVE_PTHREADS=yes |
178 |
|
|
case $EMULATED_PPC:$target_os in |
179 |
gbeauche |
1.17 |
no:linux*|no:netbsd*) |
180 |
gbeauche |
1.1 |
dnl We do have our own pthread_cancel() implementation |
181 |
|
|
AC_DEFINE(HAVE_PTHREAD_CANCEL, 1, [Define if you have the pthread_cancel function.]) |
182 |
|
|
;; |
183 |
|
|
*:*) |
184 |
|
|
AC_CHECK_LIB(pthread, pthread_create, , [ |
185 |
|
|
AC_CHECK_LIB(c_r, pthread_create, , [ |
186 |
|
|
AC_CHECK_LIB(PTL, pthread_create, , [ |
187 |
gbeauche |
1.29 |
dnl XXX remove when no pthreads case is merged |
188 |
|
|
AC_MSG_ERROR([You need pthreads to run SheepShaver.]) |
189 |
|
|
HAVE_PTHREADS=no |
190 |
gbeauche |
1.1 |
]) |
191 |
|
|
]) |
192 |
|
|
]) |
193 |
|
|
AC_CHECK_FUNCS(pthread_cancel) |
194 |
gbeauche |
1.34 |
AC_CHECK_FUNCS(pthread_cond_init pthread_testcancel) |
195 |
gbeauche |
1.1 |
AC_CHECK_FUNCS(pthread_mutexattr_setprotocol) |
196 |
|
|
AC_CHECK_FUNCS(pthread_mutexattr_settype) |
197 |
|
|
AC_CHECK_FUNCS(pthread_mutexattr_setpshared) |
198 |
|
|
dnl If POSIX.4 semaphores are not available, we emulate them with pthread mutexes. |
199 |
|
|
SEMSRC= |
200 |
|
|
AC_CHECK_FUNCS(sem_init, , [ |
201 |
|
|
if test "x$HAVE_PTHREADS" = "xyes"; then |
202 |
|
|
SEMSRC=posix_sem.cpp |
203 |
|
|
fi |
204 |
|
|
]) |
205 |
|
|
;; |
206 |
|
|
esac |
207 |
gbeauche |
1.29 |
if [[ "x$HAVE_PTHREADS" = "xyes" ]]; then |
208 |
|
|
AC_DEFINE(HAVE_PTHREADS, 1, [Define if pthreads are available.]) |
209 |
|
|
fi |
210 |
gbeauche |
1.1 |
|
211 |
gbeauche |
1.21 |
dnl We use FBDev DGA if possible. |
212 |
|
|
if [[ "x$WANT_FBDEV_DGA" = "xyes" ]]; then |
213 |
|
|
AC_CHECK_HEADER(linux/fb.h, [ |
214 |
|
|
AC_DEFINE(ENABLE_FBDEV_DGA, 1, [Define if using Linux fbdev extension.]) |
215 |
|
|
], [ |
216 |
|
|
AC_MSG_WARN([Could not find Linux FBDev extension, ignoring --enable-fbdev-dga.]) |
217 |
|
|
WANT_FBDEV_DGA=no |
218 |
|
|
]) |
219 |
|
|
fi |
220 |
|
|
|
221 |
gbeauche |
1.1 |
dnl We use XFree86 DGA if possible. |
222 |
|
|
if [[ "x$WANT_XF86_DGA" = "xyes" ]]; then |
223 |
|
|
AC_CHECK_LIB(Xxf86dga, XF86DGAQueryExtension, [ |
224 |
|
|
AC_DEFINE(ENABLE_XF86_DGA, 1, [Define if using XFree86 DGA extension.]) |
225 |
|
|
LIBS="$LIBS -lXxf86dga" |
226 |
|
|
], [ |
227 |
|
|
AC_MSG_WARN([Could not find XFree86 DGA extension, ignoring --enable-xf86-dga.]) |
228 |
|
|
WANT_XF86_DGA=no |
229 |
|
|
]) |
230 |
|
|
fi |
231 |
|
|
|
232 |
|
|
dnl We use XFree86 VidMode if possible. |
233 |
|
|
if [[ "x$WANT_XF86_VIDMODE" = "xyes" ]]; then |
234 |
|
|
AC_CHECK_LIB(Xxf86vm, XF86VidModeQueryExtension, [ |
235 |
|
|
AC_DEFINE(ENABLE_XF86_VIDMODE, 1, [Define if using XFree86 DGA extension.]) |
236 |
|
|
LIBS="$LIBS -lXxf86vm" |
237 |
|
|
], [ |
238 |
|
|
AC_MSG_WARN([Could not find XFree86 VidMode extension, ignoring --enable-xf86-vidmode.]) |
239 |
|
|
WANT_XF86_VIDMODE=no |
240 |
|
|
]) |
241 |
|
|
fi |
242 |
|
|
|
243 |
|
|
dnl We use GTK+ if possible. |
244 |
|
|
UISRCS=../dummy/prefs_editor_dummy.cpp |
245 |
gbeauche |
1.20 |
case "x$WANT_GTK" in |
246 |
|
|
xgtk2*) |
247 |
|
|
AM_PATH_GTK_2_0(1.3.15, [ |
248 |
|
|
AC_DEFINE(ENABLE_GTK, 1, [Define if using GTK.]) |
249 |
|
|
CFLAGS="$CFLAGS $GTK_CFLAGS" |
250 |
|
|
CXXFLAGS="$CXXFLAGS $GTK_CFLAGS" |
251 |
|
|
LIBS="$LIBS $GTK_LIBS" |
252 |
|
|
UISRCS=prefs_editor_gtk.cpp |
253 |
|
|
WANT_GTK=gtk2 |
254 |
|
|
], [ |
255 |
|
|
case "x${WANT_GTK}x" in |
256 |
|
|
*gtkx) |
257 |
|
|
AC_MSG_WARN([Could not find GTK+ 2.0, trying with GTK+ 1.2.]) |
258 |
|
|
WANT_GTK=gtk |
259 |
|
|
;; |
260 |
|
|
*) |
261 |
|
|
AC_MSG_WARN([Could not find GTK+, disabling user interface.]) |
262 |
|
|
WANT_GTK=no |
263 |
|
|
;; |
264 |
|
|
esac |
265 |
|
|
]) |
266 |
|
|
;; |
267 |
|
|
esac |
268 |
|
|
if [[ "x$WANT_GTK" = "xgtk" ]]; then |
269 |
gbeauche |
1.1 |
AM_PATH_GTK(1.2.0, [ |
270 |
|
|
AC_DEFINE(ENABLE_GTK, 1, [Define if using GTK.]) |
271 |
|
|
CFLAGS="$CFLAGS $GTK_CFLAGS" |
272 |
|
|
CXXFLAGS="$CXXFLAGS $GTK_CFLAGS" |
273 |
|
|
LIBS="$LIBS $GTK_LIBS" |
274 |
|
|
UISRCS=prefs_editor_gtk.cpp |
275 |
|
|
], [ |
276 |
|
|
AC_MSG_WARN([Could not find GTK+, disabling user interface.]) |
277 |
|
|
WANT_GTK=no |
278 |
|
|
]) |
279 |
|
|
fi |
280 |
|
|
|
281 |
|
|
dnl We use ESD if possible. |
282 |
|
|
if [[ "x$WANT_ESD" = "xyes" ]]; then |
283 |
|
|
AM_PATH_ESD(0.2.8, [ |
284 |
|
|
AC_DEFINE(ENABLE_ESD, 1, [Define is using ESD.]) |
285 |
|
|
CFLAGS="$CFLAGS $ESD_CFLAGS" |
286 |
|
|
CXXFLAGS="$CXXFLAGS $ESD_CFLAGS" |
287 |
|
|
LIBS="$LIBS $ESD_LIBS" |
288 |
|
|
], [ |
289 |
|
|
AC_MSG_WARN([Could not find ESD, disabling ESD support.]) |
290 |
|
|
WANT_ESD=no |
291 |
|
|
]) |
292 |
|
|
fi |
293 |
|
|
|
294 |
gbeauche |
1.2 |
dnl We use 64-bit file size support if possible. |
295 |
|
|
AC_SYS_LARGEFILE |
296 |
|
|
|
297 |
gbeauche |
1.1 |
dnl Checks for header files. |
298 |
|
|
AC_HEADER_STDC |
299 |
|
|
AC_HEADER_SYS_WAIT |
300 |
gbeauche |
1.31 |
AC_CHECK_HEADERS(malloc.h stdint.h) |
301 |
gbeauche |
1.1 |
AC_CHECK_HEADERS(mach/vm_map.h mach/mach_init.h sys/mman.h) |
302 |
gbeauche |
1.4 |
AC_CHECK_HEADERS(unistd.h fcntl.h byteswap.h dirent.h) |
303 |
gbeauche |
1.32 |
AC_CHECK_HEADERS(sys/socket.h sys/ioctl.h sys/filio.h sys/bitypes.h sys/wait.h) |
304 |
|
|
AC_CHECK_HEADERS(sys/time.h sys/poll.h sys/select.h arpa/inet.h) |
305 |
|
|
AC_CHECK_HEADERS(linux/if.h linux/if_tun.h net/if.h net/if_tun.h, [], [], [ |
306 |
|
|
#ifdef HAVE_SYS_TYPES_H |
307 |
|
|
#include <sys/types.h> |
308 |
|
|
#endif |
309 |
|
|
#ifdef HAVE_SYS_SOCKET_H |
310 |
|
|
#include <sys/socket.h> |
311 |
gbeauche |
1.1 |
#endif |
312 |
|
|
]) |
313 |
gbeauche |
1.32 |
AC_CHECK_HEADERS(AvailabilityMacros.h) |
314 |
|
|
AC_CHECK_HEADERS(IOKit/storage/IOBlockStorageDevice.h) |
315 |
gbeauche |
1.10 |
AC_CHECK_HEADERS(fenv.h) |
316 |
gbeauche |
1.1 |
|
317 |
|
|
dnl Checks for typedefs, structures, and compiler characteristics. |
318 |
|
|
AC_C_BIGENDIAN |
319 |
|
|
AC_C_CONST |
320 |
|
|
AC_C_INLINE |
321 |
|
|
AC_CHECK_SIZEOF(short, 2) |
322 |
|
|
AC_CHECK_SIZEOF(int, 4) |
323 |
|
|
AC_CHECK_SIZEOF(long, 4) |
324 |
|
|
AC_CHECK_SIZEOF(long long, 8) |
325 |
|
|
AC_CHECK_SIZEOF(float, 4) |
326 |
|
|
AC_CHECK_SIZEOF(double, 8) |
327 |
|
|
AC_CHECK_SIZEOF(void *, 4) |
328 |
|
|
AC_TYPE_OFF_T |
329 |
|
|
AC_CHECK_TYPE(loff_t, off_t) |
330 |
|
|
AC_TYPE_SIZE_T |
331 |
|
|
AC_TYPE_SIGNAL |
332 |
|
|
AC_HEADER_TIME |
333 |
|
|
AC_STRUCT_TM |
334 |
|
|
|
335 |
gbeauche |
1.34 |
dnl Check whether sys/socket.h defines type socklen_t. |
336 |
|
|
dnl (extracted from ac-archive/Miscellaneous) |
337 |
|
|
AC_CACHE_CHECK([for socklen_t], |
338 |
|
|
ac_cv_type_socklen_t, [ |
339 |
|
|
AC_TRY_COMPILE([ |
340 |
|
|
#include <sys/types.h> |
341 |
|
|
#include <sys/socket.h> |
342 |
|
|
], [socklen_t len = 42; return 0;], |
343 |
|
|
ac_cv_type_socklen_t=yes, ac_cv_type_socklen_t=no, |
344 |
|
|
dnl When cross-compiling, do not assume anything. |
345 |
|
|
ac_cv_type_socklen_t="guessing no" |
346 |
|
|
) |
347 |
|
|
]) |
348 |
|
|
if [[ "x$ac_cv_type_socklen_t" != "xyes" ]]; then |
349 |
|
|
AC_DEFINE(socklen_t, int, [Define to 'int' if <sys/types.h> doesn't define.]) |
350 |
|
|
fi |
351 |
|
|
|
352 |
gbeauche |
1.1 |
dnl Check whether struct sigaction has sa_restorer member. |
353 |
|
|
AC_CACHE_CHECK([whether struct sigaction has sa_restorer], |
354 |
|
|
ac_cv_signal_sa_restorer, [ |
355 |
|
|
AC_TRY_COMPILE([ |
356 |
|
|
#include <signal.h> |
357 |
|
|
], [struct sigaction sa; sa.sa_restorer = 0;], |
358 |
|
|
ac_cv_signal_sa_restorer=yes, ac_cv_signal_sa_restorer=no, |
359 |
|
|
dnl When cross-compiling, do not assume anything. |
360 |
|
|
ac_cv_signal_sa_restorer=no |
361 |
|
|
) |
362 |
|
|
]) |
363 |
|
|
if [[ "x$ac_cv_signal_sa_restorer" = "xyes" ]]; then |
364 |
|
|
AC_DEFINE(HAVE_SIGNAL_SA_RESTORER, 1, [Define if sa_restorer is available in struct sigaction.]) |
365 |
|
|
fi |
366 |
|
|
|
367 |
|
|
dnl Checks for library functions. |
368 |
gbeauche |
1.32 |
AC_CHECK_FUNCS(strdup strerror strlcpy cfmakeraw) |
369 |
gbeauche |
1.1 |
AC_CHECK_FUNCS(nanosleep) |
370 |
|
|
AC_CHECK_FUNCS(sigaction signal) |
371 |
|
|
AC_CHECK_FUNCS(mmap mprotect munmap) |
372 |
|
|
AC_CHECK_FUNCS(vm_allocate vm_deallocate vm_protect) |
373 |
gbeauche |
1.26 |
AC_CHECK_FUNCS(exp2f log2f exp2 log2) |
374 |
|
|
AC_CHECK_FUNCS(floorf roundf ceilf truncf floor round ceil trunc) |
375 |
gbeauche |
1.32 |
AC_CHECK_FUNCS(poll inet_aton) |
376 |
gbeauche |
1.1 |
|
377 |
|
|
dnl Darwin seems to define mach_task_self() instead of task_self(). |
378 |
|
|
AC_CHECK_FUNCS(mach_task_self task_self) |
379 |
|
|
|
380 |
|
|
dnl We need clock_gettime() for better performance but it may drag |
381 |
|
|
dnl libpthread in, which we don't want for native ppc mode |
382 |
|
|
case $EMULATED_PPC:$target_os in |
383 |
|
|
no:linux*) |
384 |
|
|
;; |
385 |
|
|
*:*) |
386 |
|
|
AC_SEARCH_LIBS(clock_gettime, [rt posix4]) |
387 |
gbeauche |
1.18 |
AC_CHECK_FUNCS(clock_gettime clock_nanosleep) |
388 |
gbeauche |
1.1 |
;; |
389 |
|
|
esac |
390 |
|
|
|
391 |
gbeauche |
1.9 |
dnl Check for headers and functions related to pty support (sshpty.c) |
392 |
|
|
dnl From openssh-3.2.2p1 configure.ac |
393 |
|
|
AC_CHECK_HEADERS(strings.h login.h sys/bsdtty.h sys/stat.h util.h pty.h) |
394 |
|
|
AC_CHECK_FUNCS(_getpty vhangup strlcpy) |
395 |
|
|
|
396 |
|
|
case "$host" in |
397 |
|
|
*-*-hpux10.26) |
398 |
|
|
disable_ptmx_check=yes |
399 |
|
|
;; |
400 |
|
|
*-*-linux*) |
401 |
|
|
no_dev_ptmx=1 |
402 |
|
|
;; |
403 |
|
|
mips-sony-bsd|mips-sony-newsos4) |
404 |
|
|
AC_DEFINE(HAVE_NEWS4, 1, [Define if you are on NEWS-OS (additions from openssh-3.2.2p1, for sshpty.c).]) |
405 |
|
|
;; |
406 |
|
|
*-*-sco3.2v4*) |
407 |
|
|
no_dev_ptmx=1 |
408 |
|
|
;; |
409 |
|
|
*-*-sco3.2v5*) |
410 |
|
|
no_dev_ptmx=1 |
411 |
|
|
;; |
412 |
|
|
*-*-cygwin*) |
413 |
|
|
no_dev_ptmx=1 |
414 |
|
|
;; |
415 |
|
|
esac |
416 |
|
|
|
417 |
|
|
if test -z "$no_dev_ptmx" ; then |
418 |
|
|
if test "x$disable_ptmx_check" != "xyes" ; then |
419 |
|
|
AC_CHECK_FILE([/dev/ptmx], |
420 |
|
|
[ |
421 |
|
|
AC_DEFINE_UNQUOTED(HAVE_DEV_PTMX, 1, [Define if you have /dev/ptmx.]) |
422 |
|
|
have_dev_ptmx=1 |
423 |
|
|
] |
424 |
|
|
) |
425 |
|
|
fi |
426 |
|
|
fi |
427 |
|
|
AC_CHECK_FILE([/dev/ptc], |
428 |
|
|
[ |
429 |
|
|
AC_DEFINE_UNQUOTED(HAVE_DEV_PTS_AND_PTC, 1, [Define if you have /dev/ptc.]) |
430 |
|
|
have_dev_ptc=1 |
431 |
|
|
] |
432 |
|
|
) |
433 |
|
|
dnl (end of code from openssh-3.2.2p1 configure.ac) |
434 |
|
|
|
435 |
gbeauche |
1.1 |
dnl AC_CHECK_FRAMEWORK($1=NAME, $2=INCLUDES) |
436 |
|
|
AC_DEFUN(AC_CHECK_FRAMEWORK, [ |
437 |
|
|
AS_VAR_PUSHDEF([ac_Framework], [ac_cv_framework_$1])dnl |
438 |
|
|
AC_CACHE_CHECK([whether compiler supports framework $1], |
439 |
|
|
ac_Framework, [ |
440 |
|
|
saved_LIBS="$LIBS" |
441 |
|
|
LIBS="$LIBS -framework $1" |
442 |
|
|
AC_TRY_LINK( |
443 |
gbeauche |
1.45 |
[$2], [], |
444 |
gbeauche |
1.1 |
[AS_VAR_SET(ac_Framework, yes)], [AS_VAR_SET(ac_Framework, no); LIBS="$saved_LIBS"] |
445 |
|
|
) |
446 |
|
|
]) |
447 |
|
|
AS_IF([test AS_VAR_GET(ac_Framework) = yes], |
448 |
|
|
[AC_DEFINE(AS_TR_CPP(HAVE_FRAMEWORK_$1), 1, [Define if framework $1 is available.])] |
449 |
|
|
) |
450 |
|
|
AS_VAR_POPDEF([ac_Framework])dnl |
451 |
|
|
]) |
452 |
|
|
|
453 |
|
|
dnl Check for some MacOS X frameworks |
454 |
|
|
AC_CHECK_FRAMEWORK(Carbon, [#include <Carbon/Carbon.h>]) |
455 |
|
|
AC_CHECK_FRAMEWORK(IOKit, [#include <IOKit/IOKitLib.h>]) |
456 |
gbeauche |
1.37 |
AC_CHECK_FRAMEWORK(CoreFoundation, [#include <CoreFoundation/CoreFoundation.h>]) |
457 |
gbeauche |
1.1 |
|
458 |
|
|
dnl Select system-dependant sources. |
459 |
|
|
SERIALSRC=serial_unix.cpp |
460 |
|
|
ETHERSRC=../dummy/ether_dummy.cpp |
461 |
|
|
SCSISRC=../dummy/scsi_dummy.cpp |
462 |
|
|
AUDIOSRC=../dummy/audio_dummy.cpp |
463 |
gbeauche |
1.6 |
EXTFSSRC=extfs_unix.cpp |
464 |
gbeauche |
1.1 |
EXTRASYSSRCS= |
465 |
|
|
case "$target_os" in |
466 |
|
|
linux*) |
467 |
gbeauche |
1.32 |
ETHERSRC=ether_unix.cpp |
468 |
gbeauche |
1.1 |
AUDIOSRC=audio_oss_esd.cpp |
469 |
|
|
SCSISRC=Linux/scsi_linux.cpp |
470 |
|
|
if [[ "x$EMULATED_PPC" = "xno" ]]; then |
471 |
gbeauche |
1.35 |
EXTRASYSSRCS="paranoia.cpp Linux/sheepthreads.c ppc_asm.S" |
472 |
gbeauche |
1.17 |
fi |
473 |
|
|
;; |
474 |
gbeauche |
1.32 |
freebsd*) |
475 |
|
|
ETHERSRC=ether_unix.cpp |
476 |
|
|
;; |
477 |
gbeauche |
1.17 |
netbsd*) |
478 |
gbeauche |
1.32 |
ETHERSRC=ether_unix.cpp |
479 |
gbeauche |
1.17 |
if [[ "x$EMULATED_PPC" = "xno" ]]; then |
480 |
gbeauche |
1.35 |
EXTRASYSSRCS="paranoia.cpp NetBSD/sheepthreads.c ppc_asm.S" |
481 |
gbeauche |
1.1 |
fi |
482 |
|
|
;; |
483 |
|
|
darwin*) |
484 |
gbeauche |
1.32 |
ETHERSRC=ether_unix.cpp |
485 |
gbeauche |
1.1 |
if [[ "x$EMULATED_PPC" = "xno" ]]; then |
486 |
gbeauche |
1.35 |
EXTRASYSSRCS="paranoia.cpp ppc_asm.S" |
487 |
gbeauche |
1.1 |
fi |
488 |
gbeauche |
1.37 |
if [[ "x$ac_cv_framework_IOKit" = "xyes" -a "x$ac_cv_framework_CoreFoundation" = "xyes" ]]; then |
489 |
gbeauche |
1.1 |
EXTRASYSSRCS="$EXTRASYSSRCS ../MacOSX/sys_darwin.cpp" |
490 |
|
|
fi |
491 |
gbeauche |
1.6 |
if [[ "x$ac_cv_framework_Carbon" = "xyes" ]]; then |
492 |
|
|
EXTFSSRC=../MacOSX/extfs_macosx.mm |
493 |
|
|
fi |
494 |
gbeauche |
1.1 |
;; |
495 |
gbeauche |
1.42 |
irix*) |
496 |
|
|
ETHERSRC=ether_unix.cpp |
497 |
|
|
AUDIOSRC=Irix/audio_irix.cpp |
498 |
|
|
LIBS="$LIBS -laudio" |
499 |
|
|
WANT_ESD=no |
500 |
gbeauche |
1.43 |
|
501 |
|
|
dnl Check if our compiler supports -IPA (MIPSPro) |
502 |
|
|
HAVE_IPA=no |
503 |
|
|
ocflags="$CFLAGS" |
504 |
|
|
CFLAGS=`echo " $CFLAGS -IPA" | sed -e "s/ -g //g"` |
505 |
|
|
AC_MSG_CHECKING(if "-IPA" works) |
506 |
|
|
dnl Do a test compile of an empty function |
507 |
|
|
AC_TRY_COMPILE([#if defined __GNUC__ |
508 |
|
|
# error GCC does not support IPA yet |
509 |
|
|
#endif],, [AC_MSG_RESULT(yes); HAVE_IPA=yes], AC_MSG_RESULT(no)) |
510 |
|
|
CFLAGS="$ocflags" |
511 |
gbeauche |
1.42 |
;; |
512 |
gbeauche |
1.1 |
esac |
513 |
|
|
|
514 |
gbeauche |
1.32 |
dnl Is the slirp library supported? |
515 |
|
|
if [[ "x$ETHERSRC" = "xether_unix.cpp" ]]; then |
516 |
|
|
AC_DEFINE(HAVE_SLIRP, 1, [Define if slirp library is supported]) |
517 |
|
|
SLIRP_SRCS="\ |
518 |
|
|
../slirp/bootp.c ../slirp/ip_output.c ../slirp/tcp_input.c \ |
519 |
|
|
../slirp/cksum.c ../slirp/mbuf.c ../slirp/tcp_output.c \ |
520 |
|
|
../slirp/debug.c ../slirp/misc.c ../slirp/tcp_subr.c \ |
521 |
|
|
../slirp/if.c ../slirp/sbuf.c ../slirp/tcp_timer.c \ |
522 |
|
|
../slirp/ip_icmp.c ../slirp/slirp.c ../slirp/tftp.c \ |
523 |
|
|
../slirp/ip_input.c ../slirp/socket.c ../slirp/udp.c" |
524 |
|
|
fi |
525 |
|
|
AC_SUBST(SLIRP_SRCS) |
526 |
|
|
|
527 |
gbeauche |
1.1 |
dnl SDL overrides |
528 |
|
|
if [[ "x$WANT_SDL" = "xyes" ]]; then |
529 |
|
|
AC_DEFINE(USE_SDL, 1, [Define to enble SDL support.]) |
530 |
|
|
fi |
531 |
|
|
if [[ "x$WANT_SDL_VIDEO" = "xyes" ]]; then |
532 |
gbeauche |
1.7 |
AC_DEFINE(USE_SDL_VIDEO, 1, [Define to enable SDL video graphics support.]) |
533 |
gbeauche |
1.1 |
VIDEOSRCS="../SDL/video_sdl.cpp" |
534 |
|
|
KEYCODES="../SDL/keycodes" |
535 |
|
|
if [[ "x$ac_cv_framework_Carbon" = "xyes" ]]; then |
536 |
|
|
EXTRASYSSRCS="$EXTRASYSSRCS ../MacOSX/clip_macosx.cpp" |
537 |
|
|
else |
538 |
gbeauche |
1.33 |
EXTRASYSSRCS="$EXTRASYSSRCS ../dummy/clip_dummy.cpp" |
539 |
gbeauche |
1.1 |
fi |
540 |
|
|
else |
541 |
|
|
VIDEOSRCS="video_x.cpp" |
542 |
|
|
KEYCODES="keycodes" |
543 |
|
|
EXTRASYSSRCS="$EXTRASYSSRCS clip_unix.cpp" |
544 |
|
|
fi |
545 |
gbeauche |
1.7 |
if [[ "x$WANT_SDL_AUDIO" = "xyes" ]]; then |
546 |
|
|
AC_DEFINE(USE_SDL_AUDIO, 1, [Define to enable SDL audio support]) |
547 |
|
|
AUDIOSRC="../SDL/audio_sdl.cpp" |
548 |
|
|
fi |
549 |
gbeauche |
1.1 |
|
550 |
gbeauche |
1.11 |
SYSSRCS="$VIDEOSRCS $EXTFSSRC $SERIALSRC $ETHERSRC $SCSISRC $AUDIOSRC $SEMSRC $UISRCS $EXTRASYSSRCS" |
551 |
gbeauche |
1.1 |
|
552 |
|
|
dnl Define a macro that translates a yesno-variable into a C macro definition |
553 |
|
|
dnl to be put into the config.h file |
554 |
|
|
dnl $1 -- the macro to define |
555 |
|
|
dnl $2 -- the value to translate |
556 |
|
|
dnl $3 -- template name |
557 |
|
|
AC_DEFUN(AC_TRANSLATE_DEFINE, [ |
558 |
|
|
if [[ "x$2" = "xyes" -o "x$2" = "xguessing yes" ]]; then |
559 |
|
|
AC_DEFINE($1, 1, $3) |
560 |
|
|
fi |
561 |
|
|
]) |
562 |
|
|
|
563 |
|
|
dnl Check that the host supports TUN/TAP devices |
564 |
|
|
AC_CACHE_CHECK([whether TUN/TAP is supported], |
565 |
|
|
ac_cv_tun_tap_support, [ |
566 |
|
|
AC_TRY_COMPILE([ |
567 |
|
|
#if defined(HAVE_LINUX_IF_H) && defined(HAVE_LINUX_IF_TUN_H) |
568 |
|
|
#include <linux/if.h> |
569 |
|
|
#include <linux/if_tun.h> |
570 |
|
|
#endif |
571 |
|
|
#if defined(HAVE_NET_IF_H) && defined(HAVE_NET_IF_TUN_H) |
572 |
|
|
#include <net/if.h> |
573 |
|
|
#include <net/if_tun.h> |
574 |
|
|
#endif |
575 |
|
|
], [ |
576 |
|
|
struct ifreq ifr; |
577 |
|
|
memset(&ifr, 0, sizeof(ifr)); |
578 |
|
|
ifr.ifr_flags = IFF_TAP | IFF_NO_PI; |
579 |
|
|
], |
580 |
|
|
ac_cv_tun_tap_support=yes, ac_cv_tun_tap_support=no |
581 |
|
|
) |
582 |
|
|
]) |
583 |
|
|
AC_TRANSLATE_DEFINE(ENABLE_TUNTAP, "$ac_cv_tun_tap_support", |
584 |
|
|
[Define if your system supports TUN/TAP devices.]) |
585 |
|
|
|
586 |
|
|
dnl Various checks if the system supports vm_allocate() and the like functions. |
587 |
|
|
have_mach_vm=no |
588 |
|
|
if [[ "x$ac_cv_func_vm_allocate" = "xyes" -a "x$ac_cv_func_vm_deallocate" = "xyes" -a \ |
589 |
|
|
"x$ac_cv_func_vm_protect" = "xyes" ]]; then |
590 |
|
|
have_mach_vm=yes |
591 |
|
|
fi |
592 |
|
|
AC_TRANSLATE_DEFINE(HAVE_MACH_VM, "$have_mach_vm", |
593 |
|
|
[Define if your system has a working vm_allocate()-based memory allocator.]) |
594 |
|
|
|
595 |
|
|
dnl Check that vm_allocate(), vm_protect() work |
596 |
|
|
if [[ "x$have_mach_vm" = "xyes" ]]; then |
597 |
|
|
|
598 |
|
|
AC_CACHE_CHECK([whether vm_protect works], |
599 |
|
|
ac_cv_vm_protect_works, [ |
600 |
|
|
AC_LANG_SAVE |
601 |
|
|
AC_LANG_CPLUSPLUS |
602 |
|
|
ac_cv_vm_protect_works=yes |
603 |
|
|
dnl First the tests that should segfault |
604 |
|
|
for test_def in NONE_READ NONE_WRITE READ_WRITE; do |
605 |
|
|
AC_TRY_RUN([ |
606 |
|
|
#define CONFIGURE_TEST_VM_MAP |
607 |
|
|
#define TEST_VM_PROT_$test_def |
608 |
|
|
#include "vm_alloc.cpp" |
609 |
|
|
], ac_cv_vm_protect_works=no, rm -f core, |
610 |
|
|
dnl When cross-compiling, do not assume anything |
611 |
|
|
ac_cv_vm_protect_works="guessing no" |
612 |
|
|
) |
613 |
|
|
done |
614 |
|
|
AC_TRY_RUN([ |
615 |
|
|
#define CONFIGURE_TEST_VM_MAP |
616 |
|
|
#define TEST_VM_PROT_RDWR_WRITE |
617 |
|
|
#include "vm_alloc.cpp" |
618 |
|
|
], , ac_cv_vm_protect_works=no, |
619 |
|
|
dnl When cross-compiling, do not assume anything |
620 |
|
|
ac_cv_vm_protect_works="guessing no" |
621 |
|
|
) |
622 |
|
|
AC_LANG_RESTORE |
623 |
|
|
] |
624 |
|
|
) |
625 |
|
|
|
626 |
|
|
dnl Remove support for vm_allocate() if vm_protect() does not work |
627 |
|
|
if [[ "x$have_mach_vm" = "xyes" ]]; then |
628 |
|
|
case $ac_cv_vm_protect_works in |
629 |
|
|
*yes) have_mach_vm=yes;; |
630 |
|
|
*no) have_mach_vm=no;; |
631 |
|
|
esac |
632 |
|
|
fi |
633 |
|
|
AC_TRANSLATE_DEFINE(HAVE_MACH_VM, "$have_mach_vm", |
634 |
|
|
[Define if your system has a working vm_allocate()-based memory allocator.]) |
635 |
|
|
|
636 |
|
|
fi dnl HAVE_MACH_VM |
637 |
|
|
|
638 |
|
|
dnl Various checks if the system supports mmap() and the like functions. |
639 |
|
|
dnl ... and Mach memory allocators are not supported |
640 |
|
|
have_mmap_vm=no |
641 |
|
|
if [[ "x$ac_cv_func_mmap" = "xyes" -a "x$ac_cv_func_munmap" = "xyes" -a \ |
642 |
|
|
"x$ac_cv_func_mprotect" = "xyes" ]]; then |
643 |
|
|
if [[ "x$have_mach_vm" = "xno" ]]; then |
644 |
|
|
have_mmap_vm=yes |
645 |
|
|
fi |
646 |
|
|
fi |
647 |
|
|
AC_TRANSLATE_DEFINE(HAVE_MMAP_VM, "$have_mmap_vm", |
648 |
|
|
[Define if your system has a working mmap()-based memory allocator.]) |
649 |
|
|
|
650 |
|
|
dnl Check that mmap() and associated functions work. |
651 |
|
|
if [[ "x$have_mmap_vm" = "xyes" ]]; then |
652 |
|
|
|
653 |
|
|
dnl Check if we have a working anonymous mmap() |
654 |
|
|
AC_CACHE_CHECK([whether mmap supports MAP_ANON], |
655 |
|
|
ac_cv_mmap_anon, [ |
656 |
|
|
AC_LANG_SAVE |
657 |
|
|
AC_LANG_CPLUSPLUS |
658 |
|
|
AC_TRY_RUN([ |
659 |
|
|
#define HAVE_MMAP_ANON |
660 |
|
|
#define CONFIGURE_TEST_VM_MAP |
661 |
|
|
#define TEST_VM_MMAP_ANON |
662 |
|
|
#include "vm_alloc.cpp" |
663 |
|
|
], ac_cv_mmap_anon=yes, ac_cv_mmap_anon=no, |
664 |
|
|
dnl When cross-compiling, do not assume anything. |
665 |
|
|
ac_cv_mmap_anon="guessing no" |
666 |
|
|
) |
667 |
|
|
AC_LANG_RESTORE |
668 |
|
|
] |
669 |
|
|
) |
670 |
|
|
AC_TRANSLATE_DEFINE(HAVE_MMAP_ANON, "$ac_cv_mmap_anon", |
671 |
|
|
[Define if <sys/mman.h> defines MAP_ANON and mmap()'ing with MAP_ANON works.]) |
672 |
|
|
|
673 |
|
|
AC_CACHE_CHECK([whether mmap supports MAP_ANONYMOUS], |
674 |
|
|
ac_cv_mmap_anonymous, [ |
675 |
|
|
AC_LANG_SAVE |
676 |
|
|
AC_LANG_CPLUSPLUS |
677 |
|
|
AC_TRY_RUN([ |
678 |
|
|
#define HAVE_MMAP_ANONYMOUS |
679 |
|
|
#define CONFIGURE_TEST_VM_MAP |
680 |
|
|
#define TEST_VM_MMAP_ANON |
681 |
|
|
#include "vm_alloc.cpp" |
682 |
|
|
], ac_cv_mmap_anonymous=yes, ac_cv_mmap_anonymous=no, |
683 |
|
|
dnl When cross-compiling, do not assume anything. |
684 |
|
|
ac_cv_mmap_anonymous="guessing no" |
685 |
|
|
) |
686 |
|
|
AC_LANG_RESTORE |
687 |
|
|
] |
688 |
|
|
) |
689 |
|
|
AC_TRANSLATE_DEFINE(HAVE_MMAP_ANONYMOUS, "$ac_cv_mmap_anonymous", |
690 |
|
|
[Define if <sys/mman.h> defines MAP_ANONYMOUS and mmap()'ing with MAP_ANONYMOUS works.]) |
691 |
|
|
|
692 |
|
|
AC_CACHE_CHECK([whether mprotect works], |
693 |
|
|
ac_cv_mprotect_works, [ |
694 |
|
|
AC_LANG_SAVE |
695 |
|
|
AC_LANG_CPLUSPLUS |
696 |
|
|
ac_cv_mprotect_works=yes |
697 |
|
|
dnl First the tests that should segfault |
698 |
|
|
for test_def in NONE_READ NONE_WRITE READ_WRITE; do |
699 |
|
|
AC_TRY_RUN([ |
700 |
|
|
#define CONFIGURE_TEST_VM_MAP |
701 |
|
|
#define TEST_VM_PROT_$test_def |
702 |
|
|
#include "vm_alloc.cpp" |
703 |
|
|
], ac_cv_mprotect_works=no, rm -f core, |
704 |
|
|
dnl When cross-compiling, do not assume anything |
705 |
|
|
ac_cv_mprotect_works="guessing no" |
706 |
|
|
) |
707 |
|
|
done |
708 |
|
|
AC_TRY_RUN([ |
709 |
|
|
#define CONFIGURE_TEST_VM_MAP |
710 |
|
|
#define TEST_VM_PROT_RDWR_WRITE |
711 |
|
|
#include "vm_alloc.cpp" |
712 |
|
|
], , ac_cv_mprotect_works=no, |
713 |
|
|
dnl When cross-compiling, do not assume anything |
714 |
|
|
ac_cv_mprotect_works="guessing no" |
715 |
|
|
) |
716 |
|
|
AC_LANG_RESTORE |
717 |
|
|
] |
718 |
|
|
) |
719 |
|
|
|
720 |
|
|
dnl Remove support for mmap() if mprotect() does not work |
721 |
|
|
if [[ "x$have_mmap_vm" = "xyes" ]]; then |
722 |
|
|
case $ac_cv_mprotect_works in |
723 |
|
|
*yes) have_mmap_vm=yes;; |
724 |
|
|
*no) have_mmap_vm=no;; |
725 |
|
|
esac |
726 |
|
|
fi |
727 |
|
|
AC_TRANSLATE_DEFINE(HAVE_MMAP_VM, $have_mmap_vm, |
728 |
|
|
[Define if your system has a working mmap()-based memory allocator.]) |
729 |
|
|
|
730 |
|
|
fi dnl HAVE_MMAP_VM |
731 |
|
|
|
732 |
|
|
dnl Check if we can modify the __PAGEZERO segment for use as Low Memory |
733 |
|
|
AC_CACHE_CHECK([whether __PAGEZERO can be Low Memory area 0x0000-0x3000], |
734 |
|
|
ac_cv_pagezero_hack, [ |
735 |
|
|
ac_cv_pagezero_hack=no |
736 |
|
|
if AC_TRY_COMMAND([Darwin/testlmem.sh 0x3000]); then |
737 |
|
|
ac_cv_pagezero_hack=yes |
738 |
|
|
dnl might as well skip the test for mmap-able low memory |
739 |
|
|
ac_cv_can_map_lm=no |
740 |
|
|
fi |
741 |
|
|
]) |
742 |
|
|
AC_TRANSLATE_DEFINE(PAGEZERO_HACK, "$ac_cv_pagezero_hack", |
743 |
|
|
[Define if the __PAGEZERO Mach-O Low Memory Globals hack works on this system.]) |
744 |
|
|
|
745 |
|
|
dnl Check if we can mmap 0x3000 bytes from 0x0000 |
746 |
|
|
AC_CACHE_CHECK([whether we can map Low Memory area 0x0000-0x3000], |
747 |
|
|
ac_cv_can_map_lm, [ |
748 |
|
|
AC_LANG_SAVE |
749 |
|
|
AC_LANG_CPLUSPLUS |
750 |
|
|
AC_TRY_RUN([ |
751 |
|
|
#include "vm_alloc.cpp" |
752 |
|
|
int main(void) { /* returns 0 if we could map the lowmem globals */ |
753 |
|
|
volatile char * lm = 0; |
754 |
|
|
if (vm_init() < 0) exit(1); |
755 |
|
|
if (vm_acquire_fixed(0, 0x2000) < 0) exit(1); |
756 |
|
|
lm[0] = 'z'; |
757 |
|
|
if (vm_release((char *)lm, 0x2000) < 0) exit(1); |
758 |
|
|
vm_exit(); exit(0); |
759 |
|
|
} |
760 |
|
|
], ac_cv_can_map_lm=yes, ac_cv_can_map_lm=no, |
761 |
|
|
dnl When cross-compiling, do not assume anything. |
762 |
|
|
ac_cv_can_map_lm="guessing no" |
763 |
|
|
) |
764 |
|
|
AC_LANG_RESTORE |
765 |
|
|
] |
766 |
|
|
) |
767 |
|
|
|
768 |
|
|
dnl Check signal handlers need to be reinstalled |
769 |
|
|
AC_CACHE_CHECK([whether signal handlers need to be reinstalled], |
770 |
|
|
ac_cv_signal_need_reinstall, [ |
771 |
|
|
AC_LANG_SAVE |
772 |
|
|
AC_LANG_CPLUSPLUS |
773 |
|
|
AC_TRY_RUN([ |
774 |
|
|
#include <stdlib.h> |
775 |
|
|
#ifdef HAVE_UNISTD_H |
776 |
|
|
#include <unistd.h> |
777 |
|
|
#endif |
778 |
|
|
#include <signal.h> |
779 |
|
|
static int handled_signal = 0; |
780 |
|
|
RETSIGTYPE sigusr1_handler(int) { handled_signal++; } |
781 |
|
|
int main(void) { /* returns 0 if signals need not to be reinstalled */ |
782 |
|
|
signal(SIGUSR1, sigusr1_handler); raise(SIGUSR1); raise(SIGUSR1); |
783 |
|
|
exit(handled_signal == 2); |
784 |
|
|
} |
785 |
|
|
], ac_cv_signal_need_reinstall=yes, ac_cv_signal_need_reinstall=no, |
786 |
|
|
dnl When cross-compiling, do not assume anything. |
787 |
|
|
ac_cv_signal_need_reinstall="guessing yes" |
788 |
|
|
) |
789 |
|
|
AC_LANG_RESTORE |
790 |
|
|
] |
791 |
|
|
) |
792 |
|
|
AC_TRANSLATE_DEFINE(SIGNAL_NEED_REINSTALL, "$ac_cv_signal_need_reinstall", |
793 |
|
|
[Define if your system requires signals to be reinstalled.]) |
794 |
|
|
|
795 |
|
|
dnl Check if sigaction handlers need to be reinstalled |
796 |
|
|
AC_CACHE_CHECK([whether sigaction handlers need to be reinstalled], |
797 |
|
|
ac_cv_sigaction_need_reinstall, [ |
798 |
|
|
AC_LANG_SAVE |
799 |
|
|
AC_LANG_CPLUSPLUS |
800 |
|
|
AC_TRY_RUN([ |
801 |
|
|
#include <stdlib.h> |
802 |
|
|
#ifdef HAVE_UNISTD_H |
803 |
|
|
#include <unistd.h> |
804 |
|
|
#endif |
805 |
|
|
#include <signal.h> |
806 |
|
|
static int handled_signal = 0; |
807 |
|
|
RETSIGTYPE sigusr1_handler(int) { handled_signal++; } |
808 |
|
|
typedef RETSIGTYPE (*signal_handler)(int); |
809 |
|
|
static signal_handler mysignal(int sig, signal_handler handler) { |
810 |
|
|
struct sigaction old_sa; |
811 |
|
|
struct sigaction new_sa; |
812 |
|
|
new_sa.sa_handler = handler; |
813 |
|
|
return ((sigaction(sig,&new_sa,&old_sa) < 0) ? SIG_IGN : old_sa.sa_handler); |
814 |
|
|
} |
815 |
|
|
int main(void) { /* returns 0 if signals need not to be reinstalled */ |
816 |
|
|
mysignal(SIGUSR1, sigusr1_handler); raise(SIGUSR1); raise(SIGUSR1); |
817 |
|
|
exit(handled_signal == 2); |
818 |
|
|
} |
819 |
|
|
], ac_cv_sigaction_need_reinstall=yes, ac_cv_sigaction_need_reinstall=no, |
820 |
|
|
dnl When cross-compiling, do not assume anything. |
821 |
|
|
ac_cv_sigaction_need_reinstall="guessing yes" |
822 |
|
|
) |
823 |
|
|
AC_LANG_RESTORE |
824 |
|
|
] |
825 |
|
|
) |
826 |
|
|
AC_TRANSLATE_DEFINE(SIGACTION_NEED_REINSTALL, "$ac_cv_sigaction_need_reinstall", |
827 |
|
|
[Define if your system requires sigactions to be reinstalled.]) |
828 |
|
|
|
829 |
|
|
dnl Check if Mach exceptions supported. |
830 |
|
|
AC_CACHE_CHECK([whether your system supports Mach exceptions], |
831 |
|
|
ac_cv_have_mach_exceptions, [ |
832 |
|
|
AC_LANG_SAVE |
833 |
|
|
AC_LANG_CPLUSPLUS |
834 |
|
|
AC_TRY_RUN([ |
835 |
|
|
#define HAVE_MACH_EXCEPTIONS 1 |
836 |
|
|
#define CONFIGURE_TEST_SIGSEGV_RECOVERY |
837 |
|
|
#include "vm_alloc.cpp" |
838 |
|
|
#include "sigsegv.cpp" |
839 |
|
|
], |
840 |
|
|
ac_cv_have_mach_exceptions=yes, |
841 |
|
|
ac_cv_have_mach_exceptions=no, |
842 |
|
|
dnl When cross-compiling, do not assume anything. |
843 |
|
|
ac_cv_have_mach_exceptions=no |
844 |
|
|
) |
845 |
|
|
AC_LANG_RESTORE |
846 |
|
|
] |
847 |
|
|
) |
848 |
|
|
if [[ "$ac_cv_have_mach_exceptions" = "yes" ]]; then |
849 |
|
|
sigsegv_recovery=mach |
850 |
|
|
fi |
851 |
|
|
AC_TRANSLATE_DEFINE(HAVE_MACH_EXCEPTIONS, "$ac_cv_have_mach_exceptions", |
852 |
|
|
[Define if your system supports Mach exceptions.]) |
853 |
|
|
|
854 |
gbeauche |
1.9 |
dnl Check if Windows exceptions are supported. |
855 |
|
|
AC_CACHE_CHECK([whether your system supports Windows exceptions], |
856 |
|
|
ac_cv_have_win32_exceptions, [ |
857 |
|
|
AC_LANG_SAVE |
858 |
|
|
AC_LANG_CPLUSPLUS |
859 |
|
|
AC_TRY_RUN([ |
860 |
|
|
#define HAVE_WIN32_EXCEPTIONS 1 |
861 |
|
|
#define CONFIGURE_TEST_SIGSEGV_RECOVERY |
862 |
|
|
#include "vm_alloc.cpp" |
863 |
|
|
#include "sigsegv.cpp" |
864 |
|
|
], [ |
865 |
|
|
sigsegv_recovery=win32 |
866 |
|
|
ac_cv_have_win32_exceptions=yes |
867 |
|
|
], |
868 |
|
|
ac_cv_have_win32_exceptions=no, |
869 |
|
|
dnl When cross-compiling, do not assume anything. |
870 |
|
|
ac_cv_have_win32_exceptions=no |
871 |
|
|
) |
872 |
|
|
AC_LANG_RESTORE |
873 |
|
|
] |
874 |
|
|
) |
875 |
|
|
AC_TRANSLATE_DEFINE(HAVE_WIN32_EXCEPTIONS, "$ac_cv_have_win32_exceptions", |
876 |
|
|
[Define if your system supports Windows exceptions.]) |
877 |
|
|
|
878 |
gbeauche |
1.1 |
dnl Otherwise, check if extended signals are supported. |
879 |
|
|
if [[ -z "$sigsegv_recovery" ]]; then |
880 |
|
|
AC_CACHE_CHECK([whether your system supports extended signal handlers], |
881 |
|
|
ac_cv_have_extended_signals, [ |
882 |
|
|
AC_LANG_SAVE |
883 |
|
|
AC_LANG_CPLUSPLUS |
884 |
|
|
AC_TRY_RUN([ |
885 |
|
|
#define HAVE_SIGINFO_T 1 |
886 |
|
|
#define CONFIGURE_TEST_SIGSEGV_RECOVERY |
887 |
|
|
#include "vm_alloc.cpp" |
888 |
|
|
#include "sigsegv.cpp" |
889 |
|
|
], |
890 |
|
|
ac_cv_have_extended_signals=yes, |
891 |
|
|
ac_cv_have_extended_signals=no, |
892 |
|
|
dnl When cross-compiling, do not assume anything. |
893 |
|
|
ac_cv_have_extended_signals=no |
894 |
|
|
) |
895 |
|
|
AC_LANG_RESTORE |
896 |
|
|
] |
897 |
|
|
) |
898 |
|
|
if [[ "$ac_cv_have_extended_signals" = "yes" ]]; then |
899 |
|
|
sigsegv_recovery=siginfo |
900 |
|
|
fi |
901 |
|
|
AC_TRANSLATE_DEFINE(HAVE_SIGINFO_T, "$ac_cv_have_extended_signals", |
902 |
|
|
[Define if your system support extended signals.]) |
903 |
|
|
fi |
904 |
|
|
|
905 |
|
|
dnl Otherwise, check for subterfuges. |
906 |
|
|
if [[ -z "$sigsegv_recovery" ]]; then |
907 |
|
|
AC_CACHE_CHECK([whether we then have a subterfuge for your system], |
908 |
|
|
ac_cv_have_sigcontext_hack, [ |
909 |
|
|
AC_LANG_SAVE |
910 |
|
|
AC_LANG_CPLUSPLUS |
911 |
|
|
AC_TRY_RUN([ |
912 |
|
|
#define HAVE_SIGCONTEXT_SUBTERFUGE 1 |
913 |
|
|
#define CONFIGURE_TEST_SIGSEGV_RECOVERY |
914 |
|
|
#include "vm_alloc.cpp" |
915 |
|
|
#include "sigsegv.cpp" |
916 |
|
|
], |
917 |
|
|
ac_cv_have_sigcontext_hack=yes, |
918 |
|
|
ac_cv_have_sigcontext_hack=no, |
919 |
|
|
dnl When cross-compiling, do not assume anything. |
920 |
|
|
ac_cv_have_sigcontext_hack=no |
921 |
|
|
) |
922 |
|
|
AC_LANG_RESTORE |
923 |
|
|
]) |
924 |
|
|
if [[ "$ac_cv_have_sigcontext_hack" = "yes" ]]; then |
925 |
|
|
sigsegv_recovery=sigcontext |
926 |
|
|
fi |
927 |
|
|
AC_TRANSLATE_DEFINE(HAVE_SIGCONTEXT_SUBTERFUGE, "$ac_cv_have_sigcontext_hack", |
928 |
|
|
[Define if we know a hack to replace siginfo_t->si_addr member.]) |
929 |
|
|
fi |
930 |
|
|
|
931 |
|
|
dnl Check if we can ignore the fault (instruction skipping in SIGSEGV handler) |
932 |
|
|
AC_CACHE_CHECK([whether we can skip instruction in SIGSEGV handler], |
933 |
|
|
ac_cv_have_skip_instruction, [ |
934 |
|
|
AC_LANG_SAVE |
935 |
|
|
AC_LANG_CPLUSPLUS |
936 |
|
|
AC_TRY_RUN([ |
937 |
|
|
#define HAVE_SIGSEGV_SKIP_INSTRUCTION 1 |
938 |
|
|
#define CONFIGURE_TEST_SIGSEGV_RECOVERY |
939 |
|
|
#include "vm_alloc.cpp" |
940 |
|
|
#include "sigsegv.cpp" |
941 |
|
|
], ac_cv_have_skip_instruction=yes, ac_cv_have_skip_instruction=no, |
942 |
|
|
dnl When cross-compiling, do not assume anything. |
943 |
|
|
ac_cv_have_skip_instruction=no |
944 |
|
|
) |
945 |
|
|
AC_LANG_RESTORE |
946 |
|
|
] |
947 |
|
|
) |
948 |
|
|
AC_TRANSLATE_DEFINE(HAVE_SIGSEGV_SKIP_INSTRUCTION, "$ac_cv_have_skip_instruction", |
949 |
|
|
[Define if we can ignore the fault (instruction skipping in SIGSEGV handler).]) |
950 |
|
|
|
951 |
|
|
dnl Can we do Video on SEGV Signals ? |
952 |
|
|
CAN_VOSF=no |
953 |
|
|
if [[ -n "$sigsegv_recovery" ]]; then |
954 |
|
|
CAN_VOSF=yes |
955 |
|
|
fi |
956 |
|
|
|
957 |
|
|
dnl Enable VOSF screen updates with this feature is requested and feasible |
958 |
|
|
if [[ "x$WANT_VOSF" = "xyes" -a "x$CAN_VOSF" = "xyes" ]]; then |
959 |
|
|
AC_DEFINE(ENABLE_VOSF, 1, [Define if using video enabled on SEGV signals.]) |
960 |
|
|
else |
961 |
|
|
WANT_VOSF=no |
962 |
|
|
fi |
963 |
|
|
|
964 |
gbeauche |
1.8 |
dnl Check addressing mode to use |
965 |
|
|
AC_MSG_CHECKING([for addressing mode to use]) |
966 |
|
|
if [[ "$EMULATED_PPC" != "yes" ]]; then |
967 |
|
|
if [[ "$WANT_ADDRESSING_MODE" != "real" ]]; then |
968 |
|
|
AC_MSG_WARN([Running in native PowerPC mode, force use of Real Addressing.]) |
969 |
|
|
WANT_ADDRESSING_MODE="real" |
970 |
|
|
fi |
971 |
|
|
fi |
972 |
|
|
if [[ "$WANT_ADDRESSING_MODE" = "direct" ]]; then |
973 |
|
|
if [[ -n "$NATMEM_OFFSET" ]]; then |
974 |
|
|
NATMEM_OFFSET_DEF="-DNATMEM_OFFSET=$NATMEM_OFFSET" |
975 |
|
|
fi |
976 |
|
|
AC_LANG_SAVE |
977 |
|
|
AC_LANG_CPLUSPLUS |
978 |
|
|
cat confdefs.h > conftest.$ac_ext |
979 |
|
|
cat >> conftest.$ac_ext << EOF |
980 |
|
|
#include <stdio.h> |
981 |
|
|
#include <string.h> |
982 |
|
|
#include "vm_alloc.cpp" |
983 |
|
|
|
984 |
|
|
int main(void) |
985 |
|
|
{ |
986 |
|
|
if (vm_init() < 0) |
987 |
|
|
return 1; |
988 |
|
|
|
989 |
|
|
static const struct { |
990 |
|
|
unsigned long base; |
991 |
|
|
unsigned int size; |
992 |
|
|
} ranges[[]] = { |
993 |
|
|
{ 0x00000000, 0x0003000 }, |
994 |
|
|
{ 0x10000000, 0x2000000 }, |
995 |
|
|
{ 0x40800000, 0x0400000 }, |
996 |
|
|
{ 0x68070000, 0x0010000 }, |
997 |
|
|
{ 0x69000000, 0x0080000 }, |
998 |
|
|
{ 0x68ffe000, 0x0002000 }, |
999 |
|
|
{ 0x5fffe000, 0x0002000 }, |
1000 |
|
|
{ 0x60000000, 0x0040000 }, |
1001 |
|
|
}; |
1002 |
|
|
const int n_ranges = sizeof(ranges)/ sizeof(ranges[[0]]); |
1003 |
|
|
|
1004 |
|
|
#ifdef NATMEM_OFFSET |
1005 |
|
|
unsigned long ofs = NATMEM_OFFSET; |
1006 |
|
|
#else |
1007 |
|
|
for (unsigned long ofs = 0x10000000; ofs <= 0x90000000; ofs += 0x10000000) |
1008 |
|
|
#endif |
1009 |
|
|
for (int i = 0; i < n_ranges; i++) { |
1010 |
|
|
char *m = (char *)(ranges[[i]].base + ofs); |
1011 |
|
|
if (vm_acquire_fixed(m, ranges[[i]].size) != 0) |
1012 |
|
|
break; |
1013 |
|
|
memset(m, 0, ranges[[i]].size); |
1014 |
|
|
vm_release(m, ranges[[i]].size); |
1015 |
|
|
if (i == n_ranges - 1) { |
1016 |
gbeauche |
1.13 |
if (sizeof(void *) == 8 && ofs > 0xffffffff) |
1017 |
|
|
printf("0x%lxul\n", ofs); |
1018 |
|
|
else |
1019 |
|
|
printf("0x%08x\n", ofs); |
1020 |
gbeauche |
1.8 |
return 0; |
1021 |
|
|
} |
1022 |
|
|
} |
1023 |
|
|
|
1024 |
|
|
vm_exit(); |
1025 |
|
|
return 1; |
1026 |
|
|
} |
1027 |
|
|
EOF |
1028 |
|
|
doit='$CXX conftest.$ac_ext -o conftest.$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS $LIBS $NATMEM_OFFSET_DEF >& AS_MESSAGE_LOG_FD' |
1029 |
|
|
if AC_TRY_EVAL(doit); then |
1030 |
|
|
NATMEM_OFFSET=`./conftest.$ac_exeext` |
1031 |
gbeauche |
1.9 |
else |
1032 |
|
|
NATMEM_OFFSET= |
1033 |
gbeauche |
1.8 |
fi |
1034 |
|
|
rm -f conftest* |
1035 |
|
|
AC_LANG_RESTORE |
1036 |
gbeauche |
1.9 |
|
1037 |
|
|
if [[ -z "$NATMEM_OFFSET" ]]; then |
1038 |
|
|
AC_MSG_ERROR([could not determine a sensible NATMEM_OFFSET value]) |
1039 |
|
|
else |
1040 |
|
|
WANT_ADDRESSING_MODE="direct,$NATMEM_OFFSET" |
1041 |
|
|
AC_DEFINE_UNQUOTED(NATMEM_OFFSET, $NATMEM_OFFSET, |
1042 |
|
|
[Define constant offset for Mac address translation]) |
1043 |
|
|
fi |
1044 |
gbeauche |
1.8 |
fi |
1045 |
|
|
AC_MSG_RESULT($WANT_ADDRESSING_MODE) |
1046 |
|
|
|
1047 |
gbeauche |
1.26 |
dnl Utility macro used by next two tests. |
1048 |
|
|
dnl AC_EXAMINE_OBJECT(C source code, |
1049 |
|
|
dnl commands examining object file, |
1050 |
|
|
dnl [commands to run if compile failed]): |
1051 |
|
|
dnl |
1052 |
|
|
dnl Compile the source code to an object file; then convert it into a |
1053 |
|
|
dnl printable representation. All unprintable characters and |
1054 |
|
|
dnl asterisks (*) are replaced by dots (.). All white space is |
1055 |
|
|
dnl deleted. Newlines (ASCII 0x10) in the input are preserved in the |
1056 |
|
|
dnl output, but runs of newlines are compressed to a single newline. |
1057 |
|
|
dnl Finally, line breaks are forcibly inserted so that no line is |
1058 |
|
|
dnl longer than 80 columns and the file ends with a newline. The |
1059 |
|
|
dnl result of all this processing is in the file conftest.dmp, which |
1060 |
|
|
dnl may be examined by the commands in the second argument. |
1061 |
|
|
dnl |
1062 |
|
|
AC_DEFUN([gcc_AC_EXAMINE_OBJECT], |
1063 |
|
|
[AC_LANG_SAVE |
1064 |
|
|
AC_LANG_C |
1065 |
|
|
dnl Next bit cribbed from AC_TRY_COMPILE. |
1066 |
|
|
cat > conftest.$ac_ext <<EOF |
1067 |
|
|
[#line __oline__ "configure" |
1068 |
|
|
#include "confdefs.h" |
1069 |
|
|
$1 |
1070 |
|
|
]EOF |
1071 |
|
|
if AC_TRY_EVAL(ac_compile); then |
1072 |
|
|
od -c conftest.o | |
1073 |
|
|
sed ['s/^[0-7]*[ ]*/ / |
1074 |
|
|
s/\*/./g |
1075 |
|
|
s/ \\n/*/g |
1076 |
|
|
s/ [0-9][0-9][0-9]/./g |
1077 |
|
|
s/ \\[^ ]/./g'] | |
1078 |
|
|
tr -d ' |
1079 |
|
|
' | tr -s '*' ' |
1080 |
|
|
' | fold | sed '$a\ |
1081 |
|
|
' > conftest.dmp |
1082 |
|
|
$2 |
1083 |
|
|
ifelse($3, , , else |
1084 |
|
|
$3 |
1085 |
|
|
)dnl |
1086 |
|
|
fi |
1087 |
|
|
rm -rf conftest* |
1088 |
|
|
AC_LANG_RESTORE]) |
1089 |
|
|
|
1090 |
|
|
dnl Floating point format probe. |
1091 |
|
|
dnl The basic concept is the same as the above: grep the object |
1092 |
|
|
dnl file for an interesting string. We have to watch out for |
1093 |
|
|
dnl rounding changing the values in the object, however; this is |
1094 |
|
|
dnl handled by ignoring the least significant byte of the float. |
1095 |
|
|
dnl |
1096 |
|
|
dnl Does not know about VAX G-float or C4x idiosyncratic format. |
1097 |
|
|
dnl It does know about PDP-10 idiosyncratic format, but this is |
1098 |
|
|
dnl not presently supported by GCC. S/390 "binary floating point" |
1099 |
|
|
dnl is in fact IEEE (but maybe we should have that in EBCDIC as well |
1100 |
|
|
dnl as ASCII?) |
1101 |
|
|
dnl |
1102 |
|
|
AC_DEFUN([gcc_AC_C_FLOAT_FORMAT], |
1103 |
|
|
[AC_CACHE_CHECK(floating point format, ac_cv_c_float_format, |
1104 |
|
|
[gcc_AC_EXAMINE_OBJECT( |
1105 |
|
|
[/* This will not work unless sizeof(double) == 8. */ |
1106 |
|
|
extern char sizeof_double_must_be_8 [sizeof(double) == 8 ? 1 : -1]; |
1107 |
|
|
|
1108 |
|
|
/* This structure must have no internal padding. */ |
1109 |
|
|
struct possibility { |
1110 |
|
|
char prefix[8]; |
1111 |
|
|
double candidate; |
1112 |
|
|
char postfix[8]; |
1113 |
|
|
}; |
1114 |
|
|
|
1115 |
|
|
#define C(cand) { "\nformat:", cand, ":tamrof\n" } |
1116 |
|
|
struct possibility table [] = |
1117 |
|
|
{ |
1118 |
|
|
C( 3.25724264705901305206e+01), /* @@IEEEFP - IEEE 754 */ |
1119 |
|
|
C( 3.53802595280598432000e+18), /* D__float - VAX */ |
1120 |
|
|
C( 5.32201830133125317057e-19), /* D.PDP-10 - PDP-10 - the dot is 0x13a */ |
1121 |
|
|
C( 1.77977764695171661377e+10), /* IBMHEXFP - s/390 format, ascii */ |
1122 |
|
|
C(-5.22995989424860458374e+10) /* IBMHEXFP - s/390 format, EBCDIC */ |
1123 |
|
|
};], |
1124 |
|
|
[if grep 'format:.@IEEEF.:tamrof' conftest.dmp >/dev/null 2>&1; then |
1125 |
|
|
ac_cv_c_float_format='IEEE (big-endian)' |
1126 |
|
|
elif grep 'format:.I@@PFE.:tamrof' conftest.dmp >/dev/null 2>&1; then |
1127 |
|
|
ac_cv_c_float_format='IEEE (big-endian)' |
1128 |
|
|
elif grep 'format:.FEEEI@.:tamrof' conftest.dmp >/dev/null 2>&1; then |
1129 |
|
|
ac_cv_c_float_format='IEEE (little-endian)' |
1130 |
|
|
elif grep 'format:.EFP@@I.:tamrof' conftest.dmp >/dev/null 2>&1; then |
1131 |
|
|
ac_cv_c_float_format='IEEE (little-endian)' |
1132 |
|
|
elif grep 'format:.__floa.:tamrof' conftest.dmp >/dev/null 2>&1; then |
1133 |
|
|
ac_cv_c_float_format='VAX D-float' |
1134 |
|
|
elif grep 'format:..PDP-1.:tamrof' conftest.dmp >/dev/null 2>&1; then |
1135 |
|
|
ac_cv_c_float_format='PDP-10' |
1136 |
|
|
elif grep 'format:.BMHEXF.:tamrof' conftest.dmp >/dev/null 2>&1; then |
1137 |
|
|
ac_cv_c_float_format='IBM 370 hex' |
1138 |
|
|
else |
1139 |
|
|
AC_MSG_ERROR(Unknown floating point format) |
1140 |
|
|
fi], |
1141 |
|
|
[AC_MSG_ERROR(compile failed)]) |
1142 |
|
|
]) |
1143 |
|
|
# IEEE is the default format. If the float endianness isn't the same |
1144 |
|
|
# as the integer endianness, we have to set FLOAT_WORDS_BIG_ENDIAN |
1145 |
|
|
# (which is a tristate: yes, no, default). This is only an issue with |
1146 |
|
|
# IEEE; the other formats are only supported by a few machines each, |
1147 |
|
|
# all with the same endianness. |
1148 |
|
|
format=IEEE_FLOAT_FORMAT |
1149 |
|
|
fbigend= |
1150 |
|
|
case $ac_cv_c_float_format in |
1151 |
|
|
'IEEE (big-endian)' ) |
1152 |
|
|
if test $ac_cv_c_bigendian = no; then |
1153 |
|
|
fbigend=1 |
1154 |
|
|
fi |
1155 |
|
|
;; |
1156 |
|
|
'IEEE (little-endian)' ) |
1157 |
|
|
if test $ac_cv_c_bigendian = yes; then |
1158 |
|
|
fbigend=0 |
1159 |
|
|
fi |
1160 |
|
|
;; |
1161 |
|
|
'VAX D-float' ) |
1162 |
|
|
format=VAX_FLOAT_FORMAT |
1163 |
|
|
;; |
1164 |
|
|
'PDP-10' ) |
1165 |
|
|
format=PDP10_FLOAT_FORMAT |
1166 |
|
|
;; |
1167 |
|
|
'IBM 370 hex' ) |
1168 |
|
|
format=IBM_FLOAT_FORMAT |
1169 |
|
|
;; |
1170 |
|
|
esac |
1171 |
|
|
AC_DEFINE_UNQUOTED(HOST_FLOAT_FORMAT, $format, |
1172 |
|
|
[Define to the floating point format of the host machine.]) |
1173 |
|
|
if test -n "$fbigend"; then |
1174 |
|
|
AC_DEFINE_UNQUOTED(HOST_FLOAT_WORDS_BIG_ENDIAN, $fbigend, |
1175 |
|
|
[Define to 1 if the host machine stores floating point numbers in |
1176 |
|
|
memory with the word containing the sign bit at the lowest address, |
1177 |
|
|
or to 0 if it does it the other way around. |
1178 |
|
|
|
1179 |
|
|
This macro should not be defined if the ordering is the same as for |
1180 |
|
|
multi-word integers.]) |
1181 |
|
|
fi |
1182 |
|
|
]) |
1183 |
|
|
|
1184 |
|
|
dnl Check for host float format |
1185 |
|
|
gcc_AC_C_FLOAT_FORMAT |
1186 |
|
|
|
1187 |
gbeauche |
1.1 |
dnl Platform specific binary postprocessor |
1188 |
|
|
AC_PATH_PROG(BLESS, "true") |
1189 |
|
|
if [[ "x$ac_cv_pagezero_hack" = "xyes" ]]; then |
1190 |
|
|
BLESS=Darwin/lowmem |
1191 |
|
|
LDFLAGS="$LDFLAGS -pagezero_size 0x3000" |
1192 |
|
|
fi |
1193 |
|
|
|
1194 |
|
|
dnl Check for GCC 2.7 or higher. |
1195 |
|
|
HAVE_GCC27=no |
1196 |
|
|
AC_MSG_CHECKING(for GCC 2.7 or higher) |
1197 |
gbeauche |
1.36 |
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#if ! (__GNUC__ - 1 > 1 || __GNUC_MINOR__ - 1 > 5) |
1198 |
|
|
# error gcc < 2.7 |
1199 |
gbeauche |
1.44 |
typedef syntax error; |
1200 |
gbeauche |
1.36 |
#endif |
1201 |
|
|
]])], |
1202 |
|
|
[AC_MSG_RESULT(yes); HAVE_GCC27=yes], |
1203 |
|
|
[AC_MSG_RESULT(no)]) |
1204 |
gbeauche |
1.1 |
|
1205 |
|
|
dnl Check for GCC 3.0 or higher. |
1206 |
|
|
HAVE_GCC30=no |
1207 |
|
|
AC_MSG_CHECKING(for GCC 3.0 or higher) |
1208 |
gbeauche |
1.36 |
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#if ! (__GNUC__ >= 3) |
1209 |
|
|
# error gcc < 3 |
1210 |
gbeauche |
1.44 |
typedef syntax error; |
1211 |
gbeauche |
1.36 |
#endif |
1212 |
|
|
]])], |
1213 |
|
|
[AC_MSG_RESULT(yes); HAVE_GCC30=yes], |
1214 |
|
|
[AC_MSG_RESULT(no)]) |
1215 |
gbeauche |
1.1 |
|
1216 |
|
|
dnl Check for ICC. |
1217 |
|
|
AC_MSG_CHECKING(for ICC) |
1218 |
|
|
HAVE_ICC=no |
1219 |
|
|
if $CXX -V -v 2>&1 | grep -q "Intel(R) C++ Compiler"; then |
1220 |
|
|
HAVE_ICC=yes |
1221 |
|
|
fi |
1222 |
|
|
AC_MSG_RESULT($HAVE_ICC) |
1223 |
|
|
|
1224 |
gbeauche |
1.9 |
dnl Determine the generated object format |
1225 |
gbeauche |
1.24 |
AC_CACHE_CHECK([the format of compiler generated objects], |
1226 |
gbeauche |
1.9 |
ac_cv_object_format, [ |
1227 |
gbeauche |
1.1 |
echo 'int i;' > conftest.$ac_ext |
1228 |
gbeauche |
1.9 |
ac_cv_object_format=no |
1229 |
gbeauche |
1.1 |
if AC_TRY_EVAL(ac_compile); then |
1230 |
|
|
case `/usr/bin/file conftest.$ac_objext` in |
1231 |
|
|
*"ELF"*) |
1232 |
gbeauche |
1.9 |
ac_cv_object_format=elf |
1233 |
|
|
;; |
1234 |
gbeauche |
1.24 |
*"Mach-O"*) |
1235 |
|
|
ac_cv_object_format=mach |
1236 |
|
|
;; |
1237 |
gbeauche |
1.9 |
*) |
1238 |
|
|
ac_cv_object_format=unknown |
1239 |
gbeauche |
1.1 |
;; |
1240 |
|
|
esac |
1241 |
|
|
fi |
1242 |
|
|
rm -rf conftest* |
1243 |
|
|
]) |
1244 |
|
|
|
1245 |
gbeauche |
1.32 |
dnl Add -fno-strict-aliasing for slirp sources |
1246 |
|
|
if [[ "x$HAVE_GCC30" = "xyes" ]]; then |
1247 |
|
|
SAVED_CFLAGS="$CFLAGS" |
1248 |
|
|
CFLAGS="$CFLAGS -fno-strict-aliasing" |
1249 |
|
|
AC_CACHE_CHECK([whether the compiler supports -fno-strict-aliasing], |
1250 |
|
|
ac_cv_gcc_no_strict_aliasing, [ |
1251 |
|
|
AC_TRY_COMPILE([],[], |
1252 |
|
|
[ac_cv_gcc_no_strict_aliasing=yes; AC_SUBST(SLIRP_CFLAGS, "-fno-strict-aliasing")], |
1253 |
|
|
[ac_cv_gcc_no_strict_aliasing=no]) |
1254 |
|
|
]) |
1255 |
|
|
CFLAGS="$SAVED_CFLAGS" |
1256 |
|
|
fi |
1257 |
|
|
|
1258 |
gbeauche |
1.39 |
dnl Add -mdynamic-no-pic for MacOS X (XXX icc10 will support MacOS X) |
1259 |
|
|
if [[ "x$HAVE_GCC30" = "xyes" -a "x$HAVE_ICC" = "xno" ]]; then |
1260 |
gbeauche |
1.31 |
SAVED_CFLAGS="$CFLAGS" |
1261 |
|
|
CFLAGS="$CFLAGS -mdynamic-no-pic" |
1262 |
|
|
AC_CACHE_CHECK([whether the compiler supports -mdynamic-no-pic], |
1263 |
|
|
ac_cv_gcc_mdynamic_no_pic, [ |
1264 |
|
|
AC_TRY_COMPILE([],[],[ac_cv_gcc_mdynamic_no_pic=yes],[ac_cv_gcc_mdynamic_no_pic=no]) |
1265 |
|
|
]) |
1266 |
|
|
if [[ "x$ac_cv_gcc_mdynamic_no_pic" = "xyes" ]]; then |
1267 |
|
|
CXXFLAGS="$CXXFLAGS -mdynamic-no-pic" |
1268 |
|
|
else |
1269 |
|
|
CFLAGS="$SAVED_CFLAGS" |
1270 |
|
|
fi |
1271 |
|
|
fi |
1272 |
|
|
|
1273 |
gbeauche |
1.1 |
dnl CPU emulator sources |
1274 |
|
|
if [[ "x$EMULATED_PPC" = "xyes" ]]; then |
1275 |
|
|
CPUSRCS="\ |
1276 |
gbeauche |
1.9 |
../kpx_cpu/src/mathlib/ieeefp.cpp \ |
1277 |
gbeauche |
1.26 |
../kpx_cpu/src/mathlib/mathlib.cpp \ |
1278 |
gbeauche |
1.1 |
../kpx_cpu/src/cpu/ppc/ppc-cpu.cpp \ |
1279 |
|
|
../kpx_cpu/src/cpu/ppc/ppc-decode.cpp \ |
1280 |
|
|
../kpx_cpu/src/cpu/ppc/ppc-execute.cpp \ |
1281 |
|
|
../kpx_cpu/src/cpu/ppc/ppc-translate.cpp" |
1282 |
|
|
CPPFLAGS="$CPPFLAGS -I../kpx_cpu/include -I../kpx_cpu/src" |
1283 |
|
|
|
1284 |
|
|
dnl Enable JIT compiler, if possible |
1285 |
|
|
if [[ "x$WANT_JIT" = "xyes" ]]; then |
1286 |
|
|
AC_CACHE_CHECK([whether dyngen can be used], |
1287 |
|
|
ac_cv_use_dyngen, [ |
1288 |
gbeauche |
1.9 |
case $host_cpu:$ac_cv_object_format in |
1289 |
|
|
powerpc:elf) |
1290 |
gbeauche |
1.1 |
ac_cv_use_dyngen=yes |
1291 |
|
|
;; |
1292 |
gbeauche |
1.9 |
x86_64:elf) |
1293 |
gbeauche |
1.1 |
ac_cv_use_dyngen=yes |
1294 |
|
|
;; |
1295 |
gbeauche |
1.9 |
i?86:elf) |
1296 |
gbeauche |
1.1 |
ac_cv_use_dyngen=yes |
1297 |
|
|
;; |
1298 |
gbeauche |
1.43 |
mips:elf) |
1299 |
|
|
ac_cv_use_dyngen=yes |
1300 |
|
|
;; |
1301 |
gbeauche |
1.24 |
powerpc:mach) |
1302 |
|
|
ac_cv_use_dyngen=yes |
1303 |
|
|
;; |
1304 |
gbeauche |
1.41 |
i?86:mach) |
1305 |
|
|
ac_cv_use_dyngen=yes |
1306 |
|
|
;; |
1307 |
gbeauche |
1.1 |
*:*) |
1308 |
|
|
ac_cv_use_dyngen=no |
1309 |
|
|
;; |
1310 |
|
|
esac |
1311 |
|
|
dnl Check for a suitable synthetic opcodes compiler (icc is faking itself as gcc 3.2.2) |
1312 |
|
|
if [[ -z "$DYNGEN_CC" ]]; then |
1313 |
|
|
if [[ "x$HAVE_GCC27" = "xyes" -a "x$HAVE_ICC" = "xno" ]]; then |
1314 |
|
|
DYNGEN_CC=$CXX |
1315 |
|
|
else |
1316 |
gbeauche |
1.44 |
for p in /usr/bin /usr/local/bin /usr/freeware/bin; do |
1317 |
gbeauche |
1.1 |
gxx="$p/g++" |
1318 |
|
|
if [[ -x "$gxx" ]]; then |
1319 |
|
|
DYNGEN_CC="$gxx" |
1320 |
|
|
fi |
1321 |
|
|
done |
1322 |
|
|
fi |
1323 |
|
|
fi |
1324 |
gbeauche |
1.27 |
if [[ -z "$DYNGEN_CC" ]]; then |
1325 |
gbeauche |
1.1 |
ac_cv_use_dyngen=no |
1326 |
|
|
fi |
1327 |
|
|
]) |
1328 |
|
|
if [[ "x$ac_cv_use_dyngen" = "xyes" ]]; then |
1329 |
|
|
case $host_cpu in |
1330 |
|
|
i?86) |
1331 |
gbeauche |
1.46 |
DYNGEN_OP_FLAGS="-fomit-frame-pointer" |
1332 |
gbeauche |
1.24 |
;; |
1333 |
gbeauche |
1.43 |
mips) |
1334 |
|
|
DYNGEN_OP_FLAGS="-fno-delayed-branch -mno-abicalls" |
1335 |
|
|
;; |
1336 |
gbeauche |
1.24 |
powerpc) |
1337 |
|
|
if [[ "x$ac_cv_object_format" = "xmach" ]]; then |
1338 |
|
|
DYNGEN_OP_FLAGS="-mdynamic-no-pic" |
1339 |
gbeauche |
1.1 |
fi |
1340 |
|
|
;; |
1341 |
|
|
esac |
1342 |
gbeauche |
1.44 |
have_dyngen_gcc3=no |
1343 |
|
|
case "x`$DYNGEN_CC -dumpversion`" in |
1344 |
|
|
x[12].*) ;; |
1345 |
|
|
x*) have_dyngen_gcc3=yes ;; |
1346 |
|
|
esac |
1347 |
|
|
if [[ "x$have_dyngen_gcc3" = "xyes" ]]; then |
1348 |
gbeauche |
1.24 |
DYNGEN_OP_FLAGS="$DYNGEN_OP_FLAGS -falign-functions=0" |
1349 |
|
|
else |
1350 |
|
|
DYNGEN_OP_FLAGS="$DYNGEN_OP_FLAGS -malign-functions=0" |
1351 |
|
|
fi |
1352 |
gbeauche |
1.38 |
DYNGEN_OP_FLAGS="$DYNGEN_OP_FLAGS -finline-functions -finline-limit=10000 -fno-exceptions -g0" |
1353 |
gbeauche |
1.44 |
if [[ "x$have_dyngen_gcc3" = "xyes" ]]; then |
1354 |
gbeauche |
1.1 |
DYNGEN_OP_FLAGS="$DYNGEN_OP_FLAGS -fno-reorder-blocks -fno-optimize-sibling-calls" |
1355 |
|
|
fi |
1356 |
gbeauche |
1.43 |
if [[ "x$DYNGEN_CC" != "x$CXX" ]]; then |
1357 |
|
|
DYNGEN_CFLAGS="-O2 $CFLAGS" |
1358 |
|
|
DYNGEN_CXXFLAGS="-O2 $CXXFLAGS" |
1359 |
|
|
else |
1360 |
|
|
DYNGEN_CFLAGS="\$(CFLAGS)" |
1361 |
|
|
DYNGEN_CXXFLAGS="\$(CXXFLAGS)" |
1362 |
|
|
fi |
1363 |
gbeauche |
1.1 |
else |
1364 |
|
|
WANT_JIT=no |
1365 |
|
|
fi |
1366 |
|
|
AC_TRANSLATE_DEFINE(ENABLE_DYNGEN, $ac_cv_use_dyngen, [Define to enable dyngen engine]) |
1367 |
|
|
if [[ "x$WANT_JIT" = "xyes" ]]; then |
1368 |
|
|
DYNGENSRCS="\ |
1369 |
|
|
../kpx_cpu/src/cpu/jit/dyngen.c \ |
1370 |
|
|
../kpx_cpu/src/cpu/jit/cxxdemangle.cpp" |
1371 |
|
|
CPUSRCS="\ |
1372 |
|
|
../kpx_cpu/src/cpu/jit/jit-cache.cpp \ |
1373 |
|
|
../kpx_cpu/src/cpu/jit/basic-dyngen.cpp \ |
1374 |
|
|
../kpx_cpu/src/cpu/ppc/ppc-dyngen.cpp $CPUSRCS" |
1375 |
|
|
fi |
1376 |
|
|
fi |
1377 |
|
|
CPUSRCS="$CPUSRCS ../kpx_cpu/sheepshaver_glue.cpp" |
1378 |
|
|
else |
1379 |
|
|
WANT_JIT=no |
1380 |
|
|
fi |
1381 |
|
|
if [[ "x$ac_cv_use_dyngen" = "xyes" ]]; then |
1382 |
|
|
AC_CACHE_CHECK([whether static data regions are executable], |
1383 |
|
|
ac_cv_have_static_data_exec, [ |
1384 |
|
|
AC_TRY_RUN([int main(void) { |
1385 |
gbeauche |
1.25 |
#if defined(__powerpc__) || defined(__ppc__) |
1386 |
gbeauche |
1.1 |
static unsigned int p[8] = {0x4e800020,}; |
1387 |
|
|
asm volatile("dcbst 0,%0" : : "r" (p) : "memory"); |
1388 |
|
|
asm volatile("sync" : : : "memory"); |
1389 |
|
|
asm volatile("icbi 0,%0" : : "r" (p) : "memory"); |
1390 |
|
|
asm volatile("sync" : : : "memory"); |
1391 |
|
|
asm volatile("isync" : : : "memory"); |
1392 |
|
|
((void (*)(void))p)(); |
1393 |
|
|
return 0; |
1394 |
|
|
#endif |
1395 |
|
|
return 1; |
1396 |
|
|
}], ac_cv_have_static_data_exec=yes, ac_cv_have_static_data_exec=no, |
1397 |
|
|
dnl When cross-compiling, do not assume anything. |
1398 |
|
|
ac_cv_have_static_data_exec=no |
1399 |
|
|
) |
1400 |
|
|
]) |
1401 |
gbeauche |
1.14 |
else |
1402 |
|
|
ac_cv_use_dyngen=no |
1403 |
gbeauche |
1.1 |
fi |
1404 |
|
|
AC_TRANSLATE_DEFINE(HAVE_STATIC_DATA_EXEC, "$ac_cv_have_static_data_exec", |
1405 |
|
|
[Define if your system marks static data pages as executable.]) |
1406 |
|
|
|
1407 |
|
|
if [[ "x$WANT_JIT" = "xyes" ]]; then |
1408 |
|
|
CPPFLAGS="$CPPFLAGS -DUSE_JIT" |
1409 |
|
|
fi |
1410 |
|
|
|
1411 |
gbeauche |
1.43 |
dnl Higher level optimizations with MIPSPro compilers are possible |
1412 |
|
|
if [[ "x$HAVE_IPA" = "xyes" ]]; then |
1413 |
|
|
CFLAGS="`echo $CFLAGS | sed -e 's/-g//g'` -O3 -OPT:Olimit=0 -IPA" |
1414 |
|
|
CXXFLAGS="`echo $CXXFLAGS | sed -e 's/-g//g'` -O3 -OPT:Olimit=0 -IPA" |
1415 |
|
|
CXXFLAGS="-LANG:std $CXXFLAGS" |
1416 |
|
|
LDFLAGS="$LDFLAGS -O3 -OPT:Olimit=0 -IPA" |
1417 |
|
|
fi |
1418 |
|
|
|
1419 |
gbeauche |
1.1 |
dnl Generate Makefile. |
1420 |
gbeauche |
1.16 |
AC_SUBST(PERL) |
1421 |
gbeauche |
1.14 |
AC_SUBST(USE_DYNGEN, [$ac_cv_use_dyngen]) |
1422 |
gbeauche |
1.1 |
AC_SUBST(DYNGENSRCS) |
1423 |
|
|
AC_SUBST(DYNGEN_CC) |
1424 |
gbeauche |
1.43 |
AC_SUBST(DYNGEN_CFLAGS) |
1425 |
|
|
AC_SUBST(DYNGEN_CXXFLAGS) |
1426 |
gbeauche |
1.1 |
AC_SUBST(DYNGEN_OP_FLAGS) |
1427 |
|
|
AC_SUBST(SYSSRCS) |
1428 |
|
|
AC_SUBST(CPUSRCS) |
1429 |
|
|
AC_SUBST(BLESS) |
1430 |
|
|
AC_SUBST(KEYCODES) |
1431 |
gbeauche |
1.5 |
AC_OUTPUT([ |
1432 |
|
|
Makefile |
1433 |
|
|
../MacOSX/Info.plist |
1434 |
|
|
]) |
1435 |
gbeauche |
1.1 |
|
1436 |
|
|
dnl Print summary. |
1437 |
|
|
echo |
1438 |
|
|
echo SheepShaver configuration summary: |
1439 |
|
|
echo |
1440 |
|
|
echo SDL support ...................... : $SDL_SUPPORT |
1441 |
gbeauche |
1.21 |
echo FBDev DGA support ................ : $WANT_FBDEV_DGA |
1442 |
gbeauche |
1.1 |
echo XFree86 DGA support .............. : $WANT_XF86_DGA |
1443 |
|
|
echo XFree86 VidMode support .......... : $WANT_XF86_VIDMODE |
1444 |
|
|
echo Using PowerPC emulator ........... : $EMULATED_PPC |
1445 |
|
|
echo Enable JIT compiler .............. : $WANT_JIT |
1446 |
|
|
echo Enable video on SEGV signals ..... : $WANT_VOSF |
1447 |
|
|
echo ESD sound support ................ : $WANT_ESD |
1448 |
|
|
echo GTK user interface ............... : $WANT_GTK |
1449 |
|
|
echo mon debugger support ............. : $WANT_MON |
1450 |
gbeauche |
1.8 |
echo Addressing mode .................. : $WANT_ADDRESSING_MODE |
1451 |
gbeauche |
1.1 |
echo Bad memory access recovery type .. : $sigsegv_recovery |
1452 |
|
|
echo |
1453 |
|
|
echo "Configuration done. Now type \"make\"." |