Commit | Line | Data |
---|---|---|
d8875586 MBT |
1 | ?RCS: $Id: usrinc.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: usrinc.U,v $ | |
12 | ?RCS: Revision 3.0.1.3 1997/02/28 16:27:12 ram | |
13 | ?RCS: patch61: don't ask for the include path unless they are on a MIPS | |
14 | ?RCS: | |
15 | ?RCS: Revision 3.0.1.2 1995/05/12 12:24:36 ram | |
16 | ?RCS: patch54: ensure that ./mips always exists (ADO) | |
17 | ?RCS: | |
18 | ?RCS: Revision 3.0.1.1 1994/05/06 15:18:31 ram | |
19 | ?RCS: patch23: ensure usrinc value is preserved accross sessions (WED) | |
20 | ?RCS: | |
21 | ?RCS: Revision 3.0 1993/08/18 12:09:58 ram | |
22 | ?RCS: Baseline for dist 3.0 netwide release. | |
23 | ?RCS: | |
24 | ?MAKE:usrinc incpath mips_type: test cat echo n c Getfile Guess \ | |
25 | Oldconfig eunicefix contains rm | |
26 | ?MAKE: -pick add $@ %< | |
27 | ?S:usrinc: | |
28 | ?S: This variable holds the path of the include files, which is | |
29 | ?S: usually /usr/include. It is mainly used by other Configure units. | |
30 | ?S:. | |
31 | ?S:incpath: | |
32 | ?S: This variable must preceed the normal include path to get hte | |
33 | ?S: right one, as in "$incpath/usr/include" or "$incpath/usr/lib". | |
34 | ?S: Value can be "" or "/bsd43" on mips. | |
35 | ?S:. | |
36 | ?S:mips_type: | |
37 | ?S: This variable holds the environment type for the mips system. | |
38 | ?S: Possible values are "BSD 4.3" and "System V". | |
39 | ?S:. | |
40 | ?D:usrinc='/usr/include' | |
41 | ?LINT:create mips | |
42 | ?T:xxx_prompt | |
43 | ?F:./mips | |
44 | : What should the include directory be ? | |
45 | echo " " | |
46 | $echo $n "Hmm... $c" | |
47 | dflt='/usr/include' | |
48 | incpath='' | |
49 | ?X: mips_type is used later, to add -DSYSTYPE_BSD43 to cppflags if needed. | |
50 | mips_type='' | |
51 | ?X: | |
52 | ?X: Cannot put the following in Guess, or we get a circular dependency. | |
53 | ?X: | |
54 | if $test -f /bin/mips && /bin/mips; then | |
55 | echo "Looks like a MIPS system..." | |
56 | $cat >usr.c <<'EOCP' | |
57 | #ifdef SYSTYPE_BSD43 | |
58 | /bsd43 | |
59 | #endif | |
60 | EOCP | |
61 | if cc -E usr.c > usr.out && $contains / usr.out >/dev/null 2>&1; then | |
62 | dflt='/bsd43/usr/include' | |
63 | incpath='/bsd43' | |
64 | mips_type='BSD 4.3' | |
65 | else | |
66 | mips_type='System V' | |
67 | fi | |
68 | $rm -f usr.c usr.out | |
69 | echo "and you're compiling with the $mips_type compiler and libraries." | |
70 | xxx_prompt=y | |
71 | echo "exit 0" >mips | |
72 | else | |
73 | echo "Doesn't look like a MIPS system." | |
74 | xxx_prompt=n | |
75 | echo "exit 1" >mips | |
76 | fi | |
77 | chmod +x mips | |
78 | $eunicefix mips | |
79 | case "$usrinc" in | |
80 | '') ;; | |
81 | *) dflt="$usrinc";; | |
82 | esac | |
83 | case "$xxx_prompt" in | |
84 | y) fn=d/ | |
85 | echo " " | |
86 | rp='Where are the include files you want to use?' | |
87 | . ./getfile | |
88 | usrinc="$ans" | |
89 | ;; | |
90 | *) usrinc="$dflt" | |
91 | ;; | |
92 | esac | |
93 |