Alexandre Lision | ddd731e | 2014-01-31 11:50:08 -0500 | [diff] [blame] | 1 | #!/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 | |
| 12 | args="" |
| 13 | tag="no" |
| 14 | shell=$1 |
| 15 | shift |
| 16 | cmd=$1 |
| 17 | shift |
| 18 | for 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 |
| 33 | done |
| 34 | |
| 35 | # Replace for old libtool?? |
| 36 | |
| 37 | version=`${cmd} --version 2>/dev/null | sed -e 's/([^)]*//g;s/^[^0-9]*//;s/[- ].*//g;q'` |
| 38 | if test -z "$version" ; then |
| 39 | version="1.5.x" ; fi |
| 40 | case "$version" in |
| 41 | 1.3.*|1.4.*) |
| 42 | tag="" |
| 43 | ;; |
| 44 | *) |
| 45 | tag="--tag=CC" |
| 46 | ;; |
| 47 | esac |
| 48 | exec $shell $cmd $tag $args |
| 49 | |
| 50 | |
| 51 | |