[Scummvm-cvs-logs] CVS: scummvm configure,1.55,1.56

Jonathan Gray khalek at users.sourceforge.net
Mon Jan 12 18:24:01 CET 2004


Update of /cvsroot/scummvm/scummvm
In directory sc8-pr-cvs1:/tmp/cvs-serv22463

Modified Files:
	configure 
Log Message:
add autodetection for libmpeg2, while it checks for 0.4.0 and up it doesn't warn the user to upgrade if they have an older version just disables

Index: configure
===================================================================
RCS file: /cvsroot/scummvm/scummvm/configure,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -d -r1.55 -r1.56
--- configure	12 Jan 2004 11:10:30 -0000	1.55
+++ configure	13 Jan 2004 02:23:37 -0000	1.56
@@ -29,7 +29,7 @@
 _mad=auto
 _alsa=auto
 _zlib=auto
-_mpeg2=no
+_mpeg2=auto
 # default option behaviour yes/no
 _build_scumm=yes
 _build_simon=yes
@@ -189,7 +189,8 @@
   --disable-mad            disable libmad (MP3) support [autodetect]
   --with-zlib-prefix=PFX   Prefix where zlib is installed (optional)
   --disable-zlib           disable zlib (compression) support [autodetect]
-  --enable-mpeg2           enable mpeg2 codec for cutscenes [disabled]
+  --disable-mpeg2          disable mpeg2 codec for cutscenes [autodetect]
+  --with-mpeg2-prefix=PFX  Prefix where libmpeg2 is installed (optional)
  
 EOF
     exit 0
@@ -214,7 +215,12 @@
       --disable-mad)		_mad=no		;;
       --enable-zlib)		_zlib=yes	;;
       --disable-zlib)		_zlib=no	;;
-      --enable-mpeg2)           _mpeg2=yes      ;;
+      --disable-mpeg2)          _mpeg2=no       ;;
+      --with-mpeg2-prefix=*)
+	_prefix=`echo $ac_option | cut -d '=' -f 2`
+	MPEG2_CFLAGS="-I$_prefix/include"
+	MPEG2_LIBS="-L$_prefix/libs"
+        ;;
       --with-alsa-prefix=*)
 	_prefix=`echo $ac_option | cut -d '=' -f 2`
 	ALSA_CFLAGS="-I$_prefix/include"
@@ -562,14 +568,31 @@
 echo "$_zlib"
 
 echocheck "mpeg2"
+if test "$_mpeg2" = auto ; then
+  _mpeg2=no
+  cat > $TMPC << EOF
+#include <inttypes.h>
+#include <mpeg2dec/mpeg2.h>
+int main(void) { 
+	#ifdef MPEG2_RELEASE
+		if (MPEG2_RELEASE >= MPEG2_VERSION(0, 4, 0))
+			return 0;
+	#endif
+	return 1;
+}
+EOF
+  cc_check $LDFLAGS $CXXFLAGS $MPEG2_CFLAGS $MPEG2_LIBS -lmpeg2 && _mpeg2=yes
+fi
 if test "$_mpeg2" = yes ; then
   _def_mpeg2='#define USE_MPEG2'
-  LIBS="$LIBS -lmpeg2"
+  INCLUDES="$INCLUDES $MPEG2_CFLAGS"
+  LIBS="$LIBS $MPEG2_LIBS -lmpeg2"
+else
+  _def_mpeg2='#undef USE_MPEG2'
 fi
 echo "$_mpeg2"
 rm -f $TMPC $TMPO
 
-
 echo
 echo "Engines:"
 if test "$_build_scumm" = yes ; then





More information about the Scummvm-git-logs mailing list