From 2b8a04f1d7f119a59788f0a9611376370a872ffd Mon Sep 17 00:00:00 2001 From: Raymond Chandler Date: Tue, 30 Jun 2009 17:59:18 +0000 Subject: [PATCH] replace mod_radius_cdr's Makefile.am with Makefile that pulls freeradius-client source when needed git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@14053 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- configure.in | 1 - .../event_handlers/mod_radius_cdr/Makefile | 24 ++++++++++++++ .../event_handlers/mod_radius_cdr/Makefile.am | 33 ------------------- 3 files changed, 24 insertions(+), 34 deletions(-) create mode 100644 src/mod/event_handlers/mod_radius_cdr/Makefile delete mode 100644 src/mod/event_handlers/mod_radius_cdr/Makefile.am diff --git a/configure.in b/configure.in index d918967c2e..4f8eda89d6 100644 --- a/configure.in +++ b/configure.in @@ -752,7 +752,6 @@ AC_CONFIG_FILES([Makefile src/mod/Makefile src/mod/endpoints/mod_sofia/Makefile src/mod/asr_tts/mod_unimrcp/Makefile - src/mod/event_handlers/mod_radius_cdr/Makefile src/mod/languages/mod_java/Makefile src/mod/languages/mod_python/Makefile src/mod/event_handlers/mod_erlang_event/Makefile diff --git a/src/mod/event_handlers/mod_radius_cdr/Makefile b/src/mod/event_handlers/mod_radius_cdr/Makefile new file mode 100644 index 0000000000..4ee81e0e03 --- /dev/null +++ b/src/mod/event_handlers/mod_radius_cdr/Makefile @@ -0,0 +1,24 @@ +RADCLIENT_VERSION=1.1.6 +RADCLIENT=freeradius-client-$(RADCLIENT_VERSION) +RADCLIENT_DIR=$(switch_srcdir)/libs/$(RADCLIENT) +RADCLIENT_LIBDIR=$(RADCLIENT_DIR)/lib +RADCLIENT_LA=${RADCLIENT_LIBDIR}/libfreeradius-client.la + +LOCAL_CFLAGS=-I$(RADCLIENT_DIR)/include +LOCAL_LIBADD=$(RADCLIENT_LA) + +BASE=../../../.. +include $(BASE)/build/modmake.rules + +$(RADCLIENT_DIR): + $(GETLIB) $(RADCLIENT).tar.gz + +$(RADCLIENT_DIR)/Makefile: $(RADCLIENT_DIR) + cd $(RADCLIENT_DIR) && ./configure --disable-shared + $(TOUCH_TARGET) + +$(RADCLIENT_LA): $(RADCLIENT_DIR)/Makefile + cd $(RADCLIENT_DIR) && CFLAGS=$(CFLAGS) $(MAKE) + $(TOUCH_TARGET) + + diff --git a/src/mod/event_handlers/mod_radius_cdr/Makefile.am b/src/mod/event_handlers/mod_radius_cdr/Makefile.am deleted file mode 100644 index 61a1c1bc1d..0000000000 --- a/src/mod/event_handlers/mod_radius_cdr/Makefile.am +++ /dev/null @@ -1,33 +0,0 @@ -AM_CFLAGS = $(SWITCH_AM_CFLAGS) -AM_CPPFLAGS = $(SWITCH_AM_CXXFLAGS) -AM_LDFLAGS = $(SWITCH_AM_LDFLAGS) -#we should set all these vars from configure, no reason to have these in each Makefile.am -LIBTOOL = echo "`link=\`echo $@|grep .la;echo $@|grep .so;echo $@|grep .dll\`;if test -n "$$link"; then echo Creating $@;fi`";`if test -z "$(VERBOSE)" ; \ -then echo $(SHELL) $(switch_builddir)/quiet_libtool ;else echo $(SHELL) $(switch_builddir)/libtool; fi` -AM_MAKEFLAGS=`test -n "$(VERBOSE)" || echo -s` -# Dirty trick to override the link output -LIBS+=> $(MODNAME).log || error="yes";if test -n "$(VERBOSE)" -o "$$error" = "yes";then cat $(MODNAME).log;fi;if test "$$error" = "yes";then exit 1;fi - -moddir=$(prefix)/mod - -MODNAME=mod_radius_cdr -mod_LTLIBRARIES = mod_radius_cdr.la -mod_radius_cdr_la_SOURCES = mod_radius_cdr.c -mod_radius_cdr_la_CFLAGS = $(AM_CFLAGS) -mod_radius_cdr_la_CPPFLAGS = $(AM_CPPFLAGS) -mod_radius_cdr_la_LIBADD=$(switch_builddir)/libfreeswitch.la -mod_radius_cdr_la_LDFLAGS=-module -avoid-version -no-undefined - -mod_radius_cdr_la_LDFLAGS += -lfreeradius-client - -#Override the linstall target so we just install the .so/.dylib - -install-data-am: $(DESTDIR)$(PREFIX)/$(moddir)/$(MODNAME).$(DYNAMIC_LIB_EXTEN) - -$(DESTDIR)$(PREFIX)/$(moddir)/$(MODNAME).$(DYNAMIC_LIB_EXTEN): $(MODNAME).la - @echo installing $(MODNAME).$(DYNAMIC_LIB_EXTEN) - @if [ -f .libs/$(MODNAME).$(DYNAMIC_LIB_EXTEN) ] ; then \ - $(LIBTOOL) --mode=install $(INSTALL) .libs/$(MODNAME).$(DYNAMIC_LIB_EXTEN) $(DESTDIR)$(PREFIX)/$(moddir) >/dev/null ; \ - else \ - $(LIBTOOL) --mode=install $(INSTALL) $(MODNAME).$(DYNAMIC_LIB_EXTEN) $(DESTDIR)$(PREFIX)/$(moddir) >/dev/null ; \ - fi