1 #
2 # Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 #
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.
10 #
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).
16 #
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.
20 #
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
369 PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
370 fi
371
372 # You can force the sys-root if the sys-root encoded into the cross compiler tools
373 # is not correct.
374 AC_ARG_WITH(sys-root, [AS_HELP_STRING([--with-sys-root],
375 [pass this sys-root to the compilers and tools (for cross-compiling)])])
376
377 if test "x$with_sys_root" != x; then
378 SYS_ROOT=$with_sys_root
379 else
380 SYS_ROOT=/
381 fi
382 AC_SUBST(SYS_ROOT)
383
384 AC_ARG_WITH([tools-dir], [AS_HELP_STRING([--with-tools-dir],
385 [search this directory for compilers and tools (for cross-compiling)])],
386 [TOOLS_DIR=$with_tools_dir]
387 )
388
389 AC_ARG_WITH([devkit], [AS_HELP_STRING([--with-devkit],
390 [use this directory as base for tools-dir and sys-root (for cross-compiling)])],
391 [
392 if test "x$with_sys_root" != x; then
393 AC_MSG_ERROR([Cannot specify both --with-devkit and --with-sys-root at the same time])
394 fi
395 BASIC_FIXUP_PATH([with_devkit])
396 BASIC_APPEND_TO_PATH([TOOLS_DIR],$with_devkit/bin)
397 if test -d "$with_devkit/$host_alias/libc"; then
398 SYS_ROOT=$with_devkit/$host_alias/libc
399 elif test -d "$with_devkit/$host/sys-root"; then
400 SYS_ROOT=$with_devkit/$host/sys-root
401 fi
402 ])
403 ])
404
405 AC_DEFUN_ONCE([BASIC_SETUP_OUTPUT_DIR],
406 [
407
408 AC_ARG_WITH(conf-name, [AS_HELP_STRING([--with-conf-name],
617 AC_DEFUN_ONCE([BASIC_SETUP_COMPLEX_TOOLS],
618 [
619 BASIC_CHECK_GNU_MAKE
620
621 BASIC_CHECK_FIND_DELETE
622
623 # These tools might not be installed by default,
624 # need hint on how to install them.
625 BASIC_REQUIRE_PROG(UNZIP, unzip)
626 BASIC_REQUIRE_PROG(ZIP, zip)
627
628 # Non-required basic tools
629
630 AC_PATH_PROG(LDD, ldd)
631 if test "x$LDD" = "x"; then
632 # List shared lib dependencies is used for
633 # debug output and checking for forbidden dependencies.
634 # We can build without it.
635 LDD="true"
636 fi
637 AC_PATH_PROG(OTOOL, otool)
638 if test "x$OTOOL" = "x"; then
639 OTOOL="true"
640 fi
641 AC_PATH_PROGS(READELF, [readelf greadelf])
642 AC_PATH_PROG(HG, hg)
643 AC_PATH_PROG(STAT, stat)
644 AC_PATH_PROG(TIME, time)
645 # Check if it's GNU time
646 IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
647 if test "x$IS_GNU_TIME" != x; then
648 IS_GNU_TIME=yes
649 else
650 IS_GNU_TIME=no
651 fi
652 AC_SUBST(IS_GNU_TIME)
653
654 if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
655 BASIC_REQUIRE_PROG(COMM, comm)
656 fi
657
658 if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
659 BASIC_REQUIRE_PROG(DSYMUTIL, dsymutil)
660 BASIC_REQUIRE_PROG(XATTR, xattr)
|
1 #
2 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 #
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.
10 #
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).
16 #
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.
20 #
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
369 PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
370 fi
371
372 # You can force the sys-root if the sys-root encoded into the cross compiler tools
373 # is not correct.
374 AC_ARG_WITH(sys-root, [AS_HELP_STRING([--with-sys-root],
375 [pass this sys-root to the compilers and tools (for cross-compiling)])])
376
377 if test "x$with_sys_root" != x; then
378 SYS_ROOT=$with_sys_root
379 else
380 SYS_ROOT=/
381 fi
382 AC_SUBST(SYS_ROOT)
383
384 AC_ARG_WITH([tools-dir], [AS_HELP_STRING([--with-tools-dir],
385 [search this directory for compilers and tools (for cross-compiling)])],
386 [TOOLS_DIR=$with_tools_dir]
387 )
388
389 # Xcode version will be validated later
390 AC_ARG_WITH([xcode-path], [AS_HELP_STRING([--with-xcode-path],
391 [explicit path to Xcode 4 (generally for building on 10.9 and later)])],
392 [XCODE_PATH=$with_xcode_path]
393 )
394
395 AC_ARG_WITH([devkit], [AS_HELP_STRING([--with-devkit],
396 [use this directory as base for tools-dir and sys-root (for cross-compiling)])],
397 [
398 if test "x$with_sys_root" != x; then
399 AC_MSG_ERROR([Cannot specify both --with-devkit and --with-sys-root at the same time])
400 fi
401 BASIC_FIXUP_PATH([with_devkit])
402 BASIC_APPEND_TO_PATH([TOOLS_DIR],$with_devkit/bin)
403 if test -d "$with_devkit/$host_alias/libc"; then
404 SYS_ROOT=$with_devkit/$host_alias/libc
405 elif test -d "$with_devkit/$host/sys-root"; then
406 SYS_ROOT=$with_devkit/$host/sys-root
407 fi
408 ])
409 ])
410
411 AC_DEFUN_ONCE([BASIC_SETUP_OUTPUT_DIR],
412 [
413
414 AC_ARG_WITH(conf-name, [AS_HELP_STRING([--with-conf-name],
623 AC_DEFUN_ONCE([BASIC_SETUP_COMPLEX_TOOLS],
624 [
625 BASIC_CHECK_GNU_MAKE
626
627 BASIC_CHECK_FIND_DELETE
628
629 # These tools might not be installed by default,
630 # need hint on how to install them.
631 BASIC_REQUIRE_PROG(UNZIP, unzip)
632 BASIC_REQUIRE_PROG(ZIP, zip)
633
634 # Non-required basic tools
635
636 AC_PATH_PROG(LDD, ldd)
637 if test "x$LDD" = "x"; then
638 # List shared lib dependencies is used for
639 # debug output and checking for forbidden dependencies.
640 # We can build without it.
641 LDD="true"
642 fi
643 AC_PATH_PROGS(READELF, [readelf greadelf])
644 AC_PATH_PROG(HG, hg)
645 AC_PATH_PROG(STAT, stat)
646 AC_PATH_PROG(TIME, time)
647 # Check if it's GNU time
648 IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
649 if test "x$IS_GNU_TIME" != x; then
650 IS_GNU_TIME=yes
651 else
652 IS_GNU_TIME=no
653 fi
654 AC_SUBST(IS_GNU_TIME)
655
656 if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
657 BASIC_REQUIRE_PROG(COMM, comm)
658 fi
659
660 if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
661 BASIC_REQUIRE_PROG(DSYMUTIL, dsymutil)
662 BASIC_REQUIRE_PROG(XATTR, xattr)
|