install libraries according to BUILD_WRITE and BUILD_FORTRAN on/off