+# Where to find gruel library files
+grueldir=@gruel_LIBDIRPATH@
+
+# Where to find gnuradio core's library files
+grcoredir=@gnuradio_core_LIBDIRPATH@
+
+# Construct search path for python modules
+# Check each one to make sure it's not "" before adding
+grlibdir=""
+for dir in $grcoredir $grueldir
+do
+ if [ "$dir" != "" ]
+ then
+ if [ "$grlibdir" = "" ]
+ then
+ grlibdir="$dir"
+ else
+ grlibdir="$dir:$grlibdir"
+ fi
+ fi
+done
+
+# Add 'mylibdir' to the start of the library load path, to get local
+# (to this component) created libraries
+
+# Where to find pre-installed libraries
+withlibdirs=@with_LIBDIRPATH@
+
+case "@host_os@" in
+ darwin*)
+ # Special Code for executing on Darwin / Mac OS X only
+ if [ "$DYLD_LIBRARY_PATH" = "" ]
+ then
+ DYLD_LIBRARY_PATH=$mylibdir
+ else
+ DYLD_LIBRARY_PATH=$mylibdir:$DYLD_LIBRARY_PATH
+ fi
+ # DYLD_LIBRARY_PATH will not be empty now
+ # Add the grlibdir paths to the front of any library load variable
+ if [ "$grlibdir" != "" ]
+ then
+ DYLD_LIBRARY_PATH=$grlibdir:$DYLD_LIBRARY_PATH
+ fi
+ # Add the withdirs paths to the end of any library load variable
+ if [ "$withlibdirs" != "" ]
+ then
+ DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:$withlibdirs
+ fi
+ export DYLD_LIBRARY_PATH
+ ;;
+ cygwin*|win*|mingw*)
+ # Special Code for executing on Win32 variants only
+ if [ "$PATH" = "" ]
+ then
+ PATH=$mylibdir
+ else
+ PATH=$mylibdir:$PATH
+ fi
+ # PATH will not be empty now
+ # Add the grlibdir paths to the front of any library load variable
+ if [ "$grlibdir" != "" ]
+ then
+ PATH=$grlibdir:$PATH
+ fi
+ # Add the withdirs paths to the end of any library load variable
+ if [ "$withlibdirs" != "" ]
+ then
+ PATH=$PATH:$withlibdirs
+ fi
+ export PATH
+ ;;
+esac