source-dirs.m4 revision 2373:27810b5e38a4
1246122Shselasky# 2184610Salfred# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved. 3184610Salfred# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4184610Salfred# 5184610Salfred# This code is free software; you can redistribute it and/or modify it 6184610Salfred# under the terms of the GNU General Public License version 2 only, as 7184610Salfred# published by the Free Software Foundation. Oracle designates this 8184610Salfred# particular file as subject to the "Classpath" exception as provided 9184610Salfred# by Oracle in the LICENSE file that accompanied this code. 10184610Salfred# 11184610Salfred# This code is distributed in the hope that it will be useful, but WITHOUT 12184610Salfred# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13184610Salfred# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14184610Salfred# version 2 for more details (a copy is included in the LICENSE file that 15184610Salfred# accompanied this code). 16184610Salfred# 17184610Salfred# You should have received a copy of the GNU General Public License version 18184610Salfred# 2 along with this work; if not, write to the Free Software Foundation, 19184610Salfred# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20184610Salfred# 21184610Salfred# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22184610Salfred# or visit www.oracle.com if you need additional information or have any 23184610Salfred# questions. 24184610Salfred# 25184610Salfred 26184610SalfredAC_DEFUN_ONCE([SRCDIRS_SETUP_TOPDIRS], 27184610Salfred[ 28184610Salfred # Where are the sources. 29184610Salfred LANGTOOLS_TOPDIR="$SRC_ROOT/langtools" 30184610Salfred CORBA_TOPDIR="$SRC_ROOT/corba" 31184610Salfred JAXP_TOPDIR="$SRC_ROOT/jaxp" 32184610Salfred JAXWS_TOPDIR="$SRC_ROOT/jaxws" 33246122Shselasky HOTSPOT_TOPDIR="$SRC_ROOT/hotspot" 34246122Shselasky NASHORN_TOPDIR="$SRC_ROOT/nashorn" 35246122Shselasky JDK_TOPDIR="$SRC_ROOT/jdk" 36194677Sthompsa AC_SUBST(LANGTOOLS_TOPDIR) 37194677Sthompsa AC_SUBST(CORBA_TOPDIR) 38194677Sthompsa AC_SUBST(JAXP_TOPDIR) 39194677Sthompsa AC_SUBST(JAXWS_TOPDIR) 40194677Sthompsa AC_SUBST(HOTSPOT_TOPDIR) 41194677Sthompsa AC_SUBST(NASHORN_TOPDIR) 42194677Sthompsa AC_SUBST(JDK_TOPDIR) 43194677Sthompsa]) 44194677Sthompsa 45194677SthompsaAC_DEFUN_ONCE([SRCDIRS_SETUP_ALTERNATIVE_TOPDIRS], 46194677Sthompsa[ 47194677Sthompsa # This feature is no longer supported. 48194677Sthompsa 49194677Sthompsa BASIC_DEPRECATED_ARG_WITH(add-source-root) 50194677Sthompsa BASIC_DEPRECATED_ARG_WITH(override-source-root) 51194677Sthompsa BASIC_DEPRECATED_ARG_WITH(adds-and-overrides) 52194677Sthompsa BASIC_DEPRECATED_ARG_WITH(override-langtools) 53194677Sthompsa BASIC_DEPRECATED_ARG_WITH(override-corba) 54194677Sthompsa BASIC_DEPRECATED_ARG_WITH(override-jaxp) 55188942Sthompsa BASIC_DEPRECATED_ARG_WITH(override-jaxws) 56194677Sthompsa BASIC_DEPRECATED_ARG_WITH(override-hotspot) 57194677Sthompsa BASIC_DEPRECATED_ARG_WITH(override-nashorn) 58188942Sthompsa BASIC_DEPRECATED_ARG_WITH(override-jdk) 59184610Salfred]) 60194228Sthompsa 61184610SalfredAC_DEFUN_ONCE([SRCDIRS_SETUP_OUTPUT_DIRS], 62188942Sthompsa[ 63188942Sthompsa BUILD_OUTPUT="$OUTPUT_ROOT" 64188942Sthompsa AC_SUBST(BUILD_OUTPUT) 65188942Sthompsa 66188942Sthompsa HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist" 67246122Shselasky BUILD_HOTSPOT=true 68184610Salfred AC_SUBST(HOTSPOT_DIST) 69184610Salfred AC_SUBST(BUILD_HOTSPOT) 70189547Sthompsa AC_ARG_WITH(import-hotspot, [AS_HELP_STRING([--with-import-hotspot], 71184610Salfred [import hotspot binaries from this jdk image or hotspot build dist dir instead of building from source])]) 72189547Sthompsa if test "x$with_import_hotspot" != x; then 73189547Sthompsa CURDIR="$PWD" 74195967Salfred cd "$with_import_hotspot" 75195967Salfred HOTSPOT_DIST="`pwd`" 76195967Salfred cd "$CURDIR" 77195967Salfred if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then 78195967Salfred AC_MSG_ERROR([You have to import hotspot from a full jdk image or hotspot build dist dir!]) 79195967Salfred fi 80195967Salfred AC_MSG_CHECKING([if hotspot should be imported]) 81184610Salfred AC_MSG_RESULT([yes from $HOTSPOT_DIST]) 82184610Salfred BUILD_HOTSPOT=false 83184610Salfred fi 84184610Salfred 85189547Sthompsa JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk" 86195967Salfred]) 87189547Sthompsa 88189547Sthompsa################################################################################ 89189718Sthompsa# Define a mechanism for importing extra prebuilt modules 90189718Sthompsa# 91189718Sthompsa 92189718SthompsaAC_DEFUN_ONCE([SRCDIRS_SETUP_IMPORT_MODULES], 93189547Sthompsa[ 94189547Sthompsa AC_ARG_WITH(import-modules, [AS_HELP_STRING([--with-import-modules], 95189547Sthompsa [import a set of prebuilt modules either as a zip file or an exploded directory])]) 96189547Sthompsa 97189547Sthompsa if test "x$with_import_modules" != x \ 98189547Sthompsa && test "x$with_import_modules" != "xno"; then 99189547Sthompsa if test -d "$with_import_modules"; then 100184610Salfred IMPORT_MODULES_TOPDIR="$with_import_modules" 101184610Salfred BASIC_FIXUP_PATH([IMPORT_MODULES_TOPDIR]) 102184610Salfred elif test -e "$with_import_modules"; then 103184610Salfred IMPORT_MODULES_TOPDIR="$CONFIGURESUPPORT_OUTPUTDIR/import-modules" 104184610Salfred $RM -rf "$IMPORT_MODULES_TOPDIR" 105184610Salfred $MKDIR -p "$IMPORT_MODULES_TOPDIR" 106184610Salfred if ! $UNZIP -q "$with_import_modules" -d "$IMPORT_MODULES_TOPDIR"; then 107184610Salfred AC_MSG_ERROR([--with-import-modules="$with_import_modules" must point to a dir or a zip file]) 108184610Salfred fi 109189547Sthompsa else 110189547Sthompsa AC_MSG_ERROR([--with-import-modules="$with_import_modules" must point to a dir or a zip file]) 111184610Salfred fi 112184610Salfred fi 113184610Salfred 114184610Salfred if test -d "$IMPORT_MODULES_TOPDIR/modules"; then 115184610Salfred IMPORT_MODULES_CLASSES="$IMPORT_MODULES_TOPDIR/modules" 116184610Salfred fi 117184610Salfred if test -d "$IMPORT_MODULES_TOPDIR/modules_cmds"; then 118184610Salfred IMPORT_MODULES_CMDS="$IMPORT_MODULES_TOPDIR/modules_cmds" 119184610Salfred fi 120184610Salfred if test -d "$IMPORT_MODULES_TOPDIR/modules_libs"; then 121184610Salfred IMPORT_MODULES_LIBS="$IMPORT_MODULES_TOPDIR/modules_libs" 122184610Salfred fi 123195967Salfred if test -d "$IMPORT_MODULES_TOPDIR/modules_conf"; then 124195967Salfred IMPORT_MODULES_CONF="$IMPORT_MODULES_TOPDIR/modules_conf" 125195967Salfred fi 126195967Salfred if test -d "$IMPORT_MODULES_TOPDIR/modules_legal"; then 127195967Salfred IMPORT_MODULES_LEGAL="$IMPORT_MODULES_TOPDIR/modules_legal" 128195967Salfred fi 129195967Salfred if test -d "$IMPORT_MODULES_TOPDIR/modules_man"; then 130195967Salfred IMPORT_MODULES_MAN="$IMPORT_MODULES_TOPDIR/modules_man" 131195967Salfred fi 132195967Salfred if test -d "$IMPORT_MODULES_TOPDIR/modules_src"; then 133195967Salfred IMPORT_MODULES_SRC="$IMPORT_MODULES_TOPDIR/modules_src" 134195967Salfred fi 135195967Salfred # Workaround for using different imported module-info.java in Jake due to a 136195967Salfred # change in format. Remove once new format is standard in JDK 9 and javafx 137195967Salfred # delivers just that. 138195967Salfred if test -d "$IMPORT_MODULES_TOPDIR/modules_src_jake"; then 139195967Salfred IMPORT_MODULES_SRC="$IMPORT_MODULES_TOPDIR/modules_src_jake $IMPORT_MODULES_SRC" 140195967Salfred fi 141195967Salfred if test -d "$IMPORT_MODULES_TOPDIR/make"; then 142195967Salfred IMPORT_MODULES_MAKE="$IMPORT_MODULES_TOPDIR/make" 143195967Salfred fi 144195967Salfred 145195967Salfred AC_SUBST(IMPORT_MODULES_CLASSES) 146195967Salfred AC_SUBST(IMPORT_MODULES_CMDS) 147195967Salfred AC_SUBST(IMPORT_MODULES_LIBS) 148195967Salfred AC_SUBST(IMPORT_MODULES_CONF) 149195967Salfred AC_SUBST(IMPORT_MODULES_SRC) 150195967Salfred AC_SUBST(IMPORT_MODULES_MAKE) 151195967Salfred]) 152195967Salfred