From: Russell Bryant Date: Tue, 3 Apr 2007 22:54:49 +0000 (+0000) Subject: On Darwin, the -r argument to sed is not valid. It has to be -E. X-Git-Tag: 1.2.18~34 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=683a3456997a47df2f021b8a5480da8eb9a94189;p=thirdparty%2Fasterisk.git On Darwin, the -r argument to sed is not valid. It has to be -E. (issue #9399, reported by jcovert) git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@60012 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/mkpkgconfig b/mkpkgconfig index 0ae2a24bf9..1897e3ce5c 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 < $PPATH/asterisk.pc