./common/autoconf/generated-configure.sh

Print this page
rev 656 : [mq]: zero-newbuild


 600 #ifdef HAVE_UNISTD_H
 601 # include <unistd.h>
 602 #endif"
 603 
 604 ac_subst_vars='LTLIBOBJS
 605 LIBOBJS
 606 CCACHE
 607 USE_PRECOMPILED_HEADER
 608 SJAVAC_SERVER_DIR
 609 ENABLE_SJAVAC
 610 SJAVAC_SERVER_CORES
 611 SJAVAC_SERVER_JAVA
 612 JOBS
 613 MEMORY_SIZE
 614 NUM_CORES
 615 ENABLE_INTREE_EC
 616 SALIB_NAME
 617 HOTSPOT_MAKE_ARGS
 618 FIXPATH
 619 LIBCXX






 620 STATIC_CXX_SETTING
 621 LIBDL
 622 LIBM
 623 LIBZIP_CAN_USE_MMAP
 624 USE_EXTERNAL_LIBZ
 625 USE_EXTERNAL_LIBGIF
 626 USE_EXTERNAL_LIBJPEG
 627 ALSA_LIBS
 628 ALSA_CFLAGS
 629 FREETYPE2_LIB_PATH
 630 USING_SYSTEM_FT_LIB
 631 FREETYPE2_LIBS
 632 FREETYPE2_CFLAGS
 633 CUPS_CFLAGS
 634 OPENWIN_HOME
 635 X_EXTRA_LIBS
 636 X_LIBS
 637 X_PRE_LIBS
 638 X_CFLAGS
 639 XMKMF


 816 DEBUG_CLASSFILES
 817 FASTDEBUG
 818 VARIANT
 819 DEBUG_LEVEL
 820 MACOSX_UNIVERSAL
 821 JVM_VARIANT_ZEROSHARK
 822 JVM_VARIANT_ZERO
 823 JVM_VARIANT_KERNEL
 824 JVM_VARIANT_MINIMAL1
 825 JVM_VARIANT_CLIENT
 826 JVM_VARIANT_SERVER
 827 JVM_VARIANTS
 828 JDK_VARIANT
 829 SET_OPENJDK
 830 BUILD_LOG_WRAPPER
 831 BUILD_LOG_PREVIOUS
 832 BUILD_LOG
 833 SYS_ROOT
 834 PATH_SEP
 835 SRC_ROOT


 836 DEFINE_CROSS_COMPILE_ARCH
 837 LP64
 838 OPENJDK_TARGET_OS_API_DIR
 839 OPENJDK_TARGET_CPU_JLI_CFLAGS
 840 OPENJDK_TARGET_CPU_OSARCH
 841 OPENJDK_TARGET_CPU_ISADIR
 842 OPENJDK_TARGET_CPU_LIBDIR
 843 OPENJDK_TARGET_CPU_LEGACY_LIB
 844 OPENJDK_TARGET_CPU_LEGACY
 845 REQUIRED_OS_VERSION
 846 REQUIRED_OS_NAME
 847 COMPILE_TYPE
 848 OPENJDK_TARGET_CPU_ENDIAN
 849 OPENJDK_TARGET_CPU_BITS
 850 OPENJDK_TARGET_CPU_ARCH
 851 OPENJDK_TARGET_CPU
 852 OPENJDK_TARGET_OS_API
 853 OPENJDK_TARGET_OS
 854 OPENJDK_BUILD_CPU_ENDIAN
 855 OPENJDK_BUILD_CPU_BITS


1028       ac_precious_vars='build_alias
1029 host_alias
1030 target_alias
1031 PKG_CONFIG
1032 CC
1033 CFLAGS
1034 LDFLAGS
1035 LIBS
1036 CPPFLAGS
1037 CXX
1038 CXXFLAGS
1039 CCC
1040 OBJC
1041 OBJCFLAGS
1042 CPP
1043 CXXCPP
1044 XMKMF
1045 FREETYPE2_CFLAGS
1046 FREETYPE2_LIBS
1047 ALSA_CFLAGS
1048 ALSA_LIBS'


1049 
1050 
1051 # Initialize some variables set by options.
1052 ac_init_help=
1053 ac_init_version=false
1054 ac_unrecognized_opts=
1055 ac_unrecognized_sep=
1056 # The variables have the same names as the options, with
1057 # dashes changed to underlines.
1058 cache_file=/dev/null
1059 exec_prefix=NONE
1060 no_create=
1061 no_recursion=
1062 prefix=NONE
1063 program_prefix=NONE
1064 program_suffix=NONE
1065 program_transform_name=s,x,x,
1066 silent=
1067 site=
1068 srcdir=


1796   CC          C compiler command
1797   CFLAGS      C compiler flags
1798   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1799               nonstandard directory <lib dir>
1800   LIBS        libraries to pass to the linker, e.g. -l<library>
1801   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1802               you have headers in a nonstandard directory <include dir>
1803   CXX         C++ compiler command
1804   CXXFLAGS    C++ compiler flags
1805   OBJC        Objective C compiler command
1806   OBJCFLAGS   Objective C compiler flags
1807   CPP         C preprocessor
1808   CXXCPP      C++ preprocessor
1809   XMKMF       Path to xmkmf, Makefile generator for X Window System
1810   FREETYPE2_CFLAGS
1811               C compiler flags for FREETYPE2, overriding pkg-config
1812   FREETYPE2_LIBS
1813               linker flags for FREETYPE2, overriding pkg-config
1814   ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
1815   ALSA_LIBS   linker flags for ALSA, overriding pkg-config



1816 
1817 Use these variables to override the choices made by `configure' or to help
1818 it to find libraries and programs with nonstandard names/locations.
1819 
1820 Report bugs to <build-dev@openjdk.java.net>.
1821 OpenJDK home page: <http://openjdk.java.net>.
1822 _ACEOF
1823 ac_status=$?
1824 fi
1825 
1826 if test "$ac_init_help" = "recursive"; then
1827   # If there are subdirs, report their specific --help.
1828   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1829     test -d "$ac_dir" ||
1830       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1831       continue
1832     ac_builddir=.
1833 
1834 case "$ac_dir" in
1835 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;


3736 
3737 # Check if the VS env variables were setup prior to running configure.
3738 # If not, then find vcvarsall.bat and run it automatically, and integrate
3739 # the set env variables into the spec file.
3740 
3741 
3742 
3743 # Setup the DXSDK paths
3744 
3745 
3746 
3747 
3748 
3749 
3750 # This line needs to be here, verbatim, after all includes and the dummy hook
3751 # definitions. It is replaced with custom functionality when building
3752 # custom sources.
3753 #CUSTOM_AUTOCONF_INCLUDE
3754 
3755 # Do not change or remove the following line, it is needed for consistency checks:
3756 DATE_WHEN_GENERATED=1363706268
3757 
3758 ###############################################################################
3759 #
3760 # Initialization / Boot-strapping
3761 #
3762 # The bootstrapping process needs to solve the "chicken or the egg" problem,
3763 # thus it jumps back and forth, each time gaining something needed later on.
3764 #
3765 ###############################################################################
3766 
3767 # Basic initialization that must happen first of all
3768 
3769 # Save the original command line. This is passed to us by the wrapper configure script.
3770 
3771 DATE_WHEN_CONFIGURED=`LANG=C date`
3772 
3773 { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
3774 $as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
3775 { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
3776 $as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}


7071 
7072     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7073         A_LP64="LP64:="
7074         # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
7075         # unpack200.exe
7076         if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
7077             ADD_LP64="-D_LP64=1"
7078         fi
7079     fi
7080     LP64=$A_LP64
7081 
7082 
7083     if test "x$COMPILE_TYPE" = "xcross"; then
7084       # FIXME: ... or should this include reduced builds..?
7085       DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
7086     else
7087       DEFINE_CROSS_COMPILE_ARCH=""
7088     fi
7089 
7090 























7091 
7092 
7093 # Continue setting up basic stuff. Most remaining code require fundamental tools.
7094 
7095 # Locate the directory of this script.
7096 SCRIPT="$0"
7097 
7098     if test "x$OPENJDK_BUILD_OS" != xwindows; then
7099         # Follow a chain of symbolic links. Use readlink
7100         # where it exists, else fall back to horribly
7101         # complicated shell code.
7102         if test "x$READLINK_TESTED" != yes; then
7103             # On MacOSX there is a readlink tool with a different
7104             # purpose than the GNU readlink tool. Check the found readlink.
7105             ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
7106             if test "x$ISGNU" = x; then
7107                  # A readlink that we do not know how to use.
7108                  # Are there other non-GNU readlinks out there?
7109                  READLINK_TESTED=yes
7110                  READLINK=


31575 
31576     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
31577 $as_echo "$has_static_libstdcxx" >&6; }
31578 
31579     if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
31580         as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
31581     fi
31582 
31583     if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
31584         as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
31585     fi
31586 
31587     if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
31588         as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
31589     fi
31590 
31591     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
31592 $as_echo_n "checking how to link with libstdc++... " >&6; }
31593     # If dynamic was requested, it's available since it would fail above otherwise.
31594     # If dynamic wasn't requested, go with static unless it isn't available.
31595     if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno; then
31596         LIBCXX="$LIBCXX -lstdc++"
31597         LDCXX="$CXX"
31598         STATIC_CXX_SETTING="STATIC_CXX=false"
31599         { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
31600 $as_echo "dynamic" >&6; }
31601     else
31602         LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
31603         LDCXX="$CC"
31604         STATIC_CXX_SETTING="STATIC_CXX=true"
31605         { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
31606 $as_echo "static" >&6; }
31607     fi
31608 fi
31609 














































































































































































31610 
31611 # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
31612 if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
31613     LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
31614 fi
31615 
31616 # TODO better (platform agnostic) test
31617 if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
31618     LIBCXX="-lstdc++"
31619 fi
31620 
31621 
31622 
31623 
31624 
31625 # After we have toolchain and the paths to all libraries (needed by msys), we can compile the fixpath helper
31626 
31627 # When using cygwin or msys, we need a wrapper binary that renames
31628 # /cygdrive/c/ arguments into c:/ arguments and peeks into
31629 # @files and rewrites these too! This wrapper binary is




 600 #ifdef HAVE_UNISTD_H
 601 # include <unistd.h>
 602 #endif"
 603 
 604 ac_subst_vars='LTLIBOBJS
 605 LIBOBJS
 606 CCACHE
 607 USE_PRECOMPILED_HEADER
 608 SJAVAC_SERVER_DIR
 609 ENABLE_SJAVAC
 610 SJAVAC_SERVER_CORES
 611 SJAVAC_SERVER_JAVA
 612 JOBS
 613 MEMORY_SIZE
 614 NUM_CORES
 615 ENABLE_INTREE_EC
 616 SALIB_NAME
 617 HOTSPOT_MAKE_ARGS
 618 FIXPATH
 619 LIBCXX
 620 LLVM_LIBS
 621 LLVM_LDFLAGS
 622 LLVM_CFLAGS
 623 LLVM_CONFIG
 624 LIBFFI_LIBS
 625 LIBFFI_CFLAGS
 626 STATIC_CXX_SETTING
 627 LIBDL
 628 LIBM
 629 LIBZIP_CAN_USE_MMAP
 630 USE_EXTERNAL_LIBZ
 631 USE_EXTERNAL_LIBGIF
 632 USE_EXTERNAL_LIBJPEG
 633 ALSA_LIBS
 634 ALSA_CFLAGS
 635 FREETYPE2_LIB_PATH
 636 USING_SYSTEM_FT_LIB
 637 FREETYPE2_LIBS
 638 FREETYPE2_CFLAGS
 639 CUPS_CFLAGS
 640 OPENWIN_HOME
 641 X_EXTRA_LIBS
 642 X_LIBS
 643 X_PRE_LIBS
 644 X_CFLAGS
 645 XMKMF


 822 DEBUG_CLASSFILES
 823 FASTDEBUG
 824 VARIANT
 825 DEBUG_LEVEL
 826 MACOSX_UNIVERSAL
 827 JVM_VARIANT_ZEROSHARK
 828 JVM_VARIANT_ZERO
 829 JVM_VARIANT_KERNEL
 830 JVM_VARIANT_MINIMAL1
 831 JVM_VARIANT_CLIENT
 832 JVM_VARIANT_SERVER
 833 JVM_VARIANTS
 834 JDK_VARIANT
 835 SET_OPENJDK
 836 BUILD_LOG_WRAPPER
 837 BUILD_LOG_PREVIOUS
 838 BUILD_LOG
 839 SYS_ROOT
 840 PATH_SEP
 841 SRC_ROOT
 842 ZERO_ARCHDEF
 843 ZERO_ARCHFLAG
 844 DEFINE_CROSS_COMPILE_ARCH
 845 LP64
 846 OPENJDK_TARGET_OS_API_DIR
 847 OPENJDK_TARGET_CPU_JLI_CFLAGS
 848 OPENJDK_TARGET_CPU_OSARCH
 849 OPENJDK_TARGET_CPU_ISADIR
 850 OPENJDK_TARGET_CPU_LIBDIR
 851 OPENJDK_TARGET_CPU_LEGACY_LIB
 852 OPENJDK_TARGET_CPU_LEGACY
 853 REQUIRED_OS_VERSION
 854 REQUIRED_OS_NAME
 855 COMPILE_TYPE
 856 OPENJDK_TARGET_CPU_ENDIAN
 857 OPENJDK_TARGET_CPU_BITS
 858 OPENJDK_TARGET_CPU_ARCH
 859 OPENJDK_TARGET_CPU
 860 OPENJDK_TARGET_OS_API
 861 OPENJDK_TARGET_OS
 862 OPENJDK_BUILD_CPU_ENDIAN
 863 OPENJDK_BUILD_CPU_BITS


1036       ac_precious_vars='build_alias
1037 host_alias
1038 target_alias
1039 PKG_CONFIG
1040 CC
1041 CFLAGS
1042 LDFLAGS
1043 LIBS
1044 CPPFLAGS
1045 CXX
1046 CXXFLAGS
1047 CCC
1048 OBJC
1049 OBJCFLAGS
1050 CPP
1051 CXXCPP
1052 XMKMF
1053 FREETYPE2_CFLAGS
1054 FREETYPE2_LIBS
1055 ALSA_CFLAGS
1056 ALSA_LIBS
1057 LIBFFI_CFLAGS
1058 LIBFFI_LIBS'
1059 
1060 
1061 # Initialize some variables set by options.
1062 ac_init_help=
1063 ac_init_version=false
1064 ac_unrecognized_opts=
1065 ac_unrecognized_sep=
1066 # The variables have the same names as the options, with
1067 # dashes changed to underlines.
1068 cache_file=/dev/null
1069 exec_prefix=NONE
1070 no_create=
1071 no_recursion=
1072 prefix=NONE
1073 program_prefix=NONE
1074 program_suffix=NONE
1075 program_transform_name=s,x,x,
1076 silent=
1077 site=
1078 srcdir=


1806   CC          C compiler command
1807   CFLAGS      C compiler flags
1808   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1809               nonstandard directory <lib dir>
1810   LIBS        libraries to pass to the linker, e.g. -l<library>
1811   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1812               you have headers in a nonstandard directory <include dir>
1813   CXX         C++ compiler command
1814   CXXFLAGS    C++ compiler flags
1815   OBJC        Objective C compiler command
1816   OBJCFLAGS   Objective C compiler flags
1817   CPP         C preprocessor
1818   CXXCPP      C++ preprocessor
1819   XMKMF       Path to xmkmf, Makefile generator for X Window System
1820   FREETYPE2_CFLAGS
1821               C compiler flags for FREETYPE2, overriding pkg-config
1822   FREETYPE2_LIBS
1823               linker flags for FREETYPE2, overriding pkg-config
1824   ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
1825   ALSA_LIBS   linker flags for ALSA, overriding pkg-config
1826   LIBFFI_CFLAGS
1827               C compiler flags for LIBFFI, overriding pkg-config
1828   LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
1829 
1830 Use these variables to override the choices made by `configure' or to help
1831 it to find libraries and programs with nonstandard names/locations.
1832 
1833 Report bugs to <build-dev@openjdk.java.net>.
1834 OpenJDK home page: <http://openjdk.java.net>.
1835 _ACEOF
1836 ac_status=$?
1837 fi
1838 
1839 if test "$ac_init_help" = "recursive"; then
1840   # If there are subdirs, report their specific --help.
1841   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1842     test -d "$ac_dir" ||
1843       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1844       continue
1845     ac_builddir=.
1846 
1847 case "$ac_dir" in
1848 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;


3749 
3750 # Check if the VS env variables were setup prior to running configure.
3751 # If not, then find vcvarsall.bat and run it automatically, and integrate
3752 # the set env variables into the spec file.
3753 
3754 
3755 
3756 # Setup the DXSDK paths
3757 
3758 
3759 
3760 
3761 
3762 
3763 # This line needs to be here, verbatim, after all includes and the dummy hook
3764 # definitions. It is replaced with custom functionality when building
3765 # custom sources.
3766 #CUSTOM_AUTOCONF_INCLUDE
3767 
3768 # Do not change or remove the following line, it is needed for consistency checks:
3769 DATE_WHEN_GENERATED=1364406721
3770 
3771 ###############################################################################
3772 #
3773 # Initialization / Boot-strapping
3774 #
3775 # The bootstrapping process needs to solve the "chicken or the egg" problem,
3776 # thus it jumps back and forth, each time gaining something needed later on.
3777 #
3778 ###############################################################################
3779 
3780 # Basic initialization that must happen first of all
3781 
3782 # Save the original command line. This is passed to us by the wrapper configure script.
3783 
3784 DATE_WHEN_CONFIGURED=`LANG=C date`
3785 
3786 { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
3787 $as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
3788 { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
3789 $as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}


7084 
7085     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7086         A_LP64="LP64:="
7087         # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
7088         # unpack200.exe
7089         if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
7090             ADD_LP64="-D_LP64=1"
7091         fi
7092     fi
7093     LP64=$A_LP64
7094 
7095 
7096     if test "x$COMPILE_TYPE" = "xcross"; then
7097       # FIXME: ... or should this include reduced builds..?
7098       DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
7099     else
7100       DEFINE_CROSS_COMPILE_ARCH=""
7101     fi
7102 
7103 
7104     # Some Zero and Shark settings.
7105     # ZERO_ARCHFLAG tells the compiler which mode to build for
7106     case "${OPENJDK_TARGET_CPU}" in
7107       s390)
7108         ZERO_ARCHFLAG="-m31"
7109         ;;
7110       *)
7111         ZERO_ARCHFLAG="-m${OPENJDK_TARGET_CPU_BITS}"
7112     esac
7113 
7114 
7115     # ZERO_ARCHDEF is used to enable architecture-specific code
7116     case "${OPENJDK_TARGET_CPU}" in
7117       ppc*)    ZERO_ARCHDEF=PPC   ;;
7118       s390*)   ZERO_ARCHDEF=S390  ;;
7119       sparc*)  ZERO_ARCHDEF=SPARC ;;
7120       x86_64*) ZERO_ARCHDEF=AMD64 ;;
7121       x86)     ZERO_ARCHDEF=IA32  ;;
7122       *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
7123     esac
7124 
7125 
7126 
7127 
7128 
7129 # Continue setting up basic stuff. Most remaining code require fundamental tools.
7130 
7131 # Locate the directory of this script.
7132 SCRIPT="$0"
7133 
7134     if test "x$OPENJDK_BUILD_OS" != xwindows; then
7135         # Follow a chain of symbolic links. Use readlink
7136         # where it exists, else fall back to horribly
7137         # complicated shell code.
7138         if test "x$READLINK_TESTED" != yes; then
7139             # On MacOSX there is a readlink tool with a different
7140             # purpose than the GNU readlink tool. Check the found readlink.
7141             ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
7142             if test "x$ISGNU" = x; then
7143                  # A readlink that we do not know how to use.
7144                  # Are there other non-GNU readlinks out there?
7145                  READLINK_TESTED=yes
7146                  READLINK=


31611 
31612     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
31613 $as_echo "$has_static_libstdcxx" >&6; }
31614 
31615     if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
31616         as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
31617     fi
31618 
31619     if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
31620         as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
31621     fi
31622 
31623     if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
31624         as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
31625     fi
31626 
31627     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
31628 $as_echo_n "checking how to link with libstdc++... " >&6; }
31629     # If dynamic was requested, it's available since it would fail above otherwise.
31630     # If dynamic wasn't requested, go with static unless it isn't available.
31631     if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
31632         LIBCXX="$LIBCXX -lstdc++"
31633         LDCXX="$CXX"
31634         STATIC_CXX_SETTING="STATIC_CXX=false"
31635         { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
31636 $as_echo "dynamic" >&6; }
31637     else
31638         LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
31639         LDCXX="$CC"
31640         STATIC_CXX_SETTING="STATIC_CXX=true"
31641         { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
31642 $as_echo "static" >&6; }
31643     fi
31644 fi
31645 
31646 
31647 if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
31648     # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
31649 
31650 pkg_failed=no
31651 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
31652 $as_echo_n "checking for LIBFFI... " >&6; }
31653 
31654 if test -n "$LIBFFI_CFLAGS"; then
31655     pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
31656  elif test -n "$PKG_CONFIG"; then
31657     if test -n "$PKG_CONFIG" && \
31658     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
31659   ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
31660   ac_status=$?
31661   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31662   test $ac_status = 0; }; then
31663   pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
31664 else
31665   pkg_failed=yes
31666 fi
31667  else
31668     pkg_failed=untried
31669 fi
31670 if test -n "$LIBFFI_LIBS"; then
31671     pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
31672  elif test -n "$PKG_CONFIG"; then
31673     if test -n "$PKG_CONFIG" && \
31674     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
31675   ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
31676   ac_status=$?
31677   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31678   test $ac_status = 0; }; then
31679   pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
31680 else
31681   pkg_failed=yes
31682 fi
31683  else
31684     pkg_failed=untried
31685 fi
31686 
31687 
31688 
31689 if test $pkg_failed = yes; then
31690 
31691 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
31692         _pkg_short_errors_supported=yes
31693 else
31694         _pkg_short_errors_supported=no
31695 fi
31696         if test $_pkg_short_errors_supported = yes; then
31697                 LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
31698         else
31699                 LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
31700         fi
31701         # Put the nasty error message in config.log where it belongs
31702         echo "$LIBFFI_PKG_ERRORS" >&5
31703 
31704         as_fn_error $? "Package requirements (libffi) were not met:
31705 
31706 $LIBFFI_PKG_ERRORS
31707 
31708 Consider adjusting the PKG_CONFIG_PATH environment variable if you
31709 installed software in a non-standard prefix.
31710 
31711 Alternatively, you may set the environment variables LIBFFI_CFLAGS
31712 and LIBFFI_LIBS to avoid the need to call pkg-config.
31713 See the pkg-config man page for more details.
31714 " "$LINENO" 5
31715 elif test $pkg_failed = untried; then
31716         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
31717 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
31718 as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
31719 is in your PATH or set the PKG_CONFIG environment variable to the full
31720 path to pkg-config.
31721 
31722 Alternatively, you may set the environment variables LIBFFI_CFLAGS
31723 and LIBFFI_LIBS to avoid the need to call pkg-config.
31724 See the pkg-config man page for more details.
31725 
31726 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
31727 See \`config.log' for more details" "$LINENO" 5; }
31728 else
31729         LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
31730         LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
31731         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31732 $as_echo "yes" >&6; }
31733         :
31734 fi
31735 
31736 fi
31737 
31738 if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
31739     # Extract the first word of "llvm-config", so it can be a program name with args.
31740 set dummy llvm-config; ac_word=$2
31741 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31742 $as_echo_n "checking for $ac_word... " >&6; }
31743 if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
31744   $as_echo_n "(cached) " >&6
31745 else
31746   if test -n "$LLVM_CONFIG"; then
31747   ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
31748 else
31749 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31750 for as_dir in $PATH
31751 do
31752   IFS=$as_save_IFS
31753   test -z "$as_dir" && as_dir=.
31754     for ac_exec_ext in '' $ac_executable_extensions; do
31755   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
31756     ac_cv_prog_LLVM_CONFIG="llvm-config"
31757     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31758     break 2
31759   fi
31760 done
31761   done
31762 IFS=$as_save_IFS
31763 
31764 fi
31765 fi
31766 LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
31767 if test -n "$LLVM_CONFIG"; then
31768   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
31769 $as_echo "$LLVM_CONFIG" >&6; }
31770 else
31771   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31772 $as_echo "no" >&6; }
31773 fi
31774 
31775 
31776 
31777     if test "x$LLVM_CONFIG" != xllvm-config; then
31778         as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
31779     fi
31780 
31781     llvm_components="jit mcjit engine nativecodegen native"
31782     unset LLVM_CFLAGS
31783     for flag in $("$LLVM_CONFIG" --cxxflags); do
31784       if echo "${flag}" | grep -q '^-[ID]'; then
31785         if test "${flag}" != "-D_DEBUG" ; then
31786           if test "${LLVM_CFLAGS}" != "" ; then
31787             LLVM_CFLAGS="${LLVM_CFLAGS} "
31788           fi
31789           LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
31790         fi
31791       fi
31792     done
31793     llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
31794     LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
31795 
31796     unset LLVM_LDFLAGS
31797     for flag in $("${LLVM_CONFIG}" --ldflags); do
31798       if echo "${flag}" | grep -q '^-L'; then
31799         if test "${LLVM_LDFLAGS}" != ""; then
31800           LLVM_LDFLAGS="${LLVM_LDFLAGS} "
31801         fi
31802         LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
31803       fi
31804     done
31805 
31806     unset LLVM_LIBS
31807     for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
31808       if echo "${flag}" | grep -q '^-l'; then
31809         if test "${LLVM_LIBS}" != ""; then
31810           LLVM_LIBS="${LLVM_LIBS} "
31811         fi
31812         LLVM_LIBS="${LLVM_LIBS}${flag}"
31813       fi
31814     done
31815 
31816 
31817 
31818 
31819 fi
31820 
31821 # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
31822 if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
31823     LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
31824 fi
31825 
31826 # TODO better (platform agnostic) test
31827 if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
31828     LIBCXX="-lstdc++"
31829 fi
31830 
31831 
31832 
31833 
31834 
31835 # After we have toolchain and the paths to all libraries (needed by msys), we can compile the fixpath helper
31836 
31837 # When using cygwin or msys, we need a wrapper binary that renames
31838 # /cygdrive/c/ arguments into c:/ arguments and peeks into
31839 # @files and rewrites these too! This wrapper binary is