if gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I../autoopts -I/usr/include/libxml2 -O2 -MT x.o -MD -MP -MF ".deps/x.Tpo" -c -o x.o x.c; \
then mv -f ".deps/x.Tpo" ".deps/x.Po"; else rm -f ".deps/x.Tpo"; exit 1; fi
/bin/sh ../libtool --tag=CC --mode=link gcc -O2 -o xml2ag x.o ../autoopts/libopts.la -L/usr/lib -lxml2 -lm -ldl
mkdir .libs
gcc -O2 -o .libs/xml2ag x.o ../autoopts/.libs/libopts.so -L/usr/lib /usr/lib/libxml2.so -lz -lm -ldl
/usr/bin/ld: cannot find -lz
collect2: ld returned 1 exit status
make[3]: *** [xml2ag] Error 1
make[3]: Leaving directory `/build/buildd9/autogen-5.8.3/xml2ag'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/build/buildd9/autogen-5.8.3'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/build/buildd9/autogen-5.8.3'
make: *** [build-stamp] Error 2
The "-lz" is coming from libtool's analysis of libxml2-dev's .la file. The correction for this is to fix libxml2-dev's Depends to include zlib1g-dev.