File boost-jam-jam0_use_passed_cflags.diff of Package boost-jam

Index: build.jam
===================================================================
--- build.jam.orig	2012-04-26 05:35:55.000000000 +0200
+++ build.jam	2012-08-24 14:55:36.707948644 +0200
@@ -209,7 +209,7 @@ toolset darwin cc :  "-o " : -D
 ## GCC 2.x, 3.x, 4.x
 toolset gcc gcc : "-o " : -D
     : -pedantic -fno-strict-aliasing
-    [ opt --release : [ opt --symbols : -g : -s ] -O3 ]
+    [ opt --release : [ opt --symbols : -g : -s ] $(CFLAGS) ]
     [ opt --debug : -g -O0 -fno-inline ]
     [ opt --profile : -O3 -g -pg ]
     -I$(--python-include) -I$(--extra-include) -Wno-long-long
Index: build.sh
===================================================================
--- build.sh.orig	2012-08-24 14:54:12.848938541 +0200
+++ build.sh	2012-08-24 14:58:25.225953453 +0200
@@ -12,7 +12,7 @@ BOOST_JAM_TOOLSET=
 echo_run ()
 {
     echo "$@"
-    $@
+    eval "$@"
     r=$?
     if test $r -ne 0 ; then
         exit $r
@@ -299,5 +299,9 @@ if test -x "./bootstrap/jam0" ; then
     if test "${BJAM_UPDATE}" != "update" ; then
         echo_run ./bootstrap/jam0 -f build.jam --toolset=$BOOST_JAM_TOOLSET "--toolset-root=$BOOST_JAM_TOOLSET_ROOT" "$@" clean
     fi
-    echo_run ./bootstrap/jam0 -f build.jam --toolset=$BOOST_JAM_TOOLSET "--toolset-root=$BOOST_JAM_TOOLSET_ROOT" "$@"
+    if test -z "$BOOST_JAM_TOOLSET_ROOT"; then
+        echo_run ./bootstrap/jam0 -f build.jam --toolset=$BOOST_JAM_TOOLSET "$@"
+    else
+        echo_run ./bootstrap/jam0 -f build.jam --toolset=$BOOST_JAM_TOOLSET "--toolset-root=$BOOST_JAM_TOOLSET_ROOT" "$@"
+    fi
 fi