diff options
author | andrew <devnull@localhost> | 2010-10-19 17:55:59 +0100 |
---|---|---|
committer | andrew <devnull@localhost> | 2010-10-19 17:55:59 +0100 |
commit | 7603e948d7a0a7eb2e72358cb4a40ae6779f95da (patch) | |
tree | c6441f7d14eafe8119d890cddd09b05b8f88c52a /acinclude.m4 |
Initial import from IcedTea6.
2010-10-19 Andrew John Hughes <[email protected]>
* .hgignore,
* Makefile.am,
* acinclude.m4,
* autogen.sh,
* configure.ac,
* extra/net/sourceforge/jnlp/about/HTMLPanel.java,
* extra/net/sourceforge/jnlp/about/Main.java,
* extra/net/sourceforge/jnlp/about/resources/about.html,
* extra/net/sourceforge/jnlp/about/resources/applications.html,
* extra/net/sourceforge/jnlp/about/resources/notes.html,
* javac.in,
* javaws.desktop: Imported from IcedTea6.
* launcher/java.c,
* launcher/java.h,
* launcher/java_md.c,
* launcher/java_md.h,
* launcher/jli_util.h,
* launcher/jni.h,
* launcher/jvm.h,
* launcher/jvm_md.h,
* launcher/manifest_info.h,
* launcher/splashscreen.h,
* launcher/splashscreen_stubs.c,
* launcher/version_comp.h,
* launcher/wildcard.h: Imported from OpenJDK.
* netx/javaws.1,
* netx/javax/jnlp/BasicService.java,
* netx/javax/jnlp/ClipboardService.java,
* netx/javax/jnlp/DownloadService.java,
* netx/javax/jnlp/DownloadServiceListener.java,
* netx/javax/jnlp/ExtendedService.java,
* netx/javax/jnlp/ExtensionInstallerService.java,
* netx/javax/jnlp/FileContents.java,
* netx/javax/jnlp/FileOpenService.java,
* netx/javax/jnlp/FileSaveService.java,
* netx/javax/jnlp/JNLPRandomAccessFile.java,
* netx/javax/jnlp/PersistenceService.java,
* netx/javax/jnlp/PrintService.java,
* netx/javax/jnlp/ServiceManager.java,
* netx/javax/jnlp/ServiceManagerStub.java,
* netx/javax/jnlp/SingleInstanceListener.java,
* netx/javax/jnlp/SingleInstanceService.java,
* netx/javax/jnlp/UnavailableServiceException.java,
* netx/net/sourceforge/jnlp/AppletDesc.java,
* netx/net/sourceforge/jnlp/ApplicationDesc.java,
* netx/net/sourceforge/jnlp/AssociationDesc.java,
* netx/net/sourceforge/jnlp/ComponentDesc.java,
* netx/net/sourceforge/jnlp/DefaultLaunchHandler.java,
* netx/net/sourceforge/jnlp/ExtensionDesc.java,
* netx/net/sourceforge/jnlp/IconDesc.java,
* netx/net/sourceforge/jnlp/InformationDesc.java,
* netx/net/sourceforge/jnlp/InstallerDesc.java,
* netx/net/sourceforge/jnlp/JARDesc.java,
* netx/net/sourceforge/jnlp/JNLPFile.java,
* netx/net/sourceforge/jnlp/JNLPSplashScreen.java,
* netx/net/sourceforge/jnlp/JREDesc.java,
* netx/net/sourceforge/jnlp/LaunchException.java,
* netx/net/sourceforge/jnlp/LaunchHandler.java,
* netx/net/sourceforge/jnlp/Launcher.java,
* netx/net/sourceforge/jnlp/MenuDesc.java,
* netx/net/sourceforge/jnlp/NetxPanel.java,
* netx/net/sourceforge/jnlp/Node.java,
* netx/net/sourceforge/jnlp/PackageDesc.java,
* netx/net/sourceforge/jnlp/ParseException.java,
* netx/net/sourceforge/jnlp/Parser.java,
* netx/net/sourceforge/jnlp/PluginBridge.java,
* netx/net/sourceforge/jnlp/PropertyDesc.java,
* netx/net/sourceforge/jnlp/RelatedContentDesc.java,
* netx/net/sourceforge/jnlp/ResourcesDesc.java,
* netx/net/sourceforge/jnlp/SecurityDesc.java,
* netx/net/sourceforge/jnlp/ShortcutDesc.java,
* netx/net/sourceforge/jnlp/StreamEater.java,
* netx/net/sourceforge/jnlp/UpdateDesc.java,
* netx/net/sourceforge/jnlp/Version.java,
* netx/net/sourceforge/jnlp/cache/CacheEntry.java,
* netx/net/sourceforge/jnlp/cache/CacheUtil.java,
* netx/net/sourceforge/jnlp/cache/DefaultDownloadIndicator.java,
* netx/net/sourceforge/jnlp/cache/DownloadIndicator.java,
* netx/net/sourceforge/jnlp/cache/Resource.java,
* netx/net/sourceforge/jnlp/cache/ResourceTracker.java,
* netx/net/sourceforge/jnlp/cache/UpdatePolicy.java,
* netx/net/sourceforge/jnlp/cache/package.html,
* netx/net/sourceforge/jnlp/event/ApplicationEvent.java,
* netx/net/sourceforge/jnlp/event/ApplicationListener.java,
* netx/net/sourceforge/jnlp/event/DownloadEvent.java,
* netx/net/sourceforge/jnlp/event/DownloadListener.java,
* netx/net/sourceforge/jnlp/event/package.html,
* netx/net/sourceforge/jnlp/package.html,
* netx/net/sourceforge/jnlp/resources/Manifest.mf,
* netx/net/sourceforge/jnlp/resources/Messages.properties,
* netx/net/sourceforge/jnlp/resources/about.jnlp,
* netx/net/sourceforge/jnlp/resources/default.jnlp,
* netx/net/sourceforge/jnlp/runtime/AppThreadGroup.java,
* netx/net/sourceforge/jnlp/runtime/AppletAudioClip.java,
* netx/net/sourceforge/jnlp/runtime/AppletEnvironment.java,
* netx/net/sourceforge/jnlp/runtime/AppletInstance.java,
* netx/net/sourceforge/jnlp/runtime/ApplicationInstance.java,
* netx/net/sourceforge/jnlp/runtime/Boot.java,
* netx/net/sourceforge/jnlp/runtime/Boot13.java,
* netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java,
* netx/net/sourceforge/jnlp/runtime/JNLPPolicy.java,
* netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java,
* netx/net/sourceforge/jnlp/runtime/JNLPSecurityManager.java,
* netx/net/sourceforge/jnlp/runtime/package.html,
* netx/net/sourceforge/jnlp/security/AccessWarningPane.java,
* netx/net/sourceforge/jnlp/security/AppletWarningPane.java,
* netx/net/sourceforge/jnlp/security/CertVerifier.java,
* netx/net/sourceforge/jnlp/security/CertWarningPane.java,
* netx/net/sourceforge/jnlp/security/CertsInfoPane.java,
* netx/net/sourceforge/jnlp/security/HttpsCertVerifier.java,
* netx/net/sourceforge/jnlp/security/MoreInfoPane.java,
* netx/net/sourceforge/jnlp/security/NotAllSignedWarningPane.java,
* netx/net/sourceforge/jnlp/security/SecurityDialogPanel.java,
* netx/net/sourceforge/jnlp/security/SecurityUtil.java,
* netx/net/sourceforge/jnlp/security/SecurityWarningDialog.java,
* netx/net/sourceforge/jnlp/security/SingleCertInfoPane.java,
* netx/net/sourceforge/jnlp/security/VariableX509TrustManager.java,
* netx/net/sourceforge/jnlp/security/viewer/CertificatePane.java,
* netx/net/sourceforge/jnlp/security/viewer/CertificateViewer.java,
* netx/net/sourceforge/jnlp/services/ExtendedSingleInstanceService.java,
* netx/net/sourceforge/jnlp/services/InstanceExistsException.java,
* netx/net/sourceforge/jnlp/services/ServiceUtil.java,
* netx/net/sourceforge/jnlp/services/SingleInstanceLock.java,
* netx/net/sourceforge/jnlp/services/XBasicService.java,
* netx/net/sourceforge/jnlp/services/XClipboardService.java,
* netx/net/sourceforge/jnlp/services/XDownloadService.java,
* netx/net/sourceforge/jnlp/services/XExtendedService.java,
* netx/net/sourceforge/jnlp/services/XExtensionInstallerService.java,
* netx/net/sourceforge/jnlp/services/XFileContents.java,
* netx/net/sourceforge/jnlp/services/XFileOpenService.java,
* netx/net/sourceforge/jnlp/services/XFileSaveService.java,
* netx/net/sourceforge/jnlp/services/XJNLPRandomAccessFile.java,
* netx/net/sourceforge/jnlp/services/XPersistenceService.java,
* netx/net/sourceforge/jnlp/services/XPrintService.java,
* netx/net/sourceforge/jnlp/services/XServiceManagerStub.java,
* netx/net/sourceforge/jnlp/services/XSingleInstanceService.java,
* netx/net/sourceforge/jnlp/services/package.html,
* netx/net/sourceforge/jnlp/tools/CharacterEncoder.java,
* netx/net/sourceforge/jnlp/tools/HexDumpEncoder.java,
* netx/net/sourceforge/jnlp/tools/JarRunner.java,
* netx/net/sourceforge/jnlp/tools/JarSigner.java,
* netx/net/sourceforge/jnlp/tools/JarSignerResources.java,
* netx/net/sourceforge/jnlp/tools/KeyStoreUtil.java,
* netx/net/sourceforge/jnlp/tools/KeyTool.java,
* netx/net/sourceforge/jnlp/util/FileUtils.java,
* netx/net/sourceforge/jnlp/util/PropertiesFile.java,
* netx/net/sourceforge/jnlp/util/Reflect.java,
* netx/net/sourceforge/jnlp/util/WeakList.java,
* netx/net/sourceforge/jnlp/util/XDesktopEntry.java,
* netx/net/sourceforge/nanoxml/XMLElement.java,
* netx/net/sourceforge/nanoxml/XMLParseException.java,
* plugin/icedteanp/IcedTeaJavaRequestProcessor.cc,
* plugin/icedteanp/IcedTeaJavaRequestProcessor.h,
* plugin/icedteanp/IcedTeaNPPlugin.cc,
* plugin/icedteanp/IcedTeaNPPlugin.h,
* plugin/icedteanp/IcedTeaPluginRequestProcessor.cc,
* plugin/icedteanp/IcedTeaPluginRequestProcessor.h,
* plugin/icedteanp/IcedTeaPluginUtils.cc,
* plugin/icedteanp/IcedTeaPluginUtils.h,
* plugin/icedteanp/IcedTeaRunnable.cc,
* plugin/icedteanp/IcedTeaRunnable.h,
* plugin/icedteanp/IcedTeaScriptablePluginObject.cc,
* plugin/icedteanp/IcedTeaScriptablePluginObject.h,
* plugin/icedteanp/java/netscape/javascript/JSException.java,
* plugin/icedteanp/java/netscape/javascript/JSObject.java,
* plugin/icedteanp/java/netscape/javascript/JSObjectCreatePermission.java,
* plugin/icedteanp/java/netscape/javascript/JSProxy.java,
* plugin/icedteanp/java/netscape/javascript/JSRunnable.java,
* plugin/icedteanp/java/netscape/javascript/JSUtil.java,
* plugin/icedteanp/java/netscape/security/ForbiddenTargetException.java,
* plugin/icedteanp/java/sun/applet/AppletSecurityContextManager.java,
* plugin/icedteanp/java/sun/applet/GetMemberPluginCallRequest.java,
* plugin/icedteanp/java/sun/applet/GetWindowPluginCallRequest.java,
* plugin/icedteanp/java/sun/applet/JavaConsole.java,
* plugin/icedteanp/java/sun/applet/MethodOverloadResolver.java,
* plugin/icedteanp/java/sun/applet/PasswordAuthenticationDialog.java,
* plugin/icedteanp/java/sun/applet/PluginAppletSecurityContext.java,
* plugin/icedteanp/java/sun/applet/PluginAppletViewer.java,
* plugin/icedteanp/java/sun/applet/PluginCallRequest.java,
* plugin/icedteanp/java/sun/applet/PluginCallRequestFactory.java,
* plugin/icedteanp/java/sun/applet/PluginClassLoader.java,
* plugin/icedteanp/java/sun/applet/PluginCookieInfoRequest.java,
* plugin/icedteanp/java/sun/applet/PluginCookieManager.java,
* plugin/icedteanp/java/sun/applet/PluginDebug.java,
* plugin/icedteanp/java/sun/applet/PluginException.java,
* plugin/icedteanp/java/sun/applet/PluginMain.java,
* plugin/icedteanp/java/sun/applet/PluginMessageConsumer.java,
* plugin/icedteanp/java/sun/applet/PluginMessageHandlerWorker.java,
* plugin/icedteanp/java/sun/applet/PluginObjectStore.java,
* plugin/icedteanp/java/sun/applet/PluginProxyInfoRequest.java,
* plugin/icedteanp/java/sun/applet/PluginProxySelector.java,
* plugin/icedteanp/java/sun/applet/PluginStreamHandler.java,
* plugin/icedteanp/java/sun/applet/RequestQueue.java,
* plugin/icedteanp/java/sun/applet/TestEnv.java,
* plugin/icedteanp/java/sun/applet/VoidPluginCallRequest.java,
* plugin/tests/LiveConnect/DummyObject.java,
* plugin/tests/LiveConnect/OverloadTestHelper1.java,
* plugin/tests/LiveConnect/OverloadTestHelper2.java,
* plugin/tests/LiveConnect/OverloadTestHelper3.java,
* plugin/tests/LiveConnect/PluginTest.java,
* plugin/tests/LiveConnect/build,
* plugin/tests/LiveConnect/common.js,
* plugin/tests/LiveConnect/index.html,
* plugin/tests/LiveConnect/jjs_eval_test.js,
* plugin/tests/LiveConnect/jjs_func_parameters_tests.js,
* plugin/tests/LiveConnect/jjs_func_rettype_tests.js,
* plugin/tests/LiveConnect/jjs_get_tests.js,
* plugin/tests/LiveConnect/jjs_set_tests.js,
* plugin/tests/LiveConnect/jsj_func_overload_tests.js,
* plugin/tests/LiveConnect/jsj_func_parameters_tests.js,
* plugin/tests/LiveConnect/jsj_func_rettype_tests.js,
* plugin/tests/LiveConnect/jsj_get_tests.js,
* plugin/tests/LiveConnect/jsj_set_tests.js,
* plugin/tests/LiveConnect/jsj_type_casting_tests.js,
* plugin/tests/LiveConnect/jsj_type_conversion_tests.js:
Initial import from IcedTea6.
* AUTHORS,
* COPYING
* INSTALL,
* NEWS,
* README: New documentation.
Diffstat (limited to 'acinclude.m4')
-rw-r--r-- | acinclude.m4 | 509 |
1 files changed, 509 insertions, 0 deletions
diff --git a/acinclude.m4 b/acinclude.m4 new file mode 100644 index 0000000..d4ad033 --- /dev/null +++ b/acinclude.m4 @@ -0,0 +1,509 @@ +AC_DEFUN_ONCE([IT_CAN_HARDLINK_TO_SOURCE_TREE], +[ + AC_CACHE_CHECK([if we can hard link rather than copy from ${abs_top_srcdir}], it_cv_hardlink_src, [ + if cp -l ${abs_top_srcdir}/README tmp.$$ >&AS_MESSAGE_LOG_FD 2>&1; then + it_cv_hardlink_src=yes; + else + it_cv_hardlink_src=no; + fi + rm -f tmp.$$ + ]) + AM_CONDITIONAL([SRC_DIR_HARDLINKABLE], test x"${it_cv_hardlink_src}" = "xyes") +]) + +AC_DEFUN_ONCE([IT_CP_SUPPORTS_REFLINK], +[ + AC_CACHE_CHECK([if cp supports --reflink], it_cv_reflink, [ + touch tmp.$$ + if cp --reflink=auto tmp.$$ tmp2.$$ >&AS_MESSAGE_LOG_FD 2>&1; then + it_cv_reflink=yes; + else + it_cv_reflink=no; + fi + rm -f tmp.$$ tmp2.$$ + ]) + AM_CONDITIONAL([CP_SUPPORTS_REFLINK], test x"${it_cv_reflink}" = "xyes") +]) + +AC_DEFUN_ONCE([IT_CHECK_FOR_JDK], +[ + AC_MSG_CHECKING([for a JDK home directory]) + AC_ARG_WITH([jdk-home], + [AS_HELP_STRING([--with-jdk-home], + [jdk home directory \ + (default is first predefined JDK found)])], + [ + if test "x${withval}" = xyes + then + SYSTEM_JDK_DIR= + elif test "x${withval}" = xno + then + SYSTEM_JDK_DIR= + else + SYSTEM_JDK_DIR=${withval} + fi + ], + [ + SYSTEM_JDK_DIR= + ]) + if test -z "${SYSTEM_JDK_DIR}"; then + for dir in /usr/lib/jvm/java-openjdk /usr/lib/jvm/icedtea6 \ + /usr/lib/jvm/java-6-openjdk /usr/lib/jvm/openjdk \ + /usr/lib/jvm/java-icedtea /usr/lib/jvm/java-gcj /usr/lib/jvm/gcj-jdk \ + /usr/lib/jvm/cacao ; do + if test -d $dir; then + SYSTEM_JDK_DIR=$dir + break + fi + done + fi + AC_MSG_RESULT(${SYSTEM_JDK_DIR}) + if ! test -d "${SYSTEM_JDK_DIR}"; then + AC_MSG_ERROR("A JDK home directory could not be found.") + fi + AC_SUBST(SYSTEM_JDK_DIR) +]) + +AC_DEFUN_ONCE([FIND_JAVAC], +[ + AC_REQUIRE([IT_CHECK_FOR_JDK]) + JAVAC=${SYSTEM_JDK_DIR}/bin/javac + IT_FIND_JAVAC + IT_FIND_ECJ + IT_USING_ECJ + + AC_SUBST(JAVAC) +]) + +AC_DEFUN([IT_FIND_ECJ], +[ + AC_ARG_WITH([ecj], + [AS_HELP_STRING(--with-ecj,bytecode compilation with ecj)], + [ + if test "x${withval}" != x && test "x${withval}" != xyes && test "x${withval}" != xno; then + IT_CHECK_ECJ(${withval}) + else + if test "x${withval}" != xno; then + IT_CHECK_ECJ + fi + fi + ], + [ + IT_CHECK_ECJ + ]) + if test "x${JAVAC}" = "x"; then + if test "x{ECJ}" != "x"; then + JAVAC="${ECJ} -nowarn" + fi + fi +]) + +AC_DEFUN([IT_CHECK_ECJ], +[ + if test "x$1" != x; then + if test -f "$1"; then + AC_MSG_CHECKING(for ecj) + ECJ="$1" + AC_MSG_RESULT(${ECJ}) + else + AC_PATH_PROG(ECJ, "$1") + fi + else + AC_PATH_PROG(ECJ, "ecj") + if test -z "${ECJ}"; then + AC_PATH_PROG(ECJ, "ecj-3.1") + fi + if test -z "${ECJ}"; then + AC_PATH_PROG(ECJ, "ecj-3.2") + fi + if test -z "${ECJ}"; then + AC_PATH_PROG(ECJ, "ecj-3.3") + fi + fi +]) + +AC_DEFUN([IT_FIND_JAVAC], +[ + AC_ARG_WITH([javac], + [AS_HELP_STRING(--with-javac,bytecode compilation with javac)], + [ + if test "x${withval}" != x && test "x${withval}" != xyes && test "x${withval}" != xno; then + IT_CHECK_JAVAC(${withval}) + else + if test "x${withval}" != xno; then + IT_CHECK_JAVAC + fi + fi + ], + [ + IT_CHECK_JAVAC + ]) +]) + +AC_DEFUN([IT_CHECK_JAVAC], +[ + if test "x$1" != x; then + if test -f "$1"; then + AC_MSG_CHECKING(for javac) + JAVAC="$1" + AC_MSG_RESULT(${JAVAC}) + else + AC_PATH_PROG(JAVAC, "$1") + fi + else + AC_PATH_PROG(JAVAC, "javac") + fi +]) + +AC_DEFUN([FIND_JAR], +[ + AC_REQUIRE([IT_CHECK_FOR_JDK]) + AC_MSG_CHECKING([for jar]) + AC_ARG_WITH([jar], + [AS_HELP_STRING(--with-jar,specify location of Java archive tool (jar))], + [ + JAR="${withval}" + ], + [ + JAR=${SYSTEM_JDK_DIR}/bin/jar + ]) + if ! test -f "${JAR}"; then + AC_PATH_PROG(JAR, "${JAR}") + fi + if test -z "${JAR}"; then + AC_PATH_PROG(JAR, "gjar") + fi + if test -z "${JAR}"; then + AC_PATH_PROG(JAR, "jar") + fi + if test -z "${JAR}"; then + AC_MSG_ERROR("No Java archive tool was found.") + fi + AC_MSG_RESULT(${JAR}) + AC_MSG_CHECKING([whether jar supports @<file> argument]) + touch _config.txt + cat >_config.list <<EOF +_config.txt +EOF + if $JAR cf _config.jar @_config.list >&AS_MESSAGE_LOG_FD 2>&1; then + JAR_KNOWS_ATFILE=1 + AC_MSG_RESULT(yes) + else + JAR_KNOWS_ATFILE= + AC_MSG_RESULT(no) + fi + AC_MSG_CHECKING([whether jar supports stdin file arguments]) + if cat _config.list | $JAR cf@ _config.jar >&AS_MESSAGE_LOG_FD 2>&1; then + JAR_ACCEPTS_STDIN_LIST=1 + AC_MSG_RESULT(yes) + else + JAR_ACCEPTS_STDIN_LIST= + AC_MSG_RESULT(no) + fi + rm -f _config.list _config.jar + AC_MSG_CHECKING([whether jar supports -J options at the end]) + if $JAR cf _config.jar _config.txt -J-Xmx896m >&AS_MESSAGE_LOG_FD 2>&1; then + JAR_KNOWS_J_OPTIONS=1 + AC_MSG_RESULT(yes) + else + JAR_KNOWS_J_OPTIONS= + AC_MSG_RESULT(no) + fi + rm -f _config.txt _config.jar + AC_SUBST(JAR) + AC_SUBST(JAR_KNOWS_ATFILE) + AC_SUBST(JAR_ACCEPTS_STDIN_LIST) + AC_SUBST(JAR_KNOWS_J_OPTIONS) +]) + +AC_DEFUN([FIND_ECJ_JAR], +[ + AC_REQUIRE([FIND_JAVAC]) + AC_MSG_CHECKING([for an ecj JAR file]) + AC_ARG_WITH([ecj-jar], + [AS_HELP_STRING(--with-ecj-jar,specify location of the ECJ jar)], + [ + if test -f "${withval}"; then + ECJ_JAR="${withval}" + fi + ], + [ + ECJ_JAR= + ]) + if test -z "${ECJ_JAR}"; then + for jar in /usr/share/java/eclipse-ecj.jar \ + /usr/share/java/ecj.jar \ + /usr/share/eclipse-ecj-3.{2,3,4,5}/lib/ecj.jar; do + if test -e $jar; then + ECJ_JAR=$jar + break + fi + done + if test -z "${ECJ_JAR}"; then + ECJ_JAR=no + fi + fi + AC_MSG_RESULT(${ECJ_JAR}) + if test "x${JAVAC}" = x && test "x${ECJ_JAR}" = "xno" ; then + AC_MSG_ERROR([cannot find a Java compiler or ecj JAR file, try --with-javac, --with-ecj or --with-ecj-jar]) + fi + AC_SUBST(ECJ_JAR) +]) + +AC_DEFUN_ONCE([IT_CHECK_PLUGIN], +[ +AC_MSG_CHECKING([whether to build the browser plugin]) +AC_ARG_ENABLE([plugin], + [AS_HELP_STRING([--disable-plugin], + [Disable compilation of browser plugin])], + [enable_plugin="${enableval}"], [enable_plugin="yes"]) +AC_MSG_RESULT(${enable_plugin}) +]) + +AC_DEFUN_ONCE([IT_CHECK_PLUGIN_DEPENDENCIES], +[ +dnl Check for plugin support headers and libraries. +dnl FIXME: use unstable +AC_REQUIRE([IT_CHECK_PLUGIN]) +if test "x${enable_plugin}" = "xyes" ; then + PKG_CHECK_MODULES(GTK, gtk+-2.0) + PKG_CHECK_MODULES(GLIB, glib-2.0) + AC_SUBST(GLIB_CFLAGS) + AC_SUBST(GLIB_LIBS) + AC_SUBST(GTK_CFLAGS) + AC_SUBST(GTK_LIBS) + + PKG_CHECK_MODULES(MOZILLA, mozilla-plugin) + + AC_SUBST(MOZILLA_CFLAGS) + AC_SUBST(MOZILLA_LIBS) +fi +AM_CONDITIONAL(ENABLE_PLUGIN, test "x${enable_plugin}" = "xyes") +]) + +AC_DEFUN_ONCE([IT_CHECK_XULRUNNER_VERSION], +[ +AC_REQUIRE([IT_CHECK_PLUGIN_DEPENDENCIES]) +if test "x${enable_plugin}" = "xyes" +then + AC_CACHE_CHECK([for xulrunner version], [xulrunner_cv_collapsed_version],[ + if pkg-config --modversion libxul >/dev/null 2>&1 + then + xulrunner_cv_collapsed_version=`pkg-config --modversion libxul | awk -F. '{power=6; v=0; for (i=1; i <= NF; i++) {v += $i * 10 ^ power; power -=2}; print v}'` + else + AC_MSG_FAILURE([cannot determine xulrunner version]) + fi]) + AC_SUBST(MOZILLA_VERSION_COLLAPSED, $xulrunner_cv_collapsed_version) +fi +]) + +dnl Generic macro to check for a Java class +dnl Takes the name of the class as an argument. The macro name +dnl is usually the name of the class with '.' +dnl replaced by '_' and all letters capitalised. +dnl e.g. IT_CHECK_FOR_CLASS([JAVA_UTIL_SCANNER],[java.util.Scanner]) +AC_DEFUN([IT_CHECK_FOR_CLASS],[ +AC_CACHE_CHECK([if $2 is missing], it_cv_$1, [ +CLASS=Test.java +BYTECODE=$(echo $CLASS|sed 's#\.java##') +mkdir tmp.$$ +cd tmp.$$ +cat << \EOF > $CLASS +[/* [#]line __oline__ "configure" */ +public class Test +{ + public static void main(String[] args) + { + $2.class.toString(); + } +} +] +EOF +if $JAVAC -cp . $JAVACFLAGS -nowarn $CLASS >&AS_MESSAGE_LOG_FD 2>&1; then + if $JAVA -classpath . $BYTECODE >&AS_MESSAGE_LOG_FD 2>&1; then + it_cv_$1=yes; + else + it_cv_$1=no; + fi +else + it_cv_$1=no; +fi +]) +rm -f $CLASS *.class +cd .. +rmdir tmp.$$ +if test x"${it_cv_$1}" = "xno"; then + AC_MSG_ERROR([$2 not found.]) +fi +AC_PROVIDE([$0])dnl +]) + +AC_DEFUN_ONCE([IT_CHECK_FOR_MERCURIAL], +[ + AC_PATH_TOOL([HG],[hg]) + AC_SUBST([HG]) +]) + +AC_DEFUN_ONCE([IT_OBTAIN_HG_REVISIONS], +[ + AC_REQUIRE([IT_CHECK_FOR_MERCURIAL]) + ICEDTEA_REVISION="none"; + if which ${HG} >&AS_MESSAGE_LOG_FD 2>&1; then + AC_MSG_CHECKING([for IcedTea Mercurial revision ID]) + if test -e ${abs_top_srcdir}/.hg ; then + ICEDTEA_REVISION="r`(cd ${abs_top_srcdir}; ${HG} tip --template '{node|short}')`" ; + fi ; + AC_MSG_RESULT([${ICEDTEA_REVISION}]) + AC_SUBST([ICEDTEA_REVISION]) + fi; + AM_CONDITIONAL([HAS_ICEDTEA_REVISION], test "x${ICEDTEA_REVISION}" != xnone) +]) + +AC_DEFUN_ONCE([IT_GET_PKGVERSION], +[ +AC_MSG_CHECKING([for distribution package version]) +AC_ARG_WITH([pkgversion], + [AS_HELP_STRING([--with-pkgversion=PKG], + [Use PKG in the version string in addition to "IcedTea"])], + [case "$withval" in + yes) AC_MSG_ERROR([package version not specified]) ;; + no) PKGVERSION=none ;; + *) PKGVERSION="$withval" ;; + esac], + [PKGVERSION=none]) +AC_MSG_RESULT([${PKGVERSION}]) +AM_CONDITIONAL(HAS_PKGVERSION, test "x${PKGVERSION}" != "xnone") +AC_SUBST(PKGVERSION) +]) + +AC_DEFUN([IT_CHECK_WITH_GCJ], +[ + AC_MSG_CHECKING([whether to compile ecj natively]) + AC_ARG_WITH([gcj], + [AS_HELP_STRING(--with-gcj,location of gcj for natively compiling ecj)], + [ + GCJ="${withval}" + ], + [ + GCJ="no" + ]) + AC_MSG_RESULT([${GCJ}]) + if test "x${GCJ}" = xyes; then + AC_PATH_TOOL([GCJ],[gcj]) + fi + AC_SUBST([GCJ]) +]) + +AC_DEFUN([IT_USING_ECJ],[ +AC_CACHE_CHECK([if we are using ecj as javac], it_cv_ecj, [ +if $JAVAC -version 2>&1| grep '^Eclipse' >&AS_MESSAGE_LOG_FD ; then + it_cv_ecj=yes; +else + it_cv_ecj=no; +fi +]) +USING_ECJ=$it_cv_ecj +AC_SUBST(USING_ECJ) +AC_PROVIDE([$0])dnl +]) + +AC_DEFUN([FIND_TOOL], +[AC_PATH_TOOL([$1],[$2]) + if test x"$$1" = x ; then + AC_MSG_ERROR([$2 program not found in PATH]) + fi + AC_SUBST([$1]) +]) + +AC_DEFUN([IT_SET_ARCH_SETTINGS], +[ + case "${host_cpu}" in + x86_64) + BUILD_ARCH_DIR=amd64 + INSTALL_ARCH_DIR=amd64 + JRE_ARCH_DIR=amd64 + ARCHFLAG="-m64" + ;; + i?86) + BUILD_ARCH_DIR=i586 + INSTALL_ARCH_DIR=i386 + JRE_ARCH_DIR=i386 + ARCH_PREFIX=${LINUX32} + ARCHFLAG="-m32" + ;; + alpha*) + BUILD_ARCH_DIR=alpha + INSTALL_ARCH_DIR=alpha + JRE_ARCH_DIR=alpha + ;; + arm*) + BUILD_ARCH_DIR=arm + INSTALL_ARCH_DIR=arm + JRE_ARCH_DIR=arm + ;; + mips) + BUILD_ARCH_DIR=mips + INSTALL_ARCH_DIR=mips + JRE_ARCH_DIR=mips + ;; + mipsel) + BUILD_ARCH_DIR=mipsel + INSTALL_ARCH_DIR=mipsel + JRE_ARCH_DIR=mipsel + ;; + powerpc) + BUILD_ARCH_DIR=ppc + INSTALL_ARCH_DIR=ppc + JRE_ARCH_DIR=ppc + ARCH_PREFIX=${LINUX32} + ARCHFLAG="-m32" + ;; + powerpc64) + BUILD_ARCH_DIR=ppc64 + INSTALL_ARCH_DIR=ppc64 + JRE_ARCH_DIR=ppc64 + ARCHFLAG="-m64" + ;; + sparc) + BUILD_ARCH_DIR=sparc + INSTALL_ARCH_DIR=sparc + JRE_ARCH_DIR=sparc + ARCH_PREFIX=${LINUX32} + ARCHFLAG="-m32" + ;; + sparc64) + BUILD_ARCH_DIR=sparcv9 + INSTALL_ARCH_DIR=sparcv9 + JRE_ARCH_DIR=sparc64 + ARCHFLAG="-m64" + ;; + s390) + BUILD_ARCH_DIR=s390 + INSTALL_ARCH_DIR=s390 + JRE_ARCH_DIR=s390 + ARCH_PREFIX=${LINUX32} + ARCHFLAG="-m31" + ;; + s390x) + BUILD_ARCH_DIR=s390x + INSTALL_ARCH_DIR=s390x + JRE_ARCH_DIR=s390x + ARCHFLAG="-m64" + ;; + sh*) + BUILD_ARCH_DIR=sh + INSTALL_ARCH_DIR=sh + JRE_ARCH_DIR=sh + ;; + *) + BUILD_ARCH_DIR=`uname -m` + INSTALL_ARCH_DIR=$BUILD_ARCH_DIR + JRE_ARCH_DIR=$INSTALL_ARCH_DIR + ;; + esac + AC_SUBST(BUILD_ARCH_DIR) + AC_SUBST(INSTALL_ARCH_DIR) + AC_SUBST(JRE_ARCH_DIR) + AC_SUBST(ARCH_PREFIX) + AC_SUBST(ARCHFLAG) +]) |