Problem installing root on MacOSX: can't find MathCore.dylib


I am trying to install root 5.24 on MacOSX 10.4.11. I used this configuration:
./configure macosx --enable-roofit --enable-minuit2 --enable-table --enable-ruby --enable-python

The make command ends with the error below. It says it cannot find the libMathCore.dylib in /lib/. Why doesn’t the linker find the library in the lib directory of the root installation? And how can I tell it to do so? I tried using --prefix=.
but that didn’t work either. What am I missing?

ld: warning can’t open dynamic library: /lib/libMathCore.dylib referenced from:
lib/libNet.dylib (checking for undefined symbols may be affected) (No such file
or directory, errno = 2)
ld: Undefined symbols:
_gRandom referenced from libNet expected to be defined in /lib/libMathCore.dylib
/usr/libexec/gcc/i686-apple-darwin8/4.0.1/libtool: internal link edit command fa
make: *** [lib/libTree.dylib] Error 1