blob: 292523c00b12ac84595d9d51d478dc59c7c985b8 [file] [log] [blame]
Alexandre Lisionddd731e2014-01-31 11:50:08 -05001#!/bin/sh
2# Copyright (C) 2006-2009 David Sugar, Tycho Softworks.
3#
4# This file is free software; as a special exception the author gives
5# unlimited permission to copy and/or distribute it, with or without
6# modifications, as long as this notice is preserved.
7#
8# This program is distributed in the hope that it will be useful, but
9# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
10# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
11
12args=""
13tag="no"
14shell=$1
15shift
16cmd=$1
17shift
18for arg in $* ; do
19 case "$arg" in
20 --tag=*)
21 tag="no"
22 ;;
23 --tag)
24 tag="yes"
25 ;;
26 *)
27 if test "$tag" = "no" ; then
28 args="$args $arg"
29 fi
30 tag="no"
31 ;;
32 esac
33done
34
35# Replace for old libtool??
36
37version=`${cmd} --version 2>/dev/null | sed -e 's/([^)]*//g;s/^[^0-9]*//;s/[- ].*//g;q'`
38if test -z "$version" ; then
39 version="1.5.x" ; fi
40case "$version" in
411.3.*|1.4.*)
42 tag=""
43 ;;
44*)
45 tag="--tag=CC"
46 ;;
47esac
48exec $shell $cmd $tag $args
49
50
51