common/autoconf/basics.m4

changeset 839
174a54ce39c4
parent 801
7697621037fd
child 855
ac09e62d5e6b
child 861
1a853fac18ff
     1.1 --- a/common/autoconf/basics.m4	Wed Oct 09 18:51:32 2013 -0700
     1.2 +++ b/common/autoconf/basics.m4	Thu Oct 10 14:58:19 2013 +0200
     1.3 @@ -24,23 +24,23 @@
     1.4  #
     1.5  
     1.6  # Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
     1.7 -# If so, then append $1 to $2\
     1.8 +# If so, then append $1 to $2 \
     1.9  # Also set JVM_ARG_OK to true/false depending on outcome.
    1.10  AC_DEFUN([ADD_JVM_ARG_IF_OK],
    1.11  [
    1.12 -    $ECHO "Check if jvm arg is ok: $1" >&AS_MESSAGE_LOG_FD
    1.13 -    $ECHO "Command: $3 $1 -version" >&AS_MESSAGE_LOG_FD
    1.14 -    OUTPUT=`$3 $1 -version 2>&1`
    1.15 -    FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
    1.16 -    FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
    1.17 -    if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
    1.18 -        $2="[$]$2 $1"
    1.19 -	JVM_ARG_OK=true
    1.20 -    else
    1.21 -	$ECHO "Arg failed:" >&AS_MESSAGE_LOG_FD
    1.22 -	$ECHO "$OUTPUT" >&AS_MESSAGE_LOG_FD
    1.23 -	JVM_ARG_OK=false
    1.24 -    fi
    1.25 +  $ECHO "Check if jvm arg is ok: $1" >&AS_MESSAGE_LOG_FD
    1.26 +  $ECHO "Command: $3 $1 -version" >&AS_MESSAGE_LOG_FD
    1.27 +  OUTPUT=`$3 $1 -version 2>&1`
    1.28 +  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
    1.29 +  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
    1.30 +  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
    1.31 +    $2="[$]$2 $1"
    1.32 +    JVM_ARG_OK=true
    1.33 +  else
    1.34 +    $ECHO "Arg failed:" >&AS_MESSAGE_LOG_FD
    1.35 +    $ECHO "$OUTPUT" >&AS_MESSAGE_LOG_FD
    1.36 +    JVM_ARG_OK=false
    1.37 +  fi
    1.38  ])
    1.39  
    1.40  # Appends a string to a path variable, only adding the : when needed.
    1.41 @@ -82,7 +82,7 @@
    1.42        AC_MSG_ERROR([The path of $1, which resolves as "$path", is not found.])
    1.43      fi
    1.44  
    1.45 -    $1="`cd "$path"; $THEPWDCMD -L`" 
    1.46 +    $1="`cd "$path"; $THEPWDCMD -L`"
    1.47    fi
    1.48  ])
    1.49  
    1.50 @@ -129,78 +129,78 @@
    1.51        AC_MSG_NOTICE([Resolving $1 (as $path) failed, using $path directly.])
    1.52        new_path="$path"
    1.53      fi
    1.54 -    
    1.55 +
    1.56      if test "x$new_path" = x; then
    1.57 -        AC_MSG_NOTICE([The path of $1, which resolves as "$complete", is not found.])
    1.58 -        has_space=`$ECHO "$complete" | $GREP " "`
    1.59 -        if test "x$has_space" != x; then
    1.60 -          AC_MSG_NOTICE([This might be caused by spaces in the path, which is not allowed.])
    1.61 -        fi
    1.62 -        AC_MSG_ERROR([Cannot locate the the path of $1])
    1.63 +      AC_MSG_NOTICE([The path of $1, which resolves as "$complete", is not found.])
    1.64 +      has_space=`$ECHO "$complete" | $GREP " "`
    1.65 +      if test "x$has_space" != x; then
    1.66 +        AC_MSG_NOTICE([This might be caused by spaces in the path, which is not allowed.])
    1.67        fi
    1.68 +      AC_MSG_ERROR([Cannot locate the the path of $1])
    1.69 +    fi
    1.70    fi
    1.71  
    1.72 -      # Now join together the path and the arguments once again
    1.73 -      if test "x$arguments" != xEOL; then
    1.74 -        new_complete="$new_path ${arguments% *}"
    1.75 -      else
    1.76 -        new_complete="$new_path"
    1.77 -      fi
    1.78 +  # Now join together the path and the arguments once again
    1.79 +  if test "x$arguments" != xEOL; then
    1.80 +    new_complete="$new_path ${arguments% *}"
    1.81 +  else
    1.82 +    new_complete="$new_path"
    1.83 +  fi
    1.84  
    1.85    if test "x$complete" != "x$new_complete"; then
    1.86 -      $1="$new_complete"
    1.87 -      AC_MSG_NOTICE([Rewriting $1 to "$new_complete"])
    1.88 -    fi
    1.89 +    $1="$new_complete"
    1.90 +    AC_MSG_NOTICE([Rewriting $1 to "$new_complete"])
    1.91 +  fi
    1.92  ])
    1.93  
    1.94  AC_DEFUN([BASIC_REMOVE_SYMBOLIC_LINKS],
    1.95  [
    1.96 -    if test "x$OPENJDK_BUILD_OS" != xwindows; then
    1.97 -        # Follow a chain of symbolic links. Use readlink
    1.98 -        # where it exists, else fall back to horribly
    1.99 -        # complicated shell code.
   1.100 -        if test "x$READLINK_TESTED" != yes; then
   1.101 -            # On MacOSX there is a readlink tool with a different
   1.102 -            # purpose than the GNU readlink tool. Check the found readlink.
   1.103 -            ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
   1.104 -            if test "x$ISGNU" = x; then
   1.105 -                 # A readlink that we do not know how to use.
   1.106 -                 # Are there other non-GNU readlinks out there?
   1.107 -                 READLINK_TESTED=yes
   1.108 -                 READLINK=
   1.109 -            fi
   1.110 +  if test "x$OPENJDK_BUILD_OS" != xwindows; then
   1.111 +    # Follow a chain of symbolic links. Use readlink
   1.112 +    # where it exists, else fall back to horribly
   1.113 +    # complicated shell code.
   1.114 +    if test "x$READLINK_TESTED" != yes; then
   1.115 +      # On MacOSX there is a readlink tool with a different
   1.116 +      # purpose than the GNU readlink tool. Check the found readlink.
   1.117 +      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
   1.118 +      if test "x$ISGNU" = x; then
   1.119 +        # A readlink that we do not know how to use.
   1.120 +        # Are there other non-GNU readlinks out there?
   1.121 +        READLINK_TESTED=yes
   1.122 +        READLINK=
   1.123 +      fi
   1.124 +    fi
   1.125 +
   1.126 +    if test "x$READLINK" != x; then
   1.127 +      $1=`$READLINK -f [$]$1`
   1.128 +    else
   1.129 +      # Save the current directory for restoring afterwards
   1.130 +      STARTDIR=$PWD
   1.131 +      COUNTER=0
   1.132 +      sym_link_dir=`$DIRNAME [$]$1`
   1.133 +      sym_link_file=`$BASENAME [$]$1`
   1.134 +      cd $sym_link_dir
   1.135 +      # Use -P flag to resolve symlinks in directories.
   1.136 +      cd `$THEPWDCMD -P`
   1.137 +      sym_link_dir=`$THEPWDCMD -P`
   1.138 +      # Resolve file symlinks
   1.139 +      while test $COUNTER -lt 20; do
   1.140 +        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
   1.141 +        if test "x$ISLINK" == x; then
   1.142 +          # This is not a symbolic link! We are done!
   1.143 +          break
   1.144          fi
   1.145 -
   1.146 -        if test "x$READLINK" != x; then
   1.147 -            $1=`$READLINK -f [$]$1`
   1.148 -        else
   1.149 -            # Save the current directory for restoring afterwards
   1.150 -            STARTDIR=$PWD
   1.151 -            COUNTER=0
   1.152 -            sym_link_dir=`$DIRNAME [$]$1`
   1.153 -            sym_link_file=`$BASENAME [$]$1`
   1.154 -            cd $sym_link_dir
   1.155 -            # Use -P flag to resolve symlinks in directories.
   1.156 -            cd `$THEPWDCMD -P`
   1.157 -            sym_link_dir=`$THEPWDCMD -P`
   1.158 -            # Resolve file symlinks
   1.159 -            while test $COUNTER -lt 20; do
   1.160 -                ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
   1.161 -                if test "x$ISLINK" == x; then
   1.162 -                    # This is not a symbolic link! We are done!
   1.163 -                    break
   1.164 -                fi
   1.165 -                # Again resolve directory symlinks since the target of the just found
   1.166 -                # link could be in a different directory
   1.167 -                cd `$DIRNAME $ISLINK`
   1.168 -                sym_link_dir=`$THEPWDCMD -P`
   1.169 -                sym_link_file=`$BASENAME $ISLINK`
   1.170 -                let COUNTER=COUNTER+1
   1.171 -            done
   1.172 -            cd $STARTDIR
   1.173 -            $1=$sym_link_dir/$sym_link_file
   1.174 -        fi
   1.175 +        # Again resolve directory symlinks since the target of the just found
   1.176 +        # link could be in a different directory
   1.177 +        cd `$DIRNAME $ISLINK`
   1.178 +        sym_link_dir=`$THEPWDCMD -P`
   1.179 +        sym_link_file=`$BASENAME $ISLINK`
   1.180 +        let COUNTER=COUNTER+1
   1.181 +      done
   1.182 +      cd $STARTDIR
   1.183 +      $1=$sym_link_dir/$sym_link_file
   1.184      fi
   1.185 +  fi
   1.186  ])
   1.187  
   1.188  # Register a --with argument but mark it as deprecated
   1.189 @@ -214,12 +214,12 @@
   1.190  
   1.191  AC_DEFUN_ONCE([BASIC_INIT],
   1.192  [
   1.193 -# Save the original command line. This is passed to us by the wrapper configure script.
   1.194 -AC_SUBST(CONFIGURE_COMMAND_LINE)
   1.195 -DATE_WHEN_CONFIGURED=`LANG=C date`
   1.196 -AC_SUBST(DATE_WHEN_CONFIGURED)
   1.197 -AC_MSG_NOTICE([Configuration created at $DATE_WHEN_CONFIGURED.])
   1.198 -AC_MSG_NOTICE([configure script generated at timestamp $DATE_WHEN_GENERATED.])
   1.199 +  # Save the original command line. This is passed to us by the wrapper configure script.
   1.200 +  AC_SUBST(CONFIGURE_COMMAND_LINE)
   1.201 +  DATE_WHEN_CONFIGURED=`LANG=C date`
   1.202 +  AC_SUBST(DATE_WHEN_CONFIGURED)
   1.203 +  AC_MSG_NOTICE([Configuration created at $DATE_WHEN_CONFIGURED.])
   1.204 +  AC_MSG_NOTICE([configure script generated at timestamp $DATE_WHEN_GENERATED.])
   1.205  ])
   1.206  
   1.207  # Test that variable $1 denoting a program is not empty. If empty, exit with an error.
   1.208 @@ -227,15 +227,15 @@
   1.209  # $2: executable name to print in warning (optional)
   1.210  AC_DEFUN([BASIC_CHECK_NONEMPTY],
   1.211  [
   1.212 -    if test "x[$]$1" = x; then
   1.213 -        if test "x$2" = x; then
   1.214 -          PROG_NAME=translit($1,A-Z,a-z)
   1.215 -        else
   1.216 -          PROG_NAME=$2
   1.217 -        fi
   1.218 -        AC_MSG_NOTICE([Could not find $PROG_NAME!])
   1.219 -        AC_MSG_ERROR([Cannot continue])
   1.220 +  if test "x[$]$1" = x; then
   1.221 +    if test "x$2" = x; then
   1.222 +      PROG_NAME=translit($1,A-Z,a-z)
   1.223 +    else
   1.224 +      PROG_NAME=$2
   1.225      fi
   1.226 +    AC_MSG_NOTICE([Could not find $PROG_NAME!])
   1.227 +    AC_MSG_ERROR([Cannot continue])
   1.228 +  fi
   1.229  ])
   1.230  
   1.231  # Does AC_PATH_PROG followed by BASIC_CHECK_NONEMPTY.
   1.232 @@ -244,8 +244,8 @@
   1.233  # $2: executable name to look for
   1.234  AC_DEFUN([BASIC_REQUIRE_PROG],
   1.235  [
   1.236 -    AC_PATH_PROGS($1, $2)
   1.237 -    BASIC_CHECK_NONEMPTY($1, $2)
   1.238 +  AC_PATH_PROGS($1, $2)
   1.239 +  BASIC_CHECK_NONEMPTY($1, $2)
   1.240  ])
   1.241  
   1.242  # Setup the most fundamental tools that relies on not much else to set up,
   1.243 @@ -253,171 +253,171 @@
   1.244  AC_DEFUN_ONCE([BASIC_SETUP_FUNDAMENTAL_TOOLS],
   1.245  [
   1.246  
   1.247 -# Start with tools that do not need have cross compilation support
   1.248 -# and can be expected to be found in the default PATH. These tools are
   1.249 -# used by configure. Nor are these tools expected to be found in the
   1.250 -# devkit from the builddeps server either, since they are
   1.251 -# needed to download the devkit.
   1.252 +  # Start with tools that do not need have cross compilation support
   1.253 +  # and can be expected to be found in the default PATH. These tools are
   1.254 +  # used by configure. Nor are these tools expected to be found in the
   1.255 +  # devkit from the builddeps server either, since they are
   1.256 +  # needed to download the devkit.
   1.257  
   1.258 -# First are all the simple required tools.
   1.259 -BASIC_REQUIRE_PROG(BASENAME, basename)
   1.260 -BASIC_REQUIRE_PROG(BASH, bash)
   1.261 -BASIC_REQUIRE_PROG(CAT, cat)
   1.262 -BASIC_REQUIRE_PROG(CHMOD, chmod)
   1.263 -BASIC_REQUIRE_PROG(CMP, cmp)
   1.264 -BASIC_REQUIRE_PROG(COMM, comm)
   1.265 -BASIC_REQUIRE_PROG(CP, cp)
   1.266 -BASIC_REQUIRE_PROG(CPIO, cpio)
   1.267 -BASIC_REQUIRE_PROG(CUT, cut)
   1.268 -BASIC_REQUIRE_PROG(DATE, date)
   1.269 -BASIC_REQUIRE_PROG(DIFF, [gdiff diff])
   1.270 -BASIC_REQUIRE_PROG(DIRNAME, dirname)
   1.271 -BASIC_REQUIRE_PROG(ECHO, echo)
   1.272 -BASIC_REQUIRE_PROG(EXPR, expr)
   1.273 -BASIC_REQUIRE_PROG(FILE, file)
   1.274 -BASIC_REQUIRE_PROG(FIND, find)
   1.275 -BASIC_REQUIRE_PROG(HEAD, head)
   1.276 -BASIC_REQUIRE_PROG(LN, ln)
   1.277 -BASIC_REQUIRE_PROG(LS, ls)
   1.278 -BASIC_REQUIRE_PROG(MKDIR, mkdir)
   1.279 -BASIC_REQUIRE_PROG(MKTEMP, mktemp)
   1.280 -BASIC_REQUIRE_PROG(MV, mv)
   1.281 -BASIC_REQUIRE_PROG(PRINTF, printf)
   1.282 -BASIC_REQUIRE_PROG(RM, rm)
   1.283 -BASIC_REQUIRE_PROG(SH, sh)
   1.284 -BASIC_REQUIRE_PROG(SORT, sort)
   1.285 -BASIC_REQUIRE_PROG(TAIL, tail)
   1.286 -BASIC_REQUIRE_PROG(TAR, tar)
   1.287 -BASIC_REQUIRE_PROG(TEE, tee)
   1.288 -BASIC_REQUIRE_PROG(TOUCH, touch)
   1.289 -BASIC_REQUIRE_PROG(TR, tr)
   1.290 -BASIC_REQUIRE_PROG(UNAME, uname)
   1.291 -BASIC_REQUIRE_PROG(UNIQ, uniq)
   1.292 -BASIC_REQUIRE_PROG(WC, wc)
   1.293 -BASIC_REQUIRE_PROG(WHICH, which)
   1.294 -BASIC_REQUIRE_PROG(XARGS, xargs)
   1.295 +  # First are all the simple required tools.
   1.296 +  BASIC_REQUIRE_PROG(BASENAME, basename)
   1.297 +  BASIC_REQUIRE_PROG(BASH, bash)
   1.298 +  BASIC_REQUIRE_PROG(CAT, cat)
   1.299 +  BASIC_REQUIRE_PROG(CHMOD, chmod)
   1.300 +  BASIC_REQUIRE_PROG(CMP, cmp)
   1.301 +  BASIC_REQUIRE_PROG(COMM, comm)
   1.302 +  BASIC_REQUIRE_PROG(CP, cp)
   1.303 +  BASIC_REQUIRE_PROG(CPIO, cpio)
   1.304 +  BASIC_REQUIRE_PROG(CUT, cut)
   1.305 +  BASIC_REQUIRE_PROG(DATE, date)
   1.306 +  BASIC_REQUIRE_PROG(DIFF, [gdiff diff])
   1.307 +  BASIC_REQUIRE_PROG(DIRNAME, dirname)
   1.308 +  BASIC_REQUIRE_PROG(ECHO, echo)
   1.309 +  BASIC_REQUIRE_PROG(EXPR, expr)
   1.310 +  BASIC_REQUIRE_PROG(FILE, file)
   1.311 +  BASIC_REQUIRE_PROG(FIND, find)
   1.312 +  BASIC_REQUIRE_PROG(HEAD, head)
   1.313 +  BASIC_REQUIRE_PROG(LN, ln)
   1.314 +  BASIC_REQUIRE_PROG(LS, ls)
   1.315 +  BASIC_REQUIRE_PROG(MKDIR, mkdir)
   1.316 +  BASIC_REQUIRE_PROG(MKTEMP, mktemp)
   1.317 +  BASIC_REQUIRE_PROG(MV, mv)
   1.318 +  BASIC_REQUIRE_PROG(PRINTF, printf)
   1.319 +  BASIC_REQUIRE_PROG(RM, rm)
   1.320 +  BASIC_REQUIRE_PROG(SH, sh)
   1.321 +  BASIC_REQUIRE_PROG(SORT, sort)
   1.322 +  BASIC_REQUIRE_PROG(TAIL, tail)
   1.323 +  BASIC_REQUIRE_PROG(TAR, tar)
   1.324 +  BASIC_REQUIRE_PROG(TEE, tee)
   1.325 +  BASIC_REQUIRE_PROG(TOUCH, touch)
   1.326 +  BASIC_REQUIRE_PROG(TR, tr)
   1.327 +  BASIC_REQUIRE_PROG(UNAME, uname)
   1.328 +  BASIC_REQUIRE_PROG(UNIQ, uniq)
   1.329 +  BASIC_REQUIRE_PROG(WC, wc)
   1.330 +  BASIC_REQUIRE_PROG(WHICH, which)
   1.331 +  BASIC_REQUIRE_PROG(XARGS, xargs)
   1.332  
   1.333 -# Then required tools that require some special treatment.
   1.334 -AC_PROG_AWK
   1.335 -BASIC_CHECK_NONEMPTY(AWK)
   1.336 -AC_PROG_GREP
   1.337 -BASIC_CHECK_NONEMPTY(GREP)
   1.338 -AC_PROG_EGREP
   1.339 -BASIC_CHECK_NONEMPTY(EGREP)
   1.340 -AC_PROG_FGREP
   1.341 -BASIC_CHECK_NONEMPTY(FGREP)
   1.342 -AC_PROG_SED
   1.343 -BASIC_CHECK_NONEMPTY(SED)
   1.344 +  # Then required tools that require some special treatment.
   1.345 +  AC_PROG_AWK
   1.346 +  BASIC_CHECK_NONEMPTY(AWK)
   1.347 +  AC_PROG_GREP
   1.348 +  BASIC_CHECK_NONEMPTY(GREP)
   1.349 +  AC_PROG_EGREP
   1.350 +  BASIC_CHECK_NONEMPTY(EGREP)
   1.351 +  AC_PROG_FGREP
   1.352 +  BASIC_CHECK_NONEMPTY(FGREP)
   1.353 +  AC_PROG_SED
   1.354 +  BASIC_CHECK_NONEMPTY(SED)
   1.355  
   1.356 -AC_PATH_PROGS(NAWK, [nawk gawk awk])
   1.357 -BASIC_CHECK_NONEMPTY(NAWK)
   1.358 +  AC_PATH_PROGS(NAWK, [nawk gawk awk])
   1.359 +  BASIC_CHECK_NONEMPTY(NAWK)
   1.360  
   1.361 -# Always force rm.
   1.362 -RM="$RM -f"
   1.363 +  # Always force rm.
   1.364 +  RM="$RM -f"
   1.365  
   1.366 -# pwd behaves differently on various platforms and some don't support the -L flag.
   1.367 -# Always use the bash builtin pwd to get uniform behavior.
   1.368 -THEPWDCMD=pwd
   1.369 +  # pwd behaves differently on various platforms and some don't support the -L flag.
   1.370 +  # Always use the bash builtin pwd to get uniform behavior.
   1.371 +  THEPWDCMD=pwd
   1.372  
   1.373 -# These are not required on all platforms
   1.374 -AC_PATH_PROG(CYGPATH, cygpath)
   1.375 -AC_PATH_PROG(READLINK, readlink)
   1.376 -AC_PATH_PROG(DF, df)
   1.377 -AC_PATH_PROG(SETFILE, SetFile)
   1.378 +  # These are not required on all platforms
   1.379 +  AC_PATH_PROG(CYGPATH, cygpath)
   1.380 +  AC_PATH_PROG(READLINK, readlink)
   1.381 +  AC_PATH_PROG(DF, df)
   1.382 +  AC_PATH_PROG(SETFILE, SetFile)
   1.383  ])
   1.384  
   1.385  # Setup basic configuration paths, and platform-specific stuff related to PATHs.
   1.386  AC_DEFUN_ONCE([BASIC_SETUP_PATHS],
   1.387  [
   1.388 -# Locate the directory of this script.
   1.389 -SCRIPT="[$]0"
   1.390 -AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD -L`
   1.391 +  # Locate the directory of this script.
   1.392 +  SCRIPT="[$]0"
   1.393 +  AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD -L`
   1.394  
   1.395 -# Where is the source? It is located two levels above the configure script.
   1.396 -CURDIR="$PWD"
   1.397 -cd "$AUTOCONF_DIR/../.."
   1.398 -SRC_ROOT="`$THEPWDCMD -L`"
   1.399 +  # Where is the source? It is located two levels above the configure script.
   1.400 +  CURDIR="$PWD"
   1.401 +  cd "$AUTOCONF_DIR/../.."
   1.402 +  SRC_ROOT="`$THEPWDCMD -L`"
   1.403  
   1.404 -if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
   1.405 -  PATH_SEP=";"
   1.406 -  BASIC_CHECK_PATHS_WINDOWS
   1.407 -else
   1.408 -  PATH_SEP=":"
   1.409 -fi
   1.410 +  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
   1.411 +    PATH_SEP=";"
   1.412 +    BASIC_CHECK_PATHS_WINDOWS
   1.413 +  else
   1.414 +    PATH_SEP=":"
   1.415 +  fi
   1.416  
   1.417 -AC_SUBST(SRC_ROOT)
   1.418 -AC_SUBST(PATH_SEP)
   1.419 -cd "$CURDIR"
   1.420 +  AC_SUBST(SRC_ROOT)
   1.421 +  AC_SUBST(PATH_SEP)
   1.422 +  cd "$CURDIR"
   1.423  
   1.424 -BASIC_FIXUP_PATH(SRC_ROOT)
   1.425 -BASIC_FIXUP_PATH(CURDIR)
   1.426 +  BASIC_FIXUP_PATH(SRC_ROOT)
   1.427 +  BASIC_FIXUP_PATH(CURDIR)
   1.428  
   1.429 -if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
   1.430 +  if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
   1.431      # Add extra search paths on solaris for utilities like ar and as etc...
   1.432      PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
   1.433 -fi
   1.434 +  fi
   1.435  
   1.436 -# You can force the sys-root if the sys-root encoded into the cross compiler tools
   1.437 -# is not correct.
   1.438 -AC_ARG_WITH(sys-root, [AS_HELP_STRING([--with-sys-root],
   1.439 -  [pass this sys-root to the compilers and tools (for cross-compiling)])])
   1.440 +  # You can force the sys-root if the sys-root encoded into the cross compiler tools
   1.441 +  # is not correct.
   1.442 +  AC_ARG_WITH(sys-root, [AS_HELP_STRING([--with-sys-root],
   1.443 +      [pass this sys-root to the compilers and tools (for cross-compiling)])])
   1.444  
   1.445 -if test "x$with_sys_root" != x; then
   1.446 -  SYS_ROOT=$with_sys_root
   1.447 -else
   1.448 -  SYS_ROOT=/
   1.449 -fi
   1.450 -AC_SUBST(SYS_ROOT)
   1.451 +  if test "x$with_sys_root" != x; then
   1.452 +    SYS_ROOT=$with_sys_root
   1.453 +  else
   1.454 +    SYS_ROOT=/
   1.455 +  fi
   1.456 +  AC_SUBST(SYS_ROOT)
   1.457  
   1.458 -AC_ARG_WITH([tools-dir], [AS_HELP_STRING([--with-tools-dir],
   1.459 -  [search this directory for compilers and tools (for cross-compiling)])], 
   1.460 -  [TOOLS_DIR=$with_tools_dir]
   1.461 -)
   1.462 +  AC_ARG_WITH([tools-dir], [AS_HELP_STRING([--with-tools-dir],
   1.463 +      [search this directory for compilers and tools (for cross-compiling)])],
   1.464 +      [TOOLS_DIR=$with_tools_dir]
   1.465 +  )
   1.466  
   1.467 -AC_ARG_WITH([devkit], [AS_HELP_STRING([--with-devkit],
   1.468 -  [use this directory as base for tools-dir and sys-root (for cross-compiling)])],
   1.469 -  [
   1.470 -    if test "x$with_sys_root" != x; then
   1.471 -      AC_MSG_ERROR([Cannot specify both --with-devkit and --with-sys-root at the same time])
   1.472 -    fi
   1.473 -    BASIC_FIXUP_PATH([with_devkit])
   1.474 -    BASIC_APPEND_TO_PATH([TOOLS_DIR],$with_devkit/bin)
   1.475 -    if test -d "$with_devkit/$host_alias/libc"; then
   1.476 -      SYS_ROOT=$with_devkit/$host_alias/libc
   1.477 -    elif test -d "$with_devkit/$host/sys-root"; then
   1.478 -      SYS_ROOT=$with_devkit/$host/sys-root
   1.479 -    fi
   1.480 -  ])
   1.481 +  AC_ARG_WITH([devkit], [AS_HELP_STRING([--with-devkit],
   1.482 +      [use this directory as base for tools-dir and sys-root (for cross-compiling)])],
   1.483 +      [
   1.484 +        if test "x$with_sys_root" != x; then
   1.485 +          AC_MSG_ERROR([Cannot specify both --with-devkit and --with-sys-root at the same time])
   1.486 +        fi
   1.487 +        BASIC_FIXUP_PATH([with_devkit])
   1.488 +        BASIC_APPEND_TO_PATH([TOOLS_DIR],$with_devkit/bin)
   1.489 +        if test -d "$with_devkit/$host_alias/libc"; then
   1.490 +          SYS_ROOT=$with_devkit/$host_alias/libc
   1.491 +        elif test -d "$with_devkit/$host/sys-root"; then
   1.492 +          SYS_ROOT=$with_devkit/$host/sys-root
   1.493 +        fi
   1.494 +      ])
   1.495  ])
   1.496  
   1.497  AC_DEFUN_ONCE([BASIC_SETUP_OUTPUT_DIR],
   1.498  [
   1.499  
   1.500 -AC_ARG_WITH(conf-name, [AS_HELP_STRING([--with-conf-name],
   1.501 -	[use this as the name of the configuration @<:@generated from important configuration options@:>@])],
   1.502 -        [ CONF_NAME=${with_conf_name} ])
   1.503 +  AC_ARG_WITH(conf-name, [AS_HELP_STRING([--with-conf-name],
   1.504 +      [use this as the name of the configuration @<:@generated from important configuration options@:>@])],
   1.505 +      [ CONF_NAME=${with_conf_name} ])
   1.506  
   1.507 -# Test from where we are running configure, in or outside of src root.
   1.508 -if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
   1.509 -        || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
   1.510 -        || test "x$CURDIR" = "x$SRC_ROOT/common/makefiles" ; then
   1.511 +  # Test from where we are running configure, in or outside of src root.
   1.512 +  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
   1.513 +      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
   1.514 +      || test "x$CURDIR" = "x$SRC_ROOT/common/makefiles" ; then
   1.515      # We are running configure from the src root.
   1.516      # Create a default ./build/target-variant-debuglevel output root.
   1.517      if test "x${CONF_NAME}" = x; then
   1.518 -        CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
   1.519 +      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
   1.520      fi
   1.521      OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
   1.522      $MKDIR -p "$OUTPUT_ROOT"
   1.523      if test ! -d "$OUTPUT_ROOT"; then
   1.524 -        AC_MSG_ERROR([Could not create build directory $OUTPUT_ROOT])
   1.525 +      AC_MSG_ERROR([Could not create build directory $OUTPUT_ROOT])
   1.526      fi
   1.527 -else
   1.528 +  else
   1.529      # We are running configure from outside of the src dir.
   1.530      # Then use the current directory as output dir!
   1.531      # If configuration is situated in normal build directory, just use the build
   1.532      # directory name as configuration name, otherwise use the complete path.
   1.533      if test "x${CONF_NAME}" = x; then
   1.534 -        CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
   1.535 +      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
   1.536      fi
   1.537      OUTPUT_ROOT="$CURDIR"
   1.538  
   1.539 @@ -428,10 +428,10 @@
   1.540        # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
   1.541        # other files
   1.542        files_present=`$LS $OUTPUT_ROOT`
   1.543 -      # Configure has already touched config.log and confdefs.h in the current dir when this check 
   1.544 +      # Configure has already touched config.log and confdefs.h in the current dir when this check
   1.545        # is performed.
   1.546        filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
   1.547 -                                             | $TR -d '\n'`
   1.548 +      | $TR -d '\n'`
   1.549        if test "x$filtered_files" != x; then
   1.550          AC_MSG_NOTICE([Current directory is $CURDIR.])
   1.551          AC_MSG_NOTICE([Since this is not the source root, configure will output the configuration here])
   1.552 @@ -443,46 +443,46 @@
   1.553          AC_MSG_ERROR([Will not continue creating configuration in $CURDIR])
   1.554        fi
   1.555      fi
   1.556 -fi
   1.557 -AC_MSG_CHECKING([what configuration name to use])
   1.558 -AC_MSG_RESULT([$CONF_NAME])
   1.559 +  fi
   1.560 +  AC_MSG_CHECKING([what configuration name to use])
   1.561 +  AC_MSG_RESULT([$CONF_NAME])
   1.562  
   1.563 -BASIC_FIXUP_PATH(OUTPUT_ROOT)
   1.564 +  BASIC_FIXUP_PATH(OUTPUT_ROOT)
   1.565  
   1.566 -AC_SUBST(SPEC, $OUTPUT_ROOT/spec.gmk)
   1.567 -AC_SUBST(CONF_NAME, $CONF_NAME)
   1.568 -AC_SUBST(OUTPUT_ROOT, $OUTPUT_ROOT)
   1.569 +  AC_SUBST(SPEC, $OUTPUT_ROOT/spec.gmk)
   1.570 +  AC_SUBST(CONF_NAME, $CONF_NAME)
   1.571 +  AC_SUBST(OUTPUT_ROOT, $OUTPUT_ROOT)
   1.572  
   1.573 -# Most of the probed defines are put into config.h
   1.574 -AC_CONFIG_HEADERS([$OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in])
   1.575 -# The spec.gmk file contains all variables for the make system.
   1.576 -AC_CONFIG_FILES([$OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in])
   1.577 -# The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
   1.578 -AC_CONFIG_FILES([$OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in])
   1.579 -# The bootcycle-spec.gmk file contains support for boot cycle builds.
   1.580 -AC_CONFIG_FILES([$OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in])
   1.581 -# The compare.sh is used to compare the build output to other builds.
   1.582 -AC_CONFIG_FILES([$OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in])
   1.583 -# Spec.sh is currently used by compare-objects.sh
   1.584 -AC_CONFIG_FILES([$OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in])
   1.585 -# The generated Makefile knows where the spec.gmk is and where the source is.
   1.586 -# You can run make from the OUTPUT_ROOT, or from the top-level Makefile
   1.587 -# which will look for generated configurations
   1.588 -AC_CONFIG_FILES([$OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in])
   1.589 +  # Most of the probed defines are put into config.h
   1.590 +  AC_CONFIG_HEADERS([$OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in])
   1.591 +  # The spec.gmk file contains all variables for the make system.
   1.592 +  AC_CONFIG_FILES([$OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in])
   1.593 +  # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
   1.594 +  AC_CONFIG_FILES([$OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in])
   1.595 +  # The bootcycle-spec.gmk file contains support for boot cycle builds.
   1.596 +  AC_CONFIG_FILES([$OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in])
   1.597 +  # The compare.sh is used to compare the build output to other builds.
   1.598 +  AC_CONFIG_FILES([$OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in])
   1.599 +  # Spec.sh is currently used by compare-objects.sh
   1.600 +  AC_CONFIG_FILES([$OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in])
   1.601 +  # The generated Makefile knows where the spec.gmk is and where the source is.
   1.602 +  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
   1.603 +  # which will look for generated configurations
   1.604 +  AC_CONFIG_FILES([$OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in])
   1.605  
   1.606 -# Save the arguments given to us
   1.607 -echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
   1.608 +  # Save the arguments given to us
   1.609 +  echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
   1.610  ])
   1.611  
   1.612  AC_DEFUN_ONCE([BASIC_SETUP_LOGGING],
   1.613  [
   1.614 -# Setup default logging of stdout and stderr to build.log in the output root.
   1.615 -BUILD_LOG='$(OUTPUT_ROOT)/build.log'
   1.616 -BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
   1.617 -BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
   1.618 -AC_SUBST(BUILD_LOG)
   1.619 -AC_SUBST(BUILD_LOG_PREVIOUS)
   1.620 -AC_SUBST(BUILD_LOG_WRAPPER)
   1.621 +  # Setup default logging of stdout and stderr to build.log in the output root.
   1.622 +  BUILD_LOG='$(OUTPUT_ROOT)/build.log'
   1.623 +  BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
   1.624 +  BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
   1.625 +  AC_SUBST(BUILD_LOG)
   1.626 +  AC_SUBST(BUILD_LOG_PREVIOUS)
   1.627 +  AC_SUBST(BUILD_LOG_WRAPPER)
   1.628  ])
   1.629  
   1.630  
   1.631 @@ -581,85 +581,85 @@
   1.632  
   1.633  AC_DEFUN([BASIC_CHECK_FIND_DELETE],
   1.634  [
   1.635 -    # Test if find supports -delete
   1.636 -    AC_MSG_CHECKING([if find supports -delete])
   1.637 -    FIND_DELETE="-delete"
   1.638 +  # Test if find supports -delete
   1.639 +  AC_MSG_CHECKING([if find supports -delete])
   1.640 +  FIND_DELETE="-delete"
   1.641  
   1.642 -    DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
   1.643 +  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
   1.644  
   1.645 -    echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
   1.646 +  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
   1.647  
   1.648 -    TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
   1.649 -    if test -f $DELETEDIR/TestIfFindSupportsDelete; then
   1.650 -        # No, it does not.
   1.651 -        rm $DELETEDIR/TestIfFindSupportsDelete
   1.652 -        FIND_DELETE="-exec rm \{\} \+"
   1.653 -        AC_MSG_RESULT([no])    
   1.654 -    else
   1.655 -        AC_MSG_RESULT([yes])    
   1.656 -    fi
   1.657 -    rmdir $DELETEDIR
   1.658 -    AC_SUBST(FIND_DELETE)
   1.659 +  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
   1.660 +  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
   1.661 +    # No, it does not.
   1.662 +    rm $DELETEDIR/TestIfFindSupportsDelete
   1.663 +    FIND_DELETE="-exec rm \{\} \+"
   1.664 +    AC_MSG_RESULT([no])
   1.665 +  else
   1.666 +    AC_MSG_RESULT([yes])
   1.667 +  fi
   1.668 +  rmdir $DELETEDIR
   1.669 +  AC_SUBST(FIND_DELETE)
   1.670  ])
   1.671  
   1.672  AC_DEFUN_ONCE([BASIC_SETUP_COMPLEX_TOOLS],
   1.673  [
   1.674 -BASIC_CHECK_GNU_MAKE
   1.675 +  BASIC_CHECK_GNU_MAKE
   1.676  
   1.677 -BASIC_CHECK_FIND_DELETE
   1.678 +  BASIC_CHECK_FIND_DELETE
   1.679  
   1.680 -# These tools might not be installed by default, 
   1.681 -# need hint on how to install them.
   1.682 -BASIC_REQUIRE_PROG(UNZIP, unzip)
   1.683 -BASIC_REQUIRE_PROG(ZIP, zip)
   1.684 +  # These tools might not be installed by default,
   1.685 +  # need hint on how to install them.
   1.686 +  BASIC_REQUIRE_PROG(UNZIP, unzip)
   1.687 +  BASIC_REQUIRE_PROG(ZIP, zip)
   1.688  
   1.689 -# Non-required basic tools
   1.690 +  # Non-required basic tools
   1.691  
   1.692 -AC_PATH_PROG(LDD, ldd)
   1.693 -if test "x$LDD" = "x"; then
   1.694 +  AC_PATH_PROG(LDD, ldd)
   1.695 +  if test "x$LDD" = "x"; then
   1.696      # List shared lib dependencies is used for
   1.697      # debug output and checking for forbidden dependencies.
   1.698      # We can build without it.
   1.699      LDD="true"
   1.700 -fi
   1.701 -AC_PATH_PROG(OTOOL, otool)
   1.702 -if test "x$OTOOL" = "x"; then
   1.703 -   OTOOL="true"
   1.704 -fi
   1.705 -AC_PATH_PROGS(READELF, [readelf greadelf])
   1.706 -AC_PATH_PROG(HG, hg)
   1.707 -AC_PATH_PROG(STAT, stat)
   1.708 -AC_PATH_PROG(TIME, time)
   1.709 -# Check if it's GNU time
   1.710 -IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
   1.711 -if test "x$IS_GNU_TIME" != x; then
   1.712 -  IS_GNU_TIME=yes
   1.713 -else
   1.714 -  IS_GNU_TIME=no
   1.715 -fi
   1.716 -AC_SUBST(IS_GNU_TIME)
   1.717 +  fi
   1.718 +  AC_PATH_PROG(OTOOL, otool)
   1.719 +  if test "x$OTOOL" = "x"; then
   1.720 +    OTOOL="true"
   1.721 +  fi
   1.722 +  AC_PATH_PROGS(READELF, [readelf greadelf])
   1.723 +  AC_PATH_PROG(HG, hg)
   1.724 +  AC_PATH_PROG(STAT, stat)
   1.725 +  AC_PATH_PROG(TIME, time)
   1.726 +  # Check if it's GNU time
   1.727 +  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
   1.728 +  if test "x$IS_GNU_TIME" != x; then
   1.729 +    IS_GNU_TIME=yes
   1.730 +  else
   1.731 +    IS_GNU_TIME=no
   1.732 +  fi
   1.733 +  AC_SUBST(IS_GNU_TIME)
   1.734  
   1.735 -if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
   1.736 -  BASIC_REQUIRE_PROG(COMM, comm)
   1.737 -fi
   1.738 +  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
   1.739 +    BASIC_REQUIRE_PROG(COMM, comm)
   1.740 +  fi
   1.741  
   1.742 -if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
   1.743 -  BASIC_REQUIRE_PROG(XATTR, xattr)
   1.744 -  AC_PATH_PROG(CODESIGN, codesign)
   1.745 -  if test "x$CODESIGN" != "x"; then
   1.746 -    # Verify that the openjdk_codesign certificate is present
   1.747 -    AC_MSG_CHECKING([if openjdk_codesign certificate is present])
   1.748 -    rm -f codesign-testfile
   1.749 -    touch codesign-testfile
   1.750 -    codesign -s openjdk_codesign codesign-testfile 2>&AS_MESSAGE_LOG_FD >&AS_MESSAGE_LOG_FD || CODESIGN=
   1.751 -    rm -f codesign-testfile
   1.752 -    if test "x$CODESIGN" = x; then
   1.753 -      AC_MSG_RESULT([no])
   1.754 -    else
   1.755 -      AC_MSG_RESULT([yes])
   1.756 +  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
   1.757 +    BASIC_REQUIRE_PROG(XATTR, xattr)
   1.758 +    AC_PATH_PROG(CODESIGN, codesign)
   1.759 +    if test "x$CODESIGN" != "x"; then
   1.760 +      # Verify that the openjdk_codesign certificate is present
   1.761 +      AC_MSG_CHECKING([if openjdk_codesign certificate is present])
   1.762 +      rm -f codesign-testfile
   1.763 +      touch codesign-testfile
   1.764 +      codesign -s openjdk_codesign codesign-testfile 2>&AS_MESSAGE_LOG_FD >&AS_MESSAGE_LOG_FD || CODESIGN=
   1.765 +      rm -f codesign-testfile
   1.766 +      if test "x$CODESIGN" = x; then
   1.767 +        AC_MSG_RESULT([no])
   1.768 +      else
   1.769 +        AC_MSG_RESULT([yes])
   1.770 +      fi
   1.771      fi
   1.772    fi
   1.773 -fi
   1.774  ])
   1.775  
   1.776  # Check if build directory is on local disk. If not possible to determine,
   1.777 @@ -669,8 +669,8 @@
   1.778  # Argument 3: what to do otherwise (remote disk or failure)
   1.779  AC_DEFUN([BASIC_CHECK_DIR_ON_LOCAL_DISK],
   1.780  [
   1.781 -	# df -l lists only local disks; if the given directory is not found then
   1.782 -	# a non-zero exit code is given
   1.783 +  # df -l lists only local disks; if the given directory is not found then
   1.784 +  # a non-zero exit code is given
   1.785    if test "x$DF" = x; then
   1.786      if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
   1.787        # msys does not have df; use Windows "net use" instead.
   1.788 @@ -707,32 +707,30 @@
   1.789  
   1.790  AC_DEFUN_ONCE([BASIC_TEST_USABILITY_ISSUES],
   1.791  [
   1.792 +  AC_MSG_CHECKING([if build directory is on local disk])
   1.793 +  BASIC_CHECK_DIR_ON_LOCAL_DISK($OUTPUT_ROOT,
   1.794 +      [OUTPUT_DIR_IS_LOCAL="yes"],
   1.795 +      [OUTPUT_DIR_IS_LOCAL="no"])
   1.796 +  AC_MSG_RESULT($OUTPUT_DIR_IS_LOCAL)
   1.797  
   1.798 -AC_MSG_CHECKING([if build directory is on local disk])
   1.799 -BASIC_CHECK_DIR_ON_LOCAL_DISK($OUTPUT_ROOT,
   1.800 -  [OUTPUT_DIR_IS_LOCAL="yes"],
   1.801 -  [OUTPUT_DIR_IS_LOCAL="no"])
   1.802 -AC_MSG_RESULT($OUTPUT_DIR_IS_LOCAL)
   1.803 +  BASIC_CHECK_SRC_PERMS
   1.804  
   1.805 -BASIC_CHECK_SRC_PERMS
   1.806 +  # Check if the user has any old-style ALT_ variables set.
   1.807 +  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
   1.808  
   1.809 -# Check if the user has any old-style ALT_ variables set.
   1.810 -FOUND_ALT_VARIABLES=`env | grep ^ALT_`
   1.811 +  # Before generating output files, test if they exist. If they do, this is a reconfigure.
   1.812 +  # Since we can't properly handle the dependencies for this, warn the user about the situation
   1.813 +  if test -e $OUTPUT_ROOT/spec.gmk; then
   1.814 +    IS_RECONFIGURE=yes
   1.815 +  else
   1.816 +    IS_RECONFIGURE=no
   1.817 +  fi
   1.818  
   1.819 -# Before generating output files, test if they exist. If they do, this is a reconfigure.
   1.820 -# Since we can't properly handle the dependencies for this, warn the user about the situation
   1.821 -if test -e $OUTPUT_ROOT/spec.gmk; then
   1.822 -  IS_RECONFIGURE=yes
   1.823 -else
   1.824 -  IS_RECONFIGURE=no
   1.825 -fi
   1.826 -
   1.827 -if test -e $SRC_ROOT/build/.hide-configure-performance-hints; then
   1.828 -  HIDE_PERFORMANCE_HINTS=yes
   1.829 -else
   1.830 -  HIDE_PERFORMANCE_HINTS=no
   1.831 -  # Hide it the next time around...
   1.832 -  $TOUCH $SRC_ROOT/build/.hide-configure-performance-hints > /dev/null 2>&1
   1.833 -fi
   1.834 -
   1.835 +  if test -e $SRC_ROOT/build/.hide-configure-performance-hints; then
   1.836 +    HIDE_PERFORMANCE_HINTS=yes
   1.837 +  else
   1.838 +    HIDE_PERFORMANCE_HINTS=no
   1.839 +    # Hide it the next time around...
   1.840 +    $TOUCH $SRC_ROOT/build/.hide-configure-performance-hints > /dev/null 2>&1
   1.841 +  fi
   1.842  ])

mercurial