Index: src/Makefile.in
--- src/Makefile.in.orig	2009-04-08 12:51:29 +0200
+++ src/Makefile.in	2009-05-08 15:20:00 +0200
@@ -1342,7 +1342,7 @@
 LIBADD_DL = @LIBADD_DL@
 LIBLTDL = @LIBLTDL@
 LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
+LIBS = @ECAP_LIBS@ @LIBS@
 LIBSASL = @LIBSASL@
 LIBTOOL = @LIBTOOL@
 LIB_DB = @LIB_DB@
Index: configure
--- configure.orig	2009-04-08 12:51:47 +0200
+++ configure	2009-05-08 15:48:36 +0200
@@ -22898,7 +22898,7 @@
 #define USE_ECAP 1
 _ACEOF
 
-    ECAP_LIBS="ecap/libecap.la $ECAP_LIBS"
+    ECAP_LIBS="adaptation/ecap/libecap.la $ECAP_LIBS"
     use_adaptation=yes
 else
 
Index: errors/Makefile.in
--- errors/Makefile.in.orig	2009-07-27 02:06:07 +0200
+++ errors/Makefile.in	2009-07-27 19:47:38 +0200
@@ -425,7 +425,7 @@
 		echo "$(INSTALL_DATA) $(srcdir)/errorpage.css $(DESTDIR)$(DEFAULT_STYLESHEET)"; \
 		$(INSTALL_DATA) $(srcdir)/errorpage.css $(DESTDIR)$(DEFAULT_STYLESHEET); \
 	fi ; \
-	$(SHELL) $(srcdir)/alias-link.sh "$(LN)" "$(RM)" "$(DESTDIR)$(DEFAULT_ERROR_DIR)" "$(srcdir)/aliases" || exit 1 ;
+	$(SHELL) $(srcdir)/alias-link.sh "$(LN)" "$(RM)" "$(DESTDIR)" "$(DEFAULT_ERROR_DIR)" "$(srcdir)/aliases" || exit 1 ;
 
 uninstall-local:
 	for l in $(TRANSLATIONDIR) ; do \
@@ -450,7 +450,7 @@
 	rm -f $(DESTDIR)TRANSLATORS
 
 upgrade: install
-	$(SHELL) $(srcdir)/alias-link.sh "$(LN)" "$(RM)" "$(DESTDIR)$(DEFAULT_ERROR_DIR)" "$(srcdir)/alias-upgrade" || exit 1 ;
+	$(SHELL) $(srcdir)/alias-link.sh "$(LN)" "$(RM)" "$(DESTDIR)" "$(DEFAULT_ERROR_DIR)" "$(srcdir)/alias-upgrade" || exit 1 ;
 
 # undocumented hack.  You can use this target to create multi-lingual
 # error pages.  For example:
Index: errors/alias-link.sh
--- errors/alias-link.sh.orig	2009-07-27 02:05:42 +0200
+++ errors/alias-link.sh	2009-07-27 19:48:13 +0200
@@ -8,8 +8,9 @@
 
 LN="${1}"
 RM="${2}"
-DIR="${3}"
-ALIASFILE="${4}"
+DESTDIR="${3}"
+DIR="${4}"
+ALIASFILE="${5}"
 
 if ! test -f ${ALIASFILE} ; then
 	echo "FATAL: Alias file ${ALIASFILE} does not exist!"
@@ -37,7 +38,7 @@
 	# split aliases based on whitespace and create a symlink for each
 	# Remove and replace any pre-existing content/link
 	for alia in ${aliases}; do
-		${RM} -f -r ${DIR}/${alia} || exit 1
-		${LN} -s ${DIR}/${base} ${DIR}/${alia} || exit 1
+		${RM} -f -r ${DESTDIR}${DIR}/${alia} || exit 1
+		${LN} -s ${DIR}/${base} ${DESTDIR}${DIR}/${alia} || exit 1
 	done
 done
