]> git.sesse.net Git - vlc/commitdiff
* configure.ac: update for newer speex + workaround a libxml2 problem on OSX.
authorGildas Bazin <gbazin@videolan.org>
Tue, 7 Dec 2004 19:46:45 +0000 (19:46 +0000)
committerGildas Bazin <gbazin@videolan.org>
Tue, 7 Dec 2004 19:46:45 +0000 (19:46 +0000)
* modules/codec/speex.c: update for newer speex.

configure.ac
modules/codec/speex.c

index a75d469e64db0bc1ba6b8206d89c367b6bb3fd06..c5b8e72a8438eca29b4df24170d75eb5038c8f39 100644 (file)
@@ -450,7 +450,7 @@ AC_CHECK_LIB(m,pow,[
   VLC_ADD_LDFLAGS([ffmpeg ffmpegaltivec stream_out_transrate i420_rgb faad toolame equalizer vlc],[-lm])
 ])
 AC_CHECK_LIB(m,sqrt,[
-  VLC_ADD_LDFLAGS([headphone_channel_mixer normvol],[-lm])
+  VLC_ADD_LDFLAGS([headphone_channel_mixer normvol speex],[-lm])
 ])
 fi # end "${SYS}" != "mingw32"
 
@@ -2442,19 +2442,15 @@ AC_ARG_ENABLE(speex,
   [  --enable-speex          Speex decoder support (default enabled)])
 if test "${enable_speex}" != "no"
 then
-  AC_CHECK_HEADERS(speex.h, [
-    AC_MSG_CHECKING(for libspeex version > 1.1.0)
-    AC_EGREP_CPP(yes,
-      [#include <speex.h>
-       #ifdef SPEEX_SET_SUBMODE_ENCODING
-       yes
-       #endif],
-      [ AC_MSG_RESULT([yes])
-        VLC_ADD_PLUGINS([speex])
-        VLC_ADD_LDFLAGS([speex],[-lspeex]) ],
+  AC_CHECK_HEADERS(speex/speex.h, [
+    LDFLAGS="${LDFLAGS_save} ${LDFLAGS_toolame}"
+    AC_CHECK_LIB(speex, speex_decode_int, [
+      VLC_ADD_PLUGINS([speex])
+      VLC_ADD_LDFLAGS([speex],[-lspeex]) ],
       [ AC_MSG_RESULT([no])
         AC_MSG_WARN([Your libspeex is too old, please get the development
-                     version.]) ] )
+                     version.]) ],[])
+    LDFLAGS="${LDFLAGS_save}"
     ],[])
 fi
 
@@ -2875,14 +2871,22 @@ then
     VLC_ADD_CPPFLAGS([xml],[`${XML2_CONFIG} --cflags`])
     VLC_ADD_LDFLAGS([xml],[`${XML2_CONFIG} --libs`])
     dnl depends on the xmlTextReader extension
+    CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_xml}"
     LDFLAGS="${LDFLAGS_save} ${LDFLAGS_xml}"
     AC_CHECK_LIB(xml2,xmlTextReaderConstName,[
-      VLC_ADD_PLUGINS([xml]) ],[
+      AC_EGREP_HEADER(xmlTextReaderConstName,libxml/xmlreader.h,[
+        VLC_ADD_PLUGINS([xml]) ],[
+          AC_MSG_WARN([libxml2 missing the xmlTextReader extension, you should update your version])
+          if test "${enable_xml2}" = "yes"; then
+            AC_MSG_ERROR([libxml2 missing the xmlTextReader extension])
+          fi])
+       ],[
       AC_MSG_WARN([libxml2 missing the xmlTextReader extension, you should update your version])
       if test "${enable_xml2}" = "yes"; then
         AC_MSG_ERROR([libxml2 missing the xmlTextReader extension])
       fi])
     LDFLAGS="${LDFLAGS_save}"
+    CPPFLAGS="${CPPFLAGS_save}"
   else
     if test "${enable_xml2}" = "yes"; then
       AC_MSG_ERROR([Could not find libxml2])
index fd36bd71b68ae189d8c97db3443f5b49eb9f3558..2cdeb3002396e01c8ba4cbc9a779e04c66707861 100755 (executable)
 #include <vlc/input.h>
 
 #include <ogg/ogg.h>
-#include <speex.h>
-#include "speex_header.h"
-#include "speex_stereo.h"
-#include "speex_callbacks.h"
+#include <speex/speex.h>
+#include <speex/speex_header.h>
+#include <speex/speex_stereo.h>
+#include <speex/speex_callbacks.h>
 
 /*****************************************************************************
  * decoder_sys_t : speex decoder descriptor