Annotation of uae/configure.in, revision 1.1.1.16

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

unix.superglobalmegacorp.com

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