home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume25 / trn / part03 / config.h.SH < prev    next >
Encoding:
Text File  |  1991-12-02  |  6.7 KB  |  195 lines

  1. : create config.h file
  2. case $CONFIG in
  3.     '') . ./config.sh ;;
  4. esac
  5. echo "Extracting config.h (with variable substitutions)"
  6. case "$threaddir" in
  7. '.')    threaddir='/usr/spool/threads'
  8.     tdir='undef';;
  9. *)    tdir='define';;
  10. esac
  11. case "$serverspool" in
  12. '') sspool='undef';;
  13. *)  sspool='define';;
  14. esac
  15. case "$activetimes" in
  16. 'none')    acttimes='undef';;
  17. *)    acttimes='define';;
  18. esac
  19. case "$syslog" in
  20. LOG_*)    syslog2='define';;
  21. *)    syslog2='undef';;
  22. esac
  23. case "$hostfile" in
  24. '')    usehostfile='undef';;
  25. *)    usehostfile='define';;
  26. esac
  27.  
  28. $sed 's,^#undef,/*#undef,' >config.h <<EOT
  29. /* config.h
  30.  * This file was produced by running the config.h.SH script, which
  31.  * gets its values from config.sh, which is generally produced by
  32.  * running Configure.
  33.  *
  34.  * Feel free to modify any of this as the need arises.  Note, however,
  35.  * that running config.h.SH again will wipe out any changes you've made.
  36.  * For a more permanent change edit config.sh and rerun config.h.SH.
  37.  * $Id: config.h.SH,v 4.4.2.1 1991/12/01 18:05:42 sob PATCH_2 sob $
  38.  *
  39.  * $Log: config.h.SH,v $
  40.  * Revision 4.4.2.1  1991/12/01  18:05:42  sob
  41.  * Fixed problems with CTRLA flag.
  42.  *
  43.  * Revision 4.4  1991/09/09  20:18:23  sob
  44.  * release 4.4
  45.  *
  46.  *
  47.  * 
  48.  */
  49. /* This software is Copyright 1991 by Stan Barber. 
  50.  *
  51.  * Permission is hereby granted to copy, reproduce, redistribute or otherwise
  52.  * use this software as long as: there is no monetary profit gained
  53.  * specifically from the use or reproduction of this software, it is not
  54.  * sold, rented, traded or otherwise marketed, and this copyright notice is
  55.  * included prominently in any copy made. 
  56.  *
  57.  * The author make no claims as to the fitness or correctness of this software
  58.  * for any use whatsoever, and it is provided as is. Any use of this software
  59.  * is at the user's own risk. 
  60.  */
  61.  
  62. /* name of the site.  May be overridden by HOSTFILE, gethostname, uname, etc. */
  63. #define SITENAME "$sitename"
  64. #$usehostfile HOSTFILE "$hostfile"    /* defined if we read the hostname from a file */
  65.  
  66. /* domain name for the site */
  67. #define OURDOMAIN "$domain"
  68.  
  69. /* name of the organization, may be a file name */
  70. #define ORGNAME "$orgname"
  71.  
  72. /* ignore the ORGANIZATION environment variable */
  73. #$ignoreorg IGNOREORG        /**/
  74.  
  75. /* login name of news administrator, if any. */
  76. #$isadmin NEWSADMIN "$newsadmin"    /**/
  77.  
  78. /* news library, may use only ~ and %l expansion */
  79. #define LIB "$lib"
  80.  
  81. /* rn private library, may use ~ expansion, %x and %l */
  82. #define RNLIB "$rnlib"
  83.  
  84. /* mthreads private files */
  85. #define MTLIB "$mtlib"
  86.  
  87. /* location of the news spool directory, may use ~ expansion, %x and %l */
  88. #define SPOOL "$spool"
  89.  
  90. /* the server's spool directory if generating an NNTP trn & a local mthreads */
  91. #$sspool SERVERSPOOL "$serverspool"    /* forces local mthreads */
  92.  
  93. /* put thread files in each spool directory, unless THREAD_DIR is defined */
  94. #$tdir THREAD_DIR "$threaddir"    /* base directory */
  95.  
  96. /* save in subdirectories unless LONG_THREAD_NAMES & THREAD_DIR are defined */
  97. #undef LONG_THREAD_NAMES        /* not for short-name systems */
  98.  
  99. /* I doubt you'd want to undefine this, but someone may */
  100. #define USETMPTHREAD            /* use tmpthread to update threads */
  101.  
  102. /* location of the active file, may use ~ expansion, %x and %l */
  103. #define ACTIVE "$active"
  104.  
  105. /* define where the active.times file is kept if we're using it */
  106. #$acttimes ACTIVE_TIMES "$activetimes"    /* including name */
  107.  
  108. /* location of spooled mail */
  109. #define MAILFILE "$maildir"
  110.  
  111. /* default shell--ok to be a slow shell like csh */
  112. #define PREFSHELL "$pref"
  113.  
  114. /* default editor */
  115. #define DEFEDITOR "$defeditor"
  116.  
  117. /* root uid */
  118. #define ROOTID $rootid
  119.  
  120. /* what is the first character of a mailbox? */
  121. #define MBOXCHAR '$mboxchar'
  122.  
  123. /* how to cancel an article */
  124. #define CANCEL "$inews -h <%h"
  125.  
  126. /* distribution groups */
  127. #define LOCDIST   "$locpref"
  128. #define ORGDIST   "$orgpref"
  129. #define CITYDIST  "$citypref"
  130. #define STATEDIST "$statepref"
  131. #define CNTRYDIST "$cntrypref"
  132. #define CONTDIST  "$contpref"
  133.  
  134. #define THREAD_INIT $threaddef
  135. #define SELECT_INIT $selectdef
  136.  
  137. #$strchr index  strchr        /* cultural */
  138. #$strchr rindex strrchr        /*  differences? */
  139. #$memcpy bcopy(s,d,n) memcpy((char*)d,(char*)s,(int)n)    /* Different */
  140. #$memcpy bzero(d,n)   memset((char*)d,0,(int)n)        /*  flavors. */
  141. #$rename RENAME        /* is rename() a system call? */
  142. #$ftruncate FTRUNCATE    /* is ftruncate() available? */
  143. #$usleep USLEEP        /* do we have usleep? */
  144. #$uselect USELECT     /* should we use select to emulate usleep? */
  145. #$strftime STRFTIME    /* is strftime() available? */
  146. #$chsize CHSIZE        /* is chsize() available? */
  147. #$tzset TZSET        /* modern timezone functions? */
  148. #$novoid void int    /* is void to be avoided? */
  149. #$novfork vfork fork    /* is vfork too virtual? */
  150. #$sunos4 SUNOS4        /* running SunOS 4.X? */
  151. #$eunice EUNICE        /* no linking? */
  152. #$eunice VMS        /* not currently used, here just in case */
  153. #$getcwd GETCWD        /* do we have getcwd()? */
  154. #$getwd GETWD        /* do we have getwd()? */
  155. #$setvbuf SETVBUF     /* do we have setvbuf()? */
  156. #$setbuffer SETBUFFER    /* do we have setbuffer()? */
  157. #$usendir USENDIR     /* include ndir.c? */
  158. #$libndir LIBNDIR     /* include /usr/include/ndir.h? */
  159. #define DIRTYPE $dirtype
  160. #ifndef USENDIR
  161. #define DIRINC $dirinc
  162. #endif
  163. #$mininact MININACT    /* include 2.10.2 optimization? */
  164. #$portable PORTABLE    /* do we do extra lookups to start up? */
  165. #$passnam PASSNAMES    /* do names come from the passwd file? */
  166.             /*  (undef to take name from ~/.fullname) */
  167. #$berknam BERKNAMES    /* if so, are they Berkeley format? */
  168.             /* (that is, ":name,stuff:") */
  169. #$usgnam USGNAMES    /* or are they USG format? */
  170.             /* (that is, ":stuff-name(stuff):") */
  171. #$whoami WHOAMI        /* should we include whoami.h? */
  172. #$rdchk RDCHK        /* do we have rdchk()? */
  173. #$termio TERMIO        /* is this a termio system? */
  174. #$termios TERMIOS     /* is this a termios system? */
  175. #$fcntl FCNTL        /* should we include fcntl.h? */
  176. #$ioctl IOCTL        /* are ioctl args all defined in one place? */
  177. #$ptem PTEM        /* has the ptem.h include file ? */
  178. #$normsig NORMSIG     /* use signal rather than sigset? */
  179. #$sigblock SIGBLOCK    /* use sigblock and sigsetmask */
  180. #$sighold HAVESIGHOLD    /* use sighold and sigrelse */
  181. #define SIGRET $sigret    /* what does signal() return? */
  182. #$havetlib HAVETERMLIB    /* do we have termlib-style routines? */
  183. #$getuidgid GETUIDGID    /* allow setuid (if possible) */
  184. #$getpwent GETPWENT    /* should we include getpwent? */
  185. #$internet INTERNET    /* does our mailer do INTERNET addressing? */
  186. #$gethostname GETHOSTNAME    /* do we have a gethostname function? */
  187. #$douname DOUNAME     /* do we have a uname function? */
  188. #$phostname PHOSTNAME "$hostcmd"    /* how to get host name with popen */
  189. #$norelay NORELAY     /* 2.10.3 doesn't have Relay-Version line */
  190. #$isrrn SERVER        /* rrn server code */
  191. #$isrrn SERVER_FILE "$serverfile"    /* news server file */
  192. #$syslog2 USESYSLOG $syslog    /* use syslog for mthreads' log messages */
  193. #$xthread XTHREAD     /* get thread files via NNTP */
  194. EOT
  195.