dnl Yo Yo Yo
AC_INIT(src/iax.c)
AM_INIT_AUTOMAKE([iax], [0.2.3])


dnl Check for various goodies
AC_PROG_CC
AM_PROG_LIBTOOL
dnl LIBTOOL="$LIBTOOL --silent"
AC_PROG_INSTALL

dnl Check for libraries
dnl None available

dnl Check header files
AC_HEADER_STDC

AC_SUBST(LIBS)
AM_CONDITIONAL(ISMAC, [test `uname -s` = Darwin])
AC_ARG_ENABLE(snomhack,     [  --enable-snomhack       Use slower memset for SNOM phoneem ],,enable_snomhack=no)
AC_ARG_ENABLE(extreme_debug,     [  --enable-extreme-debug  Compile with extreme debugging code enabled ],,enable_extreme_debug=no)
AC_ARG_ENABLE(newjb,     [  --enable-newjb       Use new jitter buffer  ], [CFLAGS="$CFLAGS -DNEWJB"])
if test "$enable_snomhack" = yes ; then
	AC_DEFINE(SNOM_HACK)
fi

if test "$enable_extreme_debug" = yes ; then
	AC_DEFINE(EXTREME_DEBUG)
fi

AC_SUBST(IAX_VERSION)

AC_OUTPUT([
Makefile
src/Makefile
iax.spec
iax-config],[case "$CONFIG_FILES" in
*iax-config*)chmod +x iax-config;;
esac])
