diff --git a/daemon/configure.ac b/daemon/configure.ac
index bcb9cd866365eada3b3b20f09bec4779fffa9dde..99b79a1e662ac2ad5e4f70edf06998a15cbe1379 100644
--- a/daemon/configure.ac
+++ b/daemon/configure.ac
@@ -552,7 +552,7 @@ AC_DEFUN([BB_ENABLE_DOXYGEN],
         AC_PATH_PROG(DOT, dot, , $PATH)
         test x$DOT = x -a "x$enable_dot" = xyes && AC_MSG_ERROR([could not find dot])
     fi
-    AM_CONDITIONAL(ENABLE_DOXYGEN, test x$DOXYGEN = xyes)
+    AM_CONDITIONAL(ENABLE_DOXYGEN, test "x$DOXYGEN" != "x")
 ])
 
 # Actually perform the doxygen check