#!/bin/sh # This is sourced by run_guile_tests to establish the environment # variables required to run the tests in the build tree. abs_top_srcdir=@abs_top_srcdir@ abs_top_builddir=@abs_top_builddir@ # FIXME add in OS/X DYLD_LIBRARY_PATH # FIXME add in cywin*/win*/mingw* PATH # FIXME add in withdirs # 1st argument is absolute path to component C++ shared library build directory # 2nd argument is absolute path to hand coded guile source directory # 3nd argument is absolute path to component SWIG build directory function add_local_paths(){ if [ $# -ne 3 ] then echo "$0: requires 3 args" 1>&2 exit 1 fi echo FIXME: $0: implement add_local_paths # [ -n "$1" ] && prepend LTDL_LIBRARY_PATH "$1/.libs" # [ -n "$2" ] && prepend GUILE_LOAD_PATH "$2" # [ -n "$3" ] && prepend LTDL_LIBRARY_PATH "$3/.libs" # [ -n "$3" ] && prepend GUILE_LOAD_PATH "$3/guile" } # usage: prepend function prepend(){ if [ $# -ne 2 ] then echo "$0: prepend needs 2 args" 1>&2 exit 1 fi local path="$1" dir="$2" contents="" eval "contents=\$$path" #echo "path = $path" #echo "dir = $dir" #echo "contents = $contents" if [ "$dir" != "" ] then if [ "$contents" = "" ] then eval "$path=\"$dir\"" else eval "$path=\"$dir:$contents\"" fi fi #echo end-of-prepend: $path=${!path} } # ------------------------------------------------------------------------ # Everybody gets gruel and gnuradio-core for free. # FIXME Eventually this should be gruel and gnuradio-runtime. # ------------------------------------------------------------------------ # Where to search for not yet installed C++ shared libraries prepend mylibdir $abs_top_builddir/gruel/src/lib/.libs prepend mylibdir $abs_top_builddir/gnuradio-core/src/lib/.libs # Where to search for not yet installed swig generated guile libs prepend mylibdir $abs_top_builddir/gnuradio-core/src/lib/swig/.libs # Where to seach for guile code. prepend guile_load_path $abs_top_srcdir/gnuradio-core/src/guile prepend guile_load_path $abs_top_builddir/gnuradio-core/src/lib/swig #echo "mylibdir = $mylibdir" #echo "guile_load_path = $guile_load_path" prepend LTDL_LIBRARY_PATH "$mylibdir" prepend GUILE_LOAD_PATH "$guile_load_path" export LTDL_LIBRARY_PATH export GUILE_LOAD_PATH export GUILE_WARN_DEPRECATED=no