File: libtool-get-dll-ext

package info (click to toggle)
sane-backends-extras 1.0.19.11
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 3,632 kB
  • ctags: 3,610
  • sloc: ansic: 36,869; sh: 8,313; makefile: 1,048
file content (19 lines) | stat: -rwxr-xr-x 394 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/sh
#
# Author: Petter Reinholdtsen <pere@td.org.uit.no>
# Date:   2000-03-18
#
# Given a libtool lib*.la, return the dll extention used (ie. so, sl,
# dll, etc)
if test "x$1" = x; then
  echo "usage: $0 <libfile.la>"
  exit 1
fi

lafile=$1

libnames=`grep library_names= $lafile`
last=`echo $libnames | cut -d\' -f2|tr " " "\n"|tail -n 1`
dllend=`echo $last | cut -d. -f2`

echo $dllend