The prebuilt installation of SICStus for Mac OS X assumes that Berkeley DB is installed in the default location /usr/local/BerkeleyDB.4.8/.
There is no binary installer available for installing Berkeley DB on Mac OS X. Instead you need to build it yourself. To do this you need to download and install the Apple C compiler (Xcode) and then download, build and install the Berkeley DB library, using something like the following in the Terminal program:
tar xzf db-4.8.30.tar.gz
../dist/configure LDFLAGS='-arch x86_64 -arch i386' CFLAGS='-arch x86_64 -arch i386'
sudo make install
The installation step requires that you are running as an administrator
sudo command will require that you provide the password.
This should print some version information, e.g. ‘Berkeley DB 4.8.30: (April 9, 2010)’.