[asterisk-commits] tzafrir: branch group/zapata_conf r89528 - /team/group/zapata_conf/contrib/sc...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Nov 22 17:09:53 CST 2007


Author: tzafrir
Date: Thu Nov 22 17:09:52 2007
New Revision: 89528

URL: http://svn.digium.com/view/asterisk?view=rev&rev=89528
Log:
Support working with extra uninstalled libraries.

Modified:
    team/group/zapata_conf/contrib/scripts/live_ast

Modified: team/group/zapata_conf/contrib/scripts/live_ast
URL: http://svn.digium.com/view/asterisk/team/group/zapata_conf/contrib/scripts/live_ast?view=diff&rev=89528&r1=89527&r2=89528
==============================================================================
--- team/group/zapata_conf/contrib/scripts/live_ast (original)
+++ team/group/zapata_conf/contrib/scripts/live_ast Thu Nov 22 17:09:52 2007
@@ -34,7 +34,27 @@
 AST_BIN=$BASE_DIR/usr/sbin/asterisk
 GDB_INIT=$BASE_DIR/gdbinit
 
+# Optional pathes. Unrem them to use various libraries from custom locations:
+#CONFIGURE_PARAMS="--with-pri=/usr/src/libpri-svn"
+#LD_PATH_EXTRA="/usr/src/libpri-svn"
+
+set_ld_env() {
+  if [ "$LD_PATH_EXTRA" = '' ]; then return; fi
+
+  if [ "$LD_LIBRARY_PATH" = '' ]; then
+    LD_LIBRARY_PATH="$LD_PATH_EXTRA"
+  else
+    LD_LIBRARY_PATH="$LD_PATH_EXTRA:$LD_LIBRARY_PATH"
+  fi
+  export LD_LIBRARY_PATH
+}
+
+
 case "$1" in
+configure)
+  shift
+  ./configure $CONFIGURE_PARAMS "$@"
+  ;;
 install)
   make install DESTDIR=$BASE_DIR
   ;;
@@ -57,17 +77,20 @@
   ;;
 run)
   shift
+  set_ld_env
   $AST_BIN -C $AST_CONF "$@"
   ;;
 gdb)
+  set_ld_env
   gdb -x $GDB_INIT $AST_BIN
   ;;
 *)
-  echo "$0: Usage:        Equivalent of:"
-  echo "$0 install        make install"
-  echo "$0 samples        make samples"
-  echo "$0 run [params]   asterisk [params]"
-  echo "$0 gdb            gdb asterisk"
+  echo "$0: Usage:       	Equivalent of:"
+  echo "$0 configure [params]	./configure [params]"
+  echo "$0 install        	make install"
+  echo "$0 samples        	make samples"
+  echo "$0 run [params]   	asterisk [params]"
+  echo "$0 gdb            	gdb asterisk"
   exit 1
   ;;
 esac




More information about the asterisk-commits mailing list