Moved all the includes from /usr/include to /usr/include/speex
authorjm <jm@0101bb08-14d6-0310-b084-bc0e0c8e3800>
Wed, 14 Jul 2004 03:50:57 +0000 (03:50 +0000)
committerjm <jm@0101bb08-14d6-0310-b084-bc0e0c8e3800>
Wed, 14 Jul 2004 03:50:57 +0000 (03:50 +0000)
git-svn-id: http://svn.xiph.org/trunk/speex@7113 0101bb08-14d6-0310-b084-bc0e0c8e3800

40 files changed:
Makefile.am
configure.in
include/Makefile.am [new file with mode: 0644]
include/speex/Makefile.am [new file with mode: 0644]
include/speex/speex.h [moved from libspeex/speex.h with 100% similarity]
include/speex/speex_bits.h [moved from libspeex/speex_bits.h with 100% similarity]
include/speex/speex_callbacks.h [moved from libspeex/speex_callbacks.h with 100% similarity]
include/speex/speex_echo.h [moved from libspeex/speex_echo.h with 100% similarity]
include/speex/speex_header.h [moved from libspeex/speex_header.h with 100% similarity]
include/speex/speex_jitter.h [moved from libspeex/speex_jitter.h with 100% similarity]
include/speex/speex_noglobals.h [moved from libspeex/speex_noglobals.h with 100% similarity]
include/speex/speex_preprocess.h [moved from libspeex/speex_preprocess.h with 100% similarity]
include/speex/speex_stereo.h [moved from libspeex/speex_stereo.h with 100% similarity]
libspeex/Makefile.am
libspeex/bits.c
libspeex/cb_search.h
libspeex/jitter.c
libspeex/ltp.c
libspeex/ltp.h
libspeex/mdf.c
libspeex/misc.h
libspeex/modes.h
libspeex/nb_celp.c
libspeex/nb_celp.h
libspeex/preprocess.c
libspeex/quant_lsp.h
libspeex/sb_celp.h
libspeex/speex_callbacks.c
libspeex/speex_header.c
libspeex/stereo.c
libspeex/testdenoise.c
libspeex/testecho.c
libspeex/testenc.c
libspeex/testenc_uwb.c
libspeex/testenc_wb.c
speex.m4 [new file with mode: 0644]
speex.pc.in [new file with mode: 0644]
src/Makefile.am
src/speexdec.c
src/speexenc.c

index f75622b..95c15dc 100644 (file)
@@ -3,12 +3,18 @@
 # Disable automatic dependency tracking if using other tools than gcc and gmake
 #AUTOMAKE_OPTIONS = no-dependencies
 
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = speex.pc
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = speex.pc
+
 EXTRA_DIST = Speex.spec Speex.spec.in Speex.kdevelop
 
 #Fools KDevelop into including all files
-SUBDIRS = libspeex @src@ doc win32
+SUBDIRS = libspeex include @src@ doc win32
 
-DIST_SUBDIRS = libspeex src doc win32
+DIST_SUBDIRS = libspeex include src doc win32
 
 rpm: dist
        rpmbuild -ta ${PACKAGE}-${VERSION}.tar.gz
index 6acc200..34e1dd9 100644 (file)
@@ -1,6 +1,6 @@
 dnl Process this file with autoconf to produce a configure script. -*-m4-*-
 
-AC_INIT(libspeex/speex.h)
+AC_INIT(libspeex/speex.c)
 
 SPEEX_MAJOR_VERSION=1
 SPEEX_MINOR_VERSION=1
@@ -21,6 +21,8 @@ AC_SUBST(SPEEX_LT_AGE)
 VERSION=$SPEEX_VERSION
 PACKAGE=speex
 
+AC_SUBST(SPEEX_VERSION)
+
 AM_INIT_AUTOMAKE($PACKAGE, $VERSION, no-define)
 AM_MAINTAINER_MODE
 
@@ -95,6 +97,7 @@ AM_CONDITIONAL(DISABLE_GLOBAL_POINTERS, [test "x$noglobals" = "xyes"])
 dnl Output the makefiles and version.h.
 
 AC_OUTPUT([Makefile libspeex/Makefile src/Makefile doc/Makefile Speex.spec
+           include/Makefile include/speex/Makefile speex.pc
            win32/Makefile win32/libspeex/Makefile win32/speexenc/Makefile
            win32/speexdec/Makefile ])
 
diff --git a/include/Makefile.am b/include/Makefile.am
new file mode 100644 (file)
index 0000000..09613b6
--- /dev/null
@@ -0,0 +1,2 @@
+
+SUBDIRS = speex
diff --git a/include/speex/Makefile.am b/include/speex/Makefile.am
new file mode 100644 (file)
index 0000000..c616236
--- /dev/null
@@ -0,0 +1,13 @@
+# Disable automatic dependency tracking if using other tools than gcc and gmake
+#AUTOMAKE_OPTIONS = no-dependencies
+
+pkginclude_HEADERS =  speex.h \
+       speex_bits.h \
+       speex_header.h \
+       speex_callbacks.h \
+       speex_stereo.h \
+       speex_preprocess.h \
+       speex_jitter.h \
+       speex_echo.h \
+       speex_noglobals.h
+
similarity index 100%
rename from libspeex/speex.h
rename to include/speex/speex.h
index d194ff7..f9a4fe7 100644 (file)
@@ -4,6 +4,8 @@
 
 EXTRA_DIST=testenc.c testenc_wb.c testenc_uwb.c testdenoise.c testecho.c
 
+INCLUDES = -I$(top_srcdir)/include
+
 lib_LTLIBRARIES = libspeex.la
 
 if DISABLE_GLOBAL_POINTERS
@@ -49,17 +51,6 @@ libspeex_la_SOURCES = nb_celp.c \
        jitter.c \
        mdf.c
 
-
-include_HEADERS =  speex.h \
-       speex_bits.h \
-       speex_header.h \
-       speex_callbacks.h \
-       speex_stereo.h \
-       speex_preprocess.h \
-       speex_jitter.h \
-       speex_echo.h \
-       speex_noglobals.h
-
 noinst_HEADERS = lsp.h \
        nb_celp.h \
        lpc.h \
index 09416c0..3212e26 100644 (file)
@@ -32,7 +32,7 @@
 
 */
 
-#include "speex_bits.h"
+#include <speex/speex_bits.h>
 #include "misc.h"
 
 /** Maximum size of the bit-stream (for fixed-size allocation) */
index 8d831cf..d703831 100644 (file)
@@ -1,5 +1,5 @@
 /* Copyright (C) 2002 Jean-Marc Valin & David Rowe
-   File: cb_search.c
+   File: cb_search.h
    Overlapped codebook search
 
    Redistribution and use in source and binary forms, with or without
@@ -33,7 +33,7 @@
 #ifndef CB_SEARCH_H
 #define CB_SEARCH_H
 
-#include "speex_bits.h"
+#include <speex/speex_bits.h>
 #include "misc.h"
 
 typedef struct split_cb_params {
index ca9a4ff..272b735 100644 (file)
@@ -36,9 +36,9 @@
 #define NULL 0
 #endif
 
-#include "speex.h"
-#include "speex_bits.h"
-#include "speex_jitter.h"
+#include <speex/speex.h>
+#include <speex/speex_bits.h>
+#include <speex/speex_jitter.h>
 #include <stdio.h>
 
 #define LATE_BINS 4
index db2faa4..877dc9e 100644 (file)
@@ -34,7 +34,7 @@
 #include "ltp.h"
 #include "stack_alloc.h"
 #include "filters.h"
-#include "speex_bits.h"
+#include <speex/speex_bits.h>
 #include "math_approx.h"
 
 #include <stdio.h>
index 802f35e..7ffc82d 100644 (file)
@@ -30,7 +30,7 @@
    SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
 
-#include "speex_bits.h"
+#include <speex/speex_bits.h>
 #include "misc.h"
 
 typedef struct ltp_params {
index 549c95d..0da0ada 100644 (file)
@@ -35,7 +35,7 @@
 */
 
 #include "misc.h"
-#include "speex_echo.h"
+#include <speex/speex_echo.h>
 #include "smallft.h"
 #include <math.h>
 /*#include <stdio.h>*/
index f51e1c2..c004f55 100644 (file)
@@ -37,8 +37,8 @@
 
 #ifndef SPEEX_VERSION
 #define SPEEX_MAJOR_VERSION 1
-#define SPEEX_MAJOR_VERSION 1
-#define SPEEX_MAJOR_VERSION 6
+#define SPEEX_MINOR_VERSION 1
+#define SPEEX_MICRO_VERSION 6
 #define SPEEX_EXTRA_VERSION ""
 #define SPEEX_VERSION "speex-1.1.6"
 #endif
index 5d2f5a4..672f3ae 100644 (file)
@@ -36,8 +36,8 @@
 #ifndef MODES_H
 #define MODES_H
 
-#include "speex.h"
-#include "speex_bits.h"
+#include <speex/speex.h>
+#include <speex/speex_bits.h>
 #include "misc.h"
 
 #define NB_SUBMODES 16
index 294a67c..e9b7b0a 100644 (file)
 #include "filters.h"
 #include "stack_alloc.h"
 #include "vq.h"
-#include "speex_bits.h"
+#include <speex/speex_bits.h>
 #include "vbr.h"
 #include "misc.h"
-#include "speex_callbacks.h"
+#include <speex/speex_callbacks.h>
 
 #include <stdio.h>
 
index 583c9e0..129abb4 100644 (file)
@@ -37,8 +37,8 @@
 #define NB_CELP_H
 
 #include "modes.h"
-#include "speex_bits.h"
-#include "speex_callbacks.h"
+#include <speex/speex_bits.h>
+#include <speex/speex_callbacks.h>
 #include "vbr.h"
 #include "filters.h"
 
index 4cbf2d6..10881b9 100644 (file)
@@ -32,7 +32,7 @@
 */
 
 #include <math.h>
-#include "speex_preprocess.h"
+#include <speex/speex_preprocess.h>
 #include "misc.h"
 #include "smallft.h"
 
index 12bdddf..dc2828e 100644 (file)
@@ -33,7 +33,7 @@
 #ifndef QUANT_LSP_H
 #define QUANT_LSP_H
 
-#include "speex_bits.h"
+#include <speex/speex_bits.h>
 #include "misc.h"
 
 #define MAX_LSP_SIZE 20
index 705727e..b812a2e 100644 (file)
@@ -37,7 +37,7 @@
 #define SB_CELP_H
 
 #include "modes.h"
-#include "speex_bits.h"
+#include <speex/speex_bits.h>
 #include "nb_celp.h"
 
 /**Structure representing the full state of the sub-band encoder*/
index 3b48696..fb234eb 100644 (file)
@@ -32,7 +32,7 @@
 
 */
 
-#include "speex_callbacks.h"
+#include <speex/speex_callbacks.h>
 #include "misc.h"
 
 int speex_inband_handler(SpeexBits *bits, SpeexCallback *callback_list, void *state)
index 8899170..2cd7f50 100644 (file)
@@ -31,9 +31,9 @@
 
 */
 
-#include "speex_header.h"
+#include <speex/speex_header.h>
 #include "misc.h"
-#include "speex.h"
+#include <speex/speex.h>
 
 #ifndef NULL
 #define NULL 0
index 97ec41a..cc2ed2e 100644 (file)
@@ -29,8 +29,8 @@
    SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
 
-#include "speex_stereo.h"
-#include "speex_callbacks.h"
+#include <speex/speex_stereo.h>
+#include <speex/speex_callbacks.h>
 #include "vq.h"
 #include <math.h>
 
index 0944976..8c50d42 100644 (file)
@@ -1,4 +1,4 @@
-#include "speex_preprocess.h"
+#include <speex/speex_preprocess.h>
 #include <stdio.h>
 
 #define NN 160
index 02db805..65fec57 100644 (file)
@@ -1,11 +1,11 @@
-#include "speex_echo.h"
+#include <speex/speex_echo.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
 #include <unistd.h>
-#include "speex_preprocess.h"
+#include <speex/speex_preprocess.h>
 
 #define NN 160
 
index 4bcc20f..3c8f2cd 100644 (file)
@@ -1,7 +1,7 @@
-#include "speex.h"
+#include <speex/speex.h>
 #include <stdio.h>
 #include <stdlib.h>
-#include "speex_callbacks.h"
+#include <speex/speex_callbacks.h>
 
 #ifdef FIXED_DEBUG
 extern long long spx_mips;
index fdb6636..e4dfcf7 100644 (file)
@@ -1,7 +1,7 @@
-#include "speex.h"
+#include <speex/speex.h>
 #include <stdio.h>
 #include <stdlib.h>
-#include "speex_callbacks.h"
+#include <speex/speex_callbacks.h>
 
 #ifdef FIXED_DEBUG
 extern long long spx_mips;
index d1fca50..46846ff 100644 (file)
@@ -1,7 +1,7 @@
-#include "speex.h"
+#include <speex/speex.h>
 #include <stdio.h>
 #include <stdlib.h>
-#include "speex_callbacks.h"
+#include <speex/speex_callbacks.h>
 
 #ifdef FIXED_DEBUG
 extern long long spx_mips;
diff --git a/speex.m4 b/speex.m4
new file mode 100644 (file)
index 0000000..b0ddfc3
--- /dev/null
+++ b/speex.m4
@@ -0,0 +1,104 @@
+# Configure paths for libspeex
+# Jean-Marc Valin <jean-marc.valin@usherbrooke.ca>
+# Shamelessly stolen from:
+# Jack Moffitt <jack@icecast.org> 10-21-2000
+# Shamelessly stolen from Owen Taylor and Manish Singh
+
+dnl XIPH_PATH_SPEEX([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
+dnl Test for libspeex, and define SPEEX_CFLAGS and SPEEX_LIBS
+dnl
+AC_DEFUN(XIPH_PATH_SPEEX,
+[dnl 
+dnl Get the cflags and libraries
+dnl
+AC_ARG_WITH(speex,[  --with-speex=PFX   Prefix where libspeex is installed (optional)], speex_prefix="$withval", speex_prefix="")
+AC_ARG_WITH(speex-libraries,[  --with-speex-libraries=DIR   Directory where libspeex library is installed (optional)], speex_libraries="$withval", speex_libraries="")
+AC_ARG_WITH(speex-includes,[  --with-speex-includes=DIR   Directory where libspeex header files are installed (optional)], speex_includes="$withval", speex_includes="")
+AC_ARG_ENABLE(speextest, [  --disable-speextest       Do not try to compile and run a test Speex program],, enable_speextest=yes)
+
+  if test "x$speex_libraries" != "x" ; then
+    SPEEX_LIBS="-L$speex_libraries"
+  elif test "x$speex_prefix" != "x" ; then
+    SPEEX_LIBS="-L$speex_prefix/lib"
+  elif test "x$prefix" != "xNONE" ; then
+    SPEEX_LIBS="-L$prefix/lib"
+  fi
+
+  SPEEX_LIBS="$SPEEX_LIBS -lspeex"
+
+  if test "x$speex_includes" != "x" ; then
+    SPEEX_CFLAGS="-I$speex_includes"
+  elif test "x$speex_prefix" != "x" ; then
+    SPEEX_CFLAGS="-I$speex_prefix/include"
+  elif test "x$prefix" != "xNONE"; then
+    SPEEX_CFLAGS="-I$prefix/include"
+  fi
+
+  AC_MSG_CHECKING(for Speex)
+  no_speex=""
+
+
+  if test "x$enable_speextest" = "xyes" ; then
+    ac_save_CFLAGS="$CFLAGS"
+    ac_save_LIBS="$LIBS"
+    CFLAGS="$CFLAGS $SPEEX_CFLAGS"
+    LIBS="$LIBS $SPEEX_LIBS"
+dnl
+dnl Now check if the installed Speex is sufficiently new.
+dnl
+      rm -f conf.speextest
+      AC_TRY_RUN([
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <speex/speex.h>
+
+int main ()
+{
+  system("touch conf.speextest");
+  return 0;
+}
+
+],, no_speex=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
+       CFLAGS="$ac_save_CFLAGS"
+       LIBS="$ac_save_LIBS"
+  fi
+
+  if test "x$no_speex" = "x" ; then
+     AC_MSG_RESULT(yes)
+     ifelse([$1], , :, [$1])     
+  else
+     AC_MSG_RESULT(no)
+     if test -f conf.speextest ; then
+       :
+     else
+       echo "*** Could not run Speex test program, checking why..."
+       CFLAGS="$CFLAGS $SPEEX_CFLAGS"
+       LIBS="$LIBS $SPEEX_LIBS"
+       AC_TRY_LINK([
+#include <stdio.h>
+#include <speex/speex.h>
+],     [ return 0; ],
+       [ echo "*** The test program compiled, but did not run. This usually means"
+       echo "*** that the run-time linker is not finding Speex or finding the wrong"
+       echo "*** version of Speex. If it is not finding Speex, 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 Speex was incorrectly installed"
+       echo "*** or that you have moved Speex since it was installed." ])
+       CFLAGS="$ac_save_CFLAGS"
+       LIBS="$ac_save_LIBS"
+     fi
+     SPEEX_CFLAGS=""
+     SPEEX_LIBS=""
+     ifelse([$2], , :, [$2])
+  fi
+  AC_SUBST(SPEEX_CFLAGS)
+  AC_SUBST(SPEEX_LIBS)
+  rm -f conf.speextest
+])
diff --git a/speex.pc.in b/speex.pc.in
new file mode 100644 (file)
index 0000000..c7d4cae
--- /dev/null
@@ -0,0 +1,14 @@
+# libogg pkg-config source file
+
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: speex
+Description: Speex is an audio codec tuned for speech
+Version: @SPEEX_VERSION@
+Requires: ogg
+Conflicts:
+Libs: -L${libdir} -lspeex
+Cflags: -I${includedir}
index fa9c9da..08ba645 100644 (file)
@@ -5,7 +5,7 @@
 # Disable automatic dependency tracking if using other tools than gcc and gmake
 #AUTOMAKE_OPTIONS = no-dependencies
 
-INCLUDES = -I$(top_srcdir)/libspeex $(OGG_INCLUDES)
+INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/libspeex $(OGG_INCLUDES)
 
 mandir = $(prefix)/share/man
 man_MANS = speexenc.1 speexdec.1
index a656f44..c011eb4 100644 (file)
@@ -40,8 +40,8 @@
 #include <stdlib.h>
 #include <string.h>
 
-#include "speex.h"
-#include "ogg/ogg.h"
+#include <speex/speex.h>
+#include <ogg/ogg.h>
 
 #if defined WIN32 || defined _WIN32
 #include <windows.h>
@@ -77,9 +77,9 @@
 
 #include <string.h>
 #include "wav_io.h"
-#include "speex_header.h"
-#include "speex_stereo.h"
-#include "speex_callbacks.h"
+#include <speex/speex_header.h>
+#include <speex/speex_stereo.h>
+#include <speex/speex_callbacks.h>
 #include "misc.h"
 
 #define MAX_FRAME_SIZE 2000
index 1b1b2ad..4ef10b0 100644 (file)
 #include <string.h>
 #include <time.h>
 
-#include "speex.h"
+#include <speex/speex.h>
 #include <ogg/ogg.h>
 #include "wav_io.h"
-#include "speex_header.h"
-#include "speex_stereo.h"
+#include <speex/speex_header.h>
+#include <speex/speex_stereo.h>
 #include "misc.h"
-#include "speex_preprocess.h"
+#include <speex/speex_preprocess.h>
 
 #if defined WIN32 || defined _WIN32
 #include "getopt_win.h"