This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Even better use64bitall logic.
[metaconfig.git] / U / perl / perlpath.U
1 ?RCS: $Id: perlpath.U,v 3.0.1.2 1995/09/25 09:17:04 ram Exp $
2 ?RCS:
3 ?RCS: Copyright (c) 1991-1993, Raphael Manfredi
4 ?RCS: 
5 ?RCS: This file is included with or a derivative work of a file included
6 ?RCS: with the metaconfig program of Raphael Manfredi's "dist" distribution.
7 ?RCS: In accordance with clause 7 of dist's modified Artistic License:
8 ?RCS: 
9 ?RCS:     You may distribute under the terms of either the GNU General Public
10 ?RCS:     License or the Artistic License, as specified in the README file.
11 ?RCS:
12 ?RCS: $Log: perlpath.U,v $
13 ?RCS:
14 ?RCS: Special perl5 unit -- we haven't installed perl yet.
15 ?RCS:
16 ?RCS: Revision 3.0.1.2  1995/09/25  09:17:04  ram
17 ?RCS: patch59: unit is now forced to the top of Configure, if possible
18 ?RCS:
19 ?RCS: Revision 3.0.1.1  1995/01/11  15:33:53  ram
20 ?RCS: patch45: can now use Loc variables since path stripping is deferred
21 ?RCS:
22 ?RCS: Revision 3.0  1993/08/18  12:09:32  ram
23 ?RCS: Baseline for dist 3.0 netwide release.
24 ?RCS:
25 ?X:
26 ?X: The purpose of this unit is to locate perl good enough to construct a #!
27 ?X:
28 ?MAKE:perlpath: cat Getfile Loc Myread Oldconfig binexp startperl
29 ?MAKE:  -pick add $@ %<
30 ?Y:TOP
31 ?S:perlpath:
32 ?S:     This variable contains the eventual value of the PERLPATH symbol,
33 ?S:     which contains the name of the perl interpreter to be used in
34 ?S:     shell scripts and in the "eval 'exec'" idiom.
35 ?S:.
36 ?C:PERLPATH:
37 ?C:     This symbol contains the name of the perl interpreter to be
38 ?C:     used in shell scripts and in the "eval 'exec'" idiom.
39 ?C:.
40 ?H:#define PERLPATH "$perlpath"         /**/
41 ?H:.
42 : figure best path for perl in scripts
43 case "$perlpath" in
44 '')
45         perlpath="$binexp/perl"
46         case "$startperl" in
47         *!*) ;;
48         *)
49                 $cat <<EOH
50
51 I will use the "eval 'exec'" idiom to start Perl on your system.
52 I can use the full path of your Perl binary for this purpose, but
53 doing so may cause problems if you want to share those scripts and
54 Perl is not always in a standard place ($binexp/perl).
55
56 EOH
57                 dflt="$binexp/perl"
58                 rp="What path shall I use in \"eval 'exec'\"?"
59                 . ./myread
60                 perlpath="$ans"
61                 ;;
62         esac
63         ;;
64 esac
65 case "$startperl" in
66 *!*)    ;;
67 *)      echo "I'll use $perlpath in \"eval 'exec'\"" ;;
68 esac
69