diff --git a/configure.ac b/configure.ac
index 9a7c23ccebefaf88481d0052ce7d5b68116fc38e..2eed858e84a30684448fbe9bc9a7fe9995052495 100644
--- a/configure.ac
+++ b/configure.ac
@@ -30,6 +30,7 @@ AC_CHECK_PROGS([BIBTEX], [bibtex], [true])
 AC_CHECK_PROGS([DVIPDF], [dvipdf], [true])
 AC_CHECK_PROGS([DVIPS], [dvips], [true])
 AC_CHECK_PROGS([WML], [wml], [true])
+AM_CONDITIONAL([WML], [test "x$WML" != xfalse && test "x$WML" != xno])
 AC_CHECK_PROGS([PERL], [perl], [true])
 DUNE_INKSCAPE