changeset 16913:57610089c932

Allow detection of theora without pkg-config and linking against internal tremor ogg functions instead of external ogg lib.
author reimar
date Sat, 05 Nov 2005 09:57:13 +0000
parents 4dea8b8f3b65
children 701af802aee7
files configure
diffstat 1 files changed, 8 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/configure	Sat Nov 05 04:56:23 2005 +0000
+++ b/configure	Sat Nov 05 09:57:13 2005 +0000
@@ -5392,7 +5392,6 @@
 echocheck "OggTheora support"
 if test "$_theora" = auto ; then
   _theora=no
-  if ( pkg-config --exists 'theora' ) >> "$TMPLOG" 2>&1 ; then
     cat > $TMPC << EOF
 #include <theora/theora.h>
 #include <string.h>
@@ -5427,16 +5426,22 @@
   return 0;
 }
 EOF
-    cc_check `pkg-config --libs --cflags theora` && _theora=yes
+  for _ld_theora in "`pkg-config --silence-errors --libs --cflags theora`" "-ltheora"; do
+    cc_check $_ld_theora && _theora=yes && break
+  done
+  if test "$_theora" = no && test "$_tremor_internal" = yes; then
+    for _ld_theora in "`pkg-config --silence-errors --libs --cflags theora`" "-ltheora"; do
+      cc_check -I. tremor/bitwise.c $_ld_theora && _theora=yes && break
+    done
   fi
 fi
 if test "$_theora" = yes ; then
   _def_theora='#define HAVE_OGGTHEORA 1'
   _codecmodules="libtheora $_codecmodules"
-  _ld_theora=`pkg-config --libs --cflags theora`
 else
   _def_theora='#undef HAVE_OGGTHEORA'
   _nocodecmodules="libtheora $_nocodecmodules"
+  _ld_theora=""
 fi
 echores "$_theora"