source-dirs.m4 revision 2454:b88023f46daa
11590Srgrimes#
21590Srgrimes# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
31590Srgrimes# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
41590Srgrimes#
51590Srgrimes# This code is free software; you can redistribute it and/or modify it
61590Srgrimes# under the terms of the GNU General Public License version 2 only, as
71590Srgrimes# published by the Free Software Foundation.  Oracle designates this
81590Srgrimes# particular file as subject to the "Classpath" exception as provided
91590Srgrimes# by Oracle in the LICENSE file that accompanied this code.
101590Srgrimes#
111590Srgrimes# This code is distributed in the hope that it will be useful, but WITHOUT
121590Srgrimes# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
131590Srgrimes# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
141590Srgrimes# version 2 for more details (a copy is included in the LICENSE file that
151590Srgrimes# accompanied this code).
161590Srgrimes#
171590Srgrimes# You should have received a copy of the GNU General Public License version
181590Srgrimes# 2 along with this work; if not, write to the Free Software Foundation,
191590Srgrimes# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
201590Srgrimes#
211590Srgrimes# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
221590Srgrimes# or visit www.oracle.com if you need additional information or have any
231590Srgrimes# questions.
241590Srgrimes#
251590Srgrimes
261590SrgrimesAC_DEFUN_ONCE([SRCDIRS_SETUP_TOPDIRS],
271590Srgrimes[
281590Srgrimes  # Where are the sources.
2950477Speter  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
301590Srgrimes  CORBA_TOPDIR="$SRC_ROOT/corba"
31165240Sru  JAXP_TOPDIR="$SRC_ROOT/jaxp"
321590Srgrimes  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
331590Srgrimes  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
341590Srgrimes  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
351590Srgrimes  JDK_TOPDIR="$SRC_ROOT/jdk"
361590Srgrimes  AC_SUBST(LANGTOOLS_TOPDIR)
371590Srgrimes  AC_SUBST(CORBA_TOPDIR)
3868963Sru  AC_SUBST(JAXP_TOPDIR)
3994978Stjr  AC_SUBST(JAXWS_TOPDIR)
401590Srgrimes  AC_SUBST(HOTSPOT_TOPDIR)
4178795Sdd  AC_SUBST(NASHORN_TOPDIR)
421590Srgrimes  AC_SUBST(JDK_TOPDIR)
4395083Scharnier])
4495083Scharnier
4595083ScharnierAC_DEFUN_ONCE([SRCDIRS_SETUP_ALTERNATIVE_TOPDIRS],
461590Srgrimes[
4798342Stjr  # This feature is no longer supported.
481590Srgrimes
4997267Stjr  BASIC_DEPRECATED_ARG_WITH(add-source-root)
501590Srgrimes  BASIC_DEPRECATED_ARG_WITH(override-source-root)
5194978Stjr  BASIC_DEPRECATED_ARG_WITH(adds-and-overrides)
5294978Stjr  BASIC_DEPRECATED_ARG_WITH(override-langtools)
5394978Stjr  BASIC_DEPRECATED_ARG_WITH(override-corba)
5494978Stjr  BASIC_DEPRECATED_ARG_WITH(override-jaxp)
5594978Stjr  BASIC_DEPRECATED_ARG_WITH(override-jaxws)
5694978Stjr  BASIC_DEPRECATED_ARG_WITH(override-hotspot)
5794978Stjr  BASIC_DEPRECATED_ARG_WITH(override-nashorn)
5894978Stjr  BASIC_DEPRECATED_ARG_WITH(override-jdk)
5987751Scharnier])
6098342Stjr
61165240SruAC_DEFUN_ONCE([SRCDIRS_SETUP_OUTPUT_DIRS],
62165240Sru[
63165240Sru  BUILD_OUTPUT="$OUTPUT_ROOT"
641590Srgrimes  AC_SUBST(BUILD_OUTPUT)
651590Srgrimes  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
661590Srgrimes
671590Srgrimes  BASIC_DEPRECATED_ARG_WITH(import_hotspot)
6868963Sru])
691590Srgrimes
70133010Stjr################################################################################
71133010Stjr# Define a mechanism for importing extra prebuilt modules
72133010Stjr#
73133010Stjr
74133010StjrAC_DEFUN_ONCE([SRCDIRS_SETUP_IMPORT_MODULES],
75133010Stjr[
76133010Stjr  AC_ARG_WITH(import-modules, [AS_HELP_STRING([--with-import-modules],
77133010Stjr      [import a set of prebuilt modules either as a zip file or an exploded directory])])
78133010Stjr
791590Srgrimes  if test "x$with_import_modules" != x \
80133010Stjr      && test "x$with_import_modules" != "xno"; then
81133010Stjr    if test -d "$with_import_modules"; then
8294978Stjr      IMPORT_MODULES_TOPDIR="$with_import_modules"
8394978Stjr      BASIC_FIXUP_PATH([IMPORT_MODULES_TOPDIR])
8494978Stjr    elif test -e "$with_import_modules"; then
8594978Stjr      IMPORT_MODULES_TOPDIR="$CONFIGURESUPPORT_OUTPUTDIR/import-modules"
8694978Stjr      $RM -rf "$IMPORT_MODULES_TOPDIR"
871590Srgrimes      $MKDIR -p "$IMPORT_MODULES_TOPDIR"
88165240Sru      if ! $UNZIP -q "$with_import_modules" -d "$IMPORT_MODULES_TOPDIR"; then
89165240Sru        AC_MSG_ERROR([--with-import-modules="$with_import_modules" must point to a dir or a zip file])
90165240Sru      fi
91    else
92      AC_MSG_ERROR([--with-import-modules="$with_import_modules" must point to a dir or a zip file])
93    fi
94  fi
95
96  if test -d "$IMPORT_MODULES_TOPDIR/modules"; then
97    IMPORT_MODULES_CLASSES="$IMPORT_MODULES_TOPDIR/modules"
98  fi
99  if test -d "$IMPORT_MODULES_TOPDIR/modules_cmds"; then
100    IMPORT_MODULES_CMDS="$IMPORT_MODULES_TOPDIR/modules_cmds"
101  fi
102  if test -d "$IMPORT_MODULES_TOPDIR/modules_libs"; then
103    IMPORT_MODULES_LIBS="$IMPORT_MODULES_TOPDIR/modules_libs"
104  fi
105  if test -d "$IMPORT_MODULES_TOPDIR/modules_conf"; then
106    IMPORT_MODULES_CONF="$IMPORT_MODULES_TOPDIR/modules_conf"
107  fi
108  if test -d "$IMPORT_MODULES_TOPDIR/modules_legal"; then
109    IMPORT_MODULES_LEGAL="$IMPORT_MODULES_TOPDIR/modules_legal"
110  fi
111  if test -d "$IMPORT_MODULES_TOPDIR/modules_man"; then
112    IMPORT_MODULES_MAN="$IMPORT_MODULES_TOPDIR/modules_man"
113  fi
114  if test -d "$IMPORT_MODULES_TOPDIR/modules_src"; then
115    IMPORT_MODULES_SRC="$IMPORT_MODULES_TOPDIR/modules_src"
116  fi
117  if test -d "$IMPORT_MODULES_TOPDIR/make"; then
118    IMPORT_MODULES_MAKE="$IMPORT_MODULES_TOPDIR/make"
119  fi
120
121  AC_SUBST(IMPORT_MODULES_CLASSES)
122  AC_SUBST(IMPORT_MODULES_CMDS)
123  AC_SUBST(IMPORT_MODULES_LIBS)
124  AC_SUBST(IMPORT_MODULES_CONF)
125  AC_SUBST(IMPORT_MODULES_LEGAL)
126  AC_SUBST(IMPORT_MODULES_MAN)
127  AC_SUBST(IMPORT_MODULES_SRC)
128  AC_SUBST(IMPORT_MODULES_MAKE)
129])
130