3 if test ! -f config.sh; then
5 ln ../../config.sh . || \
6 ln ../../../config.sh . || \
7 (echo "Can't find config.sh."; exit 1)
8 echo "Using config.sh from above..."
13 echo "Extracting config.h (with variable substitutions)"
14 sed <<!GROK!THIS! >config.h -e 's!^#undef!/\*#undef!'
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
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.
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.
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.
37 #$d_eunice EUNICE /**/
41 * This symbol holds the name of the directory in which the user wants
42 * to put publicly executable images for the package in question. It
43 * is most often a local directory such as /usr/local/bin.
45 #define BIN "$bin" /**/
48 * This symbol contains an encoding of the order of bytes in a long.
49 * Usual values (in octal) are 01234, 04321, 02143, 03412...
51 #define BYTEORDER 0x$byteorder /**/
54 * This symbol contains the first part of the string which will invoke
55 * the C preprocessor on the standard input and produce to standard
56 * output. Typical value of "cc -E" or "/lib/cpp".
59 * This symbol contains the second part of the string which will invoke
60 * the C preprocessor on the standard input and produce to standard
61 * output. This symbol will have the value "-" if CPPSTDIN needs a minus
62 * to specify standard input, otherwise the value is "".
64 #define CPPSTDIN "$cppstdin"
65 #define CPPMINUS "$cppminus"
68 * This symbol, if defined, indicates that the bcmp routine is available
69 * to compare blocks of memory. If undefined, use memcmp. If that's
70 * not available, roll your own.
75 * This symbol, if defined, indicates that the bcopy routine is available
76 * to copy blocks of memory. Otherwise you should probably use memcpy().
81 * This symbol, if defined, indicates that the bzero routine is available
82 * to zero blocks of memory. Otherwise you should probably use memcpy().
87 * This symbol is defined if this system declares "char *sprintf()" in
88 * stdio.h. The trend seems to be to declare it as "int sprintf()". It
89 * is up to the package author to declare sprintf correctly based on the
92 #$d_charsprf CHARSPRINTF /**/
95 * This symbol, if defined, indicates that the crypt routine is available
96 * to encrypt passwords and the like.
101 * This symbol, if defined, indicates that the C-shell exists.
102 * If defined, contains the full pathname of csh.
104 #$d_csh CSH "$csh" /**/
107 * This symbol, if defined, indicates that the C program should
108 * check the script that it is executing for setuid/setgid bits, and
109 * attempt to emulate setuid/setgid on systems that have disabled
110 * setuid #! scripts because the kernel can't do it securely.
111 * It is up to the package designer to make sure that this emulation
112 * is done securely. Among other things, it should do an fstat on
113 * the script it just opened to make sure it really is a setuid/setgid
114 * script, it should make sure the arguments passed correspond exactly
115 * to the argument on the #! line, and it should not trust any
116 * subprocesses to which it must pass the filename rather than the
117 * file descriptor of the script to be executed.
119 #$d_dosuid DOSUID /**/
122 * This symbol, if defined, indicates that the dup2 routine is available
123 * to dup file descriptors. Otherwise you should use dup().
128 * This symbol, if defined, indicates that the fchmod routine is available
129 * to change mode of opened files. If unavailable, use chmod().
131 #$d_fchmod FCHMOD /**/
134 * This symbol, if defined, indicates that the fchown routine is available
135 * to change ownership of opened files. If unavailable, use chown().
137 #$d_fchown FCHOWN /**/
140 * This symbol, if defined, indicates to the C program that it should
146 * This symbol, if defined, indicates that the flock() routine is
147 * available to do file locking.
152 * This symbol, if defined, indicates that the getgroups() routine is
153 * available to get the list of process groups. If unavailable, multiple
154 * groups are probably not supported.
156 #$d_getgrps GETGROUPS /**/
159 * This symbol, if defined, indicates that the gethostent() routine is
160 * available to lookup host names in some data base or other.
162 #$d_gethent GETHOSTENT /**/
165 * This symbol, if defined, indicates that the getpgrp() routine is
166 * available to get the current process group.
168 #$d_getpgrp GETPGRP /**/
171 * This symbol, if defined, indicates that the getpgrp2() (as in DG/UX)
172 * routine is available to get the current process group.
174 #$d_getpgrp2 GETPGRP2 /**/
177 * This symbol, if defined, indicates that the getpriority() routine is
178 * available to get a process's priority.
180 #$d_getprior GETPRIORITY /**/
183 * This symbol, if defined, indicates that the htons routine (and friends)
184 * are available to do network order byte swapping.
187 * This symbol, if defined, indicates that the htonl routine (and friends)
188 * are available to do network order byte swapping.
191 * This symbol, if defined, indicates that the ntohs routine (and friends)
192 * are available to do network order byte swapping.
195 * This symbol, if defined, indicates that the ntohl routine (and friends)
196 * are available to do network order byte swapping.
204 * This preprocessor symbol is defined, along with rindex, if the system
205 * uses the strchr and strrchr routines instead.
208 * This preprocessor symbol is defined, along with index, if the system
209 * uses the strchr and strrchr routines instead.
211 #$d_index index strchr /* cultural */
212 #$d_index rindex strrchr /* differences? */
215 * This symbol, if defined, indicates that sys/ioctl.h exists and should
221 * This symbol, if defined, indicates that the killpg routine is available
222 * to kill process groups. If unavailable, you probably should use kill
223 * with a negative process number.
225 #$d_killpg KILLPG /**/
228 * This symbol, if defined, indicates that the lstat() routine is
229 * available to do file locking.
234 * This symbol, if defined, indicates that the memcmp routine is available
235 * to compare blocks of memory. If undefined, roll your own.
237 #$d_memcmp MEMCMP /**/
240 * This symbol, if defined, indicates that the memcpy routine is available
241 * to copy blocks of memory. Otherwise you should probably use bcopy().
242 * If neither is defined, roll your own.
244 #$d_memcpy MEMCPY /**/
247 * This symbol, if defined, indicates that the mkdir routine is available
248 * to create directories. Otherwise you should fork off a new process to
254 * This symbol, if defined, indicates that ndbm.h exists and should
260 * This symbol, if defined, indicates that dbm.h exists and should
266 * This symbol, if defined, indicates that the readdir routine is available
267 * from the C library to create directories.
269 #$d_readdir READDIR /**/
272 * This symbol, if defined, indicates that the rename routine is available
273 * to rename files. Otherwise you should do the unlink(), link(), unlink()
276 #$d_rename RENAME /**/
279 * This symbol, if defined, indicates that the rmdir routine is available
280 * to remove directories. Otherwise you should fork off a new process to
286 * This symbol, if defined, indicates that the setegid routine is available
287 * to change the effective gid of the current program.
289 #$d_setegid SETEGID /**/
292 * This symbol, if defined, indicates that the seteuid routine is available
293 * to change the effective uid of the current program.
295 #$d_seteuid SETEUID /**/
298 * This symbol, if defined, indicates that the setpgrp() routine is
299 * available to set the current process group.
301 #$d_setpgrp SETPGRP /**/
304 * This symbol, if defined, indicates that the setpgrp2() (as in DG/UX)
305 * routine is available to set the current process group.
307 #$d_setpgrp2 SETPGRP2 /**/
310 * This symbol, if defined, indicates that the setpriority() routine is
311 * available to set a process's priority.
313 #$d_setprior SETPRIORITY /**/
316 * This symbol, if defined, indicates that the setregid routine is
317 * available to change the real and effective gid of the current program.
320 * This symbol, if defined, indicates that the setresgid routine is
321 * available to change the real, effective and saved gid of the current
324 #$d_setregid SETREGID /**/
325 #$d_setresgid SETRESGID /**/
328 * This symbol, if defined, indicates that the setreuid routine is
329 * available to change the real and effective uid of the current program.
332 * This symbol, if defined, indicates that the setresuid routine is
333 * available to change the real, effective and saved uid of the current
336 #$d_setreuid SETREUID /**/
337 #$d_setresuid SETRESUID /**/
340 * This symbol, if defined, indicates that the setrgid routine is available
341 * to change the real gid of the current program.
343 #$d_setrgid SETRGID /**/
346 * This symbol, if defined, indicates that the setruid routine is available
347 * to change the real uid of the current program.
349 #$d_setruid SETRUID /**/
352 * This symbol, if defined, indicates that the BSD socket interface is
356 * This symbol, if defined, indicates that the BSD socketpair call is
360 * This symbol, if defined, indicates that the 4.1c BSD socket interface
361 * is supported instead of the 4.2/4.3 BSD socket interface.
363 #$d_socket SOCKET /**/
365 #$d_sockpair SOCKETPAIR /**/
367 #$d_oldsock OLDSOCKET /**/
370 * This symbol is defined if this system has a stat structure declaring
371 * st_blksize and st_blocks.
373 #$d_statblks STATBLOCKS /**/
376 * This symbol is defined if this system has a FILE structure declaring
377 * _ptr and _cnt in stdio.h.
379 #$d_stdstdio STDSTDIO /**/
382 * This symbol, if defined, indicates that this C compiler knows how
383 * to copy structures. If undefined, you'll need to use a block copy
384 * routine of some sort instead.
386 #$d_strctcpy STRUCTCOPY /**/
389 * This symbol, if defined, indicates that the strerror() routine is
390 * available to translate error numbers to strings.
392 #$d_strerror STRERROR /**/
395 * This symbol, if defined, indicates that the symlink routine is available
396 * to create symbolic links.
398 #$d_symlink SYMLINK /**/
401 * This symbol, if defined, indicates that the syscall routine is available
402 * to call arbitrary system calls. If undefined, that's tough.
404 #$d_syscall SYSCALL /**/
407 * This symbol, if defined, indicates to the C program that it should
410 #$d_varargs VARARGS /**/
413 * This symbol, if defined, indicates that vfork() exists.
418 * This symbol is defined if this system declares "void (*signal())()" in
419 * signal.h. The old way was to declare it as "int (*signal())()". It
420 * is up to the package author to declare things correctly based on the
423 #$d_voidsig VOIDSIG /**/
426 * This symbol, if defined, indicates that this C compiler knows about
427 * the volatile declaration.
429 #$d_volatile HASVOLATILE /**/
432 * This symbol, if defined, indicates that the vprintf routine is available
433 * to printf with a pointer to an argument list. If unavailable, you
434 * may need to write your own, probably in terms of _doprnt().
437 * This symbol is defined if this system has vsprintf() returning type
438 * (char*). The trend seems to be to declare it as "int vsprintf()". It
439 * is up to the package author to declare vsprintf correctly based on the
442 #$d_vprintf VPRINTF /**/
443 #$d_charvspr CHARVSPRINTF /**/
446 * This symbol, if defined, indicates that wait4() exists.
451 * This symbol has a value like gid_t, int, ushort, or whatever type is
452 * used to declare group ids in the kernel.
454 #define GIDTYPE $gidtype /**/
457 * This symbol, if defined, indicates to the C program that it should
461 * This symbol, if defined, indicates to the C program that the length
462 * of directory entry names is provided by a d_namlen field. Otherwise
463 * you need to do strlen() on the d_name field.
465 #$i_dirent I_DIRENT /**/
466 #$d_dirnamlen DIRNAMLEN /**/
469 * This symbol, if defined, indicates to the C program that it should
472 #$i_fcntl I_FCNTL /**/
475 * This symbol, if defined, indicates to the C program that it should
481 * This symbol, if defined, indicates to the C program that it should
482 * include netinet/in.h.
484 #$i_niin I_NETINET_IN /**/
487 * This symbol, if defined, indicates to the C program that it should
491 * This symbol, if defined, indicates to the C program that struct passwd
495 * This symbol, if defined, indicates to the C program that struct passwd
499 * This symbol, if defined, indicates to the C program that struct passwd
500 * contains pw_change.
503 * This symbol, if defined, indicates to the C program that struct passwd
507 * This symbol, if defined, indicates to the C program that struct passwd
508 * contains pw_expire.
511 #$d_pwquota PWQUOTA /**/
513 #$d_pwchange PWCHANGE /**/
514 #$d_pwclass PWCLASS /**/
515 #$d_pwexpire PWEXPIRE /**/
518 * This symbol, if defined, indicates to the C program that it should
521 #$i_sysdir I_SYSDIR /**/
524 * This symbol, if defined, indicates that sys/ioctl.h exists and should
527 #$i_sysioctl I_SYSIOCTL /**/
530 * This symbol, if defined, indicates to the C program that it should
531 * include sys/ndir.h.
533 #$i_sysndir I_SYSNDIR /**/
536 * This symbol is defined if the program should include <time.h>.
539 * This symbol is defined if the program should include <sys/time.h>.
542 * This symbol is defined if the program should include <sys/time.h>
543 * with KERNEL defined.
546 #$i_systime I_SYSTIME /**/
547 #$d_systimekernel SYSTIMEKERNEL /**/
550 * This symbol, if defined, indicates to the C program that it should
553 #$i_utime I_UTIME /**/
556 * This symbol, if defined, indicates to the C program that it should
559 #$i_varargs I_VARARGS /**/
562 * This symbol, if defined, indicates to the C program that it should
565 #$i_vfork I_VFORK /**/
568 * This symbol contains the size of an int, so that the C preprocessor
569 * can make decisions based on it.
571 #define INTSIZE $intsize /**/
574 * This symbol contains the number of bits of random number the rand()
575 * function produces. Usual values are 15, 16, and 31.
577 #define RANDBITS $randbits /**/
580 * This symbol contains an list of signal names in order.
582 #define SIG_NAME "`echo $sig_name | sed 's/ /","/g'`" /**/
585 * This symbol is defined to be the type of char used in stdio.h.
586 * It has the values "unsigned char" or "char".
588 #define STDCHAR $stdchar /**/
591 * This symbol has a value like uid_t, int, ushort, or whatever type is
592 * used to declare user ids in the kernel.
594 #define UIDTYPE $uidtype /**/
597 * This symbol indicates how much support of the void type is given by this
598 * compiler. What various bits mean:
600 * 1 = supports declaration of void
601 * 2 = supports arrays of pointers to functions returning void
602 * 4 = supports comparisons between pointers to void functions and
603 * addresses of void functions
605 * The package designer should define VOIDUSED to indicate the requirements
606 * of the package. This can be done either by #defining VOIDUSED before
607 * including config.h, or by defining defvoidused in Myinit.U. If the
608 * latter approach is taken, only those flags will be tested. If the
609 * level of void support necessary is not present, defines void to int.
612 #define VOIDUSED $defvoidused
614 #define VOIDFLAGS $voidflags
615 #if (VOIDFLAGS & VOIDUSED) != VOIDUSED
616 #$define void int /* is void to be avoided? */
617 #$define M_VOID /* Xenix strikes again */
621 * This symbol contains the name of the private library for this package.
622 * The library is private in the sense that it needn't be in anyone's
623 * execution path, but it should be accessible by the world. The program
624 * should be prepared to do ~ expansion.
626 #define PRIVLIB "$privlib" /**/