]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
On Darwin, the -r argument to sed is not valid. It has to be -E.
authorRussell Bryant <russell@russellbryant.com>
Tue, 3 Apr 2007 22:54:49 +0000 (22:54 +0000)
committerRussell Bryant <russell@russellbryant.com>
Tue, 3 Apr 2007 22:54:49 +0000 (22:54 +0000)
(issue #9399, reported by jcovert)

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@60012 65c4cc65-6c06-0410-ace0-fbb531ad65f3

mkpkgconfig

index 0ae2a24bf9851511878754d35390697caef1bc17..1897e3ce5cd9b667ec8d6bfed275bcb7866005d5 100755 (executable)
@@ -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