2
# Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved.
3
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5
# This code is free software; you can redistribute it and/or modify it
6
# under the terms of the GNU General Public License version 2 only, as
7
# published by the Free Software Foundation. Oracle designates this
8
# particular file as subject to the "Classpath" exception as provided
9
# by Oracle in the LICENSE file that accompanied this code.
11
# This code is distributed in the hope that it will be useful, but WITHOUT
12
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14
# version 2 for more details (a copy is included in the LICENSE file that
15
# accompanied this code).
17
# You should have received a copy of the GNU General Public License version
18
# 2 along with this work; if not, write to the Free Software Foundation,
19
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
21
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22
# or visit www.oracle.com if you need additional information or have any
26
AC_DEFUN_ONCE([SRCDIRS_SETUP_DIRS],
28
OUTPUTDIR="$OUTPUTDIR"
30
JDK_OUTPUTDIR="$OUTPUTDIR/jdk"
33
################################################################################
34
# Define a mechanism for importing extra prebuilt modules
37
AC_DEFUN_ONCE([SRCDIRS_SETUP_IMPORT_MODULES],
39
AC_ARG_WITH(import-modules, [AS_HELP_STRING([--with-import-modules],
40
[import a set of prebuilt modules either as a zip file or an exploded directory])])
42
if test "x$with_import_modules" != x \
43
&& test "x$with_import_modules" != "xno"; then
44
if test -d "$with_import_modules"; then
45
IMPORT_MODULES_TOPDIR="$with_import_modules"
46
UTIL_FIXUP_PATH([IMPORT_MODULES_TOPDIR])
47
elif test -e "$with_import_modules"; then
48
IMPORT_MODULES_TOPDIR="$CONFIGURESUPPORT_OUTPUTDIR/import-modules"
49
$RM -rf "$IMPORT_MODULES_TOPDIR"
50
$MKDIR -p "$IMPORT_MODULES_TOPDIR"
51
if ! $UNZIP -q "$with_import_modules" -d "$IMPORT_MODULES_TOPDIR"; then
52
AC_MSG_ERROR([--with-import-modules="$with_import_modules" must point to a dir or a zip file])
55
AC_MSG_ERROR([--with-import-modules="$with_import_modules" must point to a dir or a zip file])
59
if test -d "$IMPORT_MODULES_TOPDIR/modules"; then
60
IMPORT_MODULES_CLASSES="$IMPORT_MODULES_TOPDIR/modules"
62
if test -d "$IMPORT_MODULES_TOPDIR/modules_cmds"; then
63
IMPORT_MODULES_CMDS="$IMPORT_MODULES_TOPDIR/modules_cmds"
65
if test -d "$IMPORT_MODULES_TOPDIR/modules_libs"; then
66
IMPORT_MODULES_LIBS="$IMPORT_MODULES_TOPDIR/modules_libs"
68
if test -d "$IMPORT_MODULES_TOPDIR/modules_conf"; then
69
IMPORT_MODULES_CONF="$IMPORT_MODULES_TOPDIR/modules_conf"
71
if test -d "$IMPORT_MODULES_TOPDIR/modules_legal"; then
72
IMPORT_MODULES_LEGAL="$IMPORT_MODULES_TOPDIR/modules_legal"
74
if test -d "$IMPORT_MODULES_TOPDIR/modules_man"; then
75
IMPORT_MODULES_MAN="$IMPORT_MODULES_TOPDIR/modules_man"
77
if test -d "$IMPORT_MODULES_TOPDIR/modules_src"; then
78
IMPORT_MODULES_SRC="$IMPORT_MODULES_TOPDIR/modules_src"
80
if test -d "$IMPORT_MODULES_TOPDIR/make"; then
81
IMPORT_MODULES_MAKE="$IMPORT_MODULES_TOPDIR/make"
84
AC_SUBST(IMPORT_MODULES_CLASSES)
85
AC_SUBST(IMPORT_MODULES_CMDS)
86
AC_SUBST(IMPORT_MODULES_LIBS)
87
AC_SUBST(IMPORT_MODULES_CONF)
88
AC_SUBST(IMPORT_MODULES_LEGAL)
89
AC_SUBST(IMPORT_MODULES_MAN)
90
AC_SUBST(IMPORT_MODULES_SRC)
91
AC_SUBST(IMPORT_MODULES_MAKE)