diff --git a/sflphone-common/Makefile.am b/sflphone-common/Makefile.am
index c06b61eb6fff2a4b8a63de7e83f420254de03593..4fa6a7d84baf7f50e131b627b0399566c1f0196b 100644
--- a/sflphone-common/Makefile.am
+++ b/sflphone-common/Makefile.am
@@ -18,13 +18,8 @@ unittest:
 	@echo " -- You need the cppunit devel package to compile the unitary tests."
 endif
 
-doc:
-	@(cd doc; make)
-	@echo ""
-	@echo "D-Bus API HTML documentation has been generated in doc/dbus-api/doc/spec"
-	@echo ""
-
 ACLOCAL_AMFLAGS = -I m4
-SUBDIRS = libs src ringtones man $(TESTS_DIR)
+SUBDIRS = libs src ringtones man $(TESTS_DIR) doc
+
 EXTRA_DIST = m4/*.m4 images/* README.gentoo
 
diff --git a/sflphone-common/configure.ac b/sflphone-common/configure.ac
index bf06147a0298c69e3a099dc00a66b4a28f2b9382..7fad216b7659e24a1f715652d8feb8cb153c3ca4 100644
--- a/sflphone-common/configure.ac
+++ b/sflphone-common/configure.ac
@@ -324,36 +324,16 @@ AM_CONDITIONAL(USE_NETWORKMANAGER, test "x$with_networkmanager" = "xyes" )
 # ----------------------------------------------------------------------------
 AC_DEFUN([BB_ENABLE_DOXYGEN],
     [
-    AC_ARG_ENABLE(doxygen, [  --enable-doxygen        enable documentation generation with doxygen (auto)])
+    AC_ARG_ENABLE(doxygen, [  --enable-doxygen        enable documentation generation with doxygen (disabled by default)])
     AC_ARG_ENABLE(dot, [  --enable-dot            use 'dot' to generate graphs in doxygen (auto)])
-    AC_ARG_ENABLE(html-docs, [  --enable-html-docs      enable HTML generation with doxygen (yes)], [], [ enable_html_docs=yes])
-    AC_ARG_ENABLE(latex-docs, [  --enable-latex-docs     enable LaTeX documentation generation with doxygen (no)], [], [ enable_latex_docs=no])
-    if test "x$enable_doxygen" = xno; then
-        enable_doc=no
-    else
+    if test "x$enable_doxygen" = xyes; then
         AC_PATH_PROG(DOXYGEN, doxygen, , $PATH)
-        if test x$DOXYGEN = x; then
-            test "x$enable_doxygen" = xyes && AC_MSG_ERROR([could not find doxygen])
-            enable_doc=no
-        else
-            enable_doc=yes
+        test x$DOXYGEN = x && AC_MSG_ERROR([could not find doxygen])
         AC_PATH_PROG(DOT, dot, , $PATH)
-        fi
+        test x$DOT = x -a "x$enable_dot" = xyes && AC_MSG_ERROR([could not find dot])
     fi
-    AM_CONDITIONAL(DOC, test x$enable_doc = xyes)
-
-	if test x$DOT = x; then
-        test "x$enable_dot" = xyes && AC_MSG_ERROR([could not find dot])
-        enable_dot=no
-	else
-        enable_dot=yes
-	fi
-	AM_CONDITIONAL(ENABLE_DOXYGEN, test x$enable_doc = xtrue)
-	AC_SUBST(enable_dot)
-	AC_SUBST(enable_html_docs)
-	AC_SUBST(enable_latex_docs)
+	AM_CONDITIONAL(ENABLE_DOXYGEN, test x$DOXYGEN = xyes)
 ])
-
 # Acutally perform the doxygen check
 BB_ENABLE_DOXYGEN
 
diff --git a/sflphone-common/doc/Makefile.am b/sflphone-common/doc/Makefile.am
index f742c26ce5b69235cbafa55a31bf5292ffffa0e7..10aa20d83f75f1c69b8e4e0e3bf8f26006d9114d 100644
--- a/sflphone-common/doc/Makefile.am
+++ b/sflphone-common/doc/Makefile.am
@@ -1,5 +1,7 @@
- 
-SUBDIRS = doxygen dbus-api
+SUBDIRS = dbus-api
+if ENABLE_DOXYGEN
+	SUBDIRS += doxygen
+endif
 
 .PHONY: doc
 doc:
diff --git a/sflphone-common/doc/doxygen/Makefile.am b/sflphone-common/doc/doxygen/Makefile.am
index 57c36f9880e53b6611515a0961a798e247d67389..75d619d822ad919a218ad660e9ec69f373a02a95 100644
--- a/sflphone-common/doc/doxygen/Makefile.am
+++ b/sflphone-common/doc/doxygen/Makefile.am
@@ -12,7 +12,7 @@ all: doxygen-trac
 doxygen-trac: clean core-doc-trac gtk-gui-doc-trac
 
 %-doc-trac : %-doc
-	ln -s ${html_parent_dir}/$< ${html_parent_dir}/$</html
+	ln -sf ${html_parent_dir}/$< ${html_parent_dir}/$</html
 
 doc: clean core-doc gtk-gui-doc