- install_name_tool -change $i \
- `echo $i | sed -e "s,$prefix,$new_prefix,"` \
- $file
+ if test $islib = y -a $first = y; then
+ install_name_tool -id `echo $i | sed -e "s,$prefix,$new_prefix,"` $file
+ first=n
+ else
+ install_name_tool -change $i `echo $i | sed -e "s,$prefix,$new_prefix,"` $file
+ fi