1case $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    ;;
12esac
13echo "Extracting config.h (with variable substitutions)"
14sed <<!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/* CPPSTDIN:
27 *	This symbol contains the first part of the string which will invoke
28 *	the C preprocessor on the standard input and produce to standard
29 *	output.	 Typical value of "cc -E" or "/lib/cpp".
30 */
31/* CPPMINUS:
32 *	This symbol contains the second part of the string which will invoke
33 *	the C preprocessor on the standard input and produce to standard
34 *	output.  This symbol will have the value "-" if CPPSTDIN needs a minus
35 *	to specify standard input, otherwise the value is "".
36 */
37#define CPPSTDIN "$cppstdin"
38#define CPPMINUS "$cppminus"
39
40/* GETOPT:
41 *	This symbol, if defined, indicates that the getopt() routine exists.
42 */
43#$d_getopt	GETOPT		/**/
44
45/* MEMCPY:
46 *	This symbol, if defined, indicates that the memcpy routine is available
47 *	to copy blocks of memory.  Otherwise you should probably use bcopy().
48 *	If neither is defined, roll your own.
49 */
50#$d_memcpy	MEMCPY		/**/
51
52/* MKDIR:
53 *	This symbol, if defined, indicates that the mkdir routine is available
54 *	to create directories.  Otherwise you should fork off a new process to
55 *	exec /bin/mkdir.
56 */
57#$d_mkdir	MKDIR		/**/
58
59/* RENAME:
60 *	This symbol, if defined, indicates that the rename routine is available
61 *	to rename files.  Otherwise you should do the unlink(), link(), unlink()
62 *	trick.
63 */
64#$d_rename	RENAME		/**/
65
66/* SYMLINK:
67 *	This symbol, if defined, indicates that the symlink routine is available
68 *	to create symbolic links.
69 */
70#$d_symlink	SYMLINK		/**/
71
72/* WHOAMI:
73 *	This symbol, if defined, indicates that the program may include
74 *	whoami.h.
75 */
76#$d_whoami	WHOAMI		/**/
77
78/* PREFSHELL:
79 *	This symbol contains the full name of the preferred user shell on this
80 *	system.  Usual values are /bin/csh, /bin/ksh, /bin/sh.
81 */
82#define PREFSHELL "$prefshell"		/**/
83
84/* EUNICE:
85 *	This symbol, if defined, indicates that the program is being compiled
86 *	under the EUNICE package under VMS.  The program will need to handle
87 *	things like files that don't go away the first time you unlink them,
88 *	due to version numbering.  It will also need to compensate for lack
89 *	of a respectable link() command.
90 */
91/* VMS:
92 *	This symbol, if defined, indicates that the program is running under
93 *	VMS.  It is currently only set in conjunction with the EUNICE symbol.
94 */
95#$d_eunice	EUNICE		/**/
96#$d_eunice	VMS		/**/
97
98/* BIN:
99 *	This symbol holds the name of the directory in which the user wants
100 *	to put publicly executable images for the package in question.  It
101 *	is most often a local directory such as /usr/local/bin.
102 */
103#define BIN "$bin"             /**/
104
105/* CONFIGURE_DATE
106 *	This symbol contains the last date that configure was run for elm -v output.
107 */
108#define		CONFIGURE_DATE	"$c_date"
109
110/* ASCII_CTYPE:
111 *	This symbol, if defined, indicates that the ctype functions and
112 *	macros are ASCII specific and not 8-bit clean.
113 */
114#$d_ascii	ASCII_CTYPE	/**/
115
116/* BROKE_CTYPE:
117 *	This symbol, if defined, indicates that toupper and tolower
118 *	routines/macros are not safe to use.
119 */
120#$d_broke_ctype	BROKE_CTYPE	/**/
121
122/* ULTRIX_FFLUSH_BUG:
123 *	This symbol, if defined, indicates that fflush() is broken.
124 */
125#$d_broke_fflush       ULTRIX_FFLUSH_BUG       /**/
126
127/* ENABLE_CALENDAR:
128 *	This symbol, if defined, indicates that the calendar feature
129 *	should be supported.
130 */
131#$d_calendar	ENABLE_CALENDAR	/**/
132#define dflt_calendar_file	"$calendar"
133
134/* CHOWN_NEG1:
135 */
136#$d_chown_neg1	CHOWN_NEG1	/**/
137
138/* DONT_ESCAPE_MESSAGES:
139 *	This symbol, if defined, indicates that a binary capable MTA is in use
140 *	that honors the content-length header and no message constructs need
141 *	to be escaped.
142 */
143#$d_content	DONT_ESCAPE_MESSAGES /**/
144
145/* CRYPT:
146 *	This symbol, if defined, indicates that the crypt routine is available
147 *	to encrypt passwords and the like.
148 */
149#$d_crypt	CRYPT		/**/
150
151/* HAS_CUSERID:
152 *	This symbol, if defined, means not to include our own cuserid().
153 */
154#$d_cuserid HAS_CUSERID		/**/
155
156/* DISP_HOST:
157 *	This symbol, if defined, indicates that elm should display the
158 *	host name on the index screen.
159 */
160#$d_disphost	DISP_HOST /**/
161
162/* GETDOMAINNAME
163 *	This symbol, if defined, indicates that the getdomainname system call
164 *	is available to obtain the domain name.  Note that the $LIB/domain
165 *	file overrides the value of getdomainname().  If getdomainname() exists,
166 *	MYDOMAIN will be ignored.
167 */
168/* USEGETDOMAINNAME
169 *	This symbol, if defined, indicates that the getdomainname system call
170 *	should be used to obtain the domain name.  Note that the $LIB/domain
171 *	file overrides the value of getdomainname().  If this variable is set
172 *	MYDOMAIN (and therefore DEFAULT_DOMAIN) will be ignored.
173 */
174#$d_domname	GETDOMAINNAME		/**/
175
176#$d_usegetdom	USEGETDOMAINNAME		/**/
177
178/* ERRLST:
179 *	This symbol, if defined, indicates that the sys_errlist and sys_nerr
180 *	symbols exist.
181 */
182#$d_errlst	ERRLST	/**/
183
184/* USE_FLOCK_LOCKING
185 *	This symbol, if defined, indicates that the flock mailbox locking should be used.
186 */
187/* USE_DOTLOCK_LOCKING
188 *	This symbol, if defined, indicates that the .lock mailbox locking should be used.
189 */
190/* USE_FCNTL_LOCKING
191 *	This symbol, if defined, indicates that SYSV style fcntl file locking should be used.
192 */
193/* LOCK_DIR
194 *	This symbol is the name of the lock directory for access (not mailbox) locks.
195 *	It will be /usr/spool/locks or /usr/spool/uucp
196 */
197#$d_flock	USE_FLOCK_LOCKING		/**/
198
199#$d_dotlock	USE_DOTLOCK_LOCKING		/**/
200
201#$d_fcntlock	USE_FCNTL_LOCKING	/**/
202
203#define		LOCK_DIR	"$lock_dir"	/**/
204
205/* HAS_FSYNC:
206 *	This symbol, if defined, indicates that the fsync() routine exists.
207 */
208#$d_fsync	HAS_FSYNC		/**/
209
210/* FTRUNCATE:
211 *	This symbol, if defined, indicates that the ftruncate() routine exists.
212 */
213#$d_ftruncate	FTRUNCATE		/**/
214
215/* GETHOSTNAME:
216 *	This symbol, if defined, indicates that the C program may use the
217 *	gethostname() routine to derive the host name.  See also DOUNAME.
218 */
219/* DOUNAME:
220 *	This symbol, if defined, indicates that the C program may use the
221 *	uname() routine to derive the host name.  See also GETHOSTNAME.
222 */
223/* HOSTCOMPILED:
224 *	This symbol, if defined, indicated that the host name is compiled
225 *	in from the string hostname
226 */
227#$d_gethname	GETHOSTNAME	/**/
228#$d_douname	DOUNAME		/**/
229#$d_host_comp	HOSTCOMPILED	/**/
230
231/* index:
232 *	This preprocessor symbol is defined, along with rindex, if the system
233 *	uses the strchr and strrchr routines instead.
234 */
235/* rindex:
236 *	This preprocessor symbol is defined, along with index, if the system
237 *	uses the strchr and strrchr routines instead.
238 */
239#$d_index	index strchr	/* cultural */
240#$d_index	rindex strrchr	/*  differences? */
241
242/* INTERNET:
243 *	This symbol, if defined, indicates that there is a mailer available
244 *	which supports internet-style addresses (user@site.domain).
245 */
246#$d_internet	INTERNET	/**/
247
248/* ISPELL:
249 *	This symbol, if defined, indicates that the GNU ispell
250 *	spelling checker that is available to Elm.
251 */
252/* ISPELL_PATH:
253 *	This symbol contains the path to the GNU ispell
254 *	spelling checker that is available to Elm.
255 */
256/* ISPELL_OPTIONS:
257 *	This symbol contains the options to the GNU ispell
258 *	spelling checker that is available to Elm.
259 */
260#$d_ispell	ISPELL	/**/
261#define		ISPELL_PATH	"$ispell_path" /**/
262#define		ISPELL_OPTIONS	"$ispell_options" /**/
263
264/* I_LOCALE:
265 *	This symbol, if defined, indicates that the file locale.h
266 *	should be included
267 */
268/* MSGCAT:
269 *	This symbol, if defined, indicates that the MSGCAT NLS libraries
270 *	are available.
271 */
272/* USENLS:
273 *	This symbol, if defined, indicates that the Elm NLS libraries
274 *	are being used instead of the system NLS libraries.
275 */
276#$d_locale	I_LOCALE	/**/
277#$d_nl_types	I_NL_TYPES	/**/
278#$d_msgcat	MSGCAT		/**/
279#$d_usenls	USENLS		/**/
280
281/* ALLOW_MAILBOX_EDITING:
282 *	This symbol, if defined, indicates that the E)dit mailbox
283 *	function is to be allowed.
284 */
285#$d_mboxedit	ALLOW_MAILBOX_EDITING	/**/
286
287/* MIME:
288 *	This symbol, if defined, indicates that the MIME mail
289 *	extension utilities are available
290 */
291#$d_mime	MIME	/**/
292
293/* MMDF:
294 *	This symbol, if defined, indicates that mailboxes are in
295 *	the MMDF format.
296 */
297#$d_mmdf	MMDF	/**/
298
299/* AUTO_BACKGROUND:
300 *	This symbol, if defined, indicates that newmail should go to
301 *	the background automatically.
302 */
303#$d_newauto AUTO_BACKGROUND /**/
304
305/* DONT_ADD_FROM:
306 *	This symbol, if defined, indicates that elm should not add
307 *	the From: header
308 */
309/* USE_DOMAIN:
310 *	This symbol, if defined, indicates that elm should add
311 *	the domain name to our address
312 */
313#$d_noaddfrom	DONT_ADD_FROM /**/
314#$d_usedomain	USE_DOMAIN /**/
315
316/* NO_XHEADER:
317 *	This symbol, if defined, will not automatically add "X-Mailer:"
318 *	headers.
319 */
320#$d_noxheader	NO_XHEADER	/**/
321
322/* PIDCHECK:
323 *	This symbol, if defined, means that the kill(pid, 0) will
324 *	check for an active pid.
325 */
326#$d_pidcheck PIDCHECK		/**/
327
328/* PTEM:
329 *	This symbol, if defined, indicates that the sys/ptem.h include file is
330 *	needed for window sizing.
331 */
332#$d_ptem	PTEM		/**/
333
334/* PUTENV:
335 *	This symbol, if defined, indicates that putenv() exists.
336 */
337#$d_putenv	PUTENV	/**/
338
339/* REMOVE_AT_LAST:
340 *	This symbol, if defined, tells the C code to remove the lock
341 *	file on lock failure.
342 */
343/* MAX_ATTEMPTS:
344 *	This symbol defines to the C code the number of times to try
345 *	locking the mail file.
346 */
347#$d_remlock REMOVE_AT_LAST	/**/
348#define MAX_ATTEMPTS	$maxattempts
349
350/* HAS_SETEGID:
351 *	This symbol, if defined, indicates that the setegid() routine exists.
352 */
353#$d_setegid	HAS_SETEGID		/**/
354
355/* SAVE_GROUP_MAILBOX_ID:
356 *	This symbol, if defined, indicates that Elm needs to restore the
357 *	group id of the file, as it is running setgid.
358 */
359#$d_savegrpmboxid SAVE_GROUP_MAILBOX_ID	/**/
360
361/* SIGVEC:
362 *	This symbol, if defined, indicates that BSD reliable signals routine
363 *	sigvec is available.
364 */
365/* SIGVECTOR:
366 *	This symbol, if defined, indicates that the sigvec() routine is called
367 *	sigvector() instead, and that sigspace() is provided instead of
368 *	sigstack().  This is probably only true for HP-UX.
369 */
370/* SIGSET:
371 *	This symbol, if defined, indicates that BSD reliable signal routine
372 *	sigset is available.
373 */
374/* POSIX_SIGNALS:
375 *	This symbol, if defined, indicated that POSIX sigaction
376 *	routine is available.
377 */
378/* HASSIGHOLD:
379 *	This symbol, if defined, indicates that sighold routine is
380 *	available.
381 */
382/* HASSIGBLOCK
383 *	This symbol, if defined, indicates that the sigblock routine is
384 *	available.
385 */
386/* HASSIGPROCMASK:
387 *	This symbol, if defined, indicates that POSIX sigprocmask
388 *	routine is available.
389 */
390#$d_sigvec	SIGVEC		/**/
391
392#$d_sigvectr	SIGVECTOR	/**/
393
394#$d_sigset	SIGSET	/**/
395
396#$d_sigaction	POSIX_SIGNALS	/**/
397
398#$d_sighold	HASSIGHOLD	/**/
399
400#$d_sigblock	HASSIGBLOCK	/**/
401
402#$d_sigprocmask	HASSIGPROCMASK	/**/
403
404/* ALLOW_STATUS_CHANGING:
405 *	This symbol, if defined, indicates that the S)tatus Change
406 *	function is to be allowed.
407 */
408#$d_statuschg	ALLOW_STATUS_CHANGING	/**/
409
410/* STRSPN:
411 *	This symbol, if defined, indicates that the strspn() routine exists.
412 */
413/* STRCSPN:
414 *	This symbol, if defined, indicates that the strcspn() routine exists.
415 */
416/* STRPBRK:
417 *	This symbol, if defined, indicates that the strpbrk() routine exists.
418 */
419#$d_strspn	STRSPN		/**/
420
421#$d_strcspn	STRCSPN		/**/
422
423#$d_strpbrk	STRPBRK		/**/
424
425/* STRERROR:
426 *	This symbol, if defined, indicates that strerror() exists.
427 */
428#$d_strerror	STRERROR	/**/
429
430/* STRFTIME:
431 *	This symbol, if defined, indicates that strftime() exists.
432 */
433#$d_strftime	STRFTIME	/**/
434
435/* STRINGS:
436 *	This symbol, if defined, indicates that the file strings.h
437 *	should be included not string.h
438 */
439/* PWDINSYS:
440 *	This symbol, if defined, indicates that the file pwd.h
441 *	is in the sys sub directory
442 */
443#$d_strings	STRINGS		/**/
444#$d_pwdinsys	PWDINSYS	/**/
445
446/* STRSTR:
447 *	This symbol, if defined, indicates that strstr() exists.
448 */
449#$d_strstr	STRSTR	/**/
450
451/* STRTOK:
452 *	This symbol, if defined, indicates that strtok() exists.
453 */
454#$d_strtok	STRTOK	/**/
455
456/* ALLOW_SUBSHELL:
457 *	This symbol, if defined, indicates that the '!' subshell
458 *	function is to be allowed at various places.
459 */
460#$d_subshell	ALLOW_SUBSHELL	/**/
461
462/* TEMPNAM:
463 *	This symbol, if defined, indicates that the tempnam() routine exists.
464 */
465#$d_tempnam	TEMPNAM		/**/
466
467/* TERMIOS:
468 *	This symbol, if defined, indicates that the program should include
469 *	termios.h rather than sgtty.h or termio.h.  There are also differences
470 *	in the ioctl() calls that depend on the value of this symbol.
471 */
472/* TERMIO:
473 *	This symbol, if defined, indicates that the program should include
474 *	termio.h rather than sgtty.h.  There are also differences in the
475 *	ioctl() calls that depend on the value of this symbol.
476 */
477#$d_termios	TERMIOS		/**/
478
479#$d_termio	TERMIO		/**/
480
481/* USE_EMBEDDED_ADDRESSES:
482 *	This symbol, if defined, indicates that replyto: and from:
483 *	headers can be trusted.
484 */
485#$d_useembed USE_EMBEDDED_ADDRESSES	 /**/
486
487/* UTIMBUF:
488 *	This symbol is defined if this system defines struct utimbuf.
489 */
490#$d_utimbuf UTIMBUF		/**/
491
492/* VFORK:
493 *	This symbol, if defined, indicates that vfork() exists.
494 */
495#$d_vfork	VFORK	/**/
496
497/* DEFEDITOR:
498 *	This symbol contains the name of the default editor.
499 */
500/* EDITOROPTS:
501 *	This symbol contains the command line options for the default editor.
502 */
503#define DEFEDITOR "$defeditor"		/**/
504
505#define EDITOROPTS "$editoropts"		/**/
506
507/* HOSTNAME:
508 *	This symbol contains name of the host the program is going to run on.
509 *	The domain is not kept with hostname, but must be gotten from MYDOMAIN.
510 *	The dot comes with MYDOMAIN, and need not be supplied by the program.
511 *	If gethostname() or uname() exist, HOSTNAME may be ignored.
512 */
513/* MYDOMAIN:
514 *	This symbol contains the domain of the host the program is going to
515 *	run on.  The domain must be appended to HOSTNAME to form a complete
516 *	host name.  The dot comes with MYDOMAIN, and need not be supplied by
517 *	the program.  If the host name is derived from PHOSTNAME, the domain
518 *	may or may not already be there, and the program should check.
519 */
520#define HOSTNAME "$hostname"		/**/
521#define MYDOMAIN "$mydomain"		/**/
522
523/* I_MEMORY:
524 *	This symbol, if defined, indicates that the file memory.h
525 *	should be included instead of declaring the memory routines.
526 */
527#$i_memory	I_MEMORY	/**/
528
529/* I_STDARG:
530 *	This symbol, if defined, indicates that the file stdarg.h
531 *	should be included instead of varargs
532 */
533#$i_stdarg	I_STDARG	/**/
534
535/* I_STDLIB:
536 *	This symbol, if defined, indicates that the file stdlib.h
537 *	should be included instead of declaring the stdlib routines.
538 */
539#$i_stdlib	I_STDLIB	/**/
540
541/* I_TIME:
542 *	This symbol is defined if the program should include <time.h>.
543 */
544/* I_SYSTIME:
545 *	This symbol is defined if the program should include <sys/time.h>.
546 */
547/* I_SYSTIMEKERNEL:
548 *	This symbol is defined if the program should include <sys/time.h>
549 *	with KERNEL defined.
550 */
551#$i_time		I_TIME	 	/**/
552#$i_systime	I_SYSTIME 	/**/
553#$d_systimekernel	SYSTIMEKERNEL 	/**/
554
555/* I_UNISTD:
556 *	This symbol, if defined, indicates that the file unistd.h
557 *	should be included instead of declaring the unistd routines.
558 */
559#$i_unistd	I_UNISTD	/**/
560
561/* I_UTIME:
562 *	This symbol, if defined, indicates that the file utime.h
563 *	should be included instead of declaring our own utimbuf.
564 */
565/* I_USYSTIME:
566 *	This symbol, if defined, indicates that the file sys/utime.h
567 *	should be included instead of declaring our own utimbuf.
568 */
569#$i_utime	I_UTIME	/**/
570#$i_sysutime	I_SYSUTIME	/**/
571
572/* PASSNAMES:
573 *	This symbol, if defined, indicates that full names are stored in
574 *	the /etc/passwd file.
575 */
576/* BERKNAMES:
577 *	This symbol, if defined, indicates that full names are stored in
578 *	the /etc/passwd file in Berkeley format (name first thing, everything
579 *	up to first comma, with & replaced by capitalized login ID, yuck).
580 */
581/* USGNAMES:
582 *	This symbol, if defined, indicates that full names are stored in
583 *	the /etc/passwd file in USG format (everything after - and before ( is
584 *	the name).
585 */
586#$d_passnames	PASSNAMES /*  (undef to take name from ~/.fullname) */
587#$d_berknames	BERKNAMES /* (that is, ":name,stuff:") */
588#$d_usgnames	USGNAMES  /* (that is, ":stuff-name(stuff):") */
589
590/* SIG_TYPE:
591 *	This symbol contains the type name of the signal handler functions.
592 */
593#define	SIGHAND_TYPE	$sigtype
594
595/* TZNAME_USE_xxxxxx:
596 *	Specify how to get timezone name.  Possible values are:
597 *		 TZNAME_USE_TM_NAME	use (struct tm *)->tm_name
598 *		 TZNAME_USE_TM_ZONE	use (struct tm *)->tm_zone
599 *		 TZNAME_USE_TZNAME	use "tzname[]" external
600 *		 TZNAME_USE_TIMEZONE	use timezone() function
601 */
602#define TZNAME_USE_$tzname_handling
603
604/* XENIX:
605 *	This symbol, if defined, indicates this is a Xenix system,
606 *	for knocking  out the far keyword in selected places.
607 */
608/* BSD:
609 *	This symbol, if defined, indicates this is a BSD type system,
610 */
611#$d_xenix	XENIX	/**/
612#$d_bsd	BSD	/**/
613
614!GROK!THIS!
615