mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-25 01:30:38 +00:00
fix shout2 check to check for the version
Original commit message from CVS: fix shout2 check to check for the version
This commit is contained in:
parent
46c7f43c32
commit
d9a65b00b4
1 changed files with 11 additions and 8 deletions
|
@ -3,21 +3,19 @@
|
||||||
# Shamelessly stolen from Owen Taylor and Manish Singh
|
# Shamelessly stolen from Owen Taylor and Manish Singh
|
||||||
|
|
||||||
dnl AM_PATH_SHOUT2([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
|
dnl AM_PATH_SHOUT2([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
|
||||||
dnl Test for libshout, and define SHOUT2_CFLAGS and SHOUT2_LIBS
|
dnl Test for libshout 2, and define SHOUT2_CFLAGS and SHOUT2_LIBS
|
||||||
dnl
|
dnl
|
||||||
AC_DEFUN([AM_PATH_SHOUT2],
|
AC_DEFUN([AM_PATH_SHOUT2],
|
||||||
[dnl
|
[dnl
|
||||||
dnl Get the cflags and libraries
|
dnl Get the cflags and libraries
|
||||||
dnl
|
dnl
|
||||||
AC_ARG_WITH(shout-prefix,[ --with-shout2-prefix=PFX Prefix where libshout2 is installed (optional)], shout2_prefix="$withval", shout2_prefix="")
|
AC_ARG_WITH(shout2-prefix,[ --with-shout2-prefix=PFX Prefix where libshout2 is installed (optional)], shout2_prefix="$withval", shout2_prefix="")
|
||||||
AC_ARG_ENABLE(shout2test, [ --disable-shout2test Do not try to compile and run a test Shout2 program],, enable_shout2test=yes)
|
AC_ARG_ENABLE(shout2test, [ --disable-shout2test Do not try to compile and run a test shout2 program],, enable_shout2test=yes)
|
||||||
|
|
||||||
if test "x$shout2_prefix" != "xNONE" ; then
|
if test "x$shout2_prefix" != "xNONE" ; then
|
||||||
shout2_args="$shout2_args --prefix=$shout2_prefix"
|
|
||||||
SHOUT2_CFLAGS="-I$shout2_prefix/include"
|
SHOUT2_CFLAGS="-I$shout2_prefix/include"
|
||||||
SHOUT2_LIBS="-L$shout2_prefix/lib"
|
SHOUT2_LIBS="-L$shout2_prefix/lib"
|
||||||
elif test "$prefix" != ""; then
|
elif test "x$prefix" != "x"; then
|
||||||
shout2_args="$shout2_args --prefix=$prefix"
|
|
||||||
SHOUT2_CFLAGS="-I$prefix/include"
|
SHOUT2_CFLAGS="-I$prefix/include"
|
||||||
SHOUT2_LIBS="-L$prefix/lib"
|
SHOUT2_LIBS="-L$prefix/lib"
|
||||||
fi
|
fi
|
||||||
|
@ -29,7 +27,7 @@ AC_ARG_ENABLE(shout2test, [ --disable-shout2test Do not try to compile an
|
||||||
SHOUT2_LIBS="$SHOUT2_LIBS -lnsl -lsocket -lresolv"
|
SHOUT2_LIBS="$SHOUT2_LIBS -lnsl -lsocket -lresolv"
|
||||||
esac
|
esac
|
||||||
|
|
||||||
AC_MSG_CHECKING(for Shout2)
|
AC_MSG_CHECKING(for shout2)
|
||||||
no_shout2=""
|
no_shout2=""
|
||||||
|
|
||||||
if test "x$enable_shout2test" = "xyes" ; then
|
if test "x$enable_shout2test" = "xyes" ; then
|
||||||
|
@ -38,7 +36,7 @@ AC_ARG_ENABLE(shout2test, [ --disable-shout2test Do not try to compile an
|
||||||
CFLAGS="$CFLAGS $SHOUT2_CFLAGS $OGG_CFLAGS $VORBIS_CFLAGS"
|
CFLAGS="$CFLAGS $SHOUT2_CFLAGS $OGG_CFLAGS $VORBIS_CFLAGS"
|
||||||
LIBS="$LIBS $SHOUT2_LIBS $OGG_LIBS $VORBIS_LIBS"
|
LIBS="$LIBS $SHOUT2_LIBS $OGG_LIBS $VORBIS_LIBS"
|
||||||
dnl
|
dnl
|
||||||
dnl Now check if the installed Shout2 is sufficiently new.
|
dnl Now check if the installed shout2 is sufficiently new.
|
||||||
dnl
|
dnl
|
||||||
rm -f conf.shout2test
|
rm -f conf.shout2test
|
||||||
AC_TRY_RUN([
|
AC_TRY_RUN([
|
||||||
|
@ -49,7 +47,12 @@ dnl
|
||||||
|
|
||||||
int main ()
|
int main ()
|
||||||
{
|
{
|
||||||
|
int major, minor, patch;
|
||||||
|
|
||||||
system("touch conf.shout2test");
|
system("touch conf.shout2test");
|
||||||
|
shout_version(&major, &minor, &patch);
|
||||||
|
if (major < 2)
|
||||||
|
return 1;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue