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