< prev index next >

common/autoconf/boot-jdk.m4

Print this page
rev 2048 : 8150044: Generate classlists at build-time
Reviewed-by: alanb
Contributed-by: claes.redestad@oracle.com, erik.joelsson@oracle.com


 457           AC_MSG_CHECKING([for Build JDK])
 458           AC_MSG_RESULT([$BUILD_JDK])
 459           AC_MSG_CHECKING([Build JDK version])
 460           BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
 461           AC_MSG_RESULT([$BUILD_JDK_VERSION])
 462         fi # end check jdk version
 463       fi # end check java
 464     fi # end check build jdk found
 465   fi
 466 ])
 467 
 468 # By default the BUILD_JDK is the JDK_OUTPUTDIR.  If the target architecture
 469 # is different than the host system doing the build (e.g. cross-compilation),
 470 # a special BUILD_JDK is built as part of the build process.  An external
 471 # prebuilt BUILD_JDK can also be supplied.
 472 AC_DEFUN([BOOTJDK_SETUP_BUILD_JDK],
 473 [
 474   AC_ARG_WITH(build-jdk, [AS_HELP_STRING([--with-build-jdk],
 475       [path to JDK of same version as is being built@<:@the newly built JDK@:>@])])
 476 
 477   CREATE_BUILDJDK_FOR_HOST=false

 478   BUILD_JDK_FOUND="no"
 479   if test "x$with_build_jdk" != "x"; then
 480     BOOTJDK_CHECK_BUILD_JDK([
 481        if test "x$with_build_jdk" != x; then
 482          BUILD_JDK=$with_build_jdk
 483          BUILD_JDK_FOUND=maybe
 484          AC_MSG_NOTICE([Found potential Build JDK using configure arguments])
 485        fi])

 486   else
 487     if test "x$COMPILE_TYPE" = "xcross"; then
 488       BUILD_JDK="\$(BUILDJDK_OUTPUTDIR)/jdk"
 489       BUILD_JDK_FOUND=yes
 490       CREATE_BUILDJDK=true
 491       AC_MSG_CHECKING([for Build JDK])
 492       AC_MSG_RESULT([yes, will build it for the host platform])
 493     else
 494       BUILD_JDK="\$(JDK_OUTPUTDIR)"
 495       BUILD_JDK_FOUND=yes
 496       AC_MSG_CHECKING([for Build JDK])
 497       AC_MSG_RESULT([yes, will use output dir])
 498     fi
 499   fi
 500 
 501   if test "x$BUILD_JDK_FOUND" != "xyes"; then
 502     AC_MSG_CHECKING([for Build JDK])
 503     AC_MSG_RESULT([no])
 504     AC_MSG_ERROR([Could not find a suitable Build JDK])
 505   fi
 506 
 507   AC_SUBST(CREATE_BUILDJDK)
 508   AC_SUBST(BUILD_JDK)

 509 ])


 457           AC_MSG_CHECKING([for Build JDK])
 458           AC_MSG_RESULT([$BUILD_JDK])
 459           AC_MSG_CHECKING([Build JDK version])
 460           BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
 461           AC_MSG_RESULT([$BUILD_JDK_VERSION])
 462         fi # end check jdk version
 463       fi # end check java
 464     fi # end check build jdk found
 465   fi
 466 ])
 467 
 468 # By default the BUILD_JDK is the JDK_OUTPUTDIR.  If the target architecture
 469 # is different than the host system doing the build (e.g. cross-compilation),
 470 # a special BUILD_JDK is built as part of the build process.  An external
 471 # prebuilt BUILD_JDK can also be supplied.
 472 AC_DEFUN([BOOTJDK_SETUP_BUILD_JDK],
 473 [
 474   AC_ARG_WITH(build-jdk, [AS_HELP_STRING([--with-build-jdk],
 475       [path to JDK of same version as is being built@<:@the newly built JDK@:>@])])
 476 
 477   CREATE_BUILDJDK=false
 478   EXTERNAL_BUILDJDK=false
 479   BUILD_JDK_FOUND="no"
 480   if test "x$with_build_jdk" != "x"; then
 481     BOOTJDK_CHECK_BUILD_JDK([
 482        if test "x$with_build_jdk" != x; then
 483          BUILD_JDK=$with_build_jdk
 484          BUILD_JDK_FOUND=maybe
 485          AC_MSG_NOTICE([Found potential Build JDK using configure arguments])
 486        fi])
 487     EXTERNAL_BUILDJDK=true
 488   else
 489     if test "x$COMPILE_TYPE" = "xcross"; then
 490       BUILD_JDK="\$(BUILDJDK_OUTPUTDIR)/jdk"
 491       BUILD_JDK_FOUND=yes
 492       CREATE_BUILDJDK=true
 493       AC_MSG_CHECKING([for Build JDK])
 494       AC_MSG_RESULT([yes, will build it for the host platform])
 495     else
 496       BUILD_JDK="\$(JDK_OUTPUTDIR)"
 497       BUILD_JDK_FOUND=yes
 498       AC_MSG_CHECKING([for Build JDK])
 499       AC_MSG_RESULT([yes, will use output dir])
 500     fi
 501   fi
 502 
 503   if test "x$BUILD_JDK_FOUND" != "xyes"; then
 504     AC_MSG_CHECKING([for Build JDK])
 505     AC_MSG_RESULT([no])
 506     AC_MSG_ERROR([Could not find a suitable Build JDK])
 507   fi
 508 
 509   AC_SUBST(CREATE_BUILDJDK)
 510   AC_SUBST(BUILD_JDK)
 511   AC_SUBST(EXTERNAL_BUILDJDK)
 512 ])
< prev index next >