This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Remove trailing whitespace on meta-lines in unit files
[metaconfig.git] / dist / U / errnolist.U
CommitLineData
c6667804 1?RCS: $Id$
d8875586
MBT
2?RCS:
3?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
cf39bd7e 4?RCS:
c6667804 5?RCS: You may redistribute only under the terms of the Artistic License,
d8875586
MBT
6?RCS: as specified in the README file that comes with the distribution.
7?RCS: You may reuse parts of this distribution only within the terms of
c6667804 8?RCS: that same Artistic License; a copy of which may be found at the root
d8875586
MBT
9?RCS: of the source tree for dist 4.0.
10?RCS:
11?RCS: $Log: errnolist.U,v $
12?RCS: Revision 3.0.1.2 1997/02/28 15:48:01 ram
13?RCS: patch61: replaced .a with $_a all over the place
14?RCS: patch61: likewise for .o replaced by $_o
15?RCS:
16?RCS: Revision 3.0.1.1 1994/01/24 14:10:54 ram
17?RCS: patch16: created
18?RCS:
19?MAKE:errnolist errnolist_SH errnolist_a errnolist_c errnolist_o: cat +cc \
20 +ccflags +libs +d_sysernlst _a _o
21?MAKE: -pick add $@ %<
22?S:errnolist:
23?S: This variable holds the base name of a file containing the
24?S: definition of the sys_errnolist array, if the C library
25?S: doesn't provide it already. Otherwise, its value is empty.
26?S: The following lines should be included in your Makefile.SH:
cf39bd7e 27?S:
d8875586
MBT
28?S: case "$errnolist" in
29?S: '') ;;
30?S: *)
31?S: $spitshell >>Makefile <<!GROK!THIS!
32?S: $errnolist_c: $errnolist_SH $errnolist_a
33?S: sh ./$errnolist_SH
cf39bd7e 34?S:
d8875586
MBT
35?S: !GROK!THIS!
36?S: ;;
37?S: esac
cf39bd7e 38?S:
d8875586
MBT
39?S: You may define the 'errnolist' variable in your Myinit.U if you
40?S: wish to override its default value "errnolist".
41?S:.
42?S:errnolist_SH:
43?S: This is the name of a file which will generate errnolistc.
44?S:.
45?S:errnolist_a:
46?S: This is the name of the awk script called by errnolist_SH.
47?S:.
48?S:errnolist_c:
49?S: This is the name of a generated C file which provides the
50?S: definition of the sys_errnolist array.
51?S:.
52?S:errnolist_o:
53?S: This is the name of the object file which provides the
54?S: definition of the sys_errnolist array, if the C library
55?S: doesn't provide it already. Otherwise, its value is empty.
56?S:.
57?INIT:errnolist=errnolist
58: check for sys_errnolist
59@if d_sysernlst || HAS_SYS_ERRNOLIST
60case "$d_sysernlst" in
61"$define")
62 errnolist=''
63 errnolist_SH=''
64 errnolist_a=''
65 errnolist_c=''
66 errnolist_o=''
67 ;;
68*)
69 echo " "
70 echo "I'll make sure your Makefile provides sys_errnolist in $errnolist.c"
71 errnolist_SH=$errnolist.SH
72 errnolist_a=$errnolist$_a
73 errnolist_c=$errnolist.c
74 errnolist_o=$errnolist$_o
75 ;;
76esac
77@else
78echo " "
79$cat <<EOM
80Checking to see if your C library provides us with sys_errnolist[]...
81EOM
82$cat >errnolist.c <<'EOCP'
83extern char *sys_errnolist[];
84int main() {
85 char *p0 = sys_errnolist[0];
86 char *p1 = sys_errnolist[1];
87
88 return (p0 == p1); /* Make sure they're not optimized away */
89}
90EOCP
91if $cc $ccflags -o errnolist errnolist.c $libs >/dev/null 2>&1 ; then
92 echo "It does."
93 errnolist=''
94 errnolist_SH=''
95 errnolist_a=''
96 errnolist_c=''
97 errnolist_o=''
98else
99 echo "I'll make sure your Makefile provides sys_errnolist in $errnolist.c"
100 errnolist_SH=$errnolist.SH
101 errnolist_a=$errnolist$_a
102 errnolist_c=$errnolist.c
103 errnolist_o=$errnolist$_o
104fi
105@end
106