configure: error: xml2-config not found. Please check your libxml2 installation.
This error message suggests you don't have libxml2 installed. What it really means though is that you don't have its development version installed!
Let's then search what we can find in available packages, what could help us resolve this issue:
$ apt-cache search libxml2 | grep dev
libcroco3-dev - Cascading Style Sheet (CSS) parsing and manipulation toolkit
libxml++2.6-dev - C++ interface to the GNOME XML library (libxml2)
libxml2-dev - Development files for the GNOME XML library
libgdome2-cpp-smart-dev - C++ bindings for GDome2 DOM implementation
libgdome2-dev - Development files for libgdome2
libgdome2-ocaml-dev - OCaml bindings for GDome2 DOM implementation
libgtkmathview-dev - rendering engine for MathML documents
libsp-gxmlcpp-dev - S+P C++ wrapper for Gnome libxml2/libxslt
What we are interested in here is libxml2-dev, let's install it then:
The same procedure applies to all other missing libraries as well, so I will include only final install calls from now on.
configure: error: Could not find pcre.h in /usr
configure: error: Please reinstall the BZip2 distribution
configure: error: Please reinstall the libcurl distribution - easy.h should be in /include/curl/
configure: error: DBA: Could not find necessary header file(s).
checking for db4 major version... configure: error: Header contains different version
configure: error: libjpeg.(a|so) not found.
configure: error: libpng.(a|so) not found.
configure: error: libXpm.(a|so) not found.
configure: error: freetype.h not found.
You need to install postgresql-server-dev-X.Y for building a server-side extension or libpq-dev for building a client-side application.
configure: error: Cannot find libpq-fe.h. Please specify correct PostgreSQL installation path
Make sure you check result of apt-cache search especially in case of this error, as there could be later version of PostgreSQL available.
checking for FreeType 1 support... no - FreeType 2.x is to be used instead
configure: error: Your t1lib distribution is not installed correctly. Please reinstall it.
configure: error: Unable to find gd.h anywhere under /usr
configure: error: Unable to locate gmp.h
configure: error: Cannot find MySQL header files under /usr.
Note that the MySQL client library is not bundled anymore!
configure: error: sasl.h not found!
configure: error: Please reinstall libmhash - I cannot find mhash.h
checking for unixODBC support... configure: error: ODBC header file '/usr/include/sqlext.h' not found!
configure: error: Directory /usr is not a FreeTDS installation directory
configure: error: Cannot find pspell
configure: error: SNMP sanity check failed. Please check config.log for more information.
configure: error: Cannot find libtidy
configure: error: xslt-config not found. Please reinstall the libxslt >= 1.1.0 distribution
configure: error: mcrypt.h not found. Please reinstall libmcrypt.
configure: error: Cannot find OpenSSL's libraries
Add following switch to your ./configure options (optionally updating the path to reflect your system):
configure: error: You've configured extension pdo_sqlite to build statically, but it depends on extension pdo, which you've configured to build shared. You either need to build pdo_sqlite shared or build pdo statically for the build to be successful.
Add following switches to your ./configure options: