In case anyone else has this problem, the version of glib-2.0 was outdated.
To solve this, update glib-2.0 to a more recent version, and then run the configure script.
$./configure --disable-tcl --disable-python \
CFLAGS="-O3 -fPIC" LIBS="-lm -lwrap" \
PKG_CONFIG_PATH=/mypath/lib/libxml2/lib/pkgconfig:/mypath2/glib-2.0/lib/pkgconfig \
--prefix=/mypath3 \
After the configure script runs successfully, call make
to compile the src.