This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Mc.u.c. for #10573.
[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 22 usethreads usemultiplicity use64bitint use64bitall archname64 \
925672f8 23 uselongdouble longdblsize doublesize useperlio
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
662bdb9a 43?INIT:archname=''
959f3c4c
JH
44: determine the architecture name
45echo " "
46?X: We always recompute archname in case osname changes. However, we need
47?X: to be careful since, as ADO rightfully pointed out, some systems pick
48?X: silly architecture names (0001307135000-aix on AIX or 9000/715-ux under
49?X: HP-UX). Therefore, we allow hint files to superseed our guess and ask
50?X: the user for confirmation.
51if xxx=`./loc arch blurfl $pth`; $test -f "$xxx"; then
52 tarch=`arch`"-$osname"
53elif xxx=`./loc uname blurfl $pth`; $test -f "$xxx" ; then
54 if uname -m > tmparch 2>&1 ; then
55 tarch=`$sed -e 's/ *$//' -e 's/ /_/g' \
56 -e 's/$/'"-$osname/" tmparch`
57 else
58 tarch="$osname"
59 fi
60 $rm -f tmparch
61else
62 tarch="$osname"
63fi
64case "$myarchname" in
65''|"$tarch") ;;
66*)
67 echo "(Your architecture name used to be $myarchname.)"
68 archname=''
69 ;;
70esac
71myarchname="$tarch"
72case "$archname" in
73'') dflt="$tarch";;
74*) dflt="$archname";;
75esac
76rp='What is your architecture name'
77. ./myread
78archname="$ans"
79@if usethreads
80case "$usethreads" in
81$define)
82 echo "Threads selected." >&4
83 case "$archname" in
84 *-thread*) echo "...and architecture name already has -thread." >&4
85 ;;
86 *) archname="$archname-thread"
87 echo "...setting architecture name to $archname." >&4
88 ;;
89 esac
90 ;;
91esac
92@end
93@if usemultiplicity
94case "$usemultiplicity" in
95$define)
96 echo "Multiplicity selected." >&4
97 case "$archname" in
98 *-multi*) echo "...and architecture name already has -multi." >&4
99 ;;
100 *) archname="$archname-multi"
101 echo "...setting architecture name to $archname." >&4
102 ;;
103 esac
104 ;;
105esac
106@end
33b2427b 107@if use64bitint
2df8a4b1
JH
108case "$use64bitint$use64bitall" in
109*"$define"*)
959f3c4c
JH
110 case "$archname64" in
111 '')
6cadf241 112 echo "This architecture is naturally 64-bit, not changing architecture name." >&4
959f3c4c
JH
113 ;;
114 *)
2df8a4b1
JH
115 case "$use64bitint" in
116 "$define") echo "64 bit integers selected." >&4 ;;
117 esac
118 case "$use64bitall" in
e7d5292a 119 "$define") echo "Maximal 64 bitness selected." >&4 ;;
2df8a4b1 120 esac
959f3c4c
JH
121 case "$archname" in
122 *-$archname64*) echo "...and architecture name already has $archname64." >&4
123 ;;
124 *) archname="$archname-$archname64"
125 echo "...setting architecture name to $archname." >&4
126 ;;
127 esac
128 ;;
129 esac
130esac
131@end
2df8a4b1
JH
132@if uselongdouble
133case "$uselongdouble" in
134$define)
135 echo "Long doubles selected." >&4
e7d5292a
JH
136 case "$longdblsize" in
137 $doublesize)
138 "...but long doubles are equal to doubles, not changing architecture name." >&4
139 ;;
140 *)
141 case "$archname" in
142 *-ld*) echo "...and architecture name already has -ld." >&4
143 ;;
144 *) archname="$archname-ld"
145 echo "...setting architecture name to $archname." >&4
146 ;;
147 esac
148 ;;
149 esac
2df8a4b1
JH
150 ;;
151esac
152@end
925672f8
JH
153@if useperlio
154case "$useperlio" in
155$define)
156 echo "Perlio selected." >&4
56542514
JH
157 ;;
158*)
159 echo "Perlio not selected, using stdio." >&4
925672f8 160 case "$archname" in
56542514 161 *-stdio*) echo "...and architecture name already has -stdio." >&4
925672f8 162 ;;
56542514 163 *) archname="$archname-stdio"
925672f8
JH
164 echo "...setting architecture name to $archname." >&4
165 ;;
166 esac
167 ;;
168esac
169@end
959f3c4c 170