view configure.ac @ 2892:11416bb1b308 icedtea-2.7.0pre07

Bump to icedtea-2.7.0pre07. Upstream changes: - Bump to icedtea-2.7.0pre07 - PR2938: Fix build of 8148487 backport - PR3102: Extend 8022594 to AixPollPort - S4858370: JDWP: Memory Leak: GlobalRefs never deleted when processing invokeMethod command - S4963723: Implement SHA-224 - S6414899: P11Digest should support cloning - S6425769: Allow specifying an address to bind JMX remote connector - S6854417: TESTBUG: java/util/regex/RegExTest.java fails intermittently - S6953295: Move few sun.security.{util, x509, pkcs} classes used by keytool/jarsigner to another package - S6956398: make ephemeral DH key match the length of the certificate key - S6961123: setWMClass fails to null-terminate WM_CLASS string - S6966259: Make PrincipalName and Realm immutable - S7044060: Need to support NSA Suite B Cryptography algorithms - S7060849: Eliminate pack200 build warnings - S7064075: Security libraries don't build with javac -Xlint:all,-deprecation -Werror - S7069870: Parts of the JDK erroneously rely on generic array initializers with diamond - S7081817: test/sun/security/provider/certpath/X509CertPath/IllegalCertiticates.java failing - S7102686: Restructure timestamp code so that jars and modules can more easily share the same code - S7105780: Add SSLSocket client/SSLEngine server to templates directory - S7127906: (launcher) convert the launcher regression tests to java - S7142339: PKCS7.java is needlessly creating SHA1PRNG SecureRandom instances when timestamping is not done - S7152582: PKCS11 tests should use the NSS libraries available in the OS - S7167988: PKIX CertPathBuilder in reverse mode doesn't work if more than one trust anchor is specified - S7192202: Make sure keytool prints both unknown and unparseable extensions - S7194449: String resources for Key Tool and Policy Tool should be in their respective packages - S7196855: autotest.sh fails on ubuntu because libsoftokn.so not found - S7200682: TEST_BUG: keytool/autotest.sh still has problems with libsoftokn.so - S8002116: This JdbReadTwiceTest.sh gets an exit 1 - S8002306: (se) Selector.open fails if invoked with thread interrupt status set [win] - S8004007: test/sun/tools/jinfo/Basic.sh fails on when runSA is set to true - S8005226: java/rmi/transport/pinClientSocketFactory/PinClientSocketFactory.java fails intermittently - S8006935: Need to take care of long secret keys in HMAC/PRF compuation - S8007890: [TESTBUG] JcmdWithNMTDisabled.java fails when invoked with NMT explicitly turned on - S8009636: JARSigner including TimeStamp PolicyID (TSAPolicyID) as defined in RFC3161 - S8014097: add doPrivileged methods with limited privilege scope - S8019341: Update CookieHttpsClientTest to use the newer framework. - S8021191: Add isAuthorized check to limited doPrivileged methods - S8022228: Intermittent test failures in sun/security/ssl/javax/net/ssl/NewAPIs - S8022439: Fix lint warnings in sun.security.ec - S8022594: Potential deadlock in <clinit> of sun.nio.ch.Util/IOUtil - S8023546: sun/security/mscapi/ShortRSAKey1024.sh fails intermittently - S8027705: com/sun/jdi/JdbMethodExitTest.sh fails when a background thread is generating events. - S8028537: PPC64: Updated the JDK regression tests to run on AIX - S8028780: JDK KRB5 module throws OutOfMemoryError when CCache is corrupt - S8036132: Tab characters in test/com/sun/jdi files - S8036612: [parfait] JNI exception pending in jdk/src/windows/native/sun/security/mscapi/security.cpp - S8037557: test SessionCacheSizeTests.java timeout - S8038837: Add support to jarsigner for specifying timestamp hash algorithm - S8038963: com/sun/jdi tests fail because cygwin's ps sometimes misses processes - S8039921: SHA1WithDSA with key > 1024 bits not working - S8044419: TEST_BUG: com/sun/jdi/JdbReadTwiceTest.sh fails when run under root - S8048030: Expectations should be consistent - S8059054: Better URL processing - S8059661: Test SoftReference and OOM behavior - S8064331: JavaSecurityAccess.doIntersectionPrivilege() drops the information about the domain combiner of the stack ACC - S8068761: [TEST_BUG] java/nio/channels/ServerSocketChannel/AdaptServerSocket.java failed with SocketTimeoutException - S8068842: Better JAXP data handling - S8072753: Nondeterministic wrong answer on arithmetic - S8072932: Test fails with java.security.AccessControlException: access denied ("java.security.SecurityPermission" "getDomainCombiner") - S8073735: [TEST_BUG] compiler/loopopts/CountedLoopProblem.java got OOME - S8074068: Cleanup in src/share/classes/sun/security/x509/ - S8074146: [TEST_BUG] jdb has succeded to read an unreadable file - S8075773: jps running as root fails after the fix of JDK-8050807 - S8076339: Better handling of remote object invocation - S8076383: Better CORBA exception handling - S8076387: Better CORBA value handling - S8076392: Improve IIOPInputStream consistency - S8076413: Better JRMP message handling - S8076506: Increment minor version of HSx for 7u91 and initialize the build number - S8078427: More supportive home environment - S8078440: Safer managed types - S8078822: 8068842 fix missed one new file PrimeNumberSequenceGenerator.java - S8079323: Serialization compatibility for Templates: need to exclude Hashtable from serialization - S8079410: Hotspot version to share the same update and build version from JDK - S8079718: IIOP Input Stream Hooking - S8080541: More direct property handling - S8080688: Service for DGC services - S8081297: SSL Problem with Tomcat - S8081475: SystemTap does not work when JDK is compiled with GCC 5 - S8081760: Better group dynamics - S8086092: More palette improvements - S8086733: Improve namespace handling - S8087118: Remove missing package from java.security files - S8087120: [GCC5] java.lang.StackOverflowError on Zero JVM initialization on non x86 platforms. - S8087350: Improve array conversions - S8098547: (tz) Support tzdata2015e - S8103671: More objective stream classes - S8103675: Better Binary searches - S8129952: Ensure thread consistency - S8130078: Document better processing - S8130193: Improve HTTP connections - S8130253: ObjectStreamClass.getFields too restrictive - S8130710: Better attributes processing - S8130735: javax.swing.TimerQueue: timer fires late when another timer starts - S8130864: Better server identity handling - S8130891: (bf) More direct buffering - S8131181: Increment minor version of HSx for 7u95 and initialize the build number - S8131291: Perfect parameter patterning - S8132042: Preserve layout presentation - S8132051: Better byte behavior - S8132082: Let OracleUcrypto accept RSAPrivateKey - S8132210: Reinforce JMX collector internals - S8132988: Better printing dialogues - S8133321: (tz) Support tzdata2015f - S8133962: More general limits - S8134297: NPE in GSSNameElement nameType check - S8134605: Partial rework of the fix for 8081297 - S8134650: Xsl transformation gives different results in 8u66 - S8134861: XSLT: Extension func call cause exception if namespace URI contains partial package name - S8135043: ObjectStreamClass.getField(String) too restrictive - S8135307: CompletionFailure thrown when calling FieldDoc.type, if the field's type is missing - S8137060: JMX memory management improvements - S8138593: Make DSA more fair - S8138716: (tz) Support tzdata2015g - S8139008: Better state table management - S8139012: Better font substitutions - S8139017: More stable image decoding - S8139436: sun.security.mscapi.KeyStore might load incomplete data - S8140244: Port fix of JDK-8075773 to MacOSX - S8140244, PR3171: Port fix of JDK-8075773 to AIX - S8140344: add support for 3 digit update release numbers - S8140543: Arrange font actions - S8141213: [Parfait]Potentially blocking function GetArrayLength called in JNI critical region at line 239 of jdk/src/share/native/sun/awt/image/jpeg/jpegdecoder.c in function GET_ARRAYS - S8141229: [Parfait] Null pointer dereference in cmsstrcasecmp of cmserr.c - S8141287: Add MD5 to jdk.certpath.disabledAlgorithms - Take 2 - S8142882: rebinding of the receiver of a DirectMethodHandle may allow a protected method to be accessed - S8142928: [TEST_BUG] sun/security/provider/certpath/ReverseBuilder/ReverseBuild.java 8u71 failure - S8143002: [Parfait] JNI exception pending in fontpath.c:1300 - S8143132: L10n resource file translation update - S8143167: Better buffering of XML strings - S8143185: Cleanup for handling proxies - S8143941: Update splashscreen displays - S8144313: Test SessionTimeOutTests can be timeout - S8144430: Improve JMX connections - S8144773: Further reduce use of MD5 - S8144955: Wrong changes were pushed with 8143942 - S8145017: Add support for 3 digit hotspot minor version numbers - S8145446: Perfect pipe placement - S8145551: Test failed with Crash for Improved font lookups - S8145982: JMXInterfaceBindingTest is failing intermittently - S8146015: JMXInterfaceBindingTest is failing intermittently for IPv6 addresses - S8146387: Test SSLSession/SessionCacheSizeTests socket accept timed out - S8146477: [TEST_BUG] ClientJSSEServerJSSE.java failing again - S8146494: Better ligature substitution - S8146498: Better device table adjustments - S8146669: Test SessionTimeOutTests fails intermittently - S8146967: [TEST_BUG] javax/security/auth/SubjectDomainCombiner/Optimize.java should use 4-args ProtectionDomain constructor - S8146993: Several javax/management/remote/mandatory regression tests fail after JDK-8138811 - S8147466: Add -fno-strict-overflow to IndicRearrangementProcessor{,2}.cpp - S8147567: InterpreterRuntime::post_field_access not updated for boolean in JDK-8132051 - S8147771: Construction of static protection domains under Javax custom policy - S8147857: [TEST] RMIConnector logs attribute names incorrectly - S8148446: (tz) Support tzdata2016a - S8148475: Missing SA Bytecode updates. - S8148487: PPC64: Better byte behavior - S8148872: Complete name checking - S8149170: Better byte behavior for native arguments - S8149367: PolicyQualifierInfo/index_Ctor JCk test fails with IOE: Invalid encoding for PolicyQualifierInfo - S8149962: Better delineation of XML processing - S8150012: Better byte behavior for reflection - S8150752: Share Class Data - S8150790: 8u75 L10n resource file translation update - S8151841: Build needs additional flags to compile with GCC 6 - S8151876: (tz) Support tzdata2016d - S8151925: Font reference improvements - S8152335: Improve MethodHandle consistency - S8152479: Coded byte streams - S8153673: [BACKOUT] JDWP: Memory Leak: GlobalRefs never deleted when processing invokeMethod command - S8154210: Zero: Better byte behaviour - S8154413: AArch64: Better byte behaviour - S8155981: Bolster bytecode verification - S8155985: Persistent Parameter Processing - S8157077: 8u101 L10n resource file updates - S8158571: Additional method handle validation - S8161262: Fix jdk build with gcc 4.1.2: -fno-strict-overflow not known. - S8162344: The API changes made by CR 7064075 need to be reverted ChangeLog: 2016-09-24 Andrew John Hughes <gnu.andrew@member.fsf.org> Bump to icedtea-2.7.0pre07. * Makefile.am, (JDK_UPDATE_VERSION): Set to 111. (BUILD_VERSION): Set to b01. (CORBA_CHANGESET): Update to icedtea-2.7.0pre07. (JAXP_CHANGESET): Likewise. (JAXWS_CHANGESET): Likewise. (JDK_CHANGESET): Likewise. (LANGTOOLS_CHANGESET): Likewise. (OPENJDK_CHANGESET): Likewise. (CORBA_SHA256SUM): Likewise. (JAXP_SHA256SUM): Likewise. (JAXWS_SHA256SUM): Likewise. (JDK_SHA256SUM): Likewise. (LANGTOOLS_SHA256SUM): Likewise. (OPENJDK_SHA256SUM): Likewise. * configure.ac: Bump to 2.7.0pre07. * hotspot.map.in: Update to icedtea-2.7.0pre07. * patches/boot/ecj-diamond.patch: Add numerous cases in JAXP classes, along with com.sun.java.util.jar.pack, java.security.Provider, java.security.Security, javax.crypto.Cipher, javax.crypto.CryptoAllPermission, javax.crypto.CryptoPermissions, javax.crypto.CryptoPolicyParser, javax.crypto.JceSecurity, javax.crypto.JceSecurityManager, javax.management.remote.rmi.RMIJRMPServerImpl, sun.reflect.annotation.AnnotationInvocationHandler, sun.security.krb5.Krb5ServiceLocator, sun.security.provider.certpath.CertStoreHelper, sun.security.provider.certpath.ssl.SSLServerCertStore, sun.security.provider.certpath.URICertStore and sun.security.ssl.DHCrypt * patches/boot/ecj-multicatch.patch: Add sun.security.krb5.PrincipalName, java.lang.invoke.MemberName, sun.invoke.util.VerifyAccess, javax.crypto.EncryptedPrivateKeyInfo, javax.crypto.SealedObject, sun.security.provider.certpath.URICertStore, sun.security.ssl.RSAClientKeyExchange, sun.security.pkcs11.P11KeyStore, sun.security.pkcs11.P11RSAKeyFactory and sun.security.tools.keytool.Main * patches/boot/ecj-stringswitch.patch: Add cases in sun.security.krb5.Config, sun.security.provider.certpath.X509CertPath, sun.security.ssl.HandshakeMessage, sun.security.ssl.X509KeyManagerImpl, sun.security.pkcs11.Config, sun.security.pkcs11.P11Key, sun.security.sasl.digest.DigestMD5Base, sun.security.sasl.digest.DigestMD5Server, sun.security.sasl.ntlm.NTLMClient, sun.security.sasl.ntlm.NTLMServer and sun.security.sasl.util.AbstractSaslImpl. * patches/boot/ecj-trywithresources.patch: Add cases in sun.security.provider.certpath.URICertStore, sun.security.tools.KeyStoreUtil, sun.security.tools.keytool.Main.
author Andrew John Hughes <gnu_andrew@member.fsf.org>
date Wed, 28 Sep 2016 07:32:57 +0100
parents 9f713d6ccf2a
children 47c21fc24330
line wrap: on
line source

AC_INIT([icedtea], [2.7.0pre07], [distro-pkg-dev@openjdk.java.net])
AM_INIT_AUTOMAKE([1.9 tar-pax foreign])
AM_MAINTAINER_MODE([enable])
AC_CONFIG_FILES([Makefile])

# Older automake doesn't generate these correctly
abs_top_builddir=`pwd -P`
AC_SUBST(abs_top_builddir)
abs_top_srcdir=`dirname $0`
cd $abs_top_srcdir
abs_top_srcdir=`pwd`
cd $abs_top_builddir
AC_SUBST(abs_top_srcdir)

IT_DETERMINE_VERSION
AC_CONFIG_FILES([hotspot.map fsg.sh])
AC_CONFIG_FILES([jconsole.desktop])
AC_CONFIG_FILES([policytool.desktop])

AC_CANONICAL_HOST

AC_PROG_CC
AC_PROG_CXX

IT_FIND_TOOLS([MAKE], [gmake make])
IT_FIND_TOOL([GZIP], [gzip])
IT_FIND_TOOL([ANT], [ant])
IT_FIND_TOOLS([FIND], [gfind find])
IT_FIND_TOOLS([PATCH], [gpatch patch])
IT_FIND_TOOLS([TAR], [gtar tar])
IT_FIND_TOOL([CHMOD], [chmod])
IT_FIND_TOOLS([SHA256SUM], [gsha256sum sha256sum])
IT_FIND_TOOL([WGET], [wget])
IT_FIND_TOOL([ZIP], [zip])
IT_FIND_TOOL([UNZIP], [unzip])
IT_FIND_TOOL([CPIO], [cpio])
IT_FIND_TOOL([FILE], [file])
IT_FIND_TOOL([READLINK], [readlink])
IT_FIND_TOOLS([FASTJAR], [fastjar jar])
IT_FIND_TOOLS([SED],[gsed sed])
AC_CHECK_TOOL([LDD], [ldd])
dnl OpenJDK's README-builds.html lists gawk as a build dependency so we
dnl check for it explicitly rather than using AC_PROG_AWK.
IT_FIND_TOOL([GAWK], [gawk])
IT_CHECK_FOR_MERCURIAL
IT_OBTAIN_HG_REVISIONS
AC_PATH_TOOL([LSB_RELEASE],[lsb_release])
IT_CHECK_FOR_MIME_TYPES

IT_WITH_HOTSPOT_BUILD
AC_PATH_TOOL([LINUX32],[linux32])
IT_CHECK_GCC_VERSION
IT_FIND_NUMBER_OF_PROCESSORS
IT_CP_SUPPORTS_REFLINK
IT_CAN_HARDLINK_TO_SOURCE_TREE
IT_DISABLE_TESTS
IT_DISABLE_HOTSPOT_TESTS
IT_DISABLE_LANGTOOLS_TESTS
IT_DISABLE_JDK_TESTS
IT_DISABLE_SYSTEMTAP_TESTS
IT_ENABLE_SUNEC
IT_ENABLE_NATIVE_DEBUGINFO
IT_ENABLE_JAVA_DEBUGINFO

IT_WITH_FONTS_DIR
AC_CONFIG_FILES([linux.fontconfig.Gentoo.properties])

# Use xvfb-run if found to run gui tests (check-jdk).
AC_CHECK_PROG(XVFB_RUN_CMD, xvfb-run, [xvfb-run -a -e xvfb-errors], [])
AC_SUBST(XVFB_RUN_CMD)

AC_MSG_CHECKING([whether to build documentation])
AC_ARG_ENABLE([docs],
	      [AS_HELP_STRING([--disable-docs],
	      		      [Disable generation of documentation])],
	      [ENABLE_DOCS="${enableval}"], [ENABLE_DOCS='yes'])
AM_CONDITIONAL([ENABLE_DOCS], [test x$ENABLE_DOCS = xyes])
AC_MSG_RESULT(${ENABLE_DOCS})

IT_GET_PKGVERSION
IT_GET_LSB_DATA

IT_SET_ARCH_SETTINGS
IT_SET_OS_DIRS
OPENJDK_BUILD_DIR=openjdk.build
AC_SUBST(OPENJDK_BUILD_DIR)

IT_CHECK_NUMBER_OF_PARALLEL_JOBS
IT_CHECK_IF_BOOTSTRAPPING
IT_CHECK_IF_DOWNLOADING
IT_CHECK_FOR_JDK
IT_FIND_JAVA
IT_FIND_COMPILER
IT_FIND_JAVAH
IT_FIND_JAR
IT_FIND_RMIC
IT_FIND_NATIVE2ASCII
IT_USING_CACAO
if test "x$enable_bootstrap" = "xyes"; then
  IT_FIND_ECJ_JAR
  IT_FIND_TOOL([XSLTPROC], [xsltproc])
fi
AC_CONFIG_FILES([javac], [chmod +x javac])
AC_CONFIG_FILES([javap], [chmod +x javap])
AC_CONFIG_FILES([javah], [chmod +x javah])

IT_JAVAH
IT_LIBRARY_CHECK
IT_CHECK_FOR_CLASS([JAVA_UTIL_SCANNER], [java.util.Scanner])
IT_PR40630_CHECK
IT_CHECK_FOR_CLASS([JAVAX_ANNOTATION_RESOURCE], [javax.annotation.Resource])
IT_GETDTDTYPE_CHECK
dnl PR48033 - Missing javax.management.remote.JMXServiceURL
IT_CHECK_FOR_CLASS([JAVAX_MANAGEMENT_REMOTE_JMXSERVICEURL], [javax.management.remote.JMXServiceURL])
dnl PR48034 - javax.management.modelmbean.ModelMBeanInfo
IT_CHECK_FOR_CLASS([JAVAX_MANAGEMENT_MODELMBEAN_MODELMBEANINFO], [javax.management.modelmbean.ModelMBeanInfo])
dnl PR43148 - javac fails due to missing java.util.regex.Matcher.quoteReplacement
IT_CHECK_FOR_METHOD([JAVA_UTIL_REGEX_MATCHER_QUOTEREPLACEMENT],
  [java.util.regex.Matcher.quoteReplacement],
  [java.util.regex.Matcher],
  ["quoteReplacement",String.class],
  [java.util.regex.Matcher.quoteReplacement("Blah")]
)
dnl PR42003 - Missing javax.swing.plaf.basic.BasicDirectoryModel methods cause OpenJDK build failure 
IT_CHECK_FOR_METHOD([JAVAX_SWING_PLAF_BASIC_BASICDIRECTORYMODEL_ADDPROPERTYCHANGELISTENER],
  [javax.swing.plaf.basic.BasicDirectoryModel.addPropertyChangeListener],
  [javax.swing.plaf.basic.BasicDirectoryModel],
  ["addPropertyChangeListener",java.beans.PropertyChangeListener.class],
  [javax.swing.plaf.basic.BasicDirectoryModel model = new javax.swing.plaf.basic.BasicDirectoryModel(new javax.swing.JFileChooser()); model.addPropertyChangeListener(model)]
)
dnl PR56553 - SSLParameters support missing
IT_CHECK_FOR_METHOD([JAVAX_NET_SSL_SSLCONTEXT_GETDEFAULTSSLPARAMETERS],
  [javax.net.ssl.SSLContext.getDefaultSSLParameters],
  [javax.net.ssl.SSLContext],
  ["getDefaultSSLParameters"],
  [try { javax.net.ssl.SSLContext.getDefault().getDefaultSSLParameters(); } catch (Exception e) {}]
)
IT_CHECK_FOR_METHOD([JAVAX_NET_SSL_SSLENGINE_SETSSLPARAMETERS],
  [javax.net.ssl.SSLEngine.setSSLParameters],
  [javax.net.ssl.SSLEngine],
  ["setSSLParameters", javax.net.ssl.SSLParameters.class],
  [try { javax.net.ssl.SSLContext.getDefault().createSSLEngine().setSSLParameters(new javax.net.ssl.SSLParameters()); }
   catch (Exception e) {}]
)
dnl PR57008 - Add missing SslRMIServerSocketFactory constructor from 7
IT_CHECK_FOR_CONSTRUCTOR([JAVAX_RMI_SSL_SSLRMISERVERSOCKETFACTORY_7],
  [javax.rmi.ssl.SslRMIServerSocketFactory],
  [javax.net.ssl.SSLContext.class,String@<:@@:>@.class,String@<:@@:>@.class,Boolean.TYPE],
  [null,null,null,true]
)

dnl Check whether the obsolete Mirror API is present in the bootstrap JDK, required by JAXWS
IT_CHECK_FOR_CLASS([COM_SUN_MIRROR_TYPE_TYPEMIRROR], [com.sun.mirror.type.TypeMirror])

dnl Check whether the HTTP server API is present in the bootstrap JDK, required by JAXWS
IT_CHECK_FOR_CLASS([COM_SUN_NET_HTTPSERVER_HEADERS], [com.sun.net.httpserver.Headers])

dnl Check whether the JDK can parse the dates used in the currency file
IT_PR64174_CHECK

IT_CHECK_ENABLE_WARNINGS
IT_DIAMOND_CHECK
IT_UNDERSCORE_CHECK
IT_BYTECODE7_CHECK
IT_USE_BOOTSTRAP_TOOLS
IT_CHECK_FOR_XBOOTCLASSPATH
IT_ENABLE_QUEENS_TEST

IT_FIND_RHINO_JAR
IT_ENABLE_OPENJDK_CHECKSUM
IT_ENABLE_HOTSPOT_CHECKSUM
IT_ENABLE_CORBA_CHECKSUM
IT_ENABLE_JAXP_CHECKSUM
IT_ENABLE_JAXWS_CHECKSUM
IT_ENABLE_JDK_CHECKSUM
IT_ENABLE_LANGTOOLS_CHECKSUM
IT_WITH_ALT_JAR_BINARY

IT_ENABLE_CACAO
IT_WITH_CACAO_HOME
IT_WITH_CACAO_SRC_DIR
IT_ENABLE_CACAO_CHECKSUM
IT_ENABLE_JAMVM
IT_ENABLE_JAMVM_CHECKSUM

IT_DISABLE_OPTIMIZATIONS
IT_ENABLE_WERROR
IT_ENABLE_JAR_COMPRESSION
IT_CHECK_ADDITIONAL_VMS
IT_ENABLE_ARM32JIT
IT_ENABLE_NON_NSS_CURVES
IT_ENABLE_SPLIT_DEBUGINFO

IT_WITH_VERSION_SUFFIX
IT_ENABLE_HG
IT_WITH_TZDATA_DIR
IT_WITH_CACERTS_FILE

IT_WITH_PAX
AC_CONFIG_FILES([pax-mark-vm], [chmod +x pax-mark-vm])

AC_PATH_TOOL([HG],[hg])
if test "x${enable_hg}" = "xyes"; then
  if test "x${HG}" = x; then
    AC_MSG_ERROR([Mercurial not found; this is required for a hg build])
  fi
fi
AC_SUBST([HG])
IT_WITH_HG_REVISION

AC_PATH_TOOL([GCJ],[gcj])
AC_SUBST([GCJ])

IT_CHECK_FOR_KERBEROS

dnl pkgconfig cannot be used to find these headers and libraries.
AC_CHECK_HEADERS([X11/X.h],[]
	,[AC_MSG_ERROR("xorg headers were not found -
	try installing xorg-x11-proto-devel.")])

IT_CHECK_FOR_ZLIB
IT_CHECK_FOR_JPEG
IT_CHECK_FOR_PNG
IT_CHECK_FOR_GIF
IT_CHECK_FOR_LCMS
IT_CHECK_FOR_GTK
IT_CHECK_FOR_GIO
IT_CHECK_FOR_GCONF
IT_ENABLE_INFINALITY
IT_CHECK_FOR_CUPS
IT_CHECK_FOR_SYSCALLS
IT_CHECK_FOR_PCSC
IT_CHECK_FOR_SCTP
AC_CONFIG_FILES([remove-intree-libraries.sh])

dnl Check for Xproto headers and libraries.
PKG_CHECK_MODULES(XPROTO, xproto,[XPROTO_FOUND=yes],[XPROTO_FOUND=no])
if test "x${XPROTO_FOUND}" = xno
then
  AC_MSG_ERROR([Could not find Xproto headers - \
  Try installing xorg-x11-proto-devel.])
fi
AC_SUBST(XPROTO_CFLAGS)
AC_SUBST(XPROTO_LIBS)

dnl Check for libXt headers and libraries.
PKG_CHECK_MODULES(XT, xt,[XT_FOUND=yes],[XT_FOUND=no])
if test "x${XT_FOUND}" = xno
then
  AC_MSG_ERROR([Could not find Xt - \
  Try installing libXt-devel.])
fi
AC_SUBST(XT_CFLAGS)
AC_SUBST(XT_LIBS)

dnl Check for libX11 headers and libraries.
PKG_CHECK_MODULES(X11, x11,[X11_FOUND=yes],[X11_FOUND=no])
if test "x${X11_FOUND}" = xno
then
  AC_MSG_ERROR([Could not find x11 - \
  Try installing libX11-devel.])
fi
AC_SUBST(X11_CFLAGS)
AC_SUBST(X11_LIBS)

dnl Check for libXinerama headers and libraries.
PKG_CHECK_MODULES(XINERAMA, xinerama,[XINERAMA_FOUND=yes]
	,[XINERAMA_FOUND=no])
if test "x${XINERAMA_FOUND}" = xno
then
  AC_MSG_ERROR([Could not find Xinerama - \
  Try installing libXinerama-devel.])
fi
AC_SUBST(XINERAMA_CFLAGS)
AC_SUBST(XINERAMA_LIBS)

PKG_CHECK_MODULES(XRENDER, xrender, [XRENDER_FOUND=yes], [XRENDER_FOUND=no])
if test "x${XRENDER_FOUND}" = xno
then
  AC_MSG_ERROR([Could not find Xrender extension - \
Try installing libXrender-devel.])
fi

PKG_CHECK_MODULES(XCOMPOSITE, xcomposite, [XCOMPOSITE_FOUND=yes], [XCOMPOSITE_FOUND=no])
if test "x${XCOMPOSITE_FOUND}" = xno
then AC_MSG_ERROR([Could not find Xcomposite extension.  Try installing libXcomposite-devel.])
fi
AC_SUBST(XCOMPOSITE_CFLAGS)
AC_SUBST(XCOMPOSITE_LIBS)

AC_CHECK_HEADER([sys/sdt.h], [SDT_H_FOUND='yes'],
                [SDT_H_FOUND='no';
                   AC_MSG_WARN([systemtap support needs sys/sdt.h header])])

AC_MSG_CHECKING([working sys/sdt.h and g++ support])
AC_LANG_PUSH([C++])
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#include <sys/sdt.h>
class ProbeClass
{
private:
  int& ref;
  const char *name;

public:
  ProbeClass(int& v, const char *n) : ref(v), name(n)
  {
    DTRACE_PROBE2(_test_, cons, name, ref);
  }

  void method(int min)
  {
    DTRACE_PROBE3(_test_, meth, name, ref, min);
    ref -= min;
  }

  ~ProbeClass()
  {
    DTRACE_PROBE2(_test_, dest, name, ref);
  }
};
]],
[[
  int i = 64;
  DTRACE_PROBE1(_test_, call, i);
  ProbeClass inst = ProbeClass(i, "call");
  inst.method(24);
]])], [AC_MSG_RESULT([yes])], [SDT_H_FOUND='no'; AC_MSG_WARN([systemtap sdt.h or g++ too old])])
AC_LANG_POP([C++])
if test "x${SDT_H_FOUND}" = "xyes"; then
 AC_PATH_TOOL([PERL],[perl])
 if test x"${PERL}" = x ; then
   AC_MSG_WARN([Perl not found in PATH; SystemTap tests will not be able to run])
 fi
 AC_SUBST(PERL)
 AC_PATH_TOOL([STAP],[stap])
 if test x"${STAP}" = x ; then
   AC_MSG_WARN([stap not found in PATH; SystemTap tests will not be able to run])
 fi
 AC_SUBST(STAP)
fi

AM_CONDITIONAL([ENABLE_SYSTEMTAP], [test x$SDT_H_FOUND = xyes])

ABS_CLIENT_LIBJVM_SO="${prefix}/jre/lib/${INSTALL_ARCH_DIR}/client/libjvm.so"
ABS_SERVER_LIBJVM_SO="${prefix}/jre/lib/${INSTALL_ARCH_DIR}/server/libjvm.so"
AC_SUBST(ABS_CLIENT_LIBJVM_SO)
AC_SUBST(ABS_SERVER_LIBJVM_SO)
AC_CONFIG_FILES([tapset/hotspot.stp])
AC_CONFIG_FILES([tapset/hotspot_jni.stp])
AC_CONFIG_FILES([tapset/jstack.stp])
AC_CONFIG_FILES([tapset/hotspot_gc.stp])
AC_CONFIG_FILES([test/tapset/jstaptest.pl])

dnl Check for libXtst headers and libraries.
PKG_CHECK_MODULES(XTST, xtst,[XTST_FOUND=yes],[XTST_FOUND=no])
if test "x${XTST_FOUND}" = xno
then
  AC_MSG_ERROR([Could not find Xtst - \
  Try installing libXtst-devel.])
fi
AC_SUBST(XTST_CFLAGS)
AC_SUBST(XTST_LIBS)

dnl Check for alsa headers and libraries (only required for Linux).
if test "x${BUILD_OS_DIR}" = "xlinux"
then
  PKG_CHECK_MODULES(ALSA, alsa,[ALSA_FOUND=yes],[ALSA_FOUND=no])
  if test "x${ALSA_FOUND}" = xno
  then
    AC_MSG_ERROR([Could not find alsa - \
    Try installing alsa-lib-devel.])
  fi
AC_SUBST(ALSA_CFLAGS)
AC_SUBST(ALSA_LIBS)
fi

if test "x${ZERO_BUILD_TRUE}" = x || test "x${ADD_ZERO_BUILD_TRUE}" = x; then
  dnl Check for libffi headers and libraries.
  PKG_CHECK_MODULES(LIBFFI, libffi,[LIBFFI_FOUND=yes],[LIBFFI_FOUND=no])
  if test "x${LIBFFI_FOUND}" = xno
  then
    LIBFFI_FOUND=
    AC_CHECK_HEADER([ffi.h],[LIBFFI_CFLAGS=],[LIBFFI_FOUND=no])
    AC_SEARCH_LIBS([ffi_call], [ffi],[LIBFFI_LIBS=-lffi],[LIBFFI_FOUND=no])
    if test "x${LIBFFI_FOUND}" = xno
    then
      AC_MSG_ERROR([Could not find libffi headers - \
      Try installing libffi-devel, libffi-dev or libffi4-dev.])
    fi
  fi
fi
AC_SUBST(LIBFFI_CFLAGS)
AC_SUBST(LIBFFI_LIBS)

AC_ARG_WITH([llvm-config],
            [AS_HELP_STRING([--with-llvm-config],
                            [llvm-config binary (default is llvm-config)])],
            [
              if test "x${withval}" != x && test "x${withval}" != xyes && test "x${withval}" != xno; then
	        if which ${withval} >/dev/null 2>&1 && ${withval} --version >/dev/null 2>&1; then
		  LLVM_CONFIG=${withval}
		else
		  AC_MSG_ERROR([invalid argument for --with-llvm-config ($withval)])
		fi
              fi
            ])

if test "x${SHARK_BUILD_TRUE}" = x || test "x${ADD_SHARK_BUILD_TRUE}" = x; then
  if test "x${LLVM_CONFIG}" = x; then
    IT_FIND_TOOL([LLVM_CONFIG], [llvm-config])
  fi
  llvm_components="jit engine nativecodegen"
  LLVM_VERSION="`$LLVM_CONFIG --version`"
  dnl LLVM_CFLAGS
  LLVM_CFLAGS=
  for flag in $($LLVM_CONFIG --cxxflags $llvm_components); do
    if echo "$flag" | grep -q '^-[[ID]]'; then
      if test "$flag" != "-D_DEBUG"; then
        if test "x$LLVM_CFLAGS" != "x"; then
          LLVM_CFLAGS="$LLVM_CFLAGS "
        fi
        LLVM_CFLAGS="$LLVM_CFLAGS$flag"
      fi
    fi
  done
  LLVM_CFLAGS="$LLVM_CFLAGS -DSHARK_LLVM_VERSION=`echo $LLVM_VERSION | sed 's/\.//;s/svn.*//'`"
  dnl LLVM_LDFLAGS
  LLVM_LDFLAGS=
  for flag in $($LLVM_CONFIG --ldflags $llvm_components); do
    if echo "$flag" | grep -q '^-L'; then
      if test "x$LLVM_LDFLAGS" != "x"; then
        LLVM_LDFLAGS="$LLVM_LDFLAGS "
      fi
      LLVM_LDFLAGS="$LLVM_LDFLAGS$flag"
    fi
  done
  dnl LLVM_LIBS
  LIBS_SAVED=$LIBS
  LDFLAGS_SAVED=$LDFLAGS
  LDFLAGS=$LLVM_LDFLAGS
  AC_CHECK_LIB(LLVM-$LLVM_VERSION, LLVMGetNextInstruction,LLVM_SHARED_LIB=" -lLLVM-$LLVM_VERSION")
  LIBS=$LIBS_SAVED
  LDFLAGS=$LDFLAGS_SAVED
  LLVM_LIBS=
  for flag in $($LLVM_CONFIG --libs $llvm_components); do
    if test "x$LLVM_SHARED_LIB" != x && echo "$flag" | grep -q '^-lLLVM'; then
      continue
    fi
    if echo "$flag" | grep -q '^-l'; then
      if test "x$LLVM_LIBS" != "x"; then
        LLVM_LIBS="$LLVM_LIBS "
      fi
      LLVM_LIBS="$LLVM_LIBS$flag"
    fi
  done
  LLVM_LIBS="$LLVM_LIBS$LLVM_SHARED_LIB"
fi
AC_SUBST(LLVM_CFLAGS)
AC_SUBST(LLVM_LDFLAGS)
AC_SUBST(LLVM_LIBS)

# Arguments passed to configure.
AC_SUBST(CONFIGURE_ARGS)
CONFIGURE_ARGS="$ac_configure_args"

# Sanity check; make sure we have a JVM
if test "x$has_native_hotspot_port" = "xno" ; then
  if test "x${use_zero}" = "xno" ; then
    if test "x${ENABLE_CACAO}" = "xno" -a "x${ENABLE_JAMVM}" = "xno"; then
      AC_MSG_ERROR([No native HotSpot port available for ${host_cpu} and all alternatives disabled.])
    fi
  fi
fi

AC_OUTPUT