]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Fix installation bug on HP-UX.
authorBruno Haible <bruno@clisp.org>
Sun, 7 Dec 2008 13:41:44 +0000 (13:41 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 23 Jun 2009 10:15:55 +0000 (12:15 +0200)
ChangeLog
build-aux/ltmain.sh
m4/libtool.m4

index c245934a032f5f8422fb76b8e280043e98428db7..593cd4fe37f7742f1e47be1a921229cd84dcdfd2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2008-10-01  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       * m4/libtool.m4 (install_override_mode): New LT_DECL.
+       (_LT_SYS_DYNAMIC_LINKER) [hpux9*, hpux10*, hpux11*]: Set it.
+       * build-aux/ltmain.sh (func_mode_install): Build a second command line,
+       $install_shared_prog, for the installation of the shared library.
+       Override resp. set the permission mode if install_override_mode is
+       nonempty.
+
 2008-10-04  Bruno Haible  <bruno@clisp.org>
 
        * autogen.sh: Fix execute permissions of some files.
index 271873d314da36e8d85594f813d7a87c34505d0d..0dd6f3ab3f7f47f0ec44f1900353258295761933 100644 (file)
@@ -1867,6 +1867,7 @@ func_mode_install ()
     # Aesthetically quote it.
     func_quote_for_eval "$arg"
     install_prog="$install_prog$func_quote_for_eval_result"
+    install_shared_prog=$install_prog
 
     # We need to accept at least all the BSD install flags.
     dest=
@@ -1876,8 +1877,10 @@ func_mode_install ()
     install_type=
     isdir=no
     stripme=
+    no_mode=:
     for arg
     do
+      arg2=
       if test -n "$dest"; then
        files="$files $dest"
        dest=$arg
@@ -1904,6 +1907,10 @@ func_mode_install ()
       *)
        # If the previous option needed an argument, then skip it.
        if test -n "$prev"; then
+         if test "x$prev" = x-m && test -n "$install_override_mode"; then
+           arg2=$install_override_mode
+           no_mode=false
+         fi
          prev=
        else
          dest=$arg
@@ -1915,6 +1922,10 @@ func_mode_install ()
       # Aesthetically quote the argument.
       func_quote_for_eval "$arg"
       install_prog="$install_prog $func_quote_for_eval_result"
+      if test -n "$arg2"; then
+       func_quote_for_eval "$arg2"
+      fi
+      install_shared_prog="$install_shared_prog $func_quote_for_eval_result"
     done
 
     test -z "$install_prog" && \
@@ -1923,6 +1934,11 @@ func_mode_install ()
     test -n "$prev" && \
       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"
+    fi
+
     if test -z "$files"; then
       if test -z "$dest"; then
        func_fatal_help "no file or destination specified"
@@ -2043,7 +2059,7 @@ func_mode_install ()
          test -n "$relink_command" && srcname="$realname"T
 
          # Install the shared library and build the symlinks.
-         func_show_eval "$install_prog $dir/$srcname $destdir/$realname" \
+         func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \
              'exit $?'
          tstripme="$stripme"
          case $host_os in
index 69ca81f86db5e003f34ca4b37b657776408d1821..6f12a743d479b5b7412ba329c162e716066a50e6 100644 (file)
@@ -2386,8 +2386,10 @@ hpux9* | hpux10* | hpux11*)
     soname_spec='${libname}${release}${shared_ext}$major'
     ;;
   esac
-  # HP-UX runs *really* slowly unless shared libraries are mode 555.
+  # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
   postinstall_cmds='chmod 555 $lib'
+  # or fails outright, so override atomically:
+  install_override_mode=555
   ;;
 
 interix[[3-9]]*)
@@ -2705,6 +2707,8 @@ _LT_DECL([], [library_names_spec], [1],
     The last name is the one that the linker finds with -lNAME]])
 _LT_DECL([], [soname_spec], [1],
     [[The coded name of the library, if different from the real name]])
+_LT_DECL([], [install_override_mode], [1],
+    [Permission mode override for installation of shared libraries])
 _LT_DECL([], [postinstall_cmds], [2],
     [Command to use after installation of a shared archive])
 _LT_DECL([], [postuninstall_cmds], [2],