blob: 212e52e12be1ecfa9ba8f16b876098eb9c23737e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
#!/usr/bin/env bash
set -eu
if ! type gnunet-config >/dev/null; then
echo "$0 needs gnunet-config to be installed"
exit 1
fi
# FIXME: not very portable ...
# FIXME: should use "libdir" instead of prefix/lib, but somehow
# the recursive expansion does not work ;-(.
GC=`which gnunet-config`
ASAN=""
A=`ldd $GC | grep libasan` && ASAN=`echo $A | awk '{print $3 ":"}'`
if test -z $ASAN
then
A=`ldd @prefix@/lib/libtalerutil.so | grep libasan` && ASAN=`echo $A | awk '{print $3 ":"}'`
fi
export LD_PRELOAD=${ASAN}${LD_PRELOAD:-}:@prefix@/lib/libtalerutil.so
exec gnunet-config "$@"
|