From a7238d0b9d53495e1b1b344026770fd1ab3f61f8 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Tue, 29 Nov 2011 15:38:52 -0600 Subject: [PATCH] FS-2936 stage 4 these too --- Makefile.am | 8 ++------ build/modmake.rules.in | 10 ++++------ configure.in | 5 +++++ 3 files changed, 11 insertions(+), 12 deletions(-) diff --git a/Makefile.am b/Makefile.am index 2f9f9bf111..6ed29cbc67 100644 --- a/Makefile.am +++ b/Makefile.am @@ -103,7 +103,6 @@ CORE_CFLAGS += -I$(switch_srcdir)/libs/speex/include -Ilibs/speex/include CORE_CFLAGS += -I$(switch_srcdir)/libs/srtp/include CORE_CFLAGS += -I$(switch_srcdir)/libs/srtp/crypto/include -Ilibs/srtp/crypto/include CORE_CFLAGS += -I$(switch_srcdir)/libs/spandsp/src -I$(switch_srcdir)/libs/tiff-3.8.2/libtiff -CORE_CFLAGS += $(LIBCURL_CPPFLAGS) CORE_LIBS = libs/apr-util/libaprutil-1.la libs/apr/libapr-1.la CORE_LIBS += libs/sqlite/libsqlite3.la libs/pcre/libpcre.la libs/speex/libspeex/libspeexdsp.la @@ -130,12 +129,8 @@ if ENABLE_TIMERFD_WRAPPER CORE_CFLAGS += -DTIMERFD_WRAP endif -CORE_LDFLAGS= - if CURL_BUILTIN CORE_LIBS += libs/curl/lib/libcurl.la -else -CORE_LDFLAGS += $(LIBCURL) endif ## @@ -143,7 +138,7 @@ endif ## lib_LTLIBRARIES = libfreeswitch.la libfreeswitch_la_CFLAGS = $(CORE_CFLAGS) $(AM_CFLAGS) -libfreeswitch_la_LDFLAGS = -version-info 1:0:0 $(AM_LDFLAGS) $(PLATFORM_CORE_LDFLAGS) $(CORE_LDFLAGS) +libfreeswitch_la_LDFLAGS = -version-info 1:0:0 $(AM_LDFLAGS) $(PLATFORM_CORE_LDFLAGS) libfreeswitch_la_LIBADD = $(CORE_LIBS) $(PLATFORM_CORE_LIBS) libfreeswitch_la_DEPENDENCIES = $(BUILT_SOURCES) @@ -254,6 +249,7 @@ libfreeswitch_la_SOURCES = \ src/switch_pcm.c \ src/switch_profile.c \ src/switch_json.c \ + src/switch_curl.c \ libs/stfu/stfu.c \ libs/libteletone/src/libteletone_detect.c \ libs/libteletone/src/libteletone_generate.c \ diff --git a/build/modmake.rules.in b/build/modmake.rules.in index 51923ec3dd..00d72f050c 100644 --- a/build/modmake.rules.in +++ b/build/modmake.rules.in @@ -80,20 +80,18 @@ TOUCH_TARGET=@TOUCH_TARGET@ MAKE_OPTS = `test -n "$(VERBOSE)" || echo -s` RECURSE_MODNAME=`pwd | sed -e 's|^.*/||'` RECURSE_SOURCEFILE=`if test -f "$$modname.cpp" -o -f "$(MODDIR)/$$modname.cpp"; then echo "$$modname.cpp"; else echo "$$modname.c"; fi` -RECURSE_OUR_DEPS=`test -z "$(WANT_CURL)" || if test ! -z "$(LIBCURL_DEPS)"; then echo $(CURLLA); fi ` -RECURSE_OUR_CFLAGS=`test -z "$(WANT_CURL)" || echo $(LIBCURL_CPPFLAGS) ; $(LOCAL_INSERT_CFLAGS) ` -RECURSE_OUR_LDFLAGS=`test -z "$(WANT_CURL)" || echo $(LIBCURL) ; $(LOCAL_INSERT_LDFLAGS) ` +RECURSE_OUR_CFLAGS=` $(LOCAL_INSERT_CFLAGS) ` +RECURSE_OUR_LDFLAGS=` $(LOCAL_INSERT_LDFLAGS) ` RECURSE_MODDIR=`if test -z $(MODDIR); then pwd | sed -e 's|$(switch_builddir)|$(switch_srcdir)|'; else echo $(MODDIR); fi` RECURSE_MAKE=+modname="$(RECURSE_MODNAME)" ; \ sourcefile="$(RECURSE_SOURCEFILE)" ; \ osarch=`uname -s` ; \ - ourdefs="$(RECURSE_OUR_DEPS)" ; \ ourcflags="$(RECURSE_OUR_CFLAGS)" ; \ ourldflags="$(RECURSE_OUR_LDFLAGS)" ; \ insertobjs="`$(LOCAL_INSERT_OBJS)`" ; \ moddir="$(RECURSE_MODDIR)" ; \ $(MAKE) $(MAKE_OPTS) MODNAME="$$modname" SOURCEFILE="$$sourcefile" MODDIR="$$moddir" \ - OUR_DEPS="$$ourdefs" OUR_CFLAGS="$$ourcflags" OUR_LDFLAGS="$$ourldflags" OUR_OBJS="$$insertobjs" + OUR_CFLAGS="$$ourcflags" OUR_LDFLAGS="$$ourldflags" OUR_OBJS="$$insertobjs" all: Makefile @$(RECURSE_MAKE) all-modules || exit 1 @@ -136,7 +134,7 @@ LINK_OUTPUT_REDIR=> .libs/$(MODNAME).log || error="yes" ; \ exit 1 ;\ fi -$(MODNAME).$(LIBTOOL_LIB_EXTEN): $(LIBS) $(LOCAL_LIBADD) $(OUR_DEPS) $(LOCAL_OBJS) $(OUR_OBJS) $(MODDIR)/$(SOURCEFILE) $(MODNAME).lo +$(MODNAME).$(LIBTOOL_LIB_EXTEN): $(LIBS) $(LOCAL_LIBADD) $(LOCAL_OBJS) $(OUR_OBJS) $(MODDIR)/$(SOURCEFILE) $(MODNAME).lo @echo Creating $@... @test -d .libs || mkdir .libs @error="";\ diff --git a/configure.in b/configure.in index ed6547c626..e703bbc8b2 100644 --- a/configure.in +++ b/configure.in @@ -807,8 +807,13 @@ if test "$ac_cv_use_system_curl" != "yes" ; then LIBCURL_DEPS='${switch_builddir}/libs/curl/lib/libcurl.la' LIBCURL='${switch_builddir}/libs/curl/lib/libcurl.la' LIBCURL_CPPFLAGS='-I${switch_srcdir}/libs/curl/include' +else + SWITCH_AM_LDFLAGS="$LIBCURL $SWITCH_AM_LDFLAGS" fi +SWITCH_AM_CFLAGS="$LIBCURL_CPPFLAGS $SWITCH_AM_CFLAGS" +SWITCH_AM_CXXFLAGS="$LIBCURL_CPPFLAGS $SWITCH_AM_CXXFLAGS" + AM_CONDITIONAL([CURL_BUILTIN],[test "${ac_cv_use_system_curl}" != "yes"]) AC_SUBST(LIBCURL_DEPS)