##############
### LADCCA ###
##############
CHANGEME_enable_ladcca="yes"
AC_ARG_ENABLE(ladcca,
[  --disable-ladcca        disable LADCCA support],[
  case "$enableval" in
    "yes")
      ;;
    "no")
      CHANGEME_enable_ladcca="no"
      ;;
    *)
      AC_MSG_ERROR([must use --enable-ladcca(=yes/no) or --disable-ladcca])
      ;;
  esac
])

if test "$CHANGEME_enable_ladcca" = "yes"; then
  PKG_CHECK_MODULES(LADCCA, ladcca-1.0 >= 0.4.0, LADCCA_FOUND="yes", LADCCA_FOUND="no")
  
  if test "$LADCCA_FOUND" = "yes"; then
    AC_DEFINE(HAVE_LADCCA, 1, [whether or not we are supporting ladcca])
    LADCCA_VERSION=$( pkg-config --modversion ladcca-1.0 )
    AC_DEFINE_UNQUOTED(LADCCA_VERSION, "$LADCCA_VERSION", [The version of ladcca we're compiling against])
    AC_SUBST(LADCCA_CFLAGS)
    AC_SUBST(LADCCA_LIBS)
  fi
else
  AC_MSG_WARN([LADCCA support is disabled])
  LADCCA_FOUND="no"
fi
AM_CONDITIONAL(HAVE_LADCCA, test "$LADCCA_FOUND" = "yes")

