version 1.1, 2013/07/29 19:37:40
|
version 1.1.1.3, 2016/11/02 09:57:01
|
Line 2
|
Line 2
|
|
|
search=$1 |
search=$1 |
shift |
shift |
|
pkg=$1 |
|
shift |
|
op=$1 |
|
shift |
|
|
|
in=`cat` |
|
|
if grep "^\#[[:space:]]*define[[:space:]]*$search" config.h >/dev/null 2>&1 || \ |
if grep "^\#[[:space:]]*define[[:space:]]*$search" config.h >/dev/null 2>&1 || \ |
grep $search >/dev/null 2>&1; then | echo $in | grep $search >/dev/null 2>&1; then |
exec $* | # Nasty, nasty, in --copy, arg 2 is another config to search for, use with NO_GMP |
fi | if [ $op = "--copy" ]; then |
| if grep "^\#[[:space:]]*define[[:space:]]*$pkg" config.h >/dev/null 2>&1 || \ |
| echo $in | grep $pkg >/dev/null 2>&1; then |
| pkg="" |
| else |
| pkg="$*" |
| fi |
| elif grep "^\#[[:space:]]*define[[:space:]]*${search}_STATIC" config.h >/dev/null 2>&1 || \ |
| echo $in | grep ${search}_STATIC >/dev/null 2>&1; then |
| pkg=`$pkg --static $op $*` |
| else |
| pkg=`$pkg $op $*` |
| fi |
|
|
|
if grep "^\#[[:space:]]*define[[:space:]]*${search}_STATIC" config.h >/dev/null 2>&1 || \ |
|
echo $in | grep ${search}_STATIC >/dev/null 2>&1; then |
|
if [ $op = "--libs" ] || [ $op = "--copy" ]; then |
|
echo "-Wl,-Bstatic $pkg -Wl,-Bdynamic" |
|
else |
|
echo "$pkg" |
|
fi |
|
else |
|
echo "$pkg" |
|
fi |
|
fi |
|
|