This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
RE: [perl #26136] localtime(3) calls tzset(3), but localtime_r(3) may not.
[metaconfig.git] / U / modified / Inhdr.U
CommitLineData
937acff7
JH
1?RCS: $Id: Inhdr.U,v 3.0.1.2 1995/05/12 12:01:31 ram Exp $
2?RCS:
3?RCS: Copyright (c) 1991-1993, Raphael Manfredi
4?RCS:
5?RCS: You may redistribute only under the terms of the Artistic Licence,
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
8?RCS: that same Artistic Licence; a copy of which may be found at the root
9?RCS: of the source tree for dist 3.0.
10?RCS:
11?RCS: $Log: Inhdr.U,v $
12?RCS: Revision 3.0.1.2 1995/05/12 12:01:31 ram
13?RCS: patch54: deleted tabs that caused some /bin/sh to core dump (ADO)
14?RCS:
15?RCS: Revision 3.0.1.1 1994/10/29 15:55:01 ram
16?RCS: patch36: call ./whoa explicitely instead of relying on PATH
17?RCS:
18?RCS: Revision 3.0 1993/08/18 12:05:01 ram
19?RCS: Baseline for dist 3.0 netwide release.
20?RCS:
21?X:
22?X: This unit checks wether a set of header files exists or not.
23?X: If the first header is not found, the function tries to locate
24?X: the next header, and so on, until one is found or there is no
25?X: more header in the list.
26?X:
27?X: To use it, say:
28?X: set header i_header [ header2 i_header2 ... ]
29?X: eval $inhdr
30?X:
31?MAKE:Inhdr: test Findhdr Whoa
32?MAKE: -pick add $@ %<
33?LINT:define inhdr
34?LINT:use ccflags
35?V:inhdr
36?S:inhdr:
37?S: This shell variable is used internally by Configure to check
38?S: wether a set of headers exist or not. A typical use is:
39?S: set header i_header [ header2 i_header2 ... ]
40?S: eval $inhdr
41?S: That will print a message, saying wether header was found or
42?S: not and set i_header* accordingly. If the first header is not
43?S: found, we try the next one, until the list is empty or one is found.
44?S:.
45?T:xxx xxf var td xxnf tu yyy instead was cont
46: define an alternate in-header-list? function
47inhdr='echo " "; td=$define; tu=$undef; yyy=$@;
48cont=true; xxf="echo \"<\$1> found.\" >&4";
49case $# in 2) xxnf="echo \"<\$1> NOT found.\" >&4";;
50*) xxnf="echo \"<\$1> NOT found, ...\" >&4";;
51esac;
52case $# in 4) instead=instead;; *) instead="at last";; esac;
53while $test "$cont"; do
54 xxx=`./findhdr $1`
55 var=$2; eval "was=\$$2";
56 if $test "$xxx" && $test -r "$xxx";
57 then eval $xxf;
58?X: Next line shifted left 1 tabstop to avoid sh core dump on MachTen 2.1.1.
59 eval "case \"\$$var\" in $undef) . ./whoa; esac"; eval "$var=\$td";
60 cont="";
61 else eval $xxnf;
62?X: Likewise, the next line has been shifted left 1 tabstop -- ADO, 08/03/95
63 eval "case \"\$$var\" in $define) . ./whoa; esac"; eval "$var=\$tu"; fi;
64 set $yyy; shift; shift; yyy=$@;
65 case $# in 0) cont="";;
66 2) xxf="echo \"but I found <\$1> $instead.\" >&4";
67 xxnf="echo \"and I did not find <\$1> either.\" >&4";;
68 *) xxf="echo \"but I found <\$1\> instead.\" >&4";
69 xxnf="echo \"there is no <\$1>, ...\" >&4";;
70 esac;
71done;
72?X: Remaining values are set to 'undef'
73while $test "$yyy";
74do set $yyy; var=$2; eval "was=\$$2";
75 eval "case \"\$$var\" in $define) . ./whoa; esac"; eval "$var=\$tu";
76 set $yyy; shift; shift; yyy=$@;
77done'
78