This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Introduce ccname to keep track of what compiler kind of we have.
[metaconfig.git] / U / threads / archname.U
CommitLineData
959f3c4c
JH
1?RCS: $Id: archname.U,v 3.0.1.3 1997/02/28 15:24:32 ram 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 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 3.0.
10?RCS:
11?RCS: $Log: archname.U,v $
12?RCS: Revision 3.0.1.3 1997/02/28 15:24:32 ram
13?RCS: patch61: changed the way the archname is mangled from uname
14?RCS:
15?RCS: Revision 3.0.1.2 1995/05/12 12:05:24 ram
16?RCS: patch54: protect against spaces in "uname -m" output (ADO)
17?RCS:
18?RCS: Revision 3.0.1.1 1995/02/15 14:14:21 ram
19?RCS: patch51: created
20?RCS:
21?MAKE:archname myarchname: sed Loc Myread Oldconfig osname test rm \
2df8a4b1
JH
22 usethreads usemultiplicity use64bitint use64bitall archname64 \
23 uselongdouble
959f3c4c
JH
24?MAKE: -pick add $@ %<
25?S:archname:
26?S: This variable is a short name to characterize the current
27?S: architecture. It is used mainly to construct the default archlib.
28?S:.
29?S:myarchname:
30?S: This variable holds the architecture name computed by Configure in
31?S: a previous run. It is not intended to be perused by any user and
32?S: should never be set in a hint file.
33?S:.
34?C:ARCHNAME:
35?C: This symbol holds a string representing the architecture name.
36?C: It may be used to construct an architecture-dependant pathname
37?C: where library files may be held under a private library, for
38?C: instance.
39?C:.
40?H:#define ARCHNAME "$archname" /**/
41?H:.
42?T:xxx tarch
43: determine the architecture name
44echo " "
45?X: We always recompute archname in case osname changes. However, we need
46?X: to be careful since, as ADO rightfully pointed out, some systems pick
47?X: silly architecture names (0001307135000-aix on AIX or 9000/715-ux under
48?X: HP-UX). Therefore, we allow hint files to superseed our guess and ask
49?X: the user for confirmation.
50if xxx=`./loc arch blurfl $pth`; $test -f "$xxx"; then
51 tarch=`arch`"-$osname"
52elif xxx=`./loc uname blurfl $pth`; $test -f "$xxx" ; then
53 if uname -m > tmparch 2>&1 ; then
54 tarch=`$sed -e 's/ *$//' -e 's/ /_/g' \
55 -e 's/$/'"-$osname/" tmparch`
56 else
57 tarch="$osname"
58 fi
59 $rm -f tmparch
60else
61 tarch="$osname"
62fi
63case "$myarchname" in
64''|"$tarch") ;;
65*)
66 echo "(Your architecture name used to be $myarchname.)"
67 archname=''
68 ;;
69esac
70myarchname="$tarch"
71case "$archname" in
72'') dflt="$tarch";;
73*) dflt="$archname";;
74esac
75rp='What is your architecture name'
76. ./myread
77archname="$ans"
78@if usethreads
79case "$usethreads" in
80$define)
81 echo "Threads selected." >&4
82 case "$archname" in
83 *-thread*) echo "...and architecture name already has -thread." >&4
84 ;;
85 *) archname="$archname-thread"
86 echo "...setting architecture name to $archname." >&4
87 ;;
88 esac
89 ;;
90esac
91@end
92@if usemultiplicity
93case "$usemultiplicity" in
94$define)
95 echo "Multiplicity selected." >&4
96 case "$archname" in
97 *-multi*) echo "...and architecture name already has -multi." >&4
98 ;;
99 *) archname="$archname-multi"
100 echo "...setting architecture name to $archname." >&4
101 ;;
102 esac
103 ;;
104esac
105@end
33b2427b 106@if use64bitint
2df8a4b1
JH
107case "$use64bitint$use64bitall" in
108*"$define"*)
959f3c4c
JH
109 case "$archname64" in
110 '')
111 ;;
112 *)
2df8a4b1
JH
113 case "$use64bitint" in
114 "$define") echo "64 bit integers selected." >&4 ;;
115 esac
116 case "$use64bitall" in
117 "$define") echo "64 bit memory model selected." >&4 ;;
118 esac
959f3c4c
JH
119 case "$archname" in
120 *-$archname64*) echo "...and architecture name already has $archname64." >&4
121 ;;
122 *) archname="$archname-$archname64"
123 echo "...setting architecture name to $archname." >&4
124 ;;
125 esac
126 ;;
127 esac
128esac
129@end
2df8a4b1
JH
130@if uselongdouble
131case "$uselongdouble" in
132$define)
133 echo "Long doubles selected." >&4
134 case "$archname" in
135 *-ld*) echo "...and architecture name already has -ld." >&4
136 ;;
137 *) archname="$archname-ld"
138 echo "...setting architecture name to $archname." >&4
139 ;;
140 esac
141 ;;
142esac
143@end
959f3c4c 144