mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-18 18:58:22 +00:00
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
This commit is contained in:
13
mkpkgconfig
13
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
|
||||
|
Reference in New Issue
Block a user