Commit bb51796b authored by brendan's avatar brendan
Browse files

j@v2v.cc's patch to use pkg-config for vorbis and theora if available

svn path=/icecast/trunk/libshout/; revision=9908
parent fb99453c
......@@ -111,11 +111,23 @@ then
AC_DEFINE([NO_THREAD], 1, [Define if you don't want to use the thread library])
fi
XIPH_PATH_VORBIS(, [AC_MSG_ERROR([requisite Ogg Vorbis library not found])])
SHOUT_REQUIRES="ogg"
PKG_CHECK_MODULES(VORBIS, vorbis, [
HAVE_VORBIS="yes"
SHOUT_REQUIRES="$SHOUT_REQUIRES, vorbis"
], [
XIPH_PATH_VORBIS(, [AC_MSG_ERROR([requisite Ogg Vorbis library not found])])
])
VORBIS_LIBS="$VORBIS_LDFLAGS $VORBIS_LIBS"
XIPH_CFLAGS="$XIPH_CFLAGS $VORBIS_CFLAGS"
XIPH_PATH_THEORA(, [AC_MSG_WARN([Theora library not found, disabling])])
PKG_CHECK_MODULES(THEORA, theora, [
HAVE_THEORA="yes"
SHOUT_REQUIRES="$SHOUT_REQUIRES, theora"
], [
XIPH_PATH_THEORA(, [AC_MSG_WARN([Theora library not found, disabling])])
])
XIPH_VAR_APPEND([XIPH_CPPFLAGS],[$THEORA_CFLAGS])
XIPH_VAR_PREPEND([XIPH_LIBS],[$THEORA LDFLAGS $THEORA_LIBS])
AM_CONDITIONAL(HAVE_THEORA, test -n "$THEORA_LIBS")
......@@ -155,8 +167,10 @@ SHOUT_LIBS="-lshout"
XIPH_CLEAN_CCFLAGS([$SHOUT_CPPFLAGS], [SHOUT_CPPFLAGS])
XIPH_CLEAN_CCFLAGS([$SHOUT_CFLAGS], [SHOUT_CFLAGS])
XIPH_CLEAN_CCFLAGS([$VORBIS_LIBS $PTHREAD_LIBS $LIBS], [SHOUT_LIBDEPS])
XIPH_CLEAN_CCFLAGS([$VORBIS_LIBS $THEORA_LIBS $PTHREAD_LIBS $LIBS], [SHOUT_LIBDEPS])
AC_SUBST(PTHREAD_CPPFLAGS)
AC_SUBST(SHOUT_LIBDEPS)
AC_SUBST(SHOUT_REQUIRES)
AC_SUBST(SHOUT_CPPFLAGS)
AC_SUBST(SHOUT_CFLAGS)
AC_CONFIG_LIBCONFIG_IN_STATIC
......
......@@ -10,5 +10,6 @@ cflags_only=@SHOUT_CFLAGS@
Name: Shout
Description: Audio streaming library for icecast encoders
Version: @VERSION@
Libs: -L${libdir} -lshout @SHOUT_LIBDEPS@
Cflags: @SHOUT_CPPFLAGS@ @SHOUT_CFLAGS@
Requires: @SHOUT_REQUIRES@
Libs: -L${libdir} -lshout
Cflags: -I${includedir} @PTHREAD_CPPFLAGS@ @SHOUT_CFLAGS@
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment