Porosity and elastic anisotropy of rocks under tectonic stress and pore-pressure changes