-# Gtk progress bar check
-gtk2pbar_msg=No
-AH_TEMPLATE(ENABLE_GTK2PBAR, [define to compile GTK2 progress bars (experimental)])
-AC_ARG_ENABLE(gtk2pbar, [ --enable-gtk2pbar Enable GTK2 progress bars (experimental)])
-if test "$enable_gtk2pbar" = yes; then
- if test "$HAS_GTK2" = no; then
- AC_MSG_ERROR([*** cannot build GTK2 progress bars without GTK2])
- fi
- experimental=yes
- gtk2pbar_msg=Yes
- AC_DEFINE(ENABLE_GTK2PBAR)
+# libpanelapplet check
+DOLDA_PKG([HAS_LIBPANELAPPLET], [PKG_CHECK_MODULES(PANELAPPLET, libpanelapplet-2.0, [], [HAS_LIBPANELAPPLET=no])])
+
+# Gaim/Pidgin check
+DOLDA_PKG([HAS_LIBGAIM], [PKG_CHECK_MODULES(GAIM, gaim, [], [HAS_LIBGAIM=no])],
+ [DOLDA_CHECK_HEADER(plugin.h, [], [HAS_LIBGAIM=no], $GAIM_CFLAGS)])
+DOLDA_PKG([HAS_LIBPURPLE], [PKG_CHECK_MODULES(PURPLE, purple, [], [HAS_LIBPURPLE=no])],
+ [DOLDA_CHECK_HEADER(plugin.h, [], [HAS_LIBPURPLE=no], $PURPLE_CFLAGS)])
+
+# Daemon check
+DOLDA_ENABLE(daemon, [ --enable-daemon Enable the daemon], yes,
+ [HAS_LIBZ HAS_LIBBZ2 HAS_GDBM])
+AM_CONDITIONAL(DAEMON, test "$enable_daemon" = yes)
+
+# ADC check
+DOLDA_ENABLE(fnetadc, [ --enable-fnetadc Enable ADC code (experimental)], no,
+ [enable_daemon])
+if test "$enable_fnetadc" = yes; then
+ experimental=yes