: create config.h file
case $CONFIG in
    '') . ./config.sh ;;
esac
echo "Extracting config.h (with variable substitutions)"
case "$hostfile" in
'')	usehostfile='undef';;
*)	usehostfile='define';;
esac

$sed 's,^#undef,/*#undef,' >config.h <<EOT
/* config.h
 * This file was produced by running the config.h.SH script, which
 * gets its values from config.sh, which is generally produced by
 * running Configure.
 *
 * Feel free to modify any of this as the need arises.  Note, however,
 * that running config.h.SH again will wipe out any changes you've made.
 * For a more permanent change edit config.sh and rerun config.h.SH.
 * $Id: config.h.SH,v 1.6 1992/08/03 04:51:45 sob Exp sob $
 *
 * $Log: config.h.SH,v $
 * Revision 1.6  1992/08/03  04:51:45  sob
 * Release version 1.6
 *
 *
 * 
 */
/* This software is Copyright 1992 by Stan Barber. 
 *
 * Permission is hereby granted to copy, reproduce, redistribute or otherwise
 * use this software as long as: there is no monetary profit gained
 * specifically from the use or reproduction of this software, it is not
 * sold, rented, traded or otherwise marketed, and this copyright notice is
 * included prominently in any copy made. 
 *
 * The author make no claims as to the fitness or correctness of this software
 * for any use whatsoever, and it is provided as is. Any use of this software
 * is at the user's own risk. 
 */

/* name of the site.  May be overridden by HOSTFILE, gethostname, uname, etc. */
#define SITENAME "$sitename"
#$usehostfile HOSTFILE "$hostfile" /* defined if we read the hostname from a file */

/* domain suffix */
#define DOMAIN "$domain"

/* login name of news administrator, if any. */
#$isadmin NEWSADMIN "$newsadmin"	/**/

/* news library */
#define LIB "$lib"

/* root uid */
#define ROOTID $rootid


#$auth AUTH		/* Use NNTP Authorization feature? */
#$authsimple AUTHSIMPLE		/* Use NNTP Version 2 SIMPLE Authorization feature? */
#$authold AUTHOLD	/* Use OLD (Kantor) NNTP Authorization feature */
#$authsimple PASSFILE	 "$passfile"  /* NNTP authorization file */
#$nonetdb NONETDB	/* gethostbyname available? */
#$strchr index  strchr		/* cultural */
#$strchr rindex strrchr		/*  differences? */
#$memcpy bcopy(s,d,n) memcpy((char*)d,(char*)s,(int)n)	/* Different */
#$memcpy bzero(d,n)   memset((char*)d,0,(int)n)		/*  flavors. */
#$novoid void int	/* is void to be avoided? */
#$sunos4 SUNOS4		/* running SunOS 4.X? */
#$eunice EUNICE		/* no linking? */
#$eunice VMS		/* not currently used, here just in case */
			/*  (undef to take name from ~/.fullname) */
#$berknam BERKNAMES	/* if so, are they Berkeley format? */
			/* (that is, ":name,stuff:") */
#$usgnam USGNAMES	/* or are they USG format? */
			/* (that is, ":stuff-name(stuff):") */
#$dotdir DO_DOTDIR	/* use DOT_DIR to figure out where .signature is */
#$strcasecmp STRCASECMP	/* is strcasecmp is available? */
#$strncasecmp STRNCASECMP	/* is strncasecmp is available? */
#$seteuid SETEUID	/* is seteuid available? */
#$whoami WHOAMI		/* should we include whoami.h? */
#$getpwent GETPWENT	/* should we include getpwent? */
#$gethostname GHNAME	/* do we have a gethostname function? */
#$douname DOUNAME 	/* do we have a uname function? */
#$phostname PHOSTNAME "$hostcmd"	/* how to get host name with popen */
#define SERVER_FILE "$serverfile"	/* news server file */
EOT
$eunicefix config.h
