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