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 <stkn@openisdn.net>
This commit is contained in:
Stefan Knoblich 2011-11-07 16:39:20 +01:00
parent 0768781e71
commit 740167b743
1 changed files with 18 additions and 3 deletions

View File

@ -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