Re #1657: fixed the pjsip.pri generation script for linking with  external third party libraries

git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@4488 74dad513-b988-da41-8d7b-12977e46ad98
diff --git a/bb10-config.mak b/bb10-config.mak
index 322f696..492cbc0 100644
--- a/bb10-config.mak
+++ b/bb10-config.mak
@@ -9,9 +9,10 @@
 include build.mak
 
 # Generate library list (the "-lxxx" options) from list of linked libraries.
-PJ_BB_LIBS = $(subst PJLIB,pjlib,$(subst .a,,$(subst lib,-l,$(subst pjlib,PJLIB,$(notdir $(APP_LIB_FILES))))))
+PJ_BB_LIBS = $(filter-out -lm -lsocket, $(APP_LDLIBS))
 
 # This used to generate the library path list (the "-Lxxx" options)
+# We replace the path with "$$PJ_DIR"
 PJ_BB_LDFLAGS = $(subst $(PJDIR),\$$\$$PJ_DIR,$(APP_LDFLAGS))
 
 all: 
@@ -26,7 +27,7 @@
 	@echo 'PJ_INCLUDEPATH += $$$$quote($$$$PJ_DIR/pjsip/include)'
 	@echo
 	@for token in $(PJ_BB_LDFLAGS); do \
-		if echo $$token | grep -- '-L\$$' >> /dev/null; then \
+		if echo $$token | grep -- '-L' >> /dev/null; then \
 			echo "PJ_LIBPATH += \$$\$$quote($$token)"; \
 		fi; \
 	done
@@ -38,6 +39,6 @@
 	@echo 'INCLUDEPATH += $$$$PJ_INCLUDEPATH'
 	@echo 'LIBS += $$$$PJ_LIBPATH'
 	@echo 'LIBS += $$$$PJ_LIBS'
-	@echo 'LIBS += -lOpenAL -lalut -laudio_manager -lsocket -lasound -lbbsystem'
+	@echo 'LIBS += -lOpenAL -lalut -laudio_manager -lsocket -lasound -lbbsystem -lm'
 
 
diff --git a/configure-bb10 b/configure-bb10
index 70da2de..9bd50e8 100755
--- a/configure-bb10
+++ b/configure-bb10
@@ -44,6 +44,9 @@
 	echo "# Config file to be included in app's .pro file" > pjsip.pri
 	echo "# Auto-generated by 'configure-bb10 $*'" >> pjsip.pri
 	make -f bb10-config.mak >> pjsip.pri
+
+	echo PJSIP config file for BB10 has been written to \'pjsip.pri\'. You can include this file from your application\'s .pro file.
+	echo
 fi