home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / usenet / altsrcs / 1 / 1342 / config.h.SH next >
Encoding:
Text File  |  1990-12-28  |  6.6 KB  |  170 lines

  1. case $CONFIG in
  2. '')
  3.     if test ! -f config.sh; then
  4.     ln ../config.sh . || \
  5.     ln ../../config.sh . || \
  6.     ln ../../../config.sh . || \
  7.     (echo "Can't find config.sh."; exit 1)
  8.     echo "Using config.sh from above..."
  9.     fi
  10.     . ./config.sh
  11.     ;;
  12. esac
  13. echo "Extracting config.h (with variable substitutions)"
  14. sed <<!GROK!THIS! >config.h -e 's!^#undef!/\*#undef!'
  15. /* config.h
  16.  * This file was produced by running the config.h.SH script, which
  17.  * gets its values from config.sh, which is generally produced by
  18.  * running Configure.
  19.  *
  20.  * Feel free to modify any of this as the need arises.  Note, however,
  21.  * that running config.h.SH again will wipe out any changes you've made.
  22.  * For a more permanent change edit config.sh and rerun config.h.SH.
  23.  */
  24.  
  25.  
  26. /* EUNICE:
  27.  *    This symbol, if defined, indicates that the program is being compiled
  28.  *    under the EUNICE package under VMS.  The program will need to handle
  29.  *    things like files that don't go away the first time you unlink them,
  30.  *    due to version numbering.  It will also need to compensate for lack
  31.  *    of a respectable link() command.
  32.  */
  33. /* VMS:
  34.  *    This symbol, if defined, indicates that the program is running under
  35.  *    VMS.  It is currently only set in conjunction with the EUNICE symbol.
  36.  */
  37. #$d_eunice    EUNICE        /**/
  38. #$d_eunice    VMS        /**/
  39.  
  40. /* BCOPY:
  41.  *    This symbol, if defined, indicates that the bcopy routine is available
  42.  *    to copy blocks of memory.  Otherwise you should probably use memcpy().
  43.  */
  44. #$d_bcopy    BCOPY        /**/
  45.  
  46. /* CHARSPRINTF:
  47.  *    This symbol is defined if this system declares "char *sprintf()" in
  48.  *    stdio.h.  The trend seems to be to declare it as "int sprintf()".  It
  49.  *    is up to the package author to declare sprintf correctly based on the
  50.  *    symbol.
  51.  */
  52. #$d_charsprf    CHARSPRINTF     /**/
  53.  
  54. /* index:
  55.  *    This preprocessor symbol is defined, along with rindex, if the system
  56.  *    uses the strchr and strrchr routines instead.
  57.  */
  58. /* rindex:
  59.  *    This preprocessor symbol is defined, along with index, if the system
  60.  *    uses the strchr and strrchr routines instead.
  61.  */
  62. #$d_index    index strchr    /* cultural */
  63. #$d_index    rindex strrchr    /*  differences? */
  64.  
  65. /* MEMCPY:
  66.  *    This symbol, if defined, indicates that the memcpy routine is available
  67.  *    to copy blocks of memory.  Otherwise you should probably use bcopy().
  68.  *    If neither is defined, roll your own.
  69.  */
  70. #$d_memcpy    MEMCPY        /**/
  71.  
  72. /* CPPSTDIN:
  73.  *    This symbol contains the first part of the string which will invoke
  74.  *    the C preprocessor on the standard input and produce to standard
  75.  *    output.     Typical value of "cc -E" or "/lib/cpp".
  76.  */
  77. /* CPPMINUS:
  78.  *    This symbol contains the second part of the string which will invoke
  79.  *    the C preprocessor on the standard input and produce to standard
  80.  *    output.  This symbol will have the value "-" if CPPSTDIN needs a minus
  81.  *    to specify standard input, otherwise the value is "".
  82.  */
  83. #define CPPSTDIN "$cppstdin"
  84. #define CPPMINUS "$cppminus"
  85.  
  86. /* REREAD
  87.  * This variable indicates that the function "read" is normally restarted 
  88.  * when the process receives an interrupt (like SIGINT). This is the
  89.  * default behaviour on e.g. BSD4.3 and SUN OS 3.5.
  90.  */
  91. #$d_reread REREAD        /**/
  92.  
  93. /* TERMIO:
  94.  *    This symbol, if defined, indicates that the program should include
  95.  *    termio.h rather than sgtty.h.  There are also differences in the
  96.  *    ioctl() calls that depend on the value of this symbol.
  97.  */
  98. /* SYSTERMIO:
  99.  * This variable, if defined, indicates that the termio header files
  100.  * are in "/usr/include/sys" rather than in "/usr/include".
  101.  */
  102. #$d_termio    TERMIO        /**/
  103. #$systermio    SYSTERMIO        /**/
  104.  
  105. /* look4char
  106.  * This variable indicates how a program may look whether characters
  107.  * are available from a terminal.
  108.  * Unfortunately the ways to do this differ; some but not all may be available
  109.  * on a given system, but there may even be some performance differences.
  110.  * Each way is tagged with a name. If look4char contains this name,
  111.  * the corresponding way to look for characters is used.
  112.  * The ways and names are:
  113.  * USE_SELECT : the system call "select" (man section 2) is available and
  114.  *            works. This is usually the case on 4BSD derived systems like
  115.  *            43BSD, SunOS 3.5.
  116.  *            There are some systems like SIEMENS MX2 SINIX 2.1 that have
  117.  *            "select" but it does not work on terminals.
  118.  *            Expected return values:
  119.  *                 0 : no characters available, timeout
  120.  *                -1 : some error occured, e.g. intr, error number in errno.
  121.  *              else : (1 << fd) : filedescriptor for which stuff is available
  122.  * USE_RDCHK : the system has the routine "rdchk".    This is usually the
  123.  *            case on SYS III derived systems.
  124.  *            It is called as "ret = rdchk(fd)" and returns
  125.  *            -1 : error, 0 : no char available, 1 : char available
  126.  * USE_FIONREAD: there is an ioctl with parameter "FIONREAD" which returns the
  127.  *            number of characters available from a given filedescriptor.
  128.  *            It is called as "ret = ioctl(fd, FIONREAD, &num)" where "ret",
  129.  *            "num" and "fd" are integers.
  130.  *            The numbers of available characters is returned in "num".
  131.  *            This is usually the case on 4BSD systems. On some systems both
  132.  *            "rdchk" and "FIONREAD" are available (SINIX 2.1), on some both
  133.  *            "select" and "FIONREAD" are possible (BSD), use "select".
  134.  */
  135. #define USE_SELECT        1
  136. #define USE_RDCHK        2
  137. #define USE_FIONREAD        3
  138. #define LOOK4CHAR    $look4char
  139.  
  140. /* wait4char
  141.  * This variable indicates how a program may wait until either characters
  142.  * are available from a terminal or a specified amount of time has elapsed.
  143.  * Unfortunately the ways to do this differ; some but not all may be available
  144.  * on a given system, but there may even be some performance differences.
  145.  * Each way is tagged with a name. If wait4char contains this name,
  146.  * the corresponding way to wait for characters is used.
  147.  * The ways and names are:
  148.  * USE_SELECT : the system call "select" (man section 2) is available and
  149.  *            works. This is usually the case on 4BSD derived systems like
  150.  *            43BSD, SunOS 3.5.
  151.  *            There are some systems like SIEMENS MX2 SINIX 2.1 that have
  152.  *            "select" but it does not work on terminals.
  153.  *            Expected return values:
  154.  *                 0 : no characters available, timeout
  155.  *                -1 : some error occured, e.g. intr, error number in errno.
  156.  *              else : (1 << fd) : filedescriptor for which stuff is available
  157.  *            Advantage: the program does not spend time.
  158.  *            Disadvantage: on some machines, like on a VAX 11/780 running
  159.  *                4.3BSD, the clock is not very accurate.
  160.  * USE_RDCHK : the system has the routine "rdchk".    This is usually the
  161.  *            case on SYS III derived systems.
  162.  *            It is called as "ret = rdchk(fd)" and returns
  163.  *            -1 : error, 0 : no char available, 1 : char available
  164.  *            Advantage: quite accurate, even on loaded systems.
  165.  *            Disadvantage: spends time looping and looking repeatedly.
  166.  */
  167. #define WAIT4CHAR    $wait4char
  168.  
  169. !GROK!THIS!
  170.