diff --git a/ekc3/configure b/ekc3/configure
index a6a5846..0dc2057 100755
--- a/ekc3/configure
+++ b/ekc3/configure
@@ -48,6 +48,7 @@ config_gnu
config_i386
pkg_config libbsd-overlay
pkg_config libffi
+pkg_config libmd
config_define PREFIX "\"${PREFIX}\""
update_config_h
LIBS="$LIBS -lm -rpath ${PREFIX}/lib"
@@ -57,19 +58,22 @@ CPPFLAGS_ASAN="$CPPFLAGS"
CFLAGS_ASAN="$CFLAGS -DDEBUG -O1 -g"
CFLAGS_ASAN="$CFLAGS_ASAN -fsanitize=address -fno-omit-frame-pointer"
LDFLAGS_ASAN="$LDFLAGS"
-LIBS_ASAN="$LIBS"
+LIBS_LOCAL_ASAN="../libkc3/libkc3_asan.la"
+LIBS_ASAN="$LIBS $LIBS_LOCAL_ASAN"
# Coverage config
CPPFLAGS_COV="$CPPFLAGS"
CFLAGS_COV="$CFLAGS -fprofile-arcs -ftest-coverage"
LDFLAGS_COV="$LDFLAGS --coverage"
-LIBS_COV="$LIBS -lgcov"
+LIBS_LOCAL_COV="../libkc3/libkc3_cov.la"
+LIBS_COV="$LIBS $LIBS_LOCAL_COV -lgcov"
# Debug config
CPPFLAGS_DEBUG="$CPPFLAGS"
CFLAGS_DEBUG="$CFLAGS -DDEBUG -O0 -g"
LDFLAGS_DEBUG="$LDFLAGS"
-LIBS_DEBUG="$LIBS"
+LIBS_LOCAL_DEBUG="../libkc3/libkc3_debug.la"
+LIBS_DEBUG="$LIBS $LIBS_LOCAL_DEBUG"
# Main config
DEFAULT_CFLAGS="-O2 -fPIC"
@@ -77,7 +81,8 @@ if [ "x$ENV_CFLAGS" = "x" ]; then
CFLAGS="$CFLAGS $DEFAULT_CFLAGS"
fi
CFLAGS="$CFLAGS -DNDEBUG"
-LIBS="$LIBS"
+LIBS_LOCAL="../libkc3/libkc3.la"
+LIBS="$LIBS $LIBS_LOCAL"
echo "LIB = $LIB" >> ${CONFIG_MK}
echo "HAVE_ASAN = $HAVE_ASAN" >> ${CONFIG_MK}
diff --git a/http/configure b/http/configure
index e59335c..a7ca711 100755
--- a/http/configure
+++ b/http/configure
@@ -47,7 +47,9 @@ config_asan
config_gnu
config_i386
pkg_config libbsd-overlay
+pkg_config libevent
pkg_config libffi
+pkg_config libmd
config_define PREFIX "\"${PREFIX}\""
update_config_h
LIBS="$LIBS -levent -lm -rpath ${PREFIX}/lib"