--- curl-config.in
+++ curl-config.in
@@ -23,6 +23,7 @@
 
 prefix=@prefix@
 exec_prefix=@exec_prefix@
+libdir=@libdir@
 includedir=@includedir@
 
 usage()
@@ -136,8 +137,8 @@
        	;;
 
     --libs)
-	if test "X@libdir@" != "X/usr/lib" -a "X@libdir@" != "X/usr/lib64"; then
-	   CURLLIBDIR="-L@libdir@ "
+	if test "X${libdir}" != "X/usr/lib" -a "X${libdir}" != "X/usr/lib64"; then
+	   CURLLIBDIR="-L${libdir} "
 	else
 	   CURLLIBDIR=""
 	fi
@@ -149,7 +150,7 @@
 	;;
 
     --static-libs)
-	echo @libdir@/libcurl.@libext@ @LDFLAGS@ @LIBCURL_LIBS@ @LIBS@
+	echo ${libdir}/libcurl.@libext@ @LDFLAGS@ @LIBCURL_LIBS@ @LIBS@
 	;;
 
     --configure)
