From f4788a1ba6fbbbdd90695661e79094c7071ad193 Mon Sep 17 00:00:00 2001 From: Ralf Wildenhues Date: Sun, 1 Feb 2009 15:06:19 +0100 Subject: [PATCH] install mode: do not pass `-m $install_override_mode' to cp. * libltdl/config/ltmain.m4sh (func_mode_install): New variable $install_cp, factor test when `cp' is used for installation. Do not pass mode override to cp. Fixes `libtool --mode=install cp ...' on HP-UX; cp should not be used for libraries that might be needed by programs invoked during the installation process. Signed-off-by: Ralf Wildenhues --- ChangeLog | 7 +++++++ libltdl/config/ltmain.m4sh | 17 +++++++++++------ 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4b96593cc..cddb5b5cb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2009-02-01 Ralf Wildenhues + install mode: do not pass `-m $install_override_mode' to cp. + * libltdl/config/ltmain.m4sh (func_mode_install): New variable + $install_cp, factor test when `cp' is used for installation. + Do not pass mode override to cp. Fixes `libtool --mode=install + cp ...' on HP-UX; cp should not be used for libraries that might + be needed by programs invoked during the installation process. + Fix sed script portability issue in func_version. * libltdl/config/getopt.m4sh (func_version): Remove space in `/\./! {' sed command, to please HP-UX sed. diff --git a/libltdl/config/ltmain.m4sh b/libltdl/config/ltmain.m4sh index d685d3081..49e07c3bf 100644 --- a/libltdl/config/ltmain.m4sh +++ b/libltdl/config/ltmain.m4sh @@ -1470,6 +1470,10 @@ func_mode_install () func_quote_for_eval "$arg" install_prog="$install_prog$func_quote_for_eval_result" install_shared_prog=$install_prog + case " $install_prog " in + *[\\\ /]cp\ *) install_cp=: ;; + *) install_cp=false ;; + esac # We need to accept at least all the BSD install flags. dest= @@ -1492,10 +1496,9 @@ func_mode_install () case $arg in -d) isdir=yes ;; -f) - case " $install_prog " in - *[\\\ /]cp\ *) ;; - *) prev=$arg ;; - esac + if $install_cp; then :; else + prev=$arg + fi ;; -g | -m | -o) prev=$arg @@ -1537,8 +1540,10 @@ func_mode_install () func_fatal_help "the \`$prev' option requires an argument" if test -n "$install_override_mode" && $no_mode; then - func_quote_for_eval "$install_override_mode" - install_shared_prog="$install_shared_prog -m $func_quote_for_eval_result" + if $install_cp; then :; else + func_quote_for_eval "$install_override_mode" + install_shared_prog="$install_shared_prog -m $func_quote_for_eval_result" + fi fi if test -z "$files"; then -- 2.47.3