~ubuntu-branches/debian/stretch/readline6/stretch

« back to all changes in this revision

Viewing changes to support/shlib-install

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2010-01-02 13:29:08 UTC
  • mto: (0.1.2 upstream)
  • mto: This revision was merged to the branch mainline in revision 4.
  • Revision ID: james.westby@ubuntu.com-20100102132908-hiy6dhm0fzq4vrss
Tags: upstream-6.1
ImportĀ upstreamĀ versionĀ 6.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
# shlib-install - install a shared library and do any necessary host-specific
4
4
#                 post-installation configuration (like ldconfig)
5
5
#
6
 
# usage: shlib-install [-D] -O host_os -d installation-dir [-b bin-dir] -i install-prog [-U] library
 
6
# usage: shlib-install [-D] -O host_os [-V host_vendor] -d installation-dir [-b bin-dir] -i install-prog [-U] library
7
7
#
8
8
# Chet Ramey
9
9
# chet@po.cwru.edu
15
15
LDCONFIG=ldconfig
16
16
 
17
17
PROGNAME=`basename $0`
18
 
USAGE="$PROGNAME [-D] -O host_os -d installation-dir [-b bin-dir] -i install-prog [-U] library"
 
18
USAGE="$PROGNAME [-D] -O host_os [-V host_vendor] -d installation-dir [-b bin-dir] -i install-prog [-U] library"
19
19
 
20
20
# process options
21
21
 
22
22
while [ $# -gt 0 ]; do
23
23
        case "$1" in
24
24
        -O)     shift; host_os="$1"; shift ;;
 
25
        -V)     shift; host_vendor="$1"; shift ;;
25
26
        -d)     shift; INSTALLDIR="$1"; shift ;;
26
27
        -b)     shift; BINDIR="$1" ; shift ;;
27
28
        -i)     shift; INSTALLPROG="$1" ; shift ;;
115
116
#
116
117
# Create symlinks to the installed library.  This section is incomplete.
117
118
#
118
 
case "$host_os" in
119
 
*linux*)
 
119
case "$host_os-$host_vendor" in
 
120
*linux*|freebsd*-gentoo)
120
121
        # libname.so.M -> libname.so.M.N
121
122
        ${echo} ${RM} ${INSTALLDIR}/$LINK2
122
123
        if [ -z "$uninstall" ]; then
130
131
        fi
131
132
        ;;
132
133
 
133
 
bsdi4*|*gnu*|darwin*|macosx*|k*bsd*-gnu|netbsd*)
 
134
bsdi4*|*gnu*|darwin*|macosx*|netbsd*)
134
135
        # libname.so.M -> libname.so.M.N
135
136
        ${echo} ${RM} ${INSTALLDIR}/$LINK2
136
137
        if [ -z "$uninstall" ]; then
154
155
 
155
156
 
156
157
# FreeBSD 3.x and above can have either a.out or ELF shared libraries
157
 
freebsd[3-9]*|freebsdelf[3-9]*|freebsdaout[3-9]*)
 
158
freebsd3*|freebsdaout*)
158
159
        if [ -x /usr/bin/objformat ] && [ "`/usr/bin/objformat`" = "elf" ]; then
159
160
                # libname.so -> libname.so.M
160
161
                ${echo} ${RM} ${INSTALLDIR}/$LINK1
176
177
        fi
177
178
        ;;
178
179
 
 
180
freebsd[4-9]*|freebsdelf*|dragonfly*)
 
181
        # libname.so -> libname.so.M
 
182
        ${echo} ${RM} ${INSTALLDIR}/$LINK1
 
183
        if [ -z "$uninstall" ]; then
 
184
                eval $INSTALL_LINK1
 
185
        fi
 
186
        ;;
 
187
        
179
188
hpux1*)
180
189
        # libname.sl -> libname.M
181
190
        ${echo} ${RM} ${INSTALLDIR}/$LINK1.sl