--- freeswitch-1.2.3/src/mod/languages/mod_perl/Makefile.link 2012-09-19 22:44:49.000000000 +0800 +++ freeswitch-1.2.3/src/mod/languages/mod_perl/Makefile 2013-01-19 14:12:47.495941541 +0800 @@ -3,7 +3,8 @@ PERL_LIBDIR =-L$(shell perl -MConfig -e 'print $$Config{archlib}')/CORE PERL_LIBS =$(shell perl -MConfig -e 'print $$Config{libs}') LOCAL_CFLAGS= -w -DMULTIPLICITY $(shell $(PERL) -MExtUtils::Embed -e ccopts) -DEMBED_PERL -LOCAL_LDFLAGS=$(shell $(PERL) -MExtUtils::Embed -e ldopts) $(shell $(PERL) -MConfig -e 'print $$Config{libs}') +LOCAL_LDFLAGS=$(shell $(PERL) -MExtUtils::Embed -e ldopts) $(shell $(PERL) -MConfig -e 'print $$Config{libs}') $(PERL_LIBDIR) +LOCAL_LIBADD=$(PERL_LIBS) $(BASE)/libfreeswitch.la LOCAL_OBJS=freeswitch_perl.o mod_perl_wrap.o perlxsi.o VERBOSE=1 @@ -23,8 +24,8 @@ orig: mod_perl_wrap.cpp patch -R -s -p0 -i hack.diff -freeswitch.$(LIBTOOL_LIB_EXTEN): $(LOCAL_OBJS) $(LOCAL_LIBADD) - $(CXXLINK) $(SOLINK) -o freeswitch.$(LIBTOOL_LIB_EXTEN) $(LOCAL_OBJS) $(LOCAL_LIBADD) $(LDFLAGS) +freeswitch.$(LIBTOOL_LIB_EXTEN): $(LOCAL_OBJS) + $(CXXLINK) $(LOCAL_LDFLAGS) $(SOLINK) -o freeswitch.$(LIBTOOL_LIB_EXTEN) $(LOCAL_OBJS) $(LOCAL_LIBADD) $(LDFLAGS) local_all: freeswitch.$(LIBTOOL_LIB_EXTEN) @@ -38,5 +39,4 @@ depend_install: mkdir -p $(DESTDIR)$(prefix)/perl - $(LTINSTALL) freeswitch.$(LIBTOOL_LIB_EXTEN) freeswitch.pm $(DESTDIR)$(prefix)/perl - if [ ! -f $(DESTDIR)$(prefix)/perl/freeswitch.pm ] ; then $(LTINSTALL) freeswitch.pm $(DESTDIR)$(prefix)/perl ; fi + $(LTINSTALL) .libs/freeswitch.so $(DESTDIR)$(modulesdir)/mod_perl.so