From 6c7e8f067dcf4c5d793d162aeb84f074f9a14664 Mon Sep 17 00:00:00 2001 From: Carl Dong Date: Mon, 9 Nov 2020 14:58:42 -0500 Subject: depends: Allow relative CONFIG_SITE path env var Previously, if ./configure was invoked with: ``` $ env CONFIG_SITE=depends/x86_64-pc-linux-gnu/share/config.site ./configure ``` Where $CONFIG_SITE was a relative path, ./configure would fail with the following misleading output: ``` checking for boostlib >= 1.58.0 (105800)... yes checking whether the Boost::System library is available... yes configure: error: Could not find a version of the Boost::System library! ``` Fully resolving depends_prefix in config.site.in fixes this. To make sure that there are no other side effects I ran a diff on the config.status generated by: 1. The scripts prior to this change with CONFIG_SITE set to a full path: env CONFIG_SITE=$PWD/depends/x86_64-pc-linux-gnu/share/config.site ./configure 2. The scripts after this change with CONFIG_SITE set to a relative path: env CONFIG_SITE=depends/x86_64-pc-linux-gnu/share/config.site ./configure And it looks good! Diff: https://paste.sr.ht/~dongcarl/95b469fbc555c128046e85723d87a9082a754f6b --- depends/config.site.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'depends/config.site.in') diff --git a/depends/config.site.in b/depends/config.site.in index 87a3379303..d6835a2d85 100644 --- a/depends/config.site.in +++ b/depends/config.site.in @@ -1,4 +1,4 @@ -depends_prefix="`dirname ${ac_site_file}`/.." +depends_prefix="$(cd "$(dirname ${ac_site_file})/.." && pwd)" cross_compiling=maybe host_alias=@HOST@ -- cgit v1.2.3