Annotation of uae/configure.in, revision 1.1.1.19

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

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.