1
0
mirror of https://gitlab.xiph.org/xiph/icecast-server.git synced 2024-09-22 04:15:54 -04:00

update library check

svn path=/icecast/trunk/m4/; revision=7605
This commit is contained in:
Karl Heyes 2004-08-22 00:17:38 +00:00
parent ac73dff07a
commit 4f2c1d8d3d

View File

@ -19,6 +19,10 @@ AC_ARG_WITH(speex,
speex_prefix="$withval",
speex_prefix="$SPEEX_PREFIX"
)
if test "x$with_speex" = "xno"
then
AC_MSG_RESULT([Speex support disabled by request])
else
if test "x$speex_prefix" = "x"; then
if test "x$prefix" = "xNONE"; then
speex_prefix="/usr/local"
@ -38,8 +42,8 @@ fi
SPEEX_LIBS="-lspeex"
ac_save_LIBS="$LIBS"
ac_save_LDFLAGS="$LDFLAGS"
xt_save_LIBS="$LIBS"
xt_save_LDFLAGS="$LDFLAGS"
LDFLAGS="$LDFLAGS $SPEEX_LDFLAGS"
LIBS="$LIBS $SPEEX_LIBS"
xt_have_speex="yes"
@ -50,9 +54,17 @@ AC_TRY_LINK_FUNC(ogg_stream_init, [AC_MSG_RESULT([ok])],
[SPEEX_LIBS="$SPEEX_LIBS $OGG_LIBS"],
[xt_have_speex="no"])
])
if test "x$xt_have_speex" = "xyes"
then
AC_LINK_IFELSE([AC_LANG_PROGRAM(
[#include <speex/speex_header.h>],
[void *p = speex_packet_to_header;])],
[],
[xt_have_speex="no"])
fi
LIBS="$ac_save_LIBS"
LDFLAGS="$ac_save_LDFLAGS"
LIBS="$xt_save_LIBS"
LDFLAGS="$xt_save_LDFLAGS"
if test "x$xt_have_speex" = "xyes"
then
@ -67,4 +79,5 @@ fi
AC_SUBST(SPEEX_CFLAGS)
AC_SUBST(SPEEX_LDFLAGS)
AC_SUBST(SPEEX_LIBS)
fi
])