~ubuntu-branches/ubuntu/lucid/xorg-server/lucid

0.8.1 by Julien Cristau
Import upstream version 1.6.99.903
1
#!/bin/sh
2
3
# we need sed
4
SED=@SED@
5
if test -z "$SED" ; then
6
SED=sed
7
fi
8
9
lt_unmangle ()
10
{
11
   last_result=`echo $1 | $SED -e 's#.libs/##' -e 's#[0-9a-zA-Z_\-\.]*_la-##'`
12
}
13
14
# the real libtool to use
15
LIBTOOL="$1 --tag=CC"
16
shift
17
18
# if 1, don't print anything, the underlaying wrapper will do it
19
pass_though=0
20
21
# scan the arguments, keep the right ones for libtool, and discover the mode
22
preserved_args=
23
while test "$#" -gt 0; do
24
    opt="$1"
25
    shift
26
27
    case $opt in
28
    --mode=*)
29
        mode=`echo $opt | $SED -e 's/[-_a-zA-Z0-9]*=//'`
30
        preserved_args="$preserved_args $opt"
31
        ;;
32
    -o)
33
        lt_output="$1"
34
        preserved_args="$preserved_args $opt"
35
	;;
36
    *)
37
        preserved_args="$preserved_args $opt"
38
        ;;
39
      esac
40
done
41
42
case "$mode" in
43
compile)
44
    # shave will be called and print the actual CC/CXX/LINK line
45
    preserved_args="$preserved_args --shave-mode=$mode"
46
    pass_though=1
47
    ;;
48
link)
49
    preserved_args="$preserved_args --shave-mode=$mode"
50
    Q="  LINK  "
51
    ;;
52
*)
53
    # let's u
54
    # echo "*** libtool: Unimplemented mode: $mode, fill a bug report"
55
    ;;
56
esac
57
58
lt_unmangle "$lt_output"
59
output=$last_result
60
61
if test -z $V; then
62
    if test $pass_though -eq 0; then
63
        echo "$Q$output"
64
    fi
65
    $LIBTOOL --silent $preserved_args
66
else
67
    echo $LIBTOOL $preserved_args
68
    $LIBTOOL $preserved_args
69
fi