You definitely don’t need MySQL or PHP unless you want to use them. You almost definitely don’t need libpri if you don’t even want zaptel. However, it’s a good idea to have zaptel; just load ztdummy kernel module if you don’t plan to use any hardware.
I think the easiest way is to follow what ShakataGaNai suggested, build-depend. (Wish I had this tip when I started on Ubuntu. BTW, there’s an excellent Asterisk/Debian howto.)
Otherwise, straight from my hand notes: (may have missing items)
Most likely you’ll still need to do an apt-cache search on kernel so you get the right kernel headers (if 2.6) or full kernel source (if 2.4). Depending on your distribution, you may already have some of these, or you may be missing others. Anyway, nothing substitutes a bit trial and error in make. (In the Linux world, c’est la vie.) I know there might be missing directories, etc., that a simple symbolic link will help. But you really need to decipher the original message from your system.