Where to install libraries such as hdf5 I'm trying to install HDF5 and SZIP following http://www.ulmer.org/2014/building-hdf5-for-os-x-mavericks/[this description].

However, I'm wondering where to install it (on mavericks). Google didn't show anything, is there any space recommended as a destination directory? Please indicate for both current user and all users.
If you follow those instructions, the package will install everything to /usr/local. This is a recommended place to install user-compiled software because it's already in your PATH, doesn't need elevated permissions, and a lot of stuff breaks if it's not in either /usr or /usr/local . If you open the DEST directory that's created before the pkgutil step, you'll see where everything gets installed. It's the --PREFIX=/usr/local in the configure step that decides the path relative to which things get installed.

Incidentally, both those packages can be found in homebrew which, in my opinion, is a better way to manage these things and you may find more straightforward. After you install homebrew:

brew install szip hdf5