+### check which frontend we want to use
+LYX_USE_FRONTEND
+dnl The code below is not in a macro, because this would cause big
+dnl problems with the AC_REQUIRE contained in KDE_DO_IT_ALL.
+case "$lyx_use_frontend" in
+ kde)
+ KDE_DO_IT_ALL
+ FRONTEND="kde"
+ FRONTEND_GUILIB="\${top_builddir}/src/frontends/kde/libkde.la"
+ FRONTEND_LDFLAGS="\$(QT_LDFLAGS) \$(KDE_LDFLAGS)"
+ FRONTEND_INCLUDES="\$(QT_INCLUDES) \$(KDE_INCLUDES)"
+ FRONTEND_LIBS="\$(KDE_LIBS)"
+ AC_DEFINE(KDEGUI);;
+ xforms)
+ FRONTEND="xforms"
+ FRONTEND_GUILIB="\${top_builddir}/src/frontends/xforms/libxforms.la";;
+ *)
+ LYX_ERROR(Unknown frontend $lyx_use_frontend);;
+esac
+