common/autoconf/basics.m4

Print this page




 295 RM="$RM -f"
 296 
 297 # These are not required on all platforms
 298 AC_PATH_PROG(CYGPATH, cygpath)
 299 AC_PATH_PROG(READLINK, readlink)
 300 AC_PATH_PROG(DF, df)
 301 AC_PATH_PROG(SETFILE, SetFile)
 302 ])
 303 
 304 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
 305 AC_DEFUN_ONCE([BASIC_SETUP_PATHS],
 306 [
 307 # Locate the directory of this script.
 308 SCRIPT="[$]0"
 309 BASIC_REMOVE_SYMBOLIC_LINKS(SCRIPT)
 310 AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD`
 311 
 312 # Where is the source? It is located two levels above the configure script.
 313 CURDIR="$PWD"
 314 cd "$AUTOCONF_DIR/../.."
 315 SRC_ROOT="`$THEPWDCMD`"
 316 
 317 if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
 318   PATH_SEP=";"
 319   BASIC_CHECK_PATHS_WINDOWS
 320 else
 321   PATH_SEP=":"
 322 fi
 323 
 324 AC_SUBST(SRC_ROOT)
 325 AC_SUBST(PATH_SEP)
 326 cd "$CURDIR"
 327 
 328 BASIC_FIXUP_PATH(SRC_ROOT)
 329 BASIC_FIXUP_PATH(CURDIR)
 330 
 331 if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
 332     # Add extra search paths on solaris for utilities like ar and as etc...
 333     PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
 334 fi
 335 


 354     if test "x$with_sys_root" != x; then
 355       AC_MSG_ERROR([Cannot specify both --with-devkit and --with-sys-root at the same time])
 356     fi
 357     if test "x$with_tools_dir" != x; then
 358       AC_MSG_ERROR([Cannot specify both --with-devkit and --with-tools-dir at the same time])
 359     fi
 360     TOOLS_DIR=$with_devkit/bin
 361     SYS_ROOT=$with_devkit/$host_alias/libc
 362   ])
 363 
 364 ])
 365 
 366 AC_DEFUN_ONCE([BASIC_SETUP_OUTPUT_DIR],
 367 [
 368 
 369 AC_ARG_WITH(conf-name, [AS_HELP_STRING([--with-conf-name],
 370         [use this as the name of the configuration @<:@generated from important configuration options@:>@])],
 371         [ CONF_NAME=${with_conf_name} ])
 372 
 373 # Test from where we are running configure, in or outside of src root.
 374 # To enable comparison of directories, CURDIR needs to be symlink free
 375 # just like SRC_ROOT already is
 376 NOSYM_CURDIR="$CURDIR"
 377 BASIC_REMOVE_SYMBOLIC_LINKS(NOSYM_CURDIR)
 378 if test "x$NOSYM_CURDIR" = "x$SRC_ROOT" || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common" \
 379         || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common/autoconf" \
 380         || test "x$NOSYM_CURDIR" = "x$SRC_ROOT/common/makefiles" ; then
 381     # We are running configure from the src root.
 382     # Create a default ./build/target-variant-debuglevel output root.
 383     if test "x${CONF_NAME}" = x; then
 384         CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
 385     fi
 386     OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
 387     $MKDIR -p "$OUTPUT_ROOT"
 388     if test ! -d "$OUTPUT_ROOT"; then
 389         AC_MSG_ERROR([Could not create build directory $OUTPUT_ROOT])
 390     fi
 391 else
 392     # We are running configure from outside of the src dir.
 393     # Then use the current directory as output dir!
 394     # If configuration is situated in normal build directory, just use the build
 395     # directory name as configuration name, otherwise use the complete path.
 396     if test "x${CONF_NAME}" = x; then
 397         CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
 398     fi
 399     OUTPUT_ROOT="$CURDIR"
 400 




 295 RM="$RM -f"
 296 
 297 # These are not required on all platforms
 298 AC_PATH_PROG(CYGPATH, cygpath)
 299 AC_PATH_PROG(READLINK, readlink)
 300 AC_PATH_PROG(DF, df)
 301 AC_PATH_PROG(SETFILE, SetFile)
 302 ])
 303 
 304 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
 305 AC_DEFUN_ONCE([BASIC_SETUP_PATHS],
 306 [
 307 # Locate the directory of this script.
 308 SCRIPT="[$]0"
 309 BASIC_REMOVE_SYMBOLIC_LINKS(SCRIPT)
 310 AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD`
 311 
 312 # Where is the source? It is located two levels above the configure script.
 313 CURDIR="$PWD"
 314 cd "$AUTOCONF_DIR/../.."
 315 SRC_ROOT="`$THEPWDCMD -L`"
 316 
 317 if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
 318   PATH_SEP=";"
 319   BASIC_CHECK_PATHS_WINDOWS
 320 else
 321   PATH_SEP=":"
 322 fi
 323 
 324 AC_SUBST(SRC_ROOT)
 325 AC_SUBST(PATH_SEP)
 326 cd "$CURDIR"
 327 
 328 BASIC_FIXUP_PATH(SRC_ROOT)
 329 BASIC_FIXUP_PATH(CURDIR)
 330 
 331 if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
 332     # Add extra search paths on solaris for utilities like ar and as etc...
 333     PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
 334 fi
 335 


 354     if test "x$with_sys_root" != x; then
 355       AC_MSG_ERROR([Cannot specify both --with-devkit and --with-sys-root at the same time])
 356     fi
 357     if test "x$with_tools_dir" != x; then
 358       AC_MSG_ERROR([Cannot specify both --with-devkit and --with-tools-dir at the same time])
 359     fi
 360     TOOLS_DIR=$with_devkit/bin
 361     SYS_ROOT=$with_devkit/$host_alias/libc
 362   ])
 363 
 364 ])
 365 
 366 AC_DEFUN_ONCE([BASIC_SETUP_OUTPUT_DIR],
 367 [
 368 
 369 AC_ARG_WITH(conf-name, [AS_HELP_STRING([--with-conf-name],
 370         [use this as the name of the configuration @<:@generated from important configuration options@:>@])],
 371         [ CONF_NAME=${with_conf_name} ])
 372 
 373 # Test from where we are running configure, in or outside of src root.
 374 if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
 375         || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
 376         || test "x$CURDIR" = "x$SRC_ROOT/common/makefiles" ; then




 377     # We are running configure from the src root.
 378     # Create a default ./build/target-variant-debuglevel output root.
 379     if test "x${CONF_NAME}" = x; then
 380         CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
 381     fi
 382     OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
 383     $MKDIR -p "$OUTPUT_ROOT"
 384     if test ! -d "$OUTPUT_ROOT"; then
 385         AC_MSG_ERROR([Could not create build directory $OUTPUT_ROOT])
 386     fi
 387 else
 388     # We are running configure from outside of the src dir.
 389     # Then use the current directory as output dir!
 390     # If configuration is situated in normal build directory, just use the build
 391     # directory name as configuration name, otherwise use the complete path.
 392     if test "x${CONF_NAME}" = x; then
 393         CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
 394     fi
 395     OUTPUT_ROOT="$CURDIR"
 396