1. Updated to git HEAD 7a46fd67cd2833f07d583288b8d2dc084733fc91 (v1.9.0)
[feed/telephony.git] / net / freeswitch / patches / musl / src-mod-languages-mod_perl-Makefile_am.patch
1 --- a/src/mod/languages/mod_perl/Makefile.am
2 +++ b/src/mod/languages/mod_perl/Makefile.am
3 @@ -1,29 +1,27 @@
4 include $(top_srcdir)/build/modmake.rulesam
5 MODNAME=mod_perl
6 -PERL = perl
7 -PERL_LIBDIR =-L`perl -MConfig -e 'print $$Config{archlib}'`/CORE
8 -PERL_LIBS =`perl -MConfig -e 'print $$Config{libs}'`
9
10 -perldir=$(prefix)/perl
11 +perldir = /usr/lib/perl5/@PERL_VERSION@/CORE
12 mod_LTLIBRARIES = mod_perl.la
13 perl_LTLIBRARIES = freeswitch.la
14 mod_perl_la_SOURCES = mod_perl.c freeswitch_perl.cpp mod_perl_wrap.cpp perlxsi.c
15 -mod_perl_la_CFLAGS = $(SWITCH_AM_CFLAGS)
16 -mod_perl_la_CXXFLAGS = $(SWITCH_AM_CXXFLAGS)
17 -mod_perl_la_CPPFLAGS = -w -DMULTIPLICITY `$(PERL) -MExtUtils::Embed -e ccopts` -DEMBED_PERL -I$(switch_srcdir)/libs/libteletone/src/
18 +mod_perl_la_CFLAGS = $(SWITCH_AM_CFLAGS) @PERL_INC@
19 +mod_perl_la_CXXFLAGS = $(SWITCH_AM_CXXFLAGS) @PERL_INC@
20 +mod_perl_la_CPPFLAGS = @PERL_CFLAGS@ -I$(switch_srcdir)/libs/libteletone/src/
21 mod_perl_la_LIBADD = $(switch_builddir)/libfreeswitch.la
22 -mod_perl_la_LDFLAGS = -avoid-version -module -no-undefined -shared `$(PERL) -MExtUtils::Embed -e ldopts` `$(PERL) -MConfig -e 'print $$Config{libs}'`
23 +mod_perl_la_LDFLAGS = -avoid-version -module -no-undefined -shared @PERL_LDFLAGS@ @PERL_LIBS@
24
25 freeswitch_la_SOURCES = freeswitch_perl.cpp mod_perl_wrap.cpp perlxsi.c
26 freeswitch_la_LDFLAGS = -avoid-version -module -no-undefined -shared $(LDFLAGS)
27 -freeswitch_la_CPPFLAGS = $(SWITCH_AM_CPPFLAGS) -w -DMULTIPLICITY `$(PERL) -MExtUtils::Embed -e ccopts` -DEMBED_PERL -I$(switch_srcdir)/libs/libteletone/src/
28 +freeswitch_la_CPPFLAGS = $(SWITCH_AM_CPPFLAGS) @PERL_CFLAGS@ -I$(switch_srcdir)/libs/libteletone/src/
29 +
30 reswig: swigclean mod_perl_wrap.cpp
31
32 swigclean: clean
33 rm -f mod_perl_wrap.* freeswitch.so freeswitch.pm
34
35 mod_perl_wrap.cpp:
36 - swig2.0 -static -shadow -perl5 -c++ -DMULTIPLICITY -I../../../../src/include -o mod_perl_wrap.cpp freeswitch.i
37 + ${STAGING_DIR_HOSTPKG}/bin/swig -static -shadow -perl5 -c++ -DMULTIPLICITY -I../../../../src/include -o mod_perl_wrap.cpp freeswitch.i
38 echo "#include \"mod_perl_extra.c\"" >> mod_perl_wrap.cpp
39 patch -s -p0 -i hack.diff
40
41 @@ -31,7 +29,7 @@ orig: mod_perl_wrap.cpp
42 patch -R -s -p0 -i hack.diff
43
44 .perlok:
45 - @(${PERL} -V | grep -i usemultiplicity=define >/dev/null && echo Phew, You have the right perl.) \
46 + @(@PERL@ -V | grep -i usemultiplicity=define >/dev/null && echo Phew, You have the right perl.) \
47 || ((echo Sorry, you need to compile perl with threads and multiplicity.&& exit 1))
48 @touch .perlok
49