rx: Don't treat calls specially in event package
[openafs.git] / tests / libwrap
1 #!/bin/sh
2 # libwrap - run a command with the specified library paths
3 # Parameters: path_to_library command_to_run command_parameters
4 #
5 # This was written to help run the OpenAFS test suite.
6 #
7 # License: MIT
8
9 NEWLIB_PATH="$1"
10 export NEWLIB_PATH
11
12 shift
13 TEST_COMMAND="$1"
14
15 # Linux, HP-UX (64bit), Solaris, BSD
16 if [ -z "$LD_LIBRARY_PATH" ] ; then
17     LD_LIBRARY_PATH="$NEWLIB_PATH"
18 else
19     LD_LIBRARY_PATH="$NEWLIB_PATH:$LD_LIBRARY_PATH"
20 fi
21 export LD_LIBRARY_PATH
22
23 # Mac OS X
24 if [ -z "$DYLD_LIBRARY_PATH" ] ; then
25     DYLD_LIBRARY_PATH="$NEWLIB_PATH"
26 else
27     DYLD_LIBRARY_PATH="$NEWLIB_PATH:$DYLD_LIBRARY_PATH"
28 fi
29 export DYLD_LIBRARY_PATH
30
31 # HP-UX (32bit)
32 if [ -z "$SHLIB_PATH" ] ; then
33     SHLIB_PATH="$NEWLIB_PATH"
34 else
35     SHLIB_PATH="$NEWLIB_PATH:$SHLIB_PATH"
36 fi
37 export SHLIB_PATH
38
39 # AIX
40 if [ -z "$LIBPATH" ] ; then
41     LIBPATH="$NEWLIB_PATH"
42 else
43     LIBPATH="$NEWLIB_PATH:$LIBPATH"
44 fi
45 export LIBPATH
46
47 shift
48 "$TEST_COMMAND" "$@"