One more thing re. GDAL:
For Xerces-C support: the GDAL configure script will attempt to compile a
little test program. There is a definition for LDFLAGS (ca. line 23509),
which may include -lpthread (no matter whether it's actually installed on
your system or not):
LDFLAGS="$LDFLAGS $xerces_lib_flags -lpthread"
If you don't have the pthread library installed, delete the corresponding
item from the definition above.
Benjamin