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