Skip to content

Commit 5e1fb90

Browse files
author
Monty
committed
Merge branch_beta3 onto the mainline. Monty svn path=/trunk/vorbis/; revision=990
1 parent 3241b24 commit 5e1fb90

File tree

221 files changed

+6718
-2813
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

221 files changed

+6718
-2813
lines changed

.cvsignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ configure
1111
.libs
1212
.deps
1313
*.ogg
14+
vorbis-config

Makefile.am

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@ AUTOMAKE_OPTIONS = foreign dist-zip
44

55
SUBDIRS = lib include doc examples
66

7-
EXTRA_DIST = README COPYING todo.txt libvorbis.spec
7+
m4datadir = $(datadir)/aclocal
8+
m4data_DATA = vorbis.m4
9+
10+
EXTRA_DIST = README COPYING todo.txt libvorbis.spec vorbis.m4
811

912
debug:
1013
$(MAKE) all CFLAGS="@DEBUG@"

acinclude.m4

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
# acinclude.m4
2+
# all .m4 files needed that might not be installed go here
3+
4+
# ogg.m4
5+
# Configure paths for libogg
6+
# Jack Moffitt <[email protected]> 10-21-2000
7+
# Shamelessly stolen from Owen Taylor and Manish Singh
8+
9+
dnl AM_PATH_OGG([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
10+
dnl Test for libogg, and define OGG_CFLAGS and OGG_LIBS
11+
dnl
12+
AC_DEFUN(AM_PATH_OGG,
13+
[dnl
14+
dnl Get the cflags and libraries
15+
dnl
16+
AC_ARG_WITH(ogg-prefix,[ --with-ogg-prefix=PFX Prefix where libogg is installed (optional)], ogg_prefix="$withval", ogg_prefix="")
17+
AC_ARG_ENABLE(oggtest, [ --disable-oggtest Do not try to compile and run a test Ogg program],, enable_oggtest=yes)
18+
19+
if test x$ogg_prefix != x ; then
20+
ogg_args="$ogg_args --prefix=$ogg_prefix"
21+
OGG_CFLAGS="-I$ogg_prefix/include"
22+
OGG_LIBS="-L$ogg_prefix/lib"
23+
fi
24+
25+
OGG_LIBS="$OGG_LIBS -logg"
26+
27+
AC_MSG_CHECKING(for Ogg)
28+
no_ogg=""
29+
30+
31+
if test "x$enable_oggtest" = "xyes" ; then
32+
ac_save_CFLAGS="$CFLAGS"
33+
ac_save_LIBS="$LIBS"
34+
CFLAGS="$CFLAGS $OGG_CFLAGS"
35+
LIBS="$LIBS $OGG_LIBS"
36+
dnl
37+
dnl Now check if the installed Ogg is sufficiently new.
38+
dnl
39+
rm -f conf.oggtest
40+
AC_TRY_RUN([
41+
#include <stdio.h>
42+
#include <stdlib.h>
43+
#include <string.h>
44+
#include <ogg/ogg.h>
45+
46+
int main ()
47+
{
48+
system("touch conf.oggtest");
49+
return 0;
50+
}
51+
52+
],, no_ogg=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
53+
CFLAGS="$ac_save_CFLAGS"
54+
LIBS="$ac_save_LIBS"
55+
fi
56+
57+
if test "x$no_ogg" = x ; then
58+
AC_MSG_RESULT(yes)
59+
ifelse([$1], , :, [$1])
60+
else
61+
AC_MSG_RESULT(no)
62+
if test -f conf.oggtest ; then
63+
:
64+
else
65+
echo "*** Could not run Ogg test program, checking why..."
66+
CFLAGS="$CFLAGS $OGG_CFLAGS"
67+
LIBS="$LIBS $OGG_LIBS"
68+
AC_TRY_LINK([
69+
#include <stdio.h>
70+
#include <ogg/ogg.h>
71+
], [ return 0; ],
72+
[ echo "*** The test program compiled, but did not run. This usually means"
73+
echo "*** that the run-time linker is not finding Ogg or finding the wrong"
74+
echo "*** version of Ogg. If it is not finding Ogg, you'll need to set your"
75+
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
76+
echo "*** to the installed location Also, make sure you have run ldconfig if that"
77+
echo "*** is required on your system"
78+
echo "***"
79+
echo "*** If you have an old version installed, it is best to remove it, although"
80+
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
81+
[ echo "*** The test program failed to compile or link. See the file config.log for the"
82+
echo "*** exact error that occured. This usually means Ogg was incorrectly installed"
83+
echo "*** or that you have moved Ogg since it was installed. In the latter case, you"
84+
echo "*** may want to edit the ogg-config script: $OGG_CONFIG" ])
85+
CFLAGS="$ac_save_CFLAGS"
86+
LIBS="$ac_save_LIBS"
87+
fi
88+
OGG_CFLAGS=""
89+
OGG_LIBS=""
90+
ifelse([$2], , :, [$2])
91+
fi
92+
AC_SUBST(OGG_CFLAGS)
93+
AC_SUBST(OGG_LIBS)
94+
rm -f conf.oggtest
95+
])

configure.in

Lines changed: 10 additions & 124 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,18 @@ V_LIB_AGE=0
1515
VF_LIB_CURRENT=0
1616
VF_LIB_REVISION=0
1717
VF_LIB_AGE=0
18+
VE_LIB_CURRENT=0
19+
VE_LIB_REVISION=0
20+
VE_LIB_AGE=0
1821
AC_SUBST(V_LIB_CURRENT)
1922
AC_SUBST(V_LIB_REVISION)
2023
AC_SUBST(V_LIB_AGE)
2124
AC_SUBST(VF_LIB_CURRENT)
2225
AC_SUBST(VF_LIB_REVISION)
2326
AC_SUBST(VF_LIB_AGE)
27+
AC_SUBST(VE_LIB_CURRENT)
28+
AC_SUBST(VE_LIB_REVISION)
29+
AC_SUBST(VE_LIB_AGE)
2430

2531
dnl --------------------------------------------------
2632
dnl Check for programs
@@ -34,12 +40,6 @@ CFLAGS="$cflags_save"
3440

3541
AM_PROG_LIBTOOL
3642

37-
dnl --------------------------------------------------
38-
dnl Additional arguments
39-
dnl --------------------------------------------------
40-
41-
AC_ARG_WITH(ogg, [ --with-ogg=DIR Set where the Ogg library is located])
42-
4343
dnl --------------------------------------------------
4444
dnl Set build flags based on environment
4545
dnl --------------------------------------------------
@@ -73,8 +73,8 @@ else
7373
*86-*-linux*)
7474
DEBUG="-g -Wall -D_REENTRANT -D__NO_MATH_INLINES -fsigned-char"
7575
CFLAGS="-O20 -ffast-math -mno-ieee-fp -D_REENTRANT -fsigned-char"
76-
# PROFILE="-Wall -W -pg -O20 -ffast-math -D_REENTRANT -fsigned-char -fno-inline -static"
77-
PROFILE="-Wall -W -pg -O20 -ffast-math -mno-ieee-fp -D_REENTRANT -fsigned-char -fno-inline -static"
76+
# PROFILE="-Wall -W -pg -g -O20 -ffast-math -D_REENTRANT -fsigned-char -fno-inline -static"
77+
PROFILE="-Wall -W -pg -g -O20 -ffast-math -mno-ieee-fp -D_REENTRANT -fsigned-char -fno-inline -static"
7878

7979
# glibc < 2.1.3 has a serious FP bug in the math inline header
8080
# that will cripple Vorbis. Look to see if the magic FP stack
@@ -130,116 +130,6 @@ else
130130
esac
131131
fi
132132

133-
AC_HEADER_STDC
134-
135-
AC_CHECK_LIB(pthread, pthread_create, pthread_lib="-lpthread")
136-
137-
dnl This seems to be the only way to make autoconf only *sometimes* configure
138-
dnl a subdirectory with AC_CONFIG_SUBDIRS. "__noconf" is assumed to not
139-
dnl exist as a directory, so configure won't try to recursively enter it, unless
140-
dnl the shell variable $dummy is reset to an existing directory inside the
141-
dnl if clause.
142-
143-
dummy="__noconf"
144-
145-
# check macro modified from Jon Shiring's to compensate for autoconf's lagging
146-
# behind the times on type madness
147-
148-
AC_MSG_CHECKING(for int16_t)
149-
AC_CACHE_VAL(has_int16_t,
150-
[AC_TRY_RUN([
151-
#ifdef __BEOS__
152-
#include <inttypes.h>
153-
#endif
154-
#include <sys/types.h>
155-
int16_t foo;
156-
int main() {return 0;}
157-
],
158-
has_int16_t=yes,
159-
has_int16_t=no,
160-
has_int16_t=no
161-
)])
162-
AC_MSG_RESULT($has_int16_t)
163-
164-
AC_MSG_CHECKING(for int32_t)
165-
AC_CACHE_VAL(has_int32_t,
166-
[AC_TRY_RUN([
167-
#ifdef __BEOS__
168-
#include <inttypes.h>
169-
#endif
170-
#include <sys/types.h>
171-
int32_t foo;
172-
int main() {return 0;}
173-
],
174-
has_int32_t=yes,
175-
has_int32_t=no,
176-
has_int32_t=no
177-
)])
178-
AC_MSG_RESULT($has_int32_t)
179-
180-
AC_MSG_CHECKING(for uint32_t)
181-
AC_CACHE_VAL(has_uint32_t,
182-
[AC_TRY_RUN([
183-
#ifdef __BEOS__
184-
#include <inttypes.h>
185-
#endif
186-
#include <sys/types.h>
187-
uint32_t foo;
188-
int main() {return 0;}
189-
],
190-
has_uint32_t=yes,
191-
has_uint32_t=no,
192-
has_uint32_t=no
193-
)])
194-
AC_MSG_RESULT($has_uint32_t)
195-
196-
AC_MSG_CHECKING(for u_int32_t)
197-
AC_CACHE_VAL(has_u_int32_t,
198-
[AC_TRY_RUN([
199-
#ifdef __BEOS__
200-
#include <inttypes.h>
201-
#endif
202-
#include <sys/types.h>
203-
u_int32_t foo;
204-
int main() {return 0;}
205-
],
206-
has_u_int32_t=yes,
207-
has_u_int32_t=no,
208-
has_u_int32_t=no
209-
)])
210-
AC_MSG_RESULT($has_u_int32_t)
211-
212-
AC_MSG_CHECKING(for int64_t)
213-
AC_CACHE_VAL(has_int64_t,
214-
[AC_TRY_RUN([
215-
#ifdef __BEOS__
216-
#include <inttypes.h>
217-
#endif
218-
#include <sys/types.h>
219-
int64_t foo;
220-
int main() {return 0;}
221-
],
222-
has_int64_t=yes,
223-
has_int64_t=no,
224-
has_int64_t=no
225-
)])
226-
AC_MSG_RESULT($has_int64_t)
227-
228-
AC_CHECK_SIZEOF(short)
229-
AC_CHECK_SIZEOF(int)
230-
AC_CHECK_SIZEOF(long)
231-
AC_CHECK_SIZEOF(long long)
232-
233-
234-
if test x$has_int16_t = "xyes" ; then
235-
SIZE16="int16_t"
236-
else
237-
case 2 in
238-
$ac_cv_sizeof_short) SIZE16="short";;
239-
$ac_cv_sizeof_int) SIZE16="int";;
240-
esac
241-
fi
242-
243133
dnl --------------------------------------------------
244134
dnl Check for headers
245135
dnl --------------------------------------------------
@@ -259,11 +149,7 @@ dnl --------------------------------------------------
259149
AC_CHECK_LIB(m, cos, LIBS="-lm", LIBS="")
260150
AC_CHECK_LIB(pthread, pthread_create, pthread_lib="-lpthread", :)
261151

262-
dnl Check for libogg
263-
if test -n $with_ogg; then
264-
CFLAGS="$CFLAGS -I$with_ogg/include -L$with_ogg/lib"
265-
fi
266-
AC_CHECK_LIB(ogg, oggpack_read, LIBS="$LIBS -logg", AC_MSG_ERROR([You must have libogg to compile vorbis!!!]))
152+
AM_PATH_OGG(have_ogg=yes, have_ogg=no)
267153

268154
dnl --------------------------------------------------
269155
dnl Check for library functions
@@ -280,4 +166,4 @@ AC_SUBST(DEBUG)
280166
AC_SUBST(PROFILE)
281167
AC_SUBST(pthread_lib)
282168

283-
AC_OUTPUT(Makefile lib/Makefile doc/Makefile include/Makefile include/vorbis/Makefile include/vorbis/book/Makefile examples/Makefile)
169+
AC_OUTPUT(Makefile lib/Makefile lib/modes/Makefile lib/books/Makefile doc/Makefile doc/vorbisfile/Makefile include/Makefile include/vorbis/Makefile examples/Makefile)

doc/Makefile.am

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22

33
AUTOMAKE_OPTIONS = foreign
44

5-
docdir = $(datadir)/$(PACKAGE)-$(VERSION)
5+
SUBDIRS = vorbisfile
6+
7+
docdir = $(datadir)/doc/$(PACKAGE)-$(VERSION)
68

79
doc_DATA = v-comment.html vorbisword2.png white-ogg.png programming.html\
810
vorbis.html wait.png white-xifish.png

0 commit comments

Comments
 (0)