]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-7519: add pkg-config checks for avformat and avcodec and move modules to use automke
authorAnthony Minessale <anthm@freeswitch.org>
Thu, 2 Apr 2015 18:40:51 +0000 (13:40 -0500)
committerMichael Jerris <mike@jerris.com>
Thu, 28 May 2015 17:47:13 +0000 (12:47 -0500)
configure.ac
src/mod/codecs/mod_avcodec/Makefile.am [new file with mode: 0644]
src/mod/formats/mod_avformat/Makefile.am [new file with mode: 0644]

index 196c483b88a8df6773e657882038e31a3c4aab41..29b9faa935dac06a8c6762a3aba85011c4b28cbb 100644 (file)
@@ -1238,8 +1238,13 @@ PKG_CHECK_MODULES([VPX], [vpx >= 1.3.0],[
     fi],[
     AM_CONDITIONAL([HAVE_VPX],[true])])])
 
-#PKG_CHECK_MODULES([AVCODEC], [avcodec >= 53.35.0])
-#PKG_CHECK_MODULES([AVFORMAT], [avformat >= 53.21.1])
+PKG_CHECK_MODULES([AVCODEC], [libavcodec >= 53.35.0],[
+  AM_CONDITIONAL([HAVE_AVCODEC],[true])],[
+  AC_MSG_RESULT([no]); AM_CONDITIONAL([HAVE_AVCODEC],[false])])
+
+PKG_CHECK_MODULES([AVFORMAT], [libavformat >= 53.21.1],[
+  AM_CONDITIONAL([HAVE_AVFORMAT],[true])],[
+  AC_MSG_RESULT([no]); AM_CONDITIONAL([HAVE_AVFORMAT],[false])])
 
 PKG_CHECK_MODULES([MEMCACHED], [libmemcached >= 0.31],[
   AM_CONDITIONAL([HAVE_MEMCACHED],[true])
@@ -1568,6 +1573,7 @@ AC_CONFIG_FILES([Makefile
                src/mod/asr_tts/mod_unimrcp/Makefile
                src/mod/codecs/mod_amr/Makefile
                src/mod/codecs/mod_amrwb/Makefile
+               src/mod/codecs/mod_avcodec/Makefile
                src/mod/codecs/mod_b64/Makefile
                src/mod/codecs/mod_bv/Makefile
                src/mod/codecs/mod_celt/Makefile
@@ -1625,6 +1631,7 @@ AC_CONFIG_FILES([Makefile
                src/mod/event_handlers/mod_rayo/Makefile
                src/mod/event_handlers/mod_snmp/Makefile
                src/mod/event_handlers/mod_event_zmq/Makefile
+               src/mod/formats/mod_avformat/Makefile
                src/mod/formats/mod_local_stream/Makefile
                src/mod/formats/mod_native_file/Makefile
                src/mod/formats/mod_shell_stream/Makefile
diff --git a/src/mod/codecs/mod_avcodec/Makefile.am b/src/mod/codecs/mod_avcodec/Makefile.am
new file mode 100644 (file)
index 0000000..83704a4
--- /dev/null
@@ -0,0 +1,18 @@
+include $(top_srcdir)/build/modmake.rulesam
+MODNAME=mod_avcodec
+
+if HAVE_AVCODEC
+
+mod_LTLIBRARIES = mod_avcodec.la
+mod_avcodec_la_SOURCES  = mod_avcodec.c
+mod_avcodec_la_CFLAGS   = $(AM_CFLAGS) $(AVCODEC_CFLAGS)
+mod_avcodec_la_LIBADD   = $(switch_builddir)/libfreeswitch.la $(AVCODEC_LIBS)
+mod_avcodec_la_LDFLAGS  = -avoid-version -module -no-undefined -shared -lm -lz
+
+else
+install: error
+all: error
+error:
+       $(error You must install libavcodec-dev to build mod_avcodec)
+endif
+
diff --git a/src/mod/formats/mod_avformat/Makefile.am b/src/mod/formats/mod_avformat/Makefile.am
new file mode 100644 (file)
index 0000000..c8fd5bd
--- /dev/null
@@ -0,0 +1,18 @@
+include $(top_srcdir)/build/modmake.rulesam
+MODNAME=mod_avformat
+
+if HAVE_AVFORMAT
+
+mod_LTLIBRARIES = mod_avformat.la
+mod_avformat_la_SOURCES  = mod_avformat.c
+mod_avformat_la_CFLAGS   = $(AM_CFLAGS) $(AVFORMAT_CFLAGS)
+mod_avformat_la_LIBADD   = $(switch_builddir)/libfreeswitch.la $(AVFORMAT_LIBS)
+mod_avformat_la_LDFLAGS  = -avoid-version -module -no-undefined -shared -lm -lz
+
+else
+install: error
+all: error
+error:
+       $(error You must install libavformat-dev to build mod_avformat)
+endif
+