Author: Dharanendiran <dharanendiran@timesys.com>
Date: Wed, 24 Jul 2024 17:42:02 +0530

---
 src/modules/rlm_perl/configure | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/src/modules/rlm_perl/configure b/src/modules/rlm_perl/configure
index 6ad58dd..834a697 100755
--- a/src/modules/rlm_perl/configure
+++ b/src/modules/rlm_perl/configure
@@ -2940,7 +2940,11 @@ else
 
 	{ $as_echo "$as_me:${as_lineno-$LINENO}: Calling ExtUtils::Embed to get 'ccopts'" >&5
 $as_echo "$as_me: Calling ExtUtils::Embed to get 'ccopts'" >&6;}
-	mod_cflags=$($PERL -MExtUtils::Embed -e ccopts)
+		if [ -n "$PERLCFLAGS" ]; then
+			mod_cflags="$PERLCFLAGS"
+		else
+			mod_cflags=$($PERL -MExtUtils::Embed -e ccopts)
+		fi
 
 	{ $as_echo "$as_me:${as_lineno-$LINENO}: ExtUtil's ccopts were \"${mod_cflags}\"" >&5
 $as_echo "$as_me: ExtUtil's ccopts were \"${mod_cflags}\"" >&6;}
@@ -2955,7 +2959,11 @@ $as_echo "$as_me: Sanitized ccopts are \"${mod_cflags}\"" >&6;}
 
 	{ $as_echo "$as_me:${as_lineno-$LINENO}: Calling ExtUtils::Embed to get 'ldflags'" >&5
 $as_echo "$as_me: Calling ExtUtils::Embed to get 'ldflags'" >&6;}
-	mod_ldflags=$($PERL -MExtUtils::Embed -e ldopts)
+		if [ -n "$PERLLDFLAGS" ]; then
+			mod_ldflags="$PERLLDFLAGS"
+		else
+			mod_ldflags=$($PERL -MExtUtils::Embed -e ldopts)
+		fi
 
 	{ $as_echo "$as_me:${as_lineno-$LINENO}: ExtUtil's ldopts were \"${mod_ldflags}\"" >&5
 $as_echo "$as_me: ExtUtil's ldopts were \"${mod_ldflags}\"" >&6;}
-- 
2.25.1

