|
|
1.1 root 1: dnl Process this file with autoconf to produce a configure script.
1.1.1.4 root 2: dnl Written 1996, 1997, 1998 Bernd Schmidt
3:
4: dnl If you can use anything from this file, feel free to steal it. I put
5: dnl this into the public domain.
6:
7: dnl There are still many uncaught errors (e.g. --enable-dga on an Amiga)
8: dnl I didn't have the nerve to track them all down.
1.1 root 9:
1.1.1.2 root 10: AC_INIT(amiga/source/transdisk.c)
1.1.1.4 root 11: AC_PREREQ(2.12)
12:
1.1 root 13: dnl Checks for programs.
14: AC_PROG_CC
15:
16: AC_PROG_CPP
17: AC_PROG_MAKE_SET
1.1.1.4 root 18: AC_PATH_PROG(FILEPRG, file, not-found)
1.1.1.6 root 19: AC_PATH_PROG(WRCPRG, wrc, not-found)
20: AC_PATH_PROG(RCLPRG, rcl, not-found)
1.1 root 21:
22: AC_AIX
23: AC_ISC_POSIX
24:
1.1.1.6 root 25: AC_MSG_CHECKING(for Watcom C)
26: AC_EGREP_CPP(yes,
27: [#ifdef __WATCOMC__
28: yes
29: #endif
30: ], [uae_cv_prog_cc_watcom=yes], [uae_cv_prog_cc_watcom=no])
31: AC_MSG_RESULT($uae_cv_prog_cc_watcom)
32:
33: AM_CYGWIN32
34: AM_MINGW32
35: AM_EXEEXT
36:
1.1.1.4 root 37: NR_WARNINGS=0
38: NR_ERRORS=0
39:
1.1.1.6 root 40: tmp_save_dir=`pwd`
41: cd $srcdir
42: abssrcdir=`pwd`
43: cd $tmp_save_dir
44:
1.1.1.4 root 45: NEED_THREAD_SUPPORT=no
46:
47: ADDITIONAL_CFLAGS=
48: OPTIMIZE_CFLAGS=
49: WARNING_CFLAGS=
50: DEBUG_CFLAGS=
51: NO_SCHED_CFLAGS=
52:
1.1 root 53: dnl Checks for libraries.
1.1.1.4 root 54: HAVE_BEOS=no
55: HAVE_POS=no
1.1 root 56: dnl Replace `main' with a function in -lMedia_s: (Ian!)
1.1.1.4 root 57: AC_CHECK_LIB(Media_s, main, HAVE_MEDIA_LIB=yes, HAVE_MEDIA_LIB=no)
1.1 root 58: dnl Replace `main' with a function in -lNeXT_s:
1.1.1.4 root 59: AC_CHECK_LIB(NeXT_s, main, HAVE_NEXT_LIB=yes, HAVE_NEXT_LIB=no)
60: AC_CHECK_LIB(amiga, OpenLibrary, HAVE_AMIGA_LIB=yes, HAVE_AMIGA_LIB=n)
61: AC_CHECK_LIB(vga, vga_setmode, HAVE_SVGA_LIB=yes, HAVE_SVGA_LIB=no)
62: AC_CHECK_LIB(AF, AFOpenAudioConn, HAVE_AF_LIB=yes, HAVE_AF_LIB=no)
1.1.1.6 root 63: AC_CHECK_LIB(mme, waveOutGetNumDevs, HAVE_MME_LIB=yes, HAVE_MME_LIB=no)
1.1.1.4 root 64: AC_CHECK_LIB(ncurses, waddch, HAVE_NCURSES_LIB=yes, HAVE_NCURSES_LIB=no)
65: AC_CHECK_LIB(posix4, sem_init, HAVE_POSIX4_LIB=yes, HAVE_POSIX4_LIB=no)
1.1.1.6 root 66: AC_CHECK_LIB(rt, sem_init, HAVE_RT_LIB=yes, HAVE_RT_LIB=no)
1.1.1.4 root 67: AC_CHECK_LIB(ggi, ggiInit, HAVE_GGI_LIB=yes, HAVE_GGI_LIB=no)
1.1.1.8 root 68: AC_CHECK_LIB(audio, alOpenPort, HAVE_SGIAUDIO_LIB=yes, HAVE_SGIAUDIO_LIB=no)
1.1.1.4 root 69:
70: AC_PATH_XTRA
71: AC_CONFIG_HEADER(src/sysconfig.h)
1.1.1.3 root 72:
1.1 root 73: AC_HEADER_DIRENT
74: AC_HEADER_STDC
75:
1.1.1.4 root 76: dnl @@@ Is <sys/termios.h> the right way or is it <termios.h>?
77: AC_CHECK_HEADERS(unistd.h fcntl.h sys/time.h sys/types.h utime.h string.h strings.h values.h ncurses.h curses.h)
78: AC_CHECK_HEADERS(sys/soundcard.h machine/soundcard.h sun/audioio.h sys/audioio.h getopt.h features.h sys/termios.h)
1.1.1.6 root 79: AC_CHECK_HEADERS(posix_opt.h sys/ioctl.h sys/ipc.h sys/shm.h sys/stat.h sys/utime.h)
1.1.1.4 root 80: AC_CHECK_HEADERS(ggi/libggi.h)
1.1.1.6 root 81: AC_CHECK_HEADERS(windows.h ddraw.h)
1.1.1.4 root 82: AC_CHECK_HEADER(be_math.h, HAVE_BEOS=yes, HAVE_BEOS=no)
1.1.1.6 root 83: AC_CHECK_HEADERS(machine/joystick.h)
84: AC_CHECK_HEADERS(devices/ahi.h)
1.1.1.8 root 85: AC_CHECK_HEADERS(dmedia/audio.h)
1.1.1.6 root 86: AC_CHECK_HEADERS(libraries/cybergraphics.h cybergraphx/cybergraphics.h)
1.1.1.4 root 87:
88: AC_CHECK_SIZEOF(char, 1)
89: AC_CHECK_SIZEOF(short, 2)
90: AC_CHECK_SIZEOF(int, 4)
91: AC_CHECK_SIZEOF(long, 4)
92: AC_CHECK_SIZEOF(long long, 8)
1.1.1.6 root 93: AC_CHECK_SIZEOF(__int64, 8)
1.1 root 94:
95: dnl Checks for typedefs, structures, and compiler characteristics.
96: AC_C_CONST
97: AC_C_INLINE
1.1.1.4 root 98: if [[ "x$ac_cv_c_inline" = "xno" ]]; then
99: ac_cv_c_inline=
100: fi
1.1 root 101: AC_TYPE_MODE_T
102: AC_TYPE_OFF_T
103: AC_TYPE_PID_T
104: AC_STRUCT_ST_BLOCKS
105: AC_HEADER_TIME
106: AC_STRUCT_TM
107:
108: dnl Checks for library functions.
109: AC_PROG_GCC_TRADITIONAL
110: AC_FUNC_MEMCMP
111: AC_TYPE_SIGNAL
112: AC_FUNC_UTIME_NULL
1.1.1.6 root 113: AC_CHECK_FUNCS(getcwd getopt strdup gettimeofday sigaction mkdir rmdir select strerror strstr)
114: AC_CHECK_FUNCS(tcgetattr cfmakeraw readdir_r vprintf vsprintf vfprintf)
1.1 root 115:
1.1.1.6 root 116: dnl GNOME_FILEUTILS_CHECKS will fail for native Win32 compilers like Watcom C
117: dnl So don't use that macro if we know it will fail
118: DO_FILEUTILS_CHECK=yes
119: if test $uae_cv_prog_cc_watcom = yes -o $am_cv_mingw32 = yes; then
120: DO_FILEUTILS_CHECK=no
121: fi
122: if test $DO_FILEUTILS_CHECK = yes; then
123: GNOME_FILEUTILS_CHECKS
1.1 root 124: fi
125:
1.1.1.6 root 126: dnl Check for pOS or -target=p.os
127: if [[ $target = "p.os" ]]; then
128: HAVE_POS=yes
129: else
130: AC_MSG_CHECKING(for pOS)
131: AC_EGREP_CPP(yes,
132: [#ifdef __POS__
133: yes
134: #endif
135: ], [AC_MSG_RESULT(yes); HAVE_POS=yes], AC_MSG_RESULT(no); HAVE_POS=no)
1.1 root 136: fi
137:
1.1.1.4 root 138: dnl Verify that the ncurses installation makes some sense.
139:
140: if [[ "x$HAVE_NCURSES_LIB" = "xyes" ]]; then
141: if [[ "x$ac_cv_header_ncurses_h" = "xno" -a "x$ac_cv_header_curses_h" = "xno" ]]; then
142: echo "Installation problem, found libncurses but neither curses.h nor ncurses.h!"
143: HAVE_NCURSES_LIB=no
144: NR_ERRORS=`expr $NR_ERRORS + 1`
145: else
146: if [[ "x$ac_cv_header_ncurses_h" = "xno" ]]; then
147: AC_MSG_CHECKING(for attr_t in curses.h)
148: AC_TRY_COMPILE([#include <curses.h>],[{ attr_t a; a = A_NORMAL; }], AC_MSG_RESULT(yes),
149: [
150: ADDITIONAL_CFLAGS="$ADDITIONAL_CFLAGS -DDONT_HAVE_ATTR_T"
151: AC_MSG_RESULT(no)
152: NR_WARNINGS=`expr $NR_WARNINGS + 1`
153: echo "Please install a newer version of libncurses if you can."
154: ])
155: else
156: AC_MSG_CHECKING(for attr_t in ncurses.h)
157: AC_TRY_COMPILE([#include <ncurses.h>],[{ attr_t a; a = A_NORMAL; }], AC_MSG_RESULT(yes),
158: [
159: ADDITIONAL_CFLAGS="$ADDITIONAL_CFLAGS -DDONT_HAVE_ATTR_T"
160: AC_MSG_RESULT(no)
161: NR_WARNINGS=`expr $NR_WARNINGS + 1`
162: echo "Please install a newer version of libncurses if you can."
163: ])
164: fi
165: fi
166: fi
167:
1.1.1.6 root 168:
169: AC_MSG_CHECKING(for pthread library)
170: TMP_SAVE_CFLAGS=$CFLAGS
171: TMP_SAVE_LIBS=$LIBS
172: LIBS="$LIBS -lpthread"
173: AC_TRY_LINK([
174: #include "confdefs.h"
175: #ifdef HAVE_SYS_TYPES_H
176: #include <sys/types.h>
177: #endif
178: #include <pthread.h>],[
179: pthread_exit (0);
1.1.1.9 ! root 180: ],
1.1.1.6 root 181: HAVE_PTHREAD_LIB=yes
182: AC_MSG_RESULT(yes),
183: HAVE_PTHREAD_LIB=no
184: AC_MSG_RESULT(no))
185: CFLAGS=$TMP_SAVE_CFLAGS
186: LIBS=$TMP_SAVE_LIBS
187:
188: AC_MSG_CHECKING(for DirectX)
189: TMP_SAVE_CFLAGS=$CFLAGS
190: TMP_SAVE_LIBS=$LIBS
191: CFLAGS="$CFLAGS $X_CFLAGS"
192: LIBS="$LIBS -lddraw"
193: AC_TRY_LINK([
194: #include "confdefs.h"
195: #ifdef HAVE_SYS_TYPES_H
196: #include <sys/types.h>
197: #endif
198: #include <windows.h>
199: #include <ddraw.h>],[
200: LPDIRECTDRAW lpDD;
201: IDirectDraw_CreateSurface(lpDD, 0, 0, 0);
202: ],
203: HAVE_DIRECTX=yes
204: AC_MSG_RESULT(yes),
205: HAVE_DIRECTX=no
206: AC_MSG_RESULT(no))
207: CFLAGS=$TMP_SAVE_CFLAGS
208: LIBS=$TMP_SAVE_LIBS
209:
1.1.1.4 root 210: DO_PROFILING=no
211: WANT_GGI=dunno
212: WANT_SVGALIB=dunno
213: WANT_ASCIIART=dunno
214: WANT_UI=dunno
215: WANT_NCURSES_UI=no
216: WANT_DGA=no
217: WANT_VIDMODE=no
218: SYSTEM_IS_ELF=dunno
219:
220: AC_ARG_ENABLE(profiling,[ --enable-profiling Build a profiling (SLOW!) version],[DO_PROFILING=$enableval],[])
221: AC_ARG_WITH(svgalib,[ --with-svgalib Use SVGAlib for graphics output],[WANT_SVGALIB=$withval],[])
222: AC_ARG_WITH(ggi,[ --with-ggi Use GGI for graphics output],[WANT_GGI=$withval],[])
223: AC_ARG_WITH(asciiart,[ --with-asciiart Use ncurses ascii art for graphics output],[WANT_ASCIIART=$withval],[])
224: AC_ARG_ENABLE(dga,[ --enable-dga X11 version: Use the DGA extension],[WANT_DGA=$enableval],[])
225: AC_ARG_ENABLE(vidmode,[ --enable-vidmode X11 version: Use the XF86VidMode extension],[WANT_VIDMODE=$enableval],[])
226: AC_ARG_ENABLE(ui,[ --enable-ui Use a user interface if possible (default on)],[WANT_UI=$enableval],[])
227: AC_ARG_WITH(elf,[ --with-elf Explicitly state that this system is ELF],[SYSTEM_IS_ELF=$withval],[])
228:
229: dnl Some simple plausibility tests...
230:
231: if [[ "x$WANT_DGA" = "xyes" ]]; then
232: if [[ "x$WANT_SVGALIB" = "xyes" -o "x$WANT_GGI" = "xyes" -o "x$WANT_ASCIIART" = "xyes" ]]; then
233: echo "You can't enable DGA for SVGAlib, GGI and ncurses targets!"
234: NR_ERRORS=`expr $NR_ERRORS + 1`
235: WANT_DGA=no
236: fi
237: fi
238:
239: if [[ "x$WANT_DGA" = "xyes" -a "x$no_x" = "xyes" ]]; then
240: echo "Ignoring --enable-dga, since X was disabled or not found."
241: NR_ERRORS=`expr $NR_ERRORS + 1`
242: WANT_DGA=no
243: fi
244:
245: if [[ "x$WANT_DGA" = "xno" -a "x$WANT_VIDMODE" = "xyes" ]]; then
246: echo "The XF86VidMode extension can only be used in DGA mode. Disabling it."
247: NR_ERRORS=`expr $NR_ERRORS + 1`
248: WANT_VIDMODE=no
249: fi
250:
251: dnl Check if we have the libraries needed for the user's selection.
252:
253: if [[ "x$WANT_SVGALIB" = "xyes" ]]; then
254: if [[ "x$HAVE_SVGA_LIB" = "xno" ]]; then
255: echo "Could not find libsvga, disabling svgalib support."
256: NR_ERRORS=`expr $NR_ERRORS + 1`
257: WANT_SVGALIB=no
258: else
259: no_x=yes
260: fi
261: fi
262:
263: if [[ "x$WANT_GGI" = "xyes" ]]; then
264: if [[ "x$HAVE_GGI_LIB" = "xno" ]]; then
265: echo "Could not find libggi, disabling GGI support."
266: NR_ERRORS=`expr $NR_ERRORS + 1`
267: WANT_GGI=no
268: else if [[ "x$WANT_SVGALIB" = "xyes" ]]; then
269: echo "You can't configure for both SVGAlib and GGI. Disabling GGI."
270: NR_ERRORS=`expr $NR_ERRORS + 1`
271: WANT_GGI=no
272: else
273: no_x=yes
274: fi
275: fi
276: fi
277:
278: if [[ "x$WANT_ASCIIART" = "xyes" ]]; then
279: if [[ "x$HAVE_NCURSES_LIB" = "xno" ]]; then
280: echo "Could not find libncurses, disabling ascii art support."
281: NR_ERRORS=`expr $NR_ERRORS + 1`
282: WANT_ASCIIART=no
283: else if [[ "x$WANT_SVGALIB" = "xyes" -o "x$WANT_GGI" = "xyes" ]]; then
284: echo "You can't configure for both ncurses and another target. Disabling ncurses."
285: NR_ERRORS=`expr $NR_ERRORS + 1`
286: WANT_ASCIIART=no
287: else
288: no_x=yes
289: fi
290: fi
291: fi
292:
293: dnl If the user wants DGA, see if we have it.
294: dnl This must come after we checked for X11.
295:
296: if [[ "x$WANT_DGA" = "xyes" ]]; then
297: TMP_SAVE_LIBS=$LIBS
298: LIBS="$X_LIBS $LIBS"
299: AC_CHECK_LIB(Xxf86dga, XF86DGAQueryExtension, HAVE_DGA=yes, HAVE_DGA=no, [ $X_PRE_LIBS -lXext -lX11 $X_EXTRA_LIBS ])
300: LIBS=$TMP_SAVE_LIBS
301: if [[ "x$HAVE_DGA" = "xno" ]]; then
302: echo "Could not find DGA extension, ignoring --enable-dga."
303: NR_ERRORS=`expr $NR_ERRORS + 1`
304: WANT_DGA=no
305: fi
306: fi
307:
308: if [[ "x$WANT_VIDMODE" = "xyes" ]]; then
309: TMP_SAVE_LIBS=$LIBS
310: LIBS="$X_LIBS $LIBS"
311: AC_CHECK_LIB(Xxf86vm, XF86VidModeQueryExtension, HAVE_VIDMODE=yes, HAVE_VIDMODE=no, [ $X_PRE_LIBS -lXext -lX11 $X_EXTRA_LIBS ])
312: LIBS=$TMP_SAVE_LIBS
313: if [[ "x$HAVE_VIDMODE" = "xno" ]]; then
314: echo "Could not find VidMode extension, ignoring --enable-vidmode."
315: NR_ERRORS=`expr $NR_ERRORS + 1`
316: WANT_VIDMODE=no
317: fi
318: fi
319:
320: AM_PATH_GTK
321:
322: dnl See if we can at least compile SHM support
323:
324: SHM_SUPPORT_LINKS=0
1.1.1.6 root 325: if [[ "x$no_x" != "xyes" -a "x$ac_cv_header_sys_ipc_h" = "xyes" -a "x$ac_cv_header_sys_shm_h" = "xyes" ]]; then
1.1.1.4 root 326: AC_MSG_CHECKING(whether the X11 MIT-SHM extension can be compiled in)
327: TMP_SAVE_CFLAGS=$CFLAGS
328: TMP_SAVE_LIBS=$LIBS
329: CFLAGS="$CFLAGS $X_CFLAGS"
330: LIBS="$X_LIBS $LIBS $X_PRE_LIBS -lX11 -lXext $X_EXTRA_LIBS"
331: AC_TRY_LINK([
332: #include "confdefs.h"
333: #ifdef HAVE_SYS_TYPES_H
334: #include <sys/types.h>
335: #endif
336: #include <X11/Xlib.h>
337: #include <X11/Xutil.h>
338: #include <X11/keysym.h>
339: #include <X11/cursorfont.h>
340: #include <sys/ipc.h>
341: #include <sys/shm.h>
342: #include <X11/extensions/XShm.h>],[
343: static XShmSegmentInfo shminfo;
344: static Display *display;
345: XShmAttach(display, &shminfo);
346: XSync(display,0);
347: shmctl(shminfo.shmid, IPC_RMID, 0);
1.1.1.9 ! root 348: ],
1.1.1.4 root 349: SHM_SUPPORT_LINKS=1
350: AC_MSG_RESULT(yes),
351: SHM_SUPPORT_LINKS=0
352: AC_MSG_RESULT(no))
353: CFLAGS=$TMP_SAVE_CFLAGS
354: LIBS=$TMP_SAVE_LIBS
1.1.1.2 root 355: fi
356:
1.1.1.3 root 357: MATHLIB=-lm
1.1.1.4 root 358: DEBUGOBJS="debug.o"
1.1.1.3 root 359:
1.1 root 360: AC_MSG_CHECKING(which target to use)
1.1.1.4 root 361:
1.1.1.6 root 362: if [[ "x$HAVE_DIRECTX" = "xyes" ]]; then
363: AC_MSG_RESULT(Win32/DirectX)
364: MATHLIB=
365: TARGET=win32
366: TARGETDEP=t-win32.h
367: GFXOBJS="osdep/win32.o osdep/win32gui.o osdep/parser.o osdep/keyboard.o osdep/posixemu.o"
368: RESOBJS="osdep/winuae.res"
369: else if [[ "x$HAVE_BEOS" = "xyes" ]]; then
1.1.1.4 root 370: AC_MSG_RESULT(BeOS)
371: MATHLIB=
372: TARGET=beos
373: TARGETDEP=t-beos.h
374: GFXOBJS=osdep/beos.o
375: GUIOBJS=
376: OPTIMIZE_CFLAGS=-O7
377: else if [[ "x$HAVE_POS" = "xyes" ]]; then
378: AC_MSG_RESULT(p.OS)
379: TARGET=p_os
380: TARGETDEP=t-pos.h
381: GFXOBJS="osdep/pos-win.o osdep/pos-disk.o osdep/pos-rexx.o"
382: GUIOBJS="osdep/pos-gui.o"
383: else if [[ "x$HAVE_AMIGA_LIB" = "xyes" ]]; then
1.1.1.3 root 384: AC_MSG_RESULT(AmigaOS)
385: TARGET=amigaos
1.1.1.4 root 386: TARGETDEP=t-amiga.h
387: GFXOBJS="osdep/ami-win.o osdep/ami-disk.o osdep/ami-rexx.o osdep/ami-appw.o"
388: GUIOBJS="osdep/ami-gui.o"
389: else if [[ "x$HAVE_NEXT_LIB" = "xyes" ]]; then
1.1.1.3 root 390: AC_MSG_RESULT(NeXTStep)
391: MATHLIB=
392: TARGET=next
393: GFXOBJS="NeXTwin.o"
1.1.1.4 root 394: GUIOBJS=
395: TARGETDEP=t-next.h
1.1.1.3 root 396: LIBRARIES="-sectcreate __ICON __header ../Uae.app/Uae.iconheader -segprot __ICON r r -sectcreate __ICON app ../Uae.app/Uae.tiff -lMedia_s -lNeXT_s"
397: else
1.1.1.4 root 398: dnl Unix system
399: dnl If we don't have X, see what else we have and/or want.
1.1.1.3 root 400:
1.1.1.4 root 401: if [[ "x$no_x" = "xyes" ]]; then
402: if [[ "x$WANT_SVGALIB" != "xyes" -a "x$WANT_GGI" != "xyes" -a "x$WANT_ASCIIART" != "xyes" ]]; then
403: if [[ "x$WANT_SVGALIB" != "xno" -a "x$HAVE_SVGA_LIB" = "xyes" ]]; then
404: WANT_SVGALIB=yes
405: else if [[ "x$WANT_GGI" != "xno" -a "x$HAVE_GGI_LIB" = "xyes" ]]; then
406: WANT_GGI=yes
407: else if [[ "x$WANT_ASCIIART" != "xno" -a "x$HAVE_NCURSES_LIB" = "xyes" ]]; then
408: WANT_ASCIIART=yes
409: fi
410: fi
411: fi
1.1.1.3 root 412: fi
413: fi
414:
1.1.1.4 root 415: if [[ "x$WANT_GGI" = "xyes" ]]; then
416: AC_MSG_RESULT(GGI)
417: TARGET=ggilib
418: TARGETDEP=t-ggi.h
419: WANT_NCURSES_UI=yes
420: GFXOBJS=ggi.o
421: LIBRARIES="-ldl -lggi"
422: LDFLAGS="-rdynamic $LDFLAGS"
423: else if [[ "x$WANT_SVGALIB" = "xyes" ]]; then
424: AC_MSG_RESULT(SVGAlib)
425: TARGET=svgalib
426: TARGETDEP=t-svgalib.h
427: GFXOBJS=svga.o
428: LIBRARIES="-lvga"
429: WANT_NCURSES_UI=yes
430: else if [[ "x$WANT_ASCIIART" = "xyes" ]]; then
431: AC_MSG_RESULT(ncurses ASCII art)
432: TARGET=asciiart
433: TARGETDEP=t-ascii.h
434: GFXOBJS="ncurses.o"
435: GUIOBJS="tui.o svgancui.o"
436: LIBRARIES="-lncurses"
437: else if [[ "x$no_x" = "xyes" ]]; then
438: AC_MSG_RESULT(Ummm....)
439: echo "Fatal error: No graphics system found, don't know what target to use."
440: exit 1
1.1.1.3 root 441: else
1.1.1.4 root 442: AC_MSG_RESULT(X11)
443: TARGET=x11
444: TARGETDEP=t-x11.h
445: GFXOBJS=xwin.o
446: GUIOBJS=nogui.o
447:
448: LIBRARIES="$X_LIBS $X_PRE_LIBS"
449: dnl If we still think we want DGA, set it up.
450: if [[ "x$WANT_DGA" = "xyes" ]]; then
451: LIBRARIES="$LIBRARIES -lXxf86dga"
452: X_CFLAGS="$X_CFLAGS -DUSE_DGA_EXTENSION"
453: if [[ "x$WANT_VIDMODE" = "xyes" ]]; then
454: LIBRARIES="$LIBRARIES -lXxf86vm"
455: X_CFLAGS="$X_CFLAGS -DUSE_VIDMODE_EXTENSION"
456: fi
457: fi
458: LIBRARIES="$LIBRARIES -lXext -lX11 $X_EXTRA_LIBS"
1.1.1.3 root 459:
1.1.1.4 root 460: if [[ "x$WANT_UI" != "xno" ]]; then
461: if [[ "x$no_gtk" = "xyes" ]]; then
462: echo "Did not find gtk+, disabling user interface"
463: GTK_CFLAGS=
464: GTK_LIBS=
465: if [[ "x$WANT_UI" = "xyes" ]]; then
466: NR_ERRORS=`expr $NR_ERRORS + 1`
467: fi
1.1 root 468: else
1.1.1.4 root 469: echo "Using gtk+ GUI."
470: NEED_THREAD_SUPPORT=yes
471: ADDITIONAL_CFLAGS="$ADDITIONAL_CFLAGS -DUSING_GTK_GUI"
472: GUIOBJS=gtkui.o
1.1 root 473: fi
474: fi
1.1.1.4 root 475: fi
476: fi
477: fi
1.1 root 478: fi
479: fi
1.1.1.3 root 480: fi
481: fi
482: fi
1.1.1.6 root 483: fi
1.1 root 484:
1.1.1.4 root 485: if [[ "x$WANT_NCURSES_UI" = "xyes" ]]; then
486: if [[ "x$HAVE_NCURSES_LIB" = "xno" ]]; then
487: if [[ "x$WANT_UI" = "xyes" ]]; then
488: echo "ncurses is unavailable, can't provide a user interface"
489: NR_ERRORS=`expr $NR_ERRORS + 1`
490: fi
491: WANT_UI=no
492: fi
493: if [[ "x$WANT_UI" != "xno" ]]; then
494: GUIOBJS="tui.o svgancui.o"
495: LIBRARIES="$LIBRARIES -lncurses"
496: ADDITIONAL_CFLAGS="$ADDITIONAL_CFLAGS -DUSING_CURSES_UI"
497: if [[ "x$ac_cv_header_ncurses_h" = "xno" ]]; then
498: echo "Found libncurses, but no ncurses.h. This is normal with recent versions"
499: echo "of ncurses, but it might indicate a problem with older versions."
500: NR_WARNINGS=`expr $NR_WARNINGS + 1`
501: fi
502: else
503: GUIOBJS=nogui.o
504: fi
1.1.1.3 root 505: fi
506:
1.1.1.4 root 507: GFXOBJS="$GFXOBJS $GUIOBJS"
508:
1.1.1.3 root 509: dnl Find out some things about the system
510: dnl - whether we have GCC 2.7 or better.
511: dnl - what CPU we have (to use some assembly hacks on the x86)
512: dnl - whether we are on a Linux system
1.1.1.4 root 513: dnl - whether that is an ELF system
514: dnl - whether it's running glibc-2.0
515:
516: MACHDEP=md-generic
517: OSDEP=od-generic
518: THREADDEP=td-none
519: SOUNDDEP=od-generic
520:
1.1.1.6 root 521: MD_SUPPORT=machdep/support.c
522: OD_JOYSTICK=osdep/joystick.c
523: SD_SOUND=sounddep/sound.c
524: P2C=p2c.o
525:
1.1.1.4 root 526: USE_PENGUINS=no
527: USE_THREADS=no
528: USE_FILE_SOUND=no
529:
1.1.1.6 root 530: USE_UNDERSCORE=dunno
531:
1.1.1.4 root 532: HAVELINUX=no
1.1.1.6 root 533: HAVEBSD=no
1.1.1.4 root 534: HAVEGCC27=no
1.1.1.6 root 535: HAVEGAS=no
1.1.1.4 root 536: HAVEI386=no
537: HAVE68K=no
538: HAVEGLIBC2=no
1.1.1.3 root 539:
1.1 root 540: ASMOBJS=
1.1.1.4 root 541: CPUOBJS=cpuemu.o
1.1.1.3 root 542:
1.1.1.4 root 543: AC_MSG_CHECKING(for GCC 2.7 or higher)
1.1.1.6 root 544: AC_EGREP_CPP(yes,
545: [#if __GNUC__ - 1 > 1 || __GNUC_MINOR__ - 1 > 5
546: yes
1.1.1.3 root 547: #endif
1.1.1.6 root 548: ], [AC_MSG_RESULT(yes); HAVEGCC27=yes], AC_MSG_RESULT(no))
1.1.1.3 root 549:
1.1.1.6 root 550: if test $ac_cv_prog_gcc = yes; then
551: if test $HAVEGCC27 != yes; then
1.1.1.3 root 552: echo "I suggest you upgrade to at least version 2.7 of GCC"
1.1.1.6 root 553: fi
554: else
555: if test $uae_cv_prog_cc_watcom != yes; then
1.1.1.3 root 556: echo "Couldn't find GCC. UAE may or may not compile and run correctly."
1.1.1.4 root 557: NR_WARNINGS=`expr $NR_WARNINGS + 1`
1.1.1.3 root 558: fi
559: fi
560:
1.1.1.4 root 561: if [[ "x$ac_cv_header_features_h" = "xyes" ]]; then
1.1.1.6 root 562: AC_MSG_CHECKING(for glibc-2.0 or higher)
563: AC_EGREP_CPP(yes,
564: [#include <features.h>
565: #if __GLIBC__ - 1 >= 1
566: yes
1.1.1.4 root 567: #endif
1.1.1.6 root 568: ], [AC_MSG_RESULT(yes); HAVEGLIBC2=yes], AC_MSG_RESULT(no))
1.1.1.4 root 569: fi
570:
1.1.1.6 root 571: if test $ac_cv_prog_gcc = yes; then
1.1.1.4 root 572: WARNING_CFLAGS="-Wall -Wno-unused -Wno-format -W -Wmissing-prototypes -Wstrict-prototypes"
573: OPTIMIZE_CFLAGS="-O2 -fomit-frame-pointer"
574: dnl Not nice, but needed to turn off -g
575: CFLAGS=
576: fi
577:
578: if [[ "x$DO_PROFILING" = "xyes" ]]; then
579: if [[ "x$CC" = "xgcc" ]]; then
580: OPTIMIZE_CFLAGS="-O"
581: DEBUG_CFLAGS="-g -fno-inline -fno-omit-frame-pointer -pg -DUSE_PROFILING"
582: LDFLAGS="-pg"
583: else
584: DO_PROFILING=no
585: echo "Don't know how to set up profiling for your compiler."
586: NR_ERRORS=`expr $NR_ERRORS + 1`
1.1.1.3 root 587: fi
588: fi
589:
1.1.1.4 root 590: CFLAGS="$OPTIMIZE_CFLAGS $DEBUG_CFLAGS $WARNING_CFLAGS $CFLAGS $ADDITIONAL_CFLAGS"
591:
592: if [[ "x$HAVEGCC27" = "xyes" ]]; then
1.1.1.3 root 593: CFLAGS="$CFLAGS -DGCCCONSTFUNC=\"__attribute__((const))\""
594: else
595: CFLAGS="$CFLAGS -DGCCCONSTFUNC="
596: fi
597:
1.1.1.6 root 598: AC_MSG_CHECKING(for x86 target CPU)
599: AC_EGREP_CPP(yes,
600: [
1.1.1.3 root 601: #ifdef __i386__
1.1.1.6 root 602: yes
1.1.1.3 root 603: #endif
1.1.1.6 root 604: ], [AC_MSG_RESULT(yes); HAVEI386=yes], AC_MSG_RESULT(no))
1.1.1.3 root 605:
1.1.1.6 root 606: AC_MSG_CHECKING(for m68k target CPU)
607: AC_EGREP_CPP(yes,
608: [
609: #ifdef __m68k__
610: yes
611: #endif
1.1.1.7 root 612: ], [AC_MSG_RESULT(yes); HAVE68K=yes], AC_MSG_RESULT(no))
1.1 root 613:
1.1.1.4 root 614: if MACHINE=`uname -a 2>/dev/null`; then
615: case "$MACHINE" in
616: Linux*)
617: HAVELINUX=yes
618: ;;
619: esac
620: fi
621:
1.1.1.6 root 622: dnl Special case hack for BSD: try to use the Linux joystick.c.
623:
624: if [[ "x$HAVE_MACHINE_JOYSTICK_H" = "xyes" ]]; then
625: AC_TRY_COMPILE([#include <machine/joystick.h>],[{ struct joystick a; }],
626: OD_JOYSTICK=$abssrcdir/src/od-linux/joystick.c,)
627: fi
628:
1.1.1.4 root 629: dnl X86.S needs to know whether it needs to add underscores to symbols.
630: dnl This might break some obscure systems which don't have ELF but don't
631: dnl add underscores either.
1.1 root 632:
1.1.1.6 root 633: AC_MSG_CHECKING(for GAS .p2align feature)
634: cat >conftest.S << EOF
635: .text
636: .p2align 5
1.1 root 637: EOF
1.1.1.6 root 638: if $CC conftest.S -c -o conftest.o >/dev/null 2>&1 ; then HAVEGAS=yes; fi
639: AC_MSG_RESULT($HAVEGAS)
1.1.1.4 root 640:
1.1.1.6 root 641: AC_MSG_CHECKING(whether assembler symbols need an underscore)
642: cat >conftest1.S << EOF
643: .text
644: .globl _symbol
645: _symbol:
646: EOF
647: cat >conftest2.c << EOF
648: extern void symbol ();
649: int main ()
650: {
651: symbol ();
652: }
653: EOF
654: $CC conftest1.S -c -o conftest1.o >/dev/null 2>&1
655: $CC conftest2.c -c -o conftest2.o >/dev/null 2>&1
656: if $CC conftest1.o conftest2.o -o conftest >/dev/null 2>&1; then
657: USE_UNDERSCORE=yes
658: CFLAGS="$CFLAGS -DUSE_UNDERSCORE"
1.1.1.4 root 659: else
1.1.1.6 root 660: USE_UNDERSCORE=no
1.1.1.4 root 661: fi
1.1.1.6 root 662: AC_MSG_RESULT($USE_UNDERSCORE)
1.1.1.4 root 663:
664: rm -f conftest*
665:
666: AC_ARG_ENABLE(threads,[ --enable-threads Enable filesystem thread support],[USE_THREADS=$enableval],[])
667: AC_ARG_ENABLE(penguins,[ --enable-penguins Enable threads that only make sense on SMP machines],[USE_PENGUINS=$enableval],[])
668:
669: if [[ "x$NEED_THREAD_SUPPORT" = "xyes" ]]; then
670: if [[ "x$USE_THREADS" != "xyes" -a "x$USE_PENGUINS" != "xyes" ]]; then
671: echo "The gtk+ GUI needs threads; enabling thread support."
672: fi
673: fi
674:
675: if [[ "x$USE_THREADS" = "xyes" -o "x$USE_PENGUINS" = "xyes" -o "x$NEED_THREAD_SUPPORT" = "xyes" ]]; then
676: if [[ "x$HAVE_PTHREAD_LIB" = "xyes" ]]; then
677: THREADDEP=td-posix
678: CFLAGS="$CFLAGS -DSUPPORT_THREADS -D_REENTRANT"
679: LIBS="$LIBS -lpthread"
680: if [[ "x$HAVE_POSIX4_LIB" = "xyes" ]]; then
681: LIBS="$LIBS -lposix4"
682: fi
683:
684: if [[ "x$USE_THREADS" = "xyes" ]]; then
685: CFLAGS="$CFLAGS -DUAE_FILESYS_THREADS"
686: fi
687: if [[ "x$USE_PENGUINS" = "xyes" ]]; then
688: CFLAGS="$CFLAGS -DSUPPORT_PENGUINS"
689: fi
690:
691: if [[ "x$HAVELINUX" = "xno" -o "x$HAVEGLIBC2" = "xno" ]]; then
1.1.1.6 root 692: echo "Thread support has only been tested on Linux systems with glibc-2.0"
1.1.1.4 root 693: NR_WARNINGS=`expr $NR_WARNINGS + 1`
694: fi
695: if [[ "x$TARGET" = "xsvgalib" ]]; then
696: echo "If you didn't compile a fixed version of SVGAlib then thread support"
697: echo "in UAE will lock your machine real hard."
698: NR_WARNINGS=`expr $NR_WARNINGS + 1`
699: fi
1.1 root 700: else
1.1.1.4 root 701: echo "You tried to enable threads, but I couldn't find a thread library!"
702: NR_ERRORS=`expr $NR_ERRORS + 1`
1.1 root 703: fi
1.1.1.3 root 704: fi
705:
1.1.1.4 root 706: dnl See if we have something better than GCC 2.7.
707:
708: if [[ "x$HAVEGCC27" = "xyes" -a "x$HAVEI386" = "xyes" ]]; then
709: SAVECFLAGS=$CFLAGS
710: CFLAGS="$CFLAGS -mno-schedule-prologue"
711: AC_TRY_COMPILE(,int main(){return 0;}, NO_SCHED_CFLAGS="-mno-schedule-prologue")
712: CFLAGS=$SAVECFLAGS
713: fi
714:
715: dnl If GCC supports exceptions, we don't want them.
716:
717: if [[ "x$HAVEGCC27" = "xyes" -a "x$HAVEI386" = "xyes" ]]; then
718: SAVECFLAGS=$CFLAGS
719: CFLAGS="$CFLAGS -fno-exceptions"
720: NOEXCEPTIONS=no
721: AC_TRY_COMPILE(,int main(){return 0;}, NOEXCEPTIONS=yes)
722: if [[ "x$NOEXCEPTIONS" = "xno" ]]; then
723: CFLAGS=$SAVECFLAGS
724: fi
725: fi
726:
727:
1.1.1.3 root 728: dnl Set up the link to the appropriate machdep directory and select something
729: dnl for the REGPARAM define.
730:
1.1.1.4 root 731: if [[ "x$HAVEGCC27" = "xyes" -a "x$HAVEI386" = "xyes" -a "x$DO_PROFILING" = "xno" ]]; then
732: MACHDEP=md-i386-gcc
733: dnl strength-reduce is turned off not because of paranoia, but because it
734: dnl actually makes the code worse in some cases on the i386 (generates too
735: dnl many registers, which all end up on the stack).
1.1.1.6 root 736: CFLAGS="$CFLAGS -DUNALIGNED_PROFITABLE -fno-strength-reduce -DREGPARAM=\"__attribute__((regparm(3)))\""
737:
738: if [[ "x$HAVEGAS" = "xyes" ]]; then
739: CFLAGS="$CFLAGS -DX86_ASSEMBLY"
740: ASMOBJS=md-X86.o
741:
742: CPUOBJS=cpufast.o
743: P2C=p2c_x86.o
744: fi
745: else if test $uae_cv_prog_cc_watcom = yes; then
746: MACHDEP=md-i386-watcom
747: echo CFLAGS before: $CFLAGS
748: CFLAGS=`echo $CFLAGS | sed 's, -g , ,' |sed 's,^-g ,,'`
749: CFLAGS="$CFLAGS --/--bm --/--mf --/--w4 --/--s --/--ei --/--zp4 --/--5r"
750: CFLAGS="$CFLAGS --/--oe=50 --/--oi --/--ok --/--ol --/--ot --/--oh --/--or --/--zq"
751: CFLAGS="$CFLAGS -DREGPARAM= -DUNALIGNED_PROFITABLE"
752: echo CFLAGS after: $CFLAGS
1.1.1.4 root 753: else if [[ "x$TARGET" = "xp_os" ]]; then
754: CPU=`uname -m`
755: if [[ "x$CPU" = "xm68k" ]]; then
756: MACHDEP=md-68k
1.1.1.7 root 757: CFLAGS="$CFLAGS -DUNALIGNED_PROFITABLE -DREGPARAM=\"__attribute__((regparm(4)))\" -DM68K_FLAG_OPT=1"
1.1.1.4 root 758: else if [[ "x$CPU" = "xppc" ]]; then
759: MACHDEP=md-ppc
760: CFLAGS="$CFLAGS -DREGPARAM="
761: else if [[ "x$CPU" = "xi386" ]]; then
762: dnl Sam, I don't think we can get here.
763: MACHDEP=md-i386-gcc
764: CFLAGS="$CFLAGS -DX86_ASSEMBLY -fno-strength-reduce -DREGPARAM=\"__attribute__((regparm(3)))\""
765: else
766: echo "Unsupported CPU: $CPU!"
767: exit 5
768: fi
769: fi
770: fi
771: CFLAGS="$CFLAGS -nostdinc -I/gg/include -I/p/../inc -D__POS__"
772: OSDEP=od-pos
773: CPUOBJS="cpufast.o"
1.1.1.7 root 774: else if [[ "x$TARGET" = "xamigaos" ]]; then
1.1.1.4 root 775: OSDEP=od-amiga
1.1.1.7 root 776: CPU=`uname -m`
777: if [[ "x$HAVEGCC27" = "xyes" -a "x$HAVE68K" = "xyes" ]]; then
778: MACHDEP=md-68k
779: CFLAGS="$CFLAGS -DUNALIGNED_PROFITABLE -DREGPARAM=\"__attribute__((regparm(4)))\" -DM68K_FLAG_OPT=1"
780: CPUOBJS="cpufast1.o cpufast2.o cpufast3.o cpufast4.o cpufast5.o cpufast6.o cpufast7.o cpufast8.o"
781: else if [[ "x$HAVEGCC27" = "xyes" -a "x$CPU" = "xppc" ]]; then
782: MACHDEP=md-ppc-gcc
783: else
784: dnl sam: amigaos without gcc
785: CFLAGS="$CFLAGS -O -DREGPARAM="
786: CPUOBJS="cpuemu1.o cpuemu2.o cpuemu3.o cpuemu4.o cpuemu5.o cpuemu6.o cpuemu7.o cpuemu8.o"
787: fi
788: fi
1.1.1.4 root 789: else if [[ "x$HAVEGCC27" = "xyes" -a "x$HAVE68K" = "xyes" -a "x$DO_PROFILING" = "xno" ]]; then
790: dnl sam: This is for linux 68k (REGPARAM is not used under linux)
791: MACHDEP=md-68k
792: CFLAGS="$CFLAGS -DM68K_FLAG_OPT=1 -DREGPARAM="
793: CPUOBJS="cpufast.o"
794: else if [[ "x$TARGET" = "xbeos" ]]; then
795: MACHDEP=md-ppc
796: CFLAGS="$CFLAGS -DREGPARAM="
797: OSDEP=od-beos
1.1 root 798: else
1.1.1.3 root 799: CFLAGS="$CFLAGS -DREGPARAM="
800: fi
801: fi
1.1 root 802: fi
1.1.1.4 root 803: fi
804: fi
805: fi
1.1 root 806:
1.1.1.6 root 807: if [[ "x$TARGET" = "xwin32" ]]; then
808: OSDEP=od-win32
809: if test $ac_cv_prog_gcc = yes; then
810: LIBS="$LIBS -lddraw -lwinmm -lcomctl32 -lcomdlg32 -luser32 -lgdi32 -lkernel32 -ladvapi32 -lshell32"
811: else if test $uae_cv_prog_cc_watcom = yes; then
812: LIBS="$LIBS -lddraw -lwinmm -lcomctl32"
813: fi
814: fi
815: else if [[ "x$HAVELINUX" = "xyes" ]]; then
1.1.1.4 root 816: OSDEP=od-linux
817: if [[ "x$HAVEGLIBC2" = "xyes" -a "x$HAVEI386" = "xyes" ]]; then
818: CFLAGS="$CFLAGS -DHAVE_GLIBC_2_LINUX"
819: fi
1.1.1.2 root 820: fi
1.1.1.6 root 821: fi
1.1.1.2 root 822:
1.1.1.4 root 823: if [[ "x$TARGET" = "xx11" -o "x$TARGET" = "xsvgalib" -o "x$TARGET" = "xamigaos" \
824: -o "x$TARGET" = "xbeos" -o "x$TARGET" = "xasciiart" -o "x$TARGET" = "xggilib" -o "x$TARGET" = "xp_os" ]]; then
825: dnl On Unix, BeOS and AmigaOS system, zfile is supposed to work. Dunno about others.
1.1.1.3 root 826: CFLAGS="$CFLAGS -DUSE_ZFILE"
1.1.1.4 root 827: fi
828:
829: HAVE_USS_SOUND=no
830: if [[ "x$ac_cv_header_sys_soundcard_h" = "xyes" -o "x$ac_cv_header_machine_soundcard_h" = "xyes" ]]; then
831: dnl Avoid surprises
832: AC_MSG_CHECKING(whether sys/soundcard.h or machine/soundcard.h works)
833: AC_TRY_COMPILE([
834: #include "confdefs.h"
835: #ifdef HAVE_SYS_SOUNDCARD_H
836: #include <sys/soundcard.h>
837: #else
838: #include <machine/soundcard.h>
839: #endif
840: #include <sys/ioctl.h>
841: ],
842: [int soundfd; ioctl (soundfd, SNDCTL_DSP_GETFMTS, 0);],
843: AC_MSG_RESULT(yes)
844: HAVE_USS_SOUND=yes,
845: AC_MSG_RESULT(no))
846: fi
847:
1.1.1.8 root 848: if [[ "x$ac_cv_header_dmedia_audio.h" = "xno" ]]; then
849: HAVE_SGIAUDIO_LIB=no
850: fi
851:
1.1.1.4 root 852: AC_MSG_CHECKING(which sound system to use)
853: AC_ARG_ENABLE(file-sound,[ --enable-file-sound Enable sound output to file],[USE_FILE_SOUND=$enableval],[])
854:
855: if [[ "x$USE_FILE_SOUND" = "xyes" ]]; then
1.1.1.7 root 856: AC_MSG_RESULT(file output)
857: SOUNDDEP=sd-file
858: USE_SOUND=yes
859: else if [[ "x$HAVE_USS_SOUND" = "xyes" ]]; then
860: AC_MSG_RESULT(USS)
861: SOUNDDEP=sd-uss
1.1.1.4 root 862: USE_SOUND=yes
1.1.1.7 root 863: else if [[ "x$ac_cv_header_sys_audioio_h" = "xyes" -o "x$ac_cv_header_sun_audioio_h" = "xyes" ]]; then
864: AC_MSG_RESULT(Solaris/NetBSD)
865: SOUNDDEP=sd-solaris
866: USE_SOUND=yes
867: else if [[ "x$HAVE_AF_LIB" = "xyes" ]]; then
868: AC_MSG_RESULT(AF sound)
869: SOUNDDEP=sd-af
870: LIBS="$LIBS -lAF"
871: USE_SOUND=yes
1.1.1.8 root 872: else if [[ "x$HAVE_SGIAUDIO_LIB" = "xyes" ]]; then
873: AC_MSG_RESULT(SGI sound)
874: SOUNDDEP=sd-sgi
875: LIBS="$LIBS -laudio"
876: USE_SOUND=yes
1.1.1.7 root 877: else if [[ "x$HAVE_MME_LIB" = "xyes" ]]; then
878: AC_MSG_RESULT(MME sound)
879: SOUNDDEP=sd-mme
880: LIBS="$LIBS -lmme"
881: USE_SOUND=yes
882: else if [[ "x$TARGET" = "xp_os" ]]; then
883: AC_MSG_RESULT(pAudio.device)
884: SOUNDDEP=od-pos
885: USE_SOUND=yes
886: else if [[ "x$TARGET" = "xamigaos" ]]; then
887: if [[ "x$ac_cv_header_devices_ahi_h" = "xyes" ]]; then
888: AC_MSG_RESULT(Amiga AHI.device)
1.1.1.4 root 889: else
1.1.1.7 root 890: AC_MSG_RESULT(Amiga audio.device)
1.1.1.6 root 891: fi
1.1.1.7 root 892: SOUNDDEP=od-amiga
893: USE_SOUND=yes
894: else if [[ "x$TARGET" = "xbeos" ]]; then
895: AC_MSG_RESULT(BeOS sound)
896: SOUNDDEP=od-beos
897: USE_SOUND=yes
898: else if [[ "x$TARGET" = "xwin32" ]]; then
899: AC_MSG_RESULT(Win32 sound)
900: SOUNDDEP=od-win32
901: USE_SOUND=yes
902: else
903: echo "no known sound system found"
904: NR_ERRORS=`expr $NR_ERRORS + 1`
905: fi
906: fi
907: fi
908: fi
1.1.1.4 root 909: fi
1.1.1.7 root 910: fi
911: fi
912: fi
913: fi
1.1.1.8 root 914: fi
1.1.1.7 root 915:
1.1.1.4 root 916:
917: rm -f src/machdep
918: rm -f src/osdep
919: rm -f src/threaddep
920: rm -f src/sounddep
921: rm -f src/target.h
1.1.1.5 root 922: rm -f src/config.h
1.1.1.6 root 923: rm -f src/sd-sound.c
924: rm -f src/od-joy.c
925: rm -f src/md-support.c
926: rm -f src/md-X86.S
1.1.1.3 root 927:
1.1.1.4 root 928: if [[ "x$TARGET" = "xamigaos" -o "x$TARGET" = "xp_os" ]]; then
1.1.1.3 root 929: dnl Determine the cpu-type
930: AC_MSG_CHECKING(which CPU to use)
931: cpu=`cpu | cut -d' ' -f2`
932: AC_MSG_RESULT($cpu)
933: CFLAGS="$CFLAGS -m$cpu"
934:
935: dnl Is that correct for the fpu ?
936: AC_MSG_CHECKING(which FPU to use)
1.1.1.4 root 937: fpu=`cpu | cut -d' ' -f3 | grep '^6888[12]$'`
938: if [[ "x$fpu" != "x" ]]; then
939: dnl gcc only knows about 68881
940: AC_MSG_RESULT(68881)
941: CFLAGS="$CFLAGS -m68881"
1.1.1.3 root 942: else
943: AC_MSG_RESULT(none)
944: fi
945: fi
1.1.1.4 root 946:
1.1 root 947: AC_SUBST(ac_cv_c_inline)
1.1.1.6 root 948: AC_SUBST(WRC)
1.1.1.4 root 949: AC_SUBST(NO_SCHED_CFLAGS)
1.1 root 950: AC_SUBST(LIBRARIES)
951: AC_SUBST(TARGET)
952: AC_SUBST(GFXOBJS)
1.1.1.6 root 953: AC_SUBST(RESOBJS)
1.1 root 954: AC_SUBST(ASMOBJS)
1.1.1.6 root 955: AC_SUBST(P2C)
1.1.1.2 root 956: AC_SUBST(CPUOBJS)
1.1.1.3 root 957: AC_SUBST(DEBUGOBJS)
1.1.1.2 root 958: AC_SUBST(SET_MAKE)
1.1.1.3 root 959: AC_SUBST(MATHLIB)
1.1.1.4 root 960: AC_SUBST(SHM_SUPPORT_LINKS)
961:
1.1.1.3 root 962: AC_SUBST(top_srcdir)
1.1 root 963:
1.1.1.2 root 964: AC_OUTPUT(src/Makefile Makefile)
1.1.1.4 root 965: if [[ "x$DO_PROFILING" = "xyes" ]]; then
1.1.1.3 root 966: echo "Building a profiling version of UAE (select this option only if you know"
967: echo "what you are doing)"
968: fi
1.1.1.4 root 969:
970: dnl Create some more links and files.
971:
972: dnl We removed those from the build directory above, so if the source
973: dnl directory still has them, something is fairly wrong.
974:
975: dnl This doesn't work with Solaris /bin/sh, neither do all the alternatives I
1.1.1.6 root 976: dnl tried. It doesn't seem to cause a failure either, though.
1.1.1.4 root 977:
1.1.1.6 root 978: if (test -e $abssrcdir/src/sounddep) || (test -e $abssrcdir/src/machdep) \
979: || (test -e $abssrcdir/src/osdep) || (test -e $abssrcdir/src/threaddep) \
980: || (test -e $abssrcdir/src/target.h)
981: then
982: echo
983: echo "Fatal error: Can't configure in the current directory, because"
984: echo "configure was run in the source directory. Go to the source"
985: echo "directory, type"
986: echo " make streifenfrei"
987: echo "and try again."
988: exit 1
989: fi
1.1.1.4 root 990:
991: ln -s $abssrcdir/src/$MACHDEP src/machdep
992: ln -s $abssrcdir/src/$OSDEP src/osdep
993: ln -s $abssrcdir/src/$THREADDEP src/threaddep
994: ln -s $abssrcdir/src/$SOUNDDEP src/sounddep
995: ln -s $abssrcdir/src/targets/$TARGETDEP src/target.h
1.1.1.5 root 996: ln -s $abssrcdir/config.h src/config.h
1.1.1.4 root 997:
1.1.1.6 root 998:
999: ln -s $SD_SOUND src/sd-sound.c
1000: ln -s $OD_JOYSTICK src/od-joy.c
1001: ln -s $MD_SUPPORT src/md-support.c
1002:
1003: if [[ "x$MACHDEP" = "xmd-i386-gcc" ]]; then
1004: ln -s machdep/X86.S src/md-X86.S
1005: fi
1006:
1007:
1.1.1.4 root 1008: echo
1009: echo
1010: if [[ "x$NR_ERRORS" = "x0" ]]; then
1011: if [[ "x$NR_WARNINGS" = "x0" ]]; then
1012: echo "Configuration was successful!"
1013: else
1014: echo "There were $NR_WARNINGS warnings. That is usually harmless, but read the output"
1015: echo "from configure carefully if you run into problems."
1016: fi
1017: else
1018: echo "There were $NR_ERRORS errors. UAE may still build and run cleanly, but you may"
1019: echo "not get all the features you asked for."
1020: fi
1021: echo
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.