File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / dnsmasq / bld / pkg-wrapper
Revision 1.1.1.2 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Sun Jun 15 16:31:38 2014 UTC (10 years, 1 month ago) by misho
Branches: elwix, dnsmasq, MAIN
CVS tags: v2_71, HEAD
dnsmasq 2.71

    1: #!/bin/sh
    2: 
    3: search=$1
    4: shift
    5: pkg=$1
    6: shift
    7: op=$1
    8: shift
    9: 
   10: in=`cat`
   11: 
   12: if grep "^\#[[:space:]]*define[[:space:]]*$search" config.h >/dev/null 2>&1 || \
   13:     echo $in | grep $search >/dev/null 2>&1; then
   14: 
   15:     if [ $op = "--copy" ]; then
   16: 	pkg="$*"
   17:     elif grep "^\#[[:space:]]*define[[:space:]]*${search}_STATIC" config.h >/dev/null 2>&1 || \
   18: 	      echo $in | grep ${search}_STATIC >/dev/null 2>&1; then
   19: 	pkg=`$pkg  --static $op $*`
   20:     else
   21: 	pkg=`$pkg $op $*`
   22:     fi
   23: 
   24:     if grep "^\#[[:space:]]*define[[:space:]]*${search}_STATIC" config.h >/dev/null 2>&1 || \
   25: 	echo $in | grep ${search}_STATIC >/dev/null 2>&1; then
   26: 	if [ $op = "--libs" ] || [ $op = "--copy" ]; then
   27: 	    echo "-Wl,-Bstatic $pkg -Wl,-Bdynamic"
   28: 	else
   29: 	    echo "$pkg" 
   30: 	fi
   31:     else
   32: 	echo "$pkg"
   33:     fi
   34: fi
   35: 

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>