common/autoconf/build-performance.m4

changeset 972
f3697e0783e2
parent 971
584dc2e95e04
parent 839
174a54ce39c4
child 1133
50aaf272884f
child 2203
28b247535e18
     1.1 --- a/common/autoconf/build-performance.m4	Thu Sep 12 12:29:17 2013 -0700
     1.2 +++ b/common/autoconf/build-performance.m4	Tue Nov 05 17:33:48 2013 -0800
     1.3 @@ -25,81 +25,80 @@
     1.4  
     1.5  AC_DEFUN([BPERF_CHECK_CORES],
     1.6  [
     1.7 -    AC_MSG_CHECKING([for number of cores])
     1.8 -    NUM_CORES=1
     1.9 -    FOUND_CORES=no
    1.10 -    
    1.11 -    if test -f /proc/cpuinfo; then
    1.12 -        # Looks like a Linux (or cygwin) system
    1.13 -        NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
    1.14 -        FOUND_CORES=yes
    1.15 -    elif test -x /usr/sbin/psrinfo; then
    1.16 -        # Looks like a Solaris system
    1.17 -        NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
    1.18 -        FOUND_CORES=yes
    1.19 -    elif test -x /usr/sbin/system_profiler; then
    1.20 -        # Looks like a MacOSX system
    1.21 -        NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print [$]5}'`
    1.22 -        FOUND_CORES=yes
    1.23 -    elif test "x$OPENJDK_BUILD_OS" = xaix ; then
    1.24 -        NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print [$]4 }'`
    1.25 -        FOUND_CORES=yes
    1.26 -    elif test -n "$NUMBER_OF_PROCESSORS"; then
    1.27 -        # On windows, look in the env
    1.28 -        NUM_CORES=$NUMBER_OF_PROCESSORS
    1.29 -        FOUND_CORES=yes
    1.30 -    fi
    1.31 +  AC_MSG_CHECKING([for number of cores])
    1.32 +  NUM_CORES=1
    1.33 +  FOUND_CORES=no
    1.34  
    1.35 -    if test "x$FOUND_CORES" = xyes; then
    1.36 -        AC_MSG_RESULT([$NUM_CORES])
    1.37 -    else
    1.38 -        AC_MSG_RESULT([could not detect number of cores, defaulting to 1])
    1.39 -        AC_MSG_WARN([This will disable all parallelism from build!])
    1.40 -    fi 
    1.41 +  if test -f /proc/cpuinfo; then
    1.42 +    # Looks like a Linux (or cygwin) system
    1.43 +    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
    1.44 +    FOUND_CORES=yes
    1.45 +  elif test -x /usr/sbin/psrinfo; then
    1.46 +    # Looks like a Solaris system
    1.47 +    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
    1.48 +    FOUND_CORES=yes
    1.49 +  elif test -x /usr/sbin/system_profiler; then
    1.50 +    # Looks like a MacOSX system
    1.51 +    NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print [$]5}'`
    1.52 +    FOUND_CORES=yes
    1.53 +  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
    1.54 +    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print [$]4 }'`
    1.55 +    FOUND_CORES=yes
    1.56 +  elif test -n "$NUMBER_OF_PROCESSORS"; then
    1.57 +    # On windows, look in the env
    1.58 +    NUM_CORES=$NUMBER_OF_PROCESSORS
    1.59 +    FOUND_CORES=yes
    1.60 +  fi
    1.61  
    1.62 +  if test "x$FOUND_CORES" = xyes; then
    1.63 +    AC_MSG_RESULT([$NUM_CORES])
    1.64 +  else
    1.65 +    AC_MSG_RESULT([could not detect number of cores, defaulting to 1])
    1.66 +    AC_MSG_WARN([This will disable all parallelism from build!])
    1.67 +  fi
    1.68  ])
    1.69  
    1.70  AC_DEFUN([BPERF_CHECK_MEMORY_SIZE],
    1.71  [
    1.72 -    AC_MSG_CHECKING([for memory size])
    1.73 -    # Default to 1024 MB
    1.74 -    MEMORY_SIZE=1024
    1.75 -    FOUND_MEM=no
    1.76 -    
    1.77 -    if test -f /proc/meminfo; then
    1.78 -        # Looks like a Linux (or cygwin) system
    1.79 -        MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print [$]2}'`
    1.80 -        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
    1.81 -        FOUND_MEM=yes
    1.82 -    elif test -x /usr/sbin/prtconf; then
    1.83 -        # Looks like a Solaris or AIX system
    1.84 -        MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [[Ss]]ize" | awk '{ print [$]3 }'`
    1.85 -        FOUND_MEM=yes
    1.86 -    elif test -x /usr/sbin/system_profiler; then
    1.87 -        # Looks like a MacOSX system
    1.88 -        MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print [$]2}'`
    1.89 -        MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
    1.90 -        FOUND_MEM=yes
    1.91 -    elif test "x$OPENJDK_BUILD_OS" = xwindows; then
    1.92 -        # Windows, but without cygwin
    1.93 -        MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
    1.94 -        MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
    1.95 -        FOUND_MEM=yes    
    1.96 -    fi
    1.97 +  AC_MSG_CHECKING([for memory size])
    1.98 +  # Default to 1024 MB
    1.99 +  MEMORY_SIZE=1024
   1.100 +  FOUND_MEM=no
   1.101  
   1.102 -    if test "x$FOUND_MEM" = xyes; then
   1.103 -        AC_MSG_RESULT([$MEMORY_SIZE MB])
   1.104 -    else
   1.105 -        AC_MSG_RESULT([could not detect memory size, defaulting to 1024 MB])
   1.106 -        AC_MSG_WARN([This might seriously impact build performance!])
   1.107 -    fi 
   1.108 +  if test -f /proc/meminfo; then
   1.109 +    # Looks like a Linux (or cygwin) system
   1.110 +    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print [$]2}'`
   1.111 +    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
   1.112 +    FOUND_MEM=yes
   1.113 +  elif test -x /usr/sbin/prtconf; then
   1.114 +    # Looks like a Solaris or AIX system
   1.115 +    MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [[Ss]]ize" | awk '{ print [$]3 }'`
   1.116 +    FOUND_MEM=yes
   1.117 +  elif test -x /usr/sbin/system_profiler; then
   1.118 +    # Looks like a MacOSX system
   1.119 +    MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print [$]2}'`
   1.120 +    MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
   1.121 +    FOUND_MEM=yes
   1.122 +  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
   1.123 +    # Windows, but without cygwin
   1.124 +    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
   1.125 +    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
   1.126 +    FOUND_MEM=yes
   1.127 +  fi
   1.128 +
   1.129 +  if test "x$FOUND_MEM" = xyes; then
   1.130 +    AC_MSG_RESULT([$MEMORY_SIZE MB])
   1.131 +  else
   1.132 +    AC_MSG_RESULT([could not detect memory size, defaulting to 1024 MB])
   1.133 +    AC_MSG_WARN([This might seriously impact build performance!])
   1.134 +  fi
   1.135  ])
   1.136  
   1.137  AC_DEFUN_ONCE([BPERF_SETUP_BUILD_CORES],
   1.138  [
   1.139    # How many cores do we have on this build system?
   1.140    AC_ARG_WITH(num-cores, [AS_HELP_STRING([--with-num-cores],
   1.141 -    [number of cores in the build system, e.g. --with-num-cores=8 @<:@probed@:>@])])
   1.142 +      [number of cores in the build system, e.g. --with-num-cores=8 @<:@probed@:>@])])
   1.143    if test "x$with_num_cores" = x; then
   1.144      # The number of cores were not specified, try to probe them.
   1.145      BPERF_CHECK_CORES
   1.146 @@ -113,7 +112,7 @@
   1.147  [
   1.148    # How much memory do we have on this build system?
   1.149    AC_ARG_WITH(memory-size, [AS_HELP_STRING([--with-memory-size],
   1.150 -    [memory (in MB) available in the build system, e.g. --with-memory-size=1024 @<:@probed@:>@])])
   1.151 +      [memory (in MB) available in the build system, e.g. --with-memory-size=1024 @<:@probed@:>@])])
   1.152    if test "x$with_memory_size" = x; then
   1.153      # The memory size was not specified, try to probe it.
   1.154      BPERF_CHECK_MEMORY_SIZE
   1.155 @@ -125,10 +124,10 @@
   1.156  
   1.157  AC_DEFUN_ONCE([BPERF_SETUP_BUILD_JOBS],
   1.158  [
   1.159 -  # Provide a decent default number of parallel jobs for make depending on 
   1.160 +  # Provide a decent default number of parallel jobs for make depending on
   1.161    # number of cores, amount of memory and machine architecture.
   1.162    AC_ARG_WITH(jobs, [AS_HELP_STRING([--with-jobs],
   1.163 -    [number of parallel jobs to let make run @<:@calculated based on cores and memory@:>@])])
   1.164 +      [number of parallel jobs to let make run @<:@calculated based on cores and memory@:>@])])
   1.165    if test "x$with_jobs" = x; then
   1.166      # Number of jobs was not specified, calculate.
   1.167      AC_MSG_CHECKING([for appropriate number of jobs to run in parallel])
   1.168 @@ -160,179 +159,178 @@
   1.169  
   1.170  AC_DEFUN([BPERF_SETUP_CCACHE],
   1.171  [
   1.172 -    AC_ARG_ENABLE([ccache],
   1.173 -	      [AS_HELP_STRING([--disable-ccache],
   1.174 -	      		      [disable using ccache to speed up recompilations @<:@enabled@:>@])],
   1.175 -              [ENABLE_CCACHE=${enable_ccache}], [ENABLE_CCACHE=yes])
   1.176 -    if test "x$ENABLE_CCACHE" = xyes; then
   1.177 -        OLD_PATH="$PATH"
   1.178 -        if test "x$TOOLS_DIR" != x; then
   1.179 -          PATH=$TOOLS_DIR:$PATH
   1.180 -        fi
   1.181 -        AC_PATH_PROG(CCACHE, ccache)
   1.182 -        PATH="$OLD_PATH"
   1.183 -    else
   1.184 -        AC_MSG_CHECKING([for ccache])
   1.185 -        AC_MSG_RESULT([explicitly disabled])    
   1.186 -        CCACHE=
   1.187 -    fi    
   1.188 -    AC_SUBST(CCACHE)
   1.189 +  AC_ARG_ENABLE([ccache],
   1.190 +      [AS_HELP_STRING([--disable-ccache],
   1.191 +      [disable using ccache to speed up recompilations @<:@enabled@:>@])],
   1.192 +      [ENABLE_CCACHE=${enable_ccache}], [ENABLE_CCACHE=yes])
   1.193 +  if test "x$ENABLE_CCACHE" = xyes; then
   1.194 +    OLD_PATH="$PATH"
   1.195 +    if test "x$TOOLS_DIR" != x; then
   1.196 +      PATH=$TOOLS_DIR:$PATH
   1.197 +    fi
   1.198 +    AC_PATH_PROG(CCACHE, ccache)
   1.199 +    PATH="$OLD_PATH"
   1.200 +  else
   1.201 +    AC_MSG_CHECKING([for ccache])
   1.202 +    AC_MSG_RESULT([explicitly disabled])
   1.203 +    CCACHE=
   1.204 +  fi
   1.205 +  AC_SUBST(CCACHE)
   1.206  
   1.207 -    AC_ARG_WITH([ccache-dir],
   1.208 -	      [AS_HELP_STRING([--with-ccache-dir],
   1.209 -	      		      [where to store ccache files @<:@~/.ccache@:>@])])
   1.210 +  AC_ARG_WITH([ccache-dir],
   1.211 +      [AS_HELP_STRING([--with-ccache-dir],
   1.212 +      [where to store ccache files @<:@~/.ccache@:>@])])
   1.213  
   1.214 -    if test "x$with_ccache_dir" != x; then
   1.215 -        # When using a non home ccache directory, assume the use is to share ccache files
   1.216 -        # with other users. Thus change the umask.
   1.217 -        SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
   1.218 -    fi
   1.219 -    CCACHE_FOUND=""
   1.220 -    if test "x$CCACHE" != x; then
   1.221 -        BPERF_SETUP_CCACHE_USAGE
   1.222 -    fi    
   1.223 +  if test "x$with_ccache_dir" != x; then
   1.224 +    # When using a non home ccache directory, assume the use is to share ccache files
   1.225 +    # with other users. Thus change the umask.
   1.226 +    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
   1.227 +  fi
   1.228 +  CCACHE_FOUND=""
   1.229 +  if test "x$CCACHE" != x; then
   1.230 +    BPERF_SETUP_CCACHE_USAGE
   1.231 +  fi
   1.232  ])
   1.233  
   1.234  AC_DEFUN([BPERF_SETUP_CCACHE_USAGE],
   1.235  [
   1.236 -    if test "x$CCACHE" != x; then
   1.237 -        CCACHE_FOUND="true"
   1.238 -        # Only use ccache if it is 3.1.4 or later, which supports
   1.239 -        # precompiled headers.
   1.240 -        AC_MSG_CHECKING([if ccache supports precompiled headers])
   1.241 -        HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.@<:@456789@:>@) 2> /dev/null`
   1.242 -        if test "x$HAS_GOOD_CCACHE" = x; then
   1.243 -            AC_MSG_RESULT([no, disabling ccache])
   1.244 -            CCACHE=
   1.245 -        else
   1.246 -            AC_MSG_RESULT([yes])
   1.247 -            AC_MSG_CHECKING([if C-compiler supports ccache precompiled headers])
   1.248 -            PUSHED_FLAGS="$CXXFLAGS"
   1.249 -            CXXFLAGS="-fpch-preprocess $CXXFLAGS"
   1.250 -            AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [])], [CC_KNOWS_CCACHE_TRICK=yes], [CC_KNOWS_CCACHE_TRICK=no])
   1.251 -            CXXFLAGS="$PUSHED_FLAGS"
   1.252 -            if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
   1.253 -                AC_MSG_RESULT([yes])
   1.254 -            else
   1.255 -                AC_MSG_RESULT([no, disabling ccaching of precompiled headers])
   1.256 -                CCACHE=
   1.257 -            fi
   1.258 -        fi
   1.259 +  if test "x$CCACHE" != x; then
   1.260 +    CCACHE_FOUND="true"
   1.261 +    # Only use ccache if it is 3.1.4 or later, which supports
   1.262 +    # precompiled headers.
   1.263 +    AC_MSG_CHECKING([if ccache supports precompiled headers])
   1.264 +    HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.@<:@456789@:>@) 2> /dev/null`
   1.265 +    if test "x$HAS_GOOD_CCACHE" = x; then
   1.266 +      AC_MSG_RESULT([no, disabling ccache])
   1.267 +      CCACHE=
   1.268 +    else
   1.269 +      AC_MSG_RESULT([yes])
   1.270 +      AC_MSG_CHECKING([if C-compiler supports ccache precompiled headers])
   1.271 +      PUSHED_FLAGS="$CXXFLAGS"
   1.272 +      CXXFLAGS="-fpch-preprocess $CXXFLAGS"
   1.273 +      AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [])], [CC_KNOWS_CCACHE_TRICK=yes], [CC_KNOWS_CCACHE_TRICK=no])
   1.274 +      CXXFLAGS="$PUSHED_FLAGS"
   1.275 +      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
   1.276 +        AC_MSG_RESULT([yes])
   1.277 +      else
   1.278 +        AC_MSG_RESULT([no, disabling ccaching of precompiled headers])
   1.279 +        CCACHE=
   1.280 +      fi
   1.281      fi
   1.282 +  fi
   1.283  
   1.284 -    if test "x$CCACHE" != x; then
   1.285 -        CCACHE_SLOPPINESS=time_macros
   1.286 -        CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
   1.287 -        CCACHE_FLAGS=-fpch-preprocess
   1.288 +  if test "x$CCACHE" != x; then
   1.289 +    CCACHE_SLOPPINESS=time_macros
   1.290 +    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
   1.291 +    CCACHE_FLAGS=-fpch-preprocess
   1.292  
   1.293 -        if test "x$SET_CCACHE_DIR" != x; then
   1.294 -            mkdir -p $CCACHE_DIR > /dev/null 2>&1
   1.295 -	    chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
   1.296 -        fi
   1.297 +    if test "x$SET_CCACHE_DIR" != x; then
   1.298 +      mkdir -p $CCACHE_DIR > /dev/null 2>&1
   1.299 +      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
   1.300      fi
   1.301 +  fi
   1.302  ])
   1.303  
   1.304  AC_DEFUN_ONCE([BPERF_SETUP_PRECOMPILED_HEADERS],
   1.305  [
   1.306 -       
   1.307 -###############################################################################
   1.308 -#
   1.309 -# Can the C/C++ compiler use precompiled headers?
   1.310 -#
   1.311 -AC_ARG_ENABLE([precompiled-headers], [AS_HELP_STRING([--disable-precompiled-headers],
   1.312 -	[disable using precompiled headers when compiling C++ @<:@enabled@:>@])],
   1.313 -    [ENABLE_PRECOMPH=${enable_precompiled_headers}], [ENABLE_PRECOMPH=yes])
   1.314  
   1.315 -USE_PRECOMPILED_HEADER=1
   1.316 -if test "x$ENABLE_PRECOMPH" = xno; then
   1.317 +  ###############################################################################
   1.318 +  #
   1.319 +  # Can the C/C++ compiler use precompiled headers?
   1.320 +  #
   1.321 +  AC_ARG_ENABLE([precompiled-headers], [AS_HELP_STRING([--disable-precompiled-headers],
   1.322 +      [disable using precompiled headers when compiling C++ @<:@enabled@:>@])],
   1.323 +      [ENABLE_PRECOMPH=${enable_precompiled_headers}], [ENABLE_PRECOMPH=yes])
   1.324 +
   1.325 +  USE_PRECOMPILED_HEADER=1
   1.326 +  if test "x$ENABLE_PRECOMPH" = xno; then
   1.327      USE_PRECOMPILED_HEADER=0
   1.328 -fi
   1.329 +  fi
   1.330  
   1.331 -if test "x$ENABLE_PRECOMPH" = xyes; then
   1.332 +  if test "x$ENABLE_PRECOMPH" = xyes; then
   1.333      # Check that the compiler actually supports precomp headers.
   1.334      if test "x$GCC" = xyes; then
   1.335 -         AC_MSG_CHECKING([that precompiled headers work])
   1.336 -         echo "int alfa();" > conftest.h
   1.337 -         $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&AS_MESSAGE_LOG_FD >&AS_MESSAGE_LOG_FD
   1.338 -         if test ! -f conftest.hpp.gch; then
   1.339 -             USE_PRECOMPILED_HEADER=0
   1.340 -             AC_MSG_RESULT([no])        
   1.341 -         else
   1.342 -             AC_MSG_RESULT([yes])
   1.343 -         fi
   1.344 -         rm -f conftest.h conftest.hpp.gch
   1.345 +      AC_MSG_CHECKING([that precompiled headers work])
   1.346 +      echo "int alfa();" > conftest.h
   1.347 +      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&AS_MESSAGE_LOG_FD >&AS_MESSAGE_LOG_FD
   1.348 +      if test ! -f conftest.hpp.gch; then
   1.349 +        USE_PRECOMPILED_HEADER=0
   1.350 +        AC_MSG_RESULT([no])
   1.351 +      else
   1.352 +        AC_MSG_RESULT([yes])
   1.353 +      fi
   1.354 +      rm -f conftest.h conftest.hpp.gch
   1.355      fi
   1.356 -fi
   1.357 +  fi
   1.358  
   1.359 -AC_SUBST(USE_PRECOMPILED_HEADER)
   1.360 +  AC_SUBST(USE_PRECOMPILED_HEADER)
   1.361  ])
   1.362  
   1.363  
   1.364  AC_DEFUN_ONCE([BPERF_SETUP_SMART_JAVAC],
   1.365  [
   1.366 -AC_ARG_WITH(sjavac-server-java, [AS_HELP_STRING([--with-sjavac-server-java],
   1.367 -	[use this java binary for running the sjavac background server @<:@Boot JDK java@:>@])])
   1.368 +  AC_ARG_WITH(sjavac-server-java, [AS_HELP_STRING([--with-sjavac-server-java],
   1.369 +      [use this java binary for running the sjavac background server @<:@Boot JDK java@:>@])])
   1.370  
   1.371 -if test "x$with_sjavac_server_java" != x; then
   1.372 +  if test "x$with_sjavac_server_java" != x; then
   1.373      SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
   1.374      FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
   1.375      if test "x$FOUND_VERSION" = x; then
   1.376 -        AC_MSG_ERROR([Could not execute server java: $SJAVAC_SERVER_JAVA])
   1.377 +      AC_MSG_ERROR([Could not execute server java: $SJAVAC_SERVER_JAVA])
   1.378      fi
   1.379 -else
   1.380 +  else
   1.381      SJAVAC_SERVER_JAVA=""
   1.382      # Hotspot specific options.
   1.383      ADD_JVM_ARG_IF_OK([-verbosegc],SJAVAC_SERVER_JAVA,[$JAVA])
   1.384      # JRockit specific options.
   1.385      ADD_JVM_ARG_IF_OK([-Xverbose:gc],SJAVAC_SERVER_JAVA,[$JAVA])
   1.386      SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
   1.387 -fi                    
   1.388 -AC_SUBST(SJAVAC_SERVER_JAVA)
   1.389 +  fi
   1.390 +  AC_SUBST(SJAVAC_SERVER_JAVA)
   1.391  
   1.392 -if test "$MEMORY_SIZE" -gt "2500"; then
   1.393 +  if test "$MEMORY_SIZE" -gt "2500"; then
   1.394      ADD_JVM_ARG_IF_OK([-d64],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA])
   1.395      if test "$JVM_ARG_OK" = true; then
   1.396 -        JVM_64BIT=true
   1.397 -	JVM_ARG_OK=false
   1.398 +      JVM_64BIT=true
   1.399 +      JVM_ARG_OK=false
   1.400      fi
   1.401 -    fi
   1.402 +  fi
   1.403  
   1.404 -if test "$JVM_64BIT" = true; then
   1.405 +  if test "$JVM_64BIT" = true; then
   1.406      if test "$MEMORY_SIZE" -gt "17000"; then
   1.407 -        ADD_JVM_ARG_IF_OK([-Xms10G -Xmx10G],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA])
   1.408 +      ADD_JVM_ARG_IF_OK([-Xms10G -Xmx10G],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA])
   1.409      fi
   1.410      if test "$MEMORY_SIZE" -gt "10000" && test "$JVM_ARG_OK" = false; then
   1.411 -        ADD_JVM_ARG_IF_OK([-Xms6G -Xmx6G],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA])
   1.412 +      ADD_JVM_ARG_IF_OK([-Xms6G -Xmx6G],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA])
   1.413      fi
   1.414      if test "$MEMORY_SIZE" -gt "5000" && test "$JVM_ARG_OK" = false; then
   1.415 -        ADD_JVM_ARG_IF_OK([-Xms1G -Xmx3G],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA])
   1.416 +      ADD_JVM_ARG_IF_OK([-Xms1G -Xmx3G],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA])
   1.417      fi
   1.418      if test "$MEMORY_SIZE" -gt "3800" && test "$JVM_ARG_OK" = false; then
   1.419 -        ADD_JVM_ARG_IF_OK([-Xms1G -Xmx2500M],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA])
   1.420 +      ADD_JVM_ARG_IF_OK([-Xms1G -Xmx2500M],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA])
   1.421      fi
   1.422 -fi
   1.423 -if test "$MEMORY_SIZE" -gt "2500" && test "$JVM_ARG_OK" = false; then
   1.424 +  fi
   1.425 +  if test "$MEMORY_SIZE" -gt "2500" && test "$JVM_ARG_OK" = false; then
   1.426      ADD_JVM_ARG_IF_OK([-Xms1000M -Xmx1500M],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA])
   1.427 -fi
   1.428 -if test "$MEMORY_SIZE" -gt "1000" && test "$JVM_ARG_OK" = false; then
   1.429 +  fi
   1.430 +  if test "$MEMORY_SIZE" -gt "1000" && test "$JVM_ARG_OK" = false; then
   1.431      ADD_JVM_ARG_IF_OK([-Xms400M -Xmx1100M],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA])
   1.432 -fi
   1.433 -if test "$JVM_ARG_OK" = false; then
   1.434 +  fi
   1.435 +  if test "$JVM_ARG_OK" = false; then
   1.436      ADD_JVM_ARG_IF_OK([-Xms256M -Xmx512M],SJAVAC_SERVER_JAVA,[$SJAVAC_SERVER_JAVA])
   1.437 -fi
   1.438 +  fi
   1.439  
   1.440 -AC_MSG_CHECKING([whether to use sjavac])
   1.441 -AC_ARG_ENABLE([sjavac], [AS_HELP_STRING([--enable-sjavac],
   1.442 -	[use sjavac to do fast incremental compiles @<:@disabled@:>@])],
   1.443 -	[ENABLE_SJAVAC="${enableval}"], [ENABLE_SJAVAC='no'])
   1.444 -AC_MSG_RESULT([$ENABLE_SJAVAC])
   1.445 -AC_SUBST(ENABLE_SJAVAC)
   1.446 +  AC_MSG_CHECKING([whether to use sjavac])
   1.447 +  AC_ARG_ENABLE([sjavac], [AS_HELP_STRING([--enable-sjavac],
   1.448 +      [use sjavac to do fast incremental compiles @<:@disabled@:>@])],
   1.449 +      [ENABLE_SJAVAC="${enableval}"], [ENABLE_SJAVAC='no'])
   1.450 +  AC_MSG_RESULT([$ENABLE_SJAVAC])
   1.451 +  AC_SUBST(ENABLE_SJAVAC)
   1.452  
   1.453 -if test "x$ENABLE_SJAVAC" = xyes; then
   1.454 +  if test "x$ENABLE_SJAVAC" = xyes; then
   1.455      SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
   1.456 -else
   1.457 +  else
   1.458      SJAVAC_SERVER_DIR=
   1.459 -fi
   1.460 -AC_SUBST(SJAVAC_SERVER_DIR)
   1.461 -
   1.462 +  fi
   1.463 +  AC_SUBST(SJAVAC_SERVER_DIR)
   1.464  ])

mercurial