mirror of
https://github.com/asterisk/asterisk.git
synced 2026-05-04 20:33:53 +00:00
1) Solaris sed doesn't have -r, which means things like \s and \S don't work.
2) GNU sed version 4.1.2 failed on a very simple test
echo "Test Test" | sed -r -e 's/\s/x/g'
should have returned "TestxxxTest", but did not (however, 4.1.4 did?).
3) The CFLAGS were never set, so that entire line actually did nothing. Now it's useful again.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@40964 65c4cc65-6c06-0410-ace0-fbb531ad65f3
44 lines
1.1 KiB
Bash
Executable File
44 lines
1.1 KiB
Bash
Executable File
#!/bin/bash
|
|
PPATH=$1
|
|
## Make sure we were called from Makefile
|
|
|
|
if [ "x$ASTERISKVERSIONNUM" = "x" ]; then
|
|
echo " ** Do not call this script directly"
|
|
exit
|
|
fi
|
|
|
|
## Create a pkgconfig spec file for 3rd party modules (pkg-config asterisk --cflags)
|
|
|
|
if [ ! -d $PPATH ]; then
|
|
exit
|
|
fi
|
|
|
|
## Clean out CFLAGS for the spec file.
|
|
|
|
LOCAL_CFLAGS=`echo $CFLAGS | sed -e 's/[[:space:]]*-pipe[[:space:]]*//g' | sed -e 's/-[Wmp][^[:space:]]*[[:space:]]*//g' | \
|
|
sed -e 's/-I\(include|\.\.\/include\) //g' | \
|
|
sed -e 's/-DINSTALL_PREFIX=[^[:space:]]* //g' | \
|
|
sed -e 's/-DASTERISK_VERSION=[^[:space:]]* //g' | \
|
|
sed -e 's/-DAST\(ETCDIR|LIBDIR|VARLIBDIR|VARRUNDIR|SPOOLDIR|LOGDIR|CONFPATH|MODDIR|AGIDIR\)=[^[:space:]]* //g'`
|
|
|
|
|
|
cat <<EOF > $PPATH/asterisk.pc
|
|
install_prefix=$INSTALL_PREFIX
|
|
version_number=$ASTERISKVERSIONNUM
|
|
etcdir=$ASTETCDIR
|
|
libdir=$ASTLIBDIR
|
|
varlibdir=$ASTVARLIBDIR
|
|
varrundir=$ASTVARRUNDIR
|
|
spooldir=$ASTSPOOLDIR
|
|
logdir=$ASTLOGDIR
|
|
confpath=$ASTCONFPATH
|
|
moddir=$MODULES_DIR
|
|
agidir=$AGI_DIR
|
|
|
|
Name: asterisk
|
|
Description: Open Source PBX and telephony toolkit
|
|
Version: $ASTERISKVERSION
|
|
Libs: $LIBS
|
|
Cflags: $LOCAL_CFLAGS
|
|
EOF
|