summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJack Moffitt <jack@xiph.org>2000-10-26 22:50:53 +0000
committerJack Moffitt <jack@xiph.org>2000-10-26 22:50:53 +0000
commitfd93c044d5b3df1526acdc467d86b3ff80ecbd6c (patch)
treebb9ae11eb7d8224a9c028b7fbdec9d484c26c5dd
parent7f3c0be712af6ab0d44aaf048935b64d3b7ec64d (diff)
downloadlibvorbis-git-fd93c044d5b3df1526acdc467d86b3ff80ecbd6c.tar.gz
updated spec file with ali's changes
updated cvsignore made examples build added acinclude.m4 (which contains ogg.m4) so you don't rely on having ogg to check for ogg :) svn path=/branches/branch_beta3/vorbis/; revision=765
-rw-r--r--.cvsignore14
-rw-r--r--acinclude.m4114
-rw-r--r--examples/Makefile.am25
-rw-r--r--libvorbis.spec6
4 files changed, 157 insertions, 2 deletions
diff --git a/.cvsignore b/.cvsignore
new file mode 100644
index 00000000..87f78c54
--- /dev/null
+++ b/.cvsignore
@@ -0,0 +1,14 @@
+aclocal.m4
+config.h.in
+Makefile.in
+Makefile
+config.status
+libtool
+config.cache
+config.log
+configure
+*.gz
+.libs
+.deps
+*.ogg
+vorbis-config
diff --git a/acinclude.m4 b/acinclude.m4
new file mode 100644
index 00000000..6f1d30d0
--- /dev/null
+++ b/acinclude.m4
@@ -0,0 +1,114 @@
+# acinclude.m4
+# all .m4 files needed that might not be installed go here
+
+# ogg.m4
+# Configure paths for libogg
+# Jack Moffitt <jack@icecast.org> 10-21-2000
+# Shamelessly stolen from Owen Taylor and Manish Singh
+
+dnl AM_PATH_OGG([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
+dnl Test for libogg, and define OGG_CFLAGS and OGG_LIBS
+dnl
+AC_DEFUN(AM_PATH_OGG,
+[dnl
+dnl Get the cflags and libraries from the ogg-config script
+dnl
+AC_ARG_WITH(ogg-prefix,[ --with-ogg-prefix=PFX Prefix where libogg is installed (optional)], ogg_prefix="$withval", ogg_prefix="")
+AC_ARG_ENABLE(oggtest, [ --disable-oggtest Do not try to compile and run a test Ogg program],, enable_oggtest=yes)
+
+ if test x$ogg_prefix != x ; then
+ ogg_args="$ogg_args --prefix=$ogg_prefix"
+ if test x${OGG_CONFIG+set} != xset ; then
+ OGG_CONFIG=$ogg_prefix/bin/ogg-config
+ fi
+ fi
+
+ AC_PATH_PROG(OGG_CONFIG, ogg-config, no)
+ min_ogg_version=ifelse([$1], ,1.0.0,$1)
+ AC_MSG_CHECKING(for Ogg - version >= $min_ogg_version)
+ no_ogg=""
+ if test "$OGG_CONFIG" = "no" ; then
+ no_esd=yes
+ else
+ OGG_CFLAGS=`$OGG_CONFIG $oggconf_args --cflags`
+ OGG_LIBS=`$OGG_CONFIG $oggconf_args --libs`
+
+ ogg_major_version=`$OGG_CONFIG $ogg_args --version | \
+ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
+ ogg_minor_version=`$OGG_CONFIG $ogg_args --version | \
+ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
+ ogg_micro_version=`$OGG_CONFIG $ogg_config_args --version | \
+ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
+ 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. (Also sanity
+dnl checks the results of ogg-config to some extent
+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
+ fi
+ if test "x$no_ogg" = x ; then
+ AC_MSG_RESULT(yes)
+ ifelse([$2], , :, [$2])
+ else
+ AC_MSG_RESULT(no)
+ if test "$OGG_CONFIG" = "no" ; then
+ echo "*** The ogg-config script installed by Ogg could not be found"
+ echo "*** If Ogg was installed in PREFIX, make sure PREFIX/bin is in"
+ echo "*** your path, or set the OGG_CONFIG environment variable to the"
+ echo "*** full path to ogg-config."
+ else
+ 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. In the latter case, you"
+ echo "*** may want to edit the ogg-config script: $OGG_CONFIG" ])
+ CFLAGS="$ac_save_CFLAGS"
+ LIBS="$ac_save_LIBS"
+ fi
+ fi
+ OGG_CFLAGS=""
+ OGG_LIBS=""
+ ifelse([$3], , :, [$3])
+ fi
+ AC_SUBST(OGG_CFLAGS)
+ AC_SUBST(OGG_LIBS)
+ rm -f conf.oggtest
+])
diff --git a/examples/Makefile.am b/examples/Makefile.am
new file mode 100644
index 00000000..3d5f4be0
--- /dev/null
+++ b/examples/Makefile.am
@@ -0,0 +1,25 @@
+## Process this file with automake to produce Makefile.in
+
+AUTOMAKE_OPTIONS = foreign
+
+INCLUDES = -I$(top_srcdir)/include
+
+noinst_PROGRAMS = decoder_example encoder_example chaining_example\
+ vorbisfile_example seeking_example
+
+LDADD = $(top_srcdir)/lib/.libs/libvorbis.a $(OGG_LIBS)
+
+decoder_example_SOURCES = decoder_example.c
+encoder_example_SOURCES = encoder_example.c
+chaining_example_SOURCES = chaining_example.c
+chaining_example_LDADD = $(top_srcdir)/lib/.libs/libvorbisfile.a $(top_srcdir)/lib/.libs/libvorbis.a $(OGG_LIBS)
+vorbisfile_example_SOURCES = vorbisfile_example.c
+vorbisfile_example_LDADD = $(top_srcdir)/lib/.libs/libvorbisfile.a $(top_srcdir)/lib/.libs/libvorbis.a $(OGG_LIBS)
+seeking_example_SOURCES = seeking_example.c
+seeking_example_LDADD = $(top_srcdir)/lib/.libs/libvorbisfile.a $(top_srcdir)/lib/.libs/libvorbis.a $(OGG_LIBS)
+
+debug:
+ $(MAKE) all CFLAGS="@DEBUG@"
+
+profile:
+ $(MAKE) all CFLAGS="@PROFILE@"
diff --git a/libvorbis.spec b/libvorbis.spec
index 73c74c17..f78b9a34 100644
--- a/libvorbis.spec
+++ b/libvorbis.spec
@@ -47,8 +47,8 @@ make DESTDIR=$RPM_BUILD_ROOT install
%defattr(-,root,root)
%doc COPYING
%doc README
-/usr/lib/libvorbis.so*
-/usr/lib/libvorbisfile.so*
+/usr/lib/libvorbis.so.*
+/usr/lib/libvorbisfile.so.*
%files devel
%doc doc/programming.html
@@ -72,6 +72,8 @@ make DESTDIR=$RPM_BUILD_ROOT install
/usr/include/vorbis/book/res0_*.vqh
/usr/include/vorbis/book/resaux0_*.vqh
/usr/lib/libvorbis.a
+/usr/lib/libvorbis.so
+/usr/bin/vorbis-config
%clean
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT