diff --git a/tests/fake-curl/libcurl/Makefile b/tests/fake-curl/libcurl/Makefile
index b05bc89..085244d 100644
--- tests/fake-curl/libcurl/Makefile
+++ tests/fake-curl/libcurl/Makefile
@@ -8,8 +8,8 @@ all: \
 .SUFFIXES: .c .so
 
 .c.so:
-	`curl-config --cc` `curl-config --cflags` -shared -fPIC \
-		-Wl,-soname,$@ -o $@ $<
+	`%PREFIX%/bin/curl-config --cc` `%PREFIX%/bin/curl-config --cflags` -shared -fPIC \
+		-o $@ $<
 
 show-targets:
 	ls *c |sed -e 's/.c$$/.so/' | awk '{print $$1 " \\"}'