[ooo-build-commit] .: bin/setup.in configure.in

Miklos Vajna vmiklos at kemper.freedesktop.org
Wed Aug 4 02:43:21 PDT 2010


 bin/setup.in |   15 +++++++++++++++
 configure.in |   19 +++++++++++++++++++
 2 files changed, 34 insertions(+)

New commits:
commit 83f7c6d6d0b9ca288a47d0f03952ab5992203d64
Author: Miklos Vajna <vmiklos at frugalware.org>
Date:   Tue Aug 3 17:05:17 2010 +0200

    Add distcc support
    
    * bin/setup.in: add distcc to $CC / $CXX if requested
    * configure.in: check for distcc

diff --git a/bin/setup.in b/bin/setup.in
index 4715143..bacd43c 100755
--- a/bin/setup.in
+++ b/bin/setup.in
@@ -21,6 +21,7 @@ APPLY_DIR='@APPLY_DIR@'
 BUILD_NCPUS='@BUILD_NCPUS@'
 ENABLE_CCACHE='@ENABLE_CCACHE@'
 ENABLE_ICECREAM='@ENABLE_ICECREAM@'
+ENABLE_DISTCC='@ENABLE_DISTCC@'
 ICECREAM_BINDIR='@ICECREAM_BINDIR@'
 MAX_JOBS='@MAX_JOBS@'
 export OOO_BUILD_NOARCH='@OOO_BUILD_NOARCH@'
@@ -230,6 +231,15 @@ if test "z$CCACHE_DIR" = "z" ; then
     CCACHE_DIR=$BUILDDIR/.ccache
 fi
 
+if test "z$ENABLE_DISTCC" != "z" ; then
+	CC="distcc gcc"; export CC
+	CXX="distcc g++"; export CXX
+	if test "z$ENABLE_CCACHE" != "z" ; then
+		CC="ccache $CC"; export CC
+		CXX="ccache $CXX"; export CXX
+	fi
+fi
+
 # how to mark config files in file lists
 if test "z$VENDORNAME" = "zNovell" -o "z$VENDORNAME" = "zRedHat"; then
     RPM_CONFIG_FILE_TAGS="%config"
@@ -361,6 +371,11 @@ if test "$ENABLE_ICECREAM" = "yes"; then
 else
     echo " icecream:   no"
 fi
+if test "$ENABLE_DISTCC" = "yes"; then
+    echo " distcc:     yes"
+else
+    echo " distcc:     no"
+fi
 if test "$MAX_JOBS" -gt 1; then
    echo " Max number of jobs to run in parallel is '$MAX_JOBS'"
 fi
diff --git a/configure.in b/configure.in
index ba581a4..1a6a4c8 100644
--- a/configure.in
+++ b/configure.in
@@ -228,6 +228,7 @@ AC_ARG_WITH(gcc-speedup,
 			  ccache (caching results of previous compilation) and
 			  icecream (distributed compiling tool) are supported.
 			  Both can be used at the same time.
+			  You can also choose distcc instead of icecream.
 
 			  Example: --with-gcc-speedup=ccache,icecream],
 ,)
@@ -755,9 +756,14 @@ fi
 AC_SUBST(BUILD_NCPUS)
 
 AC_CHECK_PROG(CCACHE, ccache, yes)
+AC_CHECK_PROG(DISTCC, distcc, yes)
 
 ENABLE_CCACHE=""
 ENABLE_ICECREAM=""
+ENABLE_DISTCC=""
+if test "z`echo "$with_gcc_speedup"|grep icecream |grep distcc`" != "z"; then
+            AC_MSG_ERROR([icecream and distcc are mutually exclusive])
+fi
 for enable_speedup in `echo "$with_gcc_speedup" | sed 's/,/ /g'`
 do
     if test "$enable_speedup" = "ccache"; then
@@ -768,10 +774,17 @@ do
        fi
     elif test "$enable_speedup" = "icecream"; then
         ENABLE_ICECREAM="yes"
+    elif test "$enable_speedup" = "distcc"; then
+        if test "$DISTCC" != "yes"; then
+            AC_MSG_ERROR([distcc not found, but set in --with-gcc-speedup])
+        else
+            ENABLE_DISTCC="yes" 
+       fi
     fi
 done
 AC_SUBST(ENABLE_CCACHE)
 AC_SUBST(ENABLE_ICECREAM)
+AC_SUBST(ENABLE_DISTCC)
 
 ICECREAM_BINDIR="/opt/icecream/bin"
 if test "z$with_icecream_bindir" != "z"; then
@@ -1789,6 +1802,11 @@ if test "$ENABLE_ICECREAM" = "yes"; then
 else
     icecream_message="no"
 fi
+if test "$ENABLE_DISTCC" = "yes"; then
+    distcc_message="yes"
+else
+    distcc_message="no"
+fi
 if test "$MAX_JOBS" -gt 1; then
     max_job_message="'$MAX_JOBS'"
 else
@@ -1826,6 +1844,7 @@ Building openoffice
 	ooo-install-dir:    $OOOINSTALLDIRNAME
 	ccache:             $ccache_message
 	icecream:           $icecream_message
+	distcc:             $distcc_message
 	max jobs:           $max_job_message
 	cairo:              $cairo_enabled
 	build type:         $build_product build


More information about the ooo-build-commit mailing list