make/autoconf/basics.m4
changeset 59120 fc68b2cdfeeb
parent 58669 931ec3339786
equal deleted inserted replaced
59119:7bdc4f073c7f 59120:fc68b2cdfeeb
   568 # $1: variable to set
   568 # $1: variable to set
   569 # $2: autoconf macro to call to look for the special tool
   569 # $2: autoconf macro to call to look for the special tool
   570 AC_DEFUN([BASIC_REQUIRE_SPECIAL],
   570 AC_DEFUN([BASIC_REQUIRE_SPECIAL],
   571 [
   571 [
   572   BASIC_SETUP_TOOL($1, [$2])
   572   BASIC_SETUP_TOOL($1, [$2])
       
   573   BASIC_CHECK_NONEMPTY($1)
       
   574 ])
       
   575 
       
   576 ###############################################################################
       
   577 # Like BASIC_REQUIRE_PROGS but also allows for bash built-ins
       
   578 # $1: variable to set
       
   579 # $2: executable name (or list of names) to look for
       
   580 # $3: [path]
       
   581 AC_DEFUN([BASIC_REQUIRE_BUILTIN_PROGS],
       
   582 [
       
   583   BASIC_SETUP_TOOL($1, [AC_PATH_PROGS($1, $2, , $3)])
       
   584   if test "x[$]$1" = x; then
       
   585     AC_MSG_NOTICE([Required tool $2 not found in PATH, checking built-in])
       
   586     if help $2 > /dev/null 2>&1; then
       
   587       AC_MSG_NOTICE([Found $2 as shell built-in. Using it])
       
   588       $1="$2"
       
   589     else
       
   590       AC_MSG_ERROR([Required tool $2 also not found as built-in.])
       
   591     fi
       
   592   fi
   573   BASIC_CHECK_NONEMPTY($1)
   593   BASIC_CHECK_NONEMPTY($1)
   574 ])
   594 ])
   575 
   595 
   576 ###############################################################################
   596 ###############################################################################
   577 # Setup the most fundamental tools that relies on not much else to set up,
   597 # Setup the most fundamental tools that relies on not much else to set up,
  1282     fi
  1302     fi
  1283     BASIC_REQUIRE_PROGS(SETFILE, SetFile)
  1303     BASIC_REQUIRE_PROGS(SETFILE, SetFile)
  1284   elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
  1304   elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
  1285     BASIC_REQUIRE_PROGS(ELFEDIT, elfedit)
  1305     BASIC_REQUIRE_PROGS(ELFEDIT, elfedit)
  1286   fi
  1306   fi
       
  1307   if ! test "x$OPENJDK_TARGET_OS" = "xwindows"; then
       
  1308     BASIC_REQUIRE_BUILTIN_PROGS(ULIMIT, ulimit)
       
  1309   fi
  1287 ])
  1310 ])
  1288 
  1311 
  1289 ###############################################################################
  1312 ###############################################################################
  1290 # Check if build directory is on local disk. If not possible to determine,
  1313 # Check if build directory is on local disk. If not possible to determine,
  1291 # we prefer to claim it's local.
  1314 # we prefer to claim it's local.