You can type
export LDFLAGS="-L/usr/local/lib -Wl,-rpath,/usr/local/lib"
at your promt to set the LDFLAGS. Remember that this will only be set for that session, so as soon as you log out the setting will be lost. Likewise, if you open a new tab or so forth it will not have this setting.
To install to /usr/local you'd type
You more than likely WOULDN'T want to install it to /usr/local/lib (I'm guessing you just used that as an example, but just want to make sure you realise that).
I'm not sure why make distclean
didn't work for you. Perhaps you haven't run make yet (so there is nothing to clean up). Just a guess though. However - and I'm subject to correction here - I don't believe it is necessary for you to run it, as when you run ./configure
, they will simply overwrite your old files, meaning that it's really irrelevant whether you run make distclean
before or not.
Hope that helps