Import of readline 4.1
[deliverable/binutils-gdb.git] / readline / support / shlib-install
index e43a7c0935fba0af6aac2eb647beb58d493e750c..471fec78b527e6907f0759933ddaf3dbc65ac158 100755 (executable)
@@ -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
 
This page took 0.023338 seconds and 4 git commands to generate.