Commit | Line | Data |
---|---|---|
d8875586 MBT |
1 | ?RCS: $Id: i_string.U 1 2006-08-24 12:32:52Z rmanfredi $ |
2 | ?RCS: | |
3 | ?RCS: Copyright (c) 1991-1997, 2004-2006, 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 4.0. | |
10 | ?RCS: | |
11 | ?RCS: $Log: i_string.U,v $ | |
12 | ?RCS: Revision 3.0.1.2 1993/10/16 13:50:12 ram | |
13 | ?RCS: patch12: special units Loc and Guess were missing from dependencies | |
14 | ?RCS: | |
15 | ?RCS: Revision 3.0.1.1 1993/09/13 16:07:26 ram | |
16 | ?RCS: patch10: removed "(Actually, this looks more like...)" messages (WAD) | |
17 | ?RCS: | |
18 | ?RCS: Revision 3.0 1993/08/18 12:08:28 ram | |
19 | ?RCS: Baseline for dist 3.0 netwide release. | |
20 | ?RCS: | |
21 | ?X: | |
22 | ?X: See if we should include <string.h> or <strings.h> | |
23 | ?X: | |
24 | ?MAKE:i_string strings: test Setvar Findhdr Warn | |
25 | ?MAKE: -pick add $@ %< | |
26 | ?S:i_string: | |
27 | ?S: This variable conditionally defines the I_STRING symbol, which | |
28 | ?S: indicates that <string.h> should be included rather than <strings.h>. | |
29 | ?S:. | |
30 | ?S:strings: | |
31 | ?S: This variable holds the full path of the string header that will be | |
32 | ?S: used. Typically /usr/include/string.h or /usr/include/strings.h. | |
33 | ?S:. | |
34 | ?C:I_STRING: | |
35 | ?C: This symbol, if defined, indicates to the C program that it should | |
36 | ?C: include <string.h> (USG systems) instead of <strings.h> (BSD systems). | |
37 | ?C:. | |
38 | ?H:#$i_string I_STRING /**/ | |
39 | ?H:. | |
40 | ?LINT:set i_string | |
41 | : see which of string.h or strings.h is needed | |
42 | echo " " | |
43 | strings=`./findhdr string.h` | |
44 | if $test "$strings" && $test -r "$strings"; then | |
45 | echo "Using <string.h> instead of <strings.h>." >&4 | |
46 | val="$define" | |
47 | else | |
48 | val="$undef" | |
49 | strings=`./findhdr strings.h` | |
50 | if $test "$strings" && $test -r "$strings"; then | |
51 | echo "Using <strings.h> instead of <string.h>." >&4 | |
52 | else | |
53 | ./warn "No string header found -- You'll surely have problems." | |
54 | fi | |
55 | fi | |
56 | set i_string | |
57 | eval $setvar | |
58 | case "$i_string" in | |
59 | "$undef") strings=`./findhdr strings.h`;; | |
60 | *) strings=`./findhdr string.h`;; | |
61 | esac | |
62 |