1.1 --- a/common/autoconf/configure.ac Mon Jun 25 21:37:09 2012 -0700 1.2 +++ b/common/autoconf/configure.ac Tue Jul 03 16:11:12 2012 -0700 1.3 @@ -23,2856 +23,204 @@ 1.4 # questions. 1.5 # 1.6 1.7 +############################################################################### 1.8 +# 1.9 +# Includes and boilerplate 1.10 +# 1.11 +############################################################################### 1.12 + 1.13 + 1.14 AC_PREREQ([2.61]) 1.15 -AC_INIT(openjdk, version-0.1, build-infra-dev@openjdk.java.net) 1.16 +AC_INIT(openjdk, jdk8, build-dev@openjdk.java.net) 1.17 + 1.18 +# Do not change or remove the following line, it is needed for consistency checks: 1.19 +# DATE_WHEN_GENERATED: @DATE_WHEN_GENERATED@ 1.20 1.21 AC_CONFIG_AUX_DIR([build-aux]) 1.22 +m4_include([build-aux/pkg.m4]) 1.23 1.24 -m4_include([build-aux/pkg.m4]) 1.25 +# Include these first... 1.26 +m4_include([basics.m4]) 1.27 m4_include([builddeps.m4]) 1.28 +# ... then the rest 1.29 +m4_include([boot-jdk.m4]) 1.30 +m4_include([build-performance.m4]) 1.31 +m4_include([help.m4]) 1.32 +m4_include([jdk-options.m4]) 1.33 +m4_include([libraries.m4]) 1.34 m4_include([platform.m4]) 1.35 -m4_include([cores.m4]) 1.36 -m4_include([help.m4]) 1.37 +m4_include([source-dirs.m4]) 1.38 +m4_include([toolchain.m4]) 1.39 1.40 -# Save the command line. Do this very early, before it is lost by calling autoconf macros. 1.41 -CONFIGURE_COMMAND_LINE="$@" 1.42 -AC_SUBST(CONFIGURE_COMMAND_LINE) 1.43 - 1.44 -# Locate the directory of this script. 1.45 -SCRIPT="[$]0" 1.46 -REMOVE_SYMBOLIC_LINKS(SCRIPT) 1.47 -AUTOCONF_DIR=`dirname [$]0` 1.48 - 1.49 -# Start with tools that do not need have cross compilation support 1.50 -# and can be expected to be found in the default PATH. These tools are 1.51 -# used by configure. Nor are these tools expected to be found in the 1.52 -# devkit from the builddeps server either, since they are 1.53 -# needed to download the devkit. 1.54 -AC_PROG_AWK 1.55 -CHECK_NONEMPTY(AWK) 1.56 -AC_PATH_PROG(CAT, cat) 1.57 -CHECK_NONEMPTY(CAT) 1.58 -AC_PATH_PROG(CHMOD, chmod) 1.59 -CHECK_NONEMPTY(CHMOD) 1.60 -AC_PATH_PROG(CP, cp) 1.61 -CHECK_NONEMPTY(CP) 1.62 -AC_PATH_PROG(CPIO, cpio) 1.63 -CHECK_NONEMPTY(CPIO) 1.64 -AC_PATH_PROG(CUT, cut) 1.65 -CHECK_NONEMPTY(CUT) 1.66 -AC_PATH_PROG(DATE, date) 1.67 -CHECK_NONEMPTY(DATE) 1.68 -AC_PATH_PROG(DF, df) 1.69 -CHECK_NONEMPTY(DF) 1.70 -AC_PATH_PROG(DIFF, diff) 1.71 -CHECK_NONEMPTY(DIFF) 1.72 -# Warning echo is really, really unportable!!!!! Different 1.73 -# behaviour in bash and dash and in a lot of other shells! 1.74 -# Use printf for serious work! 1.75 -AC_PATH_PROG(ECHO, echo) 1.76 -CHECK_NONEMPTY(ECHO) 1.77 -AC_PROG_EGREP 1.78 -CHECK_NONEMPTY(EGREP) 1.79 -AC_PROG_FGREP 1.80 -CHECK_NONEMPTY(FGREP) 1.81 - 1.82 -AC_PATH_PROG(FIND, find) 1.83 -CHECK_NONEMPTY(FIND) 1.84 -CHECK_FIND_DELETE 1.85 -AC_SUBST(FIND_DELETE) 1.86 - 1.87 -AC_PROG_GREP 1.88 -CHECK_NONEMPTY(GREP) 1.89 -AC_PATH_PROG(HEAD, head) 1.90 -CHECK_NONEMPTY(HEAD) 1.91 -AC_PATH_PROG(LN, ln) 1.92 -CHECK_NONEMPTY(LN) 1.93 -AC_PATH_PROG(LS, ls) 1.94 -CHECK_NONEMPTY(LS) 1.95 -AC_PATH_PROGS(MAKE, [gmake make]) 1.96 -CHECK_NONEMPTY(MAKE) 1.97 -MAKE_VERSION=`$MAKE --version | head -n 1 | grep '3.8[[12346789]]'` 1.98 -if test "x$MAKE_VERSION" = x; then 1.99 - AC_MSG_ERROR([You must use GNU make 3.81 or newer! Please put it in the path.]) 1.100 -fi 1.101 -AC_PATH_PROG(MKDIR, mkdir) 1.102 -CHECK_NONEMPTY(MKDIR) 1.103 -AC_PATH_PROG(MV, mv) 1.104 -CHECK_NONEMPTY(MV) 1.105 -AC_PATH_PROGS(NAWK, [nawk gawk awk]) 1.106 -CHECK_NONEMPTY(NAWK) 1.107 -AC_PATH_PROG(PRINTF, printf) 1.108 -CHECK_NONEMPTY(PRINTF) 1.109 -AC_PATH_PROG(THEPWDCMD, pwd) 1.110 -AC_PATH_PROG(RM, rm) 1.111 -CHECK_NONEMPTY(RM) 1.112 -RM="$RM -f" 1.113 -AC_PROG_SED 1.114 -CHECK_NONEMPTY(SED) 1.115 -AC_PATH_PROG(SH, sh) 1.116 -CHECK_NONEMPTY(SH) 1.117 -AC_PATH_PROG(SORT, sort) 1.118 -CHECK_NONEMPTY(SORT) 1.119 -AC_PATH_PROG(TAR, tar) 1.120 -CHECK_NONEMPTY(TAR) 1.121 -AC_PATH_PROG(TAIL, tail) 1.122 -CHECK_NONEMPTY(TAIL) 1.123 -AC_PATH_PROG(TEE, tee) 1.124 -CHECK_NONEMPTY(TEE) 1.125 -AC_PATH_PROG(TR, tr) 1.126 -CHECK_NONEMPTY(TR) 1.127 -AC_PATH_PROG(TOUCH, touch) 1.128 -CHECK_NONEMPTY(TOUCH) 1.129 -AC_PATH_PROG(WC, wc) 1.130 -CHECK_NONEMPTY(WC) 1.131 -AC_PATH_PROG(XARGS, xargs) 1.132 -CHECK_NONEMPTY(XARGS) 1.133 -AC_PATH_PROG(ZIP, zip) 1.134 -CHECK_NONEMPTY(ZIP) 1.135 -AC_PATH_PROG(UNZIP, unzip) 1.136 -CHECK_NONEMPTY(UNZIP) 1.137 -AC_PATH_PROG(LDD, ldd) 1.138 -if test "x$LDD" = "x"; then 1.139 - # List shared lib dependencies is used for 1.140 - # debug output and checking for forbidden dependencies. 1.141 - # We can build without it. 1.142 - LDD="true" 1.143 -fi 1.144 -AC_PATH_PROG(OTOOL, otool) 1.145 -if test "x$OTOOL" = "x"; then 1.146 - OTOOL="true" 1.147 -fi 1.148 -AC_PATH_PROG(READELF, readelf) 1.149 -AC_PATH_PROG(EXPR, expr) 1.150 -CHECK_NONEMPTY(EXPR) 1.151 -AC_PATH_PROG(FILE, file) 1.152 -CHECK_NONEMPTY(FILE) 1.153 -AC_PATH_PROG(HG, hg) 1.154 - 1.155 -# Figure out the build and host system. 1.156 -AC_CANONICAL_BUILD 1.157 -AC_CANONICAL_HOST 1.158 - 1.159 -AC_ARG_WITH(data-model, [AS_HELP_STRING([--with-data-model], 1.160 - [build 32-bit or 64-bit binaries (for platforms that support it), e.g. --with-data-model=32 @<:@guessed@:>@])]) 1.161 - 1.162 -if test "x$with_data_model" != x && \ 1.163 - test "x$with_data_model" != x32 && \ 1.164 - test "x$with_data_model" != x64 ; then 1.165 - AC_MSG_ERROR([The data model can only be 32 or 64!]) 1.166 -fi 1.167 -# Translate the standard cpu-vendor-kernel-os quadruplets into 1.168 -# the new HOST_.... and BUILD_... and the legacy names used by 1.169 -# the openjdk build. 1.170 -# It uses $host_os $host_cpu $build_os $build_cpu and $with_data_model 1.171 -EXTRACT_HOST_AND_BUILD_AND_LEGACY_VARS 1.172 -# Now the following vars are defined. 1.173 -# HOST_OS=aix,bsd,hpux,linux,macosx,solaris,windows 1.174 -# HOST_OS_FAMILY=bsd,gnu,sysv,win32,wince 1.175 -# HOST_OS_API=posix,winapi 1.176 -# 1.177 -# HOST_CPU=ia32,x64,sparc,sparcv9,arm,arm64,ppc,ppc64 1.178 -# HOST_CPU_ARCH=x86,sparc,pcc,arm 1.179 -# HOST_CPU_BITS=32,64 1.180 -# HOST_CPU_ENDIAN=big,little 1.181 -# 1.182 -# There is also a: 1.183 -# LEGACY_HOST_CPU1=i586,amd64,.... # used to set the old var ARCH 1.184 -# LEGACY_HOST_CPU2=i386,amd64,.... # used to set the old var LIBARCH 1.185 -# LEGACY_HOST_CPU3=only sparcv9,amd64 # used to set the ISA_DIR on Solaris 1.186 -# There was also a BUILDARCH that had i486,amd64,... but we do not use that 1.187 -# in the new build. 1.188 -# LEGACY_HOST_OS_API=solaris,windows # used to select source roots 1.189 - 1.190 -DATE_WHEN_CONFIGURED=`LANG=C date` 1.191 -AC_SUBST(DATE_WHEN_CONFIGURED) 1.192 - 1.193 -# How many cores do we have on this build system? 1.194 -AC_ARG_WITH(num-cores, [AS_HELP_STRING([--with-num-cores], 1.195 - [number of cores in the build system, e.g. --with-num-cores=8 @<:@probed@:>@])]) 1.196 -if test "x$with_num_cores" = x; then 1.197 - # The number of cores were not specified, try to probe them. 1.198 - CHECK_CORES 1.199 -else 1.200 - NUM_CORES=$with_num_cores 1.201 - CONCURRENT_BUILD_JOBS=`expr $NUM_CORES \* 2` 1.202 -fi 1.203 -AC_SUBST(NUM_CORES) 1.204 -AC_SUBST(CONCURRENT_BUILD_JOBS) 1.205 - 1.206 -# How many cores do we have on this build system? 1.207 -AC_ARG_WITH(memory-size, [AS_HELP_STRING([--with-memory-size], 1.208 - [memory (in MB) available in the build system, e.g. --with-memory-size=1024 @<:@probed@:>@])]) 1.209 -if test "x$with_memory_size" = x; then 1.210 - # The memory size was not specified, try to probe it. 1.211 - CHECK_MEMORY_SIZE 1.212 -else 1.213 - MEMORY_SIZE=$with_memory_size 1.214 -fi 1.215 -AC_SUBST(MEMORY_SIZE) 1.216 - 1.217 -# Where is the source? It is located two levels above the configure script. 1.218 -CURDIR="$PWD" 1.219 -cd "$AUTOCONF_DIR/../.." 1.220 -SRC_ROOT="`pwd`" 1.221 -AC_SUBST(SRC_ROOT) 1.222 -cd "$CURDIR" 1.223 - 1.224 -# For cygwin we need cygpath first, since it is used everywhere. 1.225 -AC_PATH_PROG(CYGPATH, cygpath) 1.226 -PATH_SEP=":" 1.227 -if test "x$BUILD_OS" = "xwindows"; then 1.228 - if test "x$CYGPATH" = x; then 1.229 - AC_MSG_ERROR([Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path]) 1.230 - fi 1.231 - PATH_SEP=";" 1.232 -fi 1.233 -AC_SUBST(PATH_SEP) 1.234 - 1.235 -SPACESAFE(SRC_ROOT,[the path to the source root]) 1.236 -SPACESAFE(CURDIR,[the path to the current directory]) 1.237 - 1.238 -if test "x$BUILD_OS" = "xsolaris"; then 1.239 - # Also search in /usr/ccs/bin for utilities like ar and as. 1.240 - PATH="/usr/ccs/bin:$PATH" 1.241 -fi 1.242 +# This line needs to be here, verbatim, after all includes. 1.243 +# It is replaced with closed functionality when building 1.244 +# closed sources. 1.245 +AC_DEFUN_ONCE([CLOSED_HOOK]) 1.246 1.247 ############################################################################### 1.248 # 1.249 -# OpenJDK or closed 1.250 +# Initialization 1.251 # 1.252 -AC_ARG_ENABLE([openjdk-only], [AS_HELP_STRING([--enable-openjdk-only], 1.253 - [build OpenJDK regardless of the presence of closed repositories @<:@disabled@:>@])],,) 1.254 +############################################################################### 1.255 1.256 -if test "x$enable_openjdk_only" = "xyes"; then 1.257 - OPENJDK=true 1.258 -elif test "x$enable_openjdk_only" = "xno"; then 1.259 - OPENJDK=false 1.260 -elif test -d "$SRC_ROOT/jdk/src/closed"; then 1.261 - OPENJDK=false 1.262 -else 1.263 - OPENJDK=true 1.264 -fi 1.265 +# Basic initialization that must happen first of all 1.266 +BASIC_INIT 1.267 +BASIC_SETUP_PATHS 1.268 +BASIC_SETUP_LOGGING 1.269 1.270 -if test "x$OPENJDK" = "xtrue"; then 1.271 - SET_OPENJDK=OPENJDK=true 1.272 -fi 1.273 +# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY. 1.274 +HELP_SETUP_DEPENDENCY_HELP 1.275 1.276 -AC_SUBST(SET_OPENJDK) 1.277 +# Setup simple tools, that do not need have cross compilation support. 1.278 +# Without these, we can't properly run the rest of the configure script. 1.279 +BASIC_SETUP_TOOLS 1.280 1.281 -############################################################################### 1.282 -# 1.283 -# JIGSAW or not. The JIGSAW variable is used during the intermediate 1.284 -# stage when we are building both the old style JDK and the new style modularized JDK. 1.285 -# When the modularized JDK is finalized, this option will go away. 1.286 -# 1.287 -AC_ARG_ENABLE([jigsaw], [AS_HELP_STRING([--enable-jigsaw], 1.288 - [build Jigsaw images (not yet available) @<:@disabled@:>@])],,) 1.289 - 1.290 -if test "x$enable_jigsaw" = "xyes"; then 1.291 - JIGSAW=true 1.292 -else 1.293 - JIGSAW=false 1.294 -fi 1.295 -AC_SUBST(JIGSAW) 1.296 - 1.297 -############################################################################### 1.298 -# 1.299 -# Check which variant of the JDK that we want to build. 1.300 -# Currently we have: 1.301 -# normal: standard edition 1.302 -# embedded: cut down to a smaller footprint 1.303 -# 1.304 -# Effectively the JDK variant gives a name to a specific set of 1.305 -# modules to compile into the JDK. In the future, these modules 1.306 -# might even be Jigsaw modules. 1.307 -# 1.308 -AC_MSG_CHECKING([which variant of the JDK to build]) 1.309 -AC_ARG_WITH([jdk-variant], [AS_HELP_STRING([--with-jdk-variant], 1.310 - [JDK variant to build (normal, embedded) @<:@normal@:>@])]) 1.311 - 1.312 -if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then 1.313 - JAVASE_EMBEDDED="" 1.314 - MINIMIZE_RAM_USAGE="" 1.315 - JDK_VARIANT="normal" 1.316 -elif test "x$with_jdk_variant" = xembedded; then 1.317 - JAVASE_EMBEDDED="JAVASE_EMBEDDED:=true" 1.318 - MINIMIZE_RAM_USAGE="MINIMIZE_RAM_USAGE:=true" 1.319 - JDK_VARIANT="embedded" 1.320 -else 1.321 - AC_MSG_ERROR([The available JDK variants are: normal, embedded]) 1.322 -fi 1.323 - 1.324 -AC_SUBST(JAVASE_EMBEDDED) 1.325 -AC_SUBST(MINIMIZE_RAM_USAGE) 1.326 -AC_SUBST(JDK_VARIANT) 1.327 - 1.328 -AC_MSG_RESULT([$JDK_VARIANT]) 1.329 - 1.330 -############################################################################### 1.331 -# 1.332 -# Should we build a JDK/JVM with head support (ie a graphical ui)? 1.333 -# We always build headless support. 1.334 -# 1.335 -AC_MSG_CHECKING([headful support]) 1.336 -AC_ARG_ENABLE([headful], [AS_HELP_STRING([--disable-headful], 1.337 - [build headful support (graphical UI support) @<:@enabled@:>@])], 1.338 - [SUPPORT_HEADFUL=${enable_headful}], [SUPPORT_HEADFUL=yes]) 1.339 - 1.340 -SUPPORT_HEADLESS=yes 1.341 -BUILD_HEADLESS="BUILD_HEADLESS:=true" 1.342 - 1.343 -if test "x$SUPPORT_HEADFUL" = xyes; then 1.344 - # We are building both headful and headless. 1.345 - BUILD_HEADLESS_ONLY="" 1.346 - headful_msg="inlude support for both headful and headless" 1.347 -fi 1.348 - 1.349 -if test "x$SUPPORT_HEADFUL" = xno; then 1.350 - # Thus we are building headless only. 1.351 - BUILD_HEADLESS="BUILD_HEADLESS:=true" 1.352 - BUILD_HEADLESS_ONLY="BUILD_HEADLESS_ONLY:=true" 1.353 - headful_msg="headless only" 1.354 -fi 1.355 - 1.356 -AC_MSG_RESULT([$headful_msg]) 1.357 - 1.358 -AC_SUBST(SUPPORT_HEADLESS) 1.359 -AC_SUBST(SUPPORT_HEADFUL) 1.360 -AC_SUBST(BUILD_HEADLESS) 1.361 -AC_SUBST(BUILD_HEADLESS_ONLY) 1.362 - 1.363 -############################################################################### 1.364 -# 1.365 -# Check which variants of the JVM that we want to build. 1.366 -# Currently we have: 1.367 -# server: normal interpreter and a tiered C1/C2 compiler 1.368 -# client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms) 1.369 -# kernel: kernel footprint JVM that passes the TCK without major performance problems, 1.370 -# ie normal interpreter and C1, only the serial GC, kernel jvmti etc 1.371 -# zero: no machine code interpreter, no compiler 1.372 -# zeroshark: zero interpreter and shark/llvm compiler backend 1.373 -AC_MSG_CHECKING([which variants of the JVM that should be built]) 1.374 -AC_ARG_WITH([jvm-variants], [AS_HELP_STRING([--with-jvm-variants], 1.375 - [JVM variants (separated by commas) to build (server, client, kernel, zero, zeroshark) @<:@server@:>@])]) 1.376 - 1.377 -if test "x$with_jvm_variants" = x; then 1.378 - if test "x$JDK_VARIANT" = xembedded; then 1.379 - with_jvm_variants="kernel" 1.380 - elif test "x$HOST_CPU_BITS" = x64; then 1.381 - with_jvm_variants="server" 1.382 - else 1.383 - # Yes, on 32-bit machines, the same source (almost) is compiled twice 1.384 - # to generate two libjvm.so files. Fun, fun. 1.385 - with_jvm_variants="client,server" 1.386 - fi 1.387 -fi 1.388 - 1.389 -JVM_VARIANTS=",$with_jvm_variants," 1.390 -TEST_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,//' -e 's/client,//' -e 's/kernel,//' -e 's/zero,//' -e 's/zeroshark,//'` 1.391 - 1.392 -if test "x$TEST_VARIANTS" != "x,"; then 1.393 - AC_MSG_ERROR([The available JVM variants are: server, client, kernel, zero, zeroshark]) 1.394 -fi 1.395 -AC_MSG_RESULT([$with_jvm_variants]) 1.396 - 1.397 -JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'` 1.398 -JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'` 1.399 -JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'` 1.400 -JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'` 1.401 -JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'` 1.402 - 1.403 -if test "x$JVM_VARIANT_CLIENT" = xtrue; then 1.404 - if test "x$HOST_CPU_BITS" = x64; then 1.405 - AC_MSG_ERROR([You cannot build a client JVM for a 64-bit machine.]) 1.406 - fi 1.407 -fi 1.408 -if test "x$JVM_VARIANT_KERNEL" = xtrue; then 1.409 - if test "x$HOST_CPU_BITS" = x64; then 1.410 - AC_MSG_ERROR([You cannot build a kernel JVM for a 64-bit machine.]) 1.411 - fi 1.412 -fi 1.413 - 1.414 -COUNT_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,/1/' -e 's/client,/1/' -e 's/kernel,/1/' -e 's/zero,/1/' -e 's/zeroshark,/1/'` 1.415 -# Replace the commas with AND for use in the build directory name. 1.416 -ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/'` 1.417 -if test "x$COUNT_VARIANTS" != "x,1"; then 1.418 - AC_MSG_NOTICE([NOTE! Longer build time since we are building more than one version of the libjvm! $with_jvm_variants]) 1.419 -fi 1.420 - 1.421 -AC_SUBST(JVM_VARIANTS) 1.422 -AC_SUBST(JVM_VARIANT_SERVER) 1.423 -AC_SUBST(JVM_VARIANT_CLIENT) 1.424 -AC_SUBST(JVM_VARIANT_KERNEL) 1.425 -AC_SUBST(JVM_VARIANT_ZERO) 1.426 -AC_SUBST(JVM_VARIANT_ZEROSHARK) 1.427 - 1.428 -############################################################################### 1.429 -# 1.430 -# Set the debug level 1.431 -# release: no debug information, all optimizations, no asserts. 1.432 -# fastdebug: debug information (-g), all optimizations, all asserts 1.433 -# slowdebug: debug information (-g), no optimizations, all asserts 1.434 -# 1.435 -DEBUG_LEVEL="release" 1.436 -AC_MSG_CHECKING([which debug level to use]) 1.437 -AC_ARG_ENABLE([debug], [AS_HELP_STRING([--enable-debug], 1.438 - [set the debug level to fastdebug (shorthand for --with-debug-level=fastdebug) @<:@disabled@:>@])], 1.439 - [ 1.440 - ENABLE_DEBUG="${enableval}" 1.441 - DEBUG_LEVEL="fastdebug" 1.442 - ], [ENABLE_DEBUG="no"]) 1.443 - 1.444 -AC_ARG_WITH([debug-level], [AS_HELP_STRING([--with-debug-level], 1.445 - [set the debug level (release, fastdebug, slowdebug) @<:@release@:>@])], 1.446 - [ 1.447 - DEBUG_LEVEL="${withval}" 1.448 - if test "x$ENABLE_DEBUG" = xyes; then 1.449 - AC_MSG_ERROR([You cannot use both --enable-debug and --with-debug-level at the same time.]) 1.450 - fi 1.451 - ]) 1.452 -AC_MSG_RESULT([$DEBUG_LEVEL]) 1.453 - 1.454 -if test "x$DEBUG_LEVEL" != xrelease && \ 1.455 - test "x$DEBUG_LEVEL" != xfastdebug && \ 1.456 - test "x$DEBUG_LEVEL" != xslowdebug; then 1.457 - AC_MSG_ERROR([Allowed debug levels are: release, fastdebug and slowdebug]) 1.458 -fi 1.459 - 1.460 -case $DEBUG_LEVEL in 1.461 - release ) 1.462 - VARIANT="OPT" 1.463 - FASTDEBUG="false" 1.464 - DEBUG_CLASSFILES="false" 1.465 - BUILD_VARIANT_RELEASE="" 1.466 - ;; 1.467 - fastdebug ) 1.468 - VARIANT="DBG" 1.469 - FASTDEBUG="true" 1.470 - DEBUG_CLASSFILES="true" 1.471 - BUILD_VARIANT_RELEASE="-fastdebug" 1.472 - ;; 1.473 - slowdebug ) 1.474 - VARIANT="DBG" 1.475 - FASTDEBUG="false" 1.476 - DEBUG_CLASSFILES="true" 1.477 - BUILD_VARIANT_RELEASE="-debug" 1.478 - ;; 1.479 -esac 1.480 - 1.481 -AC_SUBST(DEBUG_LEVEL) 1.482 -AC_SUBST(VARIANT) 1.483 -AC_SUBST(FASTDEBUG) 1.484 -AC_SUBST(DEBUG_CLASSFILES) 1.485 -AC_SUBST(BUILD_VARIANT_RELEASE) 1.486 - 1.487 -# Source the version numbers 1.488 -. $AUTOCONF_DIR/version.numbers 1.489 -if test "x$OPENJDK" = "xfalse"; then 1.490 - . $AUTOCONF_DIR/closed.version.numbers 1.491 -fi 1.492 -# Now set the JDK version, milestone, build number etc. 1.493 -AC_SUBST(JDK_MAJOR_VERSION) 1.494 -AC_SUBST(JDK_MINOR_VERSION) 1.495 -AC_SUBST(JDK_MICRO_VERSION) 1.496 -AC_SUBST(JDK_UPDATE_VERSION) 1.497 -AC_SUBST(JDK_BUILD_NUMBER) 1.498 -AC_SUBST(MILESTONE) 1.499 -AC_SUBST(LAUNCHER_NAME) 1.500 -AC_SUBST(PRODUCT_NAME) 1.501 -AC_SUBST(PRODUCT_SUFFIX) 1.502 -AC_SUBST(JDK_RC_PLATFORM_NAME) 1.503 -AC_SUBST(COMPANY_NAME) 1.504 - 1.505 -COPYRIGHT_YEAR=`date +'%Y'` 1.506 -AC_SUBST(COPYRIGHT_YEAR) 1.507 - 1.508 -RUNTIME_NAME="$PRODUCT_NAME $PRODUCT_SUFFIX" 1.509 -AC_SUBST(RUNTIME_NAME) 1.510 - 1.511 -if test "x$JDK_UPDATE_VERSION" != x; then 1.512 - JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}" 1.513 -else 1.514 - JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}" 1.515 -fi 1.516 -AC_SUBST(JDK_VERSION) 1.517 - 1.518 -if test "x$MILESTONE" != x; then 1.519 - RELEASE="${JDK_VERSION}-${MILESTONE}${BUILD_VARIANT_RELEASE}" 1.520 -else 1.521 - RELEASE="${JDK_VERSION}${BUILD_VARIANT_RELEASE}" 1.522 -fi 1.523 -AC_SUBST(RELEASE) 1.524 - 1.525 -if test "x$JDK_BUILD_NUMBER" != x; then 1.526 - FULL_VERSION="${RELEASE}-${JDK_BUILD_NUMBER}" 1.527 -else 1.528 - JDK_BUILD_NUMBER=b00 1.529 - BUILD_DATE=`date '+%Y_%m_%d_%H_%M'` 1.530 - # Avoid [:alnum:] since it depends on the locale. 1.531 - CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyz0123456789'` 1.532 - USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvqxyz'` 1.533 - FULL_VERSION="${RELEASE}-${USER_RELEASE_SUFFIX}-${JDK_BUILD_NUMBER}" 1.534 -fi 1.535 -AC_SUBST(FULL_VERSION) 1.536 -COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'` 1.537 -AC_SUBST(COOKED_BUILD_NUMBER) 1.538 - 1.539 -# Test from where we are running configure, in or outside of src root. 1.540 -if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" || test "x$CURDIR" = "x$SRC_ROOT/common/makefiles" ; then 1.541 - # We are running configure from the src root. 1.542 - # Create a default ./build/host-variant-debuglevel output root. 1.543 - CONF_NAME="${HOST_OS}-${HOST_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}" 1.544 - OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}" 1.545 - mkdir -p "$OUTPUT_ROOT" 1.546 - if test ! -d "$OUTPUT_ROOT"; then 1.547 - AC_MSG_ERROR([Could not create build directory $OUTPUT_ROOT]) 1.548 - fi 1.549 -else 1.550 - # We are running configure from outside of the src dir. 1.551 - # Then use the current directory as output dir! 1.552 - # If configuration is situated in normal build directory, just use the build 1.553 - # directory name as configuration name, otherwise use the complete path. 1.554 - CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"` 1.555 - OUTPUT_ROOT="$CURDIR" 1.556 -fi 1.557 - 1.558 -SPACESAFE(OUTPUT_ROOT,[the path to the output root]) 1.559 - 1.560 -# Save the arguments given to us 1.561 -echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments 1.562 - 1.563 -# Check if the VS env variables were setup prior to running configure. 1.564 -# If not, then find vcvarsall.bat and run it automatically, and integrate 1.565 -# the set env variables into the spec file. 1.566 -SETUPDEVENV="# No special vars" 1.567 -if test "x$BUILD_OS" = "xwindows"; then 1.568 - # If vcvarsall.bat has been run, then VCINSTALLDIR is set. 1.569 - if test "x$VCINSTALLDIR" != x; then 1.570 - # No further setup is needed. The build will happen from this kind 1.571 - # of shell. 1.572 - SETUPDEVENV="# This spec file expects that you are running bash from within a VS command prompt." 1.573 - # Make sure to remind you, if you forget to run make from a cygwin bash shell 1.574 - # that is spawned "bash -l" from a VS command prompt. 1.575 - CHECK_FOR_VCINSTALLDIR=yes 1.576 - AC_MSG_CHECKING([if you are running from within a VS command prompt]) 1.577 - AC_MSG_RESULT([yes]) 1.578 - else 1.579 - # Ah, we have not yet run vcvarsall.bat/vsvars32.bat/vsvars64.bat. Lets do that. First find it. 1.580 - if test "x$VS100COMNTOOLS" != x; then 1.581 - VARSBAT=`find "$VS100COMNTOOLS/../.." -name vcvarsall.bat` 1.582 - SEARCH_ROOT="$VS100COMNTOOLS" 1.583 - else 1.584 - VARSBAT=`find "$PROGRAMFILES" -name vcvarsall.bat` 1.585 - SEARCH_ROOT="$PROGRAMFILES" 1.586 - fi 1.587 - VCPATH=`dirname "$VARSBAT"` 1.588 - VCPATH=`cygpath -w "$VCPATH"` 1.589 - if test "x$VARSBAT" = x || test ! -d "$VCPATH"; then 1.590 - AC_MSG_CHECKING([if we can find the VS installation]) 1.591 - AC_MSG_RESULT([no]) 1.592 - AC_MSG_ERROR([Tried to find a VS installation using both $SEARCH_ROOT but failed. Please run "c:\\cygwin\\bin\\bash.exe -l" from a VS command prompt and then run configure/make from there.]) 1.593 - fi 1.594 - case "$LEGACY_HOST_CPU1" in 1.595 - i?86) 1.596 - VARSBAT_ARCH=x86 1.597 - ;; 1.598 - *) 1.599 - VARSBAT_ARCH=$LEGACY_HOST_CPU1 1.600 - ;; 1.601 - esac 1.602 - # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat 1.603 - cd $OUTPUT_ROOT 1.604 - bash $SRC_ROOT/common/bin/extractvcvars.sh "$VARSBAT" "$VARSBAT_ARCH" 1.605 - cd $CURDIR 1.606 - if test ! -s $OUTPUT_ROOT/localdevenv.sh || test ! -s $OUTPUT_ROOT/localdevenv.gmk; then 1.607 - AC_MSG_CHECKING([if we can extract the needed env variables]) 1.608 - AC_MSG_RESULT([no]) 1.609 - AC_MSG_ERROR([Could not succesfully extract the env variables needed for the VS setup. Please run "c:\\cygwin\\bin\\bash.exe -l" from a VS command prompt and then run configure/make from there.]) 1.610 - fi 1.611 - # Now set all paths and other env variables. This will allow the rest of 1.612 - # the configure script to find and run the compiler in the proper way. 1.613 - . $OUTPUT_ROOT/localdevenv.sh 1.614 - AC_MSG_CHECKING([if we can find the VS installation]) 1.615 - if test "x$VCINSTALLDIR" != x; then 1.616 - AC_MSG_RESULT([$VCINSTALLDIR]) 1.617 - else 1.618 - AC_MSG_RESULT([no]) 1.619 - AC_MSG_ERROR([Could not find VS installation. Please install. If you are sure you have installed VS, then please run "c:\\cygwin\\bin\\bash.exe -l" from a VS command prompt and then run configure/make from there.]) 1.620 - fi 1.621 - CHECK_FOR_VCINSTALLDIR=no 1.622 - SETUPDEVENV="include $OUTPUT_ROOT/localdevenv.gmk" 1.623 - 1.624 - AC_MSG_CHECKING([for msvcr100.dll]) 1.625 - AC_ARG_WITH(msvcr100dll, [AS_HELP_STRING([--with-msvcr100dll], 1.626 - [copy this msvcr100.dll into the built JDK])]) 1.627 - if test "x$with_msvcr100dll" != x; then 1.628 - MSVCR100DLL="$with_msvcr100dll" 1.629 - else 1.630 - if test "x$HOST_CPU_BITS" = x64; then 1.631 - MSVCR100DLL=`find "$VCINSTALLDIR/.." -name msvcr100.dll | grep x64 | head --lines 1` 1.632 - else 1.633 - MSVCR100DLL=`find "$VCINSTALLDIR/.." -name msvcr100.dll | grep x86 | grep -v ia64 | grep -v x64 | head --lines 1` 1.634 - if test "x$MSVCR100DLL" = x; then 1.635 - MSVCR100DLL=`find "$VCINSTALLDIR/.." -name msvcr100.dll | head --lines 1` 1.636 - fi 1.637 - fi 1.638 - fi 1.639 - if test "x$MSVCR100DLL" = x; then 1.640 - AC_MSG_RESULT([no]) 1.641 - AC_MSG_ERROR([Could not find msvcr100.dll !]) 1.642 - fi 1.643 - AC_MSG_RESULT([$MSVCR100DLL]) 1.644 - SPACESAFE(MSVCR100DLL,[the path to msvcr100.dll]) 1.645 - fi 1.646 -fi 1.647 -AC_SUBST(SETUPDEVENV) 1.648 -AC_SUBST(CHECK_FOR_VCINSTALLDIR) 1.649 -AC_SUBST(MSVCR100DLL) 1.650 - 1.651 -# Most of the probed defines are put into config.h 1.652 -AC_CONFIG_HEADERS([$OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in]) 1.653 -# The spec.gmk file contains all variables for the make system. 1.654 -AC_CONFIG_FILES([$OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in]) 1.655 -# The generated Makefile knows where the spec.gmk is and where the source is. 1.656 -# You can run make from the OUTPUT_ROOT. If you have only 1.657 -# one configured host, then you can also run make from the SRC_ROOT, 1.658 -# since it will go look for a single spec.gmk file. Or perhaps it 1.659 -# should instead make all configured hosts it can find? 1.660 -AC_CONFIG_FILES([$OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in]) 1.661 - 1.662 -AC_SUBST(SPEC, $OUTPUT_ROOT/spec.gmk) 1.663 -AC_SUBST(CONF_NAME, $CONF_NAME) 1.664 -AC_SUBST(OUTPUT_ROOT, $OUTPUT_ROOT) 1.665 - 1.666 -# Where are the sources. Any of these can be overridden 1.667 -# using --with-override-corba and the likes. 1.668 -LANGTOOLS_TOPDIR="$SRC_ROOT/langtools" 1.669 -CORBA_TOPDIR="$SRC_ROOT/corba" 1.670 -JAXP_TOPDIR="$SRC_ROOT/jaxp" 1.671 -JAXWS_TOPDIR="$SRC_ROOT/jaxws" 1.672 -HOTSPOT_TOPDIR="$SRC_ROOT/hotspot" 1.673 -JDK_TOPDIR="$SRC_ROOT/jdk" 1.674 -AC_SUBST(LANGTOOLS_TOPDIR) 1.675 -AC_SUBST(CORBA_TOPDIR) 1.676 -AC_SUBST(JAXP_TOPDIR) 1.677 -AC_SUBST(JAXWS_TOPDIR) 1.678 -AC_SUBST(HOTSPOT_TOPDIR) 1.679 -AC_SUBST(JDK_TOPDIR) 1.680 +# Setup builddeps, for automatic downloading of tools we need. 1.681 +# This is needed before we can call BDEPS_CHECK_MODULE, which is done in 1.682 +# boot-jdk setup, but we need to have basic tools setup first. 1.683 +BDEPS_CONFIGURE_BUILDDEPS 1.684 +BDEPS_SCAN_FOR_BUILDDEPS 1.685 1.686 # Check if pkg-config is available. 1.687 PKG_PROG_PKG_CONFIG 1.688 1.689 -AC_ARG_WITH(builddeps-conf, [AS_HELP_STRING([--with-builddeps-conf], 1.690 - [use this configuration file for the builddeps])]) 1.691 +############################################################################### 1.692 +# 1.693 +# Determine OpenJDK build and target platforms. 1.694 +# 1.695 +############################################################################### 1.696 1.697 -AC_ARG_WITH(builddeps-server, [AS_HELP_STRING([--with-builddeps-server], 1.698 - [download and use build dependencies from this server url, e.g. --with-builddeps-server=ftp://example.com/dir])]) 1.699 +PLATFORM_SETUP_OPENJDK_BUILD_AND_TARGET 1.700 +PLATFORM_SETUP_OPENJDK_BUILD_OS_VERSION 1.701 1.702 -AC_ARG_WITH(builddeps-dir, [AS_HELP_STRING([--with-builddeps-dir], 1.703 - [store downloaded build dependencies here @<:@d/localhome/builddeps@:>@])], 1.704 - [], 1.705 - [with_builddeps_dir=/localhome/builddeps]) 1.706 - 1.707 -AC_ARG_WITH(builddeps-group, [AS_HELP_STRING([--with-builddeps-group], 1.708 - [chgrp the downloaded build dependencies to this group])]) 1.709 - 1.710 -AC_ARG_ENABLE([list-builddeps], [AS_HELP_STRING([--enable-list-builddeps], 1.711 - [list all build dependencies known to the configure script])], 1.712 - [LIST_BUILDDEPS="${enableval}"], [LIST_BUILDDEPS='no']) 1.713 - 1.714 -if test "x$LIST_BUILDDEPS" = xyes; then 1.715 - echo 1.716 - echo List of build dependencies known to the configure script, 1.717 - echo that can be used in builddeps.conf files: 1.718 - cat $SRC_ROOT/configure.ac | grep BDEPS_CHECK_MODUL | grep -v configure.ac | cut -f 2 -d ',' | tr -d ' ' | sort 1.719 - echo 1.720 - exit 1 1.721 -fi 1.722 - 1.723 -# If builddeps server or conf file is given. Setup buildeps usage. 1.724 -BDEPS_SCAN_FOR_BUILDDEPS 1.725 +# With knowledge of the build platform, setup more basic things. 1.726 +BASIC_SETUP_PATH_SEP 1.727 +BASIC_SETUP_SEARCHPATH 1.728 1.729 ############################################################################### 1.730 # 1.731 -# Configure the development tool paths and potential sysroot. 1.732 +# Determine OpenJDK variants, options and version numbers. 1.733 # 1.734 -AC_LANG(C++) 1.735 -DEVKIT= 1.736 -SYS_ROOT=/ 1.737 -AC_SUBST(SYS_ROOT) 1.738 +############################################################################### 1.739 1.740 -# The option used to specify the target .o,.a or .so file. 1.741 -# When compiling, how to specify the to be created object file. 1.742 -CC_OUT_OPTION='-o$(SPACE)' 1.743 -# When linking, how to specify the to be created executable. 1.744 -EXE_OUT_OPTION='-o$(SPACE)' 1.745 -# When linking, how to specify the to be created dynamically linkable library. 1.746 -LD_OUT_OPTION='-o$(SPACE)' 1.747 -# When archiving, how to specify the to be create static archive for object files. 1.748 -AR_OUT_OPTION='rcs$(SPACE)' 1.749 -AC_SUBST(CC_OUT_OPTION) 1.750 -AC_SUBST(EXE_OUT_OPTION) 1.751 -AC_SUBST(LD_OUT_OPTION) 1.752 -AC_SUBST(AR_OUT_OPTION) 1.753 +# We need build & target for this. 1.754 +JDKOPT_SETUP_JDK_VARIANT 1.755 +JDKOPT_SETUP_JVM_VARIANTS 1.756 +JDKOPT_SETUP_DEBUG_LEVEL 1.757 +JDKOPT_SETUP_JDK_OPTIONS 1.758 +JDKOPT_SETUP_JDK_VERSION_NUMBERS 1.759 1.760 -# If --build AND --host is set, then the configure script will find any 1.761 -# cross compilation tools in the PATH. Cross compilation tools 1.762 -# follows the cross compilation standard where they are prefixed with ${host}. 1.763 -# For example the binary i686-sun-solaris2.10-gcc 1.764 -# will cross compile for i686-sun-solaris2.10 1.765 -# If neither of build and host is not set, then build=host and the 1.766 -# default compiler found in the path will be used. 1.767 -# Setting only --host, does not seem to be really supported. 1.768 -# Please set both --build and --host if you want to cross compile. 1.769 - 1.770 -DEFINE_CROSS_COMPILE_ARCH="" 1.771 -HOSTCC="" 1.772 -HOSTCXX="" 1.773 -AC_SUBST(DEFINE_CROSS_COMPILE_ARCH) 1.774 -AC_SUBST(HOST_CC) 1.775 -AC_SUBST(HOST_CXX) 1.776 -AC_MSG_CHECKING([if this is a cross compile]) 1.777 -if test "x$build_var" != "x$host_var"; then 1.778 - AC_MSG_RESULT([yes, from $build_var to $host_var]) 1.779 - # We have detected a cross compile! 1.780 - DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$LEGACY_HOST_CPU1" 1.781 - # Now we to find a C/C++ compiler that can build executables for the build 1.782 - # platform. We can't use the AC_PROG_CC macro, since it can only be used 1.783 - # once. 1.784 - AC_PATH_PROGS(HOSTCC, [cl cc gcc]) 1.785 - WHICHCMD(HOSTCC) 1.786 - AC_PATH_PROGS(HOSTCXX, [cl CC g++]) 1.787 - WHICHCMD(HOSTCXX) 1.788 - # Building for the build platform should be easy. Therefore 1.789 - # we do not need any linkers or assemblers etc. 1.790 -else 1.791 - AC_MSG_RESULT([no]) 1.792 -fi 1.793 - 1.794 -# You can force the sys-root if the sys-root encoded into the cross compiler tools 1.795 -# is not correct. 1.796 -AC_ARG_WITH(sys-root, [AS_HELP_STRING([--with-sys-root], 1.797 - [pass this sys-root to the compilers and linker (useful if the sys-root encoded in 1.798 - the cross compiler tools is incorrect)])]) 1.799 - 1.800 -if test "x$with_sys_root" != x; then 1.801 - SYS_ROOT=$with_sys_root 1.802 -fi 1.803 - 1.804 -# If a devkit is found on the builddeps server, then prepend its path to the 1.805 -# PATH variable. If there are cross compilers available in the devkit, these 1.806 -# will be found by AC_PROG_CC et al. 1.807 -BDEPS_CHECK_MODULE(DEVKIT, devkit, xxx, 1.808 - [# Found devkit 1.809 - PATH="$DEVKIT/bin:$PATH" 1.810 - SYS_ROOT="$DEVKIT/${rewritten_host}/sys-root" 1.811 - if test "x$x_includes" = "xNONE"; then 1.812 - x_includes="$SYS_ROOT/usr/include/X11" 1.813 - fi 1.814 - if test "x$x_libraries" = "xNONE"; then 1.815 - x_libraries="$SYS_ROOT/usr/lib" 1.816 - fi 1.817 - ], 1.818 - []) 1.819 - 1.820 -if test "x$SYS_ROOT" != "x/" ; then 1.821 - CFLAGS="--sysroot=$SYS_ROOT $CFLAGS" 1.822 - CXXFLAGS="--sysroot=$SYS_ROOT $CXXFLAGS" 1.823 - OBJCFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS" 1.824 - OBJCXXFLAGS="--sysroot=$SYS_ROOT $OBJCFLAGS" 1.825 - CPPFLAGS="--sysroot=$SYS_ROOT $CPPFLAGS" 1.826 - LDFLAGS="--sysroot=$SYS_ROOT $LDFLAGS" 1.827 -fi 1.828 - 1.829 -# Store the CFLAGS etal passed to the configure script. 1.830 -ORG_CFLAGS="$CFLAGS" 1.831 -ORG_CXXFLAGS="$CXXFLAGS" 1.832 -ORG_OBJCFLAGS="$OBJCFLAGS" 1.833 - 1.834 -prepare_help_system 1.835 - 1.836 -# gcc is almost always present, but on Windows we 1.837 -# prefer cl.exe and on Solaris we prefer CC. 1.838 -# Thus test for them in this order. 1.839 -AC_PROG_CC([cl cc gcc]) 1.840 -if test "x$CC" = x; then 1.841 - help_on_build_dependency devkit 1.842 - AC_MSG_ERROR([Could not find a compiler. $HELP_MSG]) 1.843 -fi 1.844 -if test "x$CC" = xcc && test "x$BUILD_OS" = xmacosx; then 1.845 - # Do not use cc on MacOSX use gcc instead. 1.846 - CC="gcc" 1.847 -fi 1.848 -WHICHCMD(CC) 1.849 - 1.850 -AC_PROG_CXX([cl CC g++]) 1.851 -if test "x$CXX" = xCC && test "x$BUILD_OS" = xmacosx; then 1.852 - # The found CC, even though it seems to be a g++ derivate, cannot compile 1.853 - # c++ code. Override. 1.854 - CXX="g++" 1.855 -fi 1.856 -WHICHCMD(CXX) 1.857 - 1.858 -if test "x$CXX" = x || test "x$CC" = x; then 1.859 - help_on_build_dependency devkit 1.860 - AC_MSG_ERROR([Could not find the needed compilers! $HELP_MSG ]) 1.861 -fi 1.862 - 1.863 -if test "x$BUILD_OS" != xwindows; then 1.864 - AC_PROG_OBJC 1.865 - WHICHCMD(OBJC) 1.866 -else 1.867 - OBJC= 1.868 -fi 1.869 - 1.870 -# Restore the flags to the user specified values. 1.871 -# This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2" 1.872 -CFLAGS="$ORG_CFLAGS" 1.873 -CXXFLAGS="$ORG_CXXFLAGS" 1.874 -OBJCFLAGS="$ORG_OBJCFLAGS" 1.875 - 1.876 -# If we are not cross compiling, use the same compilers for 1.877 -# building the build platform executables. 1.878 -if test "x$DEFINE_CROSS_COMPILE_ARCH" = x; then 1.879 - HOSTCC="$CC" 1.880 - HOSTCXX="$CXX" 1.881 -fi 1.882 - 1.883 -AC_CHECK_TOOL(LD, ld) 1.884 -WHICHCMD(LD) 1.885 -LD="$CC" 1.886 -LDEXE="$CC" 1.887 -LDCXX="$CXX" 1.888 -LDEXECXX="$CXX" 1.889 -# LDEXE is the linker to use, when creating executables. 1.890 -AC_SUBST(LDEXE) 1.891 -# Linking C++ libraries. 1.892 -AC_SUBST(LDCXX) 1.893 -# Linking C++ executables. 1.894 -AC_SUBST(LDEXECXX) 1.895 - 1.896 -AC_CHECK_TOOL(AR, ar) 1.897 -WHICHCMD(AR) 1.898 -if test "x$BUILD_OS" = xmacosx; then 1.899 - ARFLAGS="-r" 1.900 -else 1.901 - ARFLAGS="" 1.902 -fi 1.903 -AC_SUBST(ARFLAGS) 1.904 - 1.905 -COMPILER_NAME=gcc 1.906 -COMPILER_TYPE=CC 1.907 -AS_IF([test "x$BUILD_OS" = xwindows], [ 1.908 - # For now, assume that we are always compiling using cl.exe. 1.909 - CC_OUT_OPTION=-Fo 1.910 - EXE_OUT_OPTION=-out: 1.911 - LD_OUT_OPTION=-out: 1.912 - AR_OUT_OPTION=-out: 1.913 - # On Windows, reject /usr/bin/link, which is a cygwin 1.914 - # program for something completely different. 1.915 - AC_CHECK_PROG([WINLD], [link],[link],,, [/usr/bin/link]) 1.916 - # Since we must ignore the first found link, WINLD will contain 1.917 - # the full path to the link.exe program. 1.918 - WHICHCMD_SPACESAFE([WINLD]) 1.919 - LD="$WINLD" 1.920 - LDEXE="$WINLD" 1.921 - LDCXX="$WINLD" 1.922 - LDEXECXX="$WINLD" 1.923 - 1.924 - AC_CHECK_PROG([MT], [mt], [mt],,, [/usr/bin/mt]) 1.925 - WHICHCMD_SPACESAFE([MT]) 1.926 - # The resource compiler 1.927 - AC_CHECK_PROG([RC], [rc], [rc],,, [/usr/bin/rc]) 1.928 - WHICHCMD_SPACESAFE([RC]) 1.929 - 1.930 - RC_FLAGS="-nologo /l 0x409 /r" 1.931 - AS_IF([test "x$VARIANT" = xOPT], [ 1.932 - RC_FLAGS="$RC_FLAGS -d NDEBUG" 1.933 - ]) 1.934 - JDK_UPDATE_VERSION_NOTNULL=$JDK_UPDATE_VERSION 1.935 - AS_IF([test "x$JDK_UPDATE_VERSION" = x], [ 1.936 - JDK_UPDATE_VERSION_NOTNULL=0 1.937 - ]) 1.938 - RC_FLAGS="$RC_FLAGS -d \"JDK_BUILD_ID=$FULL_VERSION\"" 1.939 - RC_FLAGS="$RC_FLAGS -d \"JDK_COMPANY=$COMPANY_NAME\"" 1.940 - RC_FLAGS="$RC_FLAGS -d \"JDK_COMPONENT=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME binary\"" 1.941 - RC_FLAGS="$RC_FLAGS -d \"JDK_VER=$JDK_MINOR_VERSION.$JDK_MICRO_VERSION.$JDK_UPDATE_VERSION_NOTNULL.$COOKED_BUILD_NUMBER\"" 1.942 - RC_FLAGS="$RC_FLAGS -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\"" 1.943 - RC_FLAGS="$RC_FLAGS -d \"JDK_NAME=$PRODUCT_NAME $JDK_RC_PLATFORM_NAME $JDK_MINOR_VERSION $JDK_UPDATE_META_TAG\"" 1.944 - RC_FLAGS="$RC_FLAGS -d \"JDK_FVER=$JDK_MINOR_VERSION,$JDK_MICRO_VERSION,$JDK_UPDATE_VERSION_NOTNULL,$COOKED_BUILD_NUMBER\"" 1.945 - 1.946 - # lib.exe is used to create static libraries. 1.947 - AC_CHECK_PROG([WINAR], [lib],[lib],,,) 1.948 - WHICHCMD_SPACESAFE([WINAR]) 1.949 - AR="$WINAR" 1.950 - ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT" 1.951 - 1.952 - AC_CHECK_PROG([DUMPBIN], [dumpbin], [dumpbin],,,) 1.953 - WHICHCMD_SPACESAFE([DUMPBIN]) 1.954 - 1.955 - COMPILER_TYPE=CL 1.956 - CCXXFLAGS="$CCXXFLAGS -nologo" 1.957 - LDFLAGS="$LDFLAGS -nologo -opt:ref -incremental:no" 1.958 - if test "x$LEGACY_HOST_CPU1" = xi586; then 1.959 - LDFLAGS="$LDFLAGS -safeseh" 1.960 - fi 1.961 - # TODO: make -debug optional "--disable-full-debug-symbols" 1.962 - LDFLAGS="$LDFLAGS -debug" 1.963 -]) 1.964 -AC_SUBST(RC_FLAGS) 1.965 -AC_SUBST(COMPILER_TYPE) 1.966 - 1.967 -AC_PROG_CPP 1.968 -WHICHCMD(CPP) 1.969 - 1.970 -AC_PROG_CXXCPP 1.971 -WHICHCMD(CXXCPP) 1.972 - 1.973 -# Find the right assembler. 1.974 -if test "x$BUILD_OS" = xsolaris; then 1.975 - AC_PATH_PROG(AS, as) 1.976 - WHICHCMD(AS) 1.977 - ASFLAGS=" " 1.978 -else 1.979 - AS="$CC -c" 1.980 - ASFLAGS=" " 1.981 -fi 1.982 -AC_SUBST(AS) 1.983 -AC_SUBST(ASFLAGS) 1.984 - 1.985 -if test "x$HOST_CPU_BITS" = x32 && test "x$HOST_OS" = xmacosx; then 1.986 - # On 32-bit MacOSX the OS requires C-entry points to be 16 byte aligned. 1.987 - # While waiting for a better solution, the current workaround is to use -mstackrealign. 1.988 - CFLAGS="$CFLAGS -mstackrealign" 1.989 - AC_MSG_CHECKING([if 32-bit compiler supports -mstackrealign]) 1.990 - AC_LINK_IFELSE([AC_LANG_SOURCE([[int main() { return 0; }]])], 1.991 - [ 1.992 - AC_MSG_RESULT([yes]) 1.993 - ], 1.994 - [ 1.995 - AC_MSG_RESULT([no]) 1.996 - AC_MSG_ERROR([The selected compiler $CXX does not support -mstackrealign! Try to put another compiler in the path.]) 1.997 - ]) 1.998 -fi 1.999 - 1.1000 -if test "x$BUILD_OS" = xsolaris; then 1.1001 - AC_PATH_PROG(NM, nm) 1.1002 - WHICHCMD(NM) 1.1003 - AC_PATH_PROG(STRIP, strip) 1.1004 - WHICHCMD(STRIP) 1.1005 - AC_PATH_PROG(MCS, mcs) 1.1006 - WHICHCMD(MCS) 1.1007 -else 1.1008 - AC_CHECK_TOOL(NM, nm) 1.1009 - WHICHCMD(NM) 1.1010 - AC_CHECK_TOOL(STRIP, strip) 1.1011 - WHICHCMD(STRIP) 1.1012 -fi 1.1013 - 1.1014 -# When using cygwin, we need a wrapper binary that renames 1.1015 -# /cygdrive/c/ arguments into c:/ arguments and peeks into 1.1016 -# @files and rewrites these too! This wrapper binary is 1.1017 -# called uncygdrive.exe. 1.1018 -UNCYGDRIVE= 1.1019 -if test "x$BUILD_OS" = xwindows; then 1.1020 - AC_MSG_CHECKING([if uncygdrive can be created]) 1.1021 - UNCYGDRIVE_SRC=`$CYGPATH -m $SRC_ROOT/common/src/uncygdrive.c` 1.1022 - rm -f $OUTPUT_ROOT/uncygdrive* 1.1023 - UNCYGDRIVE=`$CYGPATH -m $OUTPUT_ROOT/uncygdrive.exe` 1.1024 - cd $OUTPUT_ROOT 1.1025 - $CC $UNCYGDRIVE_SRC /Fe$UNCYGDRIVE > $OUTPUT_ROOT/uncygdrive1.log 2>&1 1.1026 - cd $CURDIR 1.1027 - 1.1028 - if test ! -x $OUTPUT_ROOT/uncygdrive.exe; then 1.1029 - AC_MSG_RESULT([no]) 1.1030 - cat $OUTPUT_ROOT/uncygdrive1.log 1.1031 - AC_MSG_ERROR([Could not create $OUTPUT_ROOT/uncygdrive.exe]) 1.1032 - fi 1.1033 - AC_MSG_RESULT([$UNCYGDRIVE]) 1.1034 - AC_MSG_CHECKING([if uncygdrive.exe works]) 1.1035 - cd $OUTPUT_ROOT 1.1036 - $UNCYGDRIVE $CC $SRC_ROOT/common/src/uncygdrive.c /Fe$OUTPUT_ROOT/uncygdrive2.exe > $OUTPUT_ROOT/uncygdrive2.log 2>&1 1.1037 - cd $CURDIR 1.1038 - if test ! -x $OUTPUT_ROOT/uncygdrive2.exe; then 1.1039 - AC_MSG_RESULT([no]) 1.1040 - cat $OUTPUT_ROOT/uncygdrive2.log 1.1041 - AC_MSG_ERROR([Uncygdrive did not work!]) 1.1042 - fi 1.1043 - AC_MSG_RESULT([yes]) 1.1044 - rm -f $OUTPUT_ROOT/uncygdrive?.??? $OUTPUT_ROOT/uncygdrive.obj 1.1045 -fi 1.1046 - 1.1047 -AC_SUBST(UNCYGDRIVE) 1.1048 - 1.1049 -TESTFOR_PROG_CCACHE 1.1050 - 1.1051 -# Used on GNU/Linux systems, can be empty... 1.1052 -#AC_PATH_PROG(ELFDUMP, elfdump) 1.1053 - 1.1054 -# Setup default logging of stdout and stderr to build.log in the output root. 1.1055 -BUILD_LOG='$(OUTPUT_ROOT)/build.log' 1.1056 -BUILD_LOG_WRAPPER='$(SH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)' 1.1057 -AC_SUBST(BUILD_LOG) 1.1058 -AC_SUBST(BUILD_LOG_WRAPPER) 1.1059 +# To properly create a configuration name, we need to have the OpenJDK target 1.1060 +# and options (variants and debug level) parsed. 1.1061 +BASIC_SETUP_OUTPUT_DIR 1.1062 1.1063 ############################################################################### 1.1064 # 1.1065 -# Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code. 1.1066 -# (The JVM can use 32 or 64 bit Java pointers but that decision 1.1067 -# is made at runtime.) 1.1068 +# Setup BootJDK, used to bootstrap the build. 1.1069 # 1.1070 -AC_LANG_PUSH(C++) 1.1071 -OLD_CXXFLAGS="$CXXFLAGS" 1.1072 -if test "x$HOST_OS" = xsolaris && test "x$with_data_model" != x; then 1.1073 - CXXFLAGS="-m{$with_data_model} $CXXFLAGS" 1.1074 -fi 1.1075 -AC_CHECK_SIZEOF([int *], [1111]) 1.1076 -CXXFLAGS="$OLD_CXXFLAGS" 1.1077 -AC_LANG_POP(C++) 1.1078 +############################################################################### 1.1079 1.1080 -if test "x$ac_cv_sizeof_int_p" = x0; then 1.1081 - # The test failed, lets pick the assumed value. 1.1082 - ARCH_DATA_MODEL=$HOST_CPU_BITS 1.1083 -else 1.1084 - ARCH_DATA_MODEL=`expr 8 \* $ac_cv_sizeof_int_p` 1.1085 -fi 1.1086 - 1.1087 -if test "x$ARCH_DATA_MODEL" = x64; then 1.1088 - A_LP64="LP64:=" 1.1089 - ADD_LP64="-D_LP64=1" 1.1090 -fi 1.1091 -AC_MSG_CHECKING([for host address size]) 1.1092 -AC_MSG_RESULT([$ARCH_DATA_MODEL bits]) 1.1093 -AC_SUBST(LP64,$A_LP64) 1.1094 -AC_SUBST(ARCH_DATA_MODEL) 1.1095 - 1.1096 -if test "x$ARCH_DATA_MODEL" != "x$HOST_CPU_BITS"; then 1.1097 - AC_MSG_ERROR([The tested number of bits in the host ($ARCH_DATA_MODEL) differs from the number of bits expected to be found in the host ($HOST_CPU_BITS)]) 1.1098 -fi 1.1099 +BOOTJDK_SETUP_BOOT_JDK 1.1100 +BOOTJDK_SETUP_BOOT_JDK_ARGUMENTS 1.1101 1.1102 ############################################################################### 1.1103 # 1.1104 -# Can the C/C++ compiler use precompiled headers? 1.1105 +# Configure the sources to use. We can add or override individual directories. 1.1106 # 1.1107 -AC_ARG_ENABLE([precompiled-headers], [AS_HELP_STRING([--disable-precompiled-headers], 1.1108 - [use precompiled headers when compiling C++ @<:@enabled@:>@])], 1.1109 - [ENABLE_PRECOMPH=${enable_precompiled-headers}], [ENABLE_PRECOMPH=yes]) 1.1110 +############################################################################### 1.1111 1.1112 -USE_PRECOMPILED_HEADER=1 1.1113 -if test "x$ENABLE_PRECOMPH" = xno; then 1.1114 - USE_PRECOMPILED_HEADER=0 1.1115 -fi 1.1116 - 1.1117 -if test "x$ENABLE_PRECOMPH" = xyes; then 1.1118 - # Check that the compiler actually supports precomp headers. 1.1119 - if test "x$GCC" = xyes; then 1.1120 - AC_MSG_CHECKING([that precompiled headers work]) 1.1121 - echo "int alfa();" > conftest.h 1.1122 - $CXX -x c++-header conftest.h -o conftest.hpp.gch 1.1123 - if test ! -f conftest.hpp.gch; then 1.1124 - echo Precompiled header is not working! 1.1125 - USE_PRECOMPILED_HEADER=0 1.1126 - AC_MSG_RESULT([no]) 1.1127 - else 1.1128 - AC_MSG_RESULT([yes]) 1.1129 - fi 1.1130 - rm -f conftest.h 1.1131 - fi 1.1132 -fi 1.1133 - 1.1134 -AC_SUBST(USE_PRECOMPILED_HEADER) 1.1135 +SRCDIRS_SETUP_TOPDIRS 1.1136 +SRCDIRS_SETUP_ALTERNATIVE_TOPDIRS 1.1137 +SRCDIRS_SETUP_OUTPUT_DIRS 1.1138 1.1139 ############################################################################### 1.1140 # 1.1141 -# How to compile shared libraries. 1.1142 +# Setup the toolchain (compilers etc), i.e. the tools that need to be 1.1143 +# cross-compilation aware. 1.1144 # 1.1145 +############################################################################### 1.1146 1.1147 -if test "x$GCC" = xyes; then 1.1148 - COMPILER_NAME=gcc 1.1149 - PICFLAG="-fPIC" 1.1150 - LIBRARY_PREFIX=lib 1.1151 - SHARED_LIBRARY='lib$1.so' 1.1152 - STATIC_LIBRARY='lib$1.a' 1.1153 - SHARED_LIBRARY_FLAGS="-shared" 1.1154 - SHARED_LIBRARY_SUFFIX='.so' 1.1155 - STATIC_LIBRARY_SUFFIX='.a' 1.1156 - OBJ_SUFFIX='.o' 1.1157 - EXE_SUFFIX='' 1.1158 - SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1' 1.1159 - SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1' 1.1160 - C_FLAG_REORDER='' 1.1161 - CXX_FLAG_REORDER='' 1.1162 - SET_SHARED_LIBRARY_ORIGIN='-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$$$ORIGIN/$1' 1.1163 - LD="$CC" 1.1164 - LDEXE="$CC" 1.1165 - LDCXX="$CXX" 1.1166 - LDEXECXX="$CXX" 1.1167 - # TODO: for embedded set --strip-unneeded 1.1168 - POST_STRIP_CMD="$STRIP -g" 1.1169 +TOOLCHAIN_SETUP_SYSROOT_AND_OUT_OPTIONS 1.1170 +TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV 1.1171 +# Locate the actual tools 1.1172 +TOOLCHAIN_SETUP_PATHS 1.1173 1.1174 - # Linking is different on MacOSX 1.1175 - if test "x$BUILD_OS" = xmacosx; then 1.1176 - # Might change in the future to clang. 1.1177 - COMPILER_NAME=gcc 1.1178 - SHARED_LIBRARY='lib$1.dylib' 1.1179 - SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG" 1.1180 - SHARED_LIBRARY_SUFFIX='.dylib' 1.1181 - EXE_SUFFIX='' 1.1182 - SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1' 1.1183 - SET_SHARED_LIBRARY_MAPFILE='' 1.1184 - SET_SHARED_LIBRARY_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.' 1.1185 - POST_STRIP_CMD="$STRIP -S" 1.1186 - fi 1.1187 -else 1.1188 - if test "x$BUILD_OS" = xsolaris; then 1.1189 - # If it is not gcc, then assume it is the Oracle Solaris Studio Compiler 1.1190 - COMPILER_NAME=ossc 1.1191 - PICFLAG="-KPIC" 1.1192 - LIBRARY_PREFIX=lib 1.1193 - SHARED_LIBRARY='lib$1.so' 1.1194 - STATIC_LIBRARY='lib$1.a' 1.1195 - SHARED_LIBRARY_FLAGS="-G" 1.1196 - SHARED_LIBRARY_SUFFIX='.so' 1.1197 - STATIC_LIBRARY_SUFFIX='.a' 1.1198 - OBJ_SUFFIX='.o' 1.1199 - EXE_SUFFIX='' 1.1200 - SET_SHARED_LIBRARY_NAME='' 1.1201 - SET_SHARED_LIBRARY_MAPFILE='-M $1' 1.1202 - C_FLAG_REORDER='-xF' 1.1203 - CXX_FLAG_REORDER='-xF' 1.1204 - SET_SHARED_LIBRARY_ORIGIN='-R \$$$$ORIGIN/$1' 1.1205 - CFLAGS_JDKLIB_EXTRA='-xstrconst -D__solaris__' 1.1206 - POST_STRIP_CMD="$STRIP -x" 1.1207 - POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\"" 1.1208 - fi 1.1209 - if test "x$BUILD_OS" = xwindows; then 1.1210 - # If it is not gcc, then assume it is the MS Visual Studio compiler 1.1211 - COMPILER_NAME=cl 1.1212 - PICFLAG="" 1.1213 - LIBRARY_PREFIX= 1.1214 - SHARED_LIBRARY='$1.dll' 1.1215 - STATIC_LIBRARY='$1.lib' 1.1216 - SHARED_LIBRARY_FLAGS="-LD" 1.1217 - SHARED_LIBRARY_SUFFIX='.dll' 1.1218 - STATIC_LIBRARY_SUFFIX='.lib' 1.1219 - OBJ_SUFFIX='.obj' 1.1220 - EXE_SUFFIX='.exe' 1.1221 - SET_SHARED_LIBRARY_NAME='' 1.1222 - SET_SHARED_LIBRARY_MAPFILE='' 1.1223 - SET_SHARED_LIBRARY_ORIGIN='' 1.1224 - fi 1.1225 -fi 1.1226 +# FIXME: Currently we must test this after paths but before flags. Fix! 1.1227 1.1228 -AC_SUBST(OBJ_SUFFIX) 1.1229 -AC_SUBST(SHARED_LIBRARY) 1.1230 -AC_SUBST(STATIC_LIBRARY) 1.1231 -AC_SUBST(LIBRARY_PREFIX) 1.1232 -AC_SUBST(SHARED_LIBRARY_SUFFIX) 1.1233 -AC_SUBST(STATIC_LIBRARY_SUFFIX) 1.1234 -AC_SUBST(EXE_SUFFIX) 1.1235 -AC_SUBST(SHARED_LIBRARY_FLAGS) 1.1236 -AC_SUBST(SET_SHARED_LIBRARY_NAME) 1.1237 -AC_SUBST(SET_SHARED_LIBRARY_MAPFILE) 1.1238 -AC_SUBST(C_FLAG_REORDER) 1.1239 -AC_SUBST(CXX_FLAG_REORDER) 1.1240 -AC_SUBST(SET_SHARED_LIBRARY_ORIGIN) 1.1241 -AC_SUBST(POST_STRIP_CMD) 1.1242 -AC_SUBST(POST_MCS_CMD) 1.1243 +# And we can test some aspects on the target using configure macros. 1.1244 +PLATFORM_TEST_OPENJDK_TARGET_BITS 1.1245 +PLATFORM_SETUP_OPENJDK_TARGET_ENDIANNESS 1.1246 1.1247 -# The (cross) compiler is now configured, we can now test capabilities 1.1248 -# of the host platform. 1.1249 +# Configure flags for the tools 1.1250 +TOOLCHAIN_SETUP_COMPILER_FLAGS_FOR_LIBS 1.1251 +TOOLCHAIN_SETUP_COMPILER_FLAGS_FOR_OPTIMIZATION 1.1252 +TOOLCHAIN_SETUP_COMPILER_FLAGS_FOR_JDK 1.1253 + 1.1254 +# After we have toolchain, we can compile the uncygdrive helper 1.1255 +BASIC_COMPILE_UNCYGDRIVE 1.1256 + 1.1257 + 1.1258 +# Setup debug symbols (need objcopy from the toolchain for that) 1.1259 +JDKOPT_SETUP_DEBUG_SYMBOLS 1.1260 1.1261 ############################################################################### 1.1262 # 1.1263 -# Is the host little of big endian? 1.1264 +# Check dependencies for external and internal libraries. 1.1265 # 1.1266 -AC_C_BIGENDIAN([ENDIAN="big"],[ENDIAN="little"],[ENDIAN="unknown"],[ENDIAN="universal"]) 1.1267 +############################################################################### 1.1268 1.1269 -if test "x$ENDIAN" = xuniversal; then 1.1270 - AC_MSG_ERROR([It seems like someone needs to decide how we are to deal with universal binaries on the MacOSX?]) 1.1271 -fi 1.1272 -if test "x$ENDIAN" = xunknown; then 1.1273 - ENDIAN="$HOST_CPU_ENDIAN" 1.1274 -fi 1.1275 -if test "x$ENDIAN" != "x$HOST_CPU_ENDIAN"; then 1.1276 - AC_MSG_WARN([The tested endian in the host ($ENDIAN) differs from the endian expected to be found in the host ($HOST_CPU_ENDIAN)]) 1.1277 - ENDIAN="$HOST_CPU_ENDIAN" 1.1278 -fi 1.1279 -AC_SUBST(ENDIAN) 1.1280 +LIB_SETUP_INIT 1.1281 +LIB_SETUP_X11 1.1282 +LIB_SETUP_CUPS 1.1283 +LIB_SETUP_FREETYPE 1.1284 +LIB_SETUP_ALSA 1.1285 +LIB_SETUP_MISC_LIBS 1.1286 +LIB_SETUP_STATIC_LINK_LIBSTDCPP 1.1287 1.1288 ############################################################################### 1.1289 # 1.1290 -# We need a Boot JDK to bootstrap the build. 1.1291 +# We need to do some final tweaking, when everything else is done. 1.1292 # 1.1293 -BOOT_JDK_FOUND=no 1.1294 -AC_ARG_WITH(boot-jdk, [AS_HELP_STRING([--with-boot-jdk], 1.1295 - [path to Boot JDK (used to bootstrap build) @<:@probed@:>@])]) 1.1296 - 1.1297 -if test "x$with_boot_jdk" != x; then 1.1298 - BOOT_JDK=$with_boot_jdk 1.1299 - BOOT_JDK_FOUND=yes 1.1300 -fi 1.1301 -if test "x$BOOT_JDK_FOUND" = xno; then 1.1302 - BDEPS_CHECK_MODULE(BOOT_JDK, boot-jdk, xxx, [BOOT_JDK_FOUND=yes], [BOOT_JDK_FOUND=no]) 1.1303 -fi 1.1304 +############################################################################### 1.1305 1.1306 -if test "x$BOOT_JDK_FOUND" = xno; then 1.1307 - if test "x$JAVA_HOME" != x; then 1.1308 - if test ! -d "$JAVA_HOME"; then 1.1309 - AC_MSG_ERROR([Your JAVA_HOME points to a non-existing directory!]) 1.1310 - fi 1.1311 - # Aha, the user has set a JAVA_HOME 1.1312 - # let us use that as the Boot JDK. 1.1313 - BOOT_JDK="$JAVA_HOME" 1.1314 - BOOT_JDK_FOUND=yes 1.1315 - # To be on the safe side, lets check that it is a JDK. 1.1316 - if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then 1.1317 - JAVAC="$BOOT_JDK/bin/javac" 1.1318 - JAVA="$BOOT_JDK/bin/java" 1.1319 - BOOT_JDK_FOUND=yes 1.1320 - else 1.1321 - AC_MSG_ERROR([Your JAVA_HOME points to a JRE! The build needs a JDK! Please point JAVA_HOME to a JDK. JAVA_HOME=[$]JAVA_HOME]) 1.1322 - fi 1.1323 - fi 1.1324 -fi 1.1325 - 1.1326 -if test "x$BOOT_JDK_FOUND" = xno; then 1.1327 - AC_PATH_PROG(JAVAC_CHECK, javac) 1.1328 - AC_PATH_PROG(JAVA_CHECK, java) 1.1329 - BINARY="$JAVAC_CHECK" 1.1330 - if test "x$JAVAC_CHECK" = x; then 1.1331 - BINARY="$JAVA_CHECK" 1.1332 - fi 1.1333 - if test "x$BINARY" != x; then 1.1334 - # So there is a java(c) binary, it might be part of a JDK. 1.1335 - # Lets find the JDK/JRE directory by following symbolic links. 1.1336 - # Linux/GNU systems often have links from /usr/bin/java to 1.1337 - # /etc/alternatives/java to the real JDK binary. 1.1338 - WHICHCMD_SPACESAFE(BINARY,[path to javac]) 1.1339 - REMOVE_SYMBOLIC_LINKS(BINARY) 1.1340 - BOOT_JDK=`dirname $BINARY` 1.1341 - BOOT_JDK=`cd $BOOT_JDK/..; pwd` 1.1342 - if test -x $BOOT_JDK/bin/javac && test -x $BOOT_JDK/bin/java; then 1.1343 - JAVAC=$BOOT_JDK/bin/javac 1.1344 - JAVA=$BOOT_JDK/bin/java 1.1345 - BOOT_JDK_FOUND=yes 1.1346 - fi 1.1347 - fi 1.1348 -fi 1.1349 - 1.1350 -if test "x$BOOT_JDK_FOUND" = xno; then 1.1351 - # Try the MacOSX way. 1.1352 - if test -x /usr/libexec/java_home; then 1.1353 - BOOT_JDK=`/usr/libexec/java_home` 1.1354 - if test -x $BOOT_JDK/bin/javac && test -x $BOOT_JDK/bin/java; then 1.1355 - JAVAC=$BOOT_JDK/bin/javac 1.1356 - JAVA=$BOOT_JDK/bin/java 1.1357 - BOOT_JDK_FOUND=yes 1.1358 - fi 1.1359 - fi 1.1360 -fi 1.1361 - 1.1362 -if test "x$BOOT_JDK_FOUND" = xno; then 1.1363 - AC_PATH_PROG(JAVA_CHECK, java) 1.1364 - if test "x$JAVA_CHECK" != x; then 1.1365 - # There is a java in the path. But apparently we have not found a javac 1.1366 - # in the path, since that would have been tested earlier. 1.1367 - if test "x$HOST_OS" = xwindows; then 1.1368 - # Now if this is a windows platform. The default installation of a JDK 1.1369 - # actually puts the JRE in the path and keeps the JDK out of the path! 1.1370 - # Go look in the default installation location. 1.1371 - BOOT_JDK=/cygdrive/c/Program\ Files/Java/`ls /cygdrive/c/Program\ Files/Java | grep jdk | sort -r | head --lines 1` 1.1372 - if test -d "$BOOT_JDK"; then 1.1373 - BOOT_JDK_FOUND=yes 1.1374 - fi 1.1375 - fi 1.1376 - if test "x$BOOT_JDK_FOUND" = xno; then 1.1377 - help_on_build_dependency openjdk 1.1378 - AC_MSG_ERROR([Found a JRE, not not a JDK! Please remove the JRE from your path and put a JDK there instead. $HELP_MSG]) 1.1379 - fi 1.1380 - else 1.1381 - help_on_build_dependency openjdk 1.1382 - AC_MSG_ERROR([Could not find a JDK. $HELP_MSG]) 1.1383 - fi 1.1384 -fi 1.1385 - 1.1386 -WIN_FIX_PATH(BOOT_JDK) 1.1387 - 1.1388 -# Now see if we can find the rt.jar, or its nearest equivalent. 1.1389 -BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar" 1.1390 -SPACESAFE(BOOT_RTJAR,[the path to the Boot JDK rt.jar (or nearest equivalent)]) 1.1391 - 1.1392 -BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar" 1.1393 -SPACESAFE(BOOT_TOOLSJAR,[the path to the Boot JDK tools.jar (or nearest equivalent)]) 1.1394 - 1.1395 -if test ! -f $BOOT_RTJAR; then 1.1396 - # On MacOSX it is called classes.jar 1.1397 - BOOT_RTJAR=$BOOT_JDK/../Classes/classes.jar 1.1398 - if test ! -f $BOOT_RTJAR; then 1.1399 - AC_MSG_ERROR([Cannot find the rt.jar or its equivalent!]) 1.1400 - fi 1.1401 - # Remove the .. 1.1402 - BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}" 1.1403 - # The tools.jar is part of classes.jar 1.1404 - BOOT_TOOLSJAR="$BOOT_RTJAR" 1.1405 -fi 1.1406 - 1.1407 -AC_SUBST(BOOT_JDK) 1.1408 -AC_SUBST(BOOT_RTJAR) 1.1409 -AC_SUBST(BOOT_TOOLSJAR) 1.1410 -AC_MSG_CHECKING([for Boot JDK]) 1.1411 -AC_MSG_RESULT([$BOOT_JDK]) 1.1412 -AC_MSG_CHECKING([for Boot rt.jar]) 1.1413 -AC_MSG_RESULT([$BOOT_RTJAR]) 1.1414 -AC_MSG_CHECKING([for Boot tools.jar]) 1.1415 -AC_MSG_RESULT([$BOOT_TOOLSJAR]) 1.1416 - 1.1417 -# Use the java tool from the Boot JDK. 1.1418 -AC_MSG_CHECKING([for java in Boot JDK]) 1.1419 -JAVA=$BOOT_JDK/bin/java 1.1420 -if test ! -x $JAVA; then 1.1421 - AC_MSG_ERROR([Could not find a working java]) 1.1422 -fi 1.1423 -BOOT_JDK_VERSION=`$JAVA -version 2>&1 | head -n 1` 1.1424 -AC_MSG_RESULT([yes $BOOT_JDK_VERSION]) 1.1425 -AC_SUBST(JAVA) 1.1426 - 1.1427 -# Extra M4 quote needed to protect [] in grep expression. 1.1428 -[FOUND_VERSION_78=`echo $BOOT_JDK_VERSION | grep '\"1\.[78]\.'`] 1.1429 -if test "x$FOUND_VERSION_78" = x; then 1.1430 - help_on_build_dependency openjdk 1.1431 - AC_MSG_ERROR([Your boot-jdk must be version 7 or 8. $HELP_MSG]) 1.1432 -fi 1.1433 - 1.1434 -# When compiling code to be executed by the Boot JDK, force jdk7 compatibility. 1.1435 -BOOT_JDK_SOURCETARGET="-source 7 -target 7" 1.1436 -AC_SUBST(BOOT_JDK_SOURCETARGET) 1.1437 - 1.1438 -# Use the javac tool from the Boot JDK. 1.1439 -AC_MSG_CHECKING([for javac in Boot JDK]) 1.1440 -JAVAC=$BOOT_JDK/bin/javac 1.1441 -if test ! -x $JAVAC; then 1.1442 - AC_MSG_ERROR([Could not find a working javac]) 1.1443 -fi 1.1444 -AC_MSG_RESULT(yes) 1.1445 -AC_SUBST(JAVAC) 1.1446 -AC_SUBST(JAVAC_FLAGS) 1.1447 - 1.1448 -# Use the javah tool from the Boot JDK. 1.1449 -AC_MSG_CHECKING([for javah in Boot JDK]) 1.1450 -JAVAH=$BOOT_JDK/bin/javah 1.1451 -if test ! -x $JAVAH; then 1.1452 - AC_MSG_ERROR([Could not find a working javah]) 1.1453 -fi 1.1454 -AC_MSG_RESULT(yes) 1.1455 -AC_SUBST(JAVAH) 1.1456 - 1.1457 -# Use the jar tool from the Boot JDK. 1.1458 -AC_MSG_CHECKING([for jar in Boot JDK]) 1.1459 -JAR=$BOOT_JDK/bin/jar 1.1460 -if test ! -x $JAR; then 1.1461 - AC_MSG_ERROR([Could not find a working jar]) 1.1462 -fi 1.1463 -AC_SUBST(JAR) 1.1464 -AC_MSG_RESULT(yes) 1.1465 - 1.1466 -# Use the rmic tool from the Boot JDK. 1.1467 -AC_MSG_CHECKING([for rmic in Boot JDK]) 1.1468 -RMIC=$BOOT_JDK/bin/rmic 1.1469 -if test ! -x $RMIC; then 1.1470 - AC_MSG_ERROR([Could not find a working rmic]) 1.1471 -fi 1.1472 -AC_SUBST(RMIC) 1.1473 -AC_MSG_RESULT(yes) 1.1474 - 1.1475 -# Use the native2ascii tool from the Boot JDK. 1.1476 -AC_MSG_CHECKING([for native2ascii in Boot JDK]) 1.1477 -NATIVE2ASCII=$BOOT_JDK/bin/native2ascii 1.1478 -if test ! -x $NATIVE2ASCII; then 1.1479 - AC_MSG_ERROR([Could not find a working native2ascii]) 1.1480 -fi 1.1481 -AC_MSG_RESULT(yes) 1.1482 -AC_SUBST(NATIVE2ASCII) 1.1483 +JDKOPT_SETUP_BUILD_TWEAKS 1.1484 1.1485 ############################################################################### 1.1486 # 1.1487 -# Pickup additional source for a component from outside of the source root 1.1488 -# or override source for a component. 1.1489 +# Configure parts of the build that only affect the build performance, 1.1490 +# not the result. 1.1491 # 1.1492 -AC_ARG_WITH(add-source-root, [AS_HELP_STRING([--with-add-source-root], 1.1493 - [for each and every source directory, look in this additional source root for 1.1494 - the same directory; if it exists and have files in it, include it in the build])]) 1.1495 - 1.1496 -AC_ARG_WITH(override-source-root, [AS_HELP_STRING([--with-override-source-root], 1.1497 - [for each and every source directory, look in this override source root for 1.1498 - the same directory; if it exists, use that directory instead and 1.1499 - ignore the directory in the original source root])]) 1.1500 +############################################################################### 1.1501 1.1502 -AC_ARG_WITH(adds-and-overrides, [AS_HELP_STRING([--with-adds-and-overrides], 1.1503 - [use the subdirs 'adds' and 'overrides' in the specified directory as 1.1504 - add-source-root and override-source-root])]) 1.1505 +BPERF_SETUP_BUILD_CORES 1.1506 +BPERF_SETUP_BUILD_MEMORY 1.1507 1.1508 -if test "x$with_adds_and_overrides" != x; then 1.1509 - with_add_source_root="$with_adds_and_overrides/adds" 1.1510 - with_override_source_root="$with_adds_and_overrides/overrides" 1.1511 -fi 1.1512 +# Setup smart javac (after cores and memory have been setup) 1.1513 +BPERF_SETUP_SMART_JAVAC 1.1514 1.1515 -if test "x$with_add_source_root" != x; then 1.1516 - if ! test -d $with_add_source_root; then 1.1517 - AC_MSG_ERROR([Trying to use a non-existant add-source-root $with_add_source_root]) 1.1518 - fi 1.1519 - CURDIR="$PWD" 1.1520 - cd "$with_add_source_root" 1.1521 - ADD_SRC_ROOT="`pwd`" 1.1522 - cd "$CURDIR" 1.1523 - # Verify that the addon source root does not have any root makefiles. 1.1524 - # If it does, then it is usually an error, prevent this. 1.1525 - if test -f $with_add_source_root/langtools/makefiles/Makefile || \ 1.1526 - test -f $with_add_source_root/langtools/make/Makefile; then 1.1527 - AC_MSG_ERROR([Your add source root seems to contain a full langtools repo! An add source root should only contain additional sources.]) 1.1528 - fi 1.1529 - if test -f $with_add_source_root/corba/makefiles/Makefile || \ 1.1530 - test -f $with_add_source_root/corba/make/Makefile; then 1.1531 - AC_MSG_ERROR([Your add source root seems to contain a full corba repo! An add source root should only contain additional sources.]) 1.1532 - fi 1.1533 - if test -f $with_add_source_root/jaxp/makefiles/Makefile || \ 1.1534 - test -f $with_add_source_root/jaxp/make/Makefile; then 1.1535 - AC_MSG_ERROR([Your add source root seems to contain a full jaxp repo! An add source root should only contain additional sources.]) 1.1536 - fi 1.1537 - if test -f $with_add_source_root/jaxws/makefiles/Makefile || \ 1.1538 - test -f $with_add_source_root/jaxws/make/Makefile; then 1.1539 - AC_MSG_ERROR([Your add source root seems to contain a full jaxws repo! An add source root should only contain additional sources.]) 1.1540 - fi 1.1541 - if test -f $with_add_source_root/hotspot/makefiles/Makefile || \ 1.1542 - test -f $with_add_source_root/hotspot/make/Makefile; then 1.1543 - AC_MSG_ERROR([Your add source root seems to contain a full hotspot repo! An add source root should only contain additional sources.]) 1.1544 - fi 1.1545 - if test -f $with_add_source_root/jdk/makefiles/Makefile || \ 1.1546 - test -f $with_add_source_root/jdk/make/Makefile; then 1.1547 - AC_MSG_ERROR([Your add source root seems to contain a full JDK repo! An add source root should only contain additional sources.]) 1.1548 - fi 1.1549 -fi 1.1550 -AC_SUBST(ADD_SRC_ROOT) 1.1551 +# Can the C/C++ compiler use precompiled headers? 1.1552 +BPERF_SETUP_PRECOMPILED_HEADERS 1.1553 1.1554 -if test "x$with_override_source_root" != x; then 1.1555 - if ! test -d $with_override_source_root; then 1.1556 - AC_MSG_ERROR([Trying to use a non-existant override-source-root $with_override_source_root]) 1.1557 - fi 1.1558 - CURDIR="$PWD" 1.1559 - cd "$with_override_source_root" 1.1560 - OVERRIDE_SRC_ROOT="`pwd`" 1.1561 - cd "$CURDIR" 1.1562 - if test -f $with_override_source_root/langtools/makefiles/Makefile || \ 1.1563 - test -f $with_override_source_root/langtools/make/Makefile; then 1.1564 - AC_MSG_ERROR([Your override source root seems to contain a full langtools repo! An override source root should only contain sources that override.]) 1.1565 - fi 1.1566 - if test -f $with_override_source_root/corba/makefiles/Makefile || \ 1.1567 - test -f $with_override_source_root/corba/make/Makefile; then 1.1568 - AC_MSG_ERROR([Your override source root seems to contain a full corba repo! An override source root should only contain sources that override.]) 1.1569 - fi 1.1570 - if test -f $with_override_source_root/jaxp/makefiles/Makefile || \ 1.1571 - test -f $with_override_source_root/jaxp/make/Makefile; then 1.1572 - AC_MSG_ERROR([Your override source root seems to contain a full jaxp repo! An override source root should only contain sources that override.]) 1.1573 - fi 1.1574 - if test -f $with_override_source_root/jaxws/makefiles/Makefile || \ 1.1575 - test -f $with_override_source_root/jaxws/make/Makefile; then 1.1576 - AC_MSG_ERROR([Your override source root seems to contain a full jaxws repo! An override source root should only contain sources that override.]) 1.1577 - fi 1.1578 - if test -f $with_override_source_root/hotspot/makefiles/Makefile || \ 1.1579 - test -f $with_override_source_root/hotspot/make/Makefile; then 1.1580 - AC_MSG_ERROR([Your override source root seems to contain a full hotspot repo! An override source root should only contain sources that override.]) 1.1581 - fi 1.1582 - if test -f $with_override_source_root/jdk/makefiles/Makefile || \ 1.1583 - test -f $with_override_source_root/jdk/make/Makefile; then 1.1584 - AC_MSG_ERROR([Your override source root seems to contain a full JDK repo! An override source root should only contain sources that override.]) 1.1585 - fi 1.1586 -fi 1.1587 -AC_SUBST(OVERRIDE_SRC_ROOT) 1.1588 +# Setup use of ccache, if available 1.1589 +BPERF_SETUP_CCACHE 1.1590 1.1591 ############################################################################### 1.1592 # 1.1593 -# Override a repo completely, this is used for example when you have 3 small 1.1594 -# development sandboxes of the langtools sources and want to avoid having 3 full 1.1595 -# OpenJDK sources checked out on disk. 1.1596 +# And now the finish... 1.1597 # 1.1598 -# Assuming that the 3 langtools sandboxes are located here: 1.1599 -# /home/fredrik/sandbox1/langtools 1.1600 -# /home/fredrik/sandbox2/langtools 1.1601 -# /home/fredrik/sandbox3/langtools 1.1602 -# 1.1603 -# From the source root you create build subdirs manually: 1.1604 -# mkdir -p build1 build2 build3 1.1605 -# in each build directory run: 1.1606 -# (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make) 1.1607 -# (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make) 1.1608 -# (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make) 1.1609 -# 1.1610 - 1.1611 -AC_ARG_WITH(override-langtools, [AS_HELP_STRING([--with-override-langtools], 1.1612 - [use this langtools dir for the build])]) 1.1613 - 1.1614 -AC_ARG_WITH(override-corba, [AS_HELP_STRING([--with-override-corba], 1.1615 - [use this corba dir for the build])]) 1.1616 - 1.1617 -AC_ARG_WITH(override-jaxp, [AS_HELP_STRING([--with-override-jaxp], 1.1618 - [use this jaxp dir for the build])]) 1.1619 - 1.1620 -AC_ARG_WITH(override-jaxws, [AS_HELP_STRING([--with-override-jaxws], 1.1621 - [use this jaxws dir for the build])]) 1.1622 - 1.1623 -AC_ARG_WITH(override-hotspot, [AS_HELP_STRING([--with-override-hotspot], 1.1624 - [use this hotspot dir for the build])]) 1.1625 - 1.1626 -AC_ARG_WITH(override-jdk, [AS_HELP_STRING([--with-override-jdk], 1.1627 - [use this jdk dir for the build])]) 1.1628 - 1.1629 -if test "x$with_override_langtools" != x; then 1.1630 - CURDIR="$PWD" 1.1631 - cd "$with_override_langtools" 1.1632 - LANGTOOLS_TOPDIR="`pwd`" 1.1633 - cd "$CURDIR" 1.1634 - if ! test -f $LANGTOOLS_TOPDIR/makefiles/Makefile; then 1.1635 - AC_MSG_ERROR([You have to override langtools with a full langtools repo!]) 1.1636 - fi 1.1637 - AC_MSG_CHECKING([if langtools should be overridden]) 1.1638 - AC_MSG_RESULT([yes with $LANGTOOLS_TOPDIR]) 1.1639 -fi 1.1640 -if test "x$with_override_corba" != x; then 1.1641 - CURDIR="$PWD" 1.1642 - cd "$with_override_corba" 1.1643 - CORBA_TOPDIR="`pwd`" 1.1644 - cd "$CURDIR" 1.1645 - if ! test -f $CORBA_TOPDIR/makefiles/Makefile; then 1.1646 - AC_MSG_ERROR([You have to override corba with a full corba repo!]) 1.1647 - fi 1.1648 - AC_MSG_CHECKING([if corba should be overridden]) 1.1649 - AC_MSG_RESULT([yes with $CORBA_TOPDIR]) 1.1650 -fi 1.1651 -if test "x$with_override_jaxp" != x; then 1.1652 - CURDIR="$PWD" 1.1653 - cd "$with_override_jaxp" 1.1654 - JAXP_TOPDIR="`pwd`" 1.1655 - cd "$CURDIR" 1.1656 - if ! test -f $JAXP_TOPDIR/makefiles/Makefile; then 1.1657 - AC_MSG_ERROR([You have to override jaxp with a full jaxp repo!]) 1.1658 - fi 1.1659 - AC_MSG_CHECKING([if jaxp should be overridden]) 1.1660 - AC_MSG_RESULT([yes with $JAXP_TOPDIR]) 1.1661 -fi 1.1662 -if test "x$with_override_jaxws" != x; then 1.1663 - CURDIR="$PWD" 1.1664 - cd "$with_override_jaxws" 1.1665 - JAXWS_TOPDIR="`pwd`" 1.1666 - cd "$CURDIR" 1.1667 - if ! test -f $JAXWS_TOPDIR/makefiles/Makefile; then 1.1668 - AC_MSG_ERROR([You have to override jaxws with a full jaxws repo!]) 1.1669 - fi 1.1670 - AC_MSG_CHECKING([if jaxws should be overridden]) 1.1671 - AC_MSG_RESULT([yes with $JAXWS_TOPDIR]) 1.1672 -fi 1.1673 -if test "x$with_override_hotspot" != x; then 1.1674 - CURDIR="$PWD" 1.1675 - cd "$with_override_hotspot" 1.1676 - HOTSPOT_TOPDIR="`pwd`" 1.1677 - cd "$CURDIR" 1.1678 - if ! test -f $HOTSPOT_TOPDIR/make/Makefile && \ 1.1679 - ! test -f $HOTSPOT_TOPDIR/makefiles/Makefile; then 1.1680 - AC_MSG_ERROR([You have to override hotspot with a full hotspot repo!]) 1.1681 - fi 1.1682 - AC_MSG_CHECKING([if hotspot should be overridden]) 1.1683 - AC_MSG_RESULT([yes with $HOTSPOT_TOPDIR]) 1.1684 -fi 1.1685 -if test "x$with_override_jdk" != x; then 1.1686 - CURDIR="$PWD" 1.1687 - cd "$with_override_jdk" 1.1688 - JDK_TOPDIR="`pwd`" 1.1689 - cd "$CURDIR" 1.1690 - if ! test -f $JDK_TOPDIR/makefiles/Makefile; then 1.1691 - AC_MSG_ERROR([You have to override JDK with a full JDK repo!]) 1.1692 - fi 1.1693 - AC_MSG_CHECKING([if JDK should be overridden]) 1.1694 - AC_MSG_RESULT([yes with $JDK_TOPDIR]) 1.1695 -fi 1.1696 - 1.1697 -############################################################################### 1.1698 -# 1.1699 -# Specify options for anything that is run with the Boot JDK. 1.1700 -# 1.1701 -AC_ARG_WITH(boot-jdk-jvmargs, [AS_HELP_STRING([--with-boot-jdk-jvmargs], 1.1702 - [specify JVM arguments to be passed to all invocations of the Boot JDK, overriding the default values, 1.1703 - e.g --with-boot-jdk-jvmargs="-Xmx8G -enableassertions"])]) 1.1704 - 1.1705 -if test "x$with_boot_jdk_jvmargs" = x; then 1.1706 - # Not all JVM:s accept the same arguments on the command line. 1.1707 - # OpenJDK specific increase in thread stack for JDK build, 1.1708 - # well more specifically, when running javac. 1.1709 - if test "x$BUILD_NUM_BITS" = x32; then 1.1710 - STACK_SIZE=768 1.1711 - else 1.1712 - # Running Javac on a JVM on a 64-bit machine, the stack takes more space 1.1713 - # since 64-bit pointers are pushed on the stach. Apparently, we need 1.1714 - # to increase the stack space when javacing the JDK.... 1.1715 - STACK_SIZE=1536 1.1716 - fi 1.1717 - 1.1718 - # Minimum amount of heap memory. 1.1719 - ADD_JVM_ARG_IF_OK([-Xms64M],boot_jdk_jvmargs,[$JAVA]) 1.1720 - if test "x$HOST_OS" = "xmacosx"; then 1.1721 - # Why does macosx need more heap? Its the huge JDK batch. 1.1722 - ADD_JVM_ARG_IF_OK([-Xmx1600M],boot_jdk_jvmargs,[$JAVA]) 1.1723 - else 1.1724 - ADD_JVM_ARG_IF_OK([-Xmx1100M],boot_jdk_jvmargs,[$JAVA]) 1.1725 - fi 1.1726 - # When is adding -client something that speeds up the JVM? 1.1727 - # ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA]) 1.1728 - ADD_JVM_ARG_IF_OK([-XX:PermSize=32m],boot_jdk_jvmargs,[$JAVA]) 1.1729 - ADD_JVM_ARG_IF_OK([-XX:MaxPermSize=160m],boot_jdk_jvmargs,[$JAVA]) 1.1730 - ADD_JVM_ARG_IF_OK([-XX:ThreadStackSize=$STACK_SIZE],boot_jdk_jvmargs,[$JAVA]) 1.1731 - # Disable special log output when a debug build is used as Boot JDK... 1.1732 - ADD_JVM_ARG_IF_OK([-XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput],boot_jdk_jvmargs,[$JAVA]) 1.1733 -fi 1.1734 - 1.1735 -AC_SUBST(BOOT_JDK_JVMARGS, $boot_jdk_jvmargs) 1.1736 - 1.1737 -AC_ARG_WITH(server-java, [AS_HELP_STRING([--with-server-java], 1.1738 - [use this java binary for running the javac background server and other long running java tasks in the build process, 1.1739 - e.g. ---with-server-java="/opt/jrockit/bin/java -server"])]) 1.1740 - 1.1741 -if test "x$with_server_java" != x; then 1.1742 - SERVER_JAVA="$with_server_java" 1.1743 - FOUND_VERSION=`$SERVER_JAVA -version 2>&1 | grep " version \""` 1.1744 - if test "x$FOUND_VERSION" = x; then 1.1745 - AC_MSG_ERROR([Could not execute server java: $SERVER_JAVA]) 1.1746 - fi 1.1747 -else 1.1748 - SERVER_JAVA="" 1.1749 - # Hotspot specific options. 1.1750 - ADD_JVM_ARG_IF_OK([-XX:+UseParallelOldGC],SERVER_JAVA,[$JAVA]) 1.1751 - ADD_JVM_ARG_IF_OK([-verbosegc],SERVER_JAVA,[$JAVA]) 1.1752 - # JRockit specific options. 1.1753 - ADD_JVM_ARG_IF_OK([-Xverbose:gc],SERVER_JAVA,[$JAVA]) 1.1754 - SERVER_JAVA="$JAVA $SERVER_JAVA" 1.1755 -fi 1.1756 -AC_SUBST(SERVER_JAVA) 1.1757 - 1.1758 -AC_MSG_CHECKING([whether to use shared server for javac]) 1.1759 -AC_ARG_ENABLE([javac-server], [AS_HELP_STRING([--enable-javac-server], 1.1760 - [enable the shared javac server during the build process @<:@disabled@:>@])], 1.1761 - [ENABLE_JAVAC_SERVER="${enableval}"], [ENABLE_JAVAC_SERVER='no']) 1.1762 -AC_MSG_RESULT([$ENABLE_JAVAC_SERVER]) 1.1763 -if test "x$ENABLE_JAVAC_SERVER" = xyes; then 1.1764 - JAVAC_USE_REMOTE=true 1.1765 - JAVAC_SERVERS="$OUTPUT_ROOT/javacservers" 1.1766 -else 1.1767 - JAVAC_USE_REMOTE=false 1.1768 - JAVAC_SERVERS= 1.1769 -fi 1.1770 -AC_SUBST(JAVAC_USE_REMOTE) 1.1771 -AC_SUBST(JAVAC_SERVERS) 1.1772 - 1.1773 -AC_ARG_WITH(javac-server-cores, [AS_HELP_STRING([--with-javac-server-cores], 1.1774 - [use at most this number of concurrent threads on the javac server @<:@probed@:>@])]) 1.1775 -if test "x$with_javac_server_cores" != x; then 1.1776 - JAVAC_SERVER_CORES="$with_javac_server_cores" 1.1777 -else 1.1778 - if test "$NUM_CORES" -gt 16; then 1.1779 - # We set this arbitrary limit because we want to limit the heap 1.1780 - # size of the javac server. 1.1781 - # In the future we will make the javac compilers in the server 1.1782 - # share more and more state, thus enabling us to use more and 1.1783 - # more concurrent threads in the server. 1.1784 - JAVAC_SERVER_CORES="16" 1.1785 - else 1.1786 - JAVAC_SERVER_CORES="$NUM_CORES" 1.1787 - fi 1.1788 - 1.1789 - if test "$MEMORY_SIZE" -gt "17000"; then 1.1790 - MAX_HEAP_MEM=10000 1.1791 - ADD_JVM_ARG_IF_OK([-d64],SERVER_JAVA,[$SERVER_JAVA]) 1.1792 - ADD_JVM_ARG_IF_OK([-Xms10G -Xmx10G],SERVER_JAVA,[$SERVER_JAVA]) 1.1793 - ADD_JVM_ARG_IF_OK([-Xmn2G],SERVER_JAVA,[$SERVER_JAVA]) 1.1794 - elif test "$MEMORY_SIZE" -gt "10000"; then 1.1795 - MAX_HEAP_MEM=6000 1.1796 - ADD_JVM_ARG_IF_OK([-d64],SERVER_JAVA,[$SERVER_JAVA]) 1.1797 - ADD_JVM_ARG_IF_OK([-Xms6G -Xmx6G],SERVER_JAVA,[$SERVER_JAVA]) 1.1798 - ADD_JVM_ARG_IF_OK([-Xmn1G],SERVER_JAVA,[$SERVER_JAVA]) 1.1799 - elif test "$MEMORY_SIZE" -gt "5000"; then 1.1800 - MAX_HEAP_MEM=3000 1.1801 - ADD_JVM_ARG_IF_OK([-d64],SERVER_JAVA,[$SERVER_JAVA]) 1.1802 - ADD_JVM_ARG_IF_OK([-Xms1G -Xmx3G],SERVER_JAVA,[$SERVER_JAVA]) 1.1803 - ADD_JVM_ARG_IF_OK([-Xmn256M],SERVER_JAVA,[$SERVER_JAVA]) 1.1804 - elif test "$MEMORY_SIZE" -gt "3800"; then 1.1805 - MAX_HEAP_MEM=2500 1.1806 - ADD_JVM_ARG_IF_OK([-Xms1G -Xmx2500M],SERVER_JAVA,[$SERVER_JAVA]) 1.1807 - ADD_JVM_ARG_IF_OK([-Xmn256M],SERVER_JAVA,[$SERVER_JAVA]) 1.1808 - elif test "$MEMORY_SIZE" -gt "1900"; then 1.1809 - MAX_HEAP_MEM=1200 1.1810 - ADD_JVM_ARG_IF_OK([-Xms700M -Xmx1200M],SERVER_JAVA,[$SERVER_JAVA]) 1.1811 - ADD_JVM_ARG_IF_OK([-Xmn256M],SERVER_JAVA,[$SERVER_JAVA]) 1.1812 - elif test "$MEMORY_SIZE" -gt "1000"; then 1.1813 - MAX_HEAP_MEM=900 1.1814 - ADD_JVM_ARG_IF_OK([-Xms400M -Xmx900M],SERVER_JAVA,[$SERVER_JAVA]) 1.1815 - ADD_JVM_ARG_IF_OK([-Xmn128M],SERVER_JAVA,[$SERVER_JAVA]) 1.1816 - else 1.1817 - MAX_HEAP_MEM=512 1.1818 - ADD_JVM_ARG_IF_OK([-Xms256M -Xmx512M],SERVER_JAVA,[$SERVER_JAVA]) 1.1819 - ADD_JVM_ARG_IF_OK([-Xmn128M],SERVER_JAVA,[$SERVER_JAVA]) 1.1820 - fi 1.1821 - 1.1822 - MAX_COMPILERS_IN_HEAP=`expr $MAX_HEAP_MEM / 501` 1.1823 - if test "$JAVAC_SERVER_CORES" -gt "$MAX_COMPILERS_IN_HEAP"; then 1.1824 - AC_MSG_CHECKING([if number of server cores must be reduced]) 1.1825 - JAVAC_SERVER_CORES="$MAX_COMPILERS_IN_HEAP" 1.1826 - AC_MSG_RESULT([yes, to $JAVAC_SERVER_CORES with max heap size $MAX_HEAP_MEM MB]) 1.1827 - fi 1.1828 -fi 1.1829 -AC_SUBST(JAVAC_SERVER_CORES) 1.1830 - 1.1831 -AC_MSG_CHECKING([whether to track dependencies between Java packages]) 1.1832 -AC_ARG_ENABLE([javac-deps], [AS_HELP_STRING([--enable-javac-deps], 1.1833 - [enable the dependency tracking between Java packages @<:@disabled@:>@])], 1.1834 - [ENABLE_JAVAC_DEPS="${enableval}"], [ENABLE_JAVAC_DEPS='no']) 1.1835 -AC_MSG_RESULT([$ENABLE_JAVAC_DEPS]) 1.1836 -if test "x$ENABLE_JAVAC_DEPS" = xyes; then 1.1837 - JAVAC_USE_DEPS=true 1.1838 -else 1.1839 - JAVAC_USE_DEPS=false 1.1840 -fi 1.1841 -AC_SUBST(JAVAC_USE_DEPS) 1.1842 - 1.1843 -AC_MSG_CHECKING([whether to use multiple cores for javac compilation]) 1.1844 -AC_ARG_ENABLE([javac-multi-core], [AS_HELP_STRING([--enable-javac-multi-core], 1.1845 - [compile Java packages concurrently @<:@disabled@:>@])], 1.1846 - [ENABLE_JAVAC_MULTICORE="${enableval}"], [ENABLE_JAVAC_MULTICORE='no']) 1.1847 -AC_MSG_RESULT([$ENABLE_JAVAC_MULTICORE]) 1.1848 -if test "x$ENABLE_JAVAC_MULTICORE" = xyes; then 1.1849 - JAVAC_USE_MODE=MULTI_CORE_CONCURRENT 1.1850 -else 1.1851 - JAVAC_USE_MODE=SINGLE_THREADED_BATCH 1.1852 - if test "x$ENABLE_JAVAC_DEPS" = xyes; then 1.1853 - AC_MSG_WARN([Dependency tracking is not supported with single threaded batch compiles of Java source roots. Please add --disable-javac-deps to your configure options.]) 1.1854 - AC_MSG_WARN([Disabling dependency tracking for you now.]) 1.1855 - JAVAC_USE_DEPS=false 1.1856 - fi 1.1857 - if test "x$ENABLE_JAVAC_SERVER" = xyes; then 1.1858 - AC_MSG_WARN([The javac server will not be used since single threaded batch compiles are run within their own JVM. Please add --disable-javac-server to your configure options.]) 1.1859 - AC_MSG_WARN([Disabling javac server for you now.]) 1.1860 - JAVAC_USE_REMOTE=false 1.1861 - fi 1.1862 -fi 1.1863 -AC_SUBST(JAVAC_USE_MODE) 1.1864 - 1.1865 -############################################################################### 1.1866 -# 1.1867 -# OS specific settings that we never will need to probe. 1.1868 -# 1.1869 -if test "x$HOST_OS" = xlinux; then 1.1870 - AC_MSG_CHECKING([what is not needed on Linux?]) 1.1871 - PULSE_NOT_NEEDED=yes 1.1872 - AC_MSG_RESULT([pulse]) 1.1873 -fi 1.1874 - 1.1875 -if test "x$HOST_OS" = xsolaris; then 1.1876 - AC_MSG_CHECKING([what is not needed on Solaris?]) 1.1877 - ALSA_NOT_NEEDED=yes 1.1878 - PULSE_NOT_NEEDED=yes 1.1879 - AC_MSG_RESULT([alsa pulse]) 1.1880 -fi 1.1881 - 1.1882 -if test "x$HOST_OS" = xwindows; then 1.1883 - AC_MSG_CHECKING([what is not needed on Windows?]) 1.1884 - CUPS_NOT_NEEDED=yes 1.1885 - ALSA_NOT_NEEDED=yes 1.1886 - PULSE_NOT_NEEDED=yes 1.1887 - X11_NOT_NEEDED=yes 1.1888 - AC_MSG_RESULT([alsa cups pulse x11]) 1.1889 -fi 1.1890 - 1.1891 -if test "x$HOST_OS" = xmacosx; then 1.1892 - AC_MSG_CHECKING([what is not needed on MacOSX?]) 1.1893 - ALSA_NOT_NEEDED=yes 1.1894 - PULSE_NOT_NEEDED=yes 1.1895 - X11_NOT_NEEDED=yes 1.1896 - FREETYPE2_NOT_NEEDED=yes 1.1897 - # If the java runtime framework is disabled, then we need X11. 1.1898 - # This will be adjusted below. 1.1899 - AC_MSG_RESULT([alsa pulse x11]) 1.1900 -fi 1.1901 - 1.1902 -if test "x$HOST_OS" = xbsd; then 1.1903 - AC_MSG_CHECKING([what is not needed on bsd?]) 1.1904 - ALSA_NOT_NEEDED=yes 1.1905 - AC_MSG_RESULT([alsa]) 1.1906 -fi 1.1907 - 1.1908 -############################################################################### 1.1909 -# 1.1910 -# Check for MacOSX support for OpenJDK. If this exists, try to build a JVM 1.1911 -# that uses this API. 1.1912 -# 1.1913 -AC_ARG_ENABLE([macosx-runtime-support], [AS_HELP_STRING([--disable-macosx-runtime-support], 1.1914 - [disable the use of MacOSX Java runtime support framework @<:@enabled@:>@])], 1.1915 - [MACOSX_RUNTIME_SUPPORT="${enableval}"],[MACOSX_RUNTIME_SUPPORT="no"]) 1.1916 - 1.1917 -USE_MACOSX_RUNTIME_SUPPORT=no 1.1918 -AC_MSG_CHECKING([for explicit Java runtime support in the OS]) 1.1919 -if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then 1.1920 - if test "x$MACOSX_RUNTIME_SUPPORT" != xno; then 1.1921 - MACOSX_RUNTIME_SUPPORT=yes 1.1922 - USE_MACOSX_RUNTIME_SUPPORT=yes 1.1923 - AC_MSG_RESULT([yes, does not need alsa freetype2 pulse and X11]) 1.1924 - else 1.1925 - AC_MSG_RESULT([yes, but explicitly disabled.]) 1.1926 - fi 1.1927 -else 1.1928 - AC_MSG_RESULT([no]) 1.1929 -fi 1.1930 - 1.1931 -if test "x$HOST_OS" = xmacosx && test "x$USE_MACOSX_RUNTIME_SUPPORT" = xno; then 1.1932 - AC_MSG_CHECKING([what is not needed on an X11 build on MacOSX?]) 1.1933 - X11_NOT_NEEDED= 1.1934 - FREETYPE2_NOT_NEEDED= 1.1935 - AC_MSG_RESULT([alsa pulse]) 1.1936 -fi 1.1937 - 1.1938 -############################################################################### 1.1939 -# 1.1940 -# Check for X Windows 1.1941 -# 1.1942 -AC_PATH_XTRA 1.1943 - 1.1944 -if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then 1.1945 - help_on_build_dependency x11 1.1946 - AC_MSG_ERROR([Could not find X11 libraries. $HELP_MSG]) 1.1947 -fi 1.1948 - 1.1949 -# Some of the old makefiles require a setting of OPENWIN_HOME 1.1950 -# Since the X11R6 directory has disappeared on later Linuxes, 1.1951 -# we need to probe for it. 1.1952 -if test "x$HOST_OS" = xlinux; then 1.1953 - if test -d "$SYS_ROOT/usr/X11R6"; then 1.1954 - OPENWIN_HOME="$SYS_ROOT/usr/X11R6" 1.1955 - fi 1.1956 - if test -d "$SYS_ROOT/usr/include/X11"; then 1.1957 - OPENWIN_HOME="$SYS_ROOT/usr" 1.1958 - fi 1.1959 -fi 1.1960 -if test "x$HOST_OS" = xsolaris; then 1.1961 - OPENWIN_HOME="/usr/openwin" 1.1962 -fi 1.1963 -AC_SUBST(OPENWIN_HOME) 1.1964 - 1.1965 - 1.1966 -# 1.1967 -# Weird Sol10 something check...TODO change to try compile 1.1968 -# 1.1969 -if test "x${HOST_OS}" = xsolaris; then 1.1970 - if test "`uname -r`" = "5.10"; then 1.1971 - if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then 1.1972 - X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS" 1.1973 - fi 1.1974 - fi 1.1975 -fi 1.1976 - 1.1977 -AC_LANG_PUSH(C) 1.1978 -OLD_CFLAGS="$CFLAGS" 1.1979 -CFLAGS="$CFLAGS $X_CFLAGS" 1.1980 -AC_CHECK_HEADERS([X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h], 1.1981 - [X11_A_OK=yes], 1.1982 - [X11_A_OK=no]) 1.1983 -CFLAGS="$OLD_CFLAGS" 1.1984 -AC_LANG_POP(C) 1.1985 - 1.1986 -if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then 1.1987 - help_on_build_dependency x11 1.1988 - AC_MSG_ERROR([Could not find all X11 headers (shape.h Xrender.h XTest.h). $HELP_MSG]) 1.1989 -fi 1.1990 - 1.1991 -AC_SUBST(X_CFLAGS) 1.1992 -AC_SUBST(X_LIBS) 1.1993 - 1.1994 -############################################################################### 1.1995 -# 1.1996 -# The common unix printing system cups is used to print from java. 1.1997 -# 1.1998 -AC_ARG_WITH(cups, [AS_HELP_STRING([--with-cups], 1.1999 - [specify prefix directory for the cups package 1.2000 - (expecting the libraries under PATH/lib and the headers under PATH/include)])]) 1.2001 -AC_ARG_WITH(cups-include, [AS_HELP_STRING([--with-cups-include], 1.2002 - [specify directory for the cups include files])]) 1.2003 -AC_ARG_WITH(cups-lib, [AS_HELP_STRING([--with-cups-lib], 1.2004 - [specify directory for the cups library])]) 1.2005 - 1.2006 -if test "x$CUPS_NOT_NEEDED" = xyes; then 1.2007 - if test "x${with_cups}" != x || test "x${with_cups_include}" != x || test "x${with_cups_lib}" != x; then 1.2008 - AC_MSG_WARN([cups not used, so --with-cups is ignored]) 1.2009 - fi 1.2010 - CUPS_CFLAGS= 1.2011 - CUPS_LIBS= 1.2012 -else 1.2013 - CUPS_FOUND=no 1.2014 - 1.2015 - if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno || test "x${with_cups_lib}" = xno; then 1.2016 - AC_MSG_ERROR([It is not possible to disable the use of cups. Remove the --without-cups option.]) 1.2017 - fi 1.2018 - 1.2019 - if test "x${with_cups}" != x; then 1.2020 - CUPS_LIBS="-L${with_cups}/lib -lcups" 1.2021 - CUPS_CFLAGS="-I${with_cups}/include" 1.2022 - CUPS_FOUND=yes 1.2023 - fi 1.2024 - if test "x${with_cups_include}" != x; then 1.2025 - CUPS_CFLAGS="-I${with_cups_include}" 1.2026 - CUPS_FOUND=yes 1.2027 - fi 1.2028 - if test "x${with_cups_lib}" != x; then 1.2029 - CUPS_LIBS="-L${with_cups_lib} -lcups" 1.2030 - CUPS_FOUND=yes 1.2031 - fi 1.2032 - if test "x$CUPS_FOUND" = xno; then 1.2033 - BDEPS_CHECK_MODULE(CUPS, cups, xxx, [CUPS_FOUND=yes]) 1.2034 - fi 1.2035 - if test "x$CUPS_FOUND" = xno; then 1.2036 - # Are the cups headers installed in the default /usr/include location? 1.2037 - AC_CHECK_HEADERS([cups/cups.h cups/ppd.h], 1.2038 - [CUPS_FOUND=yes 1.2039 - CUPS_CFLAGS= 1.2040 - CUPS_LIBS="-lcups" 1.2041 - DEFAULT_CUPS=yes]) 1.2042 - fi 1.2043 - if test "x$CUPS_FOUND" = xno; then 1.2044 - # Getting nervous now? Lets poke around for standard Solaris third-party 1.2045 - # package installation locations. 1.2046 - AC_MSG_CHECKING([for cups headers and libs]) 1.2047 - if test -s /opt/sfw/cups/include/cups/cups.h; then 1.2048 - # An SFW package seems to be installed! 1.2049 - CUPS_FOUND=yes 1.2050 - CUPS_CFLAGS="-I/opt/sfw/cups/include" 1.2051 - CUPS_LIBS="-L/opt/sfw/cups/lib -lcups" 1.2052 - elif test -s /opt/csw/include/cups/cups.h; then 1.2053 - # A CSW package seems to be installed! 1.2054 - CUPS_FOUND=yes 1.2055 - CUPS_CFLAGS="-I/opt/csw/include" 1.2056 - CUPS_LIBS="-L/opt/csw/lib -lcups" 1.2057 - fi 1.2058 - AC_MSG_RESULT([$CUPS_FOUND]) 1.2059 - fi 1.2060 - if test "x$CUPS_FOUND" = xno; then 1.2061 - help_on_build_dependency cups 1.2062 - AC_MSG_ERROR([Could not find cups! $HELP_MSG ]) 1.2063 - fi 1.2064 -fi 1.2065 - 1.2066 -AC_SUBST(CUPS_CFLAGS) 1.2067 -AC_SUBST(CUPS_LIBS) 1.2068 - 1.2069 -############################################################################### 1.2070 -# 1.2071 -# The ubiquitous freetype2 library is used to render fonts. 1.2072 -# 1.2073 -AC_ARG_WITH(freetype, [AS_HELP_STRING([--with-freetype], 1.2074 - [specify prefix directory for the freetype2 package 1.2075 - (expecting the libraries under PATH/lib and the headers under PATH/include)])]) 1.2076 - 1.2077 -# If we are using the OS installed system lib for freetype, then we do not need to copy it to the build tree 1.2078 -USING_SYSTEM_FT_LIB=false 1.2079 - 1.2080 -if test "x$FREETYPE2_NOT_NEEDED" = xyes; then 1.2081 - if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then 1.2082 - AC_MSG_WARN([freetype not used, so --with-freetype is ignored]) 1.2083 - fi 1.2084 - FREETYPE2_CFLAGS= 1.2085 - FREETYPE2_LIBS= 1.2086 - FREETYPE2_LIB_PATH= 1.2087 -else 1.2088 - FREETYPE2_FOUND=no 1.2089 - 1.2090 - if test "x$with_freetype" != x; then 1.2091 - SPACESAFE(with_freetype,[the path to freetype]) 1.2092 - FREETYPE2_LIBS="-L$with_freetype/lib -lfreetype" 1.2093 - if test "x$HOST_OS" = xwindows; then 1.2094 - FREETYPE2_LIBS="$with_freetype/lib/freetype.lib" 1.2095 - fi 1.2096 - FREETYPE2_LIB_PATH="$with_freetype/lib" 1.2097 - FREETYPE2_CFLAGS="-I$with_freetype/include" 1.2098 - if test -s $with_freetype/include/ft2build.h && test -d $with_freetype/include/freetype2/freetype; then 1.2099 - FREETYPE2_CFLAGS="-I$with_freetype/include/freetype2 -I$with_freetype/include" 1.2100 - fi 1.2101 - FREETYPE2_FOUND=yes 1.2102 - if test "x$FREETYPE2_FOUND" = xyes; then 1.2103 - # Verify that the directories exist 1.2104 - if ! test -d "$with_freetype/lib" || ! test -d "$with_freetype/include"; then 1.2105 - AC_MSG_ERROR([Could not find the expected directories $with_freetype/lib and $with_freetype/include]) 1.2106 - fi 1.2107 - # List the contents of the lib. 1.2108 - FREETYPELIB=`ls $with_freetype/lib/libfreetype.so $with_freetype/lib/freetype.dll 2> /dev/null` 1.2109 - if test "x$FREETYPELIB" = x; then 1.2110 - AC_MSG_ERROR([Could not find libfreetype.se nor freetype.dll in $with_freetype/lib]) 1.2111 - fi 1.2112 - # Check one h-file 1.2113 - if ! test -s "$with_freetype/include/ft2build.h"; then 1.2114 - AC_MSG_ERROR([Could not find $with_freetype/include/ft2build.h]) 1.2115 - fi 1.2116 - fi 1.2117 - fi 1.2118 - if test "x$FREETYPE2_FOUND" = xno; then 1.2119 - BDEPS_CHECK_MODULE(FREETYPE2, freetype2, xxx, [FREETYPE2_FOUND=yes], [FREETYPE2_FOUND=no]) 1.2120 - USING_SYSTEM_FT_LIB=true 1.2121 - fi 1.2122 - if test "x$FREETYPE2_FOUND" = xno; then 1.2123 - PKG_CHECK_MODULES(FREETYPE2, freetype2, [FREETYPE2_FOUND=yes], [FREETYPE2_FOUND=no]) 1.2124 - USING_SYSTEM_FT_LIB=true 1.2125 - fi 1.2126 - if test "x$FREETYPE2_FOUND" = xno; then 1.2127 - AC_MSG_CHECKING([for freetype in some standard locations]) 1.2128 - 1.2129 - if test -s /usr/X11/include/ft2build.h && test -d /usr/X11/include/freetype2/freetype; then 1.2130 - DEFAULT_FREETYPE_CFLAGS="-I/usr/X11/include/freetype2 -I/usr/X11/include" 1.2131 - DEFAULT_FREETYPE_LIBS="-L/usr/X11/lib -lfreetype" 1.2132 - fi 1.2133 - if test -s /usr/include/ft2build.h && test -d /usr/include/freetype2/freetype; then 1.2134 - DEFAULT_FREETYPE_CFLAGS="-I/usr/include/freetype2" 1.2135 - DEFAULT_FREETYPE_LIBS="-lfreetype" 1.2136 - fi 1.2137 - 1.2138 - PREV_CXXCFLAGS="$CXXFLAGS" 1.2139 - PREV_LDFLAGS="$LDFLAGS" 1.2140 - CXXFLAGS="$CXXFLAGS $DEFAULT_FREETYPE_CFLAGS" 1.2141 - LDFLAGS="$LDFLAGS $DEFAULT_FREETYPE_LIBS" 1.2142 - AC_LINK_IFELSE([AC_LANG_SOURCE([[#include<ft2build.h> 1.2143 - #include FT_FREETYPE_H 1.2144 - int main() { return 0; } 1.2145 - ]])], 1.2146 - [ 1.2147 - # Yes, the default cflags and libs did the trick. 1.2148 - FREETYPE2_FOUND=yes 1.2149 - FREETYPE2_CFLAGS="$DEFAULT_FREETYPE_CFLAGS" 1.2150 - FREETYPE2_LIBS="$DEFAULT_FREETYPE_LIBS" 1.2151 - ], 1.2152 - [ 1.2153 - FREETYPE2_FOUND=no 1.2154 - ]) 1.2155 - CXXCFLAGS="$PREV_CXXFLAGS" 1.2156 - LDFLAGS="$PREV_LDFLAGS" 1.2157 - AC_MSG_RESULT([$FREETYPE2_FOUND]) 1.2158 - USING_SYSTEM_FT_LIB=true 1.2159 - fi 1.2160 - if test "x$FREETYPE2_FOUND" = xno; then 1.2161 - help_on_build_dependency freetype2 1.2162 - AC_MSG_ERROR([Could not find freetype2! $HELP_MSG ]) 1.2163 - fi 1.2164 -fi 1.2165 - 1.2166 -AC_SUBST(USING_SYSTEM_FT_LIB) 1.2167 -AC_SUBST(FREETYPE2_LIB_PATH) 1.2168 -AC_SUBST(FREETYPE2_CFLAGS) 1.2169 -AC_SUBST(FREETYPE2_LIBS) 1.2170 - 1.2171 -############################################################################### 1.2172 -# 1.2173 -# Check for alsa headers and libraries. Used on Linux/GNU systems. 1.2174 -# 1.2175 -AC_ARG_WITH(alsa, [AS_HELP_STRING([--with-alsa], 1.2176 - [specify prefix directory for the alsa package 1.2177 - (expecting the libraries under PATH/lib and the headers under PATH/include)])]) 1.2178 -AC_ARG_WITH(alsa-include, [AS_HELP_STRING([--with-alsa-include], 1.2179 - [specify directory for the alsa include files])]) 1.2180 -AC_ARG_WITH(alsa-lib, [AS_HELP_STRING([--with-alsa-lib], 1.2181 - [specify directory for the alsa library])]) 1.2182 - 1.2183 -if test "x$ALSA_NOT_NEEDED" = xyes; then 1.2184 - if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then 1.2185 - AC_MSG_WARN([alsa not used, so --with-alsa is ignored]) 1.2186 - fi 1.2187 - ALSA_CFLAGS= 1.2188 - ALSA_LIBS= 1.2189 -else 1.2190 - ALSA_FOUND=no 1.2191 - 1.2192 - if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then 1.2193 - AC_MSG_ERROR([It is not possible to disable the use of alsa. Remove the --without-alsa option.]) 1.2194 - fi 1.2195 - 1.2196 - if test "x${with_alsa}" != x; then 1.2197 - ALSA_LIBS="-L${with_alsa}/lib -lalsa" 1.2198 - ALSA_CFLAGS="-I${with_alsa}/include" 1.2199 - ALSA_FOUND=yes 1.2200 - fi 1.2201 - if test "x${with_alsa_include}" != x; then 1.2202 - ALSA_CFLAGS="-I${with_alsa_include}" 1.2203 - ALSA_FOUND=yes 1.2204 - fi 1.2205 - if test "x${with_alsa_lib}" != x; then 1.2206 - ALSA_LIBS="-L${with_alsa_lib} -lalsa" 1.2207 - ALSA_FOUND=yes 1.2208 - fi 1.2209 - if test "x$ALSA_FOUND" = xno; then 1.2210 - BDEPS_CHECK_MODULE(ALSA, alsa, xxx, [ALSA_FOUND=yes], [ALSA_FOUND=no]) 1.2211 - fi 1.2212 - if test "x$ALSA_FOUND" = xno; then 1.2213 - PKG_CHECK_MODULES(ALSA, alsa, [ALSA_FOUND=yes], [ALSA_FOUND=no]) 1.2214 - fi 1.2215 - if test "x$ALSA_FOUND" = xno; then 1.2216 - AC_CHECK_HEADERS([alsa/asoundlib.h], 1.2217 - [ALSA_FOUND=yes 1.2218 - ALSA_CFLAGS=-Iignoreme 1.2219 - ALSA_LIBS=-lasound 1.2220 - DEFAULT_ALSA=yes], 1.2221 - [ALSA_FOUND=no]) 1.2222 - fi 1.2223 - if test "x$ALSA_FOUND" = xno; then 1.2224 - help_on_build_dependency alsa 1.2225 - AC_MSG_ERROR([Could not find alsa! $HELP_MSG ]) 1.2226 - fi 1.2227 -fi 1.2228 - 1.2229 -AC_SUBST(ALSA_CFLAGS) 1.2230 -AC_SUBST(ALSA_LIBS) 1.2231 - 1.2232 -############################################################################### 1.2233 -# 1.2234 -# Check for pulse audio headers and libraries. 1.2235 -# 1.2236 -PULSE_FOUND=no 1.2237 -AC_ARG_WITH(pulse, [AS_HELP_STRING([--with-pulse], 1.2238 - [specify prefix directory for the pulseaudio package 1.2239 - (expecting the libraries under PATH/lib and the headers under PATH/include)])]) 1.2240 -AC_ARG_WITH(pulse-include, [AS_HELP_STRING([--with-pulse-include], 1.2241 - [specify directory for the pulseaudio include files])]) 1.2242 -AC_ARG_WITH(pulse-lib, [AS_HELP_STRING([--with-pulse-lib], 1.2243 - [specify directory for the pulseaudio library])]) 1.2244 - 1.2245 -if test "x${with_pulse}" != x; then 1.2246 - PULSE_LIBS="-L${with_pulse}/lib -lfreetype" 1.2247 - PULSE_CFLAGS="-I${with_pulse}/include" 1.2248 - PULSE_FOUND=yes 1.2249 -fi 1.2250 -if test "x${with_pulse_include}" != x; then 1.2251 - PULSE_CFLAGS="-I${with_pulse_include}" 1.2252 - PULSE_FOUND=yes 1.2253 -fi 1.2254 -if test "x${with_pulse_lib}" != x; then 1.2255 - PULSE_LIBS="-L${with_pulse_lib} -lpulse" 1.2256 - PULSE_FOUND=yes 1.2257 -fi 1.2258 -if test "x$PULSE_FOUND" = xno; then 1.2259 - BDEPS_CHECK_MODULE(PULSE, pulse, xxx, [PULSE_FOUND=yes], [PULSE_FOUND=no]) 1.2260 -fi 1.2261 -if test "x$PULSE_FOUND" = xno; then 1.2262 - PKG_CHECK_MODULES(LIBPULSE,[libpulse >= 0.9.11],[PULSE_FOUND=yes],[PULSE_FOUND=no]) 1.2263 -fi 1.2264 -if test "x$PULSE_FOUND" = xno; then 1.2265 - AC_CHECK_HEADERS([pulse/pulseaudio.h], 1.2266 - [PULSE_FOUND=yes 1.2267 - PULSE_CFLAGS=-Iignoreme 1.2268 - PULSE_LIBS= 1.2269 - DEFAULT_PULSE=yes], 1.2270 - [PULSE_FOUND=no]) 1.2271 -fi 1.2272 - 1.2273 -if test "x$PULSE_FOUND" = xno && test "x$PULSE_NOT_NEEDED" != xyes; then 1.2274 - help_on_build_dependency pulse 1.2275 - AC_MSG_ERROR([Could not find pulse audio libraries. $HELP_MSG ]) 1.2276 -fi 1.2277 - 1.2278 -AC_SUBST(PULSE_CFLAGS) 1.2279 -AC_SUBST(PULSE_LIBS) 1.2280 - 1.2281 -############################################################################### 1.2282 -# 1.2283 -# Check for the jpeg library 1.2284 -# 1.2285 - 1.2286 -USE_EXTERNAL_LIBJPEG=true 1.2287 -AC_CHECK_LIB(jpeg, main, [], 1.2288 - [ USE_EXTERNAL_LIBJPEG=false 1.2289 - AC_MSG_NOTICE([Will use jpeg decoder bundled with the OpenJDK source]) 1.2290 - ]) 1.2291 -AC_SUBST(USE_EXTERNAL_LIBJPEG) 1.2292 - 1.2293 -############################################################################### 1.2294 -# 1.2295 -# Check for the gif library 1.2296 -# 1.2297 - 1.2298 -USE_EXTERNAL_LIBJPEG=true 1.2299 -AC_CHECK_LIB(gif, main, [], 1.2300 - [ USE_EXTERNAL_LIBGIF=false 1.2301 - AC_MSG_NOTICE([Will use gif decoder bundled with the OpenJDK source]) 1.2302 - ]) 1.2303 -AC_SUBST(USE_EXTERNAL_LIBGIF) 1.2304 - 1.2305 -############################################################################### 1.2306 -# 1.2307 -# Check for the zlib library 1.2308 -# 1.2309 - 1.2310 -USE_EXTERNAL_LIBZ=true 1.2311 -AC_CHECK_LIB(z, main, [], 1.2312 - [ USE_EXTERNAL_LIBZ=false 1.2313 - AC_MSG_NOTICE([Will use zlib bundled with the OpenJDK source]) 1.2314 - ]) 1.2315 -AC_SUBST(USE_EXTERNAL_LIBZ) 1.2316 - 1.2317 -############################################################################### 1.2318 -# 1.2319 -# Check if altzone exists in time.h 1.2320 -# 1.2321 - 1.2322 -AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <time.h>], [return (int)altzone;])], 1.2323 - [has_altzone=yes], 1.2324 - [has_altzone=no]) 1.2325 -if test "x$has_altzone" = xyes; then 1.2326 - AC_DEFINE([HAVE_ALTZONE], 1, [Define if you have the external 'altzone' variable in time.h]) 1.2327 -fi 1.2328 - 1.2329 -############################################################################### 1.2330 -# 1.2331 -# Check the maths library 1.2332 -# 1.2333 - 1.2334 -AC_CHECK_LIB(m, cos, [], 1.2335 - [ 1.2336 - AC_MSG_NOTICE([Maths library was not found]) 1.2337 - ]) 1.2338 -AC_SUBST(LIBM) 1.2339 - 1.2340 -############################################################################### 1.2341 -# 1.2342 -# Check for libdl.so 1.2343 - 1.2344 -save_LIBS="$LIBS" 1.2345 -LIBS="" 1.2346 -AC_CHECK_LIB(dl,dlopen) 1.2347 -LIBDL="$LIBS" 1.2348 -AC_SUBST(LIBDL) 1.2349 -LIBS="$save_LIBS" 1.2350 - 1.2351 -############################################################################### 1.2352 -# 1.2353 -# Should we run the painfully slow javadoc tool? 1.2354 -# 1.2355 -AC_MSG_CHECKING([whether to build documentation]) 1.2356 -AC_ARG_ENABLE([docs], [AS_HELP_STRING([--enable-docs], 1.2357 - [enable generation of Javadoc documentation @<:@disabled@:>@])], 1.2358 - [ENABLE_DOCS="${enableval}"], [ENABLE_DOCS='no']) 1.2359 -AC_MSG_RESULT([$ENABLE_DOCS]) 1.2360 -AC_SUBST(ENABLE_DOCS) 1.2361 -GENERATE_DOCS=false 1.2362 -if test "x$ENABLE_DOCS" = xyes; then 1.2363 - GENERATE_DOCS=true 1.2364 -fi 1.2365 -AC_SUBST(GENERATE_DOCS) 1.2366 - 1.2367 -############################################################################### 1.2368 -# 1.2369 -# Should we compile nimbus swing L&F? We can probably remove this option 1.2370 -# since nimbus is officially part of javax now. 1.2371 -# 1.2372 -AC_MSG_CHECKING([whether to build nimbus L&F]) 1.2373 -AC_ARG_ENABLE([nimbus], [AS_HELP_STRING([--disable-nimbus], 1.2374 - [disable Nimbus L&F @<:@enabled@:>@])], 1.2375 - [ENABLE_NIMBUS="${enableval}"], [ENABLE_NIMBUS='yes']) 1.2376 -AC_MSG_RESULT([$ENABLE_NIMBUS]) 1.2377 -DISABLE_NIMBUS= 1.2378 -if test "x$ENABLE_NIMBUS" = xno; then 1.2379 - DISABLE_NIMBUS=true 1.2380 -fi 1.2381 -AC_SUBST(DISABLE_NIMBUS) 1.2382 - 1.2383 -############################################################################### 1.2384 -# 1.2385 -# Setup the opt flags for different compilers 1.2386 -# and different operating systems. 1.2387 -# 1.2388 -C_FLAG_DEPS="-MMD -MF" 1.2389 -CXX_FLAG_DEPS="-MMD -MF" 1.2390 - 1.2391 -case $COMPILER_TYPE in 1.2392 - CC ) 1.2393 - D_FLAG="-g" 1.2394 - case $COMPILER_NAME in 1.2395 - gcc ) 1.2396 - case $PLATFORM in 1.2397 - macosx ) 1.2398 - # On MacOSX we optimize for size, something 1.2399 - # we should do for all platforms? 1.2400 - C_O_FLAG_HI="-Os" 1.2401 - C_O_FLAG_NORM="-Os" 1.2402 - C_O_FLAG_NONE="" 1.2403 - ;; 1.2404 - *) 1.2405 - C_O_FLAG_HI="-O3" 1.2406 - C_O_FLAG_NORM="-O2" 1.2407 - C_O_FLAG_NONE="-O0" 1.2408 - ;; 1.2409 - esac 1.2410 - CXX_O_FLAG_HI="$C_O_FLAG_HI" 1.2411 - CXX_O_FLAG_NORM="$C_O_FLAG_NORM" 1.2412 - CXX_O_FLAG_NONE="$C_O_FLAG_NONE" 1.2413 - ;; 1.2414 - ossc ) 1.2415 - # 1.2416 - # Forte has different names for this with their C++ compiler... 1.2417 - # 1.2418 - CXX_FLAG_DEPS="-xMMD -xMF" 1.2419 - 1.2420 -# Extra options used with HIGHEST 1.2421 -# 1.2422 -# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be 1.2423 -# done with care, there are some assumptions below that need to 1.2424 -# be understood about the use of pointers, and IEEE behavior. 1.2425 -# 1.2426 -# Use non-standard floating point mode (not IEEE 754) 1.2427 -CC_HIGHEST="$CC_HIGHEST -fns" 1.2428 -# Do some simplification of floating point arithmetic (not IEEE 754) 1.2429 -CC_HIGHEST="$CC_HIGHEST -fsimple" 1.2430 -# Use single precision floating point with 'float' 1.2431 -CC_HIGHEST="$CC_HIGHEST -fsingle" 1.2432 -# Assume memory references via basic pointer types do not alias 1.2433 -# (Source with excessing pointer casting and data access with mixed 1.2434 -# pointer types are not recommended) 1.2435 -CC_HIGHEST="$CC_HIGHEST -xalias_level=basic" 1.2436 -# Use intrinsic or inline versions for math/std functions 1.2437 -# (If you expect perfect errno behavior, do not use this) 1.2438 -CC_HIGHEST="$CC_HIGHEST -xbuiltin=%all" 1.2439 -# Loop data dependency optimizations (need -xO3 or higher) 1.2440 -CC_HIGHEST="$CC_HIGHEST -xdepend" 1.2441 -# Pointer parameters to functions do not overlap 1.2442 -# (Similar to -xalias_level=basic usage, but less obvious sometimes. 1.2443 -# If you pass in multiple pointers to the same data, do not use this) 1.2444 -CC_HIGHEST="$CC_HIGHEST -xrestrict" 1.2445 -# Inline some library routines 1.2446 -# (If you expect perfect errno behavior, do not use this) 1.2447 -CC_HIGHEST="$CC_HIGHEST -xlibmil" 1.2448 -# Use optimized math routines 1.2449 -# (If you expect perfect errno behavior, do not use this) 1.2450 -# Can cause undefined external on Solaris 8 X86 on __sincos, removing for now 1.2451 -#CC_HIGHEST="$CC_HIGHEST -xlibmopt" 1.2452 - 1.2453 - case $LEGACY_HOST_CPU1 in 1.2454 - i586) 1.2455 - C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xchip=pentium" 1.2456 - C_O_FLAG_HI="-xO4 -Wu,-O4~yz" 1.2457 - C_O_FLAG_NORM="-xO2 -Wu,-O2~yz" 1.2458 - C_O_FLAG_NONE="" 1.2459 - CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xchip=pentium" 1.2460 - CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz" 1.2461 - CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz" 1.2462 - CXX_O_FLAG_NONE="" 1.2463 - ;; 1.2464 - sparc) 1.2465 - C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra" 1.2466 - C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0" 1.2467 - C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0" 1.2468 - C_O_FLAG_NONE="" 1.2469 - CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra" 1.2470 - CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0" 1.2471 - CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0" 1.2472 - CXX_O_FLAG_NONE="" 1.2473 - ;; 1.2474 - esac 1.2475 - esac 1.2476 - ;; 1.2477 - CL ) 1.2478 - D_FLAG= 1.2479 - C_O_FLAG_HI="-O2" 1.2480 - C_O_FLAG_NORM="-O1" 1.2481 - C_O_FLAG_NONE="-Od" 1.2482 - CXX_O_FLAG_HI="$C_O_FLAG_HI" 1.2483 - CXX_O_FLAG_NORM="$C_O_FLAG_NORM" 1.2484 - CXX_O_FLAG_NONE="$C_O_FLAG_NONE" 1.2485 - ;; 1.2486 -esac 1.2487 - 1.2488 -if test -z "$C_O_FLAG_HIGHEST"; then 1.2489 - C_O_FLAG_HIGHEST="$C_O_FLAG_HI" 1.2490 -fi 1.2491 - 1.2492 -if test -z "$CXX_O_FLAG_HIGHEST"; then 1.2493 - CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HI" 1.2494 -fi 1.2495 - 1.2496 -AC_SUBST(C_O_FLAG_HIGHEST) 1.2497 -AC_SUBST(C_O_FLAG_HI) 1.2498 -AC_SUBST(C_O_FLAG_NORM) 1.2499 -AC_SUBST(C_O_FLAG_NONE) 1.2500 -AC_SUBST(CXX_O_FLAG_HIGHEST) 1.2501 -AC_SUBST(CXX_O_FLAG_HI) 1.2502 -AC_SUBST(CXX_O_FLAG_NORM) 1.2503 -AC_SUBST(CXX_O_FLAG_NONE) 1.2504 -AC_SUBST(C_FLAG_DEPS) 1.2505 -AC_SUBST(CXX_FLAG_DEPS) 1.2506 - 1.2507 -############################################################################### 1.2508 -# 1.2509 -# Setup legacy vars/targets and new vars to deal with different debug levels. 1.2510 -# 1.2511 -case $DEBUG_LEVEL in 1.2512 - release ) 1.2513 - HOTSPOT_DEBUG_LEVEL="product" 1.2514 - HOTSPOT_EXPORT="product" 1.2515 - ;; 1.2516 - fastdebug ) 1.2517 - HOTSPOT_DEBUG_LEVEL="fastdebug" 1.2518 - HOTSPOT_EXPORT="fastdebug" 1.2519 - CFLAGS="$CFLAGS $D_FLAG" 1.2520 - JAVAC_FLAGS="$JAVAC_FLAGS -g" 1.2521 - ;; 1.2522 - slowdebug ) 1.2523 - HOTSPOT_DEBUG_LEVEL="jvmg" 1.2524 - HOTSPOT_EXPORT="debug" 1.2525 - CFLAGS="$CFLAGS $D_FLAG" 1.2526 - C_O_FLAG_HI="$C_O_FLAG_NONE" 1.2527 - C_O_FLAG_NORM="$C_O_FLAG_NONE" 1.2528 - CXX_O_FLAG_HI="$CXX_O_FLAG_NONE" 1.2529 - CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE" 1.2530 - JAVAC_FLAGS="$JAVAC_FLAGS -g" 1.2531 - ;; 1.2532 -esac 1.2533 - 1.2534 -############################################################################### 1.2535 -# 1.2536 -# Generate the legacy makefile targets for hotspot. 1.2537 -# The hotspot api for selecting the build artifacts, really, needs to be improved. 1.2538 -# 1.2539 -HOTSPOT_TARGET="" 1.2540 - 1.2541 -if test "x$JVM_VARIANT_SERVER" = xtrue; then 1.2542 - HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} " 1.2543 -fi 1.2544 - 1.2545 -if test "x$JVM_VARIANT_CLIENT" = xtrue; then 1.2546 - HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 " 1.2547 -fi 1.2548 - 1.2549 -if test "x$JVM_VARIANT_KERNEL" = xtrue; then 1.2550 - HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel " 1.2551 -fi 1.2552 - 1.2553 -if test "x$JVM_VARIANT_ZERO" = xtrue; then 1.2554 - HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero " 1.2555 -fi 1.2556 - 1.2557 -if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then 1.2558 - HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark " 1.2559 -fi 1.2560 - 1.2561 -HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT" 1.2562 - 1.2563 -############################################################################### 1.2564 -# 1.2565 -# Setup all directories for the subrepoes and the arguments to the sub makes. 1.2566 -# 1.2567 -LANGTOOLS_OUTPUTDIR="$OUTPUT_ROOT/langtools" 1.2568 -LANGTOOLS_DIST="$OUTPUT_ROOT/langtools/dist" 1.2569 -LANGTOOLS_MAKE_ARGS="" 1.2570 -AC_SUBST(LANGTOOLS_OUTPUTDIR) 1.2571 -AC_SUBST(LANGTOOLS_DIST) 1.2572 -AC_SUBST(LANGTOOLS_MAKE_ARGS) 1.2573 - 1.2574 -CORBA_OUTPUTDIR="$OUTPUT_ROOT/corba" 1.2575 -CORBA_DIST="$OUTPUT_ROOT/corba/dist" 1.2576 -CORBA_MAKE_ARGS="" 1.2577 -AC_SUBST(CORBA_OUTPUTDIR) 1.2578 -AC_SUBST(CORBA_DIST) 1.2579 -AC_SUBST(CORBA_MAKE_ARGS) 1.2580 - 1.2581 -JAXP_OUTPUTDIR="$OUTPUT_ROOT/jaxp" 1.2582 -JAXP_DIST="$OUTPUT_ROOT/jaxp/dist" 1.2583 -JAXP_MAKE_ARGS="" 1.2584 -AC_SUBST(JAXP_OUTPUTDIR) 1.2585 -AC_SUBST(JAXP_DIST) 1.2586 -AC_SUBST(JAXP_MAKE_ARGS) 1.2587 - 1.2588 -JAXWS_OUTPUTDIR="$OUTPUT_ROOT/jaxws" 1.2589 -JAXWS_DIST="$OUTPUT_ROOT/jaxws/dist" 1.2590 -JAXWS_MAKE_ARGS="" 1.2591 -AC_SUBST(JAXWS_OUTPUTDIR) 1.2592 -AC_SUBST(JAXWS_DIST) 1.2593 -AC_SUBST(JAXWS_MAKE_ARGS) 1.2594 - 1.2595 -HOTSPOT_OUTPUTDIR="$OUTPUT_ROOT/hotspot" 1.2596 -HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist" 1.2597 -HOTSPOT_MAKE_ARGS="ALT_OUTPUTDIR=$HOTSPOT_OUTPUTDIR ALT_EXPORT_PATH=$HOTSPOT_DIST $HOTSPOT_TARGET" 1.2598 -AC_SUBST(HOTSPOT_OUTPUTDIR) 1.2599 -AC_SUBST(HOTSPOT_DIST) 1.2600 -AC_SUBST(HOTSPOT_MAKE_ARGS) 1.2601 - 1.2602 -JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk" 1.2603 -JDK_MAKE_ARGS="ALT_OUTPUTDIR=\"$OUTPUT_ROOT/jdk\"" 1.2604 -AC_SUBST(JDK_OUTPUTDIR) 1.2605 -AC_SUBST(JDK_MAKE_ARGS) 1.2606 - 1.2607 -IMAGES_OUTPUTDIR=$OUTPUT_ROOT/images 1.2608 -IMAGES_MAKE_ARGS="ALT_OUTPUTDIR=$OUTPUT_ROOT/jdk \ 1.2609 - SHARE_SRC=$JDK_TOPDIR/src/share \ 1.2610 - PLATFORM_SRC=$JDK_TOPDIR/src/$LEGACY_HOST_OS_API \ 1.2611 - TEMPDIR=$IMAGES_OUTPUTDIR/tmp \ 1.2612 - ABS_TEMPDIR=$IMAGES_OUTPUTDIR/tmp " 1.2613 -AC_SUBST(IMAGES_OUTPUTDIR) 1.2614 -AC_SUBST(IMAGES_MAKE_ARGS) 1.2615 - 1.2616 -############################################################################### 1.2617 -# 1.2618 -# Now setup the CFLAGS and LDFLAGS for the JDK build. 1.2619 -# Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build. 1.2620 -# 1.2621 -case $COMPILER_NAME in 1.2622 - gcc ) 1.2623 - CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \ 1.2624 - -pipe -fno-omit-frame-pointer \ 1.2625 - -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE" 1.2626 - CFLAGS_JDK="$CFLAGS_JDK -fno-strict-aliasing" 1.2627 - ;; 1.2628 - ossc ) 1.2629 - CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -norunpath -xnolib" 1.2630 - CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX" 1.2631 - ;; 1.2632 - cl ) 1.2633 - CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \ 1.2634 - -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \ 1.2635 - -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \ 1.2636 - -DWIN32 -DIAL" 1.2637 - case $LEGACY_HOST_CPU1 in 1.2638 - i?86 ) 1.2639 - CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86" 1.2640 - ;; 1.2641 - amd64 ) 1.2642 - CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64" 1.2643 - ;; 1.2644 - esac 1.2645 - ;; 1.2646 -esac 1.2647 - 1.2648 -CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64" 1.2649 - 1.2650 -# The package path is used only on macosx? 1.2651 -PACKAGE_PATH=/opt/local 1.2652 -AC_SUBST(PACKAGE_PATH) 1.2653 - 1.2654 -# Sometimes we use a cpu dir (.../lib/amd64/server) 1.2655 -# Sometimes not (.../lib/server) 1.2656 -LIBARCHDIR="$LEGACY_HOST_CPU2/" 1.2657 -if test "x$ENDIAN" = xlittle; then 1.2658 - CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN" 1.2659 -else 1.2660 - CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN" 1.2661 -fi 1.2662 -if test "x$HOST_OS" = xlinux; then 1.2663 - CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DLINUX" 1.2664 -fi 1.2665 -if test "x$HOST_OS" = xwindows; then 1.2666 - CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DWINDOWS" 1.2667 -fi 1.2668 -if test "x$HOST_OS" = xsolaris; then 1.2669 - CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DSOLARIS" 1.2670 -fi 1.2671 -if test "x$HOST_OS" = xmacosx; then 1.2672 - CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE" 1.2673 - LIBARCHDIR="" 1.2674 -fi 1.2675 -if test "x$HOST_OS" = xbsd; then 1.2676 - CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE" 1.2677 -fi 1.2678 -if test "x$DEBUG_LEVEL" = xrelease; then 1.2679 - CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG" 1.2680 -else 1.2681 - CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG" 1.2682 -fi 1.2683 - 1.2684 -CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$LEGACY_HOST_CPU1\"' -D$LEGACY_HOST_CPU1" 1.2685 -CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"$RELEASE\"'" 1.2686 - 1.2687 -CCXXFLAGS_JDK="$CCXXFLAGS_JDK \ 1.2688 - -I${JDK_OUTPUTDIR}/include \ 1.2689 - -I${JDK_OUTPUTDIR}/include/$PLATFORM \ 1.2690 - -I${JDK_TOPDIR}/src/share/javavm/export \ 1.2691 - -I${JDK_TOPDIR}/src/$LEGACY_HOST_OS_API/javavm/export \ 1.2692 - -I${JDK_TOPDIR}/src/share/native/common \ 1.2693 - -I${JDK_TOPDIR}/src/$LEGACY_HOST_OS_API/native/common" 1.2694 - 1.2695 -# The shared libraries are compiled using the picflag. 1.2696 -CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA" 1.2697 -CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG" 1.2698 - 1.2699 -# Executable flags 1.2700 -CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK" 1.2701 -CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK" 1.2702 - 1.2703 -# Now this is odd. The JDK native libraries have to link against libjvm.so 1.2704 -# On 32-bit machines there is normally two distinct libjvm.so:s, client and server. 1.2705 -# Which should we link to? Are we lucky enough that the binary api to the libjvm.so library 1.2706 -# is identical for client and server? Yes. Which is picked at runtime (client or server)? 1.2707 -# Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following 1.2708 -# libraries will link to whatever is in memory. Yuck. 1.2709 -# 1.2710 -# Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh. 1.2711 -if test "x$COMPILER_TYPE" = xCL; then 1.2712 - LDFLAGS_JDKLIB="$LDFLAGS -dll -libpath:${JDK_OUTPUTDIR}/lib -libpath:${JDK_OUTPUTDIR}/objs" 1.2713 - LDFLAGS_JDKLIB_SUFFIX="" 1.2714 - if test "$HOST_CPU_BITS" == "64"; then 1.2715 - LDFLAGS_STACK_SIZE=1048576 1.2716 - else 1.2717 - LDFLAGS_STACK_SIZE=327680 1.2718 - fi 1.2719 - LDFLAGS_JDKEXE="$LDFLAGS /STACK:$LDFLAGS_STACK_SIZE" 1.2720 -else 1.2721 - # If this is a --hash-style=gnu system, use --hash-style=both, why? 1.2722 - HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'` 1.2723 - if test -n "$HAS_GNU_HASH"; then 1.2724 - # And since we now know that the linker is gnu, then add -z defs, to forbid 1.2725 - # undefined symbols in object files. 1.2726 - LDFLAGS="$LDFLAGS -Xlinker --hash-style=both -Xlinker -z -Xlinker defs" 1.2727 - if test "x$DEBUG_LEVEL" == "xrelease"; then 1.2728 - # When building release libraries, tell the linker optimize them. 1.2729 - # Should this be supplied to the OSS linker as well? 1.2730 - LDFLAGS="$LDFLAGS -Xlinker -O1" 1.2731 - fi 1.2732 - fi 1.2733 - 1.2734 - LDFLAGS_JDKLIB="$LDFLAGS $SHARED_LIBRARY_FLAGS \ 1.2735 - -L${JDK_OUTPUTDIR}/objs \ 1.2736 - -L${JDK_OUTPUTDIR}/lib/${LIBARCHDIR}server \ 1.2737 - -L${JDK_OUTPUTDIR}/lib/${LIBARCHDIR}client \ 1.2738 - -L${JDK_OUTPUTDIR}/lib/${LIBARCHDIR}" 1.2739 - LDFLAGS_JDKLIB_SUFFIX="-ljvm -ljava" 1.2740 - if test "x$COMPILER_NAME" = xossc; then 1.2741 - LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc" 1.2742 - fi 1.2743 - 1.2744 - # Only the jli library is explicitly linked when the launchers are built. 1.2745 - # The libjvm is then dynamically loaded/linked by the launcher. 1.2746 - if test "x$HOST_OS" != "xmacosx"; then 1.2747 - LDFLAGS_JDKEXE="$LDFLAGS -L${JDK_OUTPUTDIR}/lib/${LIBARCHDIR}jli" 1.2748 - LDFLAGS_JDKEXE_SUFFIX="-ljli" 1.2749 - fi 1.2750 -fi 1.2751 - 1.2752 - 1.2753 -AC_SUBST(CFLAGS_JDKLIB) 1.2754 -AC_SUBST(CFLAGS_JDKEXE) 1.2755 - 1.2756 -AC_SUBST(CXXFLAGS_JDKLIB) 1.2757 -AC_SUBST(CXXFLAGS_JDKEXE) 1.2758 - 1.2759 -AC_SUBST(LDFLAGS_JDKLIB) 1.2760 -AC_SUBST(LDFLAGS_JDKEXE) 1.2761 -AC_SUBST(LDFLAGS_JDKLIB_SUFFIX) 1.2762 -AC_SUBST(LDFLAGS_JDKEXE_SUFFIX) 1.2763 - 1.2764 - 1.2765 -############################################################################### 1.2766 -# 1.2767 -# statically link libstdc++ before C++ ABI is stablized on Linux unless 1.2768 -# dynamic build is configured on command line. 1.2769 -# 1.2770 -AC_ARG_ENABLE([static-link-stdc++], [AS_HELP_STRING([--disable-static-link-stdc++], 1.2771 - [disable static linking of the C++ runtime on Linux @<:@enabled@:>@])],, 1.2772 - [ 1.2773 - enable_static_link_stdc__=yes 1.2774 - ]) 1.2775 - 1.2776 -if test "x$HOST_OS" = xlinux; then 1.2777 - # Test if -lstdc++ works. 1.2778 - AC_MSG_CHECKING([if dynamic link of stdc++ is possible]) 1.2779 - AC_LANG_PUSH(C++) 1.2780 - OLD_CXXFLAGS="$CXXFLAGS" 1.2781 - CXXFLAGS="$CXXFLAGS -lstdc++" 1.2782 - AC_LINK_IFELSE([AC_LANG_PROGRAM([], [return 0;])], 1.2783 - [has_dynamic_libstdcxx=yes], 1.2784 - [has_dynamic_libstdcxx=no]) 1.2785 - CXXFLAGS="$OLD_CXXFLAGS" 1.2786 - AC_LANG_POP(C++) 1.2787 - AC_MSG_RESULT([$has_dynamic_libstdcxx]) 1.2788 - 1.2789 - # Test if stdc++ can be linked statically. 1.2790 - AC_MSG_CHECKING([if static link of stdc++ is possible]) 1.2791 - STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic" 1.2792 - AC_LANG_PUSH(C++) 1.2793 - OLD_LIBS="$LIBS" 1.2794 - OLD_CXX="$CXX" 1.2795 - LIBS="$STATIC_STDCXX_FLAGS" 1.2796 - CXX="$CC" 1.2797 - AC_LINK_IFELSE([AC_LANG_PROGRAM([], [return 0;])], 1.2798 - [has_static_libstdcxx=yes], 1.2799 - [has_static_libstdcxx=no]) 1.2800 - LIBS="$OLD_LIBS" 1.2801 - CXX="$OLD_CXX" 1.2802 - AC_LANG_POP(C++) 1.2803 - AC_MSG_RESULT([$has_static_libstdcxx]) 1.2804 - 1.2805 - if test "x$has_static_libcxx" = xno && test "x$has_dynamic_libcxx" = xno; then 1.2806 - AC_MSG_ERROR([I cannot link to stdc++! Neither dynamically nor statically.]) 1.2807 - fi 1.2808 - 1.2809 - if test "x$enable_static_link_stdc__" = xyes && test "x$has_static_libstdcxx" = xno; then 1.2810 - AC_MSG_NOTICE([Static linking of libstdc++ was not possible reverting to dynamic linking.]) 1.2811 - enable_static_link_stdc__=no 1.2812 - fi 1.2813 - 1.2814 - if test "x$enable_static_link_stdc__" = xno && test "x$has_dynamic_libstdcxx" = xno; then 1.2815 - AC_MSG_NOTICE([Dynamic linking of libstdc++ was not possible reverting to static linking.]) 1.2816 - enable_static_link_stdc__=yes 1.2817 - fi 1.2818 - 1.2819 - AC_MSG_CHECKING([how to link with libstdc++]) 1.2820 - if test "x$enable_static_link_stdc__" = xyes; then 1.2821 - LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS" 1.2822 - LDCXX="$CC" 1.2823 - AC_MSG_RESULT([static]) 1.2824 - else 1.2825 - LIBCXX="$LIBCXX -lstdc++" 1.2826 - LDCXX="$CXX" 1.2827 - AC_MSG_RESULT([dynamic]) 1.2828 - fi 1.2829 -fi 1.2830 - 1.2831 -############################################################################### 1.2832 -# 1.2833 -# Could someone enlighten this configure script with a comment about libCrun? 1.2834 -# The LEGACY_HOST_CPU3 is the setting for ISA_DIR. 1.2835 -# 1.2836 -if test "x$HOST_OS" = xsolaris && test "x$LIBCXX" = x; then 1.2837 - LIBCXX="/usr/lib${LEGACY_HOST_CPU3}/libCrun.so.1" 1.2838 -fi 1.2839 - 1.2840 -# TODO better (platform agnostic) test 1.2841 -if test "x$HOST_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then 1.2842 - LIBCXX="-lstdc++" 1.2843 -fi 1.2844 - 1.2845 -AC_SUBST(LIBCXX) 1.2846 - 1.2847 ############################################################################### 1.2848 1.2849 -OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`" 1.2850 -OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`" 1.2851 -OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`" 1.2852 -OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`" 1.2853 -AC_SUBST(OS_VERSION_MAJOR) 1.2854 -AC_SUBST(OS_VERSION_MINOR) 1.2855 -AC_SUBST(OS_VERSION_MICRO) 1.2856 +# Check for some common pitfalls 1.2857 +BASIC_TEST_USABILITY_ISSUES 1.2858 1.2859 -############################################################################### 1.2860 -# 1.2861 -# Misc 1.2862 -# 1.2863 +# At the end, call the closed hook. (Dummy macro if no closed sources available) 1.2864 +CLOSED_HOOK 1.2865 1.2866 -# The name of the Service Agent jar. 1.2867 -SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}" 1.2868 -if test "x$HOST_OS" = "xwindows"; then 1.2869 - SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}" 1.2870 -fi 1.2871 -AC_SUBST(SALIB_NAME) 1.2872 - 1.2873 -# Control wether Hotspot runs Queens test after build. 1.2874 -AC_ARG_ENABLE([hotspot-test-in-build], [AS_HELP_STRING([--enable-hotspot-test-in-build], 1.2875 - [enable running of Queens test after Hotspot build (not yet available) @<:@disabled@:>@])],, 1.2876 - [enable_hotspot_test_in_build=no]) 1.2877 -if test "x$enable_hotspot_test_in_build" = "xyes"; then 1.2878 - TEST_IN_BUILD=true 1.2879 -else 1.2880 - TEST_IN_BUILD=false 1.2881 -fi 1.2882 -AC_SUBST(TEST_IN_BUILD) 1.2883 - 1.2884 -############################################################################### 1.2885 -# 1.2886 -# Choose cacerts source file 1.2887 -# 1.2888 -AC_ARG_WITH(cacerts-file, [AS_HELP_STRING([--with-cacerts-file], 1.2889 - [specify alternative cacerts file])]) 1.2890 -if test "x$with_cacerts_file" != x; then 1.2891 - CACERTS_FILE=$with_cacerts_file 1.2892 -else 1.2893 - if test "x$OPENJDK" = "xtrue"; then 1.2894 - CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts 1.2895 - else 1.2896 - CACERTS_FILE=${SRC_ROOT}/jdk/src/closed/share/lib/security/cacerts.internal 1.2897 - fi 1.2898 -fi 1.2899 -AC_SUBST(CACERTS_FILE) 1.2900 - 1.2901 -# Check if build directory is on local disk. 1.2902 -# return 0 if it is on local disk, non-0 if on remote disk or failure 1.2903 -function is_directory_on_local_disk { 1.2904 - # df -l lists only local disks; if the given directory is not found then 1.2905 - # a non-zero exit code is given 1.2906 - $DF -l $1 > /dev/null 2>&1 1.2907 -} 1.2908 - 1.2909 -AC_MSG_CHECKING([if build directory is on local disk]) 1.2910 -if is_directory_on_local_disk $OUTPUT_ROOT; then 1.2911 - OUTPUT_DIR_IS_LOCAL="yes" 1.2912 -else 1.2913 - OUTPUT_DIR_IS_LOCAL="no" 1.2914 -fi 1.2915 -AC_MSG_RESULT($OUTPUT_DIR_IS_LOCAL) 1.2916 - 1.2917 -# We're messing a bit with internal autoconf variables to put the config.status in the 1.2918 -# output directory instead of the current directory. 1.2919 -CONFIG_STATUS=$OUTPUT_ROOT/config.status 1.2920 - 1.2921 -# Now create the actual output files, after this, the main work of configure is done 1.2922 +# We're messing a bit with internal autoconf variables to put the config.status 1.2923 +# in the output directory instead of the current directory. 1.2924 +CONFIG_STATUS="$OUTPUT_ROOT/config.status" 1.2925 +# Create the actual output files. Now the main work of configure is done. 1.2926 AC_OUTPUT 1.2927 1.2928 # Finally output some useful information to the user 1.2929 - 1.2930 -if test "x$CCACHE_FOUND" != x; then 1.2931 - if test "x$HAS_GOOD_CCACHE" = x; then 1.2932 - CCACHE_STATUS="installed, but disabled (version older than 3.1.4)" 1.2933 - CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading." 1.2934 - else 1.2935 - CCACHE_STATUS="installed and in use" 1.2936 - fi 1.2937 -else 1.2938 - if test "x$GCC" = xyes; then 1.2939 - CCACHE_STATUS="not installed (consider installing)" 1.2940 - CCACHE_HELP_MSG="You do not have ccache installed. Try installing it." 1.2941 - else 1.2942 - CCACHE_STATUS="not available for your system" 1.2943 - fi 1.2944 -fi 1.2945 - 1.2946 -printf "\n" 1.2947 -printf "====================================================\n" 1.2948 -printf "A new configuration has been successfully created in\n" 1.2949 -printf "$OUTPUT_ROOT\n" 1.2950 -if test "x$CONFIGURE_COMMAND_LINE" != x; then 1.2951 - printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n" 1.2952 -else 1.2953 - printf "using default settings.\n" 1.2954 -fi 1.2955 - 1.2956 -printf "\n" 1.2957 -printf "Configuration summary:\n" 1.2958 -printf "* Debug level: $DEBUG_LEVEL\n" 1.2959 -printf "* JDK variant: $JDK_VARIANT\n" 1.2960 -printf "* JVM variants: $with_jvm_variants\n" 1.2961 -printf "* Host info: OS: $HOST_OS, CPU architecture: $HOST_CPU_ARCH, address length: $HOST_CPU_BITS\n" 1.2962 -printf "* Boot JDK: $BOOT_JDK\n" 1.2963 - 1.2964 -printf "\n" 1.2965 -printf "Build performance summary:\n" 1.2966 -printf "* Cores to use: $NUM_CORES\n" 1.2967 -printf "* Memory limit: $MEMORY_SIZE MB\n" 1.2968 -printf "* ccache status: $CCACHE_STATUS\n" 1.2969 - 1.2970 -if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then 1.2971 - printf "\n" 1.2972 - printf "WARNING: Your build output directory is not on a local disk.\n" 1.2973 - printf "This will severely degrade build performance!\n" 1.2974 - printf "It is recommended that you create an output directory on a local disk,\n" 1.2975 - printf "and run the configure script again from that directory.\n" 1.2976 -fi 1.2977 - 1.2978 -if test "x$CCACHE_HELP_MSG" != x; then 1.2979 - printf "\n" 1.2980 - printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n" 1.2981 - printf "$CCACHE_HELP_MSG\n" 1.2982 - 1.2983 - help_on_build_dependency ccache 1.2984 - printf "$HELP_MSG\n" 1.2985 -fi 1.2986 +HELP_PRINT_SUMMARY_AND_WARNINGS