From 2bbac55f91b3434f5014621d447fa56d1cdc03b3 Mon Sep 17 00:00:00 2001 From: smdn Date: Sun, 26 May 2024 19:22:46 +0900 Subject: [PATCH] fix to setting PKG_CONFIG_PATH --- src/highlight/configure.ps1 | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/highlight/configure.ps1 b/src/highlight/configure.ps1 index 16756ef..3e04fb6 100755 --- a/src/highlight/configure.ps1 +++ b/src/highlight/configure.ps1 @@ -42,10 +42,12 @@ function Build-ConfigMk { # For pkg-config to find lua@5.3 you may need to set: # export PKG_CONFIG_PATH="/opt/homebrew/opt/lua@5.3/lib/pkgconfig" - $Env:PKG_CONFIG_PATH = - "/opt/homebrew/opt/lua@5.3/lib/pkgconfig;" + - "/usr/local/opt/lua@5.3/lib/pkgconfig;" + - $Env:PKG_CONFIG_PATH + foreach ($pkg_config_path in ("/opt/homebrew/opt/lua@5.3/lib/pkgconfig", "/usr/local/opt/lua@5.3/lib/pkgconfig")) { + if (Test-Path -Path $pkg_config_path) { + $Env:PKG_CONFIG_PATH = $pkg_config_path + break + } + } } Get-Command -ErrorAction:SilentlyContinue pkg-config | Out-Null