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