From 47634b9cf1f80a200e080c417719c7367fdff4be Mon Sep 17 00:00:00 2001 From: Danielle McLean Date: Mon, 23 Oct 2023 14:38:27 +1100 Subject: [PATCH] Support relative --with-pmdir by using FindBin --- Makefile.am | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile.am b/Makefile.am index 7748399..22cd470 100644 --- a/Makefile.am +++ b/Makefile.am @@ -116,11 +116,14 @@ edit = sed -e 's|[@]PERL[@]|$(PERL)|g' \ pmdir_in_INC = \ PERL5LIB= $(PERL) -V | \ awk '/@INC/ {p=1; next} p==1 {print $$1}' | \ - grep -q "$(pmdir)" + grep -F -q "$(pmdir)" calc_use_lib_pmdir = \ + pmdir="$(pmdir)"; \ if $(pmdir_in_INC); then \ use_lib_pmdir=""; \ + elif [ "$${pmdir\#../}" != "$$pmdir" ]; then \ + use_lib_pmdir="use FindBin; use lib \"\$$FindBin::Bin/$$pmdir\";"; \ else \ use_lib_pmdir="use lib \"$(pmdir)\";"; \ fi