aoqi@0: # aoqi@0: # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. aoqi@0: # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. aoqi@0: # aoqi@0: # This code is free software; you can redistribute it and/or modify it aoqi@0: # under the terms of the GNU General Public License version 2 only, as aoqi@0: # published by the Free Software Foundation. Oracle designates this aoqi@0: # particular file as subject to the "Classpath" exception as provided aoqi@0: # by Oracle in the LICENSE file that accompanied this code. aoqi@0: # aoqi@0: # This code is distributed in the hope that it will be useful, but WITHOUT aoqi@0: # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or aoqi@0: # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License aoqi@0: # version 2 for more details (a copy is included in the LICENSE file that aoqi@0: # accompanied this code). aoqi@0: # aoqi@0: # You should have received a copy of the GNU General Public License version aoqi@0: # 2 along with this work; if not, write to the Free Software Foundation, aoqi@0: # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. aoqi@0: # aoqi@0: # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA aoqi@0: # or visit www.oracle.com if you need additional information or have any aoqi@0: # questions. aoqi@0: # aoqi@0: aoqi@0: AC_DEFUN_ONCE([LIB_SETUP_INIT], aoqi@0: [ aoqi@0: aoqi@0: ############################################################################### aoqi@0: # aoqi@0: # OS specific settings that we never will need to probe. aoqi@0: # aoqi@0: if test "x$OPENJDK_TARGET_OS" = xlinux; then aoqi@0: AC_MSG_CHECKING([what is not needed on Linux?]) aoqi@0: PULSE_NOT_NEEDED=yes aoqi@0: AC_MSG_RESULT([pulse]) aoqi@0: fi aoqi@0: aoqi@0: if test "x$OPENJDK_TARGET_OS" = xsolaris; then aoqi@0: AC_MSG_CHECKING([what is not needed on Solaris?]) aoqi@0: ALSA_NOT_NEEDED=yes aoqi@0: PULSE_NOT_NEEDED=yes aoqi@0: AC_MSG_RESULT([alsa pulse]) aoqi@0: fi aoqi@0: aoqi@0: if test "x$OPENJDK_TARGET_OS" = xaix; then aoqi@0: AC_MSG_CHECKING([what is not needed on AIX?]) aoqi@0: ALSA_NOT_NEEDED=yes aoqi@0: PULSE_NOT_NEEDED=yes aoqi@0: AC_MSG_RESULT([alsa pulse]) aoqi@0: fi aoqi@0: aoqi@0: aoqi@0: if test "x$OPENJDK_TARGET_OS" = xwindows; then aoqi@0: AC_MSG_CHECKING([what is not needed on Windows?]) aoqi@0: CUPS_NOT_NEEDED=yes aoqi@0: ALSA_NOT_NEEDED=yes aoqi@0: PULSE_NOT_NEEDED=yes aoqi@0: X11_NOT_NEEDED=yes aoqi@0: AC_MSG_RESULT([alsa cups pulse x11]) aoqi@0: fi aoqi@0: aoqi@0: if test "x$OPENJDK_TARGET_OS" = xmacosx; then aoqi@0: AC_MSG_CHECKING([what is not needed on MacOSX?]) aoqi@0: ALSA_NOT_NEEDED=yes aoqi@0: PULSE_NOT_NEEDED=yes aoqi@0: X11_NOT_NEEDED=yes aoqi@0: # If the java runtime framework is disabled, then we need X11. aoqi@0: # This will be adjusted below. aoqi@0: AC_MSG_RESULT([alsa pulse x11]) aoqi@0: fi aoqi@0: aoqi@0: if test "x$OPENJDK_TARGET_OS" = xbsd; then aoqi@0: AC_MSG_CHECKING([what is not needed on bsd?]) aoqi@0: ALSA_NOT_NEEDED=yes aoqi@0: AC_MSG_RESULT([alsa]) aoqi@0: fi aoqi@0: aoqi@0: if test "x$OPENJDK" = "xfalse"; then aoqi@0: FREETYPE_NOT_NEEDED=yes aoqi@0: fi aoqi@0: aoqi@0: if test "x$SUPPORT_HEADFUL" = xno; then aoqi@0: X11_NOT_NEEDED=yes aoqi@0: fi aoqi@0: aoqi@0: ############################################################################### aoqi@0: # aoqi@0: # Check for MacOSX support for OpenJDK. aoqi@0: # aoqi@0: aoqi@0: BASIC_DEPRECATED_ARG_ENABLE(macosx-runtime-support, macosx_runtime_support) aoqi@0: aoqi@0: AC_MSG_CHECKING([for Mac OS X Java Framework]) aoqi@0: if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then aoqi@0: AC_MSG_RESULT([/System/Library/Frameworks/JavaVM.framework]) aoqi@0: else aoqi@0: AC_MSG_RESULT([no]) aoqi@0: fi aoqi@0: ]) aoqi@0: aoqi@0: AC_DEFUN_ONCE([LIB_SETUP_X11], aoqi@0: [ aoqi@0: aoqi@0: ############################################################################### aoqi@0: # aoqi@0: # Check for X Windows aoqi@0: # aoqi@0: aoqi@0: # Check if the user has specified sysroot, but not --x-includes or --x-libraries. aoqi@0: # Make a simple check for the libraries at the sysroot, and setup --x-includes and aoqi@0: # --x-libraries for the sysroot, if that seems to be correct. aoqi@0: if test "x$SYS_ROOT" != "x/"; then aoqi@0: if test "x$x_includes" = xNONE; then aoqi@0: if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then aoqi@0: x_includes="$SYS_ROOT/usr/X11R6/include" aoqi@0: elif test -f "$SYS_ROOT/usr/include/X11/Xlib.h"; then aoqi@0: x_includes="$SYS_ROOT/usr/include" aoqi@0: fi aoqi@0: fi aoqi@0: if test "x$x_libraries" = xNONE; then aoqi@0: if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then aoqi@0: x_libraries="$SYS_ROOT/usr/X11R6/lib" aoqi@0: elif test "$SYS_ROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then aoqi@0: x_libraries="$SYS_ROOT/usr/lib64" aoqi@0: elif test -f "$SYS_ROOT/usr/lib/libX11.so"; then aoqi@0: x_libraries="$SYS_ROOT/usr/lib" aoqi@0: fi aoqi@0: fi aoqi@0: fi aoqi@0: aoqi@0: # Now let autoconf do it's magic aoqi@0: AC_PATH_X aoqi@0: AC_PATH_XTRA aoqi@0: aoqi@0: # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling aoqi@0: # this doesn't make sense so we remove it. aoqi@0: if test "x$COMPILE_TYPE" = xcross; then aoqi@0: X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[[^ ]]*//g'` aoqi@0: fi aoqi@0: aoqi@0: if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then aoqi@0: HELP_MSG_MISSING_DEPENDENCY([x11]) aoqi@0: AC_MSG_ERROR([Could not find X11 libraries. $HELP_MSG]) aoqi@0: fi aoqi@0: aoqi@0: if test "x$OPENJDK_TARGET_OS" = xsolaris; then aoqi@0: OPENWIN_HOME="/usr/openwin" aoqi@0: fi aoqi@0: AC_SUBST(OPENWIN_HOME) aoqi@0: aoqi@0: aoqi@0: # aoqi@0: # Weird Sol10 something check...TODO change to try compile aoqi@0: # aoqi@0: if test "x${OPENJDK_TARGET_OS}" = xsolaris; then aoqi@0: if test "`uname -r`" = "5.10"; then aoqi@0: if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then aoqi@0: X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS" aoqi@0: fi aoqi@0: fi aoqi@0: fi aoqi@0: aoqi@0: AC_LANG_PUSH(C) aoqi@0: OLD_CFLAGS="$CFLAGS" aoqi@0: CFLAGS="$CFLAGS $X_CFLAGS" aoqi@0: aoqi@0: # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10 aoqi@0: AC_CHECK_HEADERS([X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h], aoqi@0: [X11_A_OK=yes], aoqi@0: [X11_A_OK=no; break], aoqi@0: [ aoqi@0: # include aoqi@0: # include aoqi@0: ] aoqi@0: ) aoqi@0: aoqi@0: CFLAGS="$OLD_CFLAGS" aoqi@0: AC_LANG_POP(C) aoqi@0: aoqi@0: if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then aoqi@0: HELP_MSG_MISSING_DEPENDENCY([x11]) aoqi@0: AC_MSG_ERROR([Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG]) aoqi@0: fi aoqi@0: aoqi@0: AC_SUBST(X_CFLAGS) aoqi@0: AC_SUBST(X_LIBS) aoqi@0: ]) aoqi@0: aoqi@0: AC_DEFUN_ONCE([LIB_SETUP_CUPS], aoqi@0: [ aoqi@0: aoqi@0: ############################################################################### aoqi@0: # aoqi@0: # The common unix printing system cups is used to print from java. aoqi@0: # aoqi@0: AC_ARG_WITH(cups, [AS_HELP_STRING([--with-cups], aoqi@0: [specify prefix directory for the cups package aoqi@0: (expecting the headers under PATH/include)])]) aoqi@0: AC_ARG_WITH(cups-include, [AS_HELP_STRING([--with-cups-include], aoqi@0: [specify directory for the cups include files])]) aoqi@0: aoqi@0: if test "x$CUPS_NOT_NEEDED" = xyes; then aoqi@0: if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then aoqi@0: AC_MSG_WARN([cups not used, so --with-cups is ignored]) aoqi@0: fi aoqi@0: CUPS_CFLAGS= aoqi@0: else aoqi@0: CUPS_FOUND=no aoqi@0: aoqi@0: if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then aoqi@0: AC_MSG_ERROR([It is not possible to disable the use of cups. Remove the --without-cups option.]) aoqi@0: fi aoqi@0: aoqi@0: if test "x${with_cups}" != x; then aoqi@0: CUPS_CFLAGS="-I${with_cups}/include" aoqi@0: CUPS_FOUND=yes aoqi@0: fi aoqi@0: if test "x${with_cups_include}" != x; then aoqi@0: CUPS_CFLAGS="-I${with_cups_include}" aoqi@0: CUPS_FOUND=yes aoqi@0: fi aoqi@0: if test "x$CUPS_FOUND" = xno; then aoqi@0: BDEPS_CHECK_MODULE(CUPS, cups, xxx, [CUPS_FOUND=yes]) aoqi@0: fi aoqi@0: if test "x$CUPS_FOUND" = xno; then aoqi@0: # Are the cups headers installed in the default /usr/include location? aoqi@0: AC_CHECK_HEADERS([cups/cups.h cups/ppd.h], aoqi@0: [ aoqi@0: CUPS_FOUND=yes aoqi@0: CUPS_CFLAGS= aoqi@0: DEFAULT_CUPS=yes aoqi@0: ] aoqi@0: ) aoqi@0: fi aoqi@0: if test "x$CUPS_FOUND" = xno; then aoqi@0: # Getting nervous now? Lets poke around for standard Solaris third-party aoqi@0: # package installation locations. aoqi@0: AC_MSG_CHECKING([for cups headers]) aoqi@0: if test -s /opt/sfw/cups/include/cups/cups.h; then aoqi@0: # An SFW package seems to be installed! aoqi@0: CUPS_FOUND=yes aoqi@0: CUPS_CFLAGS="-I/opt/sfw/cups/include" aoqi@0: elif test -s /opt/csw/include/cups/cups.h; then aoqi@0: # A CSW package seems to be installed! aoqi@0: CUPS_FOUND=yes aoqi@0: CUPS_CFLAGS="-I/opt/csw/include" aoqi@0: fi aoqi@0: AC_MSG_RESULT([$CUPS_FOUND]) aoqi@0: fi aoqi@0: if test "x$CUPS_FOUND" = xno; then aoqi@0: HELP_MSG_MISSING_DEPENDENCY([cups]) aoqi@0: AC_MSG_ERROR([Could not find cups! $HELP_MSG ]) aoqi@0: fi aoqi@0: fi aoqi@0: aoqi@0: AC_SUBST(CUPS_CFLAGS) aoqi@0: aoqi@0: ]) aoqi@0: aoqi@0: AC_DEFUN([LIB_CHECK_POTENTIAL_FREETYPE], aoqi@0: [ aoqi@0: POTENTIAL_FREETYPE_INCLUDE_PATH="$1" aoqi@0: POTENTIAL_FREETYPE_LIB_PATH="$2" aoqi@0: METHOD="$3" aoqi@0: aoqi@0: # First check if the files exists. aoqi@0: if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then aoqi@0: # We found an arbitrary include file. That's a good sign. aoqi@0: AC_MSG_NOTICE([Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD]) aoqi@0: FOUND_FREETYPE=yes aoqi@0: aoqi@0: FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}" aoqi@0: if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then aoqi@0: AC_MSG_NOTICE([Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location.]) aoqi@0: FOUND_FREETYPE=no aoqi@0: else aoqi@0: if test "x$OPENJDK_TARGET_OS" = xwindows; then aoqi@0: # On Windows, we will need both .lib and .dll file. aoqi@0: if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then aoqi@0: AC_MSG_NOTICE([Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location.]) aoqi@0: FOUND_FREETYPE=no aoqi@0: fi aoqi@0: elif test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64 && test -s "$POTENTIAL_FREETYPE_LIB_PATH/amd64/$FREETYPE_LIB_NAME"; then aoqi@0: # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess! aoqi@0: POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64" aoqi@0: fi aoqi@0: fi aoqi@0: fi aoqi@0: aoqi@0: if test "x$FOUND_FREETYPE" = xyes; then aoqi@0: BASIC_FIXUP_PATH(POTENTIAL_FREETYPE_INCLUDE_PATH) aoqi@0: BASIC_FIXUP_PATH(POTENTIAL_FREETYPE_LIB_PATH) aoqi@0: aoqi@0: FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH" aoqi@0: AC_MSG_CHECKING([for freetype includes]) aoqi@0: AC_MSG_RESULT([$FREETYPE_INCLUDE_PATH]) aoqi@0: FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH" aoqi@0: AC_MSG_CHECKING([for freetype libraries]) aoqi@0: AC_MSG_RESULT([$FREETYPE_LIB_PATH]) aoqi@0: fi aoqi@0: ]) aoqi@0: aoqi@0: AC_DEFUN_ONCE([LIB_SETUP_FREETYPE], aoqi@0: [ aoqi@0: aoqi@0: ############################################################################### aoqi@0: # aoqi@0: # The ubiquitous freetype library is used to render fonts. aoqi@0: # aoqi@0: AC_ARG_WITH(freetype, [AS_HELP_STRING([--with-freetype], aoqi@0: [specify prefix directory for the freetype package aoqi@0: (expecting the libraries under PATH/lib and the headers under PATH/include)])]) aoqi@0: AC_ARG_WITH(freetype-include, [AS_HELP_STRING([--with-freetype-include], aoqi@0: [specify directory for the freetype include files])]) aoqi@0: AC_ARG_WITH(freetype-lib, [AS_HELP_STRING([--with-freetype-lib], aoqi@0: [specify directory for the freetype library])]) aoqi@0: AC_ARG_ENABLE(freetype-bundling, [AS_HELP_STRING([--disable-freetype-bundling], aoqi@0: [disable bundling of the freetype library with the build result @<:@enabled on Windows or when using --with-freetype, disabled otherwise@:>@])]) aoqi@0: aoqi@0: FREETYPE_CFLAGS= aoqi@0: FREETYPE_LIBS= aoqi@0: FREETYPE_BUNDLE_LIB_PATH= aoqi@0: aoqi@0: if test "x$FREETYPE_NOT_NEEDED" = xyes; then aoqi@0: if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then aoqi@0: AC_MSG_WARN([freetype not used, so --with-freetype is ignored]) aoqi@0: fi aoqi@0: if test "x$enable_freetype_bundling" != x; then aoqi@0: AC_MSG_WARN([freetype not used, so --enable-freetype-bundling is ignored]) aoqi@0: fi aoqi@0: else aoqi@0: # freetype is needed to build; go get it! aoqi@0: aoqi@0: BUNDLE_FREETYPE="$enable_freetype_bundling" aoqi@0: aoqi@0: if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then aoqi@0: # User has specified settings aoqi@0: aoqi@0: if test "x$BUNDLE_FREETYPE" = x; then aoqi@0: # If not specified, default is to bundle freetype aoqi@0: BUNDLE_FREETYPE=yes aoqi@0: fi aoqi@0: aoqi@0: if test "x$with_freetype" != x; then aoqi@0: POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include" aoqi@0: POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib" aoqi@0: fi aoqi@0: aoqi@0: # Allow --with-freetype-lib and --with-freetype-include to override aoqi@0: if test "x$with_freetype_include" != x; then aoqi@0: POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include" aoqi@0: fi aoqi@0: if test "x$with_freetype_lib" != x; then aoqi@0: POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib" aoqi@0: fi aoqi@0: aoqi@0: if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then aoqi@0: # Okay, we got it. Check that it works. aoqi@0: LIB_CHECK_POTENTIAL_FREETYPE($POTENTIAL_FREETYPE_INCLUDE_PATH, $POTENTIAL_FREETYPE_LIB_PATH, [--with-freetype]) aoqi@0: if test "x$FOUND_FREETYPE" != xyes; then aoqi@0: AC_MSG_ERROR([Can not find or use freetype at location given by --with-freetype]) aoqi@0: fi aoqi@0: else aoqi@0: # User specified only one of lib or include. This is an error. aoqi@0: if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then aoqi@0: AC_MSG_NOTICE([User specified --with-freetype-lib but not --with-freetype-include]) aoqi@0: AC_MSG_ERROR([Need both freetype lib and include paths. Consider using --with-freetype instead.]) aoqi@0: else aoqi@0: AC_MSG_NOTICE([User specified --with-freetype-include but not --with-freetype-lib]) aoqi@0: AC_MSG_ERROR([Need both freetype lib and include paths. Consider using --with-freetype instead.]) aoqi@0: fi aoqi@0: fi aoqi@0: else aoqi@0: # User did not specify settings, but we need freetype. Try to locate it. aoqi@0: aoqi@0: if test "x$BUNDLE_FREETYPE" = x; then aoqi@0: # If not specified, default is to bundle freetype only on windows aoqi@0: if test "x$OPENJDK_TARGET_OS" = xwindows; then aoqi@0: BUNDLE_FREETYPE=yes aoqi@0: else aoqi@0: BUNDLE_FREETYPE=no aoqi@0: fi aoqi@0: fi aoqi@0: aoqi@0: if test "x$FOUND_FREETYPE" != xyes; then aoqi@0: # Check builddeps aoqi@0: BDEPS_CHECK_MODULE(FREETYPE, freetype2, xxx, [FOUND_FREETYPE=yes], [FOUND_FREETYPE=no]) aoqi@0: # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling. aoqi@0: if test "x$FOUND_FREETYPE" = xyes; then aoqi@0: if test "x$BUNDLE_FREETYPE" = xyes; then aoqi@0: AC_MSG_NOTICE([Found freetype using builddeps, but ignoring since we can not bundle that]) aoqi@0: FOUND_FREETYPE=no aoqi@0: else aoqi@0: AC_MSG_CHECKING([for freetype]) aoqi@0: AC_MSG_RESULT([yes (using builddeps)]) aoqi@0: fi aoqi@0: fi aoqi@0: fi aoqi@0: aoqi@0: if test "x$FOUND_FREETYPE" != xyes; then aoqi@0: # Check modules using pkg-config, but only if we have it (ugly output results otherwise) aoqi@0: if test "x$PKG_CONFIG" != x; then aoqi@0: PKG_CHECK_MODULES(FREETYPE, freetype2, [FOUND_FREETYPE=yes], [FOUND_FREETYPE=no]) aoqi@0: if test "x$FOUND_FREETYPE" = xyes; then aoqi@0: # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us. aoqi@0: FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'` aoqi@0: # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64 aoqi@0: if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then aoqi@0: FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'` aoqi@0: fi aoqi@0: # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling. aoqi@0: if test "x$BUNDLE_FREETYPE" = xyes; then aoqi@0: AC_MSG_NOTICE([Found freetype using pkg-config, but ignoring since we can not bundle that]) aoqi@0: FOUND_FREETYPE=no aoqi@0: else aoqi@0: AC_MSG_CHECKING([for freetype]) aoqi@0: AC_MSG_RESULT([yes (using pkg-config)]) aoqi@0: fi aoqi@0: fi aoqi@0: fi aoqi@0: fi aoqi@0: aoqi@0: if test "x$FOUND_FREETYPE" != xyes; then aoqi@0: # Check in well-known locations aoqi@0: if test "x$OPENJDK_TARGET_OS" = xwindows; then aoqi@0: FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32" aoqi@0: BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(FREETYPE_BASE_DIR) aoqi@0: LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib], [well-known location]) aoqi@0: if test "x$FOUND_FREETYPE" != xyes; then aoqi@0: FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32" aoqi@0: BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(FREETYPE_BASE_DIR) aoqi@0: LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib], [well-known location]) aoqi@0: fi aoqi@0: else aoqi@0: if test "x$SYS_ROOT" = "x/"; then aoqi@0: FREETYPE_ROOT= aoqi@0: else aoqi@0: FREETYPE_ROOT="$SYS_ROOT" aoqi@0: fi aoqi@0: FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr" aoqi@0: LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib], [well-known location]) aoqi@0: aoqi@0: if test "x$FOUND_FREETYPE" != xyes; then aoqi@0: FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr/X11" aoqi@0: LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib], [well-known location]) aoqi@0: fi aoqi@0: aoqi@0: if test "x$FOUND_FREETYPE" != xyes; then aoqi@0: FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr" aoqi@0: if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then aoqi@0: LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu], [well-known location]) aoqi@0: else aoqi@0: LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib/i386-linux-gnu], [well-known location]) aoqi@0: if test "x$FOUND_FREETYPE" != xyes; then aoqi@0: LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib32], [well-known location]) aoqi@0: fi aoqi@0: fi aoqi@0: fi aoqi@0: fi aoqi@0: fi # end check in well-known locations aoqi@0: aoqi@0: if test "x$FOUND_FREETYPE" != xyes; then aoqi@0: HELP_MSG_MISSING_DEPENDENCY([freetype]) aoqi@0: AC_MSG_ERROR([Could not find freetype! $HELP_MSG ]) aoqi@0: fi aoqi@0: fi # end user specified settings aoqi@0: aoqi@0: # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir. aoqi@0: if test "x$FREETYPE_CFLAGS" = x; then aoqi@0: BASIC_FIXUP_PATH(FREETYPE_INCLUDE_PATH) aoqi@0: if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then aoqi@0: FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH" aoqi@0: else aoqi@0: FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH" aoqi@0: fi aoqi@0: fi aoqi@0: aoqi@0: if test "x$FREETYPE_LIBS" = x; then aoqi@0: BASIC_FIXUP_PATH(FREETYPE_LIB_PATH) aoqi@0: if test "x$OPENJDK_TARGET_OS" = xwindows; then aoqi@0: FREETYPE_LIBS="$FREETYPE_LIB_PATH/freetype.lib" aoqi@0: else aoqi@0: FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -lfreetype" aoqi@0: fi aoqi@0: fi aoqi@0: aoqi@0: # Try to compile it aoqi@0: AC_MSG_CHECKING([if we can compile and link with freetype]) aoqi@0: AC_LANG_PUSH(C++) aoqi@0: PREV_CXXCFLAGS="$CXXFLAGS" aoqi@0: PREV_LIBS="$LIBS" aoqi@0: PREV_CXX="$CXX" aoqi@0: CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS" aoqi@0: LIBS="$LIBS $FREETYPE_LIBS" aoqi@0: CXX="$FIXPATH $CXX" aoqi@0: AC_LINK_IFELSE([AC_LANG_SOURCE([[ aoqi@0: #include aoqi@0: #include FT_FREETYPE_H aoqi@0: int main () { aoqi@0: FT_Init_FreeType(NULL); aoqi@0: return 0; aoqi@0: } aoqi@0: ]])], aoqi@0: [ aoqi@0: AC_MSG_RESULT([yes]) aoqi@0: ], aoqi@0: [ aoqi@0: AC_MSG_RESULT([no]) aoqi@0: AC_MSG_NOTICE([Could not compile and link with freetype. This might be a 32/64-bit mismatch.]) aoqi@0: AC_MSG_NOTICE([Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS]) aoqi@0: aoqi@0: HELP_MSG_MISSING_DEPENDENCY([freetype]) aoqi@0: aoqi@0: AC_MSG_ERROR([Can not continue without freetype. $HELP_MSG]) aoqi@0: ] aoqi@0: ) aoqi@0: CXXCFLAGS="$PREV_CXXFLAGS" aoqi@0: LIBS="$PREV_LIBS" aoqi@0: CXX="$PREV_CXX" aoqi@0: AC_LANG_POP(C++) aoqi@0: aoqi@0: AC_MSG_CHECKING([if we should bundle freetype]) aoqi@0: if test "x$BUNDLE_FREETYPE" = xyes; then aoqi@0: FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH" aoqi@0: fi aoqi@0: AC_MSG_RESULT([$BUNDLE_FREETYPE]) aoqi@0: aoqi@0: fi # end freetype needed aoqi@0: aoqi@0: AC_SUBST(FREETYPE_BUNDLE_LIB_PATH) aoqi@0: AC_SUBST(FREETYPE_CFLAGS) aoqi@0: AC_SUBST(FREETYPE_LIBS) aoqi@0: ]) aoqi@0: aoqi@0: AC_DEFUN_ONCE([LIB_SETUP_ALSA], aoqi@0: [ aoqi@0: aoqi@0: ############################################################################### aoqi@0: # aoqi@0: # Check for alsa headers and libraries. Used on Linux/GNU systems. aoqi@0: # aoqi@0: AC_ARG_WITH(alsa, [AS_HELP_STRING([--with-alsa], aoqi@0: [specify prefix directory for the alsa package aoqi@0: (expecting the libraries under PATH/lib and the headers under PATH/include)])]) aoqi@0: AC_ARG_WITH(alsa-include, [AS_HELP_STRING([--with-alsa-include], aoqi@0: [specify directory for the alsa include files])]) aoqi@0: AC_ARG_WITH(alsa-lib, [AS_HELP_STRING([--with-alsa-lib], aoqi@0: [specify directory for the alsa library])]) aoqi@0: aoqi@0: if test "x$ALSA_NOT_NEEDED" = xyes; then aoqi@0: if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then aoqi@0: AC_MSG_WARN([alsa not used, so --with-alsa is ignored]) aoqi@0: fi aoqi@0: ALSA_CFLAGS= aoqi@0: ALSA_LIBS= aoqi@0: else aoqi@0: ALSA_FOUND=no aoqi@0: aoqi@0: if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then aoqi@0: AC_MSG_ERROR([It is not possible to disable the use of alsa. Remove the --without-alsa option.]) aoqi@0: fi aoqi@0: aoqi@0: if test "x${with_alsa}" != x; then aoqi@0: ALSA_LIBS="-L${with_alsa}/lib -lasound" aoqi@0: ALSA_CFLAGS="-I${with_alsa}/include" aoqi@0: ALSA_FOUND=yes aoqi@0: fi aoqi@0: if test "x${with_alsa_include}" != x; then aoqi@0: ALSA_CFLAGS="-I${with_alsa_include}" aoqi@0: ALSA_FOUND=yes aoqi@0: fi aoqi@0: if test "x${with_alsa_lib}" != x; then aoqi@0: ALSA_LIBS="-L${with_alsa_lib} -lasound" aoqi@0: ALSA_FOUND=yes aoqi@0: fi aoqi@0: if test "x$ALSA_FOUND" = xno; then aoqi@0: BDEPS_CHECK_MODULE(ALSA, alsa, xxx, [ALSA_FOUND=yes], [ALSA_FOUND=no]) aoqi@0: fi aoqi@0: if test "x$ALSA_FOUND" = xno; then aoqi@0: PKG_CHECK_MODULES(ALSA, alsa, [ALSA_FOUND=yes], [ALSA_FOUND=no]) aoqi@0: fi aoqi@0: if test "x$ALSA_FOUND" = xno; then aoqi@0: AC_CHECK_HEADERS([alsa/asoundlib.h], aoqi@0: [ aoqi@0: ALSA_FOUND=yes aoqi@0: ALSA_CFLAGS=-Iignoreme aoqi@0: ALSA_LIBS=-lasound aoqi@0: DEFAULT_ALSA=yes aoqi@0: ], aoqi@0: [ALSA_FOUND=no]) aoqi@0: fi aoqi@0: if test "x$ALSA_FOUND" = xno; then aoqi@0: HELP_MSG_MISSING_DEPENDENCY([alsa]) aoqi@0: AC_MSG_ERROR([Could not find alsa! $HELP_MSG ]) aoqi@0: fi aoqi@0: fi aoqi@0: aoqi@0: AC_SUBST(ALSA_CFLAGS) aoqi@0: AC_SUBST(ALSA_LIBS) aoqi@0: ]) aoqi@0: aoqi@0: AC_DEFUN_ONCE([LIB_SETUP_MISC_LIBS], aoqi@0: [ aoqi@0: aoqi@0: ############################################################################### aoqi@0: # aoqi@0: # Check for the jpeg library aoqi@0: # aoqi@0: aoqi@0: USE_EXTERNAL_LIBJPEG=true aoqi@0: AC_CHECK_LIB(jpeg, main, [], aoqi@0: [ USE_EXTERNAL_LIBJPEG=false aoqi@0: AC_MSG_NOTICE([Will use jpeg decoder bundled with the OpenJDK source]) aoqi@0: ]) aoqi@0: AC_SUBST(USE_EXTERNAL_LIBJPEG) aoqi@0: aoqi@0: ############################################################################### aoqi@0: # aoqi@0: # Check for the gif library aoqi@0: # aoqi@0: aoqi@0: AC_ARG_WITH(giflib, [AS_HELP_STRING([--with-giflib], aoqi@0: [use giflib from build system or OpenJDK source (system, bundled) @<:@bundled@:>@])]) aoqi@0: aoqi@0: aoqi@0: AC_MSG_CHECKING([for which giflib to use]) aoqi@0: aoqi@0: # default is bundled aoqi@0: DEFAULT_GIFLIB=bundled aoqi@0: aoqi@0: # aoqi@0: # if user didn't specify, use DEFAULT_GIFLIB aoqi@0: # aoqi@0: if test "x${with_giflib}" = "x"; then aoqi@0: with_giflib=${DEFAULT_GIFLIB} aoqi@0: fi aoqi@0: aoqi@0: AC_MSG_RESULT(${with_giflib}) aoqi@0: aoqi@0: if test "x${with_giflib}" = "xbundled"; then aoqi@0: USE_EXTERNAL_LIBGIF=false aoqi@0: elif test "x${with_giflib}" = "xsystem"; then aoqi@0: AC_CHECK_HEADER(gif_lib.h, [], aoqi@0: [ AC_MSG_ERROR([--with-giflib=system specified, but gif_lib.h not found!])]) aoqi@0: AC_CHECK_LIB(gif, DGifGetCode, [], aoqi@0: [ AC_MSG_ERROR([--with-giflib=system specified, but no giflib found!])]) aoqi@0: aoqi@0: USE_EXTERNAL_LIBGIF=true aoqi@0: else aoqi@0: AC_MSG_ERROR([Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled']) aoqi@0: fi aoqi@0: AC_SUBST(USE_EXTERNAL_LIBGIF) aoqi@0: aoqi@0: ############################################################################### aoqi@0: # aoqi@0: # Check for the zlib library aoqi@0: # aoqi@0: aoqi@0: AC_ARG_WITH(zlib, [AS_HELP_STRING([--with-zlib], aoqi@0: [use zlib from build system or OpenJDK source (system, bundled) @<:@bundled@:>@])]) aoqi@0: aoqi@0: AC_CHECK_LIB(z, compress, aoqi@0: [ ZLIB_FOUND=yes ], aoqi@0: [ ZLIB_FOUND=no ]) aoqi@0: aoqi@0: AC_MSG_CHECKING([for which zlib to use]) aoqi@0: aoqi@0: DEFAULT_ZLIB=bundled aoqi@0: if test "x$OPENJDK_TARGET_OS" = xmacosx; then aoqi@0: # aoqi@0: # On macosx default is system...on others default is aoqi@0: # aoqi@0: DEFAULT_ZLIB=system aoqi@0: fi aoqi@0: aoqi@0: if test "x${ZLIB_FOUND}" != "xyes"; then aoqi@0: # aoqi@0: # If we don't find any system...set default to bundled aoqi@0: # aoqi@0: DEFAULT_ZLIB=bundled aoqi@0: fi aoqi@0: aoqi@0: # aoqi@0: # If user didn't specify, use DEFAULT_ZLIB aoqi@0: # aoqi@0: if test "x${with_zlib}" = "x"; then aoqi@0: with_zlib=${DEFAULT_ZLIB} aoqi@0: fi aoqi@0: aoqi@0: if test "x${with_zlib}" = "xbundled"; then aoqi@0: USE_EXTERNAL_LIBZ=false aoqi@0: AC_MSG_RESULT([bundled]) aoqi@0: elif test "x${with_zlib}" = "xsystem"; then aoqi@0: if test "x${ZLIB_FOUND}" = "xyes"; then aoqi@0: USE_EXTERNAL_LIBZ=true aoqi@0: AC_MSG_RESULT([system]) aoqi@0: else aoqi@0: AC_MSG_RESULT([system not found]) aoqi@0: AC_MSG_ERROR([--with-zlib=system specified, but no zlib found!]) aoqi@0: fi aoqi@0: else aoqi@0: AC_MSG_ERROR([Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled']) aoqi@0: fi aoqi@0: aoqi@0: AC_SUBST(USE_EXTERNAL_LIBZ) aoqi@0: aoqi@0: ############################################################################### aoqi@0: LIBZIP_CAN_USE_MMAP=true aoqi@0: aoqi@0: AC_SUBST(LIBZIP_CAN_USE_MMAP) aoqi@0: aoqi@0: ############################################################################### aoqi@0: # aoqi@0: # Check if altzone exists in time.h aoqi@0: # aoqi@0: aoqi@0: AC_LINK_IFELSE([AC_LANG_PROGRAM([#include ], [return (int)altzone;])], aoqi@0: [has_altzone=yes], aoqi@0: [has_altzone=no]) aoqi@0: if test "x$has_altzone" = xyes; then aoqi@0: AC_DEFINE([HAVE_ALTZONE], 1, [Define if you have the external 'altzone' variable in time.h]) aoqi@0: fi aoqi@0: aoqi@0: ############################################################################### aoqi@0: # aoqi@0: # Check the maths library aoqi@0: # aoqi@0: aoqi@0: AC_CHECK_LIB(m, cos, [], aoqi@0: [ aoqi@0: AC_MSG_NOTICE([Maths library was not found]) aoqi@0: ] aoqi@0: ) aoqi@0: AC_SUBST(LIBM) aoqi@0: aoqi@0: ############################################################################### aoqi@0: # aoqi@0: # Check for libdl.so aoqi@0: aoqi@0: save_LIBS="$LIBS" aoqi@0: LIBS="" aoqi@0: AC_CHECK_LIB(dl,dlopen) aoqi@0: LIBDL="$LIBS" aoqi@0: AC_SUBST(LIBDL) aoqi@0: LIBS="$save_LIBS" aoqi@0: ]) aoqi@0: aoqi@0: AC_DEFUN_ONCE([LIB_SETUP_STATIC_LINK_LIBSTDCPP], aoqi@0: [ aoqi@0: ############################################################################### aoqi@0: # aoqi@0: # statically link libstdc++ before C++ ABI is stablized on Linux unless aoqi@0: # dynamic build is configured on command line. aoqi@0: # aoqi@0: AC_ARG_WITH([stdc++lib], [AS_HELP_STRING([--with-stdc++lib=,,], aoqi@0: [force linking of the C++ runtime on Linux to either static or dynamic, default is static with dynamic as fallback])], aoqi@0: [ aoqi@0: if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \ aoqi@0: && test "x$with_stdc__lib" != xdefault; then aoqi@0: AC_MSG_ERROR([Bad parameter value --with-stdc++lib=$with_stdc__lib!]) aoqi@0: fi aoqi@0: ], aoqi@0: [with_stdc__lib=default] aoqi@0: ) aoqi@0: aoqi@0: if test "x$OPENJDK_TARGET_OS" = xlinux; then aoqi@0: # Test if -lstdc++ works. aoqi@0: AC_MSG_CHECKING([if dynamic link of stdc++ is possible]) aoqi@0: AC_LANG_PUSH(C++) aoqi@0: OLD_CXXFLAGS="$CXXFLAGS" aoqi@0: CXXFLAGS="$CXXFLAGS -lstdc++" aoqi@0: AC_LINK_IFELSE([AC_LANG_PROGRAM([], [return 0;])], aoqi@0: [has_dynamic_libstdcxx=yes], aoqi@0: [has_dynamic_libstdcxx=no]) aoqi@0: CXXFLAGS="$OLD_CXXFLAGS" aoqi@0: AC_LANG_POP(C++) aoqi@0: AC_MSG_RESULT([$has_dynamic_libstdcxx]) aoqi@0: aoqi@0: # Test if stdc++ can be linked statically. aoqi@0: AC_MSG_CHECKING([if static link of stdc++ is possible]) aoqi@0: STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic" aoqi@0: AC_LANG_PUSH(C++) aoqi@0: OLD_LIBS="$LIBS" aoqi@0: OLD_CXX="$CXX" aoqi@0: LIBS="$STATIC_STDCXX_FLAGS" aoqi@0: CXX="$CC" aoqi@0: AC_LINK_IFELSE([AC_LANG_PROGRAM([], [return 0;])], aoqi@0: [has_static_libstdcxx=yes], aoqi@0: [has_static_libstdcxx=no]) aoqi@0: LIBS="$OLD_LIBS" aoqi@0: CXX="$OLD_CXX" aoqi@0: AC_LANG_POP(C++) aoqi@0: AC_MSG_RESULT([$has_static_libstdcxx]) aoqi@0: aoqi@0: if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then aoqi@0: AC_MSG_ERROR([Cannot link to stdc++, neither dynamically nor statically!]) aoqi@0: fi aoqi@0: aoqi@0: if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then aoqi@0: AC_MSG_ERROR([Static linking of libstdc++ was not possible!]) aoqi@0: fi aoqi@0: aoqi@0: if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then aoqi@0: AC_MSG_ERROR([Dynamic linking of libstdc++ was not possible!]) aoqi@0: fi aoqi@0: aoqi@0: AC_MSG_CHECKING([how to link with libstdc++]) aoqi@0: # If dynamic was requested, it's available since it would fail above otherwise. aoqi@0: # If dynamic wasn't requested, go with static unless it isn't available. aoqi@0: if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then aoqi@0: LIBCXX="$LIBCXX -lstdc++" aoqi@0: LDCXX="$CXX" aoqi@0: STATIC_CXX_SETTING="STATIC_CXX=false" aoqi@0: AC_MSG_RESULT([dynamic]) aoqi@0: else aoqi@0: LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS" aoqi@0: LDCXX="$CC" aoqi@0: STATIC_CXX_SETTING="STATIC_CXX=true" aoqi@0: AC_MSG_RESULT([static]) aoqi@0: fi aoqi@0: fi aoqi@0: AC_SUBST(STATIC_CXX_SETTING) aoqi@0: aoqi@0: if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then aoqi@0: # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS aoqi@0: PKG_CHECK_MODULES([LIBFFI], [libffi]) aoqi@0: aoqi@0: fi aoqi@0: aoqi@0: if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then aoqi@0: AC_CHECK_PROG([LLVM_CONFIG], [llvm-config], [llvm-config]) aoqi@0: aoqi@0: if test "x$LLVM_CONFIG" != xllvm-config; then aoqi@0: AC_MSG_ERROR([llvm-config not found in $PATH.]) aoqi@0: fi aoqi@0: aoqi@0: llvm_components="jit mcjit engine nativecodegen native" aoqi@0: unset LLVM_CFLAGS aoqi@0: for flag in $("$LLVM_CONFIG" --cxxflags); do aoqi@0: if echo "${flag}" | grep -q '^-@<:@ID@:>@'; then aoqi@0: if test "${flag}" != "-D_DEBUG" ; then aoqi@0: if test "${LLVM_CFLAGS}" != "" ; then aoqi@0: LLVM_CFLAGS="${LLVM_CFLAGS} " aoqi@0: fi aoqi@0: LLVM_CFLAGS="${LLVM_CFLAGS}${flag}" aoqi@0: fi aoqi@0: fi aoqi@0: done aoqi@0: llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//') aoqi@0: LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}" aoqi@0: aoqi@0: unset LLVM_LDFLAGS aoqi@0: for flag in $("${LLVM_CONFIG}" --ldflags); do aoqi@0: if echo "${flag}" | grep -q '^-L'; then aoqi@0: if test "${LLVM_LDFLAGS}" != ""; then aoqi@0: LLVM_LDFLAGS="${LLVM_LDFLAGS} " aoqi@0: fi aoqi@0: LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}" aoqi@0: fi aoqi@0: done aoqi@0: aoqi@0: unset LLVM_LIBS aoqi@0: for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do aoqi@0: if echo "${flag}" | grep -q '^-l'; then aoqi@0: if test "${LLVM_LIBS}" != ""; then aoqi@0: LLVM_LIBS="${LLVM_LIBS} " aoqi@0: fi aoqi@0: LLVM_LIBS="${LLVM_LIBS}${flag}" aoqi@0: fi aoqi@0: done aoqi@0: aoqi@0: AC_SUBST(LLVM_CFLAGS) aoqi@0: AC_SUBST(LLVM_LDFLAGS) aoqi@0: AC_SUBST(LLVM_LIBS) aoqi@0: fi aoqi@0: aoqi@0: # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so) aoqi@0: if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then aoqi@0: LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1" aoqi@0: fi aoqi@0: aoqi@0: # TODO better (platform agnostic) test aoqi@0: if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then aoqi@0: LIBCXX="-lstdc++" aoqi@0: fi aoqi@0: aoqi@0: AC_SUBST(LIBCXX) aoqi@0: ])