提交 7e1fd22b 编写于 作者: O ohair

7074397: Build infrastructure changes (makefile re-write)

Summary: New makefiles transition, old and new living side by side for now.
Reviewed-by: ohair, jjg, dholmes, ohrstrom, erikj, ihse, tgranat, ykantser
Contributed-by: Nohrstrom &lt;fredrik.ohrstrom@oracle.com&gt;, erikj &lt;erik.joelsson@oracle.com&gt;, ihse &lt;magnus.ihse.bursie@oracle.com&gt;, tgranat &lt;torbjorn.granat@oracle.com&gt;, ykantser <yekaterina.kantserova@oracle.com>
上级 ff3d387a
#
# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
# Generated Makefile @DATE_WHEN_CONFIGURED@
SPEC:=@OUTPUT_ROOT@/spec.gmk
include @SRC_ROOT@/common/makefiles/Makefile
#!/bin/sh
#
# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
autoconf configure.ac > configure
rm -rf config.status config.log autom4te.cache
此差异已折叠。
此差异已折叠。
#!/bin/sh
echo >&2 "No suitable 'install' command found.'"
echo >&2 "If automake is installed, running 'automake -fa'"
echo >&2 "(and ignoring the errors) might produce one."
exit 1
# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
#
# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# PKG_PROG_PKG_CONFIG([MIN-VERSION])
# ----------------------------------
AC_DEFUN([PKG_PROG_PKG_CONFIG],
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
fi
if test -n "$PKG_CONFIG"; then
_pkg_min_version=m4_default([$1], [0.9.0])
AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
PKG_CONFIG=""
fi
fi[]dnl
])# PKG_PROG_PKG_CONFIG
# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
#
# Check to see whether a particular set of modules exists. Similar
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
#
#
# Similar to PKG_CHECK_MODULES, make sure that the first instance of
# this or PKG_CHECK_MODULES is called, or make sure to call
# PKG_CHECK_EXISTS manually
# --------------------------------------------------------------
AC_DEFUN([PKG_CHECK_EXISTS],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
if test -n "$PKG_CONFIG" && \
AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
m4_ifval([$2], [$2], [:])
m4_ifvaln([$3], [else
$3])dnl
fi])
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
# ---------------------------------------------
m4_define([_PKG_CONFIG],
[if test -n "$$1"; then
pkg_cv_[]$1="$$1"
elif test -n "$PKG_CONFIG"; then
PKG_CHECK_EXISTS([$3],
[pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
[pkg_failed=yes])
else
pkg_failed=untried
fi[]dnl
])# _PKG_CONFIG
# _PKG_SHORT_ERRORS_SUPPORTED
# -----------------------------
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
_pkg_short_errors_supported=yes
else
_pkg_short_errors_supported=no
fi[]dnl
])# _PKG_SHORT_ERRORS_SUPPORTED
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
# [ACTION-IF-NOT-FOUND])
#
#
# Note that if there is a possibility the first call to
# PKG_CHECK_MODULES might not happen, you should be sure to include an
# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
#
#
# --------------------------------------------------------------
AC_DEFUN([PKG_CHECK_MODULES],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
pkg_failed=no
AC_MSG_CHECKING([for $1])
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
and $1[]_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.])
if test $pkg_failed = yes; then
_PKG_SHORT_ERRORS_SUPPORTED
if test $_pkg_short_errors_supported = yes; then
$1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
else
$1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
fi
# Put the nasty error message in config.log where it belongs
echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
ifelse([$4], , [AC_MSG_ERROR(dnl
[Package requirements ($2) were not met:
$$1_PKG_ERRORS
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
_PKG_TEXT
])],
[AC_MSG_RESULT([no])
$4])
elif test $pkg_failed = untried; then
ifelse([$4], , [AC_MSG_FAILURE(dnl
[The pkg-config script could not be found or is too old. Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.
_PKG_TEXT
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
[$4])
else
$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
AC_MSG_RESULT([yes])
ifelse([$3], , :, [$3])
fi[]dnl
])# PKG_CHECK_MODULES
#
# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
# This is a configuration example using builddeps
# that are downloaded from an ftp server.
# This is how you use it:
#configure --with-builddeps-server=ftp://builddeps.server/adir \
# --with-builddeps-conf=..../builddeps.conf.example
# --with-builddeps-dir=/localdisk/mybuilddeps
# Translate a configuration triplet/quadruplet into something
# known by this configuration file.
# If no rewrite was found, then rewritten_host=${host}
REWRITE_i686_pc_linux_gnu=i686-unknown-linux-gnu
REWRITE_i386_pc_solaris2_10=i686-sun-solaris2_10
# The needed cups builddeps are host independent header files.
# I.e. they need not be part of the devkit.
builddep_cups=lib/cups_1_3_9.zip
builddep_cups_CFLAGS=-I${depdir}
# The devkit is the cross compiler tools and sys-roots
# for the build platform.
builddep_devkit=sdk/sdk-${rewritten_build}-20110921.tar.gz
# The freetype dependency is partyl host dependent.
# It is stored inside the sys-root.
builddep_freetype2=sdk/sdk-${rewritten_build}-20110921.tar.gz
builddep_freetype2_CFLAGS=-I${depdir}/${rewritten_host}/sys-root/usr/include/freetype2
builddep_freetype2_LIBS=-lfreetype
# There are many other build dependencies, but they are implicitly
# found inside the devkit sys-root.
# The boot jdk runs on the build system and is used to compile and run
# Java build tools and of course, the bootstrap javac.
builddep_bootjdk_BUILD_i386_pc_solaris2=java/jdk-7u2-fcs-bin-b13-solaris-i586-17_nov_2011.zip
builddep_bootjdk_BUILD_x86_64_pc_solaris2=java/jdk-7u2-fcs-bin-b13-solaris-x64-17_nov_2011.zip
builddep_bootjdk_BUILD_i686_unknown_linux_gnu=java/jdk-7u2-fcs-bin-b13-linux-i586-17_nov_2011.zip
builddep_bootjdk_BUILD_x86_64_unknown_linux_gnu=java/jdk-7u2-fcs-bin-b13-linux-x64-17_nov_2011.zip
builddep_bootjdk_BUILD_sparc_solaris2=java/jdk-7u2-fcs-bin-b13-solaris-sparc-17_nov_2011.zip
builddep_bootjdk_BUILD_sparcv9_solaris2=java/jdk-7u2-fcs-bin-b13-solaris-sparcv9-17_nov_2011.zip
builddep_bootjdk_BUILD_i386_pc_windows=java/jdk-7u2-fcs-bin-b13-windows-i586-17_nov_2011.zip
builddep_bootjdk_BUILD_x86_64_pc_windows=java/jdk-7u2-fcs-bin-b13-windows-x64-17_nov_2011.zip
builddep_bootjdk_ROOT=${depdir}/jdk7_02/jdk1.7.0_02
#
# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
# This is a configuration example using an nfs-mount /java
# it will use the builddeps directly from the nfs mounted directory.
# This is how you use it:
#configure --with-builddeps-conf=..../builddeps.conf.nfs.example
REWRITE_i686_pc_linux_gnu=i686-unknown-linux-gnu
REWRITE_i386_pc_solaris2_10=i686-sun-solaris2_10
DEVTOOLS=/java/devtools
builddep_cups=${DEVTOOLS}/linux/cups/include
builddep_cups_CFLAGS=-I${depdir}
JDK_ROOT=/java/re/jdk/7u4/latest/binaries
builddep_bootjdk_BUILD_i386_pc_solaris2=${JDK_ROOT}/solaris-i586
builddep_bootjdk_BUILD_x86_64_pc_solaris2=${JDK_ROOT}/solaris-amd64
builddep_bootjdk_BUILD_i686_unknown_linux_gnu=${JDK_ROOT}/linux-i586
builddep_bootjdk_BUILD_x86_64_unknown_linux_gnu=${JDK_ROOT}/linux-amd64
builddep_bootjdk_ROOT=
#
# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
AC_DEFUN([BDEPS_SCAN_FOR_BUILDDEPS],
[
define(LIST_OF_BUILD_DEPENDENCIES,)
if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
if test "x$with_builddeps_conf" != x; then
AC_MSG_CHECKING([for supplied builddeps configuration file])
builddepsfile=$with_builddeps_conf
if test -s $builddepsfile; then
. $builddepsfile
AC_MSG_RESULT([loaded!])
else
AC_ERROR([The given builddeps conf file $with_builddeps_conf could not be loaded!])
fi
else
AC_MSG_CHECKING([for builddeps.conf files in sources...])
builddepsfile=`mktemp`
touch $builddepsfile
# Put all found confs into a single file.
find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
# Source the file to acquire the variables
if test -s $builddepsfile; then
. $builddepsfile
AC_MSG_RESULT([found at least one!])
else
AC_ERROR([Could not find any builddeps.conf at all!])
fi
fi
# Create build and host names that use _ instead of "-" and ".".
# This is necessary to use them in variable names.
build_var=`echo ${build} | tr '-' '_' | tr '.' '_'`
host_var=`echo ${host} | tr '-' '_' | tr '.' '_'`
# Extract rewrite information for build and host
eval rewritten_build=\${REWRITE_${build_var}}
if test "x$rewritten_build" = x; then
rewritten_build=${build}
echo Build stays the same $rewritten_build
else
echo Rewriting build for builddeps into $rewritten_build
fi
eval rewritten_host=\${REWRITE_${host_var}}
if test "x$rewritten_host" = x; then
rewritten_host=${host}
echo Host stays the same $rewritten_host
else
echo Rewriting host for builddeps into $rewritten_host
fi
rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
rewritten_host_var=`echo ${rewritten_host} | tr '-' '_' | tr '.' '_'`
fi
AC_CHECK_PROGS(BDEPS_UNZIP, [7z unzip])
if test "x$BDEPS_UNZIP" = x7z; then
BDEPS_UNZIP="7z x"
fi
AC_CHECK_PROGS(BDEPS_FTP, [wget lftp ftp])
])
AC_DEFUN([BDEPS_FTPGET],
[
# $1 is the ftp://abuilddeps.server.com/libs/cups.zip
# $2 is the local file name for the downloaded file.
VALID_TOOL=no
if test "x$BDEPS_FTP" = xwget; then
VALID_TOOL=yes
wget -O $2 $1
fi
if test "x$BDEPS_FTP" = xlftp; then
VALID_TOOL=yes
lftp -c "get $1 -o $2"
fi
if test "x$BDEPS_FTP" = xftp; then
VALID_TOOL=yes
FTPSERVER=`echo $1 | cut -f 3 -d '/'`
FTPPATH=`echo $1 | cut -f 4- -d '/'`
FTPUSERPWD=${FTPSERVER%%@*}
if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
FTPUSER=${userpwd%%:*}
FTPPWD=${userpwd#*@}
FTPSERVER=${FTPSERVER#*@}
else
FTPUSER=ftp
FTPPWD=ftp
fi
# the "pass" command does not work on some
# ftp clients (read ftp.exe) but if it works,
# passive mode is better!
(\
echo "user $FTPUSER $FTPPWD" ;\
echo "pass" ;\
echo "bin" ;\
echo "get $FTPPATH $2" ;\
) | ftp -in $FTPSERVER
fi
if test "x$VALID_TOOL" != xyes; then
AC_ERROR([I do not know how to use the tool: $BDEPS_FTP])
fi
])
AC_DEFUN([BDEPS_CHECK_MODULE],
[
define([LIST_OF_BUILD_DEPENDENCIES],LIST_OF_BUILD_DEPENDENCIES[$2=$3'\n'])
if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
# Source the builddeps file again, to make sure it uses the latest variables!
. $builddepsfile
# Look for a host and build machine specific resource!
eval resource=\${builddep_$2_BUILD_${rewritten_build_var}_HOST_${rewritten_host_var}}
if test "x$resource" = x; then
# Ok, lets instead look for a host specific resource
eval resource=\${builddep_$2_HOST_${rewritten_host_var}}
fi
if test "x$resource" = x; then
# Ok, lets instead look for a build specific resource
eval resource=\${builddep_$2_BUILD_${rewritten_build_var}}
fi
if test "x$resource" = x; then
# Ok, lets instead look for a generic resource
# (The $2 comes from M4 and not the shell, thus no need for eval here.)
resource=${builddep_$2}
fi
if test "x$resource" != x; then
AC_MSG_NOTICE([Using builddeps $resource for $2])
# If the resource in the builddeps.conf file is an existing directory,
# for example /java/linux/cups
if test -d ${resource}; then
depdir=${resource}
else
BDEPS_FETCH($2, $resource, $with_builddeps_server, $with_builddeps_dir, depdir)
fi
# Source the builddeps file again, because in the previous command, the depdir
# was updated to point at the current build dependency install directory.
. $builddepsfile
# Now extract variables from the builddeps.conf files.
theroot=${builddep_$2_ROOT}
thecflags=${builddep_$2_CFLAGS}
thelibs=${builddep_$2_LIBS}
if test "x$depdir" = x; then
AC_ERROR([Could not download build dependency $2])
fi
$1=$depdir
if test "x$theroot" != x; then
$1="$theroot"
fi
if test "x$thecflags" != x; then
$1_CFLAGS="$thecflags"
fi
if test "x$thelibs" != x; then
$1_LIBS="$thelibs"
fi
m4_default([$4], [:])
m4_ifvaln([$5], [else $5])
fi
m4_ifvaln([$5], [else $5])
fi
])
AC_DEFUN([BDEPS_FETCH],
[
# $1 is for example mymodule
# $2 is for example libs/general/libmymod_1_2_3.zip
# $3 is for example ftp://mybuilddeps.myserver.com/builddeps
# $4 is for example /localhome/builddeps
# $5 is the name of the variable into which we store the depdir, eg MYMOD
# Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
# unzip into the directory: /localhome/builddeps/libmymod_1_2_3
filename=`basename $2`
filebase=`echo $filename | sed 's/\.[[^\.]]*$//'`
filebase=${filename%%.*}
extension=${filename#*.}
installdir=$4/$filebase
if test ! -f $installdir/$filename.unpacked; then
AC_MSG_NOTICE([Downloading build dependency $1 from $3/$2 and installing into $installdir])
if test ! -d $installdir; then
mkdir -p $installdir
fi
if test ! -d $installdir; then
AC_ERROR([Could not create directory $installdir])
fi
tmpfile=`mktemp $installdir/$1.XXXXXXXXX`
touch $tmpfile
if test ! -f $tmpfile; then
AC_ERROR([Could not create files in directory $installdir])
fi
BDEPS_FTPGET([$3/$2] , [$tmpfile])
mv $tmpfile $installdir/$filename
if test ! -s $installdir/$filename; then
AC_ERROR([Could not download $3/$2])
fi
case "$extension" in
zip) echo "Unzipping $installdir/$filename..."
(cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
;;
tar.gz) echo "Untaring $installdir/$filename..."
(cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
;;
tgz) echo "Untaring $installdir/$filename..."
(cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
;;
*) AC_ERROR([Cannot handle build depency archive with extension $extension])
;;
esac
fi
if test -f $installdir/$filename.unpacked; then
$5=$installdir
fi
])
#
# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
LAUNCHER_NAME=java
PRODUCT_NAME="Java(TM)"
PRODUCT_SUFFIX="SE Runtime Environment"
JDK_RC_PLATFORM_NAME="Platform SE"
COMPANY_NAME="Oracle Corporation"
/*
* Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
#define PACKAGE_NAME "openjdk"
#define PACKAGE_TARNAME "openjdk"
#define PACKAGE_VERSION "version-0.1"
#define PACKAGE_STRING "openjdk version-0.1"
#define PACKAGE_BUGREPORT "build-infra-dev@openjdk.java.net"
#define PACKAGE_URL ""
#define STDC_HEADERS
#define HAVE_SYS_TYPES_H
#define HAVE_SYS_STAT_H
#define HAVE_STDLIB_H
#define HAVE_STRING_H
#define HAVE_MEMORY_H
#define HAVE_STRINGS_H
#define HAVE_INTTYPES_H
#define HAVE_STDINT_H
#define HAVE_UNISTD_H
#define SIZEOF_INT_P 8
#define HAVE_CUPS_CUPS_H
#define HAVE_CUPS_PPD_H
#define HAVE_LIBJPEG
#define HAVE_LIBGIF
#define HAVE_LIBZ
#define HAVE_LIBM
#define HAVE_ALTZONE
此差异已折叠。
此差异已折叠。
#
# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
AC_DEFUN([CHECK_CORES],
[
AC_MSG_CHECKING([for number of cores])
NUM_CORES=1
FOUND_CORES=no
if test -f /proc/cpuinfo; then
# Looks like a Linux system
NUM_CORES=`cat /proc/cpuinfo | grep -c processor`
FOUND_CORES=yes
fi
if test -x /usr/sbin/psrinfo; then
# Looks like a Solaris system
NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
FOUND_CORES=yes
fi
if test -x /usr/sbin/system_profiler; then
# Looks like a MacOSX system
NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk '{print [$]5}'`
FOUND_CORES=yes
fi
if test "x$build_os" = xwindows; then
NUM_CORES=4
fi
# For c/c++ code we run twice as many concurrent build
# jobs than we have cores, otherwise we will stall on io.
CONCURRENT_BUILD_JOBS=`expr $NUM_CORES \* 2`
if test "x$FOUND_CORES" = xyes; then
AC_MSG_RESULT([$NUM_CORES])
else
AC_MSG_RESULT([could not detect number of cores, defaulting to 1!])
fi
])
AC_DEFUN([CHECK_MEMORY_SIZE],
[
AC_MSG_CHECKING([for memory size])
# Default to 1024MB
MEMORY_SIZE=1024
FOUND_MEM=no
if test -f /proc/cpuinfo; then
# Looks like a Linux system
MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print [$]2}'`
MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
FOUND_MEM=yes
fi
if test -x /usr/sbin/prtconf; then
# Looks like a Solaris system
MEMORY_SIZE=`/usr/sbin/prtconf | grep "Memory size" | awk '{ print [$]3 }'`
FOUND_MEM=yes
fi
if test -x /usr/sbin/system_profiler; then
# Looks like a MacOSX system
MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk '{print [$]2}'`
MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
FOUND_MEM=yes
fi
if test "x$build_os" = xwindows; then
MEMORY_SIZE=`systeminfo | grep 'Total Physical Memory:' | awk '{ print [$]4 }' | sed 's/,//'`
FOUND_MEM=yes
fi
if test "x$FOUND_MEM" = xyes; then
AC_MSG_RESULT([$MEMORY_SIZE MB])
else
AC_MSG_RESULT([could not detect memory size defaulting to 1024MB!])
fi
])
#
# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
function help_on_build_dependency {
# Print a helpful message on how to acquire the necessary build dependency.
# $1 is the help tag: freetyp2, cups, pulse, alsa etc
MISSING_DEPENDENCY=$1
PKGHANDLER_COMMAND=
AC_CHECK_PROGS(PKGHANDLER, apt-get yum port pkgutil pkgadd)
case $PKGHANDLER in
apt-get)
apt_help $MISSING_DEPENDENCY ;;
yum)
yum_help $MISSING_DEPENDENCY ;;
port)
port_help $MISSING_DEPENDENCY ;;
pkgutil)
pkgutil_help $MISSING_DEPENDENCY ;;
pkgadd)
pkgadd_help $MISSING_DEPENDENCY ;;
* )
break ;;
esac
if test "x$PKGHANDLER_COMMAND" != x; then
HELP_MSG="Try running '$PKGHANDLER_COMMAND'."
fi
}
function apt_help {
case $1 in
devkit)
PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
openjdk)
PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
alsa)
PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
cups)
PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
freetype2)
PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
pulse)
PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
x11)
PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev" ;;
ccache)
PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
* )
break ;;
esac
}
function yum_help {
case $1 in
devkit)
PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
openjdk)
PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
alsa)
PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
cups)
PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
freetype2)
PKGHANDLER_COMMAND="sudo yum install freetype2-devel" ;;
pulse)
PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
x11)
PKGHANDLER_COMMAND="sudo yum install libXtst-devel" ;;
ccache)
PKGHANDLER_COMMAND="sudo yum install ccache" ;;
* )
break ;;
esac
}
function port_help {
PKGHANDLER_COMMAND=""
}
function pkgutil_help {
PKGHANDLER_COMMAND=""
}
function pkgadd_help {
PKGHANDLER_COMMAND=""
}
#
# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
AC_DEFUN([CHECK_FIND_DELETE],
[
# Test if find supports -delete
AC_MSG_CHECKING([if find supports -delete])
FIND_DELETE="-delete"
DELETEDIR=`mktemp -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
if test -f $DELETEDIR/TestIfFindSupportsDelete; then
# No, it does not.
rm $DELETEDIR/TestIfFindSupportsDelete
FIND_DELETE="-exec rm \{\} \+"
AC_MSG_RESULT([no])
else
AC_MSG_RESULT([yes])
fi
rmdir $DELETEDIR
])
AC_DEFUN([CHECK_NONEMPTY],
[
# Test that variable $1 is not empty.
if test "" = "[$]$1"; then AC_ERROR(Could not find translit($1,A-Z,a-z) !); fi
])
AC_DEFUN([ADD_JVM_ARG_IF_OK],
[
# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
# If so, then append $1 to $2
FOUND_WARN=`$3 $1 -version 2>&1 | grep -i warn`
FOUND_VERSION=`$3 $1 -version 2>&1 | grep " version \""`
if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
$2="[$]$2 $1"
fi
])
AC_DEFUN([WHICHCMD],
[
# Translate "gcc -E" into "`which gcc` -E" ie
# extract the full path to the binary and at the
# same time maintain any arguments passed to it.
# The command MUST exist in the path, or else!
tmp="[$]$1"
car="${tmp%% *}"
tmp="[$]$1 EOL"
cdr="${tmp#* }"
# On windows we want paths without spaces.
if test "x$BUILD_OS" = "xwindows"; then
WHICHCMD_SPACESAFE(car)
else
# "which" is not portable, but is used here
# because we know that the command exists!
car=`which $car`
fi
if test "x$cdr" != xEOL; then
$1="$car ${cdr% *}"
else
$1="$car"
fi
])
AC_DEFUN([SPACESAFE],
[
# Fail with message $2 if var $1 contains a path with no spaces in it.
# Unless on Windows, where we can rewrite the path.
HAS_SPACE=`echo "[$]$1" | grep " "`
if test "x$HAS_SPACE" != x; then
if test "x$BUILD_OS" = "xwindows"; then
$1=`$CYGPATH -s -m -a "[$]$1"`
$1=`$CYGPATH -u "[$]$1"`
else
AC_ERROR([You cannot have spaces in $2! "[$]$1"])
fi
fi
])
AC_DEFUN([WHICHCMD_SPACESAFE],
[
# Translate long cygdrive or C:\sdfsf path
# into a short mixed mode path that has no
# spaces in it.
tmp="[$]$1"
if test "x$BUILD_OS" = "xwindows"; then
tmp=`$CYGPATH -u "[$]$1"`
tmp=`which "$tmp"`
# If file exists with .exe appended, that's the real filename
# and cygpath needs that to convert to short style path.
if test -f "${tmp}.exe"; then
tmp="${tmp}.exe"
elif test -f "${tmp}.cmd"; then
tmp="${tmp}.cmd"
fi
# Convert to C:/ mixed style path without spaces.
tmp=`$CYGPATH -s -m "$tmp"`
fi
$1="$tmp"
])
AC_DEFUN([REMOVE_SYMBOLIC_LINKS],
[
if test "x$BUILD_OS" != xwindows; then
# Follow a chain of symbolic links. Use readlink
# where it exists, else fall back to horribly
# complicated shell code.
AC_PATH_PROG(READLINK, readlink)
if test "x$READLINK_TESTED" != yes; then
# On MacOSX there is a readlink tool with a different
# purpose than the GNU readlink tool. Check the found readlink.
ISGNU=`$READLINK --help 2>&1 | grep GNU`
if test "x$ISGNU" = x; then
# A readlink that we do not know how to use.
# Are there other non-GNU readlinks out there?
READLINK_TESTED=yes
READLINK=
fi
fi
if test "x$READLINK" != x; then
$1=`$READLINK -f [$]$1`
else
STARTDIR=$PWD
COUNTER=0
DIR=`dirname [$]$1`
FIL=`basename [$]$1`
while test $COUNTER -lt 20; do
ISLINK=`ls -l $DIR/$FIL | grep '\->' | sed -e 's/.*-> \(.*\)/\1/'`
if test "x$ISLINK" == x; then
# This is not a symbolic link! We are done!
break
fi
# The link might be relative! We have to use cd to travel safely.
cd $DIR
cd `dirname $ISLINK`
DIR=`pwd`
FIL=`basename $ISLINK`
let COUNTER=COUNTER+1
done
cd $STARTDIR
$1=$DIR/$FIL
fi
fi
])
AC_DEFUN([TESTFOR_PROG_CCACHE],
[
AC_ARG_ENABLE([ccache],
[AS_HELP_STRING([--disable-ccache],
[use ccache to speed up recompilations @<:@enabled@:>@])],
[ENABLE_CCACHE=${enable_ccache}], [ENABLE_CCACHE=yes])
if test "x$ENABLE_CCACHE" = xyes; then
AC_PATH_PROG(CCACHE, ccache)
else
AC_MSG_CHECKING([for ccache])
AC_MSG_RESULT([explicitly disabled])
CCACHE=
fi
AC_SUBST(CCACHE)
AC_ARG_WITH([ccache-dir],
[AS_HELP_STRING([--with-ccache-dir],
[where to store ccache files @<:@~/.ccache@:>@])])
if test "x$with_ccache_dir" != x; then
# When using a non home ccache directory, assume the use is to share ccache files
# with other users. Thus change the umask.
SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
fi
CCACHE_FOUND=""
if test "x$CCACHE" != x; then
SETUP_CCACHE_USAGE
fi
])
AC_DEFUN([SETUP_CCACHE_USAGE],
[
if test "x$CCACHE" != x; then
CCACHE_FOUND="true"
# Only use ccache if it is 3.1.4 or later, which supports
# precompiled headers.
AC_MSG_CHECKING([if ccache supports precompiled headers])
HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.@<:@456789@:>@) 2> /dev/null`
if test "x$HAS_GOOD_CCACHE" = x; then
AC_MSG_RESULT([no, disabling ccache])
CCACHE=
else
AC_MSG_RESULT([yes])
AC_MSG_CHECKING([if C-compiler supports ccache precompiled headers])
PUSHED_FLAGS="$CXXFLAGS"
CXXFLAGS="-fpch-preprocess $CXXFLAGS"
AC_TRY_COMPILE([], [], [CC_KNOWS_CCACHE_TRICK=yes], [CC_KNOWS_CCACHE_TRICK=no])
CXXFLAGS="$PUSHED_FLAGS"
if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no, disabling ccaching of precompiled headers])
CCACHE=
fi
fi
fi
if test "x$CCACHE" != x; then
CCACHE_SLOPPINESS=time_macros
CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
CCACHE_FLAGS=-fpch-preprocess
if test "x$SET_CCACHE_DIR" != x; then
mkdir -p $CCACHE_DIR > /dev/null 2>&1
chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
fi
fi
])
AC_DEFUN([EXTRACT_HOST_AND_BUILD_AND_LEGACY_VARS],
[
# Expects $host_os $host_cpu $build_os and $build_cpu
# and $with_data_model to have been setup!
#
# Translate the standard triplet(quadruplet) definition
# of the host/build system into
# HOST_OS=aix,bsd,hpux,linux,macosx,solaris,windows
# HOST_OS_FAMILY=bsd,gnu,sysv,win32,wince
# HOST_OS_API=posix,winapi
#
# HOST_CPU=ia32,x64,sparc,sparcv9,arm,arm64,ppc,ppc64
# HOST_CPU_ARCH=x86,sparc,pcc,arm
# HOST_CPU_BITS=32,64
# HOST_CPU_ENDIAN=big,little
#
# The same values are setup for BUILD_...
#
# And the legacy variables, for controlling the old makefiles.
# LEGACY_HOST_CPU1=i586,amd64,sparc,sparcv9,arm,arm64...
# LEGACY_HOST_CPU2=i386,amd64,sparc,sparcv9,arm,arm64...
# LEGACY_HOST_CPU3=sparcv9,amd64 (but only on solaris)
# LEGACY_HOST_OS_API=solaris,windows
#
# We also copy the autoconf trip/quadruplet
# verbatim to HOST and BUILD
AC_SUBST(HOST, ${host})
AC_SUBST(BUILD, ${build})
EXTRACT_VARS_FROM_OS_TO(HOST,$host_os)
EXTRACT_VARS_FROM_CPU_TO(HOST,$host_cpu)
EXTRACT_VARS_FROM_OS_TO(BUILD,$build_os)
EXTRACT_VARS_FROM_CPU_TO(BUILD,$build_cpu)
if test "x$HOST_OS" != xsolaris; then
LEGACY_HOST_CPU3=""
LEGACY_BUILD_CPU3=""
fi
])
AC_DEFUN([EXTRACT_VARS_FROM_OS_TO],
[
EXTRACT_VARS_FROM_OS($2)
$1_OS="$VAR_OS"
$1_OS_FAMILY="$VAR_OS_FAMILY"
$1_OS_API="$VAR_OS_API"
AC_SUBST($1_OS)
AC_SUBST($1_OS_FAMILY)
AC_SUBST($1_OS_API)
if test "x$$1_OS_API" = xposix; then
LEGACY_$1_OS_API="solaris"
fi
if test "x$$1_OS_API" = xwinapi; then
LEGACY_$1_OS_API="windows"
fi
AC_SUBST(LEGACY_$1_OS_API)
])
AC_DEFUN([EXTRACT_VARS_FROM_CPU_TO],
[
EXTRACT_VARS_FROM_CPU($2)
$1_CPU="$VAR_CPU"
$1_CPU_ARCH="$VAR_CPU_ARCH"
$1_CPU_BITS="$VAR_CPU_BITS"
$1_CPU_ENDIAN="$VAR_CPU_ENDIAN"
AC_SUBST($1_CPU)
AC_SUBST($1_CPU_ARCH)
AC_SUBST($1_CPU_BITS)
AC_SUBST($1_CPU_ENDIAN)
# Also store the legacy naming of the cpu.
# Ie i586 and amd64 instead of ia32 and x64
LEGACY_$1_CPU1="$VAR_LEGACY_CPU"
AC_SUBST(LEGACY_$1_CPU1)
# And the second legacy naming of the cpu.
# Ie i386 and amd64 instead of ia32 and x64.
LEGACY_$1_CPU2="$LEGACY_$1_CPU1"
if test "x$LEGACY_$1_CPU1" = xi586; then
LEGACY_$1_CPU2=i386
fi
AC_SUBST(LEGACY_$1_CPU2)
# And the third legacy naming of the cpu.
# Ie only amd64 or sparcv9, used for the ISA_DIR on Solaris.
LEGACY_$1_CPU3=""
if test "x$$1_CPU" = xx64; then
LEGACY_$1_CPU3=amd64
fi
if test "x$$1_CPU" = xsparcv9; then
LEGACY_$1_CPU3=sparvc9
fi
AC_SUBST(LEGACY_$1_CPU3)
])
AC_DEFUN([EXTRACT_VARS_FROM_CPU],
[
# First argument is the cpu name from the trip/quad
case "$1" in
x86_64)
VAR_CPU=x64
VAR_CPU_ARCH=x86
VAR_CPU_BITS=64
VAR_CPU_ENDIAN=little
VAR_LEGACY_CPU=amd64
;;
i?86)
VAR_CPU=ia32
VAR_CPU_ARCH=x86
VAR_CPU_BITS=32
VAR_CPU_ENDIAN=little
VAR_LEGACY_CPU=i586
;;
alpha*)
VAR_CPU=alpha
VAR_CPU_ARCH=alpha
VAR_CPU_BITS=64
VAR_CPU_ENDIAN=big
VAR_LEGACY_CPU=alpha
;;
arm*)
VAR_CPU=arm
VAR_CPU_ARCH=arm
VAR_CPU_BITS=3264
VAR_CPU_ENDIAN=big
VAR_LEGACY_CPU=arm
;;
mips)
VAR_CPU=mips
VAR_CPU_ARCH=mips
VAR_CPU_BITS=woot
VAR_CPU_ENDIAN=woot
VAR_LEGACY_CPU=mips
;;
mipsel)
VAR_CPU=mipsel
VAR_CPU_ARCH=mips
VAR_CPU_BITS=woot
VAR_CPU_ENDIAN=woot
VAR_LEGACY_CPU=mipsel
;;
powerpc)
VAR_CPU=ppc
VAR_CPU_ARCH=ppc
VAR_CPU_BITS=32
VAR_CPU_ENDIAN=big
VAR_LEGACY_CPU=ppc
;;
powerpc64)
VAR_CPU=ppc64
VAR_CPU_ARCH=ppc
VAR_CPU_BITS=64
VAR_CPU_ENDIAN=32
VAR_LEGACY_CPU=ppc64
;;
sparc)
VAR_CPU=sparc
VAR_CPU_ARCH=sparc
VAR_CPU_BITS=32
VAR_CPU_ENDIAN=big
VAR_LEGACY_CPU=sparc
;;
sparc64)
VAR_CPU=sparcv9
VAR_CPU_ARCH=sparc
VAR_CPU_BITS=64
VAR_CPU_ENDIAN=big
VAR_LEGACY_CPU=sparc_sparcv9
;;
s390)
VAR_CPU=s390
VAR_CPU_ARCH=s390
VAR_CPU_BITS=32
VAR_CPU_ENDIAN=woot
VAR_LEGACY_CPU=s390
VAR_LEGACY_CPU=s390
;;
s390x)
VAR_CPU=s390x
VAR_CPU_ARCH=s390
VAR_CPU_BITS=64
VAR_CPU_ENDIAN=woot
VAR_LEGACY_CPU=s390x
;;
*)
AC_ERROR([unsupported cpu $1])
;;
esac
# Workaround cygwin not knowing about 64 bit.
if test "x$VAR_OS" = "xwindows"; then
if test "x$PROCESSOR_IDENTIFIER" != "x"; then
PROC_ARCH=`echo $PROCESSOR_IDENTIFIER | $CUT -f1 -d' '`
case "$PROC_ARCH" in
intel64|Intel64|INTEL64|em64t|EM64T|amd64|AMD64|8664|x86_64)
VAR_CPU=x64
VAR_CPU_BITS=64
VAR_LEGACY_CPU=amd64
;;
esac
fi
fi
if test "x$VAR_CPU_ARCH" = "xx86"; then
if test "x$with_data_model" = "x64"; then
VAR_CPU=x64
VAR_CPU_BITS=64
VAR_LEGACY_CPU=amd64
fi
if test "x$with_data_model" = "x32"; then
VAR_CPU=ia32
VAR_CPU_BITS=32
VAR_LEGACY_CPU=i586
fi
fi
])
AC_DEFUN([EXTRACT_VARS_FROM_OS],
[
case "$1" in
*linux*)
VAR_OS=linux
VAR_OS_API=posix
VAR_OS_FAMILY=gnu
;;
*solaris*)
VAR_OS=solaris
VAR_OS_API=posix
VAR_OS_FAMILY=sysv
;;
*darwin*)
VAR_OS=macosx
VAR_OS_API=posix
VAR_OS_FAMILY=bsd
;;
*bsd*)
VAR_OS=bsd
VAR_OS_API=posix
VAR_OS_FAMILY=bsd
;;
*cygwin*|*windows*)
VAR_OS=windows
VAR_OS_API=winapi
VAR_OS_FAMILY=windows
;;
*)
AC_MSG_ERROR([unsupported host operating system $1])
;;
esac
])
AC_DEFUN([CHECK_COMPILER_VERSION],
[
# Test the compilers that their versions are new enough.
# AC_MSG_CHECKING([version of GCC])
gcc_ver=`${CC} -dumpversion`
gcc_major_ver=`echo ${gcc_ver}|cut -d'.' -f1`
gcc_minor_ver=`echo ${gcc_ver}|cut -d'.' -f2`
# AM_CONDITIONAL(GCC_OLD, test ! ${gcc_major_ver} -ge 4 -a ${gcc_minor_ver} -ge 3)
# AC_MSG_RESULT([${gcc_ver} (major version ${gcc_major_ver}, minor version ${gcc_minor_ver})])
])
# Fixes paths on windows hosts to be mixed mode short.
AC_DEFUN([WIN_FIX_PATH],
[
if test "x$BUILD_OS" = "xwindows"; then
AC_PATH_PROG(CYGPATH, cygpath)
tmp="[$]$1"
# Convert to C:/ mixed style path without spaces.
tmp=`$CYGPATH -s -m "$tmp"`
$1="$tmp"
fi
])
此差异已折叠。
#
# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
JDK_MAJOR_VERSION=1
JDK_MINOR_VERSION=8
JDK_MICRO_VERSION=0
JDK_UPDATE_VERSION=
JDK_BUILD_NUMBER=
MILESTONE=internal
LAUNCHER_NAME=openjdk
PRODUCT_NAME=OpenJDK
PRODUCT_SUFFIX="Runtime Environment"
JDK_RC_PLATFORM_NAME=Platform
COMPANY_NAME=N/A
#!/bin/bash
#
# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
# MANUAL
#
# ./common/bin/compareimages.sh old_jdk_image new_jdk_image
#
# Compare the directory structure.
# Compare the filenames in the directories.
# Compare the contents of the zip archives
# Compare the contents of the jar archives
# Compare the native libraries
# Compare the native executables
# Compare the remaining files
#
# ./common/bin/compareimages.sh old_jdk_image new_jdk_image [zips jars libs execs other]
#
# Compare only the selected subset of the images.
#
# ./common/bin/compareimages.sh old_jdk_image new_jdk_image CodePointIM.jar
#
# Compare only the CodePointIM.jar file
# Can be used to compare zips, libraries and executables.
#
if [ "x$1" = "x-h" ] || [ "x$1" = "x--help" ] || [ "x$1" == "x" ]; then
echo "./common/bin/compareimages.sh old_jdk_image new_jdk_image"
echo ""
echo "Compare the directory structure."
echo "Compare the filenames in the directories."
echo "Compare the contents of the zip archives"
echo "Compare the contents of the jar archives"
echo "Compare the native libraries"
echo "Compare the native executables"
echo "Compare the remaining files"
echo ""
echo "./common/bin/compareimages.sh old_jdk_image new_jdk_image [zips jars libs execs other]"
echo ""
echo "Compare only the selected subset of the images."
echo ""
echo "./common/bin/compareimages.sh old_jdk_image new_jdk_image CodePointIM.jar"
echo ""
echo "Compare only the CodePointIM.jar file"
echo "Can be used to compare zips, libraries and executables."
exit 10
fi
OLD="$1"
NEW="$2"
CMD="$3"
DIFF_RESULT=0
CMP_ZIPS=false
CMP_JARS=false
CMP_LIBS=false
CMP_EXECS=false
CMP_OTHER=false
FILTER="cat"
if [ -n "$CMD" ]; then
case "$CMD" in
zips)
CMP_ZIPS=true
;;
jars)
CMP_JARS=true
;;
libs)
CMP_LIBS=true
;;
execs)
CMP_EXECS=true
;;
other)
CMP_OTHER=true
;;
*)
CMP_ZIPS=true
CMP_JARS=true
CMP_LIBS=true
CMP_EXECS=true
CMP_OTHER=true
FILTER="grep $3"
;;
esac
else
CMP_ZIPS=true
CMP_JARS=true
CMP_LIBS=true
CMP_EXECS=true
CMP_OTHER=true
fi
DIFFJARZIP=`dirname $0`/diffjarzip.sh
DIFFLIB=`dirname $0`/difflib.sh
DIFFEXEC=`dirname $0`/diffexec.sh
export COMPARE_ROOT=/tmp/cimages
mkdir -p $COMPARE_ROOT
# Load the correct exception list.
case "`uname -s`" in
Linux)
. `dirname $0`/exception_list_linux
;;
esac
echo
echo Comparing $OLD to $NEW
echo
(cd $OLD && find . -type d | sort > $COMPARE_ROOT/from_dirs)
(cd $NEW && find . -type d | sort > $COMPARE_ROOT/to_dirs)
echo -n Directory structure...
if diff $COMPARE_ROOT/from_dirs $COMPARE_ROOT/to_dirs > /dev/null; then
echo Identical!
else
echo Differences found.
DIFF_RESULT=1
# Differences in directories found.
ONLY_OLD=$(diff $COMPARE_ROOT/from_dirs $COMPARE_ROOT/to_dirs | grep '<')
if [ "$ONLY_OLD" ]; then
echo Only in $OLD
echo $ONLY_OLD | sed 's|< ./|\t|g' | sed 's/ /\n/g'
fi
# Differences in directories found.
ONLY_NEW=$(diff $COMPARE_ROOT/from_dirs $COMPARE_ROOT/to_dirs | grep '>')
if [ "$ONLY_NEW" ]; then
echo Only in $NEW
echo $ONLY_NEW | sed 's|> ./|\t|g' | sed 's/ /\n/g'
fi
fi
(cd $OLD && find . -type f | sort > $COMPARE_ROOT/from_files)
(cd $NEW && find . -type f | sort > $COMPARE_ROOT/to_files)
echo -n File names...
if diff $COMPARE_ROOT/from_files $COMPARE_ROOT/to_files > /dev/null; then
echo Identical!
else
echo Differences found.
DIFF_RESULT=1
# Differences in directories found.
ONLY_OLD=$(diff $COMPARE_ROOT/from_files $COMPARE_ROOT/to_files | grep '<')
if [ "$ONLY_OLD" ]; then
echo Only in $OLD
echo $ONLY_OLD | sed 's|< ./|\t|g' | sed 's/ /\n/g'
fi
# Differences in directories found.
ONLY_NEW=$(diff $COMPARE_ROOT/from_files $COMPARE_ROOT/to_files | grep '>')
if [ "$ONLY_NEW" ]; then
echo Only in $NEW
echo $ONLY_NEW | sed 's|> ./|\t|g' | sed 's/ /\n/g'
fi
fi
if [ "x$CMP_ZIPS" == "xtrue" ]; then
ZIPS=$(cd $OLD && find . -type f -name "*.zip" | sort | $FILTER)
if [ -n "$ZIPS" ]; then
echo Zip files...
for f in $ZIPS
do
$DIFFJARZIP $OLD/$f $NEW/$f $OLD $NEW
if [ "$?" != "0" ]; then
DIFF_RESULT=1
fi
done
fi
fi
if [ "x$CMP_JARS" == "xtrue" ]; then
JARS=$(cd $OLD && find . -type f -name "*.jar" | sort | $FILTER)
if [ -n "$JARS" ]; then
echo Jar files...
for f in $JARS
do
DIFFJAR_OUTPUT=`$DIFFJARZIP $OLD/$f $NEW/$f $OLD $NEW`
DIFFJAR_RESULT=$?
if [ "$DIFFJAR_RESULT" != "0" ]; then
for diff in $LIST_DIFF_JAR; do
DIFFJAR_OUTPUT=`echo "$DIFFJAR_OUTPUT" | grep -v "$diff"`
done
if [ "`echo "$DIFFJAR_OUTPUT" | grep -v "Differing files in"`" != "" ]; then
DIFF_RESULT=1
echo "$DIFFJAR_OUTPUT"
fi
fi
done
fi
fi
if [ "x$FILTER" != "xcat" ]; then
VIEW=view
else
VIEW=
fi
if [ "x$CMP_LIBS" == "xtrue" ]; then
LIBS=$(cd $OLD && find . -name 'lib*.so' -o -name '*.dylib' -o -name '*.dll' | sort | $FILTER)
if [ -n "$LIBS" ]; then
echo Libraries...
for f in $LIBS
do
DIFFLIB_OUTPUT=`$DIFFLIB $OLD/$f $NEW/$f $OLD $NEW $VIEW`
DIFFLIB_RESULT=$?
if [ "$DIFFLIB_RESULT" = "0" ]; then
:
#echo "OK: $DIFFLIB_OUTPUT"
elif [ "$DIFFLIB_RESULT" = "2" ] && [[ "$LIST_DIFF_SIZE $LIST_DIFF_BYTE" == *"${f:2}"* ]]; then
:
#echo "OK: $DIFFLIB_OUTPUT"
elif [ "$DIFFLIB_RESULT" = "1" ] && [[ "$LIST_DIFF_BYTE" == *"${f:2}"* ]]; then
:
#echo "OK: $DIFFLIB_OUTPUT"
else
echo "$DIFFLIB_OUTPUT"
DIFF_RESULT=1
fi
done
fi
fi
if [ "x$CMP_EXECS" == "xtrue" ]; then
if [ $OSTYPE == "cygwin" ]; then
EXECS=$(cd $OLD && find . -type f -name '*.exe' | sort | $FILTER)
else
EXECS=$(cd $OLD && find . -type f -perm -100 \! \( -name '*.so' -o -name '*.dylib' -o -name '*.dll' \) | sort | $FILTER)
fi
if [ -n "$EXECS" ]; then
echo Executables...
for f in $EXECS
do
DIFFEXEC_OUTPUT=`$DIFFEXEC $OLD/$f $NEW/$f $OLD $NEW $VIEW`
DIFFEXEC_RESULT=$?
if [ "$DIFFEXEC_RESULT" = "0" ]; then
:
#echo "OK: $DIFFEXEC_OUTPUT"
elif [ "$DIFFEXEC_RESULT" = "2" ] && [[ "$LIST_DIFF_SIZE $LIST_DIFF_BYTE" == *"${f:2}"* ]]; then
:
#echo "OK: $DIFFEXEC_OUTPUT"
elif [ "$DIFFEXEC_RESULT" = "1" ] && [[ "$LIST_DIFF_BYTE" == *"${f:2}"* ]]; then
:
#echo "OK: $DIFFEXEC_OUTPUT"
else
echo "$DIFFEXEC_OUTPUT"
DIFF_RESULT=1
fi
done
fi
fi
exit $DIFF_RESULT
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
#
# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
# List of files inside jar archives that are ok if they differ.
LIST_DIFF_JAR="
/sun/misc/Version.class
/sun/tools/jconsole/Version.class
/com/sun/tools/javac/resources/version.class
/com/sun/tools/javah/resources/version.class
/com/sun/tools/javap/resources/version.class
"
# List of binaries that only need to match symbols
LIST_DIFF_SIZE="
jre/lib/amd64/libfontmanager.so
jre/lib/amd64/libjdwp.so
jre/lib/amd64/libt2k.so
bin/unpack200
jre/bin/unpack200
jre/lib/amd64/libjsig.debuginfo
jre/lib/amd64/libsaproc.debuginfo
jre/lib/amd64/server/libjvm.debuginfo
"
# List of binares that need to match both symbols and size
LIST_DIFF_BYTE="
jre/lib/amd64/libdt_socket.so
jre/lib/amd64/libattach.so
jre/lib/amd64/libjaas_unix.so
jre/lib/amd64/libjawt.so
jre/lib/amd64/libjpeg.so
jre/lib/amd64/libjsdt.so
jre/lib/amd64/libjsig.so
jre/lib/amd64/libsaproc.so
jre/lib/amd64/libsctp.so
jre/lib/amd64/libsunec.so
jre/lib/amd64/libunpack.so
jre/lib/amd64/libverify.so
jre/lib/amd64/libzip.so
jre/lib/amd64/server/libjsig.so
jre/lib/amd64/server/libjvm.so
jre/lib/amd64/liblcms.so
demo/jvmti/heapTracker/lib/libheapTracker.so
demo/jvmti/hprof/lib/libhprof.so
demo/jvmti/minst/lib/libminst.so
demo/jvmti/mtrace/lib/libmtrace.so
demo/jvmti/waiters/lib/libwaiters.so
bin/appletviewer
bin/extcheck
bin/idlj
bin/jar
bin/jarsigner
bin/java
bin/javac
bin/javadoc
bin/javah
bin/javap
bin/jcmd
bin/jconsole
bin/jdb
bin/jhat
bin/jinfo
bin/jmap
bin/jps
bin/jrunscript
bin/jsadebugd
bin/jstack
bin/jstat
bin/jstatd
bin/keytool
bin/native2ascii
bin/orbd
bin/pack200
bin/policytool
bin/rmic
bin/rmid
bin/rmiregistry
bin/schemagen
bin/serialver
bin/servertool
bin/tnameserv
bin/wsgen
bin/wsimport
bin/xjc
jre/bin/java
jre/bin/keytool
jre/bin/orbd
jre/bin/pack200
jre/bin/policytool
jre/bin/rmid
jre/bin/rmiregistry
jre/bin/servertool
jre/bin/tnameserv
"
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
\ No newline at end of file
$(subst com,X01,$(subst org,X02,$(subst sun,X03,$(subst java,X04,$(subst javax,X05,$(subst sun/io,X06,$(subst com/sun,X07,$(subst java/io,X08,$(subst org/omg,X09,$(subst org/w3c,X10,$(subst org/xml,X11,$(subst sun/awt,X12,$(subst sun/net,X13,$(subst sun/nio,X14,$(subst sun/rmi,X15,$(subst java/awt,X16,$(subst java/net,X17,$(subst java/nio,X18,$(subst java/rmi,X19,$(subst META-INF,X20,$(subst sun/font,X21,$(subst sun/misc,X22,$(subst sun/text,X23,$(subst sun/util,X24,$(subst java/lang,X25,$(subst java/math,X26,$(subst java/text,X27,$(subst java/util,X28,$(subst javax/jws,X29,$(subst javax/net,X30,$(subst javax/rmi,X31,$(subst javax/xml,X32,$(subst sun/corba,X33,$(subst sun/print,X34,$(subst sun/swing,X35,$(subst java/beans,X36,$(subst javax/lang,X37,$(subst sun/applet,X38,$(subst sun/java2d,X39,$(subst java/applet,X40,$(subst javax/print,X41,$(subst javax/sound,X42,$(subst javax/swing,X43,$(subst javax/tools,X44,$(subst jdk/classes,X45,$(subst org/relaxng,X46,$(subst sun/reflect,X47,$(subst javax/crypto,X48,$(subst javax/naming,X49,$(subst jaxp/classes,X50,$(subst sun/security,X51,$(subst corba/classes,X52,$(subst java/security,X53,$(subst javax/imageio,X54,$(subst jdk/btclasses,X55,$(subst javax/activity,X56,$(subst javax/security,X57,$(subst jdk/newclasses,X58,$(subst sun/instrument,X59,$(subst sun/management,X60,$(subst corba/btclasses,X61,$(subst jdk/democlasses,X62,$(subst javax/activation,X63,$(subst javax/annotation,X64,$(subst javax/management,X65,$(subst javax/transaction,X66,$(subst jaxws/jaf_classes,X67,$(subst langtools/classes,X68,$(subst META-INF/services,X69,$(subst jdk/newdemoclasses,X70,$(subst javax/accessibility,X71,$(subst jaxws/jaxws_classes,X72,
\ No newline at end of file
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册