[xiph-cvs] cvs commit: libshout/src Makefile.am
Brendan
brendan at xiph.org
Tue Jun 17 20:55:41 PDT 2003
brendan 03/06/17 23:55:41
Modified: . Makefile.am configure.in
examples Makefile.am
m4 ogg.m4 vorbis.m4
src Makefile.am
Added: m4 gccinclude.m4
Log:
Karl's simplified and cleaned up ogg/vorbis macros. This will push back
release a bit unfortunately.
Revision Changes Path
1.15 +1 -1 libshout/Makefile.am
Index: Makefile.am
===================================================================
RCS file: /usr/local/cvsroot/libshout/Makefile.am,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -p -u -r1.14 -r1.15
--- Makefile.am 17 Jun 2003 22:52:31 -0000 1.14
+++ Makefile.am 18 Jun 2003 03:55:40 -0000 1.15
@@ -6,7 +6,7 @@ ACLOCAL_AMFLAGS = -I m4
SUBDIRS = include src examples
EXTRA_DIST = INSTALL shout.m4 m4/ac_config_libconfig_in.m4 m4/acx_pthread.m4 \
- m4/ogg.m4 m4/vorbis.m4 m4/xiph_clean_ccflags.m4
+ m4/gccinclude.m4 m4/ogg.m4 m4/vorbis.m4 m4/xiph_clean_ccflags.m4
docdir = $(datadir)/doc/$(PACKAGE)
doc_DATA = COPYING README examples/example.c
<p><p>1.48 +5 -13 libshout/configure.in
Index: configure.in
===================================================================
RCS file: /usr/local/cvsroot/libshout/configure.in,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -p -u -r1.47 -r1.48
--- configure.in 12 Jun 2003 16:59:43 -0000 1.47
+++ configure.in 18 Jun 2003 03:55:40 -0000 1.48
@@ -1,5 +1,5 @@
# Process this file with autoconf to produce a configure script.
-# $Id: configure.in,v 1.47 2003/06/12 16:59:43 brendan Exp $
+# $Id: configure.in,v 1.48 2003/06/18 03:55:40 brendan Exp $
m4_define(libshout_major, 2)
m4_define(libshout_minor, 0)
@@ -153,17 +153,9 @@ then
AC_DEFINE([NO_THREAD], 1, [Define if you don't want to use the thread library])
fi
-XIPH_PATH_OGG
-if test -z "$OGG_LIBS"
-then
- AC_MSG_ERROR([The Ogg library is required to build libshout])
-fi
XIPH_PATH_VORBIS
-if test -z "$VORBIS_LIBS"
-then
- AC_MSG_ERROR([The Vorbis library is required to build libshout])
-fi
-XIPH_CFLAGS="$XIPH_CFLAGS $VORBIS_CFLAGS $OGG_CFLAGS"
+VORBIS_LIBS="$VORBIS_LDFLAGS $VORBIS_LIBS"
+XIPH_CFLAGS="$XIPH_CFLAGS $VORBIS_CFLAGS"
dnl pkgconfig/shout-config.
dnl If pkgconfig is found, use it and disable shout-config, otherwise do the
@@ -185,8 +177,8 @@ AM_CONDITIONAL([HAVE_PKGCONFIG], [test "
# Build shout-config, shout.pc
SHOUT_VERSION="$VERSION"
SHOUT_LIBS="-lshout"
-XIPH_CLEAN_CCFLAGS([$VORBIS_LIBS $OGG_LIBS $PTHREAD_LIBS], [SHOUT_LIBDEPS])
-XIPH_CLEAN_CCFLAGS([$VORBIS_CFLAGS $OGG_CFLAGS $PTHREAD_CFLAGS], [SHOUT_CFLAGS])
+XIPH_CLEAN_CCFLAGS([$VORBIS_LIBS $PTHREAD_LIBS], [SHOUT_LIBDEPS])
+XIPH_CLEAN_CCFLAGS([$VORBIS_CFLAGS $PTHREAD_CFLAGS], [SHOUT_CFLAGS])
AC_SUBST(SHOUT_LIBDEPS)
AC_SUBST(SHOUT_CFLAGS)
AC_CONFIG_LIBCONFIG_IN_STATIC
<p><p>1.5 +1 -1 libshout/examples/Makefile.am
Index: Makefile.am
===================================================================
RCS file: /usr/local/cvsroot/libshout/examples/Makefile.am,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -p -u -r1.4 -r1.5
--- Makefile.am 8 Mar 2003 00:46:58 -0000 1.4
+++ Makefile.am 18 Jun 2003 03:55:40 -0000 1.5
@@ -5,7 +5,7 @@ AUTOMAKE_OPTIONS = foreign
noinst_PROGRAMS = example
example_SOURCES = example.c
-example_LDADD = ../src/libshout.la $(OGG_LIBS) $(VORBIS_LIBS)
+example_LDADD = ../src/libshout.la $(VORBIS_LIBS)
AM_CFLAGS = @XIPH_CFLAGS@
INCLUDES = -I$(top_srcdir)/include
<p><p>1.4 +45 -101 libshout/m4/ogg.m4
Index: ogg.m4
===================================================================
RCS file: /usr/local/cvsroot/libshout/m4/ogg.m4,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -p -u -r1.3 -r1.4
--- ogg.m4 13 Jun 2003 19:08:32 -0000 1.3
+++ ogg.m4 18 Jun 2003 03:55:41 -0000 1.4
@@ -1,110 +1,54 @@
# Configure paths for libogg
+# updated by Karl Heyes 10-Jun-2003
# Jack Moffitt <jack at icecast.org> 10-21-2000
# Shamelessly stolen from Owen Taylor and Manish Singh
dnl XIPH_PATH_OGG([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
-dnl Test for libogg, and define OGG_CFLAGS and OGG_LIBS
+dnl Test for libogg, and define OGG_CFLAGS OGG_LDFLAGS and OGG_LIBS
dnl
AC_DEFUN(XIPH_PATH_OGG,
[dnl
-dnl Get the cflags and libraries
-dnl
-AC_ARG_WITH([ogg],
- [ --with-ogg=PFX prefix where libogg is installed (optional)],
- [ogg_prefix="$withval"], [ogg_prefix=""])
-AC_ARG_WITH([ogg-libraries],
- [ --with-ogg-libraries=DIR directory where libogg library is installed (optional)], [ogg_libraries="$withval"], [ogg_libraries=""])
-AC_ARG_WITH([ogg-includes],
- [ --with-ogg-includes=DIR directory where libogg header files are
- installed (optional)],
- [ogg_includes="$withval"], [ogg_includes=""])
-AC_ARG_ENABLE([oggtest],
- [ --disable-oggtest do not try to compile and run a test Ogg program],,
- [enable_oggtest=yes])
-
- if test "x$ogg_libraries" != "x" ; then
- OGG_LIBS="-L$ogg_libraries"
- elif test "x$ogg_prefix" != "x" ; then
- OGG_LIBS="-L$ogg_prefix/lib"
- elif test "x$prefix" != "xNONE" ; then
- OGG_LIBS="-L$prefix/lib"
- fi
-
- OGG_LIBS="$OGG_LIBS -logg"
-
- if test "x$ogg_includes" != "x" ; then
- OGG_CFLAGS="-I$ogg_includes"
- elif test "x$ogg_prefix" != "x" ; then
- OGG_CFLAGS="-I$ogg_prefix/include"
- elif test "x$prefix" != "xNONE"; then
- OGG_CFLAGS="-I$prefix/include"
- fi
-
- AC_MSG_CHECKING(for Ogg)
- no_ogg=""
-
-
- if test "x$enable_oggtest" = "xyes" ; then
- ac_save_CFLAGS="$CFLAGS"
- ac_save_LIBS="$LIBS"
- CFLAGS="$CFLAGS $OGG_CFLAGS"
- LIBS="$LIBS $OGG_LIBS"
-dnl
-dnl Now check if the installed Ogg is sufficiently new.
-dnl
- rm -f conf.oggtest
- AC_TRY_RUN([
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <ogg/ogg.h>
-
-int main ()
-{
- system("touch conf.oggtest");
- return 0;
-}
-
-],, no_ogg=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
- CFLAGS="$ac_save_CFLAGS"
- LIBS="$ac_save_LIBS"
- fi
-
- if test "x$no_ogg" = "x" ; then
- AC_MSG_RESULT(yes)
- ifelse([$1], , :, [$1])
- else
- AC_MSG_RESULT(no)
- if test -f conf.oggtest ; then
- :
- else
- echo "*** Could not run Ogg test program, checking why..."
- CFLAGS="$CFLAGS $OGG_CFLAGS"
- LIBS="$LIBS $OGG_LIBS"
- AC_TRY_LINK([
-#include <stdio.h>
-#include <ogg/ogg.h>
-], [ return 0; ],
- [ echo "*** The test program compiled, but did not run. This usually means"
- echo "*** that the run-time linker is not finding Ogg or finding the wrong"
- echo "*** version of Ogg. If it is not finding Ogg, you'll need to set your"
- echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
- echo "*** to the installed location Also, make sure you have run ldconfig if that"
- echo "*** is required on your system"
- echo "***"
- echo "*** If you have an old version installed, it is best to remove it, although"
- echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
- [ echo "*** The test program failed to compile or link. See the file config.log for the"
- echo "*** exact error that occured. This usually means Ogg was incorrectly installed"
- echo "*** or that you have moved Ogg since it was installed." ])
- CFLAGS="$ac_save_CFLAGS"
- LIBS="$ac_save_LIBS"
- fi
- OGG_CFLAGS=""
- OGG_LIBS=""
- ifelse([$2], , :, [$2])
- fi
- AC_SUBST(OGG_CFLAGS)
- AC_SUBST(OGG_LIBS)
- rm -f conf.oggtest
+AC_ARG_VAR([OGG_PREFIX],[path to ogg installation])
+AC_ARG_WITH(ogg,
+ [AC_HELP_STRING([--with-ogg=PREFIX],
+ [Prefix where libogg is installed (optional)])],
+ ogg_prefix="$withval",
+ ogg_prefix="$OGG_PREFIX"
+)
+if test "x$ogg_prefix" = "x"; then
+ if test "x$prefix" = "xNONE"; then
+ ogg_prefix=/usr/local
+ else
+ ogg_prefix="$prefix"
+ fi
+fi
+
+XIPH_GCC_INCLUDE_WARNING([$ogg_prefix/include],,
+ [OGG_CFLAGS="-I$ogg_prefix/include"
+ OGG_LDFLAGS="-L$ogg_prefix/lib"
+ ])
+OGG_LIBS="-logg"
+
+#
+# check if the installed Ogg is sufficiently new.
+#
+AC_MSG_CHECKING([checking for ogg_sync_init in libogg])
+ac_save_CFLAGS="$CFLAGS"
+ac_save_LIBS="$LIBS"
+ac_save_LDFLAGS="$LDFLAGS"
+CFLAGS="$CFLAGS $OGG_CFLAGS"
+LIBS="$LIBS $OGG_LIBS"
+LDFLAGS="$LDFLAGS $OGG_LDFLAGS"
+AC_TRY_LINK_FUNC(ogg_sync_init,
+ [ifelse([$1],, [AC_MSG_RESULT([ok])], [$1])],
+ [AC_TRY_LINK([#include <ogg/ogg.h>],,
+ [ ifelse([$2], ,[AC_MSG_ERROR([found, but needs updating])], [$2])],
+ [ ifelse([$2], ,[AC_MSG_ERROR([not found, maybe you need to set LD_LIBRARY_PATH or /etc/ld.so.conf])], [$2])])
+ ])
+CFLAGS="$ac_save_CFLAGS"
+LIBS="$ac_save_LIBS"
+
+AC_SUBST(OGG_CFLAGS)
+AC_SUBST(OGG_LDFLAGS)
+AC_SUBST(OGG_LIBS)
])
<p><p>1.3 +72 -122 libshout/m4/vorbis.m4
Index: vorbis.m4
===================================================================
RCS file: /usr/local/cvsroot/libshout/m4/vorbis.m4,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -p -u -r1.2 -r1.3
--- vorbis.m4 13 Jun 2003 19:08:32 -0000 1.2
+++ vorbis.m4 18 Jun 2003 03:55:41 -0000 1.3
@@ -1,132 +1,82 @@
# Configure paths for libvorbis
# Jack Moffitt <jack at icecast.org> 10-21-2000
+# updated by Karl Heyes 31-Mar-2003
# Shamelessly stolen from Owen Taylor and Manish Singh
-# thomasvs added check for vorbis_bitrate_addblock which is new in rc3
dnl XIPH_PATH_VORBIS([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
-dnl Test for libvorbis, and define VORBIS_CFLAGS and VORBIS_LIBS
+dnl Test for libvorbis, and define VORBIS_CFLAGS VORBIS_LIBS
+dnl VORBIS_VORBISENC_LIBS VORBIS_VORBISFILE_LIBS VORBIS_LDFLAGS
dnl
-AC_DEFUN(XIPH_PATH_VORBIS,
-[dnl
-dnl Get the cflags and libraries
-dnl
-AC_ARG_WITH([vorbis],
- [ --with-vorbis=PFX prefix where libvorbis is installed (optional)],
- [vorbis_prefix="$withval"], [vorbis_prefix=""])
-AC_ARG_WITH([vorbis-libraries],
- [ --with-vorbis-libraries=DIR directory where libvorbis library is
- installed (optional)],
- [vorbis_libraries="$withval"], [vorbis_libraries=""])
-AC_ARG_WITH([vorbis-includes],
- [ --with-vorbis-includes=DIR directory where libvorbis header files are
- installed (optional)],
- [vorbis_includes="$withval"], [vorbis_includes=""])
-AC_ARG_ENABLE([vorbistest],
- [ --disable-vorbistest do not try to compile and run a test Vorbis program],,
- [enable_vorbistest=yes])
-
- if test "x$vorbis_libraries" != "x" ; then
- VORBIS_LIBS="-L$vorbis_libraries"
- elif test "x$vorbis_prefix" != "x" ; then
- VORBIS_LIBS="-L$vorbis_prefix/lib"
- elif test "x$prefix" != "xNONE"; then
- VORBIS_LIBS="-L$prefix/lib"
- fi
-
- VORBIS_LIBS="$VORBIS_LIBS -lvorbis -lm"
- VORBISFILE_LIBS="-lvorbisfile"
- VORBISENC_LIBS="-lvorbisenc"
-
- if test "x$vorbis_includes" != "x" ; then
- VORBIS_CFLAGS="-I$vorbis_includes"
- elif test "x$vorbis_prefix" != "x" ; then
- VORBIS_CFLAGS="-I$vorbis_prefix/include"
- elif test "x$prefix" != "xNONE"; then
- VORBIS_CFLAGS="-I$prefix/include"
- fi
-
-
- AC_MSG_CHECKING(for Vorbis)
- no_vorbis=""
-
-
- if test "x$enable_vorbistest" = "xyes" ; then
- ac_save_CFLAGS="$CFLAGS"
- ac_save_LIBS="$LIBS"
- CFLAGS="$CFLAGS $VORBIS_CFLAGS $OGG_CFLAGS"
- LIBS="$LIBS $VORBIS_LIBS $VORBISENC_LIBS $OGG_LIBS"
-dnl
-dnl Now check if the installed Vorbis is sufficiently new.
+
+AC_DEFUN([XIPH_PATH_VORBIS],
+[
+XIPH_PATH_OGG([$1],[$2])
+
+dnl Get the cflags and libraries for vorbis
dnl
- rm -f conf.vorbistest
- AC_TRY_RUN([
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <vorbis/codec.h>
-#include <vorbis/vorbisenc.h>
+AC_ARG_VAR([VORBIS_PREFIX],[path to vorbis installation])
+AC_ARG_WITH(vorbis,
+ AC_HELP_STRING([--with-vorbis=PREFIX],
+ [Prefix where libvorbis is installed (optional)]),
+ vorbis_prefix="$withval",
+ vorbis_prefix="$VORBIS_PREFIX"
+ )
+if test "x$vorbis_prefix" = "x"; then
+ if test "x$prefix" = "xNONE"; then
+ vorbis_prefix="/usr/local"
+ else
+ vorbis_prefix="$prefix"
+ fi
+fi
+
+VORBIS_CFLAGS="$OGG_CFLAGS"
+VORBIS_LDFLAGS="$OGG_LDFLAGS"
+if test "x$vorbis_prefix" != "x$ogg_prefix"; then
+ XIPH_GCC_INCLUDE_WARNING("$vorbis_prefix/include",,
+ [VORBIS_CFLAGS="$VORBIS_CFLAGS -I$vorbis_prefix/include"
+ VORBIS_LDFLAGS="-L$vorbis_prefix/lib $VORBIS_LDFLAGS"
+ ])
+fi
+
+VORBIS_LIBS="-lvorbis"
+VORBISFILE_LIBS="-lvorbisfile"
+VORBISENC_LIBS="-lvorbisenc"
+
+ac_save_LIBS="$LIBS"
+ac_save_LDFLAGS="$LDFLAGS"
+LDFLAGS="$LDFLAGS $VORBIS_LDFLAGS"
+LIBS="$LIBS $VORBIS_LIBS"
+AC_MSG_CHECKING([checking for libvorbis])
+AC_TRY_LINK_FUNC(vorbis_info_init, [AC_MSG_RESULT([ok])],
+ [LIBS="$LIBS $OGG_LIBS -lm"
+ AC_TRY_LINK_FUNC(vorbis_info_init,
+ [AC_MSG_RESULT([found, adding extra libs])
+ VORBIS_LIBS="$VORBIS_LIBS $OGG_LIBS -lm"],
+ [ifelse([$2], , AC_MSG_ERROR([Unable to link to libvorbis]), [$2])
+ ])
+ ])
+
+LIBS="$ac_save_LIBS"
+LDFLAGS="$ac_save_LDFLAGS"
+
+#
+# Now check if the installed Vorbis is sufficiently new.
+#
+ac_save_CFLAGS="$CFLAGS"
+ac_save_LIBS="$LIBS"
+CFLAGS="$CFLAGS $VORBIS_CFLAGS"
+LIBS="$LIBS $VORBIS_LDFLAGS $VORBIS_LIBS"
-int main ()
-{
- vorbis_block vb;
- vorbis_dsp_state vd;
- vorbis_info vi;
-
- vorbis_info_init (&vi);
- vorbis_encode_init (&vi, 2, 44100, -1, 128000, -1);
- vorbis_analysis_init (&vd, &vi);
- vorbis_block_init (&vd, &vb);
- /* this function was added in 1.0rc3, so this is what we're testing for */
- vorbis_bitrate_addblock (&vb);
-
- system("touch conf.vorbistest");
- return 0;
-}
-
-],, no_vorbis=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
- CFLAGS="$ac_save_CFLAGS"
- LIBS="$ac_save_LIBS"
- fi
-
- if test "x$no_vorbis" = "x" ; then
- AC_MSG_RESULT(yes)
- ifelse([$1], , :, [$1])
- else
- AC_MSG_RESULT(no)
- if test -f conf.vorbistest ; then
- :
- else
- echo "*** Could not run Vorbis test program, checking why..."
- CFLAGS="$CFLAGS $VORBIS_CFLAGS"
- LIBS="$LIBS $VORBIS_LIBS $OGG_LIBS"
- AC_TRY_LINK([
-#include <stdio.h>
+AC_CHECK_TYPES([struct ovectl_ratemanage_arg],[vorbis_ok=yes],
+ [ifelse([$2], ,[AC_MSG_ERROR([libvorbis needs updating])], [$2])], [
#include <vorbis/codec.h>
-], [ return 0; ],
- [ echo "*** The test program compiled, but did not run. This usually means"
- echo "*** that the run-time linker is not finding Vorbis or finding the wrong"
- echo "*** version of Vorbis. If it is not finding Vorbis, you'll need to set your"
- echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
- echo "*** to the installed location Also, make sure you have run ldconfig if that"
- echo "*** is required on your system"
- echo "***"
- echo "*** If you have an old version installed, it is best to remove it, although"
- echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
- [ echo "*** The test program failed to compile or link. See the file config.log for the"
- echo "*** exact error that occured. This usually means Vorbis was incorrectly installed"
- echo "*** or that you have moved Vorbis since it was installed." ])
- CFLAGS="$ac_save_CFLAGS"
- LIBS="$ac_save_LIBS"
- fi
- VORBIS_CFLAGS=""
- VORBIS_LIBS=""
- VORBISFILE_LIBS=""
- VORBISENC_LIBS=""
- ifelse([$2], , :, [$2])
- fi
- AC_SUBST(VORBIS_CFLAGS)
- AC_SUBST(VORBIS_LIBS)
- AC_SUBST(VORBISFILE_LIBS)
- AC_SUBST(VORBISENC_LIBS)
- rm -f conf.vorbistest
+#include <vorbis/vorbisenc.h>
+ ])
+CFLAGS="$ac_save_CFLAGS"
+LIBS="$ac_save_LIBS"
+AC_SUBST(VORBIS_CFLAGS)
+AC_SUBST(VORBIS_LDFLAGS)
+AC_SUBST(VORBIS_LIBS)
+AC_SUBST(VORBISFILE_LIBS)
+AC_SUBST(VORBISENC_LIBS)
])
<p><p>1.1 libshout/m4/gccinclude.m4
Index: gccinclude.m4
===================================================================
dnl check for gcc warnings
AC_DEFUN(XIPH_GCC_INCLUDE_WARNING,
[dnl
warning=no
save_cflags="$CFLAGS"
if test x"$ac_cv_c_compiler_gnu" = "xyes" ; then
CFLAGS="-Werror -I$1"
AC_TRY_COMPILE(,,,warning=yes)
fi
CFLAGS="$save_cflags"
if test "$warning" = "yes" ; then
ifelse([$2],,:,[$2])
else
ifelse([$3],,:,[$3])
fi
])
#
# Appends $2 onto $1 unless it already exists
AC_DEFUN([XIPH_VAR_APPEND],
[dnl
if echo "x$[$1]" | grep -v -e "[$2]" > /dev/null; then
[$1]="$[$1] [$2]"
fi
])
# Prepends $2 onto $1 unless it already exists
AC_DEFUN([XIPH_VAR_PREPEND],
[dnl
if echo "x$[$1]" | grep -v -e "[$2]" > /dev/null; then
[$1]="[$2] $[$1]"
fi
])
<p><p>1.11 +1 -1 libshout/src/Makefile.am
Index: Makefile.am
===================================================================
RCS file: /usr/local/cvsroot/libshout/src/Makefile.am,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -p -u -r1.10 -r1.11
--- Makefile.am 11 Mar 2003 01:50:39 -0000 1.10
+++ Makefile.am 18 Jun 2003 03:55:41 -0000 1.11
@@ -16,7 +16,7 @@ libshout_la_SOURCES = shout.c util.c vor
AM_CFLAGS = @XIPH_CFLAGS@
libshout_la_LIBADD = net/libicenet.la timing/libicetiming.la avl/libiceavl.la\
- httpp/libicehttpp.la $(MAYBE_THREAD_LIB) $(VORBIS_LIBS) $(OGG_LIBS)
+ httpp/libicehttpp.la $(MAYBE_THREAD_LIB) $(VORBIS_LIBS)
INCLUDES = -I$(top_srcdir)/include
<p><p>--- >8 ----
List archives: http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body. No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.
More information about the commits
mailing list