summaryrefslogtreecommitdiff
path: root/mcon/U/archname.U
blob: 8d79e2aad25d7f05fc0a715e6c302af3c14387d5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
?RCS: $Id$
?RCS:
?RCS: Copyright (c) 1991-1997, 2004-2006, Raphael Manfredi
?RCS:
?RCS: You may redistribute only under the terms of the Artistic License,
?RCS: as specified in the README file that comes with the distribution.
?RCS: You may reuse parts of this distribution only within the terms of
?RCS: that same Artistic License; a copy of which may be found at the root
?RCS: of the source tree for dist 4.0.
?RCS:
?RCS: $Log: archname.U,v $
?RCS: Revision 3.0.1.3  1997/02/28  15:24:32  ram
?RCS: patch61: changed the way the archname is mangled from uname
?RCS:
?RCS: Revision 3.0.1.2  1995/05/12  12:05:24  ram
?RCS: patch54: protect against spaces in "uname -m" output (ADO)
?RCS:
?RCS: Revision 3.0.1.1  1995/02/15  14:14:21  ram
?RCS: patch51: created
?RCS:
?MAKE:archname myarchname: sed Loc Myread Oldconfig osname test rm
?MAKE:	-pick add $@ %<
?S:archname:
?S:	This variable is a short name to characterize the current
?S:	architecture.  It is used mainly to construct the default archlib.
?S:.
?S:myarchname:
?S:	This variable holds the architecture name computed by Configure in
?S:	a previous run. It is not intended to be perused by any user and
?S:	should never be set in a hint file.
?S:.
?C:ARCHNAME:
?C:	This symbol holds a string representing the architecture name.
?C:	It may be used to construct an architecture-dependant pathname
?C:	where library files may be held under a private library, for
?C:	instance.
?C:.
?H:#define ARCHNAME "$archname"		/**/
?H:.
?T:xxx tarch
: determine the architecture name
echo " "
?X: We always recompute archname in case osname changes. However, we need
?X: to be careful since, as ADO rightfully pointed out, some systems pick
?X: silly architecture names (0001307135000-aix on AIX or 9000/715-ux under
?X: HP-UX). Therefore, we allow hint files to superseed our guess and ask
?X: the user for confirmation.
if xxx=`./loc arch blurfl $pth`; $test -f "$xxx"; then
	tarch=`arch`"-$osname"
elif xxx=`./loc uname blurfl $pth`; $test -f "$xxx" ; then
	if uname -m > tmparch 2>&1 ; then
		tarch=`$sed -e 's/ *$//' -e 's/ /_/g' \
			-e 's/$/'"-$osname/" tmparch`
	else
		tarch="$osname"
	fi
	$rm -f tmparch
else
	tarch="$osname"
fi
case "$myarchname" in
''|"$tarch") ;;
*)
	echo "(Your architecture name used to be $myarchname.)"
	archname=''
	;;
esac
case "$archname" in
'') dflt="$tarch";;
*) dflt="$archname";;
esac
rp='What is your architecture name'
. ./myread
archname="$ans"
myarchname="$tarch"