freeswitch-stable: add Perl support
[feed/telephony.git] / net / freeswitch-stable / patches / 180-mod_perl.patch
1 --- a/src/mod/languages/mod_perl/Makefile.am
2 +++ b/src/mod/languages/mod_perl/Makefile.am
3 @@ -1,8 +1,5 @@
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 mod_LTLIBRARIES = mod_perl.la
12 @@ -10,13 +7,13 @@ perl_LTLIBRARIES = freeswitch.la
13 mod_perl_la_SOURCES = mod_perl.c freeswitch_perl.cpp mod_perl_wrap.cpp perlxsi.c
14 mod_perl_la_CFLAGS = $(SWITCH_AM_CFLAGS)
15 mod_perl_la_CXXFLAGS = $(SWITCH_AM_CXXFLAGS)
16 -mod_perl_la_CPPFLAGS = -w -DMULTIPLICITY `$(PERL) -MExtUtils::Embed -e ccopts` -DEMBED_PERL -I$(switch_srcdir)/libs/libteletone/src/
17 +mod_perl_la_CPPFLAGS = @PERL_CFLAGS@ -I$(switch_srcdir)/libs/libteletone/src/
18 mod_perl_la_LIBADD = $(switch_builddir)/libfreeswitch.la
19 -mod_perl_la_LDFLAGS = -avoid-version -module -no-undefined -shared `$(PERL) -MExtUtils::Embed -e ldopts` `$(PERL) -MConfig -e 'print $$Config{libs}'`
20 +mod_perl_la_LDFLAGS = -avoid-version -module -no-undefined -shared @PERL_LDFLAGS@ @PERL_LIBS@
21
22 freeswitch_la_SOURCES = freeswitch_perl.cpp mod_perl_wrap.cpp perlxsi.c
23 freeswitch_la_LDFLAGS = -avoid-version -module -no-undefined -shared $(LDFLAGS)
24 -freeswitch_la_CPPFLAGS = $(SWITCH_AM_CPPFLAGS) -w -DMULTIPLICITY `$(PERL) -MExtUtils::Embed -e ccopts` -DEMBED_PERL -I$(switch_srcdir)/libs/libteletone/src/
25 +freeswitch_la_CPPFLAGS = $(SWITCH_AM_CPPFLAGS) @PERL_CFLAGS@ -I$(switch_srcdir)/libs/libteletone/src/
26 reswig: swigclean mod_perl_wrap.cpp
27
28 swigclean: clean
29 @@ -31,7 +28,7 @@ orig: mod_perl_wrap.cpp
30 patch -R -s -p0 -i hack.diff
31
32 .perlok:
33 - @(${PERL} -V | grep -i usemultiplicity=define >/dev/null && echo Phew, You have the right perl.) \
34 + @(@PERL@ -V | grep -i usemultiplicity=define >/dev/null && echo Phew, You have the right perl.) \
35 || ((echo Sorry, you need to compile perl with threads and multiplicity.&& exit 1))
36 @touch .perlok
37