From 0e57f0c510b7d7eb688695359048a1f0a585e26a Mon Sep 17 00:00:00 2001 From: rmanfredi Date: Thu, 24 Aug 2006 12:32:52 +0000 Subject: Moving project to sourceforge. git-svn-id: svn://svn.code.sf.net/p/dist/code/trunk/dist@1 2592e710-e01b-42a5-8df0-11608a6cc53d --- mcon/U/Inlibc.U | 64 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 mcon/U/Inlibc.U (limited to 'mcon/U/Inlibc.U') diff --git a/mcon/U/Inlibc.U b/mcon/U/Inlibc.U new file mode 100644 index 0000000..64fd37a --- /dev/null +++ b/mcon/U/Inlibc.U @@ -0,0 +1,64 @@ +?RCS: $Id$ +?RCS: +?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi +?RCS: +?RCS: You may redistribute only under the terms of the Artistic Licence, +?RCS: as specified in the README file that comes with the distribution. +?RCS: You may reuse parts of this distribution only within the terms of +?RCS: that same Artistic Licence; a copy of which may be found at the root +?RCS: of the source tree for dist 4.0. +?RCS: +?RCS: $Log: Inlibc.U,v $ +?RCS: Revision 3.0.1.1 1994/10/29 15:55:08 ram +?RCS: patch36: call ./whoa explicitely instead of relying on PATH +?RCS: +?RCS: Revision 3.0 1993/08/18 12:05:03 ram +?RCS: Baseline for dist 3.0 netwide release. +?RCS: +?X: +?X: This unit checks for the definition of a given function. +?X: +?X: To use it, say: +?X: set function d_func +?X: eval $inlibc +?X: +?MAKE:Inlibc: Csym Whoa Oldconfig +?MAKE: -pick add $@ %< +?LINT:define inlibc +?V:inlibc +?S:inlibc: +?S: This shell variable is used internally by Configure to check +?S: wether a given function is defined or not. A typical use is: +?S: set function d_func +?S: eval $inlibc +?S: That will print a message, saying wether function was found or +?S: not and set d_func accordingly. +?S:. +?T:was tx sym tres td tu var +: define an is-in-libc? function +inlibc='echo " "; td=$define; tu=$undef; +sym=$1; var=$2; eval "was=\$$2"; +tx=yes; +case "$reuseval$was" in +true) ;; +true*) tx=no;; +esac; +case "$tx" in +yes) + set $sym tres -f; + eval $csym; + case "$tres" in + true) + echo "$sym() found." >&4; + case "$was" in $undef) . ./whoa; esac; eval "$var=\$td";; + *) + echo "$sym() NOT found." >&4; + case "$was" in $define) . ./whoa; esac; eval "$var=\$tu";; + esac;; +*) + case "$was" in + $define) echo "$sym() found." >&4;; + *) echo "$sym() NOT found." >&4;; + esac;; +esac' + -- cgit v1.2.3