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
801 OTOOL
802 LDD
803 ZIP
804 UNZIP
805 FIND_DELETE
806 MAKE
807 CHECK_TOOLSDIR_MAKE
808 CHECK_TOOLSDIR_GMAKE
809 CHECK_MAKE
810 CHECK_GMAKE
811 PKGHANDLER
812 OUTPUT_ROOT
813 CONF_NAME
814 SPEC
815 BUILD_VARIANT_RELEASE
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
1029 ac_precious_vars='build_alias
1030 host_alias
1031 target_alias
1032 PKG_CONFIG
1033 CC
1034 CFLAGS
1035 LDFLAGS
1036 LIBS
1037 CPPFLAGS
1038 CXX
1039 CXXFLAGS
1040 CCC
1041 OBJC
1042 OBJCFLAGS
1043 CPP
1044 CXXCPP
1045 XMKMF
1046 FREETYPE2_CFLAGS
1047 FREETYPE2_LIBS
1048 ALSA_CFLAGS
1049 ALSA_LIBS'
1050
1051
1052 # Initialize some variables set by options.
1053 ac_init_help=
1054 ac_init_version=false
1055 ac_unrecognized_opts=
1056 ac_unrecognized_sep=
1057 # The variables have the same names as the options, with
1058 # dashes changed to underlines.
1059 cache_file=/dev/null
1060 exec_prefix=NONE
1061 no_create=
1062 no_recursion=
1063 prefix=NONE
1064 program_prefix=NONE
1065 program_suffix=NONE
1066 program_transform_name=s,x,x,
1067 silent=
1068 site=
1069 srcdir=
1799 CC C compiler command
1800 CFLAGS C compiler flags
1801 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1802 nonstandard directory <lib dir>
1803 LIBS libraries to pass to the linker, e.g. -l<library>
1804 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1805 you have headers in a nonstandard directory <include dir>
1806 CXX C++ compiler command
1807 CXXFLAGS C++ compiler flags
1808 OBJC Objective C compiler command
1809 OBJCFLAGS Objective C compiler flags
1810 CPP C preprocessor
1811 CXXCPP C++ preprocessor
1812 XMKMF Path to xmkmf, Makefile generator for X Window System
1813 FREETYPE2_CFLAGS
1814 C compiler flags for FREETYPE2, overriding pkg-config
1815 FREETYPE2_LIBS
1816 linker flags for FREETYPE2, overriding pkg-config
1817 ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
1818 ALSA_LIBS linker flags for ALSA, overriding pkg-config
1819
1820 Use these variables to override the choices made by `configure' or to help
1821 it to find libraries and programs with nonstandard names/locations.
1822
1823 Report bugs to <build-dev@openjdk.java.net>.
1824 OpenJDK home page: <http://openjdk.java.net>.
1825 _ACEOF
1826 ac_status=$?
1827 fi
1828
1829 if test "$ac_init_help" = "recursive"; then
1830 # If there are subdirs, report their specific --help.
1831 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1832 test -d "$ac_dir" ||
1833 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1834 continue
1835 ac_builddir=.
1836
1837 case "$ac_dir" in
1838 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
7074
7075 if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7076 A_LP64="LP64:="
7077 # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
7078 # unpack200.exe
7079 if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
7080 ADD_LP64="-D_LP64=1"
7081 fi
7082 fi
7083 LP64=$A_LP64
7084
7085
7086 if test "x$COMPILE_TYPE" = "xcross"; then
7087 # FIXME: ... or should this include reduced builds..?
7088 DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
7089 else
7090 DEFINE_CROSS_COMPILE_ARCH=""
7091 fi
7092
7093
7094
7095
7096 # Continue setting up basic stuff. Most remaining code require fundamental tools.
7097
7098 # Locate the directory of this script.
7099 SCRIPT="$0"
7100
7101 if test "x$OPENJDK_BUILD_OS" != xwindows; then
7102 # Follow a chain of symbolic links. Use readlink
7103 # where it exists, else fall back to horribly
7104 # complicated shell code.
7105 if test "x$READLINK_TESTED" != yes; then
7106 # On MacOSX there is a readlink tool with a different
7107 # purpose than the GNU readlink tool. Check the found readlink.
7108 ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
7109 if test "x$ISGNU" = x; then
7110 # A readlink that we do not know how to use.
7111 # Are there other non-GNU readlinks out there?
7112 READLINK_TESTED=yes
7113 READLINK=
7684 fi
7685 fi
7686
7687 # Replace the commas with AND for use in the build directory name.
7688 ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/'`
7689 COUNT_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,/1/' -e 's/client,/1/' -e 's/minimal1,/1/' -e 's/kernel,/1/' -e 's/zero,/1/' -e 's/zeroshark,/1/'`
7690 if test "x$COUNT_VARIANTS" != "x,1"; then
7691 BUILDING_MULTIPLE_JVM_VARIANTS=yes
7692 else
7693 BUILDING_MULTIPLE_JVM_VARIANTS=no
7694 fi
7695
7696
7697
7698
7699
7700
7701
7702
7703
7704 if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7705 MACOSX_UNIVERSAL="true"
7706 fi
7707
7708
7709
7710
7711
7712 ###############################################################################
7713 #
7714 # Set the debug level
7715 # release: no debug information, all optimizations, no asserts.
7716 # fastdebug: debug information (-g), all optimizations, all asserts
7717 # slowdebug: debug information (-g), no optimizations, all asserts
7718 #
7719 DEBUG_LEVEL="release"
7720 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
7721 $as_echo_n "checking which debug level to use... " >&6; }
7722 # Check whether --enable-debug was given.
7723 if test "${enable_debug+set}" = set; then :
31621
31622 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
31623 $as_echo "$has_static_libstdcxx" >&6; }
31624
31625 if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
31626 as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
31627 fi
31628
31629 if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
31630 as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
31631 fi
31632
31633 if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
31634 as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
31635 fi
31636
31637 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
31638 $as_echo_n "checking how to link with libstdc++... " >&6; }
31639 # If dynamic was requested, it's available since it would fail above otherwise.
31640 # If dynamic wasn't requested, go with static unless it isn't available.
31641 if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno; then
31642 LIBCXX="$LIBCXX -lstdc++"
31643 LDCXX="$CXX"
31644 STATIC_CXX_SETTING="STATIC_CXX=false"
31645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
31646 $as_echo "dynamic" >&6; }
31647 else
31648 LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
31649 LDCXX="$CC"
31650 STATIC_CXX_SETTING="STATIC_CXX=true"
31651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
31652 $as_echo "static" >&6; }
31653 fi
31654 fi
31655
31656
31657 # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
31658 if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
31659 LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
31660 fi
31661
31662 # TODO better (platform agnostic) test
31663 if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
31664 LIBCXX="-lstdc++"
31665 fi
31666
31667
31668
31669
31670
31671 # After we have toolchain and the paths to all libraries (needed by msys), we can compile the fixpath helper
31672
31673 # When using cygwin or msys, we need a wrapper binary that renames
31674 # /cygdrive/c/ arguments into c:/ arguments and peeks into
31675 # @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
807 OTOOL
808 LDD
809 ZIP
810 UNZIP
811 FIND_DELETE
812 MAKE
813 CHECK_TOOLSDIR_MAKE
814 CHECK_TOOLSDIR_GMAKE
815 CHECK_MAKE
816 CHECK_GMAKE
817 PKGHANDLER
818 OUTPUT_ROOT
819 CONF_NAME
820 SPEC
821 BUILD_VARIANT_RELEASE
822 DEBUG_CLASSFILES
823 FASTDEBUG
824 VARIANT
825 DEBUG_LEVEL
826 MACOSX_UNIVERSAL
827 INCLUDE_SA
828 JVM_VARIANT_ZEROSHARK
829 JVM_VARIANT_ZERO
830 JVM_VARIANT_KERNEL
831 JVM_VARIANT_MINIMAL1
832 JVM_VARIANT_CLIENT
833 JVM_VARIANT_SERVER
834 JVM_VARIANTS
835 JDK_VARIANT
836 SET_OPENJDK
837 BUILD_LOG_WRAPPER
838 BUILD_LOG_PREVIOUS
839 BUILD_LOG
840 SYS_ROOT
841 PATH_SEP
842 SRC_ROOT
843 ZERO_ARCHDEF
844 ZERO_ARCHFLAG
845 DEFINE_CROSS_COMPILE_ARCH
846 LP64
847 OPENJDK_TARGET_OS_API_DIR
848 OPENJDK_TARGET_CPU_JLI_CFLAGS
849 OPENJDK_TARGET_CPU_OSARCH
850 OPENJDK_TARGET_CPU_ISADIR
851 OPENJDK_TARGET_CPU_LIBDIR
852 OPENJDK_TARGET_CPU_LEGACY_LIB
853 OPENJDK_TARGET_CPU_LEGACY
854 REQUIRED_OS_VERSION
855 REQUIRED_OS_NAME
856 COMPILE_TYPE
857 OPENJDK_TARGET_CPU_ENDIAN
858 OPENJDK_TARGET_CPU_BITS
859 OPENJDK_TARGET_CPU_ARCH
860 OPENJDK_TARGET_CPU
861 OPENJDK_TARGET_OS_API
862 OPENJDK_TARGET_OS
863 OPENJDK_BUILD_CPU_ENDIAN
864 OPENJDK_BUILD_CPU_BITS
1038 ac_precious_vars='build_alias
1039 host_alias
1040 target_alias
1041 PKG_CONFIG
1042 CC
1043 CFLAGS
1044 LDFLAGS
1045 LIBS
1046 CPPFLAGS
1047 CXX
1048 CXXFLAGS
1049 CCC
1050 OBJC
1051 OBJCFLAGS
1052 CPP
1053 CXXCPP
1054 XMKMF
1055 FREETYPE2_CFLAGS
1056 FREETYPE2_LIBS
1057 ALSA_CFLAGS
1058 ALSA_LIBS
1059 LIBFFI_CFLAGS
1060 LIBFFI_LIBS'
1061
1062
1063 # Initialize some variables set by options.
1064 ac_init_help=
1065 ac_init_version=false
1066 ac_unrecognized_opts=
1067 ac_unrecognized_sep=
1068 # The variables have the same names as the options, with
1069 # dashes changed to underlines.
1070 cache_file=/dev/null
1071 exec_prefix=NONE
1072 no_create=
1073 no_recursion=
1074 prefix=NONE
1075 program_prefix=NONE
1076 program_suffix=NONE
1077 program_transform_name=s,x,x,
1078 silent=
1079 site=
1080 srcdir=
1810 CC C compiler command
1811 CFLAGS C compiler flags
1812 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1813 nonstandard directory <lib dir>
1814 LIBS libraries to pass to the linker, e.g. -l<library>
1815 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1816 you have headers in a nonstandard directory <include dir>
1817 CXX C++ compiler command
1818 CXXFLAGS C++ compiler flags
1819 OBJC Objective C compiler command
1820 OBJCFLAGS Objective C compiler flags
1821 CPP C preprocessor
1822 CXXCPP C++ preprocessor
1823 XMKMF Path to xmkmf, Makefile generator for X Window System
1824 FREETYPE2_CFLAGS
1825 C compiler flags for FREETYPE2, overriding pkg-config
1826 FREETYPE2_LIBS
1827 linker flags for FREETYPE2, overriding pkg-config
1828 ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
1829 ALSA_LIBS linker flags for ALSA, overriding pkg-config
1830 LIBFFI_CFLAGS
1831 C compiler flags for LIBFFI, overriding pkg-config
1832 LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
1833
1834 Use these variables to override the choices made by `configure' or to help
1835 it to find libraries and programs with nonstandard names/locations.
1836
1837 Report bugs to <build-dev@openjdk.java.net>.
1838 OpenJDK home page: <http://openjdk.java.net>.
1839 _ACEOF
1840 ac_status=$?
1841 fi
1842
1843 if test "$ac_init_help" = "recursive"; then
1844 # If there are subdirs, report their specific --help.
1845 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1846 test -d "$ac_dir" ||
1847 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1848 continue
1849 ac_builddir=.
1850
1851 case "$ac_dir" in
1852 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
7088
7089 if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
7090 A_LP64="LP64:="
7091 # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
7092 # unpack200.exe
7093 if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
7094 ADD_LP64="-D_LP64=1"
7095 fi
7096 fi
7097 LP64=$A_LP64
7098
7099
7100 if test "x$COMPILE_TYPE" = "xcross"; then
7101 # FIXME: ... or should this include reduced builds..?
7102 DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
7103 else
7104 DEFINE_CROSS_COMPILE_ARCH=""
7105 fi
7106
7107
7108 # Some Zero and Shark settings.
7109 # ZERO_ARCHFLAG tells the compiler which mode to build for
7110 case "${OPENJDK_TARGET_CPU}" in
7111 s390)
7112 ZERO_ARCHFLAG="-m31"
7113 ;;
7114 *)
7115 ZERO_ARCHFLAG="-m${OPENJDK_TARGET_CPU_BITS}"
7116 esac
7117
7118
7119 # ZERO_ARCHDEF is used to enable architecture-specific code
7120 case "${OPENJDK_TARGET_CPU}" in
7121 ppc*) ZERO_ARCHDEF=PPC ;;
7122 s390*) ZERO_ARCHDEF=S390 ;;
7123 sparc*) ZERO_ARCHDEF=SPARC ;;
7124 x86_64*) ZERO_ARCHDEF=AMD64 ;;
7125 x86) ZERO_ARCHDEF=IA32 ;;
7126 *) ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
7127 esac
7128
7129
7130
7131
7132
7133 # Continue setting up basic stuff. Most remaining code require fundamental tools.
7134
7135 # Locate the directory of this script.
7136 SCRIPT="$0"
7137
7138 if test "x$OPENJDK_BUILD_OS" != xwindows; then
7139 # Follow a chain of symbolic links. Use readlink
7140 # where it exists, else fall back to horribly
7141 # complicated shell code.
7142 if test "x$READLINK_TESTED" != yes; then
7143 # On MacOSX there is a readlink tool with a different
7144 # purpose than the GNU readlink tool. Check the found readlink.
7145 ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
7146 if test "x$ISGNU" = x; then
7147 # A readlink that we do not know how to use.
7148 # Are there other non-GNU readlinks out there?
7149 READLINK_TESTED=yes
7150 READLINK=
7721 fi
7722 fi
7723
7724 # Replace the commas with AND for use in the build directory name.
7725 ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/'`
7726 COUNT_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/server,/1/' -e 's/client,/1/' -e 's/minimal1,/1/' -e 's/kernel,/1/' -e 's/zero,/1/' -e 's/zeroshark,/1/'`
7727 if test "x$COUNT_VARIANTS" != "x,1"; then
7728 BUILDING_MULTIPLE_JVM_VARIANTS=yes
7729 else
7730 BUILDING_MULTIPLE_JVM_VARIANTS=no
7731 fi
7732
7733
7734
7735
7736
7737
7738
7739
7740
7741 INCLUDE_SA=true
7742 if test "x$JVM_VARIANT_ZERO" = xtrue ; then
7743 INCLUDE_SA=false
7744 fi
7745 if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
7746 INCLUDE_SA=false
7747 fi
7748
7749
7750 if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
7751 MACOSX_UNIVERSAL="true"
7752 fi
7753
7754
7755
7756
7757
7758 ###############################################################################
7759 #
7760 # Set the debug level
7761 # release: no debug information, all optimizations, no asserts.
7762 # fastdebug: debug information (-g), all optimizations, all asserts
7763 # slowdebug: debug information (-g), no optimizations, all asserts
7764 #
7765 DEBUG_LEVEL="release"
7766 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
7767 $as_echo_n "checking which debug level to use... " >&6; }
7768 # Check whether --enable-debug was given.
7769 if test "${enable_debug+set}" = set; then :
31667
31668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
31669 $as_echo "$has_static_libstdcxx" >&6; }
31670
31671 if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
31672 as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
31673 fi
31674
31675 if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
31676 as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
31677 fi
31678
31679 if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
31680 as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
31681 fi
31682
31683 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
31684 $as_echo_n "checking how to link with libstdc++... " >&6; }
31685 # If dynamic was requested, it's available since it would fail above otherwise.
31686 # If dynamic wasn't requested, go with static unless it isn't available.
31687 if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
31688 LIBCXX="$LIBCXX -lstdc++"
31689 LDCXX="$CXX"
31690 STATIC_CXX_SETTING="STATIC_CXX=false"
31691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
31692 $as_echo "dynamic" >&6; }
31693 else
31694 LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
31695 LDCXX="$CC"
31696 STATIC_CXX_SETTING="STATIC_CXX=true"
31697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
31698 $as_echo "static" >&6; }
31699 fi
31700 fi
31701
31702
31703 if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
31704 # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
31705
31706 pkg_failed=no
31707 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
31708 $as_echo_n "checking for LIBFFI... " >&6; }
31709
31710 if test -n "$LIBFFI_CFLAGS"; then
31711 pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
31712 elif test -n "$PKG_CONFIG"; then
31713 if test -n "$PKG_CONFIG" && \
31714 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
31715 ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
31716 ac_status=$?
31717 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31718 test $ac_status = 0; }; then
31719 pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
31720 else
31721 pkg_failed=yes
31722 fi
31723 else
31724 pkg_failed=untried
31725 fi
31726 if test -n "$LIBFFI_LIBS"; then
31727 pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
31728 elif test -n "$PKG_CONFIG"; then
31729 if test -n "$PKG_CONFIG" && \
31730 { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
31731 ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
31732 ac_status=$?
31733 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31734 test $ac_status = 0; }; then
31735 pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
31736 else
31737 pkg_failed=yes
31738 fi
31739 else
31740 pkg_failed=untried
31741 fi
31742
31743
31744
31745 if test $pkg_failed = yes; then
31746
31747 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
31748 _pkg_short_errors_supported=yes
31749 else
31750 _pkg_short_errors_supported=no
31751 fi
31752 if test $_pkg_short_errors_supported = yes; then
31753 LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
31754 else
31755 LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
31756 fi
31757 # Put the nasty error message in config.log where it belongs
31758 echo "$LIBFFI_PKG_ERRORS" >&5
31759
31760 as_fn_error $? "Package requirements (libffi) were not met:
31761
31762 $LIBFFI_PKG_ERRORS
31763
31764 Consider adjusting the PKG_CONFIG_PATH environment variable if you
31765 installed software in a non-standard prefix.
31766
31767 Alternatively, you may set the environment variables LIBFFI_CFLAGS
31768 and LIBFFI_LIBS to avoid the need to call pkg-config.
31769 See the pkg-config man page for more details.
31770 " "$LINENO" 5
31771 elif test $pkg_failed = untried; then
31772 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
31773 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
31774 as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it
31775 is in your PATH or set the PKG_CONFIG environment variable to the full
31776 path to pkg-config.
31777
31778 Alternatively, you may set the environment variables LIBFFI_CFLAGS
31779 and LIBFFI_LIBS to avoid the need to call pkg-config.
31780 See the pkg-config man page for more details.
31781
31782 To get pkg-config, see <http://pkg-config.freedesktop.org/>.
31783 See \`config.log' for more details" "$LINENO" 5; }
31784 else
31785 LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
31786 LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
31787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31788 $as_echo "yes" >&6; }
31789 :
31790 fi
31791
31792 fi
31793
31794 if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
31795 # Extract the first word of "llvm-config", so it can be a program name with args.
31796 set dummy llvm-config; ac_word=$2
31797 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31798 $as_echo_n "checking for $ac_word... " >&6; }
31799 if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
31800 $as_echo_n "(cached) " >&6
31801 else
31802 if test -n "$LLVM_CONFIG"; then
31803 ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
31804 else
31805 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31806 for as_dir in $PATH
31807 do
31808 IFS=$as_save_IFS
31809 test -z "$as_dir" && as_dir=.
31810 for ac_exec_ext in '' $ac_executable_extensions; do
31811 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
31812 ac_cv_prog_LLVM_CONFIG="llvm-config"
31813 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31814 break 2
31815 fi
31816 done
31817 done
31818 IFS=$as_save_IFS
31819
31820 fi
31821 fi
31822 LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
31823 if test -n "$LLVM_CONFIG"; then
31824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
31825 $as_echo "$LLVM_CONFIG" >&6; }
31826 else
31827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31828 $as_echo "no" >&6; }
31829 fi
31830
31831
31832
31833 if test "x$LLVM_CONFIG" != xllvm-config; then
31834 as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
31835 fi
31836
31837 llvm_components="jit mcjit engine nativecodegen native"
31838 unset LLVM_CFLAGS
31839 for flag in $("$LLVM_CONFIG" --cxxflags); do
31840 if echo "${flag}" | grep -q '^-[ID]'; then
31841 if test "${flag}" != "-D_DEBUG" ; then
31842 if test "${LLVM_CFLAGS}" != "" ; then
31843 LLVM_CFLAGS="${LLVM_CFLAGS} "
31844 fi
31845 LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
31846 fi
31847 fi
31848 done
31849 llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
31850 LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
31851
31852 unset LLVM_LDFLAGS
31853 for flag in $("${LLVM_CONFIG}" --ldflags); do
31854 if echo "${flag}" | grep -q '^-L'; then
31855 if test "${LLVM_LDFLAGS}" != ""; then
31856 LLVM_LDFLAGS="${LLVM_LDFLAGS} "
31857 fi
31858 LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
31859 fi
31860 done
31861
31862 unset LLVM_LIBS
31863 for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
31864 if echo "${flag}" | grep -q '^-l'; then
31865 if test "${LLVM_LIBS}" != ""; then
31866 LLVM_LIBS="${LLVM_LIBS} "
31867 fi
31868 LLVM_LIBS="${LLVM_LIBS}${flag}"
31869 fi
31870 done
31871
31872
31873
31874
31875 fi
31876
31877 # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
31878 if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
31879 LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
31880 fi
31881
31882 # TODO better (platform agnostic) test
31883 if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
31884 LIBCXX="-lstdc++"
31885 fi
31886
31887
31888
31889
31890
31891 # After we have toolchain and the paths to all libraries (needed by msys), we can compile the fixpath helper
31892
31893 # When using cygwin or msys, we need a wrapper binary that renames
31894 # /cygdrive/c/ arguments into c:/ arguments and peeks into
31895 # @files and rewrites these too! This wrapper binary is
|