This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Rename use64bits to use64bitint;
[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 \
33b2427b 22 usethreads usemultiplicity use64bitint archname64
959f3c4c
JH
23?MAKE: -pick add $@ %<
24?S:archname:
25?S: This variable is a short name to characterize the current
26?S: architecture. It is used mainly to construct the default archlib.
27?S:.
28?S:myarchname:
29?S: This variable holds the architecture name computed by Configure in
30?S: a previous run. It is not intended to be perused by any user and
31?S: should never be set in a hint file.
32?S:.
33?C:ARCHNAME:
34?C: This symbol holds a string representing the architecture name.
35?C: It may be used to construct an architecture-dependant pathname
36?C: where library files may be held under a private library, for
37?C: instance.
38?C:.
39?H:#define ARCHNAME "$archname" /**/
40?H:.
41?T:xxx tarch
42: determine the architecture name
43echo " "
44?X: We always recompute archname in case osname changes. However, we need
45?X: to be careful since, as ADO rightfully pointed out, some systems pick
46?X: silly architecture names (0001307135000-aix on AIX or 9000/715-ux under
47?X: HP-UX). Therefore, we allow hint files to superseed our guess and ask
48?X: the user for confirmation.
49if xxx=`./loc arch blurfl $pth`; $test -f "$xxx"; then
50 tarch=`arch`"-$osname"
51elif xxx=`./loc uname blurfl $pth`; $test -f "$xxx" ; then
52 if uname -m > tmparch 2>&1 ; then
53 tarch=`$sed -e 's/ *$//' -e 's/ /_/g' \
54 -e 's/$/'"-$osname/" tmparch`
55 else
56 tarch="$osname"
57 fi
58 $rm -f tmparch
59else
60 tarch="$osname"
61fi
62case "$myarchname" in
63''|"$tarch") ;;
64*)
65 echo "(Your architecture name used to be $myarchname.)"
66 archname=''
67 ;;
68esac
69myarchname="$tarch"
70case "$archname" in
71'') dflt="$tarch";;
72*) dflt="$archname";;
73esac
74rp='What is your architecture name'
75. ./myread
76archname="$ans"
77@if usethreads
78case "$usethreads" in
79$define)
80 echo "Threads selected." >&4
81 case "$archname" in
82 *-thread*) echo "...and architecture name already has -thread." >&4
83 ;;
84 *) archname="$archname-thread"
85 echo "...setting architecture name to $archname." >&4
86 ;;
87 esac
88 ;;
89esac
90@end
91@if usemultiplicity
92case "$usemultiplicity" in
93$define)
94 echo "Multiplicity selected." >&4
95 case "$archname" in
96 *-multi*) echo "...and architecture name already has -multi." >&4
97 ;;
98 *) archname="$archname-multi"
99 echo "...setting architecture name to $archname." >&4
100 ;;
101 esac
102 ;;
103esac
104@end
33b2427b
JH
105@if use64bitint
106case "$use64bitint" in
959f3c4c 107$define)
959f3c4c
JH
108 case "$archname64" in
109 '')
110 ;;
111 *)
112 case "$archname" in
113 *-$archname64*) echo "...and architecture name already has $archname64." >&4
114 ;;
115 *) archname="$archname-$archname64"
116 echo "...setting architecture name to $archname." >&4
117 ;;
118 esac
119 ;;
120 esac
121esac
122@end
123