This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Populate metaconfig branch.
[metaconfig.git] / dist-3.0at70 / mcon / U / archname.U
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
22 ?MAKE:  -pick add $@ %<
23 ?S:archname:
24 ?S:     This variable is a short name to characterize the current
25 ?S:     architecture.  It is used mainly to construct the default archlib.
26 ?S:.
27 ?S:myarchname:
28 ?S:     This variable holds the architecture name computed by Configure in
29 ?S:     a previous run. It is not intended to be perused by any user and
30 ?S:     should never be set in a hint file.
31 ?S:.
32 ?C:ARCHNAME:
33 ?C:     This symbol holds a string representing the architecture name.
34 ?C:     It may be used to construct an architecture-dependant pathname
35 ?C:     where library files may be held under a private library, for
36 ?C:     instance.
37 ?C:.
38 ?H:#define ARCHNAME "$archname"         /**/
39 ?H:.
40 ?T:xxx tarch
41 : determine the architecture name
42 echo " "
43 ?X: We always recompute archname in case osname changes. However, we need
44 ?X: to be careful since, as ADO rightfully pointed out, some systems pick
45 ?X: silly architecture names (0001307135000-aix on AIX or 9000/715-ux under
46 ?X: HP-UX). Therefore, we allow hint files to superseed our guess and ask
47 ?X: the user for confirmation.
48 if xxx=`./loc arch blurfl $pth`; $test -f "$xxx"; then
49         tarch=`arch`"-$osname"
50 elif xxx=`./loc uname blurfl $pth`; $test -f "$xxx" ; then
51         if uname -m > tmparch 2>&1 ; then
52                 tarch=`$sed -e 's/ *$//' -e 's/ /_/g' \
53                         -e 's/$/'"-$osname/" tmparch`
54         else
55                 tarch="$osname"
56         fi
57         $rm -f tmparch
58 else
59         tarch="$osname"
60 fi
61 case "$myarchname" in
62 ''|"$tarch") ;;
63 *)
64         echo "(Your architecture name used to be $myarchname.)"
65         archname=''
66         ;;
67 esac
68 case "$archname" in
69 '') dflt="$tarch";;
70 *) dflt="$archname";;
71 esac
72 rp='What is your architecture name'
73 . ./myread
74 archname="$ans"
75 myarchname="$tarch"
76