sed -e "s%${libdir}%${PRODUCT_DIR}/lib/graphviz%g" $l > _$l
libdir=`dirname $libdir`
sed -e "s%${libdir}%${PRODUCT_DIR}/lib/graphviz%g" _$l > $l
- rm -f _$l
+ tmp=""
+ if [ -n "${TCLHOME}" ]; then
+ tmp="-L${TCLHOME}/lib"
+ fi
+ sed -e "s%-L[^[:space:]]*/tcltk-[0-9]\+\.[0-9]\+\.[0-9]\+/lib[[:space:]]%$tmp %g" $l > _$l
+ mv -f _$l $l
chmod a+x $l
done
if [ -n "${HDF5HOME}" ]; then
tmp="-L${HDF5HOME}/lib"
fi
-sed -e "s%\(.*\)\([[:space:]].*-L.*/hdf5-[0-9]\.[0-9]\.[0-9]/lib[[:space:]]\)\(.*\)%\1 $tmp \3%g" libmed.la > libmed.la.new
+sed -e "s%\(-L[^[:space:]]*/hdf5-[0-9]\.[0-9]\.[0-9]/lib[[:space:]]\)%$tmp %g" libmed.la > libmed.la.new
mv -f libmed.la.new libmed.la
-sed -e "s%\(.*\)\([[:space:]].*-L.*/hdf5-[0-9]\.[0-9]\.[0-9]/lib[[:space:]]\)\(.*\)%\1 $tmp \3%g" libmedC.la > libmedC.la.new
+sed -e "s%\(-L[^[:space:]]*/hdf5-[0-9]\.[0-9]\.[0-9]/lib[[:space:]]\)%$tmp %g" libmedC.la > libmedC.la.new
mv -f libmedC.la.new libmedC.la
chmod 755 libmed.la