Annotation of uae/configure.in, revision 1.1.1.1

1.1       root        1: dnl Process this file with autoconf to produce a configure script.
                      2: dnl Do not use autoconf-2.8 or autoconf-2.9, these versions have a serious
                      3: dnl bug.
                      4: AC_INIT(amiga/transdisk.c)
                      5: 
                      6: dnl Checks for programs.
                      7: AC_PROG_CC
                      8: 
                      9: AC_PROG_CPP
                     10: AC_PROG_MAKE_SET
                     11: 
                     12: AC_AIX
                     13: AC_ISC_POSIX
                     14: 
                     15: dnl Checks for libraries.
                     16: HAVE_BEBOX=n
                     17: dnl Replace `main' with a function in -lMedia_s: (Ian!)
                     18: AC_CHECK_LIB(Media_s, main, HAVE_MEDIA_LIB=y, HAVE_MEDIA_LIB=n)
                     19: dnl Replace `main' with a function in -lNeXT_s:
                     20: AC_CHECK_LIB(NeXT_s, main, HAVE_NEXT_LIB=y, HAVE_NEXT_LIB=n)
                     21: AC_CHECK_LIB(vga, vga_setmode, HAVE_SVGA_LIB=y, HAVE_SVGA_LIB=n)
                     22: AC_CHECK_LIB(AF, AFOpenAudioConn, HAVE_AF_LIB=y, HAVE_AF_LIB=n)
                     23: 
                     24: AC_PATH_XTRA
                     25: AC_CONFIG_HEADER(sysconfig.h)
                     26: 
                     27: AC_HEADER_DIRENT
                     28: AC_HEADER_STDC
                     29: AC_CHECK_HEADERS(unistd.h fcntl.h sys/time.h sys/types.h utime.h string.h strings.h values.h)
                     30: AC_CHECK_HEADERS(sys/vfs.h sys/mount.h sys/param.h sys/statfs.h sys/statvfs.h sys/stat.h linux/joystick.h)
                     31: 
                     32: if [[ $ac_cv_header_linux_joystick_h = "yes" ]]; then
                     33:   AC_MSG_CHECKING(whether linux/joystick.h is broken)
                     34:   if grep "#include" /usr/include/linux/joystick.h >/dev/null; then
                     35:     AC_MSG_RESULT(yes)
                     36:     BROKEN_JOYSTICK_H=1
                     37:     grep -v "#include" /usr/include/linux/joystick.h >include/joystick.h
                     38:   else
                     39:     AC_MSG_RESULT(no)
                     40:     BROKEN_JOYSTICK_H=0
                     41:   fi
                     42: fi
                     43: 
                     44: AC_CHECK_SIZEOF(char)
                     45: AC_CHECK_SIZEOF(short)
                     46: AC_CHECK_SIZEOF(int)
                     47: AC_CHECK_SIZEOF(long)
                     48: AC_CHECK_SIZEOF(long long)
                     49: 
                     50: dnl Checks for typedefs, structures, and compiler characteristics.
                     51: AC_C_CONST
                     52: AC_C_INLINE
                     53: AC_TYPE_MODE_T
                     54: AC_TYPE_OFF_T
                     55: AC_TYPE_PID_T
                     56: AC_STRUCT_ST_BLOCKS
                     57: AC_HEADER_TIME
                     58: AC_STRUCT_TM
                     59: 
                     60: dnl Checks for library functions.
                     61: AC_PROG_GCC_TRADITIONAL
                     62: AC_FUNC_MEMCMP
                     63: AC_TYPE_SIGNAL
                     64: AC_FUNC_UTIME_NULL
                     65: AC_CHECK_FUNCS(gettimeofday mkdir rmdir select strerror strstr statfs)
                     66: 
                     67: AC_MSG_CHECKING(how many args statfs takes)
                     68: if [[ $ac_cv_func_statfs = "yes" ]]; then
                     69:   AC_TRY_COMPILE([
                     70: #include "confdefs.h"
                     71: #ifdef HAVE_SYS_MOUNT_H
                     72: #include <sys/mount.h>
                     73: #endif
                     74: #ifdef HAVE_SYS_VFS_H
                     75: #include <sys/vfs.h>
                     76: #endif
                     77: #ifdef HAVE_SYS_PARAM_H
                     78: #include <sys/param.h>
                     79: #endif
                     80: #ifdef HAVE_SYS_STATFS_H
                     81: #include <sys/statfs.h>
                     82: #endif
                     83: #ifdef HAVE_SYS_STATVFS_H
                     84: #include <sys/statvfs.h>
                     85: #endif],[struct statfs statbuf;statfs("/",&statbuf);],
                     86: AC_MSG_RESULT(2) 
                     87: STATFS_NO_ARGS=2,
                     88: AC_MSG_RESULT(4)
                     89: STATFS_NO_ARGS=4)
                     90: fi
                     91: 
                     92: AC_MSG_CHECKING(whether to use f_bavail or f_bfree)
                     93: if [[ $ac_cv_func_statfs = "yes" ]]; then
                     94:   AC_TRY_COMPILE([
                     95: #include "confdefs.h"
                     96: #ifdef HAVE_SYS_MOUNT_H
                     97: #include <sys/mount.h>
                     98: #endif
                     99: #ifdef HAVE_SYS_VFS_H
                    100: #include <sys/vfs.h>
                    101: #endif
                    102: #ifdef HAVE_SYS_PARAM_H
                    103: #include <sys/param.h>
                    104: #endif
                    105: #ifdef HAVE_SYS_STATFS_H
                    106: #include <sys/statfs.h>
                    107: #endif
                    108: #ifdef HAVE_SYS_STATVFS_H
                    109: #include <sys/statvfs.h>
                    110: #endif],[struct statfs statbuf;statbuf.f_bavail;],
                    111: AC_MSG_RESULT(f_bavail) 
                    112: STATBUF_BAVAIL=f_bavail,
                    113: AC_MSG_RESULT(f_bfree)
                    114: STATBUF_BAVAIL=f_bfree)
                    115: fi
                    116: 
                    117: AC_MSG_CHECKING(which target to use)
                    118: if [[ $HAVE_BEBOX = "y" ]]; then
                    119:   AC_MSG_RESULT(BeBox)
                    120:   TARGET=be
                    121:   GFXOBJS="bebox.o nogui.o"
                    122:   ac_cv_c_inline=
                    123: else
                    124:   if [[ $HAVE_NEXT_LIB = "y" ]]; then
                    125:     AC_MSG_RESULT(NeXTStep)
                    126:     TARGET=next
                    127:     GFXOBJS="NeXTwin.o"
                    128:     LIBRARIES="-sectcreate __ICON __header Uae.app/Uae.iconheader -segprot __ICON r r -sectcreate __ICON app Uae.app/Uae.tiff -lMedia_s -lNeXT_s"
                    129:   else
                    130:     if [[ x$no_x = "xyes" ]]; then
                    131:       if [[ $HAVE_SVGA_LIB = "n" ]]; then
                    132:         AC_MSG_RESULT(Ummm....)
                    133:         echo "Neither X nor SVGAlib found, don't know what target to use."
                    134:        exit 1
                    135:       else
                    136:         AC_MSG_RESULT(SVGAlib)
                    137:         TARGET=svgalib
                    138:        GFXOBJS="svga.o nogui.o"
                    139:        LIBRARIES=-lvga
                    140:       fi
                    141:     else
                    142:       AC_MSG_RESULT(X Window System)
                    143:       TARGET=x11
                    144:       LIBRARIES="$X_LIBS $X_PRE_LIBS -lXext -lX11 $X_EXTRA_LIBS"
                    145:       AC_CHECK_PROG(TCLGUI,wish4.0,yes,no)
                    146:       if [[ $TCLGUI = "yes" ]]; then
                    147:         GFXOBJS="xwin.o xui.o"
                    148:       else
                    149:         GFXOBJS="xwin.o nogui.o"
                    150:       fi
                    151:     fi
                    152:   fi
                    153: fi
                    154: 
                    155: ASMOBJS=
                    156: 
                    157: dnl It may be possible to use X86.S on other systems, too, but then again, it
                    158: dnl might break. Check for a system that is known to work.
                    159: dnl Gustavo says it works on linuxaout, too. We'll try this later.
                    160: 
                    161: if [[ "$CC" = "gcc" ]]; then
                    162:   CFLAGS="-O3 -fomit-frame-pointer -Wall -Wno-unused -Wno-format -W -Wmissing-prototypes -Wstrict-prototypes"
                    163:   AC_MSG_CHECKING(whether we are on a Linux/i386 ELF system)
                    164:   LINUXELF=n
                    165:   if MACHINE=`uname -a 2>/dev/null`; then
                    166:     cat >conftest.c << EOF
                    167: int main() { return 0; }
                    168: EOF
                    169:     case $MACHINE in
                    170:     Linux*i*86)
                    171:       gcc conftest.c -o conftest
                    172:       file conftest >conftest.file
                    173:       if grep ELF conftest.file >/dev/null; then
                    174:         LINUXELF=y
                    175:       fi
                    176:       ;;
                    177:     esac
                    178:     rm -f conftest*
                    179:   fi
                    180:   if [[ $LINUXELF = "n" ]]; then
                    181:     AC_MSG_RESULT(no)
                    182:   else
                    183:     AC_MSG_RESULT(yes)
                    184:     ASMOBJS=X86.o
                    185:     CFLAGS="$CFLAGS -DX86_ASSEMBLY"
                    186:   fi
                    187: else
                    188:   echo "Couldn't find GCC. UAE may or may not compile and run correctly."
                    189: fi
                    190: 
                    191: AC_SUBST(ac_cv_c_inline)
                    192: AC_SUBST(STATFS_NO_ARGS)
                    193: AC_SUBST(BROKEN_JOYSTICK_H)
                    194: AC_SUBST(STATBUF_BAVAIL)
                    195: AC_SUBST(LIBRARIES)
                    196: AC_SUBST(TARGET)
                    197: AC_SUBST(GFXOBJS)
                    198: AC_SUBST(ASMOBJS)
                    199: 
                    200: AC_OUTPUT(Makefile)

unix.superglobalmegacorp.com

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