فهرست منبع

tools/build_perl_modules hardcodes the perl used

Fix for issue https://github.com/nagios-plugins/nagios-plugins/issues/92
John C. Frickson 9 سال پیش
والد
کامیت
e7ea397e8a
3فایلهای تغییر یافته به همراه8 افزوده شده و 4 حذف شده
  1. 2 0
      .gitignore
  2. 3 1
      configure.ac
  3. 3 3
      tools/build_perl_modules.in

+ 2 - 0
.gitignore

@@ -264,3 +264,5 @@ NP-VERSION-FILE
 /po/quot.sed
 /po/quot.sed
 /po/POTFILES
 /po/POTFILES
 /po/stamp-po
 /po/stamp-po
+
+/tools/build_perl_modules

+ 3 - 1
configure.ac

@@ -2,8 +2,9 @@ dnl Process this file with autoconf to produce a configure script.
 AC_PREREQ(2.59)
 AC_PREREQ(2.59)
 AC_INIT(nagios-plugins,2.1.2)
 AC_INIT(nagios-plugins,2.1.2)
 AC_CONFIG_SRCDIR(NPTest.pm)
 AC_CONFIG_SRCDIR(NPTest.pm)
-AC_CONFIG_FILES([gl/Makefile 
+AC_CONFIG_FILES([gl/Makefile
 	nagios-plugins.spec])
 	nagios-plugins.spec])
+AC_CONFIG_FILES([tools/build_perl_modules],[chmod +x tools/build_perl_modules])
 AC_CONFIG_AUX_DIR(build-aux)
 AC_CONFIG_AUX_DIR(build-aux)
 AM_INIT_AUTOMAKE([1.8.3])
 AM_INIT_AUTOMAKE([1.8.3])
 AM_MAINTAINER_MODE([enable])
 AM_MAINTAINER_MODE([enable])
@@ -1923,3 +1924,4 @@ ACX_FEATURE([with],[cgiurl])
 ACX_FEATURE([with],[trusted-path])
 ACX_FEATURE([with],[trusted-path])
 ACX_FEATURE([enable],[libtap])
 ACX_FEATURE([enable],[libtap])
 
 
+AC_OUTPUT()

+ 3 - 3
tools/build_perl_modules → tools/build_perl_modules.in

@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!@PERL@
 # SYNTAX:
 # SYNTAX:
 #	build_perl_modules -d dest_dir [-c] [-m] [-t] [-i] [-s <section>] tarball_dir
 #	build_perl_modules -d dest_dir [-c] [-m] [-t] [-i] [-s <section>] tarball_dir
 #
 #
@@ -221,11 +221,11 @@ foreach my $tarball (@tarballs) {
 
 
             my $command;
             my $command;
             if ( -f "Build.PL" && $have_module_build ) {
             if ( -f "Build.PL" && $have_module_build ) {
-                open( CMD, "|-", "perl Build.PL $mb_destdir --install_base=$prefix --install_path lib=$prefix/lib  --install_path arch=$prefix/lib/$Config{archname} --install_path bin=$prefix/bin --install_path script=$prefix/bin --install_path bindoc=$prefix/man/man1 --install_path libdoc=$prefix/man/man3" ) || die "Can't run perl Build.PL";
+                open( CMD, "|-", "@PERL@ Build.PL $mb_destdir --install_base=$prefix --install_path lib=$prefix/lib  --install_path arch=$prefix/lib/$Config{archname} --install_path bin=$prefix/bin --install_path script=$prefix/bin --install_path bindoc=$prefix/man/man1 --install_path libdoc=$prefix/man/man3" ) || die "Can't run perl Build.PL";
                 $command = "./Build";
                 $command = "./Build";
             }
             }
             elsif ( -f 'Makefile.PL' ) {
             elsif ( -f 'Makefile.PL' ) {
-                open( CMD, "|-", "perl Makefile.PL $mm_destdir INSTALL_BASE=$prefix INSTALLDIRS=site INSTALLSITELIB=$prefix/lib INSTALLSITEARCH=$prefix/lib/$Config{archname} $extra_args" ) || die "Can't run perl Makefile.PL";
+                open( CMD, "|-", "@PERL@ Makefile.PL $mm_destdir INSTALL_BASE=$prefix INSTALLDIRS=site INSTALLSITELIB=$prefix/lib INSTALLSITEARCH=$prefix/lib/$Config{archname} $extra_args" ) || die "Can't run perl Makefile.PL";
                 $command = "make";
                 $command = "make";
             }
             }
             else {
             else {