This is the mail archive of the automake@gnu.org mailing list for the automake project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

perl path patch


Here's a small patch against automake 1.6.2 which allows automake to
use the copy of Perl in the user's path (which may differ from the path
with which automake was built) as long as that version is sufficiently
recent (where sufficiently recent here means Perl 5.6 or newer).

Michael

--- ./aclocal.in	Mon Apr 22 00:35:15 2002
+++ ../automake-1.6.2/./aclocal.in	Wed Jun 26 12:41:42 2002
@@ -1,10 +1,7 @@
-#!@PERL@
+#!/bin/env perl
 # -*- perl -*-
 # @configure_input@
 
-eval 'case $# in 0) exec @PERL@ -S "$0";; *) exec @PERL@ -S "$0" "$@";; esac'
-    if 0;
-
 # aclocal - create aclocal.m4 by scanning configure.ac
 
 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002
@@ -29,6 +26,11 @@
 
 BEGIN
 {
+  exec "/bin/sh", "-c",
+     "@PERL@ -S $0" .
+     (@ARGV ? " " . join(" ", map(quotemeta, @ARGV)) : "")
+  if ($] < 5.006);
+
   my $prefix = "@prefix@";
   my $perllibdir = $ENV{'perllibdir'} || "@datadir@/@PACKAGE@-@APIVERSION@";
   unshift @INC, "$perllibdir";
--- ./automake.in	Mon Jun 10 10:19:07 2002
+++ ../automake-1.6.2/./automake.in	Wed Jun 26 12:41:20 2002
@@ -1,10 +1,7 @@
-#!@PERL@ -w
+#!/bin/env perl
 # -*- perl -*-
 # @configure_input@
 
-eval 'case $# in 0) exec @PERL@ -S "$0";; *) exec @PERL@ -S "$0" "$@";; esac'
-    if 0;
-
 # automake - create Makefile.in from Makefile.am
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
 # Free Software Foundation, Inc.
@@ -31,6 +28,11 @@
 
 BEGIN
 {
+  exec "/bin/sh", "-c",
+     "@PERL@ -S $0" .
+     (@ARGV ? " " . join(" ", map(quotemeta, @ARGV)) : "")
+  if ($] < 5.006);
+
   my $prefix = "@prefix@";
   my $perllibdir = $ENV{'perllibdir'} || "@datadir@/@PACKAGE@-@APIVERSION@";
   unshift @INC, "$perllibdir";


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]