Mon, 29 Oct 2012 14:06:57 -0700
8001897: build-infra: misc adjustments to configure script
Reviewed-by: ohair
1.1 --- a/common/autoconf/Makefile.in Fri Oct 26 14:29:57 2012 -0700 1.2 +++ b/common/autoconf/Makefile.in Mon Oct 29 14:06:57 2012 -0700 1.3 @@ -21,6 +21,7 @@ 1.4 # questions. 1.5 # 1.6 1.7 -# Generated Makefile @DATE_WHEN_CONFIGURED@ 1.8 +# This Makefile was generated by configure @DATE_WHEN_CONFIGURED@ 1.9 +# GENERATED FILE, DO NOT EDIT 1.10 SPEC:=@OUTPUT_ROOT@/spec.gmk 1.11 include @SRC_ROOT@/common/makefiles/Makefile
2.1 --- a/common/autoconf/basics.m4 Fri Oct 26 14:29:57 2012 -0700 2.2 +++ b/common/autoconf/basics.m4 Mon Oct 29 14:06:57 2012 -0700 2.3 @@ -143,25 +143,25 @@ 2.4 else 2.5 STARTDIR=$PWD 2.6 COUNTER=0 2.7 - DIR=`$DIRNAME [$]$1` 2.8 - FILE=`$BASENAME [$]$1` 2.9 + sym_link_dir=`$DIRNAME [$]$1` 2.10 + sym_link_file=`$BASENAME [$]$1` 2.11 while test $COUNTER -lt 20; do 2.12 - ISLINK=`$LS -l $DIR/$FILE | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'` 2.13 + ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'` 2.14 if test "x$ISLINK" == x; then 2.15 # This is not a symbolic link! We are done! 2.16 break 2.17 fi 2.18 # The link might be relative! We have to use cd to travel safely. 2.19 - cd $DIR 2.20 + cd $sym_link_dir 2.21 # ... and we must get the to the absolute path, not one using symbolic links. 2.22 cd `pwd -P` 2.23 cd `$DIRNAME $ISLINK` 2.24 - DIR=`$THEPWDCMD` 2.25 - FILE=`$BASENAME $ISLINK` 2.26 + sym_link_dir=`$THEPWDCMD` 2.27 + sym_link_file=`$BASENAME $ISLINK` 2.28 let COUNTER=COUNTER+1 2.29 done 2.30 cd $STARTDIR 2.31 - $1=$DIR/$FILE 2.32 + $1=$sym_link_dir/$sym_link_file 2.33 fi 2.34 fi 2.35 ]) 2.36 @@ -340,7 +340,6 @@ 2.37 AC_DEFUN_ONCE([BASIC_SETUP_OUTPUT_DIR], 2.38 [ 2.39 2.40 -AC_MSG_CHECKING([what configuration name to use]) 2.41 AC_ARG_WITH(conf-name, [AS_HELP_STRING([--with-conf-name], 2.42 [use this as the name of the configuration @<:@generated from important configuration options@:>@])], 2.43 [ CONF_NAME=${with_conf_name} ]) 2.44 @@ -366,7 +365,27 @@ 2.45 CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"` 2.46 fi 2.47 OUTPUT_ROOT="$CURDIR" 2.48 + 2.49 + # WARNING: This might be a bad thing to do. You need to be sure you want to 2.50 + # have a configuration in this directory. Do some sanity checks! 2.51 + 2.52 + if test ! -e "$OUTPUT_ROOT/spec.gmk"; then 2.53 + # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for 2.54 + # other files 2.55 + files_present=`$LS $OUTPUT_ROOT` 2.56 + if test "x$files_present" != x; then 2.57 + AC_MSG_NOTICE([Current directory is $CURDIR.]) 2.58 + AC_MSG_NOTICE([Since this is not the source root, configure will output the configuration here]) 2.59 + AC_MSG_NOTICE([(as opposed to creating a configuration in <src_root>/build/<conf-name>).]) 2.60 + AC_MSG_NOTICE([However, this directory is not empty. This is not allowed, since it could]) 2.61 + AC_MSG_NOTICE([seriously mess up just about everything.]) 2.62 + AC_MSG_NOTICE([Try 'cd $SRC_ROOT' and restart configure]) 2.63 + AC_MSG_NOTICE([(or create a new empty directory and cd to it).]) 2.64 + AC_MSG_ERROR([Will not continue creating configuration in $CURDIR]) 2.65 + fi 2.66 + fi 2.67 fi 2.68 +AC_MSG_CHECKING([what configuration name to use]) 2.69 AC_MSG_RESULT([$CONF_NAME]) 2.70 2.71 BASIC_FIXUP_PATH(OUTPUT_ROOT)
3.1 --- a/common/autoconf/generated-configure.sh Fri Oct 26 14:29:57 2012 -0700 3.2 +++ b/common/autoconf/generated-configure.sh Mon Oct 29 14:06:57 2012 -0700 3.3 @@ -767,6 +767,7 @@ 3.4 JDK_MINOR_VERSION 3.5 JDK_MAJOR_VERSION 3.6 COMPRESS_JARS 3.7 +UNLIMITED_CRYPTO 3.8 CACERTS_FILE 3.9 TEST_IN_BUILD 3.10 BUILD_HEADLESS 3.11 @@ -962,6 +963,7 @@ 3.12 enable_headful 3.13 enable_hotspot_test_in_build 3.14 with_cacerts_file 3.15 +enable_unlimited_crypto 3.16 with_boot_jdk 3.17 with_boot_jdk_jvmargs 3.18 with_add_source_root 3.19 @@ -1647,6 +1649,8 @@ 3.20 support) [enabled] 3.21 --enable-hotspot-test-in-build 3.22 run the Queens test after Hotspot build [disabled] 3.23 + --enable-unlimited-crypto 3.24 + Enable unlimited crypto policy [disabled] 3.25 --disable-debug-symbols disable generation of debug symbols [enabled] 3.26 --disable-zip-debug-info 3.27 disable zipping of debug-info files [enabled] 3.28 @@ -3661,7 +3665,7 @@ 3.29 #CUSTOM_AUTOCONF_INCLUDE 3.30 3.31 # Do not change or remove the following line, it is needed for consistency checks: 3.32 -DATE_WHEN_GENERATED=1351257228 3.33 +DATE_WHEN_GENERATED=1351539315 3.34 3.35 ############################################################################### 3.36 # 3.37 @@ -6906,25 +6910,25 @@ 3.38 else 3.39 STARTDIR=$PWD 3.40 COUNTER=0 3.41 - DIR=`$DIRNAME $SCRIPT` 3.42 - FILE=`$BASENAME $SCRIPT` 3.43 + sym_link_dir=`$DIRNAME $SCRIPT` 3.44 + sym_link_file=`$BASENAME $SCRIPT` 3.45 while test $COUNTER -lt 20; do 3.46 - ISLINK=`$LS -l $DIR/$FILE | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'` 3.47 + ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'` 3.48 if test "x$ISLINK" == x; then 3.49 # This is not a symbolic link! We are done! 3.50 break 3.51 fi 3.52 # The link might be relative! We have to use cd to travel safely. 3.53 - cd $DIR 3.54 + cd $sym_link_dir 3.55 # ... and we must get the to the absolute path, not one using symbolic links. 3.56 cd `pwd -P` 3.57 cd `$DIRNAME $ISLINK` 3.58 - DIR=`$THEPWDCMD` 3.59 - FILE=`$BASENAME $ISLINK` 3.60 + sym_link_dir=`$THEPWDCMD` 3.61 + sym_link_file=`$BASENAME $ISLINK` 3.62 let COUNTER=COUNTER+1 3.63 done 3.64 cd $STARTDIR 3.65 - SCRIPT=$DIR/$FILE 3.66 + SCRIPT=$sym_link_dir/$sym_link_file 3.67 fi 3.68 fi 3.69 3.70 @@ -7563,8 +7567,6 @@ 3.71 # and options (variants and debug level) parsed. 3.72 3.73 3.74 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5 3.75 -$as_echo_n "checking what configuration name to use... " >&6; } 3.76 3.77 # Check whether --with-conf-name was given. 3.78 if test "${with_conf_name+set}" = set; then : 3.79 @@ -7593,7 +7595,35 @@ 3.80 CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"` 3.81 fi 3.82 OUTPUT_ROOT="$CURDIR" 3.83 -fi 3.84 + 3.85 + # WARNING: This might be a bad thing to do. You need to be sure you want to 3.86 + # have a configuration in this directory. Do some sanity checks! 3.87 + 3.88 + if test ! -e "$OUTPUT_ROOT/spec.gmk"; then 3.89 + # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for 3.90 + # other files 3.91 + files_present=`$LS $OUTPUT_ROOT` 3.92 + if test "x$files_present" != x; then 3.93 + { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5 3.94 +$as_echo "$as_me: Current directory is $CURDIR." >&6;} 3.95 + { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5 3.96 +$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;} 3.97 + { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5 3.98 +$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;} 3.99 + { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5 3.100 +$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;} 3.101 + { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5 3.102 +$as_echo "$as_me: seriously mess up just about everything." >&6;} 3.103 + { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5 3.104 +$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;} 3.105 + { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5 3.106 +$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;} 3.107 + as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5 3.108 + fi 3.109 + fi 3.110 +fi 3.111 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5 3.112 +$as_echo_n "checking what configuration name to use... " >&6; } 3.113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5 3.114 $as_echo "$CONF_NAME" >&6; } 3.115 3.116 @@ -10334,6 +10364,24 @@ 3.117 3.118 ############################################################################### 3.119 # 3.120 +# Enable or disable unlimited crypto 3.121 +# 3.122 +# Check whether --enable-unlimited-crypto was given. 3.123 +if test "${enable_unlimited_crypto+set}" = set; then : 3.124 + enableval=$enable_unlimited_crypto; 3.125 +else 3.126 + enable_unlimited_crypto=no 3.127 +fi 3.128 + 3.129 +if test "x$enable_unlimited_crypto" = "xyes"; then 3.130 + UNLIMITED_CRYPTO=true 3.131 +else 3.132 + UNLIMITED_CRYPTO=false 3.133 +fi 3.134 + 3.135 + 3.136 +############################################################################### 3.137 +# 3.138 # Compress jars 3.139 # 3.140 COMPRESS_JARS=false 3.141 @@ -11543,25 +11591,25 @@ 3.142 else 3.143 STARTDIR=$PWD 3.144 COUNTER=0 3.145 - DIR=`$DIRNAME $BINARY` 3.146 - FILE=`$BASENAME $BINARY` 3.147 + sym_link_dir=`$DIRNAME $BINARY` 3.148 + sym_link_file=`$BASENAME $BINARY` 3.149 while test $COUNTER -lt 20; do 3.150 - ISLINK=`$LS -l $DIR/$FILE | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'` 3.151 + ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'` 3.152 if test "x$ISLINK" == x; then 3.153 # This is not a symbolic link! We are done! 3.154 break 3.155 fi 3.156 # The link might be relative! We have to use cd to travel safely. 3.157 - cd $DIR 3.158 + cd $sym_link_dir 3.159 # ... and we must get the to the absolute path, not one using symbolic links. 3.160 cd `pwd -P` 3.161 cd `$DIRNAME $ISLINK` 3.162 - DIR=`$THEPWDCMD` 3.163 - FILE=`$BASENAME $ISLINK` 3.164 + sym_link_dir=`$THEPWDCMD` 3.165 + sym_link_file=`$BASENAME $ISLINK` 3.166 let COUNTER=COUNTER+1 3.167 done 3.168 cd $STARTDIR 3.169 - BINARY=$DIR/$FILE 3.170 + BINARY=$sym_link_dir/$sym_link_file 3.171 fi 3.172 fi 3.173 3.174 @@ -17823,25 +17871,25 @@ 3.175 else 3.176 STARTDIR=$PWD 3.177 COUNTER=0 3.178 - DIR=`$DIRNAME $TEST_COMPILER` 3.179 - FILE=`$BASENAME $TEST_COMPILER` 3.180 + sym_link_dir=`$DIRNAME $TEST_COMPILER` 3.181 + sym_link_file=`$BASENAME $TEST_COMPILER` 3.182 while test $COUNTER -lt 20; do 3.183 - ISLINK=`$LS -l $DIR/$FILE | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'` 3.184 + ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'` 3.185 if test "x$ISLINK" == x; then 3.186 # This is not a symbolic link! We are done! 3.187 break 3.188 fi 3.189 # The link might be relative! We have to use cd to travel safely. 3.190 - cd $DIR 3.191 + cd $sym_link_dir 3.192 # ... and we must get the to the absolute path, not one using symbolic links. 3.193 cd `pwd -P` 3.194 cd `$DIRNAME $ISLINK` 3.195 - DIR=`$THEPWDCMD` 3.196 - FILE=`$BASENAME $ISLINK` 3.197 + sym_link_dir=`$THEPWDCMD` 3.198 + sym_link_file=`$BASENAME $ISLINK` 3.199 let COUNTER=COUNTER+1 3.200 done 3.201 cd $STARTDIR 3.202 - TEST_COMPILER=$DIR/$FILE 3.203 + TEST_COMPILER=$sym_link_dir/$sym_link_file 3.204 fi 3.205 fi 3.206 3.207 @@ -18231,25 +18279,25 @@ 3.208 else 3.209 STARTDIR=$PWD 3.210 COUNTER=0 3.211 - DIR=`$DIRNAME $PROPER_COMPILER_CC` 3.212 - FILE=`$BASENAME $PROPER_COMPILER_CC` 3.213 + sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC` 3.214 + sym_link_file=`$BASENAME $PROPER_COMPILER_CC` 3.215 while test $COUNTER -lt 20; do 3.216 - ISLINK=`$LS -l $DIR/$FILE | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'` 3.217 + ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'` 3.218 if test "x$ISLINK" == x; then 3.219 # This is not a symbolic link! We are done! 3.220 break 3.221 fi 3.222 # The link might be relative! We have to use cd to travel safely. 3.223 - cd $DIR 3.224 + cd $sym_link_dir 3.225 # ... and we must get the to the absolute path, not one using symbolic links. 3.226 cd `pwd -P` 3.227 cd `$DIRNAME $ISLINK` 3.228 - DIR=`$THEPWDCMD` 3.229 - FILE=`$BASENAME $ISLINK` 3.230 + sym_link_dir=`$THEPWDCMD` 3.231 + sym_link_file=`$BASENAME $ISLINK` 3.232 let COUNTER=COUNTER+1 3.233 done 3.234 cd $STARTDIR 3.235 - PROPER_COMPILER_CC=$DIR/$FILE 3.236 + PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file 3.237 fi 3.238 fi 3.239 3.240 @@ -19278,25 +19326,25 @@ 3.241 else 3.242 STARTDIR=$PWD 3.243 COUNTER=0 3.244 - DIR=`$DIRNAME $TEST_COMPILER` 3.245 - FILE=`$BASENAME $TEST_COMPILER` 3.246 + sym_link_dir=`$DIRNAME $TEST_COMPILER` 3.247 + sym_link_file=`$BASENAME $TEST_COMPILER` 3.248 while test $COUNTER -lt 20; do 3.249 - ISLINK=`$LS -l $DIR/$FILE | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'` 3.250 + ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'` 3.251 if test "x$ISLINK" == x; then 3.252 # This is not a symbolic link! We are done! 3.253 break 3.254 fi 3.255 # The link might be relative! We have to use cd to travel safely. 3.256 - cd $DIR 3.257 + cd $sym_link_dir 3.258 # ... and we must get the to the absolute path, not one using symbolic links. 3.259 cd `pwd -P` 3.260 cd `$DIRNAME $ISLINK` 3.261 - DIR=`$THEPWDCMD` 3.262 - FILE=`$BASENAME $ISLINK` 3.263 + sym_link_dir=`$THEPWDCMD` 3.264 + sym_link_file=`$BASENAME $ISLINK` 3.265 let COUNTER=COUNTER+1 3.266 done 3.267 cd $STARTDIR 3.268 - TEST_COMPILER=$DIR/$FILE 3.269 + TEST_COMPILER=$sym_link_dir/$sym_link_file 3.270 fi 3.271 fi 3.272 3.273 @@ -19686,25 +19734,25 @@ 3.274 else 3.275 STARTDIR=$PWD 3.276 COUNTER=0 3.277 - DIR=`$DIRNAME $PROPER_COMPILER_CXX` 3.278 - FILE=`$BASENAME $PROPER_COMPILER_CXX` 3.279 + sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX` 3.280 + sym_link_file=`$BASENAME $PROPER_COMPILER_CXX` 3.281 while test $COUNTER -lt 20; do 3.282 - ISLINK=`$LS -l $DIR/$FILE | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'` 3.283 + ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'` 3.284 if test "x$ISLINK" == x; then 3.285 # This is not a symbolic link! We are done! 3.286 break 3.287 fi 3.288 # The link might be relative! We have to use cd to travel safely. 3.289 - cd $DIR 3.290 + cd $sym_link_dir 3.291 # ... and we must get the to the absolute path, not one using symbolic links. 3.292 cd `pwd -P` 3.293 cd `$DIRNAME $ISLINK` 3.294 - DIR=`$THEPWDCMD` 3.295 - FILE=`$BASENAME $ISLINK` 3.296 + sym_link_dir=`$THEPWDCMD` 3.297 + sym_link_file=`$BASENAME $ISLINK` 3.298 let COUNTER=COUNTER+1 3.299 done 3.300 cd $STARTDIR 3.301 - PROPER_COMPILER_CXX=$DIR/$FILE 3.302 + PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file 3.303 fi 3.304 fi 3.305 3.306 @@ -20039,7 +20087,7 @@ 3.307 3.308 ### Locate other tools 3.309 3.310 -if test "x$OPENJDK_TARGET_OS" != xwindows; then 3.311 +if test "x$OPENJDK_TARGET_OS" = xmacosx; then 3.312 ac_ext=m 3.313 ac_cpp='$OBJCPP $CPPFLAGS' 3.314 ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4.1 --- a/common/autoconf/jdk-options.m4 Fri Oct 26 14:29:57 2012 -0700 4.2 +++ b/common/autoconf/jdk-options.m4 Mon Oct 29 14:06:57 2012 -0700 4.3 @@ -334,6 +334,20 @@ 4.4 4.5 ############################################################################### 4.6 # 4.7 +# Enable or disable unlimited crypto 4.8 +# 4.9 +AC_ARG_ENABLE(unlimited-crypto, [AS_HELP_STRING([--enable-unlimited-crypto], 4.10 + [Enable unlimited crypto policy @<:@disabled@:>@])],, 4.11 + [enable_unlimited_crypto=no]) 4.12 +if test "x$enable_unlimited_crypto" = "xyes"; then 4.13 + UNLIMITED_CRYPTO=true 4.14 +else 4.15 + UNLIMITED_CRYPTO=false 4.16 +fi 4.17 +AC_SUBST(UNLIMITED_CRYPTO) 4.18 + 4.19 +############################################################################### 4.20 +# 4.21 # Compress jars 4.22 # 4.23 COMPRESS_JARS=false
5.1 --- a/common/autoconf/spec.gmk.in Fri Oct 26 14:29:57 2012 -0700 5.2 +++ b/common/autoconf/spec.gmk.in Mon Oct 29 14:06:57 2012 -0700 5.3 @@ -265,6 +265,9 @@ 5.4 # Source file for cacerts 5.5 CACERTS_FILE=@CACERTS_FILE@ 5.6 5.7 +# Enable unlimited crypto policy 5.8 +UNLIMITED_CRYPTO=@UNLIMITED_CRYPTO@ 5.9 + 5.10 # Necessary additional compiler flags to compile X11 5.11 X_CFLAGS:=@X_CFLAGS@ 5.12 X_LIBS:=@X_LIBS@
6.1 --- a/common/autoconf/toolchain.m4 Fri Oct 26 14:29:57 2012 -0700 6.2 +++ b/common/autoconf/toolchain.m4 Mon Oct 29 14:06:57 2012 -0700 6.3 @@ -264,7 +264,7 @@ 6.4 6.5 ### Locate other tools 6.6 6.7 -if test "x$OPENJDK_TARGET_OS" != xwindows; then 6.8 +if test "x$OPENJDK_TARGET_OS" = xmacosx; then 6.9 AC_PROG_OBJC 6.10 BASIC_FIXUP_EXECUTABLE(OBJC) 6.11 else