2008-08-21 17:51:08 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
while test "${1::2}" = "--" ; do
|
|
|
|
case "$1" in
|
|
|
|
--cflags=*)
|
2011-11-16 12:14:40 +01:00
|
|
|
cflags="${cflags:+$cflags }${1#*=}"
|
2008-08-21 17:51:08 +02:00
|
|
|
shift
|
|
|
|
;;
|
|
|
|
--cflags)
|
2011-11-16 12:14:40 +01:00
|
|
|
cflags="${cflags:+$cflags }$2"
|
2008-08-21 17:51:08 +02:00
|
|
|
shift 2
|
|
|
|
;;
|
|
|
|
--libs=*)
|
2011-11-16 12:14:40 +01:00
|
|
|
libs="${libs:+$libs }${1#*=}"
|
2008-08-21 17:51:08 +02:00
|
|
|
shift
|
|
|
|
;;
|
|
|
|
--libs)
|
2011-11-16 12:14:40 +01:00
|
|
|
libs="${libs:+$libs }$2"
|
2008-08-21 17:51:08 +02:00
|
|
|
shift 2
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
done
|
|
|
|
|
|
|
|
sed -ri -e "
|
|
|
|
/^[[:blank:]]*--cflags\)/,/;;/ {
|
|
|
|
/;;/ a\\
|
|
|
|
--cflags)\\
|
|
|
|
echo $cflags\\
|
|
|
|
;;
|
|
|
|
d
|
|
|
|
}
|
|
|
|
/^[[:blank:]]*--libs\)/,/;;/ {
|
|
|
|
/;;/ a\\
|
|
|
|
--libs)\\
|
|
|
|
echo $libs\\
|
|
|
|
;;
|
|
|
|
d
|
|
|
|
}" ${1+"$@"}
|