First of all, stay out of the /bin/ or /usr/bin/ directory. Run the program from your home directory. The program should be in your path. If not, add the location of the program to your PATH variable. When referring to a project you are downloading & building, please include a link to the project page. Unit is too general for me to find a Unit project in a google search.
units: can't find units file '/units174/share/units.dat'
This doesn't look right. Are you sure it wasn't looking for ".//units174/share/units.dat"? Installing the program shouldn't be creating a new directory on your root filesystem.
For binary programs, if you have the "strace" program, run "strace /bin/units 2>units.strace". It will print out lines such as:
stat("/usr/local/share/texmf/fonts/opentype", 0x7fff10f8fdd0) = -1 ENOENT (No such file or directory)
The open() or stat commands() will have the path and filename expected.
However, if you have the source code, you could grep for the .dat file.
It is common to have more work when just starting to build programs. After a while, the most common dependencies are taken care of from previous project builds. Also, if the mac is configured to use other directories than used by default, you may need to change certain directories when you configure. see "./configure --help" for projects built using "./configure && make && make install".
Sometimes a project will use /usr/local/ for the base of the directory hierarchy. You may need to add /usr/local/bin/ to your PATH variable and /usr/local/lib to your systems library search path. Using /usr/local will prevent overwriting a system program or library and shouldn't be touched on a unix system if upgrading the system.
note: I'm assuming that strace is used on a mac. It should be.