Oh, they have their own version of Xapian, so you shouldn't install xapian-core-devel.
I see a typo on the page you reference: it should be "sh build.sh $CYRUSLIBS" instead of "sh build.sh $CYRUSLIBS_DIR".
After building the libraries, if you stay in the same shell (to keep the environment variables) and proceed to the explanations on http://www.cyrusimap.org/imap/developer/compiling.html#compiling, you can try and pass the value of LDFLAGS when invoking the configure script:
./configure CFLAGS="-W -Wno-unused-parameter -g -O0 -Wall -Wextra -Werror -fPIC" \ LDFLAGS="${LDFLAGS}" \ --enable-coverage --enable-calalarmd --enable-autocreate \ --enable-nntp --enable-http --enable-unit-tests \ --enable-replication --with-openssl=yes --enable-murder \ --enable-idled --prefix=/usr/cyrus