diff --git a/configure-pre.in b/configure-pre.in
index 08f9ee3..e32c370 100644
--- a/configure-pre.in
+++ b/configure-pre.in
@@ -221,6 +221,9 @@ AC_ARG_ENABLE(libsoup,
                    AC_DEFINE(ENABLE_LIBSOUP, 1, [enable libsoup transport])
                 fi ])
 
+# SoupTransportAgent depends on glib
+case "$TRANSPORT" in *libsoup*) need_glib=yes;; esac
+
 bluetooth_disabled=no
 AC_ARG_ENABLE(bluetooth,
               AC_HELP_STRING([--enable-bluetooth],
