[AC_CHECK_HEADER([iax2.h], , AC_MSG_FAILURE([Unable to find the libiax2 headers (you may need to install the dev package). You may use --without-iax2 to compile without iax2 protocol support.]))]
[AC_CHECK_LIB([iax2], [speex_decode_int],
[AC_CHECK_HEADER([iax/iax.h], , AC_MSG_FAILURE([Unable to find the libiax2 headers (you may need to install the dev package). You may use --without-iax2 to compile without iax2 protocol support.]))]
[AC_CHECK_LIB([iax], [iax_init],
[],
[AC_MSG_FAILURE(
[libiax2 link test failed. You may use --without-iax2 to compile without iax2 protocol support.])]