summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorCristian Morales Vega <cristian@samknows.com>2020-10-11 23:46:53 +0100
committerDaniel Stenberg <daniel@haxx.se>2020-10-15 16:04:21 +0200
commit3862c37b6373a55ca704171d45ba5ee91dec2c9f (patch)
treed3c498a5d9aeb2d53e079fd3b075b533ae759ddc /configure.ac
parent88bf689f94bc5717f1826192fbe2bea252804bcb (diff)
downloadcurl-3862c37b6373a55ca704171d45ba5ee91dec2c9f.tar.gz
libcurl.pc: make it relocatable
It supposes when people specify the libdir/includedir they do it to change where under prefix/exec_prefix it should be, not to make it independent of prefix/exec_prefix. Closes #6061
Diffstat (limited to 'configure.ac')
-rwxr-xr-xconfigure.ac12
1 files changed, 12 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 2304775b1..8676b4825 100755
--- a/configure.ac
+++ b/configure.ac
@@ -53,6 +53,18 @@ CURL_CHECK_OPTION_ECH
XC_CHECK_PATH_SEPARATOR
+pkgconfigdir='${libdir}/pkgconfig'
+AC_SUBST(pkgconfigdir)
+
+AX_COMPUTE_RELATIVE_PATHS(pkgconfigdir:prefix:pkgconf_to_prefix)
+AX_COMPUTE_RELATIVE_PATHS(pkgconfigdir:exec_prefix:pkgconf_to_exec_prefix)
+AX_COMPUTE_RELATIVE_PATHS(exec_prefix:libdir:exec_prefix_to_libdir)
+AX_COMPUTE_RELATIVE_PATHS(prefix:includedir:prefix_to_includedir)
+AC_SUBST(pkgconf_to_prefix)
+AC_SUBST(pkgconf_to_exec_prefix)
+AC_SUBST(exec_prefix_to_libdir)
+AC_SUBST(prefix_to_includedir)
+
#
# save the configure arguments
#