added conditions and implemented AC_COLLECTD() macro.