1 # Darwin / Mac OS X only
2 # sh fix_install_names.sh directory binary
4 # Changes 'binary' to assume that all libHS*_dyn.dylib libraries
5 # are to be found in 'directory'.
12 if `test "${type/Mach-O}" == "$type"`
17 if `test x${prefix%/} != x"" `
22 for i in `otool -L $file \
23 | grep 'libHS.*_dyn.dylib' \
24 | sed 's/.\(.*libHS.*_dyn.dylib\).*/\1/'`
26 install_name_tool -change $i "$prefix`basename $i`" $file
29 if `test "${file%.dylib}" != "${file}"`
31 install_name_tool -id "$prefix`basename $file`" $file