[Scummvm-cvs-logs] SF.net SVN: scummvm:[50753] tools/branches/gsoc2010-decompiler

pidgeot at users.sourceforge.net pidgeot at users.sourceforge.net
Fri Jul 9 03:26:46 CEST 2010


Revision: 50753
          http://scummvm.svn.sourceforge.net/scummvm/?rev=50753&view=rev
Author:   pidgeot
Date:     2010-07-09 01:26:46 +0000 (Fri, 09 Jul 2010)

Log Message:
-----------
Add Boost check to configure scripts and only compile decompiler if
Boost detected and enabled (USE_BOOST).
Checks for earliest known Boost version to contain all used libraries
and verifies that Boost.ProgramOptions is compiled and linkable.

Modified Paths:
--------------
    tools/branches/gsoc2010-decompiler/Makefile.common
    tools/branches/gsoc2010-decompiler/configure

Modified: tools/branches/gsoc2010-decompiler/Makefile.common
===================================================================
--- tools/branches/gsoc2010-decompiler/Makefile.common	2010-07-09 01:08:15 UTC (rev 50752)
+++ tools/branches/gsoc2010-decompiler/Makefile.common	2010-07-09 01:26:46 UTC (rev 50753)
@@ -22,10 +22,12 @@
 # get the dependency tracking code working.
 MODULE_DIRS := ./ common/ gui/ sound/ 
 
+ifdef USE_BOOST
 MODULE_DIRS += \
 	decompiler/ \
 	decompiler/scummv6/ \
 	decompiler/test/disassembler/
+endif
 
 MODULE_DIRS += \
 	engines/agos/ \
@@ -62,8 +64,12 @@
 	extract_mohawk$(EXEEXT) \
 	construct_mohawk$(EXEEXT) \
 	degob$(EXEEXT) \
-	scummvm-tools-cli$(EXEEXT) \
+	scummvm-tools-cli$(EXEEXT)
+
+ifdef USE_BOOST
+TARGETS += \
 	decompile$(EXEEXT)
+endif
 
 ifdef USE_FREETYPE
 ifdef USE_ICONV
@@ -261,6 +267,7 @@
 	$(tools_OBJS)
 scummvm-tools-cli_LIBS := $(LIBS)
 
+ifdef USE_BOOST
 decompile_OBJS := \
 	common/file.o \
 	decompiler/decompiler.o \
@@ -276,6 +283,7 @@
 
 # Decompiler tests
 -include decompiler/test/module.mk
+endif
 
 # Decompiler documentation
 doc:

Modified: tools/branches/gsoc2010-decompiler/configure
===================================================================
--- tools/branches/gsoc2010-decompiler/configure	2010-07-09 01:08:15 UTC (rev 50752)
+++ tools/branches/gsoc2010-decompiler/configure	2010-07-09 01:26:46 UTC (rev 50753)
@@ -78,6 +78,7 @@
 _wxwidgets=auto
 _freetype=auto
 _iconv=auto
+_boost=auto
 _endian=unknown
 _need_memalign=no
 # Default option behaviour yes/no
@@ -321,6 +322,9 @@
 
   --disable-freetype       disable freetype (Japanese font) support [autodetect]
 
+  --with-boost-prefix      Prefix where Boost is installed (optional)
+  --disable-boost          disable Boost support [autodetect]
+
 Some influential environment variables:
   LDFLAGS        linker flags, e.g. -L<lib dir> if you have libraries in a
                  nonstandard directory <lib dir>
@@ -354,6 +358,8 @@
 	--disable-freetype)       _freetype=no    ;;
 	--enable-iconv)           _iconv=yes      ;;
 	--disable-iconv)          _iconv=no       ;;
+	--enable-boost)           _boost=yes      ;;
+	--disable-boost)          _boost=no       ;;
 	--enable-verbose-build)   _verbose_build=yes ;;
 	--with-ogg-prefix=*)
 		arg=`echo $ac_option | cut -d '=' -f 2`
@@ -394,6 +400,11 @@
 		arg=`echo $ac_option | cut -d '=' -f 2`
 		_wxpath="$arg:$arg/bin"
 		;;
+	--with-boost-prefix=*)
+		arg=`echo $ac_option | cut -d '=' -f 2`
+		BOOST_CFLAGS="-I$arg/include"
+		BOOST_LIBS="-L$arg/lib"
+		;;
 	--enable-debug)
 		_debug_build=yes
 		;;
@@ -989,6 +1000,33 @@
 echo "$freetype_version"
 
 #
+# Check for Boost
+#
+echocheck "Boost => 1.32.0"
+if test "$_boost" = auto ; then
+	_boost=no
+	cat > $TMPC << EOF
+#include <iostream>
+#include <boost/version.hpp>
+int main(void) { if (BOOST_VERSION < 103200) return 1; return 0; }
+EOF
+	cc_check $BOOST_CFLAGS $BOOST_LIBS && _boost=yes
+fi
+echo "$_boost"
+
+if test "$_boost" = yes ; then
+	_boost=no
+	echo_n "Checking whether Boost.ProgramOptions has been compiled... "
+	cat > $TMPC << EOF
+#include <boost/program_options.hpp>
+int main(void) { boost::program_options::options_description generic("Generic options"); return 0; }
+EOF
+	cc_check $BOOST_CFLAGS $BOOST_LIBS -lboost_program_options && _boost=yes
+	add_to_config_mk_if_yes "$_boost" 'USE_BOOST = 1'
+	echo "$_boost"
+fi	
+
+#
 # Check for iconv
 #
 echo_n "Checking whether iconv.h is present... "


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list