Commit 397aaa2d authored by brendan's avatar brendan
Browse files

Move shout.m4 into shared repository.

Libshout done, ices 0 to follow...

svn path=/trunk/libshout/; revision=5015
parent fd2b07c4
......@@ -5,7 +5,7 @@ ACLOCAL_AMFLAGS = -I m4
SUBDIRS = include src examples
EXTRA_DIST = INSTALL shout.m4 m4/ac_config_libconfig_in.m4 m4/acx_pthread.m4 \
EXTRA_DIST = INSTALL m4/shout.m4 m4/ac_config_libconfig_in.m4 m4/acx_pthread.m4 \
m4/ogg.m4 m4/vorbis.m4 m4/xiph_compiler.m4 m4/xiph_net.m4 \
m4/xiph_types.m4
......@@ -13,7 +13,7 @@ docdir = $(datadir)/doc/$(PACKAGE)
doc_DATA = COPYING README examples/example.c
m4datadir = $(datadir)/aclocal
m4data_DATA = shout.m4
m4data_DATA = m4/shout.m4
if HAVE_PKGCONFIG
pkgconfigdir = $(libdir)/pkgconfig
......
dnl XIPH_PATH_SHOUT
dnl Jack Moffitt <jack@icecast.org> 08-06-2001
dnl Rewritten for libshout 2
dnl Brendan Cully <brendan@xiph.org> 20030612
dnl
dnl $Id: shout.m4,v 1.8 2003/06/25 17:03:55 brendan Exp $
# XIPH_PATH_SHOUT([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
# Test for libshout, and define SHOUT_CFLAGS and SHOUT_LIBS
AC_DEFUN([XIPH_PATH_SHOUT],
[dnl
xt_have_shout="no"
SHOUT_CFLAGS=""
SHOUT_LIBS=""
# NB: PKG_CHECK_MODULES exits if pkg-config is unavailable on the targe
# system, so we can't use it.
# Step 1: Use pkg-config if available
AC_PATH_PROG([PKGCONFIG], [pkg-config], [no])
if test "$PKGCONFIG" != "no" && `$PKGCONFIG --exists shout`
then
SHOUT_CFLAGS=`$PKGCONFIG --cflags shout`
SHOUT_LIBS=`$PKGCONFIG --libs shout`
xt_have_shout="maybe"
else
if test "$PKGCONFIG" != "no"
then
AC_MSG_NOTICE([$PKGCONFIG couldn't find libshout. Try adjusting PKG_CONFIG_PATH.])
fi
# pkg-config unavailable, try shout-config
AC_PATH_PROG([SHOUTCONFIG], [shout-config], [no])
if test "$SHOUTCONFIG" != "no" && test `$SHOUTCONFIG --package` = "libshout"
then
SHOUT_CFLAGS=`$SHOUTCONFIG --cflags`
SHOUT_LIBS=`$SHOUTCONFIG --libs`
xt_have_shout="maybe"
fi
fi
# Now try actually using libshout
if test "$xt_have_shout" != "no"
then
ac_save_CFLAGS="$CFLAGS"
ac_save_LIBS="$LIBS"
CFLAGS="$CFLAGS $SHOUT_CFLAGS"
LIBS="$LIBS $SHOUT_LIBS"
AC_CHECK_HEADER([shout/shout.h], [
AC_DEFINE([HAVE_SHOUT_SHOUT_H], 1, [Define if you have <shout/shout.h>])
AC_CHECK_FUNC([shout_new], [
ifelse([$1], , :, [$1])
xt_have_shout="yes"
])
])
CFLAGS="$ac_save_CFLAGS"
LIBS="$ac_save_LIBS"
fi
if test "$xt_have_shout" != "yes"
then
ifelse([$2], , :, [$2])
fi
])dnl XIPH_PATH_SHOUT
Supports Markdown
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