ejabberd compilation under Mac OS X Snow Leopard require special parameters.
Erl Interface, the library to link Erlang with C code, is compiled as 32-bits code in Erlang R13B-2, even on Snow Leopard. Mac OS X Snow Leopard, the latest version of Apple operating system, is a 64-bits system and will try compiling ejabberd C code in 64-bits as a default.
To compile ejabberd on Mac OS X Snow Leopard with Erlang R13B-2, you need to tell the compiler to compile ejabberd C code as 32-bits. It will match the architecture type of Erl Interface, as installed by Erlang/OTP compilation process.
This is done with the following configure command:
CC='gcc -m32' CFLAGS=-m32 LDFLAGS=-m32 ./configure