common/autoconf/build-performance.m4

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

mercurial