|
|
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)
68:
69: AC_PATH_XTRA
70: AC_CONFIG_HEADER(src/sysconfig.h)
1.1.1.3 root 71:
1.1 root 72: AC_HEADER_DIRENT
73: AC_HEADER_STDC
74:
1.1.1.4 root 75: dnl @@@ Is <sys/termios.h> the right way or is it <termios.h>?
76: 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)
77: 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 78: 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 79: AC_CHECK_HEADERS(ggi/libggi.h)
1.1.1.6 ! root 80: AC_CHECK_HEADERS(windows.h ddraw.h)
1.1.1.4 root 81: AC_CHECK_HEADER(be_math.h, HAVE_BEOS=yes, HAVE_BEOS=no)
1.1.1.6 ! root 82: AC_CHECK_HEADERS(machine/joystick.h)
! 83: AC_CHECK_HEADERS(devices/ahi.h)
! 84: AC_CHECK_HEADERS(libraries/cybergraphics.h cybergraphx/cybergraphics.h)
1.1.1.4 root 85:
86: AC_CHECK_SIZEOF(char, 1)
87: AC_CHECK_SIZEOF(short, 2)
88: AC_CHECK_SIZEOF(int, 4)
89: AC_CHECK_SIZEOF(long, 4)
90: AC_CHECK_SIZEOF(long long, 8)
1.1.1.6 ! root 91: AC_CHECK_SIZEOF(__int64, 8)
1.1 root 92:
93: dnl Checks for typedefs, structures, and compiler characteristics.
94: AC_C_CONST
95: AC_C_INLINE
1.1.1.4 root 96: if [[ "x$ac_cv_c_inline" = "xno" ]]; then
97: ac_cv_c_inline=
98: fi
1.1 root 99: AC_TYPE_MODE_T
100: AC_TYPE_OFF_T
101: AC_TYPE_PID_T
102: AC_STRUCT_ST_BLOCKS
103: AC_HEADER_TIME
104: AC_STRUCT_TM
105:
106: dnl Checks for library functions.
107: AC_PROG_GCC_TRADITIONAL
108: AC_FUNC_MEMCMP
109: AC_TYPE_SIGNAL
110: AC_FUNC_UTIME_NULL
1.1.1.6 ! root 111: AC_CHECK_FUNCS(getcwd getopt strdup gettimeofday sigaction mkdir rmdir select strerror strstr)
! 112: AC_CHECK_FUNCS(tcgetattr cfmakeraw readdir_r vprintf vsprintf vfprintf)
1.1 root 113:
1.1.1.6 ! root 114: dnl GNOME_FILEUTILS_CHECKS will fail for native Win32 compilers like Watcom C
! 115: dnl So don't use that macro if we know it will fail
! 116: DO_FILEUTILS_CHECK=yes
! 117: if test $uae_cv_prog_cc_watcom = yes -o $am_cv_mingw32 = yes; then
! 118: DO_FILEUTILS_CHECK=no
! 119: fi
! 120: if test $DO_FILEUTILS_CHECK = yes; then
! 121: GNOME_FILEUTILS_CHECKS
1.1 root 122: fi
123:
1.1.1.6 ! root 124: dnl Check for pOS or -target=p.os
! 125: if [[ $target = "p.os" ]]; then
! 126: HAVE_POS=yes
! 127: else
! 128: AC_MSG_CHECKING(for pOS)
! 129: AC_EGREP_CPP(yes,
! 130: [#ifdef __POS__
! 131: yes
! 132: #endif
! 133: ], [AC_MSG_RESULT(yes); HAVE_POS=yes], AC_MSG_RESULT(no); HAVE_POS=no)
1.1 root 134: fi
135:
1.1.1.4 root 136: dnl Verify that the ncurses installation makes some sense.
137:
138: if [[ "x$HAVE_NCURSES_LIB" = "xyes" ]]; then
139: if [[ "x$ac_cv_header_ncurses_h" = "xno" -a "x$ac_cv_header_curses_h" = "xno" ]]; then
140: echo "Installation problem, found libncurses but neither curses.h nor ncurses.h!"
141: HAVE_NCURSES_LIB=no
142: NR_ERRORS=`expr $NR_ERRORS + 1`
143: else
144: if [[ "x$ac_cv_header_ncurses_h" = "xno" ]]; then
145: AC_MSG_CHECKING(for attr_t in curses.h)
146: AC_TRY_COMPILE([#include <curses.h>],[{ attr_t a; a = A_NORMAL; }], AC_MSG_RESULT(yes),
147: [
148: ADDITIONAL_CFLAGS="$ADDITIONAL_CFLAGS -DDONT_HAVE_ATTR_T"
149: AC_MSG_RESULT(no)
150: NR_WARNINGS=`expr $NR_WARNINGS + 1`
151: echo "Please install a newer version of libncurses if you can."
152: ])
153: else
154: AC_MSG_CHECKING(for attr_t in ncurses.h)
155: AC_TRY_COMPILE([#include <ncurses.h>],[{ attr_t a; a = A_NORMAL; }], AC_MSG_RESULT(yes),
156: [
157: ADDITIONAL_CFLAGS="$ADDITIONAL_CFLAGS -DDONT_HAVE_ATTR_T"
158: AC_MSG_RESULT(no)
159: NR_WARNINGS=`expr $NR_WARNINGS + 1`
160: echo "Please install a newer version of libncurses if you can."
161: ])
162: fi
163: fi
164: fi
165:
1.1.1.6 ! root 166:
! 167: AC_MSG_CHECKING(for pthread library)
! 168: TMP_SAVE_CFLAGS=$CFLAGS
! 169: TMP_SAVE_LIBS=$LIBS
! 170: LIBS="$LIBS -lpthread"
! 171: AC_TRY_LINK([
! 172: #include "confdefs.h"
! 173: #ifdef HAVE_SYS_TYPES_H
! 174: #include <sys/types.h>
! 175: #endif
! 176: #include <pthread.h>],[
! 177: void foo(void)
! 178: {
! 179: pthread_exit (0);
! 180: }],
! 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: void foo(void)
346: {
347: XShmAttach(display, &shminfo);
348: XSync(display,0);
349: shmctl(shminfo.shmid, IPC_RMID, 0);
350: }],
351: SHM_SUPPORT_LINKS=1
352: AC_MSG_RESULT(yes),
353: SHM_SUPPORT_LINKS=0
354: AC_MSG_RESULT(no))
355: CFLAGS=$TMP_SAVE_CFLAGS
356: LIBS=$TMP_SAVE_LIBS
1.1.1.2 root 357: fi
358:
1.1.1.3 root 359: MATHLIB=-lm
1.1.1.4 root 360: DEBUGOBJS="debug.o"
1.1.1.3 root 361:
1.1 root 362: AC_MSG_CHECKING(which target to use)
1.1.1.4 root 363:
1.1.1.6 ! root 364: if [[ "x$HAVE_DIRECTX" = "xyes" ]]; then
! 365: AC_MSG_RESULT(Win32/DirectX)
! 366: MATHLIB=
! 367: TARGET=win32
! 368: TARGETDEP=t-win32.h
! 369: GFXOBJS="osdep/win32.o osdep/win32gui.o osdep/parser.o osdep/keyboard.o osdep/posixemu.o"
! 370: RESOBJS="osdep/winuae.res"
! 371: else if [[ "x$HAVE_BEOS" = "xyes" ]]; then
1.1.1.4 root 372: AC_MSG_RESULT(BeOS)
373: MATHLIB=
374: TARGET=beos
375: TARGETDEP=t-beos.h
376: GFXOBJS=osdep/beos.o
377: GUIOBJS=
378: OPTIMIZE_CFLAGS=-O7
379: else if [[ "x$HAVE_POS" = "xyes" ]]; then
380: AC_MSG_RESULT(p.OS)
381: TARGET=p_os
382: TARGETDEP=t-pos.h
383: GFXOBJS="osdep/pos-win.o osdep/pos-disk.o osdep/pos-rexx.o"
384: GUIOBJS="osdep/pos-gui.o"
385: else if [[ "x$HAVE_AMIGA_LIB" = "xyes" ]]; then
1.1.1.3 root 386: AC_MSG_RESULT(AmigaOS)
387: TARGET=amigaos
1.1.1.4 root 388: TARGETDEP=t-amiga.h
389: GFXOBJS="osdep/ami-win.o osdep/ami-disk.o osdep/ami-rexx.o osdep/ami-appw.o"
390: GUIOBJS="osdep/ami-gui.o"
391: else if [[ "x$HAVE_NEXT_LIB" = "xyes" ]]; then
1.1.1.3 root 392: AC_MSG_RESULT(NeXTStep)
393: MATHLIB=
394: TARGET=next
395: GFXOBJS="NeXTwin.o"
1.1.1.4 root 396: GUIOBJS=
397: TARGETDEP=t-next.h
1.1.1.3 root 398: LIBRARIES="-sectcreate __ICON __header ../Uae.app/Uae.iconheader -segprot __ICON r r -sectcreate __ICON app ../Uae.app/Uae.tiff -lMedia_s -lNeXT_s"
399: else
1.1.1.4 root 400: dnl Unix system
401: dnl If we don't have X, see what else we have and/or want.
1.1.1.3 root 402:
1.1.1.4 root 403: if [[ "x$no_x" = "xyes" ]]; then
404: if [[ "x$WANT_SVGALIB" != "xyes" -a "x$WANT_GGI" != "xyes" -a "x$WANT_ASCIIART" != "xyes" ]]; then
405: if [[ "x$WANT_SVGALIB" != "xno" -a "x$HAVE_SVGA_LIB" = "xyes" ]]; then
406: WANT_SVGALIB=yes
407: else if [[ "x$WANT_GGI" != "xno" -a "x$HAVE_GGI_LIB" = "xyes" ]]; then
408: WANT_GGI=yes
409: else if [[ "x$WANT_ASCIIART" != "xno" -a "x$HAVE_NCURSES_LIB" = "xyes" ]]; then
410: WANT_ASCIIART=yes
411: fi
412: fi
413: fi
1.1.1.3 root 414: fi
415: fi
416:
1.1.1.4 root 417: if [[ "x$WANT_GGI" = "xyes" ]]; then
418: AC_MSG_RESULT(GGI)
419: TARGET=ggilib
420: TARGETDEP=t-ggi.h
421: WANT_NCURSES_UI=yes
422: GFXOBJS=ggi.o
423: LIBRARIES="-ldl -lggi"
424: LDFLAGS="-rdynamic $LDFLAGS"
425: else if [[ "x$WANT_SVGALIB" = "xyes" ]]; then
426: AC_MSG_RESULT(SVGAlib)
427: TARGET=svgalib
428: TARGETDEP=t-svgalib.h
429: GFXOBJS=svga.o
430: LIBRARIES="-lvga"
431: WANT_NCURSES_UI=yes
432: else if [[ "x$WANT_ASCIIART" = "xyes" ]]; then
433: AC_MSG_RESULT(ncurses ASCII art)
434: TARGET=asciiart
435: TARGETDEP=t-ascii.h
436: GFXOBJS="ncurses.o"
437: GUIOBJS="tui.o svgancui.o"
438: LIBRARIES="-lncurses"
439: else if [[ "x$no_x" = "xyes" ]]; then
440: AC_MSG_RESULT(Ummm....)
441: echo "Fatal error: No graphics system found, don't know what target to use."
442: exit 1
1.1.1.3 root 443: else
1.1.1.4 root 444: AC_MSG_RESULT(X11)
445: TARGET=x11
446: TARGETDEP=t-x11.h
447: GFXOBJS=xwin.o
448: GUIOBJS=nogui.o
449:
450: LIBRARIES="$X_LIBS $X_PRE_LIBS"
451: dnl If we still think we want DGA, set it up.
452: if [[ "x$WANT_DGA" = "xyes" ]]; then
453: LIBRARIES="$LIBRARIES -lXxf86dga"
454: X_CFLAGS="$X_CFLAGS -DUSE_DGA_EXTENSION"
455: if [[ "x$WANT_VIDMODE" = "xyes" ]]; then
456: LIBRARIES="$LIBRARIES -lXxf86vm"
457: X_CFLAGS="$X_CFLAGS -DUSE_VIDMODE_EXTENSION"
458: fi
459: fi
460: LIBRARIES="$LIBRARIES -lXext -lX11 $X_EXTRA_LIBS"
1.1.1.3 root 461:
1.1.1.4 root 462: if [[ "x$WANT_UI" != "xno" ]]; then
463: if [[ "x$no_gtk" = "xyes" ]]; then
464: echo "Did not find gtk+, disabling user interface"
465: GTK_CFLAGS=
466: GTK_LIBS=
467: if [[ "x$WANT_UI" = "xyes" ]]; then
468: NR_ERRORS=`expr $NR_ERRORS + 1`
469: fi
1.1 root 470: else
1.1.1.4 root 471: echo "Using gtk+ GUI."
472: NEED_THREAD_SUPPORT=yes
473: ADDITIONAL_CFLAGS="$ADDITIONAL_CFLAGS -DUSING_GTK_GUI"
474: GUIOBJS=gtkui.o
1.1 root 475: fi
476: fi
1.1.1.4 root 477: fi
478: fi
479: fi
1.1 root 480: fi
481: fi
1.1.1.3 root 482: fi
483: fi
484: fi
1.1.1.6 ! root 485: fi
1.1 root 486:
1.1.1.4 root 487: if [[ "x$WANT_NCURSES_UI" = "xyes" ]]; then
488: if [[ "x$HAVE_NCURSES_LIB" = "xno" ]]; then
489: if [[ "x$WANT_UI" = "xyes" ]]; then
490: echo "ncurses is unavailable, can't provide a user interface"
491: NR_ERRORS=`expr $NR_ERRORS + 1`
492: fi
493: WANT_UI=no
494: fi
495: if [[ "x$WANT_UI" != "xno" ]]; then
496: GUIOBJS="tui.o svgancui.o"
497: LIBRARIES="$LIBRARIES -lncurses"
498: ADDITIONAL_CFLAGS="$ADDITIONAL_CFLAGS -DUSING_CURSES_UI"
499: if [[ "x$ac_cv_header_ncurses_h" = "xno" ]]; then
500: echo "Found libncurses, but no ncurses.h. This is normal with recent versions"
501: echo "of ncurses, but it might indicate a problem with older versions."
502: NR_WARNINGS=`expr $NR_WARNINGS + 1`
503: fi
504: else
505: GUIOBJS=nogui.o
506: fi
1.1.1.3 root 507: fi
508:
1.1.1.4 root 509: GFXOBJS="$GFXOBJS $GUIOBJS"
510:
1.1.1.3 root 511: dnl Find out some things about the system
512: dnl - whether we have GCC 2.7 or better.
513: dnl - what CPU we have (to use some assembly hacks on the x86)
514: dnl - whether we are on a Linux system
1.1.1.4 root 515: dnl - whether that is an ELF system
516: dnl - whether it's running glibc-2.0
517:
518: MACHDEP=md-generic
519: OSDEP=od-generic
520: THREADDEP=td-none
521: SOUNDDEP=od-generic
522:
1.1.1.6 ! root 523: MD_SUPPORT=machdep/support.c
! 524: OD_JOYSTICK=osdep/joystick.c
! 525: SD_SOUND=sounddep/sound.c
! 526: P2C=p2c.o
! 527:
1.1.1.4 root 528: USE_PENGUINS=no
529: USE_THREADS=no
530: USE_SOUND=no
531: USE_FILE_SOUND=no
532:
1.1.1.6 ! root 533: USE_UNDERSCORE=dunno
! 534:
1.1.1.4 root 535: HAVELINUX=no
1.1.1.6 ! root 536: HAVEBSD=no
1.1.1.4 root 537: HAVEGCC27=no
1.1.1.6 ! root 538: HAVEGAS=no
1.1.1.4 root 539: HAVEI386=no
540: HAVE68K=no
541: HAVEGLIBC2=no
1.1.1.3 root 542:
1.1 root 543: ASMOBJS=
1.1.1.4 root 544: CPUOBJS=cpuemu.o
1.1.1.3 root 545:
1.1.1.4 root 546: AC_MSG_CHECKING(for GCC 2.7 or higher)
1.1.1.6 ! root 547: AC_EGREP_CPP(yes,
! 548: [#if __GNUC__ - 1 > 1 || __GNUC_MINOR__ - 1 > 5
! 549: yes
1.1.1.3 root 550: #endif
1.1.1.6 ! root 551: ], [AC_MSG_RESULT(yes); HAVEGCC27=yes], AC_MSG_RESULT(no))
1.1.1.3 root 552:
1.1.1.6 ! root 553: if test $ac_cv_prog_gcc = yes; then
! 554: if test $HAVEGCC27 != yes; then
1.1.1.3 root 555: echo "I suggest you upgrade to at least version 2.7 of GCC"
1.1.1.6 ! root 556: fi
! 557: else
! 558: if test $uae_cv_prog_cc_watcom != yes; then
1.1.1.3 root 559: echo "Couldn't find GCC. UAE may or may not compile and run correctly."
1.1.1.4 root 560: NR_WARNINGS=`expr $NR_WARNINGS + 1`
1.1.1.3 root 561: fi
562: fi
563:
1.1.1.4 root 564: if [[ "x$ac_cv_header_features_h" = "xyes" ]]; then
1.1.1.6 ! root 565: AC_MSG_CHECKING(for glibc-2.0 or higher)
! 566: AC_EGREP_CPP(yes,
! 567: [#include <features.h>
! 568: #if __GLIBC__ - 1 >= 1
! 569: yes
1.1.1.4 root 570: #endif
1.1.1.6 ! root 571: ], [AC_MSG_RESULT(yes); HAVEGLIBC2=yes], AC_MSG_RESULT(no))
1.1.1.4 root 572: fi
573:
1.1.1.6 ! root 574: if test $ac_cv_prog_gcc = yes; then
1.1.1.4 root 575: WARNING_CFLAGS="-Wall -Wno-unused -Wno-format -W -Wmissing-prototypes -Wstrict-prototypes"
576: OPTIMIZE_CFLAGS="-O2 -fomit-frame-pointer"
577: dnl Not nice, but needed to turn off -g
578: CFLAGS=
579: fi
580:
581: if [[ "x$DO_PROFILING" = "xyes" ]]; then
582: if [[ "x$CC" = "xgcc" ]]; then
583: OPTIMIZE_CFLAGS="-O"
584: DEBUG_CFLAGS="-g -fno-inline -fno-omit-frame-pointer -pg -DUSE_PROFILING"
585: LDFLAGS="-pg"
586: else
587: DO_PROFILING=no
588: echo "Don't know how to set up profiling for your compiler."
589: NR_ERRORS=`expr $NR_ERRORS + 1`
1.1.1.3 root 590: fi
591: fi
592:
1.1.1.4 root 593: CFLAGS="$OPTIMIZE_CFLAGS $DEBUG_CFLAGS $WARNING_CFLAGS $CFLAGS $ADDITIONAL_CFLAGS"
594:
595: if [[ "x$HAVEGCC27" = "xyes" ]]; then
1.1.1.3 root 596: CFLAGS="$CFLAGS -DGCCCONSTFUNC=\"__attribute__((const))\""
597: else
598: CFLAGS="$CFLAGS -DGCCCONSTFUNC="
599: fi
600:
1.1.1.6 ! root 601: AC_MSG_CHECKING(for x86 target CPU)
! 602: AC_EGREP_CPP(yes,
! 603: [
1.1.1.3 root 604: #ifdef __i386__
1.1.1.6 ! root 605: yes
1.1.1.3 root 606: #endif
1.1.1.6 ! root 607: ], [AC_MSG_RESULT(yes); HAVEI386=yes], AC_MSG_RESULT(no))
1.1.1.3 root 608:
1.1.1.6 ! root 609: AC_MSG_CHECKING(for m68k target CPU)
! 610: AC_EGREP_CPP(yes,
! 611: [
! 612: #ifdef __m68k__
! 613: yes
! 614: #endif
! 615: ], [AC_MSG_RESULT(yes); HAVEI386=yes], AC_MSG_RESULT(no))
1.1 root 616:
1.1.1.4 root 617: if MACHINE=`uname -a 2>/dev/null`; then
618: case "$MACHINE" in
619: Linux*)
620: HAVELINUX=yes
621: ;;
622: esac
623: fi
624:
1.1.1.6 ! root 625: dnl Special case hack for BSD: try to use the Linux joystick.c.
! 626:
! 627: if [[ "x$HAVE_MACHINE_JOYSTICK_H" = "xyes" ]]; then
! 628: AC_TRY_COMPILE([#include <machine/joystick.h>],[{ struct joystick a; }],
! 629: OD_JOYSTICK=$abssrcdir/src/od-linux/joystick.c,)
! 630: fi
! 631:
1.1.1.4 root 632: dnl X86.S needs to know whether it needs to add underscores to symbols.
633: dnl This might break some obscure systems which don't have ELF but don't
634: dnl add underscores either.
1.1 root 635:
1.1.1.6 ! root 636: AC_MSG_CHECKING(for GAS .p2align feature)
! 637: cat >conftest.S << EOF
! 638: .text
! 639: .p2align 5
1.1 root 640: EOF
1.1.1.6 ! root 641: if $CC conftest.S -c -o conftest.o >/dev/null 2>&1 ; then HAVEGAS=yes; fi
! 642: AC_MSG_RESULT($HAVEGAS)
1.1.1.4 root 643:
1.1.1.6 ! root 644: AC_MSG_CHECKING(whether assembler symbols need an underscore)
! 645: cat >conftest1.S << EOF
! 646: .text
! 647: .globl _symbol
! 648: _symbol:
! 649: EOF
! 650: cat >conftest2.c << EOF
! 651: extern void symbol ();
! 652: int main ()
! 653: {
! 654: symbol ();
! 655: }
! 656: EOF
! 657: $CC conftest1.S -c -o conftest1.o >/dev/null 2>&1
! 658: $CC conftest2.c -c -o conftest2.o >/dev/null 2>&1
! 659: if $CC conftest1.o conftest2.o -o conftest >/dev/null 2>&1; then
! 660: USE_UNDERSCORE=yes
! 661: CFLAGS="$CFLAGS -DUSE_UNDERSCORE"
1.1.1.4 root 662: else
1.1.1.6 ! root 663: USE_UNDERSCORE=no
1.1.1.4 root 664: fi
1.1.1.6 ! root 665: AC_MSG_RESULT($USE_UNDERSCORE)
1.1.1.4 root 666:
667: rm -f conftest*
668:
669: AC_ARG_ENABLE(threads,[ --enable-threads Enable filesystem thread support],[USE_THREADS=$enableval],[])
670: AC_ARG_ENABLE(penguins,[ --enable-penguins Enable threads that only make sense on SMP machines],[USE_PENGUINS=$enableval],[])
671:
672: if [[ "x$NEED_THREAD_SUPPORT" = "xyes" ]]; then
673: if [[ "x$USE_THREADS" != "xyes" -a "x$USE_PENGUINS" != "xyes" ]]; then
674: echo "The gtk+ GUI needs threads; enabling thread support."
675: fi
676: fi
677:
678: if [[ "x$USE_THREADS" = "xyes" -o "x$USE_PENGUINS" = "xyes" -o "x$NEED_THREAD_SUPPORT" = "xyes" ]]; then
679: if [[ "x$HAVE_PTHREAD_LIB" = "xyes" ]]; then
680: THREADDEP=td-posix
681: CFLAGS="$CFLAGS -DSUPPORT_THREADS -D_REENTRANT"
682: LIBS="$LIBS -lpthread"
683: if [[ "x$HAVE_POSIX4_LIB" = "xyes" ]]; then
684: LIBS="$LIBS -lposix4"
685: fi
686:
687: if [[ "x$USE_THREADS" = "xyes" ]]; then
688: CFLAGS="$CFLAGS -DUAE_FILESYS_THREADS"
689: fi
690: if [[ "x$USE_PENGUINS" = "xyes" ]]; then
691: CFLAGS="$CFLAGS -DSUPPORT_PENGUINS"
692: fi
693:
694: if [[ "x$HAVELINUX" = "xno" -o "x$HAVEGLIBC2" = "xno" ]]; then
1.1.1.6 ! root 695: echo "Thread support has only been tested on Linux systems with glibc-2.0"
1.1.1.4 root 696: NR_WARNINGS=`expr $NR_WARNINGS + 1`
697: fi
698: if [[ "x$TARGET" = "xsvgalib" ]]; then
699: echo "If you didn't compile a fixed version of SVGAlib then thread support"
700: echo "in UAE will lock your machine real hard."
701: NR_WARNINGS=`expr $NR_WARNINGS + 1`
702: fi
1.1 root 703: else
1.1.1.4 root 704: echo "You tried to enable threads, but I couldn't find a thread library!"
705: NR_ERRORS=`expr $NR_ERRORS + 1`
1.1 root 706: fi
1.1.1.3 root 707: fi
708:
1.1.1.4 root 709: dnl See if we have something better than GCC 2.7.
710:
711: if [[ "x$HAVEGCC27" = "xyes" -a "x$HAVEI386" = "xyes" ]]; then
712: SAVECFLAGS=$CFLAGS
713: CFLAGS="$CFLAGS -mno-schedule-prologue"
714: AC_TRY_COMPILE(,int main(){return 0;}, NO_SCHED_CFLAGS="-mno-schedule-prologue")
715: CFLAGS=$SAVECFLAGS
716: fi
717:
718: dnl If GCC supports exceptions, we don't want them.
719:
720: if [[ "x$HAVEGCC27" = "xyes" -a "x$HAVEI386" = "xyes" ]]; then
721: SAVECFLAGS=$CFLAGS
722: CFLAGS="$CFLAGS -fno-exceptions"
723: NOEXCEPTIONS=no
724: AC_TRY_COMPILE(,int main(){return 0;}, NOEXCEPTIONS=yes)
725: if [[ "x$NOEXCEPTIONS" = "xno" ]]; then
726: CFLAGS=$SAVECFLAGS
727: fi
728: fi
729:
730:
1.1.1.3 root 731: dnl Set up the link to the appropriate machdep directory and select something
732: dnl for the REGPARAM define.
733:
1.1.1.4 root 734: if [[ "x$HAVEGCC27" = "xyes" -a "x$HAVEI386" = "xyes" -a "x$DO_PROFILING" = "xno" ]]; then
735: MACHDEP=md-i386-gcc
736: dnl strength-reduce is turned off not because of paranoia, but because it
737: dnl actually makes the code worse in some cases on the i386 (generates too
738: dnl many registers, which all end up on the stack).
1.1.1.6 ! root 739: CFLAGS="$CFLAGS -DUNALIGNED_PROFITABLE -fno-strength-reduce -DREGPARAM=\"__attribute__((regparm(3)))\""
! 740:
! 741: if [[ "x$HAVEGAS" = "xyes" ]]; then
! 742: CFLAGS="$CFLAGS -DX86_ASSEMBLY"
! 743: ASMOBJS=md-X86.o
! 744:
! 745: CPUOBJS=cpufast.o
! 746: P2C=p2c_x86.o
! 747: fi
! 748: else if test $uae_cv_prog_cc_watcom = yes; then
! 749: MACHDEP=md-i386-watcom
! 750: echo CFLAGS before: $CFLAGS
! 751: CFLAGS=`echo $CFLAGS | sed 's, -g , ,' |sed 's,^-g ,,'`
! 752: CFLAGS="$CFLAGS --/--bm --/--mf --/--w4 --/--s --/--ei --/--zp4 --/--5r"
! 753: CFLAGS="$CFLAGS --/--oe=50 --/--oi --/--ok --/--ol --/--ot --/--oh --/--or --/--zq"
! 754: CFLAGS="$CFLAGS -DREGPARAM= -DUNALIGNED_PROFITABLE"
! 755: echo CFLAGS after: $CFLAGS
1.1.1.4 root 756: else if [[ "x$TARGET" = "xp_os" ]]; then
757: CPU=`uname -m`
758: if [[ "x$CPU" = "xm68k" ]]; then
759: MACHDEP=md-68k
760: CFLAGS="$CFLAGS -DREGPARAM=\"__attribute__((regparm(4)))\" -DM68K_FLAG_OPT=1"
761: else if [[ "x$CPU" = "xppc" ]]; then
762: MACHDEP=md-ppc
763: CFLAGS="$CFLAGS -DREGPARAM="
764: else if [[ "x$CPU" = "xi386" ]]; then
765: dnl Sam, I don't think we can get here.
766: MACHDEP=md-i386-gcc
767: CFLAGS="$CFLAGS -DX86_ASSEMBLY -fno-strength-reduce -DREGPARAM=\"__attribute__((regparm(3)))\""
768: else
769: echo "Unsupported CPU: $CPU!"
770: exit 5
771: fi
772: fi
773: fi
774: CFLAGS="$CFLAGS -nostdinc -I/gg/include -I/p/../inc -D__POS__"
775: OSDEP=od-pos
776: CPUOBJS="cpufast.o"
777: else if [[ "x$HAVEGCC27" = "xyes" -a "x$HAVE68K" = "xyes" -a "x$TARGET" = "xamigaos" ]]; then
778: MACHDEP=md-68k
779: OSDEP=od-amiga
1.1.1.6 ! root 780: CFLAGS="$CFLAGS -DUNALIGNED_PROFITABLE -DREGPARAM=\"__attribute__((regparm(4)))\" -DM68K_FLAG_OPT=1"
! 781: CPUOBJS="cpufast1.o cpufast2.o cpufast3.o cpufast4.o cpufast5.o cpufast6.o cpufast7.o cpufast8.o"
1.1.1.4 root 782: else if [[ "x$TARGET" = "xamigaos" ]]; then
1.1.1.6 ! root 783: dnl sam: amigaos without gcc
1.1.1.4 root 784: MACHDEP=md-generic
785: OSDEP=od-amiga
1.1.1.6 ! root 786: CFLAGS="$CFLAGS -O -DREGPARAM="
! 787: CPUOBJS="cpuemu1.o cpuemu2.o cpuemu3.o cpuemu4.o cpuemu5.o cpuemu6.o cpuemu7.o cpuemu8.o"
1.1.1.4 root 788: else if [[ "x$HAVEGCC27" = "xyes" -a "x$HAVE68K" = "xyes" -a "x$DO_PROFILING" = "xno" ]]; then
789: dnl sam: This is for linux 68k (REGPARAM is not used under linux)
790: MACHDEP=md-68k
791: CFLAGS="$CFLAGS -DM68K_FLAG_OPT=1 -DREGPARAM="
792: CPUOBJS="cpufast.o"
793: else if [[ "x$TARGET" = "xbeos" ]]; then
794: MACHDEP=md-ppc
795: CFLAGS="$CFLAGS -DREGPARAM="
796: OSDEP=od-beos
1.1 root 797: else
1.1.1.3 root 798: CFLAGS="$CFLAGS -DREGPARAM="
799: fi
800: fi
1.1 root 801: fi
1.1.1.4 root 802: fi
803: fi
804: fi
1.1.1.6 ! root 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:
848: AC_MSG_CHECKING(which sound system to use)
849: AC_ARG_ENABLE(sound,[ --enable-sound Enable sound support],[USE_SOUND=$enableval],[])
850: AC_ARG_ENABLE(file-sound,[ --enable-file-sound Enable sound output to file],[USE_FILE_SOUND=$enableval],[])
851:
852: if [[ "x$USE_FILE_SOUND" = "xyes" ]]; then
853: USE_SOUND=yes
854: fi
855:
856: if [[ "x$USE_SOUND" = "xno" ]]; then
857: AC_MSG_RESULT(sound not enabled)
858: else
859: if [[ "x$USE_FILE_SOUND" = "xyes" ]]; then
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
866: USE_SOUND=yes
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
1.1.1.6 ! root 874: LIBS="$LIBS -lAF"
! 875: USE_SOUND=yes
! 876: else if [[ "x$HAVE_MME_LIB" = "xyes" ]]; then
! 877: AC_MSG_RESULT(MME sound)
! 878: SOUNDDEP=sd-mme
! 879: LIBS="$LIBS -lmme"
1.1.1.4 root 880: USE_SOUND=yes
881: else if [[ "x$TARGET" = "xp_os" ]]; then
882: AC_MSG_RESULT(pAudio.device)
883: SOUNDDEP=od-pos
884: USE_SOUND=yes
885: else if [[ "x$TARGET" = "xamigaos" ]]; then
1.1.1.6 ! root 886: if [[ "x$ac_cv_header_devices_ahi_h" = "xyes" ]]; then
! 887: AC_MSG_RESULT(Amiga AHI.device)
! 888: else
! 889: AC_MSG_RESULT(Amiga audio.device)
! 890: fi
1.1.1.4 root 891: SOUNDDEP=od-amiga
892: USE_SOUND=yes
893: else if [[ "x$TARGET" = "xbeos" ]]; then
894: AC_MSG_RESULT(BeOS sound)
895: SOUNDDEP=od-beos
896: USE_SOUND=yes
1.1.1.6 ! root 897: else if [[ "x$TARGET" = "xwin32" ]]; then
! 898: AC_MSG_RESULT(Win32 sound)
! 899: SOUNDDEP=od-win32
! 900: USE_SOUND=yes
1.1.1.4 root 901: else
902: echo "no known sound system found"
903: NR_ERRORS=`expr $NR_ERRORS + 1`
904: fi
905: fi
906: fi
907: fi
908: fi
909: fi
910: fi
1.1.1.6 ! root 911: fi
! 912: fi
1.1.1.4 root 913: fi
914:
915: rm -f src/machdep
916: rm -f src/osdep
917: rm -f src/threaddep
918: rm -f src/sounddep
919: rm -f src/target.h
1.1.1.5 root 920: rm -f src/config.h
1.1.1.6 ! root 921: rm -f src/sd-sound.c
! 922: rm -f src/od-joy.c
! 923: rm -f src/md-support.c
! 924: rm -f src/md-X86.S
1.1.1.3 root 925:
1.1.1.4 root 926: if [[ "x$TARGET" = "xamigaos" -o "x$TARGET" = "xp_os" ]]; then
1.1.1.3 root 927: dnl Determine the cpu-type
928: AC_MSG_CHECKING(which CPU to use)
929: cpu=`cpu | cut -d' ' -f2`
930: AC_MSG_RESULT($cpu)
931: CFLAGS="$CFLAGS -m$cpu"
932:
933: dnl Is that correct for the fpu ?
934: AC_MSG_CHECKING(which FPU to use)
1.1.1.4 root 935: fpu=`cpu | cut -d' ' -f3 | grep '^6888[12]$'`
936: if [[ "x$fpu" != "x" ]]; then
937: dnl gcc only knows about 68881
938: AC_MSG_RESULT(68881)
939: CFLAGS="$CFLAGS -m68881"
1.1.1.3 root 940: else
941: AC_MSG_RESULT(none)
942: fi
943: fi
1.1.1.4 root 944:
1.1 root 945: AC_SUBST(ac_cv_c_inline)
1.1.1.6 ! root 946: AC_SUBST(WRC)
1.1.1.4 root 947: AC_SUBST(NO_SCHED_CFLAGS)
1.1 root 948: AC_SUBST(LIBRARIES)
949: AC_SUBST(TARGET)
950: AC_SUBST(GFXOBJS)
1.1.1.6 ! root 951: AC_SUBST(RESOBJS)
1.1 root 952: AC_SUBST(ASMOBJS)
1.1.1.6 ! root 953: AC_SUBST(P2C)
1.1.1.2 root 954: AC_SUBST(CPUOBJS)
1.1.1.3 root 955: AC_SUBST(DEBUGOBJS)
1.1.1.2 root 956: AC_SUBST(SET_MAKE)
1.1.1.3 root 957: AC_SUBST(MATHLIB)
1.1.1.4 root 958: AC_SUBST(SHM_SUPPORT_LINKS)
959:
1.1.1.3 root 960: AC_SUBST(top_srcdir)
1.1 root 961:
1.1.1.2 root 962: AC_OUTPUT(src/Makefile Makefile)
1.1.1.4 root 963: if [[ "x$DO_PROFILING" = "xyes" ]]; then
1.1.1.3 root 964: echo "Building a profiling version of UAE (select this option only if you know"
965: echo "what you are doing)"
966: fi
1.1.1.4 root 967:
968: dnl Create some more links and files.
969:
970: dnl We removed those from the build directory above, so if the source
971: dnl directory still has them, something is fairly wrong.
972:
973: dnl This doesn't work with Solaris /bin/sh, neither do all the alternatives I
1.1.1.6 ! root 974: dnl tried. It doesn't seem to cause a failure either, though.
1.1.1.4 root 975:
1.1.1.6 ! root 976: if (test -e $abssrcdir/src/sounddep) || (test -e $abssrcdir/src/machdep) \
! 977: || (test -e $abssrcdir/src/osdep) || (test -e $abssrcdir/src/threaddep) \
! 978: || (test -e $abssrcdir/src/target.h)
! 979: then
! 980: echo
! 981: echo "Fatal error: Can't configure in the current directory, because"
! 982: echo "configure was run in the source directory. Go to the source"
! 983: echo "directory, type"
! 984: echo " make streifenfrei"
! 985: echo "and try again."
! 986: exit 1
! 987: fi
1.1.1.4 root 988:
989: ln -s $abssrcdir/src/$MACHDEP src/machdep
990: ln -s $abssrcdir/src/$OSDEP src/osdep
991: ln -s $abssrcdir/src/$THREADDEP src/threaddep
992: ln -s $abssrcdir/src/$SOUNDDEP src/sounddep
993: ln -s $abssrcdir/src/targets/$TARGETDEP src/target.h
1.1.1.5 root 994: ln -s $abssrcdir/config.h src/config.h
1.1.1.4 root 995:
1.1.1.6 ! root 996:
! 997: ln -s $SD_SOUND src/sd-sound.c
! 998: ln -s $OD_JOYSTICK src/od-joy.c
! 999: ln -s $MD_SUPPORT src/md-support.c
! 1000:
! 1001: if [[ "x$MACHDEP" = "xmd-i386-gcc" ]]; then
! 1002: ln -s machdep/X86.S src/md-X86.S
! 1003: fi
! 1004:
! 1005:
1.1.1.4 root 1006: echo
1007: echo
1008: if [[ "x$NR_ERRORS" = "x0" ]]; then
1009: if [[ "x$NR_WARNINGS" = "x0" ]]; then
1010: echo "Configuration was successful!"
1011: else
1012: echo "There were $NR_WARNINGS warnings. That is usually harmless, but read the output"
1013: echo "from configure carefully if you run into problems."
1014: fi
1015: else
1016: echo "There were $NR_ERRORS errors. UAE may still build and run cleanly, but you may"
1017: echo "not get all the features you asked for."
1018: fi
1019: echo
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.