1 ?RCS: $Id: Inlibc.U 1 2006-08-24 12:32:52Z rmanfredi $
3 ?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
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 4.0.
11 ?RCS: $Log: Inlibc.U,v $
12 ?RCS: Revision 3.0.1.1 1994/10/29 15:55:08 ram
13 ?RCS: patch36: call ./whoa explicitly instead of relying on PATH
15 ?RCS: Revision 3.0 1993/08/18 12:05:03 ram
16 ?RCS: Baseline for dist 3.0 netwide release.
19 ?X: This unit checks for the definition of a given function.
22 ?X: set function d_func
25 ?MAKE:Inlibc: Csym Whoa Oldconfig
26 ?MAKE: -pick add $@ %<
30 ?S: This shell variable is used internally by Configure to check
31 ?S: wether a given function is defined or not. A typical use is:
32 ?S: set function d_func
34 ?S: That will print a message, saying wether function was found or
35 ?S: not and set d_func accordingly.
37 ?T:was tx sym tres td tu var
38 : define an is-in-libc? function
39 inlibc='echo " "; td=$define; tu=$undef;
40 sym=$1; var=$2; eval "was=\$$2";
42 case "$reuseval$was" in
52 echo "$sym() found." >&4;
53 case "$was" in $undef) . ./whoa; esac; eval "$var=\$td";;
55 echo "$sym() NOT found." >&4;
56 case "$was" in $define) . ./whoa; esac; eval "$var=\$tu";;
60 $define) echo "$sym() found." >&4;;
61 *) echo "$sym() NOT found." >&4;;