Annotation of tme/configure.in, revision 1.1.1.3

1.1       root        1: dnl Process this file with autoconf to produce a configure script.
                      2: 
1.1.1.3 ! root        3: dnl $Id: configure.in,v 1.16 2005/05/15 01:24:11 fredette Exp $
1.1       root        4: 
                      5: dnl Copyright (c) 2001, 2003 Matt Fredette
                      6: dnl All rights reserved.
                      7: dnl
                      8: dnl Redistribution and use in source and binary forms, with or without
                      9: dnl modification, are permitted provided that the following conditions
                     10: dnl are met:
                     11: dnl 1. Redistributions of source code must retain the above copyright
                     12: dnl    notice, this list of conditions and the following disclaimer.
                     13: dnl 2. Redistributions in binary form must reproduce the above copyright
                     14: dnl    notice, this list of conditions and the following disclaimer in the
                     15: dnl    documentation and/or other materials provided with the distribution.
                     16: dnl 3. All advertising materials mentioning features or use of this software
                     17: dnl    must display the following acknowledgement:
                     18: dnl      This product includes software developed by Matt Fredette.
                     19: dnl 4. The name of the author may not be used to endorse or promote products
                     20: dnl    derived from this software without specific prior written permission.
                     21: dnl
                     22: dnl THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
                     23: dnl IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
                     24: dnl WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
                     25: dnl DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
                     26: dnl INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
                     27: dnl (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
                     28: dnl SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
                     29: dnl HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
                     30: dnl STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
                     31: dnl ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
                     32: dnl POSSIBILITY OF SUCH DAMAGE.
                     33: 
                     34: dnl Checks that we are given a good source directory.
                     35: AC_INIT(ic/m68k/m68k-impl.h)
                     36: AC_CANONICAL_SYSTEM
1.1.1.3 ! root       37: AM_INIT_AUTOMAKE(tme, 0.4)
1.1       root       38: 
                     39: dnl Write configuration out to config.h through config.h.in.
                     40: AM_CONFIG_HEADER(config.h)
                     41: 
                     42: dnl Checks for programs.
                     43: AC_PROG_CC
                     44: AC_PROG_CPP
                     45: AC_PROG_YACC
                     46: AC_PROG_INSTALL
                     47: AC_PROG_MAKE_SET
                     48: 
                     49: dnl Checks for header files.
                     50: AC_HEADER_STDC
1.1.1.3 ! root       51: AC_CHECK_HEADERS(unistd.h stdio.h memory.h stdarg.h limits.h float.h)
1.1       root       52: AC_CHECK_HEADERS(sys/ioctl.h sys/sockio.h sys/socketio.h net/if_dl.h ioctls.h)
1.1.1.3 ! root       53: AC_CHECK_HEADERS(sys/bswap.h)
1.1       root       54: 
                     55: dnl Checks for typedefs, structures, and compiler characteristics.
                     56: AC_C_BIGENDIAN
                     57: AC_C_CONST
                     58: AC_C_INLINE
1.1.1.3 ! root       59: AC_C_VOLATILE
        !            60: AC_C_LONG_DOUBLE
1.1.1.2   root       61: AC_TYPE_SIZE_T
1.1.1.3 ! root       62: AC_TYPE_SIGNAL
1.1       root       63: AC_CHECK_SIZEOF(long, 4)
                     64: AC_CHECK_SIZEOF(int, 4)
                     65: AC_CHECK_SIZEOF(short, 2)
1.1.1.3 ! root       66: AC_CHECK_SIZEOF(float, 4)
        !            67: AC_CHECK_SIZEOF(double, 8)
        !            68: if test $ac_cv_c_long_double = yes; then
        !            69:   AC_CHECK_SIZEOF(long double, 12)
        !            70: fi
1.1       root       71: if test $ac_cv_sizeof_int != 4 && test $ac_cv_sizeof_long != 4; then
                     72:   AC_MSG_ERROR([can't find a 32-bit type])
                     73: fi
                     74: if test $ac_cv_sizeof_int != 2 && test $ac_cv_sizeof_short != 2; then
                     75:   AC_MSG_ERROR([can't find a 16-bit type])
                     76: fi
                     77: AC_CHECK_ALIGNOF(32)
                     78: AC_CHECK_ALIGNOF(16)
                     79: AC_CHECK_SHIFTMAX(8)
                     80: AC_CHECK_SHIFTMAX(16)
                     81: AC_CHECK_SHIFTMAX(32)
1.1.1.3 ! root       82: AC_CHECK_SHIFTSIGNED(8)
        !            83: AC_CHECK_SHIFTSIGNED(16)
        !            84: AC_CHECK_SHIFTSIGNED(32)
        !            85: AC_CHECK_FLOAT_FORMAT(float)
        !            86: AC_CHECK_FLOAT_LIMITS(float, FLT_MAX/FLT_MIN)
        !            87: AC_CHECK_FLOAT_FORMAT(double)
        !            88: AC_CHECK_FLOAT_LIMITS(double, DBL_MAX/DBL_MIN)
        !            89: if test $ac_cv_c_long_double = yes; then
        !            90:   AC_CHECK_FLOAT_FORMAT(long double)
        !            91:   AC_CHECK_FLOAT_LIMITS(long double, LDBL_MAX/LDBL_MIN)
        !            92: fi
1.1       root       93: AC_SYS_SOCKADDR_SA_LEN
                     94: 
                     95: dnl Checks for library functions and prototypes.
                     96: AC_PROG_GCC_TRADITIONAL
                     97: AC_FUNC_MEMCMP
                     98: AC_FUNC_MMAP
1.1.1.3 ! root       99: AC_CHECK_FUNC_LONG(bswap16, [
        !           100:   unsigned int x;
        !           101: 
        !           102:   x = bswap16(0x1122);
        !           103: ], [ 
        !           104: #ifdef HAVE_SYS_BSWAP_H
        !           105: #include <sys/bswap.h>
        !           106: #endif
        !           107: ])
        !           108: AC_CHECK_FUNC_LONG(bswap32, [
        !           109:   unsigned int x;
        !           110: 
        !           111:   x = bswap32(0x11223344);
        !           112: ], [ 
        !           113: #ifdef HAVE_SYS_BSWAP_H
        !           114: #include <sys/bswap.h>
        !           115: #endif
        !           116: ])
        !           117: AC_CHECK_FUNC_LONG(isinff, 
        !           118: [
        !           119:   float x;
        !           120:   int y;
        !           121: 
        !           122:   x = 1;
        !           123:   y = isinff(x);
        !           124: ], [
        !           125: #include <math.h>
        !           126: ], -lm)
1.1       root      127: 
                    128: dnl Checks for perl.
                    129: AC_PATH_PROGS(PERL, perl4.036 perl4 perl perl5, no)
                    130: AC_SUBST(PERL)
                    131: 
1.1.1.2   root      132: dnl Start the list of host support.
                    133: TME_HOSTS="posix"
                    134: 
1.1       root      135: dnl Checks for AF_LINK.
                    136: AC_MSG_CHECKING([for AF_LINK support])
                    137: AC_EGREP_CPP(_tme_has_af_link,
                    138: [
                    139: #include <sys/socket.h>
                    140: #ifdef AF_LINK
                    141: _tme_has_af_link
                    142: #endif
                    143: ], [ 
                    144: AC_MSG_RESULT(yes)
                    145: AC_DEFINE(HAVE_AF_LINK, [], [Define if you have AF_LINK.])
                    146: ], [
                    147: AC_MSG_RESULT(no)
                    148: ])
                    149: 
                    150: dnl Checks for BPF.
                    151: tme_raw_type=
1.1.1.2   root      152: AC_CHECK_HEADER(net/bpf.h, 
                    153: [AC_EGREP_CPP(found_BIOCSHDRCMPLT, 
                    154: [#include <net/bpf.h>
                    155: #ifdef BIOCSHDRCMPLT
                    156: found_BIOCSHDRCMPLT
                    157: #endif
                    158: ], [tme_raw_type=bpf])])
1.1       root      159: AC_MSG_CHECKING([for raw Ethernet access method])
1.1.1.2   root      160: case "x$tme_raw_type" in
                    161: xbpf) TME_HOSTS="${TME_HOSTS} bsd" ;;
                    162: x) tme_raw_type=none ;;
                    163: esac
1.1       root      164: AC_MSG_RESULT($tme_raw_type)
                    165: 
1.1.1.2   root      166: dnl Checks for X11.
                    167: AC_PATH_XTRA
                    168: 
                    169: dnl Checks for GTK.
                    170: AM_PATH_GTK([], have_gtk=true, have_gtk=false)
                    171: if $have_gtk; then
                    172:   AC_DEFINE(HAVE_GTK, [], [Define if you are compiling with GTK.])
                    173:   TME_HOSTS="${TME_HOSTS} gtk"
                    174: fi
                    175: 
                    176: dnl Characterize any graphics displays and remember the areas of
                    177: dnl the smallest and largest screens.
                    178: TME_FB_XLAT_DST=
                    179: area_smallest=0
                    180: area_largest=0
                    181: 
1.1.1.3 ! root      182: # if --with-tme-host-displays is given, characterize those given displays:
        !           183: AC_ARG_WITH(tme-host-displays,
        !           184: [  --with-tme-host-displays=DISPLAYS  support host displays with these display formats])
        !           185: for dst_key in ${with_tme_host_displays}; do
1.1.1.2   root      186: 
                    187:   dnl Make brackets safe to use.
                    188:   changequote(<<, >>)dnl
                    189: 
                    190:    this_width=`echo ${dst_key} | sed -e 's/^\([0-9][0-9]*\)x\([0-9][0-9]*\)\(.*\)$/\1/'`
                    191:   this_height=`echo ${dst_key} | sed -e 's/^\([0-9][0-9]*\)x\([0-9][0-9]*\)\(.*\)$/\2/'`
                    192:       dst_key=`echo ${dst_key} | sed -e 's/^\([0-9][0-9]*\)x\([0-9][0-9]*\)\(.*\)$/\3/'`
                    193:   this_area=`expr ${this_width} \* ${this_height}`
                    194: 
                    195:   if test ${area_smallest} = 0 || test `expr ${this_area} \< ${area_smallest}` = 1; then
                    196:     area_smallest=${this_area}
                    197:   fi
                    198:   if test `expr ${this_area} \> ${area_largest}` = 1; then
                    199:     area_largest=${this_area}
                    200:   fi
                    201:   
                    202:   # add in this destination display key:
                    203:   if echo " ${TME_FB_XLAT_DST} " | grep " ${dst_key} " > /dev/null 2>&1; then :; else
                    204:     TME_FB_XLAT_DST="${TME_FB_XLAT_DST} ${dst_key}"
                    205:   fi
                    206: 
                    207:   dnl Make brackets the quote characters again.
                    208:   changequote([, ])dnl
                    209: done
                    210: 
                    211: # if DISPLAY is set and xdpyinfo appears to work, characterize this X display:
                    212: if test "x${DISPLAY}" != x && xdpyinfo >/dev/null 2>&1; then
                    213:   AC_MSG_CHECKING(characteristics of X display ${DISPLAY})
                    214: 
                    215:   dnl Make brackets safe to use.
                    216:   changequote(<<, >>)dnl
                    217: 
                    218:   # get the format this display uses for bitmaps:
                    219:   bitmap_info=`xdpyinfo | grep 'bitmap unit' | sed -e 's/bitmap unit, *bit order, *padding: *\(.*\)$/\1/'`
                    220:   bitmap_order=`echo ${bitmap_info} | sed -e 's/\([0-9][0-9]*\), *\([LM]\)SBFirst, *\([0-9][0-9]*\).*/\2/'`
                    221:     bitmap_pad=`echo ${bitmap_info} | sed -e 's/\([0-9][0-9]*\), *\([LM]\)SBFirst, *\([0-9][0-9]*\).*/\3/'`
                    222:   bitmap_order=`echo ${bitmap_order} | tr A-Z a-z`
                    223: 
1.1.1.3 ! root      224:   # get the format this display uses for images at its default depth.  we
        !           225:   # assume that the root window is at the default depth:
1.1.1.2   root      226:   pixmap_order=`xdpyinfo | grep 'image byte order'`
                    227:   pixmap_order=`echo ${pixmap_order} | sed -e 's/.*image byte order: *\([LM]\)SBFirst.*/\1/' | tr A-Z a-z`
1.1.1.3 ! root      228:   pixmap_depth=`xwininfo -root | grep 'Depth:'`
        !           229:   pixmap_depth=`echo ${pixmap_depth} | sed -e 's/.*Depth: *\([0-9][0-9]*\).*/\1/'`
1.1.1.2   root      230:   pixmap_infos=`xdpyinfo | grep bits_per_pixel | tr '\n' %`
                    231:   save_IFS=$IFS
                    232:   IFS=%
                    233:   for pixmap_info in $pixmap_infos; do
                    234:     IFS=$save_IFS
                    235:     if test "x$pixmap_info" = x; then continue; fi
                    236:     this_pixmap_depth=`echo ${pixmap_info} | sed -e 's/.*depth \([0-9][0-9]*\), *bits_per_pixel \([0-9][0-9]*\), *scanline_pad \([0-9][0-9]*\).*/\1/'`
                    237:      this_pixmap_bipp=`echo ${pixmap_info} | sed -e 's/.*depth \([0-9][0-9]*\), *bits_per_pixel \([0-9][0-9]*\), *scanline_pad \([0-9][0-9]*\).*/\2/'`
                    238:       this_pixmap_pad=`echo ${pixmap_info} | sed -e 's/.*depth \([0-9][0-9]*\), *bits_per_pixel \([0-9][0-9]*\), *scanline_pad \([0-9][0-9]*\).*/\3/'`
1.1.1.3 ! root      239:     if test "x${this_pixmap_depth}" = "x${pixmap_depth}"; then
1.1.1.2   root      240:       pixmap_bipp=${this_pixmap_bipp}
                    241:       pixmap_pad=${this_pixmap_pad}
1.1.1.3 ! root      242:       break
1.1.1.2   root      243:     fi
                    244:   done
                    245:   IFS=$save_IFS
                    246: 
                    247:   # if this display's greatest depth is one, we use its
                    248:   # bitmap format:
1.1.1.3 ! root      249:   if test "x${pixmap_bipp}" = x; then
1.1.1.2   root      250:     pixmap_bipp=1
                    251:     pixmap_pad=${bitmap_pad}
                    252: 
                    253:     # our translation functions can't handle the case when the bitmap
                    254:     # bit order is different from the image byte order - doing so
                    255:     # requires dealing with the bitmap unit size.  since this
                    256:     # situation is rare, just bail:
                    257:     if test ${bitmap_order} != ${pixmap_order}; then
                    258:       changequote([, ])dnl
                    259:       AC_MSG_WARN([the X display ${DISPLAY} is monochrome and needs bitmaps with a bit order that the generic code doesn't support])
                    260:       changequote(<<, >>)dnl
1.1.1.3 ! root      261:       pixmap_bipp=
1.1.1.2   root      262:     fi
                    263:   fi
                    264: 
                    265:   # if this display seems usable:
1.1.1.3 ! root      266:   if test "x${pixmap_bipp}" != x; then
1.1.1.2   root      267: 
                    268:     # check the dimensions of all screens on this display:
                    269:     dimensions=`xdpyinfo | grep dimensions | tr '\n' %`
                    270:     save_IFS=$IFS
                    271:     IFS=%
                    272:     for dimension in $dimensions; do
                    273:       IFS=$save_IFS
                    274:       if test "x$dimension" = x; then continue; fi
                    275:        this_width=`echo ${dimension} | sed -e 's/.*dimensions: *\([0-9][0-9]*\)x\([0-9][0-9]*\).*/\1/'`
                    276:       this_height=`echo ${dimension} | sed -e 's/.*dimensions: *\([0-9][0-9]*\)x\([0-9][0-9]*\).*/\2/'`
                    277:       this_area=`expr ${this_width} \* ${this_height}`
                    278:       if test ${area_smallest} = 0 || test `expr ${this_area} \< ${area_smallest}` = 1; then
                    279:         area_smallest=${this_area}
                    280:       fi
                    281:       if test `expr ${this_area} \> ${area_largest}` = 1; then
                    282:         area_largest=${this_area}
                    283:       fi
                    284:     done
                    285:     IFS=$save_IFS
                    286: 
1.1.1.3 ! root      287:     # assume an unknown set of masks and an unknown mapping type:
        !           288:     dst_masks=_r0x0_g0x0_b0x0
        !           289:     dst_map=
        !           290:     value_visual=", unknown visual"
        !           291: 
        !           292:     # if the depth is greater than one:
        !           293:     if test "x${pixmap_depth}" != 1; then
        !           294: 
        !           295:        # we assume that the root window uses the default visual:
        !           296:        visual=`xwininfo -root | grep 'Visual Class:' | sed -e 's/^  *Visual Class: *\([A-Za-z][A-Za-z]*\).*$/\1/'`
        !           297: 
        !           298:        # get any primary masks for this visual:
        !           299:        case "x${visual}" in
        !           300:        xDirectColor | xTrueColor)
        !           301:            dst_masks=`xdpyinfo | $EGREP '(visual id|class|blue masks):' | $EGREP -C1 $visual | grep 'blue masks' | head -1`
        !           302:            dst_masks=`echo ${dst_masks} | sed -e 's/^.*blue masks:  *\(.*\)/\1/'`
        !           303:            value_visual=", rgb masks ${dst_masks}"
        !           304:            dst_masks=`echo ${dst_masks} | sed -e 's/^/_r/' -e 's/, /_g/' -e 's/, /_b/'`
        !           305:            ;;
        !           306:        xStaticGray | xGrayScale | xStaticColor | xPseudoColor) 
        !           307:            dst_masks=
        !           308:            value_visual=", no subfields"
        !           309:            ;;
        !           310:        *) ;;
        !           311:        esac
        !           312: 
        !           313:        # get the mapping type for this visual:
        !           314:        case "x${visual}" in
        !           315:        xStaticGray | xStaticColor | xPseudoColor)
        !           316:            dst_map="ml"
        !           317:            ;;
        !           318:        xDirectColor)
        !           319:            dst_map="mi"
        !           320:            value_visual="${value_visual}, indexed"
        !           321:            ;;
        !           322:        xGrayScale | xTrueColor)
        !           323:            dst_map="ml"
        !           324:            value_visual="${value_visual}, linear"
        !           325:            ;;
        !           326:        *) ;;
        !           327:        esac
        !           328:     fi
        !           329: 
1.1.1.2   root      330:     dnl Make brackets the quote characters again.
                    331:     changequote([, ])dnl
                    332: 
                    333:     # finish the characterization:
1.1.1.3 ! root      334:     if test "x${pixmap_bipp}" = "x${pixmap_depth}"; then
1.1.1.2   root      335:       value=
                    336:     else
                    337:       value=" (${pixmap_bipp} bits per pixel)"
                    338:     fi
1.1.1.3 ! root      339:     AC_MSG_RESULT([${pixmap_depth}-bit${value} ${pixmap_order}sb-first images with ${pixmap_pad}-bit padding${value_visual}])
        !           340:     dst_key="d${pixmap_depth}b${pixmap_bipp}s0p${pixmap_pad}o${pixmap_order}${dst_map}${dst_masks}"
1.1.1.2   root      341:     
                    342:     # add in this destination display key:
                    343:     if echo " ${TME_FB_XLAT_DST} " | grep " ${dst_key} " > /dev/null 2>&1; then :; else
                    344:       TME_FB_XLAT_DST="${TME_FB_XLAT_DST} ${dst_key}"
                    345:     fi
                    346:   fi
                    347: fi
                    348: AC_SUBST(TME_FB_XLAT_DST)
                    349: 
1.1       root      350: dnl Configures for the system(s) to emulate.
                    351: systems=all
                    352: if echo " ${systems} " | grep ' all ' > /dev/null 2>&1; then
1.1.1.3 ! root      353:   systems="sun2 sun3"
1.1       root      354: fi
                    355: TME_MACHINE_SUBDIRS=
                    356: TME_IC_SUBDIRS=
                    357: TME_ICS=
1.1.1.2   root      358: TME_SERIAL_SUBDIRS=
                    359: TME_SERIALS=
1.1       root      360: TME_BUS_SUBDIRS=
1.1.1.2   root      361: TME_FB_XLAT_SRC=
1.1       root      362: for system in $systems; do
                    363: 
                    364:     # dispatch on the machine type to get more machines, ICs, and
                    365:     # buses to compile:
                    366:     case ${system} in
                    367: 
                    368:     # the sun2:
                    369:     sun2)
                    370:        machines="sun sun2"
1.1.1.3 ! root      371:        ics="m68k am9513 mm58167 z8530 i825x6"
1.1       root      372:        buses="multibus"
1.1.1.2   root      373:        fb_xlats="1152x900d1b1s0p32om"
1.1       root      374:        ;;
                    375: 
1.1.1.3 ! root      376:     # the sun3:
        !           377:     sun3)
        !           378:        machines="sun sun3"
        !           379:        ics="m68k isil7170 z8530 i825x6 ieee754 ncr5380"
        !           380:        buses="multibus"
        !           381:        fb_xlats="1152x900d1b1s0p32om 1152x900d8b8s0p32ommi8 1152x900d1b1s0p32omccmi8"
        !           382:        ;;
        !           383: 
1.1       root      384:     *)
                    385:        AC_MSG_ERROR([don't know how to emulate ${machine}])
                    386:        ;;
                    387:     esac
                    388: 
1.1.1.2   root      389:     # add in the new machines, ICs, serials, and buses to compile:
1.1       root      390:     for machine in $machines; do
                    391:        if echo " ${TME_MACHINE_SUBDIRS} " | grep " ${machine} " > /dev/null 2>&1; then :; else
                    392:            TME_MACHINE_SUBDIRS="${TME_MACHINE_SUBDIRS} ${machine}"
                    393:        fi
                    394:     done
                    395:     for ic in $ics; do
                    396:        if test -d ic/$ic; then
                    397:            if echo " ${TME_IC_SUBDIRS} " | grep " ${ic} " > /dev/null 2>&1; then :; else
                    398:                TME_IC_SUBDIRS="${TME_IC_SUBDIRS} ${ic}"
                    399:            fi
                    400:        else
                    401:            ic="tme_ic_${ic}.la"
                    402:            if echo " ${TME_ICS} " | grep " ${ic} " > /dev/null 2>&1; then :; else
                    403:                TME_ICS="${TME_ICS} ${ic}"
                    404:            fi
                    405:        fi
                    406:     done
1.1.1.2   root      407:     for serial in $serials; do
                    408:        if test -d serial/$serial; then
                    409:            if echo " ${TME_SERIAL_SUBDIRS} " | grep " ${serial} " > /dev/null 2>&1; then :; else
                    410:                TME_SERIAL_SUBDIRS="${TME_SERIAL_SUBDIRS} ${serial}"
                    411:            fi
                    412:        else
                    413:            serial="tme_serial_${serial}.la"
                    414:            if echo " ${TME_SERIALS} " | grep " ${serial} " > /dev/null 2>&1; then :; else
                    415:                TME_SERIALS="${TME_SERIALS} ${serial}"
                    416:            fi
                    417:        fi
                    418:     done
1.1       root      419:     for bus in $buses; do
                    420:        if echo " ${TME_BUS_SUBDIRS} " | grep " ${bus} " > /dev/null 2>&1; then :; else
                    421:            TME_BUS_SUBDIRS="${TME_BUS_SUBDIRS} ${bus}"
                    422:        fi
                    423:     done
1.1.1.2   root      424:        
                    425:     # add in the new frame buffer translations to compile:
                    426:     for fb_xlat in $fb_xlats; do
                    427:        if echo " ${TME_FB_XLAT_SRC} " | grep " ${fb_xlat} " > /dev/null 2>&1; then :; else
                    428:            TME_FB_XLAT_SRC="${TME_FB_XLAT_SRC} ${fb_xlat}"
                    429:        fi
                    430: 
                    431:        dnl Make brackets safe to use.
                    432:        changequote(<<, >>)dnl
                    433: 
                    434:        # calculate the area of this frame buffer multiplied by 100:
                    435:         this_width=`echo ${fb_xlat} | sed -e 's/^\([0-9][0-9]*\)x\([0-9][0-9]*\)\(.*\)$/\1/'`
                    436:        this_height=`echo ${fb_xlat} | sed -e 's/^\([0-9][0-9]*\)x\([0-9][0-9]*\)\(.*\)$/\2/'`
                    437:        this_area=`expr ${this_width} \* ${this_height} \* 100`
                    438: 
                    439:        dnl Make brackets the quote characters again.
                    440:        changequote([, ])dnl
                    441: 
                    442:        # if this frame buffer would consume at least 70 percent of
                    443:        # the smallest destination screen, make an xlat function that
                    444:        # scales this frame buffer down by two:
                    445:        if test ${area_smallest} = 0; then
                    446:            percentage=100
                    447:        else
                    448:            percentage=`expr ${this_area} / ${area_smallest}`
                    449:        fi
                    450:        if test `expr ${percentage} \> 70` = 1; then
                    451:            src_key="${fb_xlat}_h"
                    452:            if echo " ${TME_FB_XLAT_SRC} " | grep " ${src_key} " > /dev/null 2>&1; then :; else
                    453:                TME_FB_XLAT_SRC="${TME_FB_XLAT_SRC} ${src_key}"
                    454:            fi
                    455:        fi
                    456:          
                    457:        # if this frame buffer would consume less than 30 percent of
                    458:        # the largest destination screen, make an xlat function that
                    459:        # scales this frame buffer up by two:
                    460:        if test ${area_largest} = 0; then
                    461:            percentage=0
                    462:        else
                    463:            percentage=`expr ${this_area} / ${area_largest}`
                    464:        fi
                    465:        if test `expr ${percentage} \< 30` = 1; then
                    466:            src_key="${fb_xlat}_d"
                    467:            if echo " ${TME_FB_XLAT_SRC} " | grep " ${src_key} " > /dev/null 2>&1; then :; else
                    468:                TME_FB_XLAT_SRC="${TME_FB_XLAT_SRC} ${src_key}"
                    469:            fi
                    470:        fi
                    471:     done
1.1       root      472: done
                    473: AC_SUBST(TME_MACHINE_SUBDIRS)
                    474: AC_SUBST(TME_IC_SUBDIRS)
                    475: AC_SUBST(TME_ICS)
1.1.1.2   root      476: AC_SUBST(TME_SERIAL_SUBDIRS)
                    477: AC_SUBST(TME_SERIALS)
1.1       root      478: AC_SUBST(TME_BUS_SUBDIRS)
1.1.1.2   root      479: AC_SUBST(TME_FB_XLAT_SRC)
                    480: 
                    481: dnl The list of host support is finished.
1.1       root      482: AC_SUBST(TME_HOSTS)
                    483: 
                    484: dnl Configure for libtool.
                    485: AC_LIBLTDL_INSTALLABLE
                    486: AC_SUBST(INCLTDL)
                    487: AC_SUBST(LIBLTDL)
                    488: AC_LIBTOOL_DLOPEN
                    489: AM_PROG_LIBTOOL
                    490: AC_SUBST(LTLIBOBJS)
                    491: AC_CONFIG_SUBDIRS(libltdl)
                    492: TME_PREOPEN=
                    493: if test $enable_shared = no; then
                    494:   TME_PREOPEN='`sort -u $(top_builddir)/tme-preopen.txt`'
                    495: fi
                    496: AC_SUBST(TME_PREOPEN)
                    497: 
                    498: dnl Configure debugging and/or warnings.
                    499: AC_ARG_ENABLE(debug,
                    500: [  --disable-debug         don't compile debuggable libraries and programs (default=do)],
1.1.1.3 ! root      501: [ ], [enable_debug=no])
1.1       root      502: if test "x$enable_debug" = "xyes"; then
                    503:   CFLAGS="${CFLAGS-} -g -O0"
                    504:   CXXFLAGS="${CXXFLAGS-} -g3 -O0"
1.1.1.3 ! root      505: else
        !           506:   CPPFLAGS="${CPPFLAGS-} -DTME_NO_LOG -DTME_NO_DEBUG_LOCKS -DTME_NO_AUDIT_ATOMICS -DNDEBUG"
1.1       root      507: fi
                    508: AC_ARG_ENABLE(warnings,
                    509: [  --disable-warnings      don't compile with warnings turned on (default=do)],
                    510: [ ], [enable_warnings=yes])
                    511: if test "x$enable_warnings" = "xyes" -a "x$GCC" = "xyes"; then
1.1.1.3 ! root      512:   CFLAGS="${CFLAGS-} -Wundef -Wall -Werror"
1.1       root      513:   CXXFLAGS="${CXXFLAGS-} -W"
                    514: fi
                    515: 
1.1.1.3 ! root      516: dnl Some code isn't alias-clean.
        !           517: CFLAGS_NO_STRICT_ALIASING=
        !           518: if test "x$GCC" = "xyes"; then
        !           519:   CFLAGS_NO_STRICT_ALIASING=" -fno-strict-aliasing"
        !           520: fi
        !           521: AC_SUBST(CFLAGS_NO_STRICT_ALIASING)
        !           522: 
1.1       root      523: dnl Generate tmeconfig.h.  The whether-to-generate logic is cribbed 
                    524: dnl from glib-1.2.1's configure.in.
                    525: dnl See that file for an explanation.
                    526: AC_OUTPUT_COMMANDS([
                    527:           
                    528: ## Generate our configure-time sources in two 
                    529: ## cases:
                    530: ## 1. `config.status' is run either explicitly, or via configure.
                    531: ##     Esp. not when it is run in `Makefile' to generate makefiles and
                    532: ##     config.h
                    533: ## 2. CONFIG_OTHER is set explicitly
                    534: ##
                    535: ## Case 1 is difficult.  We know that `automake' sets one of
                    536: ## CONFIG_FILES or CONFIG_HEADERS to empty.  This heuristic works
                    537: ## only when AM_CONFIG_HEADER is set, however.
                    538: 
                    539: case "x$CONFIG_OTHER" in
                    540: *tmeconfig.h) gen_tmeconfig_h=yes
                    541: ;;
                    542: esac
                    543: if test -n "${CONFIG_FILES}" && test -n "${CONFIG_HEADERS}"; then
                    544:   # Both CONFIG_FILES and CONFIG_HEADERS are non-empty ==> Case 1
                    545:   if test "x${CONFIG_OTHER}" = x; then
                    546:     gen_tmeconfig_h=yes
                    547:   fi
                    548: fi
                    549: 
                    550: ## If we're generating tmeconfig.h:
                    551: if test "x$gen_tmeconfig_h" = xyes; then
                    552:   outfile=tmeconfig.h
                    553:   echo "$as_me: creating $outfile"
                    554:   cat <<TMEEOF > ${outfile}-tmp
                    555: /* tmeconfig.h
                    556:  * 
                    557:  * This is an automatically generated file - please modify 'configure.in'.
                    558:  */
                    559: 
                    560: #ifndef _TMECONFIG_H
                    561: #define _TMECONFIG_H
                    562: 
                    563: TMEEOF
1.1.1.2   root      564:   (for word in HAVE_ TIME_ PROTO_ ALIGNOF_ SIZEOF_ WORDS_BIGENDIAN; do \
1.1       root      565:     grep $word config.h | sed 's/#define[      ]\{1,\}/&_TME_/' ; \
                    566:   done) | sort | uniq >> ${outfile}-tmp
1.1.1.3 ! root      567:   grep FLOAT_FORMAT config.h | \
        !           568:     sed 's/#define[    ]\{1,\}\([A-Za-z0-9_]\{1,\}\)[  ]\{1,\}\([A-Za-z0-9_]\{1,\}\)/#define TME_\1 TME_FLOAT_FORMAT_\2/' >> ${outfile}-tmp
1.1       root      569:   echo '#define TME_RELEASE_MAJOR (' \
                    570:     `echo $VERSION | sed -e 's,^\([0-9][0-9]*\)\.[0-9][0-9]*$,\1,'` ')' >> ${outfile}-tmp
                    571:   echo '#define TME_RELEASE_MINOR (' \
                    572:     `echo $VERSION | sed -e 's,^[0-9][0-9]*\.\([0-9][0-9]*\)$,\1,'` ')' >> ${outfile}-tmp
                    573:   echo '#define TME_BUILD_TARGET "'$target'"' >> ${outfile}-tmp
1.1.1.2   root      574:   if test $ac_cv_sizeof_long = 8; then
                    575:     echo '#define TME_HAVE_INT64_T' >> ${outfile}-tmp
                    576:     echo 'typedef signed long tme_int64_t;' >> ${outfile}-tmp
                    577:     echo 'typedef unsigned long tme_uint64_t;' >> ${outfile}-tmp
                    578:   fi
1.1       root      579:   if test $ac_cv_sizeof_int = 4; then
                    580:     echo 'typedef signed int tme_int32_t;' >> ${outfile}-tmp
                    581:     echo 'typedef unsigned int tme_uint32_t;' >> ${outfile}-tmp
                    582:   elif test $ac_cv_sizeof_long = 4; then
                    583:     echo 'typedef signed long tme_int32_t;' >> ${outfile}-tmp
                    584:     echo 'typedef unsigned long tme_uint32_t;' >> ${outfile}-tmp
                    585:   fi
                    586:   if test $ac_cv_sizeof_int = 2; then
                    587:     echo 'typedef signed int tme_int16_t;' >> ${outfile}-tmp
                    588:     echo 'typedef unsigned int tme_uint16_t;' >> ${outfile}-tmp
                    589:   elif test $ac_cv_sizeof_short = 2; then
                    590:     echo 'typedef signed short tme_int16_t;' >> ${outfile}-tmp
                    591:     echo 'typedef unsigned short tme_uint16_t;' >> ${outfile}-tmp
                    592:   fi
                    593:   echo 'typedef signed char tme_int8_t;' >> ${outfile}-tmp
                    594:   echo 'typedef unsigned char tme_uint8_t;' >> ${outfile}-tmp
                    595:   cat <<TMEEOF >> ${outfile}-tmp
                    596: 
                    597: /* features that aren't currently controlled by a configure option: */
                    598: #define TME_THREADS_SJLJ
                    599: 
                    600: #endif /* !_TMECONFIG_H */
                    601: TMEEOF
                    602:   if cmp -s ${outfile}-tmp $outfile; then
                    603:     echo "$as_me: $outfile is unchanged"
                    604:     rm -f ${outfile}-tmp
                    605:   else
                    606:     mv ${outfile}-tmp ${outfile}
                    607:   fi
                    608: fi
                    609: ], [
                    610: PACKAGE="$PACKAGE"
                    611: VERSION="$VERSION"
                    612: target="$target"
                    613: ac_cv_sizeof_int="$ac_cv_sizeof_int"
                    614: ac_cv_sizeof_long="$ac_cv_sizeof_long"
                    615: ac_cv_sizeof_short="$ac_cv_sizeof_short"
                    616: ])
                    617: 
                    618: dnl Writes files.
                    619: AC_OUTPUT(Makefile
                    620:          tme/Makefile
                    621:          tme/ic/Makefile
                    622:          tme/machine/Makefile
                    623:          tme/generic/Makefile
1.1.1.2   root      624:          tme/scsi/Makefile
1.1       root      625:          libtme/Makefile
                    626:          ic/Makefile
                    627:          ic/m68k/Makefile
1.1.1.3 ! root      628:          ic/ieee754/Makefile
1.1       root      629:          machine/Makefile
                    630:          machine/sun/Makefile
                    631:          machine/sun2/Makefile
1.1.1.3 ! root      632:          machine/sun3/Makefile
1.1       root      633:           host/Makefile
                    634:           host/posix/Makefile
                    635:           host/bsd/Makefile
1.1.1.2   root      636:           host/gtk/Makefile
1.1       root      637:           bus/Makefile
                    638:           bus/multibus/Makefile
1.1.1.2   root      639:           serial/Makefile
                    640:           scsi/Makefile
1.1       root      641:           generic/Makefile
1.1.1.3 ! root      642:          tmesh/Makefile
        !           643:          tools/Makefile)
1.1       root      644: 

unix.superglobalmegacorp.com

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