-# Gtk GUI check
-gtk2ui_msg=No
-AC_ARG_ENABLE(gtk2ui, [ --enable-gtk2ui Enable the GTK2 user interface])
-if test "$enable_gtk2ui" = yes; then
- if test "$HAS_GTK2" = no; then
- AC_MSG_ERROR([*** cannot build the GTK2 UI without a GTK2 library])
- fi
- if test "$HAS_LIBXML" = no; then
- AC_MSG_ERROR([*** the GTK2 UI needs libxml2])
- fi
-fi
-if test "$enable_gtk2ui" != no -a "$HAS_GTK2" = yes; then
- clients="$clients gtk2"
- gtk2ui_msg=Yes
+# 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