From 740167b743d7cad6f2444234cb17a143d0b933aa Mon Sep 17 00:00:00 2001 From: Stefan Knoblich Date: Mon, 7 Nov 2011 16:39:20 +0100 Subject: [PATCH] FreeSWITCH: Fix underlinking of applications (partial brown paperbag cover-up) OK, libtool pulling in all depdencies doesn't work (*sigh*) so add CORE_LIBS back to _LDADD and also add ODBC_LIB_FLAGS (conditionally). Tested on Debian Squeeze (6.0.x) amd64 (libtool-2.2.6), where everything seems to be falling apart easily. There's still a lot of room for improvement, though. Bundled libs are making this harder, as we don't have a sane way to get their dependency libs and libtool drops them on the floor, even if they are in the .la-file's dependency list (e.g. mod_spandsp using libtiff(.la), which needs libjpeg). ( reference: http://www.gnu.org/s/hello/manual/libtool/Inter_002dlibrary-dependencies.html ). Let's see what i did break this time... Signed-off-by: Stefan Knoblich --- Makefile.am | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/Makefile.am b/Makefile.am index eb10f9810a..b77a968edc 100644 --- a/Makefile.am +++ b/Makefile.am @@ -294,13 +294,19 @@ fs_cli_CFLAGS += -DHAVE_EDITLINE -I$(switch_srcdir)/libs/libedit/src fs_cli_LDADD = libs/libedit/src/.libs/libedit.a endif + ## ## fs_encode () ## fs_encode_SOURCES = src/fs_encode.c -fs_encode_CFLAGS = $(AM_CFLAGS) +fs_encode_CFLAGS = $(AM_CFLAGS) fs_encode_LDFLAGS = $(AM_LDFLAGS) -fs_encode_LDADD = libfreeswitch.la +fs_encode_LDADD = libfreeswitch.la $(CORE_LIBS) + +if HAVE_ODBC +fs_encode_LDADD += $(ODBC_LIB_FLAGS) +endif + ## ## tone2wav () @@ -308,7 +314,12 @@ fs_encode_LDADD = libfreeswitch.la tone2wav_SOURCES = src/tone2wav.c tone2wav_CFLAGS = $(AM_CFLAGS) tone2wav_LDFLAGS = $(AM_LDFLAGS) -tone2wav_LDADD = libfreeswitch.la +tone2wav_LDADD = libfreeswitch.la $(CORE_LIBS) + +if HAVE_ODBC +tone2wav_LDADD += $(ODBC_LIB_FLAGS) +endif + ## ## fs_ivrd () @@ -332,6 +343,10 @@ freeswitch_CFLAGS += -Ilibs/libedit/src -DSWITCH_HAVE_LIBEDIT freeswitch_LDADD += libs/libedit/src/.libs/libedit.a endif +if HAVE_ODBC +freeswitch_LDADD += $(ODBC_LIB_FLAGS) +endif + ## ## Scripts