mirror of
https://github.com/owntone/owntone-server.git
synced 2025-01-11 23:13:24 -05:00
Use pkg-config to check for libavcodec & libavformat
This commit is contained in:
parent
2daa9835a3
commit
7ce2e75859
32
configure.in
32
configure.in
@ -103,6 +103,10 @@ PKG_CHECK_MODULES(AVAHI, [ avahi-client >= 0.6.24 ])
|
|||||||
PKG_CHECK_MODULES(SQLITE3, [ sqlite3 ],
|
PKG_CHECK_MODULES(SQLITE3, [ sqlite3 ],
|
||||||
AC_DEFINE(HAVE_SQLITE3, 1, [define if sqlite3 is available]))
|
AC_DEFINE(HAVE_SQLITE3, 1, [define if sqlite3 is available]))
|
||||||
|
|
||||||
|
if test x$use_ffmpeg = xtrue; then
|
||||||
|
PKG_CHECK_MODULES(FFMPEG, [ libavcodec libavformat ])
|
||||||
|
fi
|
||||||
|
|
||||||
AC_ARG_WITH(static-libs,
|
AC_ARG_WITH(static-libs,
|
||||||
[--with-static-libs[[=DIR]] use static libs in DIR],[
|
[--with-static-libs[[=DIR]] use static libs in DIR],[
|
||||||
if test "$withval" != "no" -a "$withval" != "yes"; then
|
if test "$withval" != "no" -a "$withval" != "yes"; then
|
||||||
@ -127,22 +131,6 @@ AC_ARG_WITH(ssl-libs,
|
|||||||
fi
|
fi
|
||||||
])
|
])
|
||||||
|
|
||||||
AC_ARG_WITH(ffmpeg-includes,
|
|
||||||
[--with-ffmpeg-includes[[=DIR]] use ffmpeg include files in DIR],[
|
|
||||||
if test "$withval" != "no" -a "$withval" != "yes"; then
|
|
||||||
Z_DIR=$withval
|
|
||||||
CPPFLAGS="${CPPFLAGS} -I$withval"
|
|
||||||
fi
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_ARG_WITH(ffmpeg-libs,
|
|
||||||
[--with-ffmpeg-libs[[=DIR]] use ffmpeg lib files in DIR],[
|
|
||||||
if test "$withval" != "no" -a "$withval" != "yes"; then
|
|
||||||
Z_DIR=$withval
|
|
||||||
LDFLAGS="${LDFLAGS} -L$withval -R$withval"
|
|
||||||
fi
|
|
||||||
])
|
|
||||||
|
|
||||||
AC_ARG_WITH(id3tag,
|
AC_ARG_WITH(id3tag,
|
||||||
[--with-id3tag[[=DIR]] use id3tag in DIR],[
|
[--with-id3tag[[=DIR]] use id3tag in DIR],[
|
||||||
if test "$withval" != "no" -a "$withval" != "yes"; then
|
if test "$withval" != "no" -a "$withval" != "yes"; then
|
||||||
@ -225,18 +213,6 @@ if test x$use_flac = xtrue; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test x$use_ffmpeg = xtrue; then
|
|
||||||
AC_CHECK_HEADERS(avcodec.h,, [
|
|
||||||
AC_MSG_ERROR([avcodec.h not found... Must have ffmpeg installed])])
|
|
||||||
dnl AC_CHECK_LIB(avcodec,avcodec_find_decoder,,echo "Must have libavcodec";exit)
|
|
||||||
|
|
||||||
if test x"$STATIC_LIBS" != x"no"; then
|
|
||||||
LIBS="${LIBS} ${STATIC_LIBS}/libavcodec.a ${STATIC_LIBS}/libavformat.a ${STATIC_LIBS}/libavutil.a"
|
|
||||||
else
|
|
||||||
LIBS="${LIBS} -lavcodec -lavformat -lavutil"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test x$use_musepack = xtrue; then
|
if test x$use_musepack = xtrue; then
|
||||||
AC_PATH_PROG(TAGLIB_CONFIG, taglib-config, no)
|
AC_PATH_PROG(TAGLIB_CONFIG, taglib-config, no)
|
||||||
AC_CHECK_HEADERS(taglib/tag_c.h,, [
|
AC_CHECK_HEADERS(taglib/tag_c.h,, [
|
||||||
|
@ -11,11 +11,12 @@ rsp_la_SOURCES = compat.c rsp.c xml-rpc.c
|
|||||||
|
|
||||||
if COND_FFMPEG
|
if COND_FFMPEG
|
||||||
ssc_ffmpeg_LTLIBRARIES=ssc-ffmpeg.la
|
ssc_ffmpeg_LTLIBRARIES=ssc-ffmpeg.la
|
||||||
|
ssc_ffmpeg_la_CPPFLAGS = @FFMPEG_CFLAGS@
|
||||||
|
ssc_ffmpeg_la_LIBADD = @FFMPEG_LIBS@
|
||||||
|
ssc_ffmpeg_la_LDFLAGS=-module -avoid-version
|
||||||
ssc_ffmpeg_la_SOURCES=ssc-ffmpeg.c
|
ssc_ffmpeg_la_SOURCES=ssc-ffmpeg.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ssc_ffmpeg_la_LDFLAGS=-module -avoid-version
|
|
||||||
|
|
||||||
ssc_script_LTLIBRARIES=ssc-script.la
|
ssc_script_LTLIBRARIES=ssc-script.la
|
||||||
ssc_script_la_LDFLAGS=-module -avoid-version
|
ssc_script_la_LDFLAGS=-module -avoid-version
|
||||||
ssc_script_la_SOURCES=ssc-script.c
|
ssc_script_la_SOURCES=ssc-script.c
|
||||||
|
Loading…
Reference in New Issue
Block a user