I was also struggling with this a little bit but I got to the bottom of it with the help of the chaps on the netatalk mailing list.
Basically CentOS 5.4 should already have BerkeleyDB libraries pre-installed
This should tell you if you have it... should be a folder called db4-4.3.blah
So you shouldn't even need to bother installing BerkeleyDB yourself
EDIT: I also needed to install the BerkeleyDB dev libraries as advised by a knowledgable chap on the Netatalk mailing list
yum install db4-devel
Then this is what I did to download/build/install:
gunzip -d netatalk-2.0.5.tar.gz
tar -xf netatalk-2.0.5.tar
./configure --enable-redhat --with-mutex="x86/gcc-assembly"
Then the netatalk config files were all stored in /usr/local/etc/netatalk which confused me a bit as I was coming from Ubuntu. Also the service is called atalk in /etc/init.d rather than netatalk
If you want to do it the hard way with your own BerkeleyDB...
Followed the steps above then:
On 32bit I gave an option to netatalk's configure script...
./configure --enable-redhat --with-bdb=/usr/local/BerkeleyDB.4.8
And it configured without errors.
On 64bit CentOS 5.4 I had the same problem as ptmixer above.
Turns out there was a slight bug in the netatalk configure script which has been fixed for future versions but the way round it to create a symlink in /usr/local/BerkeleyDB.4.8 from lib64 -> lib
The netatalk configure script is looking for BerkeleyDB in a lib64 folder, not lib so I did
ln -s /usr/local/BerkeleyDB.4.8/lib /usr/local/BerkeleyDB.4.8/lib64
Then ran the same configure string as above
Then I had trouble actually getting the atalk service to start so I added /usr/local/BerkeleyDB.4.8 to the /etc/ld.so.conf file and ran /sbin/ldconfig then it started fine
Hope this saves some time for people