Browse code

app_perl: Makefile - option to set the path to perl binary

Daniel-Constantin Mierla authored on 11/07/2022 08:15:32
Showing 1 changed files
... ...
@@ -1,4 +1,4 @@
1
-# perl module makefile
1
+# app_perl module makefile
2 2
 #
3 3
 #
4 4
 # WARNING: do not run this directly, it should be run by the main Makefile
... ...
@@ -8,14 +8,16 @@ auto_gen=kamailioxs.c
8 8
 NAME=app_perl.so
9 9
 LIBS=
10 10
 
11
+PERLBIN ?= perl
12
+
11 13
 ifeq ($(PERLLDOPTS),)
12
-	LIBS+=`perl -MExtUtils::Embed -e ldopts`
14
+	LIBS+=`$(PERLBIN) -MExtUtils::Embed -e ldopts`
13 15
 else
14 16
 	LIBS+=$(PERLLDOPTS)
15 17
 endif
16 18
 
17 19
 ifeq ($(PERLCCOPTS),)
18
-	PERLCCOPTS=$(shell perl -MExtUtils::Embed -e ccopts)
20
+	PERLCCOPTS=$(shell $(PERLBIN) -MExtUtils::Embed -e ccopts)
19 21
 endif
20 22
 DEFS+=$(PERLCCOPTS)
21 23
 
... ...
@@ -25,7 +27,7 @@ PODFILES=kamailioxs.xs `find lib/perl -name *.pm`
25 27
 
26 28
 ifeq ($(TYPEMAP),)
27 29
 	ifeq ($(PERLLIBPATH),)
28
-		PERLLIBPATH=`perl -MConfig -e 'print $$Config{installprivlib}'`
30
+		PERLLIBPATH=`$(PERLBIN) -MConfig -e 'print $$Config{installprivlib}'`
29 31
 	endif
30 32
 	TYPEMAP=$(PERLLIBPATH)/ExtUtils/typemap
31 33
 endif