diff options
Diffstat (limited to 'readline/support/shlib-install')
-rwxr-xr-x | readline/support/shlib-install | 47 |
1 files changed, 45 insertions, 2 deletions
diff --git a/readline/support/shlib-install b/readline/support/shlib-install index e43a7c0..471fec7 100755 --- a/readline/support/shlib-install +++ b/readline/support/shlib-install @@ -49,7 +49,7 @@ LN="ln -s" if [ -z "$uninstall" ]; then ${echo} $RM ${INSTALLDIR}/${LIBNAME}.${OLDSUFF} if [ -f "$INSTALLDIR/$LIBNAME" ]; then - ${echo} $MV $INSTALLDIR/$LIBNAME ${INSTALLDIR}/${LIBNAME}${OLDSUFF} + ${echo} $MV $INSTALLDIR/$LIBNAME ${INSTALLDIR}/${LIBNAME}.${OLDSUFF} fi fi @@ -63,6 +63,14 @@ fi # post-install/uninstall +# HP-UX requires that a shared library have execute permission +case "$host_os" in +hpux*) if [ -z "$uninstall" ]; then + chmod 755 ${INSTALLDIR}/${LIBNAME} + fi ;; +*) ;; +esac + case "$LIBNAME" in *.*.[0-9].[0-9]) # libname.so.M.N LINK2=`echo $LIBNAME | sed 's:\(.*\..*\.[0-9]\)\.[0-9]:\1:'` # libname.so.M @@ -71,6 +79,9 @@ case "$LIBNAME" in *.*.[0-9]) # libname.so.M LINK1=`echo $LIBNAME | sed 's:\(.*\..*\)\.[0-9]:\1:'` # libname.so ;; +*.[0-9]) # libname.M + LINK1=`echo $LIBNAME | sed 's:\(.*\)\.[0-9]:\1:'` # libname + ;; esac # @@ -91,7 +102,7 @@ case "$host_os" in fi ;; -solaris2*|aix4.[2-9]*|hpux1*) +solaris2*|aix4.[2-9]*|osf*|irix[56]*) # libname.so -> libname.so.M ${echo} ${RM} ${INSTALLDIR}/$LINK1 if [ -z "$uninstall" ]; then @@ -99,6 +110,38 @@ solaris2*|aix4.[2-9]*|hpux1*) fi ;; + +# FreeBSD 3.x can have either a.out or ELF shared libraries +freebsd3*) + if [ -x /usr/bin/objformat ] && [ "`/usr/bin/objformat`" = "elf" ]; then + # libname.so -> libname.so.M + ${echo} ${RM} ${INSTALLDIR}/$LINK1 + if [ -z "$uninstall" ]; then + ${echo} ln -s $INSTALLDIR/$LIBNAME ${INSTALLDIR}/$LINK1 + fi + else + # libname.so.M -> libname.so.M.N + ${echo} ${RM} ${INSTALLDIR}/$LINK2 + if [ -z "$uninstall" ]; then + ${echo} ln -s $INSTALLDIR/$LIBNAME ${INSTALLDIR}/$LINK2 + fi + + # libname.so -> libname.so.M.N + ${echo} ${RM} ${INSTALLDIR}/$LINK1 + if [ -z "$uninstall" ]; then + ${echo} ln -s $INSTALLDIR/$LIBNAME ${INSTALLDIR}/$LINK1 + fi + fi + ;; + +hpux1*) + # libname.sl -> libname.M + ${echo} ${RM} ${INSTALLDIR}/$LINK1.sl + if [ -z "$uninstall" ]; then + ${echo} ln -s $INSTALLDIR/$LIBNAME ${INSTALLDIR}/${LINK1}.sl + fi + ;; + *) ;; esac |