Files
MSYS2-packages/parallel/0001-support-MSys2.patch
2018-05-25 18:29:35 +02:00

958 lines
35 KiB
Diff

diff --git old/Makefile.in 001/Makefile.in
index 33af24d..d39833b 100644
--- old/Makefile.in
+++ 001/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15 from Makefile.am.
+# Makefile.in generated by automake 1.15.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2014 Free Software Foundation, Inc.
+# Copyright (C) 1994-2017 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -230,6 +230,8 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
+PERLINTERP = @PERLINTERP@
+PERL_SHEBANG = @PERL_SHEBANG@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
@@ -265,7 +267,6 @@ pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
-runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
@@ -500,7 +501,7 @@ distdir: $(DISTFILES)
! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
|| chmod -R a+r "$(distdir)"
dist-gzip: distdir
- tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+ tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz
$(am__post_remove_distdir)
dist-bzip2: distdir
@@ -526,7 +527,7 @@ dist-shar: distdir
@echo WARNING: "Support for shar distribution archives is" \
"deprecated." >&2
@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
- shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
+ shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz
$(am__post_remove_distdir)
dist-zip: distdir
@@ -544,7 +545,7 @@ dist dist-all:
distcheck: dist
case '$(DIST_ARCHIVES)' in \
*.tar.gz*) \
- GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
+ eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\
*.tar.bz2*) \
bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
*.tar.lz*) \
@@ -554,7 +555,7 @@ distcheck: dist
*.tar.Z*) \
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
*.shar.gz*) \
- GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
+ eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\
*.zip*) \
unzip $(distdir).zip ;;\
esac
diff --git old/aclocal.m4 001/aclocal.m4
index c24039f..2fa8b41 100644
--- old/aclocal.m4
+++ 001/aclocal.m4
@@ -1,6 +1,6 @@
-# generated automatically by aclocal 1.15 -*- Autoconf -*-
+# generated automatically by aclocal 1.15.1 -*- Autoconf -*-
-# Copyright (C) 1996-2014 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -20,7 +20,146 @@ You have another version of autoconf. It may work, but is not guaranteed to.
If you have problems, you may need to regenerate the build system entirely.
To do so, use the procedure documented by the package, typically 'autoreconf'.])])
-# Copyright (C) 2002-2014 Free Software Foundation, Inc.
+# ===========================================================================
+# https://www.gnu.org/software/autoconf-archive/ax_sys_perlsharpbang.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+# AX_SYS_PERLSHARPBANG
+#
+# DESCRIPTION
+#
+# Determine how the perl interpreter is located by the OS kernel and make
+# substitution variable PERL_SHEBANG available. Does AC_PATH_PROG to find
+# the path to perl. As a side-effect, that sets PERLINTERP and makes it
+# available as a substitution variable.
+#
+# Note: The macro allows for the possibility (expected to be seldom used)
+# of an explicit user override (the "user" being the operator executing
+# the final 'configure' script, in this context) by making the option
+# argument like:
+#
+# --with-perl-shebang='#! /my/funky/perlpath' # OR
+# --with-perl-shebang='/my/funky/perlpath' # we just throw away the #! anyway
+# # bec it must be absent in Makefile
+#
+# Rationale: The are various ways of starting an interpreter on different
+# *nix-like systems. Many use the simple
+#
+# #!/usr/bin/perl
+#
+# but it could be instead
+#
+# #!/usr/local/bin/perl
+#
+# and there is even the possibility that the user wants
+#
+# #!/usr/bin/env perl
+#
+# to find whichever perl comes first in the current $PATH. This is
+# preferred by some of us because we run multiple perl installations on
+# the same box. Adjusting our $PATH then allows us to set precedence over
+# other perls, even whatever the "house" version is.
+#
+# Users on very non-unix systems like MS Windows do not have a kernel that
+# does this kind of thing from the first line of script files, but instead
+# the perl on their machine is started and merely notices whatever comes
+# after the interpreter path on this first line of the script (options
+# like "-w").
+#
+# Acknowledgement: this macro was in part inspired by Dean Povey's
+# AC_PROG_PERL_VERSION.
+#
+# LICENSE
+#
+# Copyright (c) 2009 Soren Andersen <somian@pobox.com>
+#
+# Copying and distribution of this file, with or without modification, are
+# permitted in any medium without royalty provided the copyright notice
+# and this notice are preserved. This file is offered as-is, without any
+# warranty.
+
+#serial 14
+
+AC_DEFUN([AX_SYS_PERLSHARPBANG],[dnl
+
+ AC_PATH_PROG(PERLINTERP,perl,perl)
+ ac_cv_path_perlinterp="$PERLINTERP"
+ _sHpB='#!'
+
+ AC_ARG_WITH(perl-shebang,
+ AS_HELP_STRING([--with-perl-shebang],
+ [override what perl thinks is the way for the kernel to start it (seldom needed)]dnl
+ ),
+ [opt_perl_shebang="$withval"]dnl
+ ,dnl
+ [opt_perl_shebang="not_set"]dnl
+ )dnl
+
+ AC_CACHE_CHECK([whether explicit instead of detected sharpbang is to be used],
+ ax_cv_opt_perl_shebang,
+ [ case "$opt_perl_shebang" in
+ not_set ) ax_cv_opt_perl_shebang=''
+ ;;
+ * )
+ ax_cv_opt_perl_shebang=`echo "$opt_perl_shebang" | sed -e's|^#!\s*\(.*\)$|\1|'`
+ esac
+ ]dnl
+ )dnl
+
+ if test "A$ax_cv_opt_perl_shebang" != "A"
+ then
+ ac_cv_sys_kernshrpbang_perl="$ax_cv_opt_perl_shebang"
+ PERL_SHEBANG="$ac_cv_sys_kernshrpbang_perl"
+ AC_SUBST(PERL_SHEBANG)dnl
+ AC_MSG_NOTICE([OK - PERL_SHEBANG is $_sHpB$PERL_SHEBANG.])
+
+# Automatic detection of sharpbang formula starts here
+ else dnl
+
+ _somian_shbangperl=`$PERLINTERP -V:startperl`
+ negclass="[[^']]"; dnl
+# must leave this comment: m4 will remove the outer brackets for us, heheh
+ AC_CACHE_CHECK([for kernel sharpbang invocation to start perl],
+ ac_cv_sys_kernshrpbang_perl,
+ [_somian_kspb_perl=`echo "$_somian_shbangperl" | sed -ne"s|.*='\($negclass*\)';$|\1|p"`
+ if test "x$_somian_kspb_perl" == x
+ then _somian_ksbp_warn_empty='durnit'
+ else
+ case "A$_somian_kspb_perl" in
+ A#!*perl* )
+ ac_cv_sys_kernshrpbang_perl=`echo "$_somian_kspb_perl" | sed -e's|#!\(.*\)$|\1|'`
+ ;;
+ A* ) _somian_ksbp_warn_defau='trouble'
+ ac_cv_sys_kernshrpbang_perl="$PERLINTERP"
+ esac
+ fi
+])dnl Done with testing sharpbang
+
+# The above prints Checking ... result message to user.
+ PERL_SHEBANG="$ac_cv_sys_kernshrpbang_perl"
+ AC_SUBST(PERL_SHEBANG)
+ if test A${_somian_ksbp_warn_empty+set} == Aset
+ then AC_MSG_WARN([dnl
+In last check, doing $PERLINTERP -V:startperl yielded empty result! That should not happen.])
+ fi
+# Inform user after printing result value
+ if test A${_somian_ksbp_warn_defau+set} == Aset
+ then AC_MSG_NOTICE([Maybe Not good -])
+ AC_MSG_WARN([dnl
+In last check perl's Config query did not work so we bunted: $_sHpB$PERLINTERP])
+ else AC_MSG_NOTICE([OK Good result - ])
+ AC_MSG_NOTICE([dnl
+In last check we got a proper-looking answer from perl's Config: $_somian_shbangperl])
+dnl Done with user info messages
+ fi
+dnl Outer loop checked for user override term here
+ fi dnl
+
+])dnl EOMACRO DEF
+
+# Copyright (C) 2002-2017 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -35,7 +174,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION],
[am__api_version='1.15'
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
dnl require some minimum version. Point them to the right macro.
-m4_if([$1], [1.15], [],
+m4_if([$1], [1.15.1], [],
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
])
@@ -51,14 +190,14 @@ m4_define([_AM_AUTOCONF_VERSION], [])
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-[AM_AUTOMAKE_VERSION([1.15])dnl
+[AM_AUTOMAKE_VERSION([1.15.1])dnl
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
-# Copyright (C) 2001-2014 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -110,7 +249,7 @@ am_aux_dir=`cd "$ac_aux_dir" && pwd`
# AM_CONDITIONAL -*- Autoconf -*-
-# Copyright (C) 1997-2014 Free Software Foundation, Inc.
+# Copyright (C) 1997-2017 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -143,7 +282,7 @@ fi])])
# Do all the work for Automake. -*- Autoconf -*-
-# Copyright (C) 1996-2014 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -340,7 +479,7 @@ for _am_header in $config_headers :; do
done
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
-# Copyright (C) 2001-2014 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -361,7 +500,7 @@ if test x"${install_sh+set}" != xset; then
fi
AC_SUBST([install_sh])])
-# Copyright (C) 2003-2014 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -382,7 +521,7 @@ AC_SUBST([am__leading_dot])])
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
-# Copyright (C) 1997-2014 Free Software Foundation, Inc.
+# Copyright (C) 1997-2017 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -421,7 +560,7 @@ fi
# Helper functions for option handling. -*- Autoconf -*-
-# Copyright (C) 2001-2014 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -452,7 +591,7 @@ AC_DEFUN([_AM_IF_OPTION],
# Check to make sure that the build environment is sane. -*- Autoconf -*-
-# Copyright (C) 1996-2014 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -533,7 +672,7 @@ AC_CONFIG_COMMANDS_PRE(
rm -f conftest.file
])
-# Copyright (C) 2009-2014 Free Software Foundation, Inc.
+# Copyright (C) 2009-2017 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -593,7 +732,7 @@ AC_SUBST([AM_BACKSLASH])dnl
_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
])
-# Copyright (C) 2001-2014 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -621,7 +760,7 @@ fi
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
AC_SUBST([INSTALL_STRIP_PROGRAM])])
-# Copyright (C) 2006-2014 Free Software Foundation, Inc.
+# Copyright (C) 2006-2017 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -640,7 +779,7 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
# Check how to create a tarball. -*- Autoconf -*-
-# Copyright (C) 2004-2014 Free Software Foundation, Inc.
+# Copyright (C) 2004-2017 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
diff --git old/autogen.sh 001/autogen.sh
new file mode 100644
index 0000000..dee27fb
--- /dev/null
+++ 001/autogen.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+aclocal --force
+autoconf --force
+automake --foreign --add-missing --copy
diff --git old/configure 001/configure
index 0c763df..00b5eb4 100644
--- old/configure
+++ 001/configure
@@ -616,6 +616,8 @@ am__isrc
INSTALL_DATA
INSTALL_SCRIPT
INSTALL_PROGRAM
+PERL_SHEBANG
+PERLINTERP
target_alias
host_alias
build_alias
@@ -635,7 +637,6 @@ infodir
docdir
oldincludedir
includedir
-runstatedir
localstatedir
sharedstatedir
sysconfdir
@@ -658,6 +659,7 @@ SHELL'
ac_subst_files=''
ac_user_opts='
enable_option_checking
+with_perl_shebang
enable_silent_rules
enable_documentation
'
@@ -702,7 +704,6 @@ datadir='${datarootdir}'
sysconfdir='${prefix}/etc'
sharedstatedir='${prefix}/com'
localstatedir='${prefix}/var'
-runstatedir='${localstatedir}/run'
includedir='${prefix}/include'
oldincludedir='/usr/include'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
@@ -955,15 +956,6 @@ do
| -silent | --silent | --silen | --sile | --sil)
silent=yes ;;
- -runstatedir | --runstatedir | --runstatedi | --runstated \
- | --runstate | --runstat | --runsta | --runst | --runs \
- | --run | --ru | --r)
- ac_prev=runstatedir ;;
- -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
- | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
- | --run=* | --ru=* | --r=*)
- runstatedir=$ac_optarg ;;
-
-sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
ac_prev=sbindir ;;
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
@@ -1101,7 +1093,7 @@ fi
for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
datadir sysconfdir sharedstatedir localstatedir includedir \
oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
- libdir localedir mandir runstatedir
+ libdir localedir mandir
do
eval ac_val=\$$ac_var
# Remove trailing slashes.
@@ -1254,7 +1246,6 @@ Fine tuning of the installation directories:
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
- --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
--libdir=DIR object code libraries [EPREFIX/lib]
--includedir=DIR C header files [PREFIX/include]
--oldincludedir=DIR C header files for non-gcc [/usr/include]
@@ -1294,6 +1285,12 @@ Optional Features:
--disable-documentation Omit building and installing the documentation.
(default=no)
+Optional Packages:
+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
+ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
+ --with-perl-shebang override what perl thinks is the way for the kernel
+ to start it (seldom needed)
+
Report bugs to <bug-parallel@gnu.org>.
_ACEOF
ac_status=$?
@@ -1722,6 +1719,137 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+# on MSys2 prefer msys to native programs, especially perl
+# native windows perl does not work for the time being
+case "`uname -s`" in
+ MSYS*|MINGW*)
+ PATH="/usr/bin:$PATH"
+ export PATH
+ ;;
+esac
+
+
+ # Extract the first word of "perl", so it can be a program name with args.
+set dummy perl; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_PERLINTERP+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $PERLINTERP in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_PERLINTERP="$PERLINTERP" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_path_PERLINTERP="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ test -z "$ac_cv_path_PERLINTERP" && ac_cv_path_PERLINTERP="perl"
+ ;;
+esac
+fi
+PERLINTERP=$ac_cv_path_PERLINTERP
+if test -n "$PERLINTERP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERLINTERP" >&5
+$as_echo "$PERLINTERP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ ac_cv_path_perlinterp="$PERLINTERP"
+ _sHpB='#!'
+
+
+# Check whether --with-perl-shebang was given.
+if test "${with_perl_shebang+set}" = set; then :
+ withval=$with_perl_shebang; opt_perl_shebang="$withval"
+else
+ opt_perl_shebang="not_set"
+fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether explicit instead of detected sharpbang is to be used" >&5
+$as_echo_n "checking whether explicit instead of detected sharpbang is to be used... " >&6; }
+if ${ax_cv_opt_perl_shebang+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ case "$opt_perl_shebang" in
+ not_set ) ax_cv_opt_perl_shebang=''
+ ;;
+ * )
+ ax_cv_opt_perl_shebang=`echo "$opt_perl_shebang" | sed -e's|^#!\s*\(.*\)$|\1|'`
+ esac
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_opt_perl_shebang" >&5
+$as_echo "$ax_cv_opt_perl_shebang" >&6; }
+ if test "A$ax_cv_opt_perl_shebang" != "A"
+ then
+ ac_cv_sys_kernshrpbang_perl="$ax_cv_opt_perl_shebang"
+ PERL_SHEBANG="$ac_cv_sys_kernshrpbang_perl"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: OK - PERL_SHEBANG is $_sHpB$PERL_SHEBANG." >&5
+$as_echo "$as_me: OK - PERL_SHEBANG is $_sHpB$PERL_SHEBANG." >&6;}
+
+# Automatic detection of sharpbang formula starts here
+ else
+ _somian_shbangperl=`$PERLINTERP -V:startperl`
+ negclass="[^']"; # must leave this comment: m4 will remove the outer brackets for us, heheh
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kernel sharpbang invocation to start perl" >&5
+$as_echo_n "checking for kernel sharpbang invocation to start perl... " >&6; }
+if ${ac_cv_sys_kernshrpbang_perl+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ _somian_kspb_perl=`echo "$_somian_shbangperl" | sed -ne"s|.*='\($negclass*\)';$|\1|p"`
+ if test "x$_somian_kspb_perl" == x
+ then _somian_ksbp_warn_empty='durnit'
+ else
+ case "A$_somian_kspb_perl" in
+ A#!*perl* )
+ ac_cv_sys_kernshrpbang_perl=`echo "$_somian_kspb_perl" | sed -e's|#!\(.*\)$|\1|'`
+ ;;
+ A* ) _somian_ksbp_warn_defau='trouble'
+ ac_cv_sys_kernshrpbang_perl="$PERLINTERP"
+ esac
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_kernshrpbang_perl" >&5
+$as_echo "$ac_cv_sys_kernshrpbang_perl" >&6; }
+# The above prints Checking ... result message to user.
+ PERL_SHEBANG="$ac_cv_sys_kernshrpbang_perl"
+
+ if test A${_somian_ksbp_warn_empty+set} == Aset
+ then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: In last check, doing $PERLINTERP -V:startperl yielded empty result! That should not happen." >&5
+$as_echo "$as_me: WARNING: In last check, doing $PERLINTERP -V:startperl yielded empty result! That should not happen." >&2;}
+ fi
+# Inform user after printing result value
+ if test A${_somian_ksbp_warn_defau+set} == Aset
+ then { $as_echo "$as_me:${as_lineno-$LINENO}: Maybe Not good -" >&5
+$as_echo "$as_me: Maybe Not good -" >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: In last check perl's Config query did not work so we bunted: $_sHpB$PERLINTERP" >&5
+$as_echo "$as_me: WARNING: In last check perl's Config query did not work so we bunted: $_sHpB$PERLINTERP" >&2;}
+ else { $as_echo "$as_me:${as_lineno-$LINENO}: OK Good result - " >&5
+$as_echo "$as_me: OK Good result - " >&6;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: In last check we got a proper-looking answer from perl's Config: $_somian_shbangperl" >&5
+$as_echo "$as_me: In last check we got a proper-looking answer from perl's Config: $_somian_shbangperl" >&6;}
+ fi
+ fi
+
+
am__api_version='1.15'
ac_aux_dir=
diff --git old/configure.ac 001/configure.ac
index cb5a1b0..33e3fda 100644
--- old/configure.ac
+++ 001/configure.ac
@@ -1,4 +1,16 @@
AC_INIT([parallel], [20180522], [bug-parallel@gnu.org])
+
+# on MSys2 prefer msys to native programs, especially perl
+# native windows perl does not work for the time being
+case "`uname -s`" in
+ MSYS*|MINGW*)
+ PATH="/usr/bin:$PATH"
+ export PATH
+ ;;
+esac
+
+AX_SYS_PERLSHARPBANG
+
AM_INIT_AUTOMAKE([-Wall -Werror foreign])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_FILES([
diff --git old/src/Makefile.am 001/src/Makefile.am
index 9b5f7e4..17a5c64 100644
--- old/src/Makefile.am
+++ 001/src/Makefile.am
@@ -1,4 +1,6 @@
-bin_SCRIPTS = parallel sql niceload parcat parset env_parallel \
+PERL_BINS = parallel sql niceload parcat parset
+
+bin_SCRIPTS = $(PERL_BINS) env_parallel \
env_parallel.ash env_parallel.bash env_parallel.csh \
env_parallel.dash env_parallel.fish env_parallel.ksh \
env_parallel.pdksh env_parallel.sh env_parallel.tcsh \
@@ -7,6 +9,12 @@ bin_SCRIPTS = parallel sql niceload parcat parset env_parallel \
install-exec-hook:
rm $(DESTDIR)$(bindir)/sem || true
$(LN_S) parallel $(DESTDIR)$(bindir)/sem
+ @cd $(DESTDIR)$(bindir); \
+ for bin in $(PERL_BINS); do \
+ mv $$bin "$$bin".tmp; \
+ sed '1s|.*|#!$(PERL_SHEBANG)|' "$$bin".tmp > $$bin; \
+ rm -f "$$bin".tmp; \
+ done
if DOCUMENTATION
man_MANS = parallel.1 env_parallel.1 sem.1 sql.1 niceload.1 \
diff --git old/src/Makefile.in 001/src/Makefile.in
index ce1c2b8..0716192 100644
--- old/src/Makefile.in
+++ 001/src/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15 from Makefile.am.
+# Makefile.in generated by automake 1.15.1 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994-2014 Free Software Foundation, Inc.
+# Copyright (C) 1994-2017 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -185,6 +185,8 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
+PERLINTERP = @PERLINTERP@
+PERL_SHEBANG = @PERL_SHEBANG@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
@@ -220,7 +222,6 @@ pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
-runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
@@ -229,7 +230,8 @@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
-bin_SCRIPTS = parallel sql niceload parcat parset env_parallel \
+PERL_BINS = parallel sql niceload parcat parset
+bin_SCRIPTS = $(PERL_BINS) env_parallel \
env_parallel.ash env_parallel.bash env_parallel.csh \
env_parallel.dash env_parallel.fish env_parallel.ksh \
env_parallel.pdksh env_parallel.sh env_parallel.tcsh \
@@ -615,6 +617,12 @@ uninstall-man: uninstall-man1 uninstall-man7
install-exec-hook:
rm $(DESTDIR)$(bindir)/sem || true
$(LN_S) parallel $(DESTDIR)$(bindir)/sem
+ @cd $(DESTDIR)$(bindir); \
+ for bin in $(PERL_BINS); do \
+ mv $$bin "$$bin".tmp; \
+ sed '1s|.*|#!$(PERL_SHEBANG)|' "$$bin".tmp > $$bin; \
+ rm -f "$$bin".tmp; \
+ done
# Build documentation file if the tool to build exists.
# Otherwise: Use the distributed version
diff --git old/src/niceload 001/src/niceload
index f628030..485e9b2 100644
--- old/src/niceload
+++ 001/src/niceload
@@ -148,11 +148,8 @@ exit($::exitstatus);
if(not %pid_parentpid_cmd) {
# Filter for SysV-style `ps`
- my $sysv = q( ps -ef | perl -ane '1..1 and /^(.*)CO?MM?A?N?D/ and $s=length $1;).
+ my $sysv = q( ps -ef | ).$^X.q( -ane '1..1 and /^(.*)CO?MM?A?N?D/ and $s=length $1;).
q(s/^.{$s}//; print "@F[1,2] $_"' );
- # Crazy msys: ' is not accepted on the cmd line, but " are treated as '
- my $msys = q( ps -ef | perl -ane "1..1 and /^(.*)CO?MM?A?N?D/ and $s=length $1;).
- q(s/^.{$s}//; print qq{@F[1,2] $_}" );
# BSD-style `ps`
my $bsd = q(ps -o pid,ppid,command -ax);
%pid_parentpid_cmd =
@@ -167,7 +164,7 @@ exit($::exitstatus);
'hpux' => $sysv,
'linux' => $sysv,
'mirbsd' => $bsd,
- 'msys' => $msys,
+ 'msys' => $sysv,
'MSWin32' => $sysv,
'netbsd' => $bsd,
'nto' => $sysv,
@@ -591,7 +588,7 @@ sub netsensor_script {
$self->{'remedian'} = (sort @{$rref->[2]})[$#{$rref->[2]}/2];
}
};
- return "perl -e ".shell_quote_scalar($perlscript)." $hops";
+ return "$^X -e ".shell_quote_scalar($perlscript)." $hops";
}
diff --git old/src/parallel 001/src/parallel
index 98062d6..563e698 100644
--- old/src/parallel
+++ 001/src/parallel
@@ -442,7 +442,7 @@ sub cat_partial {
}
});
return "<". shell_quote_scalar($file) .
- " perl -e '$script' @start_len |";
+ " $^X -e '$script' @start_len |";
}
sub spreadstdin {
@@ -4868,11 +4868,8 @@ sub which {
if(not %pid_parentpid_cmd) {
# Filter for SysV-style `ps`
- my $sysv = q( ps -ef | perl -ane '1..1 and /^(.*)CO?MM?A?N?D/ and $s=length $1;).
+ my $sysv = q( ps -ef | ).$^X.q( -ane '1..1 and /^(.*)CO?MM?A?N?D/ and $s=length $1;).
q(s/^.{$s}//; print "@F[1,2] $_"' );
- # Crazy msys: ' is not accepted on the cmd line, but " are treated as '
- my $msys = q( ps -ef | perl -ane "1..1 and /^(.*)CO?MM?A?N?D/ and $s=length $1;).
- q(s/^.{$s}//; print qq{@F[1,2] $_}" );
# BSD-style `ps`
my $bsd = q(ps -o pid,ppid,command -ax);
%pid_parentpid_cmd =
@@ -4888,7 +4885,7 @@ sub which {
'hpux' => $sysv,
'linux' => $sysv,
'mirbsd' => $bsd,
- 'msys' => $msys,
+ 'msys' => $sysv,
'MSWin32' => $sysv,
'netbsd' => $bsd,
'nto' => $sysv,
@@ -5395,7 +5392,7 @@ sub memfree_recompute {
$perlscript .= 'if($^O eq "'.$os.'") { '.$script_of{$os}.'}';
}
$perlscript =~ s/[\t\n ]+/ /g;
- $script = "perl -e " . ::shell_quote_scalar($perlscript);
+ $script = "$^X -e " . ::shell_quote_scalar($perlscript);
}
return $script;
}
@@ -5418,7 +5415,7 @@ sub limit {
(tmp=$(tempfile);
LANG=C iostat -x 1 2 > $tmp;
mv $tmp $io_file) &
- perl -e '-e $ARGV[0] or exit(1);
+ !.$^X.q! -e '-e $ARGV[0] or exit(1);
for(reverse <>) {
/Device:/ and last;
/(\S+)$/ and $max = $max > $1 ? $max : $1; }
@@ -5445,7 +5442,7 @@ sub limit {
ps ax -o state,command |
grep -E '^[DOR].[^[]' |
wc -l |
- perl -ne 'exit ('$limit' < $_)';
+ !.$^X.q! -ne 'exit ('$limit' < $_)';
};
export -f load;
load %s;
@@ -5651,7 +5648,7 @@ sub swap_activity {
$perlscript .= 'if($^O eq "'.$os.'") { print `'.$vmstat{$os}[0].' | awk "{print ' .
$vmstat{$os}[1] . '}"` }';
}
- $script = "perl -e " . ::shell_quote_scalar($perlscript);
+ $script = "$^X -e " . ::shell_quote_scalar($perlscript);
}
return $script;
}
@@ -5698,7 +5695,7 @@ sub loadavg_too_high {
# aix => "ps -ae -o state,command" # state wrong
# bsd => "ps ax -o state,command"
# sysv => "ps -ef -o s -o comm"
- # cygwin => perl -ne 'close STDERR; /Name/ and print"\n"; \
+ # cygwin => $^X -ne 'close STDERR; /Name/ and print"\n"; \
# /(Name|Pid|Ppid|State):\s+(\S+)/ and print "$2\t";' /proc/*/status |
# awk '{print $2,$1}'
# dec_osf => bsd
@@ -5716,14 +5713,14 @@ sub loadavg_too_high {
# svr5 => sysv
# ultrix => ps -ax | awk '{print $3,$5}'
# unixware => ps -el|awk '{print $2,$14,$15}'
- my $ps = ::spacefree(1,q{
+ my $ps = ::spacefree(1,q[
$sysv="ps -ef -o s -o comm";
$sysv2="ps -ef -o state -o comm";
$bsd="ps ax -o state,command";
# Treat threads as processes
$bsd2="ps axH -o state,command";
$psel="ps -el|awk '{ print \$2,\$14,\$15 }'";
- $cygwin=q{ perl -ne 'close STDERR; /Name/ and print"\n";
+ $cygwin=q{ ].$^X.q[ -ne 'close STDERR; /Name/ and print"\n";
/(Name|Pid|Ppid|State):\s+(\S+)/ and print "$2\t";' /proc/*/status |
awk '{print $2,$1}' };
$dummy="echo S COMMAND;echo R dummy";
@@ -5751,7 +5748,7 @@ sub loadavg_too_high {
'ultrix' => "ps -ax | awk '{print \$3,\$5}'",
);
print `$ps{$^O}`;
- });
+ ]);
# The command is too long for csh, so base64_wrap the command
$cmd = Job::base64_wrap($ps);
}
@@ -6668,7 +6665,7 @@ sub no_of_cores_hpux {
# Number of CPU cores on HP-UX
# undef if not HP-UX
my $no_of_cores =
- ::qqx(qq{ /usr/bin/mpsched -s 2>&1 | perl -ne '/Processor Count\\D+(\\d+)/ and print "\$1\n"'});
+ ::qqx(qq{ /usr/bin/mpsched -s 2>&1 | $^X -ne '/Processor Count\\D+(\\d+)/ and print "\$1\n"'});
return $no_of_cores;
}
@@ -7383,19 +7380,19 @@ sub empty_input_wrapper {
exit ($?&127 ? 128+($?&127) : 1+$?>>8)
}
});
- ::debug("run",'Empty wrap: perl -e '.::shell_quote_scalar($script)."\n");
+ ::debug("run","Empty wrap: $^X -e ".::shell_quote_scalar($script)."\n");
if($Global::cshell
and
length $command > 499) {
# csh does not like words longer than 1000 (499 quoted)
- # $command = "perl -e '".base64_zip_eval()."' ".
+ # $command = "$^X -e '".base64_zip_eval()."' ".
# join" ",string_zip_base64(
# 'exec "'.::perl_quote_scalar($command).'"');
- return 'perl -e '.::shell_quote_scalar($script)." ".
+ return "$^X -e ".::shell_quote_scalar($script)." ".
base64_wrap("exec \"$Global::shell\",'-c',\"".
::perl_quote_scalar($command).'"');
} else {
- return 'perl -e '.::shell_quote_scalar($script)." ".
+ return "$^X -e ".::shell_quote_scalar($script)." ".
$Global::shell." -c ".::shell_quote_scalar($command);
}
}
@@ -7688,7 +7685,7 @@ sub total_failed {
# Command to remove files and dirs (given as args) without
# affecting the exit value in $?/$status.
if(not $script) {
- $script = "perl -e '".
+ $script = "$^X -e '".
::spacefree(0,q{
$bash=shift;
$csh=shift;
@@ -7722,7 +7719,7 @@ sub total_failed {
# * cat > fifo
# * waitpid to get the exit code from $command
# * be less than 1000 chars long
- $script = "perl -e '".
+ $script = "$^X -e '".
(::spacefree
(0, q{
($s,$c,$f) = @ARGV;
@@ -7837,7 +7834,7 @@ sub wrapped {
$command = $self->sshlogin_wrap($command);
if(@Global::cat_prepends) {
# --pipepart: prepend:
- # < /tmp/foo perl -e 'while(@ARGV) {
+ # < /tmp/foo $^X -e 'while(@ARGV) {
# sysseek(STDIN,shift,0) || die; $left = shift;
# while($read = sysread(STDIN,$buf, ($left > 131072 ? 131072 : $left))){
# $left -= $read; syswrite(STDOUT,$buf);
@@ -7863,7 +7860,7 @@ sub wrapped {
and
length $command > 499) {
# csh does not like words longer than 1000 (499 quoted)
- # $command = "perl -e '".base64_zip_eval()."' ".
+ # $command = "$^X -e '".base64_zip_eval()."' ".
# join" ",string_zip_base64(
# 'exec "'.::perl_quote_scalar($command).'"');
$command = base64_wrap("exec \"$Global::shell\",'-c',\"".
@@ -7985,7 +7982,7 @@ sub base64_wrap {
# $shell_command = shell command that runs $eval_string
my $eval_string = shift;
return
- "perl -e ".
+ "$^X -e ".
::shell_quote_scalar(base64_zip_eval())." ".
join" ",::shell_quote(string_zip_base64($eval_string));
}
@@ -8186,7 +8183,7 @@ sub sshlogin_wrap {
# csh does not deal well with $ENV with \n
$self->{'sshlogin_wrap'} = base64_wrap($perl_code);
} else {
- $self->{'sshlogin_wrap'} = "perl -e ".::shell_quote_scalar($perl_code);
+ $self->{'sshlogin_wrap'} = "$^X -e ".::shell_quote_scalar($perl_code);
}
} else {
$self->{'sshlogin_wrap'} = $command;
@@ -8203,7 +8200,7 @@ sub sshlogin_wrap {
my $remote_command = $pwd.$envset.$bashfuncset.
'@ARGV="'.::perl_quote_scalar($command).'";'.
monitor_parent_sshd_script();
- $quoted_remote_command = "perl -e ".
+ $quoted_remote_command = "$^X -e ".
::shell_quote_scalar($remote_command);
my $dq_remote_command =
::shell_quote_scalar($quoted_remote_command);
@@ -8215,7 +8212,7 @@ sub sshlogin_wrap {
# csh does not deal well with > 1000 chars in one word
# csh does not deal well with $ENV with \n
$quoted_remote_command =
- "perl -e ".
+ "$^X -e ".
::shell_quote_scalar(::shell_quote_scalar(base64_zip_eval()))." ".
join" ",::shell_quote(::shell_quote(string_zip_base64($remote_command)));
} else {
@@ -8543,7 +8540,7 @@ sub start {
my $bash =
::shell_quote_scalar_default(
"testfun() { rm $name; }; export -f testfun; ".
- "perl -MIPC::Open3 -e ".
+ "$^X -MIPC::Open3 -e ".
::shell_quote_scalar_default($script)
);
# Redirect STDERR temporarily,
@@ -8755,14 +8752,14 @@ sub interactive_start {
(
"(".$actual_command.');'.
# The triple print is needed - otherwise the testsuite fails
- q[ perl -e 'while($t++<3){ print $ARGV[0],"\n" }' $?h/$status >> ].$tmpfifo."&".
+ " $^X".q[ -e 'while($t++<3){ print $ARGV[0],"\n" }' $?h/$status >> ].$tmpfifo."&".
"echo $title; echo \007Job finished at: `date`;sleep 10"
).
# Run outside tmux
# Read a / separated line: 0h/2 for csh, 2/0 for bash.
# If csh the first will be 0h, so use the second as exit value.
# Otherwise just use the first value as exit value.
- q{; exec perl -e '$/="/";$_=<>;$c=<>;unlink $ARGV; /(\d+)h/ and exit($1);exit$c' }.$tmpfifo;
+ "; exec $^X ".q{-e '$/="/";$_=<>;$c=<>;unlink $ARGV; /(\d+)h/ and exit($1);exit$c' }.$tmpfifo;
}
}