echo "$ac_t""no" 1>&6
fi
+# Extract the first word of "install", so it can be a program name with args.
+set dummy install; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:918: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_INSTALL'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$INSTALL"; then
+ ac_cv_prog_INSTALL="$INSTALL" # Let the user override the test.
+else
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
+ ac_dummy="$PATH"
+ for ac_dir in $ac_dummy; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ ac_cv_prog_INSTALL="install"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+INSTALL="$ac_cv_prog_INSTALL"
+if test -n "$INSTALL"; then
+ echo "$ac_t""$INSTALL" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
if test -z "$GCC"; then
case $host in
case $host in
*-*-linux*)
DEBUG="-g -Wall -D_REENTRANT -D__NO_MATH_INLINES -fsigned-char"
- OPT="-O20 -ffast-math -D_REENTRANT -D__NO_MATH_INLINES -fsigned-char"
- PROFILE="-pg -g -O20 -D_REENTRANT -D__NO_MATH_INLINES -fsigned-char";;
+ OPT="-O20 -ffast-math -D_REENTRANT -fsigned-char"
+ PROFILE="-pg -g -O20 -ffast-math -D_REENTRANT -fsigned-char";;
sparc-sun-*)
DEBUG="-g -Wall -D__NO_MATH_INLINES -fsigned-char -mv8"
OPT="-O20 -ffast-math -D__NO_MATH_INLINES -fsigned-char -mv8"
fi
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:953: checking how to run the C preprocessor" >&5
+echo "configure:982: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
-#line 968 "configure"
+#line 997 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:974: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1003: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
-#line 985 "configure"
+#line 1014 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:991: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1020: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
rm -rf conftest*
CPP="${CC-cc} -nologo -E"
cat > conftest.$ac_ext <<EOF
-#line 1002 "configure"
+#line 1031 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1008: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1037: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
echo "$ac_t""$CPP" 1>&6
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:1033: checking for ANSI C header files" >&5
+echo "configure:1062: checking for ANSI C header files" >&5
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1038 "configure"
+#line 1067 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1046: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1075: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 1063 "configure"
+#line 1092 "configure"
#include "confdefs.h"
#include <string.h>
EOF
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 1081 "configure"
+#line 1110 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
:
else
cat > conftest.$ac_ext <<EOF
-#line 1102 "configure"
+#line 1131 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
exit (0); }
EOF
-if { (eval echo configure:1113: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1142: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
:
else
echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
-echo "configure:1141: checking for pthread_create in -lpthread" >&5
+echo "configure:1170: checking for pthread_create in -lpthread" >&5
ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lpthread $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1149 "configure"
+#line 1178 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
pthread_create()
; return 0; }
EOF
-if { (eval echo configure:1160: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1189: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
#fi
echo $ac_n "checking size of short""... $ac_c" 1>&6
-echo "configure:1229: checking size of short" >&5
+echo "configure:1258: checking size of short" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
-#line 1237 "configure"
+#line 1266 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
exit(0);
}
EOF
-if { (eval echo configure:1248: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1277: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_sizeof_short=`cat conftestval`
else
echo $ac_n "checking size of int""... $ac_c" 1>&6
-echo "configure:1268: checking size of int" >&5
+echo "configure:1297: checking size of int" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
-#line 1276 "configure"
+#line 1305 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
exit(0);
}
EOF
-if { (eval echo configure:1287: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1316: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_sizeof_int=`cat conftestval`
else
echo $ac_n "checking size of long""... $ac_c" 1>&6
-echo "configure:1307: checking size of long" >&5
+echo "configure:1336: checking size of long" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
-#line 1315 "configure"
+#line 1344 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
exit(0);
}
EOF
-if { (eval echo configure:1326: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1355: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_sizeof_long=`cat conftestval`
else
echo $ac_n "checking size of long long""... $ac_c" 1>&6
-echo "configure:1346: checking size of long long" >&5
+echo "configure:1375: checking size of long long" >&5
if eval "test \"`echo '$''{'ac_cv_sizeof_long_long'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
-#line 1354 "configure"
+#line 1383 "configure"
#include "confdefs.h"
#include <stdio.h>
main()
exit(0);
}
EOF
-if { (eval echo configure:1365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1394: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_sizeof_long_long=`cat conftestval`
else
esac
echo $ac_n "checking for int16_t""... $ac_c" 1>&6
-echo "configure:1403: checking for int16_t" >&5
+echo "configure:1432: checking for int16_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_int16_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1408 "configure"
+#line 1437 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
fi
echo $ac_n "checking for int32_t""... $ac_c" 1>&6
-echo "configure:1436: checking for int32_t" >&5
+echo "configure:1465: checking for int32_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_int32_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1441 "configure"
+#line 1470 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
fi
echo $ac_n "checking for int64_t""... $ac_c" 1>&6
-echo "configure:1469: checking for int64_t" >&5
+echo "configure:1498: checking for int64_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_int64_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1474 "configure"
+#line 1503 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
fi
echo $ac_n "checking for u_int16_t""... $ac_c" 1>&6
-echo "configure:1502: checking for u_int16_t" >&5
+echo "configure:1531: checking for u_int16_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_u_int16_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1507 "configure"
+#line 1536 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
fi
echo $ac_n "checking for u_int32_t""... $ac_c" 1>&6
-echo "configure:1535: checking for u_int32_t" >&5
+echo "configure:1564: checking for u_int32_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_u_int32_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1540 "configure"
+#line 1569 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
fi
echo $ac_n "checking for u_int64_t""... $ac_c" 1>&6
-echo "configure:1568: checking for u_int64_t" >&5
+echo "configure:1597: checking for u_int64_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_u_int64_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1573 "configure"
+#line 1602 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
fi
echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
-echo "configure:1612: checking for sys/wait.h that is POSIX.1 compatible" >&5
+echo "configure:1641: checking for sys/wait.h that is POSIX.1 compatible" >&5
if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1617 "configure"
+#line 1646 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/wait.h>
s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
; return 0; }
EOF
-if { (eval echo configure:1633: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1662: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_header_sys_wait_h=yes
else
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1657: checking for $ac_hdr" >&5
+echo "configure:1686: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1662 "configure"
+#line 1691 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1667: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1696: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:1695: checking for working const" >&5
+echo "configure:1724: checking for working const" >&5
if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1700 "configure"
+#line 1729 "configure"
#include "confdefs.h"
int main() {
/* Ultrix mips cc rejects this. */
-typedef int charset[2]; const charset x;
+typedef int charset[2]; const charset x = {0,0};
/* SunOS 4.1.1 cc rejects this. */
char const *const *ccp;
char **p;
; return 0; }
EOF
-if { (eval echo configure:1749: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1778: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_const=yes
else
fi
echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
-echo "configure:1770: checking whether time.h and sys/time.h may both be included" >&5
+echo "configure:1799: checking whether time.h and sys/time.h may both be included" >&5
if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1775 "configure"
+#line 1804 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/time.h>
struct tm *tp;
; return 0; }
EOF
-if { (eval echo configure:1784: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1813: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_header_time=yes
else
fi
echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
-echo "configure:1805: checking whether struct tm is in sys/time.h or time.h" >&5
+echo "configure:1834: checking whether struct tm is in sys/time.h or time.h" >&5
if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1810 "configure"
+#line 1839 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <time.h>
struct tm *tp; tp->tm_sec;
; return 0; }
EOF
-if { (eval echo configure:1818: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1847: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_struct_tm=time.h
else
echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:1840: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "configure:1869: checking whether ${MAKE-make} sets \${MAKE}" >&5
set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
fi
echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
-echo "configure:1867: checking for 8-bit clean memcmp" >&5
+echo "configure:1896: checking for 8-bit clean memcmp" >&5
if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_cv_func_memcmp_clean=no
else
cat > conftest.$ac_ext <<EOF
-#line 1875 "configure"
+#line 1904 "configure"
#include "confdefs.h"
main()
}
EOF
-if { (eval echo configure:1885: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:1914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_func_memcmp_clean=yes
else
test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
-echo "configure:1903: checking return type of signal handlers" >&5
+echo "configure:1932: checking return type of signal handlers" >&5
if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1908 "configure"
+#line 1937 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <signal.h>
int i;
; return 0; }
EOF
-if { (eval echo configure:1925: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1954: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_type_signal=void
else
for ac_func in gettimeofday select strcspn strerror strspn sigaction
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1946: checking for $ac_func" >&5
+echo "configure:1975: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1951 "configure"
+#line 1980 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:1974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
s%@CC@%$CC%g
s%@RANLIB@%$RANLIB%g
s%@AR@%$AR%g
+s%@INSTALL@%$INSTALL%g
s%@CPP@%$CPP%g
s%@SET_MAKE@%$SET_MAKE%g
s%@LIBOBJS@%$LIBOBJS%g
--- /dev/null
+/********************************************************************
+ * *
+ * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. *
+ * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY *
+ * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. *
+ * PLEASE READ THESE TERMS DISTRIBUTING. *
+ * *
+ * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-2000 *
+ * by Monty <monty@xiph.org> and The XIPHOPHORUS Company *
+ * http://www.xiph.org/ *
+ * *
+ ********************************************************************
+
+ function: simple example decoder using vorbisfile
+ last mod: $Id: vorbisfile_example.c,v 1.1 2000/06/19 10:05:57 xiphmont Exp $
+
+ ********************************************************************/
+
+/* Takes a vorbis bitstream from stdin and writes raw stereo PCM to
+ stdout using vorbisfile. Using vorbisfile is much simpler than
+ dealing with libvorbis. */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <math.h>
+#include "vorbis/codec.h"
+#include "vorbis/vorbisfile.h"
+
+#ifdef _WIN32 /* We need the following two to set stdin/stdout to binary */
+#include <io.h>
+#include <fcntl.h>
+#endif
+
+char pcmout[4096]; /* take 4k out of the data segment, not the stack */
+
+int main(int argc, char **argv){
+ OggVorbis_File vf;
+ int eof=0;
+ int current_section;
+
+#ifdef _WIN32 /* We need to set stdin/stdout to binary mode. Damn windows. */
+ /* Beware the evil ifdef. We avoid these where we can, but this one we
+ cannot. Don't add any more, you'll probably go to hell if you do. */
+ _setmode( _fileno( stdin ), _O_BINARY );
+ _setmode( _fileno( stdout ), _O_BINARY );
+#endif
+
+ if(ov_open(stdin, &vf, NULL, 0) < 0) {
+ fprintf(stderr,"Input does not appear to be an Ogg bitstream.\n");
+ exit(1);
+ }
+
+ /* Throw the comments plus a few lines about the bitstream we're
+ decoding */
+ {
+ char **ptr=ov_comment(&vf,-1)->user_comments;
+ vorbis_info *vi=ov_info(&vf,-1);
+ while(*ptr){
+ fprintf(stderr,"%s\n",*ptr);
+ ++ptr;
+ }
+ fprintf(stderr,"\nBitstream is %d channel, %ldHz\n",vi->channels,vi->rate);
+ fprintf(stderr,"Encoded by: %s\n\n",ov_comment(&vf,-1)->vendor);
+ }
+
+ while(!eof){
+ long ret=ov_read(&vf,pcmout,sizeof(pcmout),0,2,1,¤t_section);
+ switch(ret){
+ case 0:
+ /* EOF */
+ eof=1;
+ break;
+ case -1:
+ /* error in the stream. Not a problem, just reporting it in
+ case we (the app) cares. In this case, we don't. */
+ break;
+ default:
+ /* we don't bother dealing with sample rate changes, etc, but
+ you'll have to*/
+ fwrite(pcmout,1,ret,stdout);
+ break;
+ }
+ }
+
+ /* cleanup */
+ ov_clear(&vf);
+
+ fprintf(stderr,"Done.\n");
+ return(0);
+}
+
********************************************************************
function: psychoacoustics not including preecho
- last mod: $Id: psy.c,v 1.22 2000/06/18 12:33:47 xiphmont Exp $
+ last mod: $Id: psy.c,v 1.23 2000/06/19 10:05:57 xiphmont Exp $
********************************************************************/
}
}
-static double _eights[EHMER_MAX+1]={
- .2394004745,.2610680627,.2846967347,.3104639837,
- .3385633673,.3692059617,.4026219471,.4390623367,
- .4788008625,.5221360312,.5693933667,.6209278553,
- .6771266124,.7384117901,.8052437489,.8781245150,
- .9576015522,1.0442718740,1.1387865279,1.2418554865,
- 1.3542529803,1.4768233137,1.6104872070,1.7562487129,
- 1.9152027587,2.0885433709,2.2775726445,2.4837105245,
- 2.7085054716,2.9536460940,3.2209738324,3.5124967917,
- 3.8304048259,4.1770859876,4.5551444666,4.9674201522,
- 5.4170099651,5.9072911215,6.4419465017,7.0249923150,
- 7.6608082685,8.3541704668,9.1102872884,9.9348385106,
- 10.8340179740,11.8145801099,12.8838906772,14.0499820932,
- 15.3216137706,16.7083379167,18.2205712869,19.8696734335,
- 21.6680320357,23.6291559533,25.7677767018,28.0999591127,
- 30.6432220084};
-
-static void seed_curve(double *flr,
- double **curves,
- double amp,double specmax,
- int x,int n,double specatt){
+static long _eights[EHMER_MAX+1]={
+ 981,1069,1166,1272,
+ 1387,1512,1649,1798,
+ 1961,2139,2332,2543,
+ 2774,3025,3298,3597,
+ 3922,4277,4664,5087,
+ 5547,6049,6597,7194,
+ 7845,8555,9329,10173,
+ 11094,12098,13193,14387,
+ 15689,17109,18658,20347,
+ 22188,24196,26386,28774,
+ 31379,34219,37316,40693,
+ 44376,48393,52772,57549,
+ 62757,68437,74631,81386,
+ 88752,96785,105545,115097,
+ 125515};
+
+static int seed_curve(double *flr,
+ double **curves,
+ double amp,double specmax,
+ int x,int n,double specatt,
+ int maxEH){
int i;
- int prevx=x*_eights[0]+.5;
- int nextx;
/* make this attenuation adjustable */
int choice=(int)((todB(amp)-specmax+specatt)/10.-1.5);
choice=max(choice,0);
choice=min(choice,8);
- for(i=0;i<EHMER_MAX;i++){
- if(prevx<n){
- double lin=curves[choice][i];
- nextx=x*_eights[i+1]+.5;
- nextx=(nextx<n?nextx:n);
- if(lin){
- lin*=amp;
- if(prevx<0){
- if(nextx>=0){
- flr[0]=max(flr[0],lin);
- }
- }else{
- flr[prevx]=max(flr[prevx],lin);
- }
- }
- prevx=nextx;
- }
- }
+ for(i=maxEH;i>=0;i--)
+ if(((x*_eights[i])>>12)<n)break;
+ maxEH=i;
+
+ for(;i>=0;i--)
+ if(curves[choice][i]>0.)break;
+
+ for(;i>=0;i--){
+ double lin=curves[choice][i];
+ if(lin>0.){
+ double *fp=flr+((x*_eights[i])>>12);
+ lin*=amp;
+ if(*fp<lin)*fp=lin;
+ }else break;
+ }
+ return(maxEH);
}
static void seed_peak(double *flr,
double *att,
double amp,double specmax,
int x,int n,double specatt){
- int prevx=x*_eights[16];
- int nextx=x*_eights[17];
+ int prevx=(x*_eights[16])>>12;
+ int nextx=(x*_eights[17])>>12;
/* make this attenuation adjustable */
int choice=rint((todB(amp)-specmax+specatt)/20.)-1;
double specmax){
vorbis_info_psy *vi=p->vi;
long n=p->n,i;
-
+ int maxEH=EHMER_MAX-1;
+
/* prime the working vector with peak values */
/* Use the 125 Hz curve up to 125 Hz and 8kHz curve after 8kHz. */
for(i=0;i<n;i++)
if(f[i]>flr[i])
- seed_curve(flr,curves[p->octave[i]],f[i],
- specmax,i,n,vi->max_curve_dB);
+ maxEH=seed_curve(flr,curves[p->octave[i]],f[i],
+ specmax,i,n,vi->max_curve_dB,maxEH);
}
static void seed_att(vorbis_look_psy *p,
for(i=0;i<n;i++){
/* not exactly correct, (the center frequency should be centered
on a *log* scale), but not worth quibbling */
- long newhi=i*_eights[17]+noiseBIAS;
- long newlo=i*_eights[15]-noiseBIAS;
+ long newhi=((i*_eights[17])>>12)+noiseBIAS;
+ long newlo=((i*_eights[15])>>12)-noiseBIAS;
if(newhi>n)newhi=n;
for(;lo<newlo;lo++)