aboutsummaryrefslogtreecommitdiffstats
path: root/mkpkgconfig
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-04-03 22:54:49 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-04-03 22:54:49 +0000
commit98b1c68e69a994d96fa6a7a0b8a596a6c640fa8f (patch)
tree9f09511abb08facdb99781c2160d924af793bc62 /mkpkgconfig
parent5b4da3b22219a2697413c194ea24fb7bee65a7fe (diff)
On Darwin, the -r argument to sed is not valid. It has to be -E.
(issue #9399, reported by jcovert) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@60012 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'mkpkgconfig')
-rwxr-xr-xmkpkgconfig13
1 files changed, 10 insertions, 3 deletions
diff --git a/mkpkgconfig b/mkpkgconfig
index 0ae2a24bf..1897e3ce5 100755
--- a/mkpkgconfig
+++ b/mkpkgconfig
@@ -7,6 +7,13 @@ if [ "x$ASTERISKVERSIONNUM" = "x" ]; then
exit
fi
+if uname -a | grep -q Darwin
+then
+ SEDARG=-E
+else
+ SEDARG=-r
+fi
+
## Create a pkgconfig spec file for 3rd party modules (pkg-config asterisk --cflags)
if [ ! -d $PPATH ]; then
@@ -16,10 +23,10 @@ fi
## Clean out CFLAGS for the spec file.
LOCAL_CFLAGS=`echo $CFLAGS | sed -e 's/\s*-pipe\s*//g' | sed -e 's/-[Wmp]\S*\s*//g' | \
- sed -r -e 's/-I(include|\.\.\/include) //g' | \
+ sed $SEDARG -e 's/-I(include|\.\.\/include) //g' | \
sed -e 's/-DINSTALL_PREFIX=\S* //g' | \
- sed -r -e 's/-DASTERISK_VERSION=\S* //g' | \
- sed -r -e 's/-DAST(ETCDIR|LIBDIR|VARLIBDIR|VARRUNDIR|SPOOLDIR|LOGDIR|CONFPATH|MODDIR|AGIDIR)=\S* //g'`
+ sed $SEDARG -e 's/-DASTERISK_VERSION=\S* //g' | \
+ sed $SEDARG -e 's/-DAST(ETCDIR|LIBDIR|VARLIBDIR|VARRUNDIR|SPOOLDIR|LOGDIR|CONFPATH|MODDIR|AGIDIR)=\S* //g'`
cat <<EOF > $PPATH/asterisk.pc