1/2 of automake for esl perl, at least we have configure detecting things now
This commit is contained in:
parent
94051688c2
commit
5014b80d53
19
configure.ac
19
configure.ac
|
@ -1116,6 +1116,24 @@ AM_CONDITIONAL([HAVE_ODBC],[test "x$enable_core_odbc_support" != "xno"])
|
|||
AM_CONDITIONAL([HAVE_LIBEDIT],[test "x$enable_core_libedit_support" != "xno"])
|
||||
AM_CONDITIONAL([HAVE_MYSQL],[test "$found_mysql" = "yes"])
|
||||
|
||||
AC_CHECK_PROG(PERL,perl,[ac_cv_have_perl=yes],[ac_cv_have_perl=no])
|
||||
AM_CONDITIONAL([HAVE_PERL],[test "x$ac_cv_have_perl" != "xno"])
|
||||
|
||||
if test "x$ac_cv_have_perl" != "xno" ; then
|
||||
PERL_SITEDIR="`$PERL -MConfig -e 'print $Config{sitelibexp}'`"
|
||||
PERL_LIBDIR="-L`$PERL -MConfig -e 'print $Config{archlib}'`/CORE"
|
||||
PERL_LIBS="`$PERL -MConfig -e 'print $Config{libs}'`"
|
||||
PERL_CFLAGS="-w -DMULTIPLICITY `$PERL -MExtUtils::Embed -e ccopts` -DEMBED_PERL"
|
||||
PERL_LDFLAGS="`$PERL -MExtUtils::Embed -e ldopts` `$PERL -MConfig -e 'print $Config{libs}'`"
|
||||
PERL_INC="`$PERL -MExtUtils::Embed -e perl_inc`"
|
||||
AC_SUBST(PERL_SITEDIR)
|
||||
AC_SUBST(PERL_LIBDIR)
|
||||
AC_SUBST(PERL_LIBS)
|
||||
AC_SUBST(PERL_CFLAGS)
|
||||
AC_SUBST(PERL_LDFLAGS)
|
||||
AC_SUBST(PERL_INC)
|
||||
fi
|
||||
|
||||
#
|
||||
# Python checks for mod_python
|
||||
#
|
||||
|
@ -1406,6 +1424,7 @@ AC_CONFIG_FILES([Makefile
|
|||
build/freeswitch.pc
|
||||
build/modmake.rules
|
||||
libs/esl/Makefile
|
||||
libs/esl/perl/Makefile
|
||||
libs/xmlrpc-c/include/xmlrpc-c/config.h
|
||||
libs/xmlrpc-c/xmlrpc_config.h
|
||||
libs/xmlrpc-c/config.mk
|
||||
|
|
|
@ -67,7 +67,7 @@ swigclean: clean
|
|||
$(MAKE) -C managed swigclean
|
||||
|
||||
perlmod: $(MYLIB)
|
||||
$(MAKE) MYLIB="../$(MYLIB)" SOLINK="$(SOLINK)" CFLAGS="-I$(switch_srcdir)/libs/esl/src/include $(SWITCH_AM_CFLAGS)" CXXFLAGS="-I$(switch_srcdir)/libs/esl/src/include $(SWITCH_AM_CXXFLAGS)" CXX_CFLAGS="$(CXX_CFLAGS)" -C perl
|
||||
$(MAKE) -C perl
|
||||
|
||||
phpmod: $(MYLIB)
|
||||
$(MAKE) MYLIB="../$(MYLIB)" SOLINK="$(SOLINK)" CFLAGS="-I$(switch_srcdir)/libs/esl/src/include $(SWITCH_AM_CFLAGS)" CXXFLAGS="-I$(switch_srcdir)/libs/esl/src/include $(SWITCH_AM_CXXFLAGS)" CXX_CFLAGS="$(CXX_CFLAGS)" -C php
|
||||
|
|
|
@ -1,38 +0,0 @@
|
|||
PERL=$(shell which perl)
|
||||
PERL_SITEDIR=$(shell perl -MConfig -e 'print $$Config{sitelibexp}')
|
||||
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}')
|
||||
GCC_WARNING_JUNK=-w
|
||||
PERL_INC=$(shell $(PERL) -MExtUtils::Embed -e perl_inc)
|
||||
all: ESL.so
|
||||
|
||||
esl_wrap.cpp:
|
||||
swig -module ESL -shadow -perl5 -c++ -DMULTIPLICITY -I../src/include -o esl_wrap.cpp ../ESL.i
|
||||
|
||||
perlxsi.c:
|
||||
$(PERL) -MExtUtils::Embed -e xsinit -- -o perlxsi.c
|
||||
|
||||
perlxsi.o: perlxsi.c
|
||||
$(CC) $(CC_CFLAGS) $(CFLAGS) $(LOCAL_CFLAGS) -c perlxsi.c -o perlxsi.o
|
||||
|
||||
esl_wrap.o: esl_wrap.cpp
|
||||
$(CXX) $(CXX_CFLAGS) $(CXXFLAGS) $(GCC_WARNING_JUNK) $(PERL_INC) -c esl_wrap.cpp -o esl_wrap.o
|
||||
|
||||
ESL.so: esl_wrap.o perlxsi.o
|
||||
$(CXX) $(SOLINK) esl_wrap.o perlxsi.o $(MYLIB) $(LOCAL_LDFLAGS) -o ESL.so -L. $(LIBS)
|
||||
|
||||
clean:
|
||||
rm -f *.o *.so *~
|
||||
|
||||
swigclean:
|
||||
rm -f esl_wrap.* ESL.so ESL.pm perlxsi.*
|
||||
|
||||
reswig: swigclean esl_wrap.cpp perlxsi.c
|
||||
|
||||
install: ESL.so
|
||||
install -m 755 ESL.so $(PERL_SITEDIR)
|
||||
install -m 755 ESL.pm $(PERL_SITEDIR)
|
||||
install -d -m 755 ESL $(PERL_SITEDIR)/ESL
|
||||
install -m 755 ESL/* $(PERL_SITEDIR)/ESL
|
|
@ -0,0 +1,30 @@
|
|||
all: ESL.so
|
||||
|
||||
esl_wrap.cpp:
|
||||
swig -module ESL -shadow -perl5 -c++ -DMULTIPLICITY -I../src/include -o esl_wrap.cpp ../ESL.i
|
||||
|
||||
perlxsi.c:
|
||||
$(PERL) -MExtUtils::Embed -e xsinit -- -o perlxsi.c
|
||||
|
||||
perlxsi.o: perlxsi.c
|
||||
$(CC) $(CC_CFLAGS) $(CFLAGS) -I$(switch_srcdir)/libs/esl/src/include $(SWITCH_AM_CFLAGS) $(PERL_CFLAGS) -c perlxsi.c -o perlxsi.o
|
||||
|
||||
esl_wrap.o: esl_wrap.cpp
|
||||
$(CXX) -I$(switch_srcdir)/libs/esl/src/include $(SWITCH_AM_CXXFLAGS) $(CXXFLAGS) -w $(PERL_INC) -c esl_wrap.cpp -o esl_wrap.o
|
||||
|
||||
ESL.so: esl_wrap.o perlxsi.o
|
||||
$(CXX) $(SOLINK) esl_wrap.o perlxsi.o ../.libs/libesl.a $(PERL__LDFLAGS) -o ESL.so -L. $(LIBS)
|
||||
|
||||
clean:
|
||||
rm -f *.o *.so *~
|
||||
|
||||
swigclean:
|
||||
rm -f esl_wrap.* ESL.so ESL.pm perlxsi.*
|
||||
|
||||
reswig: swigclean esl_wrap.cpp perlxsi.c
|
||||
|
||||
install: ESL.so
|
||||
install -m 755 ESL.so $(PERL_SITEDIR)
|
||||
install -m 755 ESL.pm $(PERL_SITEDIR)
|
||||
install -d -m 755 ESL $(PERL_SITEDIR)/ESL
|
||||
install -m 755 ESL/* $(PERL_SITEDIR)/ESL
|
Loading…
Reference in New Issue