for file in $(find -name Makefile.am) ; do sed -e "s/libgmp\.la/libmpir.la/g" $file > temp ; mv temp $file ; done
for file in $(find -name Makefile.am) ; do sed -e "s/libgmpxx\.la/libmpirxx.la/g" $file > temp ; mv temp $file ; done
for file in $(find -name Makefile.am) ; do sed -e "s/libgmpxx\.a/libmpirxx.a/g" $file > temp ; mv temp $file ; done