diff --git a/configure.ac b/configure.ac index 29b9faa935..3f90dc8722 100644 --- a/configure.ac +++ b/configure.ac @@ -1246,6 +1246,10 @@ 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([VLC], [libvlc >= 2.1.0],[ + AM_CONDITIONAL([HAVE_VLC],[true])],[ + AC_MSG_RESULT([no]); AM_CONDITIONAL([HAVE_VLC],[false])]) + PKG_CHECK_MODULES([MEMCACHED], [libmemcached >= 0.31],[ AM_CONDITIONAL([HAVE_MEMCACHED],[true]) MEMCACHED_LIBS="${MEMCACHED_LIBS} -lpthread" diff --git a/src/mod/formats/mod_vlc/Makefile.am b/src/mod/formats/mod_vlc/Makefile.am index 6b0a624cd1..90c9dfb160 100644 --- a/src/mod/formats/mod_vlc/Makefile.am +++ b/src/mod/formats/mod_vlc/Makefile.am @@ -1,8 +1,18 @@ include $(top_srcdir)/build/modmake.rulesam MODNAME=mod_vlc +if HAVE_VLC + mod_LTLIBRARIES = mod_vlc.la mod_vlc_la_SOURCES = mod_vlc.c -mod_vlc_la_CFLAGS = $(AM_CFLAGS) -mod_vlc_la_LIBADD = $(switch_builddir)/libfreeswitch.la -mod_vlc_la_LDFLAGS = -avoid-version -module -no-undefined -shared -lvlc +mod_vlc_la_CFLAGS = $(AM_CFLAGS) $(VLC_CFLAGS) +mod_vlc_la_LIBADD = $(switch_builddir)/libfreeswitch.la $(VLC_LIBS) +mod_vlc_la_LDFLAGS = -avoid-version -module -no-undefined -shared + +else +install: error +all: error +error: + $(error You must install libvlc-dev to build mod_vlc) +endif +