From 03077d313321ca09655e7d9d9289cb261928f619 Mon Sep 17 00:00:00 2001 From: Mike Jerris Date: Thu, 27 Jun 2019 14:20:14 -0400 Subject: [PATCH] FS-11895: [osx] fix mod_av osx test build --- configure.ac | 1 - src/mod/applications/mod_av/Makefile.am | 19 +++++++++++++++---- src/mod/applications/mod_av/test/Makefile.am | 4 ---- .../applications/mod_av/test/test_avformat.c | 6 +++--- 4 files changed, 18 insertions(+), 12 deletions(-) delete mode 100644 src/mod/applications/mod_av/test/Makefile.am diff --git a/configure.ac b/configure.ac index 1c58ae167e..8cab4a889d 100644 --- a/configure.ac +++ b/configure.ac @@ -2003,7 +2003,6 @@ AC_CONFIG_FILES([Makefile src/mod/xml_int/mod_xml_rpc/Makefile src/mod/xml_int/mod_xml_scgi/Makefile src/mod/applications/mod_av/Makefile - src/mod/applications/mod_av/test/Makefile src/mod/applications/mod_video_filter/Makefile src/include/switch_am_config.h build/getsounds.sh diff --git a/src/mod/applications/mod_av/Makefile.am b/src/mod/applications/mod_av/Makefile.am index cefcdcf113..675eb514b0 100644 --- a/src/mod/applications/mod_av/Makefile.am +++ b/src/mod/applications/mod_av/Makefile.am @@ -3,13 +3,24 @@ MODNAME=mod_av if HAVE_AVFORMAT +noinst_LTLIBRARIES = libavmod.la + +libavmod_la_SOURCES = mod_av.c avformat.c avcodec.c +libavmod_la_CFLAGS = $(AM_CFLAGS) $(AVFORMAT_CFLAGS) $(AVCODEC_CFLAGS) $(SWSCALE_CFLAGS) $(AVUTIL_CFLAGS) $(AVRESAMPLE_CFALGS) + mod_LTLIBRARIES = mod_av.la -mod_av_la_SOURCES = mod_av.c avformat.c avcodec.c -mod_av_la_CFLAGS = $(AM_CFLAGS) $(AVFORMAT_CFLAGS) $(AVCODEC_CFLAGS) $(SWSCALE_CFLAGS) $(AVUTIL_CFLAGS) $(AVRESAMPLE_CFALGS) -mod_av_la_LIBADD = $(switch_builddir)/libfreeswitch.la $(AVFORMAT_LIBS) $(AVCODEC_LIBS) $(SWSCALE_LIBS) $(AVUTIL_LIBS) $(AVRESAMPLE_LIBS) +mod_av_la_SOURCES = +mod_av_la_LIBADD = libavmod.la $(switch_builddir)/libfreeswitch.la $(AVFORMAT_LIBS) $(AVCODEC_LIBS) $(SWSCALE_LIBS) $(AVUTIL_LIBS) $(AVRESAMPLE_LIBS) mod_av_la_LDFLAGS = -avoid-version -module -no-undefined -shared -lm -lz -SUBDIRS=. test + +bin_PROGRAMS = test/test_mod_av test/test_avformat +AM_CFLAGS = $(SWITCH_AM_CFLAGS) -I../ $(AVFORMAT_CFLAGS) $(AVCODEC_CFLAGS) $(SWSCALE_CFLAGS) $(AVUTIL_CFLAGS) $(AVRESAMPLE_CFALGS) +AM_LDFLAGS = $(AVFORMAT_LIBS) $(AVCODEC_LIBS) $(SWSCALE_LIBS) $(AVUTIL_LIBS) $(AVRESAMPLE_LIBS) -avoid-version -no-undefined $(SWITCH_AM_LDFLAGS) +TESTS = $(bin_PROGRAMS) + +test_test_mod_av_LDADD = libavmod.la $(switch_builddir)/libfreeswitch.la +test_test_avformat_LDADD = libavmod.la $(switch_builddir)/libfreeswitch.la else install: error diff --git a/src/mod/applications/mod_av/test/Makefile.am b/src/mod/applications/mod_av/test/Makefile.am deleted file mode 100644 index b7111a2275..0000000000 --- a/src/mod/applications/mod_av/test/Makefile.am +++ /dev/null @@ -1,4 +0,0 @@ -bin_PROGRAMS = test_mod_av test_avformat -AM_CFLAGS = $(SWITCH_AM_CFLAGS) -I../ $(AVFORMAT_CFLAGS) $(AVCODEC_CFLAGS) $(SWSCALE_CFLAGS) $(AVUTIL_CFLAGS) $(AVRESAMPLE_CFALGS) -AM_LDFLAGS = $(switch_builddir)/libfreeswitch.la $(AVFORMAT_LIBS) $(AVCODEC_LIBS) $(SWSCALE_LIBS) $(AVUTIL_LIBS) $(AVRESAMPLE_LIBS) -avoid-version -no-undefined $(SWITCH_AM_LDFLAGS) ../mod_av.la -TESTS = $(bin_PROGRAMS) diff --git a/src/mod/applications/mod_av/test/test_avformat.c b/src/mod/applications/mod_av/test/test_avformat.c index fed0264d34..a9484d9058 100644 --- a/src/mod/applications/mod_av/test/test_avformat.c +++ b/src/mod/applications/mod_av/test/test_avformat.c @@ -156,9 +156,9 @@ FST_CORE_BEGIN("conf") FST_TEARDOWN_BEGIN() { - const char *err = NULL; - switch_sleep(1000000); - //fst_check(switch_loadable_module_unload_module(SWITCH_GLOBAL_dirs.mod_dir, (char *)"mod_av", SWITCH_TRUE, &err) == SWITCH_STATUS_SUCCESS); + //const char *err = NULL; + switch_sleep(1000000); + //fst_check(switch_loadable_module_unload_module(SWITCH_GLOBAL_dirs.mod_dir, (char *)"mod_av", SWITCH_TRUE, &err) == SWITCH_STATUS_SUCCESS); } FST_TEARDOWN_END() }