diff --git a/configure.ac b/configure.ac
index 94f22de8ea7dd110244ebe2467c35f0c36a50a67..f48a5c3efd7eab8e77a190186283889292f2b3cb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -34,6 +34,9 @@ AC_ARG_WITH(duneweb,
 if test x$with_duneweb != x && test -e $with_duneweb/layout/default.wml ; then
   AC_MSG_WARN([duneweb-directory seems to be wrong!])
 fi
+if test -d $with_duneweb ; then
+  with_duneweb=`(cd $with_duneweb && pwd)` ;
+fi
 AC_SUBST(DUNEWEBDIR, $with_duneweb)
 
 echo