diff --git a/autogen.sh b/autogen.sh
index d191cd03a0..3f0fcd49ee 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -104,12 +104,10 @@ if grep "^AM_PROG_LIBTOOL" configure.ac >/dev/null; then
fi
fi
-
-#
-# Plug in the extension module
-#
+# Parse parameters
has_ext_mod=false
ext_mod_args=''
+has_disable_boehm=false
for PARAM; do
if [[ $PARAM =~ "--enable-extension-module" ]] ; then
has_ext_mod=true
@@ -117,8 +115,14 @@ for PARAM; do
ext_mod_args=`echo $PARAM | cut -d= -f2`
fi
fi
+ if [[ $PARAM =~ "--disable-boehm" ]] ; then
+ has_disable_boehm=true
+ fi
done
+#
+# Plug in the extension module
+#
if test x$has_ext_mod = xtrue; then
pushd $top_srcdir../mono-extensions/scripts
sh ./prepare-repo.sh $ext_mod_args || exit 1
@@ -150,7 +154,12 @@ automake $am_opt ||
echo "Running autoconf ..."
autoconf || { echo "**Error**: autoconf failed."; exit 1; }
-if test -d $srcdir/external/bdwgc; then
+# Update all submodules recursively to ensure everything is checked out
+if test -e $srcdir/scripts/update_submodules.sh; then
+ (cd $srcdir && scripts/update_submodules.sh)
+fi
+
+if test x$has_disable_boehm = xfalse -a -d $srcdir/external/bdwgc; then
echo Running external/bdwgc/autogen.sh ...
(cd $srcdir/external/bdwgc ; NOCONFIGURE=1 ./autogen.sh "$@")
echo Done running external/bdwgc/autogen.sh ...
diff --git a/config.h.in b/config.h.in
index 46e8999704..78ea6355e3 100644
--- a/config.h.in
+++ b/config.h.in
@@ -27,6 +27,9 @@
/* Disable agent attach support */
#undef DISABLE_ATTACH
+/* Disable config directories. */
+#undef DISABLE_CFGDIR_CONFIG
+
/* Disable runtime cleanup. */
#undef DISABLE_CLEANUP
@@ -1532,6 +1535,12 @@
/* Define to the version of this package. */
#undef PACKAGE_VERSION
+/* PowerPC ELFv1 */
+#undef POWERPC_ELF
+
+/* PowerPC ELFv2 */
+#undef POWERPC_ELFV2
+
/* getpriority with int who */
#undef PRIORITY_REQUIRES_INT_WHO
diff --git a/configure.REMOVED.git-id b/configure.REMOVED.git-id
index 94b11c96ce..bb8ba6ae2d 100644
--- a/configure.REMOVED.git-id
+++ b/configure.REMOVED.git-id
@@ -1 +1 @@
-57151bd040b7d72a70d75fc7b3935fb3ece1abc3
\ No newline at end of file
+8881f9e3281be1b876b8e97720363b2ce45b5244
\ No newline at end of file
diff --git a/configure.ac.REMOVED.git-id b/configure.ac.REMOVED.git-id
index 1bc02dd60b..cd07f0df81 100644
--- a/configure.ac.REMOVED.git-id
+++ b/configure.ac.REMOVED.git-id
@@ -1 +1 @@
-d9eb465c39764c44d304b411dd7a31baa2d4bcc9
\ No newline at end of file
+b736fbcec00fc8bd8dbad8a763bc97bb709e56f0
\ No newline at end of file
diff --git a/docs/HtmlAgilityPack/HtmlAttributeCollection.cs b/docs/HtmlAgilityPack/HtmlAttributeCollection.cs
index 07af9979dd..3565897d7c 100644
--- a/docs/HtmlAgilityPack/HtmlAttributeCollection.cs
+++ b/docs/HtmlAgilityPack/HtmlAttributeCollection.cs
@@ -242,7 +242,7 @@ namespace HtmlAgilityPack
}
///
- /// Checks for existance of attribute with given name
+ /// Checks for existence of attribute with given name
///
///
///
diff --git a/docs/deploy/mono-api-counters.html b/docs/deploy/mono-api-counters.html
index 72d3d6766a..81694e144e 100644
--- a/docs/deploy/mono-api-counters.html
+++ b/docs/deploy/mono-api-counters.html
@@ -253,7 +253,7 @@ mono_counters_dump (int section_mask, FILE *outfile)
Displays the counts of all the enabled counters registered.
To filter by variance, you can OR one or more variance with the specific section you want.
diff --git a/external/api-snapshot/profiles/monodroid/System.cs.REMOVED.git-id b/external/api-snapshot/profiles/monodroid/System.cs.REMOVED.git-id
index 59c7712756..74d9b08e0c 100644
--- a/external/api-snapshot/profiles/monodroid/System.cs.REMOVED.git-id
+++ b/external/api-snapshot/profiles/monodroid/System.cs.REMOVED.git-id
@@ -1 +1 @@
-3e8933930502d0d8ded2c9654341153068d92d73
\ No newline at end of file
+e52ae1321cb12d23e3b585c7556602edad61b435
\ No newline at end of file
diff --git a/external/api-snapshot/profiles/monotouch/System.cs.REMOVED.git-id b/external/api-snapshot/profiles/monotouch/System.cs.REMOVED.git-id
index 1a3d088996..d34f54d176 100644
--- a/external/api-snapshot/profiles/monotouch/System.cs.REMOVED.git-id
+++ b/external/api-snapshot/profiles/monotouch/System.cs.REMOVED.git-id
@@ -1 +1 @@
-ed1414ca828ee9519a6607ede29370c74a68f69b
\ No newline at end of file
+2c9ad44ed0aa5722e9ba1a8610b6b7dfa4c7dfc0
\ No newline at end of file
diff --git a/external/api-snapshot/profiles/net_4_x/Mono.Cecil.Mdb.cs b/external/api-snapshot/profiles/net_4_x/Mono.Cecil.Mdb.cs
index 52c351c5a3..427982fae5 100644
--- a/external/api-snapshot/profiles/net_4_x/Mono.Cecil.Mdb.cs
+++ b/external/api-snapshot/profiles/net_4_x/Mono.Cecil.Mdb.cs
@@ -2,12 +2,12 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-[assembly:System.Reflection.AssemblyVersionAttribute("0.11.0.0")]
+[assembly:System.Reflection.AssemblyVersionAttribute("0.11.1.0")]
[assembly:System.CLSCompliantAttribute(false)]
[assembly:System.Diagnostics.DebuggableAttribute(System.Diagnostics.DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly:System.Reflection.AssemblyCopyrightAttribute("Copyright © 2008 - 2018 Jb Evain")]
-[assembly:System.Reflection.AssemblyFileVersionAttribute("0.11.0.0")]
-[assembly:System.Reflection.AssemblyInformationalVersionAttribute("0.11.0.0")]
+[assembly:System.Reflection.AssemblyFileVersionAttribute("0.11.1.0")]
+[assembly:System.Reflection.AssemblyInformationalVersionAttribute("0.11.1.0")]
[assembly:System.Reflection.AssemblyProductAttribute("Mono.Cecil")]
[assembly:System.Reflection.AssemblyTitleAttribute("Mono.Cecil.Mdb")]
[assembly:System.Runtime.CompilerServices.CompilationRelaxationsAttribute(8)]
diff --git a/external/api-snapshot/profiles/net_4_x/Mono.Cecil.cs.REMOVED.git-id b/external/api-snapshot/profiles/net_4_x/Mono.Cecil.cs.REMOVED.git-id
index 9187b400da..f5b36dd50b 100644
--- a/external/api-snapshot/profiles/net_4_x/Mono.Cecil.cs.REMOVED.git-id
+++ b/external/api-snapshot/profiles/net_4_x/Mono.Cecil.cs.REMOVED.git-id
@@ -1 +1 @@
-7d65de02df2ecf34d5528debc47da5e04ca08c3c
\ No newline at end of file
+d885583bf5126fa7cef592508f257eead32e1fd6
\ No newline at end of file
diff --git a/external/api-snapshot/profiles/net_4_x/Mono.Debugger.Soft.cs b/external/api-snapshot/profiles/net_4_x/Mono.Debugger.Soft.cs
index c5fcf2e87e..a87a1ef445 100644
--- a/external/api-snapshot/profiles/net_4_x/Mono.Debugger.Soft.cs
+++ b/external/api-snapshot/profiles/net_4_x/Mono.Debugger.Soft.cs
@@ -103,6 +103,7 @@ namespace Mono.Debugger.Soft
{
internal CommandException() { }
public Mono.Debugger.Soft.ErrorCode ErrorCode { get { throw null; } set { } }
+ public string ErrorMessage { get { throw null; } }
}
public abstract partial class Connection
{
@@ -174,6 +175,7 @@ namespace Mono.Debugger.Soft
{
public ErrorHandlerEventArgs() { }
public Mono.Debugger.Soft.ErrorCode ErrorCode { get { throw null; } set { } }
+ public string ErrorMessage { get { throw null; } set { } }
}
public abstract partial class Event
{
@@ -204,6 +206,7 @@ namespace Mono.Debugger.Soft
protected void CheckMirror(Mono.Debugger.Soft.VirtualMachine vm, Mono.Debugger.Soft.Mirror m) { }
public void Disable() { }
public virtual void Enable() { }
+ public int GetId() { throw null; }
protected void SetEnabled(int id) { }
}
public partial class EventSet
diff --git a/external/api-snapshot/profiles/net_4_x/System.Windows.Forms.cs.REMOVED.git-id b/external/api-snapshot/profiles/net_4_x/System.Windows.Forms.cs.REMOVED.git-id
index ac5c503762..f6795f492b 100644
--- a/external/api-snapshot/profiles/net_4_x/System.Windows.Forms.cs.REMOVED.git-id
+++ b/external/api-snapshot/profiles/net_4_x/System.Windows.Forms.cs.REMOVED.git-id
@@ -1 +1 @@
-971ec0433e2549af734d0be493c45056564c2b41
\ No newline at end of file
+d227de624686ae491802de93462fadfaf51e3d05
\ No newline at end of file
diff --git a/external/api-snapshot/profiles/net_4_x/System.cs.REMOVED.git-id b/external/api-snapshot/profiles/net_4_x/System.cs.REMOVED.git-id
index c73899ad47..d1f6b2b790 100644
--- a/external/api-snapshot/profiles/net_4_x/System.cs.REMOVED.git-id
+++ b/external/api-snapshot/profiles/net_4_x/System.cs.REMOVED.git-id
@@ -1 +1 @@
-d22c0752cbf3a18e72df8083ab5354f346c648f8
\ No newline at end of file
+f335934c8d138cba6480252052ba3f3ea71d10fc
\ No newline at end of file
diff --git a/external/bdwgc/autom4te.cache/requests b/external/bdwgc/autom4te.cache/requests
index dbd5cd51f4..2ad1b61490 100644
--- a/external/bdwgc/autom4te.cache/requests
+++ b/external/bdwgc/autom4te.cache/requests
@@ -42,162 +42,162 @@
'configure.ac'
],
{
- 'AM_AUTOMAKE_VERSION' => 1,
- 'include' => 1,
- 'AM_SET_CURRENT_AUTOMAKE_VERSION' => 1,
- 'AC_DISABLE_FAST_INSTALL' => 1,
- '_LT_AC_TRY_DLOPEN_SELF' => 1,
- 'AC_DEFUN_ONCE' => 1,
- 'AM_DISABLE_STATIC' => 1,
- 'AC_LIBTOOL_POSTDEP_PREDEP' => 1,
- 'AC_LIBTOOL_LANG_RC_CONFIG' => 1,
- 'LT_PROG_GO' => 1,
- 'LTOBSOLETE_VERSION' => 1,
- '_LT_DLL_DEF_P' => 1,
- '_LT_PROG_CXX' => 1,
- 'AC_LIBTOOL_LANG_GCJ_CONFIG' => 1,
- 'AC_DISABLE_SHARED' => 1,
- '_LT_AC_LANG_CXX_CONFIG' => 1,
- 'LT_INIT' => 1,
- 'AC_LIBTOOL_LINKER_OPTION' => 1,
- 'AC_ENABLE_SHARED' => 1,
- '_LT_AC_LANG_GCJ_CONFIG' => 1,
- 'AM_PROG_NM' => 1,
- 'AM_PROG_CC_C_O' => 1,
- 'm4_include' => 1,
- 'AC_LIBTOOL_LANG_C_CONFIG' => 1,
- 'AC_LIBTOOL_PICMODE' => 1,
- 'AM_DEP_TRACK' => 1,
- 'AC_LIBTOOL_PROG_COMPILER_PIC' => 1,
- '_LT_AC_LANG_CXX' => 1,
- '_LT_PROG_ECHO_BACKSLASH' => 1,
- '_m4_warn' => 1,
- '_LT_AC_SYS_LIBPATH_AIX' => 1,
- 'AC_PATH_MAGIC' => 1,
- 'LT_PROG_GCJ' => 1,
- '_AM_CONFIG_MACRO_DIRS' => 1,
'LT_CMD_MAX_LEN' => 1,
- '_LT_AC_LANG_C_CONFIG' => 1,
- 'AC_CHECK_LIBM' => 1,
- 'LT_AC_PROG_EGREP' => 1,
- 'AM_SET_DEPDIR' => 1,
- '_AM_SET_OPTIONS' => 1,
- 'AC_LIBTOOL_SYS_MAX_CMD_LEN' => 1,
- 'AC_LIBTOOL_WIN32_DLL' => 1,
- 'AC_PATH_TOOL_PREFIX' => 1,
- 'AC_LIBTOOL_RC' => 1,
- 'AC_LIBTOOL_FC' => 1,
- 'm4_pattern_forbid' => 1,
- 'AC_ENABLE_STATIC' => 1,
- '_AM_SUBST_NOTMAKE' => 1,
- 'AC_PROG_LD_RELOAD_FLAG' => 1,
- 'AM_ENABLE_STATIC' => 1,
- 'AM_SILENT_RULES' => 1,
- '_LT_COMPILER_BOILERPLATE' => 1,
- '_LT_COMPILER_OPTION' => 1,
- '_LT_AC_LANG_F77' => 1,
- 'AC_LIBTOOL_PROG_LD_SHLIBS' => 1,
- 'AM_MISSING_HAS_RUN' => 1,
- '_LT_PROG_FC' => 1,
- 'LTSUGAR_VERSION' => 1,
- 'AM_INIT_AUTOMAKE' => 1,
- 'AM_PROG_INSTALL_SH' => 1,
- 'AC_LIBTOOL_SYS_HARD_LINK_LOCKS' => 1,
- 'AC_DEFUN' => 1,
- 'm4_pattern_allow' => 1,
- 'AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE' => 1,
- 'AC_CONFIG_MACRO_DIR_TRACE' => 1,
- 'AC_LIBTOOL_DLOPEN' => 1,
- 'AC_LIBTOOL_LANG_F77_CONFIG' => 1,
- '_LT_PATH_TOOL_PREFIX' => 1,
- 'AC_LIBTOOL_COMPILER_OPTION' => 1,
- '_LT_CC_BASENAME' => 1,
- 'AC_DISABLE_STATIC' => 1,
- '_LT_AC_LANG_RC_CONFIG' => 1,
- '_LT_AC_SYS_COMPILER' => 1,
- 'AM_OUTPUT_DEPENDENCY_COMMANDS' => 1,
- '_LT_REQUIRED_DARWIN_CHECKS' => 1,
- 'LT_SYS_DLOPEN_SELF' => 1,
- '_LT_AC_FILE_LTDLL_C' => 1,
- 'LT_AC_PROG_SED' => 1,
- 'AM_DISABLE_SHARED' => 1,
- 'LT_OUTPUT' => 1,
- 'AC_PROG_LD' => 1,
- 'LT_LANG' => 1,
- 'AM_PROG_INSTALL_STRIP' => 1,
- 'AC_PROG_LD_GNU' => 1,
- 'AC_LIBTOOL_DLOPEN_SELF' => 1,
- '_LT_WITH_SYSROOT' => 1,
- 'LT_PROG_RC' => 1,
- 'AC_LIBTOOL_SYS_OLD_ARCHIVE' => 1,
- '_AM_MANGLE_OPTION' => 1,
- 'AM_PROG_LD' => 1,
- 'LT_PATH_LD' => 1,
- 'AC_PROG_EGREP' => 1,
- '_LT_LINKER_OPTION' => 1,
- 'GC_SET_VERSION' => 1,
- 'AC_PROG_NM' => 1,
- '_AM_SET_OPTION' => 1,
- '_AM_PROG_CC_C_O' => 1,
- '_LT_AC_LANG_GCJ' => 1,
'AC_LIBTOOL_PROG_CC_C_O' => 1,
- '_LT_AC_PROG_ECHO_BACKSLASH' => 1,
- 'AM_AUX_DIR_EXPAND' => 1,
- 'AC_LIBTOOL_PROG_COMPILER_NO_RTTI' => 1,
- 'AC_LIBTOOL_GCJ' => 1,
- 'AC_PROG_LIBTOOL' => 1,
'AM_SUBST_NOTMAKE' => 1,
+ 'AC_DISABLE_FAST_INSTALL' => 1,
+ '_AM_IF_OPTION' => 1,
+ 'LT_SYS_DLOPEN_SELF' => 1,
+ '_AM_DEPENDENCIES' => 1,
+ '_LT_AC_TAGCONFIG' => 1,
+ '_LT_AC_LANG_GCJ' => 1,
+ 'AC_LIBTOOL_LANG_RC_CONFIG' => 1,
+ 'AC_LIBTOOL_LANG_F77_CONFIG' => 1,
+ 'AC_PROG_LIBTOOL' => 1,
+ 'AC_LIBTOOL_LINKER_OPTION' => 1,
'_AM_PROG_TAR' => 1,
- 'LT_AC_PROG_RC' => 1,
- 'AM_MISSING_PROG' => 1,
- '_LT_LINKER_BOILERPLATE' => 1,
- 'AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH' => 1,
- 'LTOPTIONS_VERSION' => 1,
- 'AM_CONDITIONAL' => 1,
- 'AC_LIBTOOL_CONFIG' => 1,
+ 'AC_LTDL_PREOPEN' => 1,
+ 'AC_LIBTOOL_SYS_OLD_ARCHIVE' => 1,
+ 'AC_LIBTOOL_LANG_CXX_CONFIG' => 1,
+ 'AM_ENABLE_SHARED' => 1,
+ 'AM_PROG_INSTALL_SH' => 1,
+ 'LT_PROG_GCJ' => 1,
+ 'LTVERSION_VERSION' => 1,
'_LT_AC_PROG_CXXCPP' => 1,
- 'AM_RUN_LOG' => 1,
- 'AM_PROG_LIBTOOL' => 1,
- 'LT_PATH_NM' => 1,
- '_LT_PROG_LTMAIN' => 1,
- 'AC_LIBTOOL_SYS_LIB_STRIP' => 1,
+ 'LT_AC_PROG_SED' => 1,
+ 'AM_PROG_INSTALL_STRIP' => 1,
+ 'AM_SET_LEADING_DOT' => 1,
+ 'AC_LIBTOOL_PROG_COMPILER_NO_RTTI' => 1,
+ 'AC_LIBTOOL_SYS_MAX_CMD_LEN' => 1,
'_LT_AC_SHELL_INIT' => 1,
'_AC_AM_CONFIG_HEADER_HOOK' => 1,
+ 'AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE' => 1,
+ 'AM_MISSING_PROG' => 1,
'AC_LIBTOOL_SYS_DYNAMIC_LINKER' => 1,
- 'AC_LTDL_PREOPEN' => 1,
- '_AM_AUTOCONF_VERSION' => 1,
- 'AC_CONFIG_MACRO_DIR' => 1,
- 'AC_LIBTOOL_SETUP' => 1,
- 'AC_LTDL_ENABLE_INSTALL' => 1,
+ 'AC_CONFIG_MACRO_DIR_TRACE' => 1,
+ 'AM_MAINTAINER_MODE' => 1,
+ 'LT_PATH_LD' => 1,
+ 'AC_DISABLE_SHARED' => 1,
+ 'AM_SET_CURRENT_AUTOMAKE_VERSION' => 1,
+ 'LT_OUTPUT' => 1,
+ 'AC_LIBTOOL_DLOPEN_SELF' => 1,
+ '_AM_CONFIG_MACRO_DIRS' => 1,
+ 'AM_DISABLE_SHARED' => 1,
'AC_LIBTOOL_OBJDIR' => 1,
- 'LTVERSION_VERSION' => 1,
- 'AC_LIBTOOL_CXX' => 1,
- 'AM_SET_LEADING_DOT' => 1,
- 'AC_LIBTOOL_LANG_CXX_CONFIG' => 1,
- 'AC_DEPLIBS_CHECK_METHOD' => 1,
- '_LT_AC_TAGVAR' => 1,
- '_AM_DEPENDENCIES' => 1,
+ 'LT_LANG' => 1,
+ 'AC_PATH_TOOL_PREFIX' => 1,
+ 'LT_PATH_NM' => 1,
+ '_AC_PROG_LIBTOOL' => 1,
+ '_LT_AC_LANG_CXX' => 1,
'AM_MAKE_INCLUDE' => 1,
- '_LT_PREPARE_SED_QUOTE_VARS' => 1,
+ 'AM_MISSING_HAS_RUN' => 1,
+ 'AC_ENABLE_SHARED' => 1,
'_LT_PROG_F77' => 1,
- '_LT_AC_LANG_F77_CONFIG' => 1,
- 'AM_SANITY_CHECK' => 1,
- '_AM_OUTPUT_DEPENDENCY_COMMANDS' => 1,
- 'LT_AC_PROG_GCJ' => 1,
+ 'LTOPTIONS_VERSION' => 1,
+ 'AM_AUX_DIR_EXPAND' => 1,
+ 'AC_LIBTOOL_DLOPEN' => 1,
+ 'AC_DEFUN' => 1,
+ 'include' => 1,
+ '_LT_AC_TAGVAR' => 1,
+ '_LT_AC_SYS_LIBPATH_AIX' => 1,
+ 'AM_RUN_LOG' => 1,
+ 'AC_LTDL_ENABLE_INSTALL' => 1,
+ 'LT_SUPPORTED_TAG' => 1,
+ '_AM_SET_OPTION' => 1,
+ 'AM_OUTPUT_DEPENDENCY_COMMANDS' => 1,
'LT_LIB_M' => 1,
'_LT_AC_CHECK_DLFCN' => 1,
- 'AM_PROG_AS' => 1,
- '_LT_AC_TAGCONFIG' => 1,
- 'AM_MAINTAINER_MODE' => 1,
- '_LT_AC_LOCK' => 1,
- 'AM_ENABLE_SHARED' => 1,
- '_AC_PROG_LIBTOOL' => 1,
- 'AU_DEFUN' => 1,
+ '_LT_COMPILER_BOILERPLATE' => 1,
+ 'AC_DEPLIBS_CHECK_METHOD' => 1,
+ 'AM_PROG_LIBTOOL' => 1,
+ 'AM_SET_DEPDIR' => 1,
+ '_LT_AC_LANG_F77_CONFIG' => 1,
+ 'AC_PATH_MAGIC' => 1,
+ 'AC_PROG_LD_GNU' => 1,
+ 'LT_INIT' => 1,
+ '_AM_OUTPUT_DEPENDENCY_COMMANDS' => 1,
'AC_ENABLE_FAST_INSTALL' => 1,
- 'LT_SUPPORTED_TAG' => 1,
- '_AM_IF_OPTION' => 1,
+ 'AC_LIBTOOL_PICMODE' => 1,
+ 'LT_PROG_RC' => 1,
+ 'AC_CONFIG_MACRO_DIR' => 1,
+ 'AC_LIBTOOL_SYS_LIB_STRIP' => 1,
+ '_LT_AC_LANG_F77' => 1,
+ 'AC_LIBTOOL_FC' => 1,
+ '_LT_AC_LANG_CXX_CONFIG' => 1,
+ 'AM_SANITY_CHECK' => 1,
+ '_LT_AC_PROG_ECHO_BACKSLASH' => 1,
+ '_LT_LINKER_OPTION' => 1,
+ 'AC_DEFUN_ONCE' => 1,
+ 'AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH' => 1,
+ '_LT_LINKER_BOILERPLATE' => 1,
+ '_LT_AC_LANG_C_CONFIG' => 1,
+ 'm4_pattern_forbid' => 1,
+ 'AC_LTDL_OBJDIR' => 1,
+ 'AM_CONDITIONAL' => 1,
+ '_LT_PROG_LTMAIN' => 1,
+ 'LT_AC_PROG_GCJ' => 1,
+ 'AC_LIBTOOL_CONFIG' => 1,
+ 'm4_include' => 1,
+ '_m4_warn' => 1,
+ '_LT_PREPARE_SED_QUOTE_VARS' => 1,
+ '_LT_COMPILER_OPTION' => 1,
+ 'AM_PROG_AS' => 1,
+ 'AM_AUTOMAKE_VERSION' => 1,
+ 'AU_DEFUN' => 1,
+ 'LT_AC_PROG_EGREP' => 1,
+ 'AC_LIBTOOL_RC' => 1,
+ '_LT_PATH_TOOL_PREFIX' => 1,
+ '_LT_AC_TRY_DLOPEN_SELF' => 1,
+ '_LT_AC_SYS_COMPILER' => 1,
+ 'AC_LIBTOOL_COMPILER_OPTION' => 1,
+ 'AM_INIT_AUTOMAKE' => 1,
+ '_LT_AC_LOCK' => 1,
+ 'AC_LIBTOOL_LANG_C_CONFIG' => 1,
+ 'AC_LIBTOOL_POSTDEP_PREDEP' => 1,
+ 'AC_LIBTOOL_PROG_LD_SHLIBS' => 1,
+ '_LT_AC_LANG_GCJ_CONFIG' => 1,
+ '_LT_PROG_CXX' => 1,
+ 'AM_PROG_CC_C_O' => 1,
+ 'AM_PROG_NM' => 1,
+ 'LTOBSOLETE_VERSION' => 1,
+ 'AC_PROG_LD_RELOAD_FLAG' => 1,
+ 'm4_pattern_allow' => 1,
+ 'AC_PROG_NM' => 1,
+ 'AC_LIBTOOL_LANG_GCJ_CONFIG' => 1,
+ '_AM_SET_OPTIONS' => 1,
+ '_LT_AC_LANG_RC_CONFIG' => 1,
+ '_AM_PROG_CC_C_O' => 1,
+ 'LT_AC_PROG_RC' => 1,
+ 'AM_ENABLE_STATIC' => 1,
+ 'AM_PROG_LD' => 1,
+ 'AC_LIBTOOL_CXX' => 1,
+ '_LT_CC_BASENAME' => 1,
+ '_AM_MANGLE_OPTION' => 1,
+ 'AC_LIBTOOL_SYS_HARD_LINK_LOCKS' => 1,
'AC_LIBTOOL_F77' => 1,
- 'AC_LTDL_OBJDIR' => 1
+ '_AM_AUTOCONF_VERSION' => 1,
+ 'AC_LIBTOOL_WIN32_DLL' => 1,
+ 'AC_CHECK_LIBM' => 1,
+ '_LT_WITH_SYSROOT' => 1,
+ 'LTSUGAR_VERSION' => 1,
+ 'AC_DISABLE_STATIC' => 1,
+ 'GC_SET_VERSION' => 1,
+ '_LT_PROG_FC' => 1,
+ '_AM_SUBST_NOTMAKE' => 1,
+ '_LT_REQUIRED_DARWIN_CHECKS' => 1,
+ 'AC_ENABLE_STATIC' => 1,
+ 'AC_LIBTOOL_PROG_COMPILER_PIC' => 1,
+ '_LT_AC_FILE_LTDLL_C' => 1,
+ 'AM_DEP_TRACK' => 1,
+ 'AC_PROG_LD' => 1,
+ '_LT_PROG_ECHO_BACKSLASH' => 1,
+ 'AC_LIBTOOL_SETUP' => 1,
+ 'AC_PROG_EGREP' => 1,
+ 'AM_SILENT_RULES' => 1,
+ 'AM_DISABLE_STATIC' => 1,
+ '_LT_DLL_DEF_P' => 1,
+ 'AC_LIBTOOL_GCJ' => 1,
+ 'LT_PROG_GO' => 1
}
], 'Autom4te::Request' ),
bless( [
@@ -212,66 +212,66 @@
'configure.ac'
],
{
- 'AC_REQUIRE_AUX_FILE' => 1,
- '_AM_COND_ELSE' => 1,
'm4_sinclude' => 1,
- 'AM_INIT_AUTOMAKE' => 1,
- 'AM_EXTRA_RECURSIVE_TARGETS' => 1,
- 'AM_XGETTEXT_OPTION' => 1,
- 'AM_PROG_AR' => 1,
- 'AM_GNU_GETTEXT_INTL_SUBDIR' => 1,
- 'AM_PATH_GUILE' => 1,
- 'AM_NLS' => 1,
- '_AM_MAKEFILE_INCLUDE' => 1,
- 'm4_include' => 1,
- 'AC_LIBSOURCE' => 1,
- 'AM_PROG_CC_C_O' => 1,
- 'AC_DEFINE_TRACE_LITERAL' => 1,
- 'LT_INIT' => 1,
- 'm4_pattern_allow' => 1,
- 'AC_CONFIG_SUBDIRS' => 1,
- 'AC_CANONICAL_HOST' => 1,
- '_AM_SUBST_NOTMAKE' => 1,
- 'AM_PROG_FC_C_O' => 1,
- 'AC_FC_FREEFORM' => 1,
- 'm4_pattern_forbid' => 1,
- 'AM_AUTOMAKE_VERSION' => 1,
- 'include' => 1,
- 'AC_SUBST' => 1,
- 'AM_MAKEFILE_INCLUDE' => 1,
- 'AM_GNU_GETTEXT' => 1,
- 'AC_FC_PP_SRCEXT' => 1,
- 'AM_PROG_MOC' => 1,
- 'AC_INIT' => 1,
- 'AM_ENABLE_MULTILIB' => 1,
- 'AC_CONFIG_FILES' => 1,
- 'AM_POT_TOOLS' => 1,
- 'AM_SILENT_RULES' => 1,
- 'AM_PROG_CXX_C_O' => 1,
- 'AC_CANONICAL_BUILD' => 1,
- 'AC_CONFIG_HEADERS' => 1,
- 'AC_SUBST_TRACE' => 1,
- 'AC_CONFIG_LINKS' => 1,
- 'LT_CONFIG_LTDL_DIR' => 1,
- 'AM_PROG_LIBTOOL' => 1,
- 'AC_FC_SRCEXT' => 1,
- 'LT_SUPPORTED_TAG' => 1,
- 'AC_CONFIG_AUX_DIR' => 1,
- 'AC_CONFIG_LIBOBJ_DIR' => 1,
- 'AM_PROG_MKDIR_P' => 1,
'_AM_COND_IF' => 1,
- 'AM_CONDITIONAL' => 1,
- 'AC_CANONICAL_SYSTEM' => 1,
- '_m4_warn' => 1,
- 'AH_OUTPUT' => 1,
- 'AC_CANONICAL_TARGET' => 1,
- 'AM_PROG_F77_C_O' => 1,
- 'AC_PROG_LIBTOOL' => 1,
- 'AC_FC_PP_DEFINE' => 1,
+ 'AM_PATH_GUILE' => 1,
+ 'AC_LIBSOURCE' => 1,
+ 'AM_PROG_CXX_C_O' => 1,
+ 'AM_GNU_GETTEXT_INTL_SUBDIR' => 1,
+ 'AM_EXTRA_RECURSIVE_TARGETS' => 1,
+ 'AM_ENABLE_MULTILIB' => 1,
+ 'm4_pattern_allow' => 1,
+ '_AM_COND_ELSE' => 1,
+ 'AC_CANONICAL_HOST' => 1,
'_AM_COND_ENDIF' => 1,
- 'AM_MAINTAINER_MODE' => 1,
+ 'AM_MAKEFILE_INCLUDE' => 1,
+ 'AC_CONFIG_SUBDIRS' => 1,
+ '_m4_warn' => 1,
+ 'm4_include' => 1,
+ 'AM_GNU_GETTEXT' => 1,
+ 'AC_FC_FREEFORM' => 1,
+ 'AM_XGETTEXT_OPTION' => 1,
+ 'include' => 1,
+ 'AC_REQUIRE_AUX_FILE' => 1,
+ 'AM_AUTOMAKE_VERSION' => 1,
+ 'AC_FC_SRCEXT' => 1,
+ 'AM_CONDITIONAL' => 1,
+ 'AM_POT_TOOLS' => 1,
+ 'm4_pattern_forbid' => 1,
+ 'AM_PROG_MKDIR_P' => 1,
'_LT_AC_TAGCONFIG' => 1,
- 'sinclude' => 1
+ 'AC_CONFIG_FILES' => 1,
+ 'AC_CONFIG_LIBOBJ_DIR' => 1,
+ 'AM_PROG_AR' => 1,
+ 'AM_PROG_MOC' => 1,
+ 'AC_PROG_LIBTOOL' => 1,
+ 'AH_OUTPUT' => 1,
+ 'AC_CONFIG_HEADERS' => 1,
+ 'AC_FC_PP_DEFINE' => 1,
+ 'AM_PROG_FC_C_O' => 1,
+ 'LT_SUPPORTED_TAG' => 1,
+ 'AC_CANONICAL_BUILD' => 1,
+ '_AM_MAKEFILE_INCLUDE' => 1,
+ '_AM_SUBST_NOTMAKE' => 1,
+ 'AC_CANONICAL_TARGET' => 1,
+ 'AC_CONFIG_AUX_DIR' => 1,
+ 'AC_CANONICAL_SYSTEM' => 1,
+ 'LT_INIT' => 1,
+ 'AC_FC_PP_SRCEXT' => 1,
+ 'LT_CONFIG_LTDL_DIR' => 1,
+ 'AM_PROG_CC_C_O' => 1,
+ 'AM_SILENT_RULES' => 1,
+ 'AC_CONFIG_LINKS' => 1,
+ 'AM_PROG_F77_C_O' => 1,
+ 'sinclude' => 1,
+ 'AM_NLS' => 1,
+ 'AM_INIT_AUTOMAKE' => 1,
+ 'AC_SUBST' => 1,
+ 'AC_SUBST_TRACE' => 1,
+ 'AC_INIT' => 1,
+ 'AC_DEFINE_TRACE_LITERAL' => 1,
+ 'AM_PROG_LIBTOOL' => 1,
+ 'AM_MAINTAINER_MODE' => 1
}
], 'Autom4te::Request' ),
bless( [
@@ -313,162 +313,162 @@
'configure.ac'
],
{
- '_LT_AC_LANG_F77' => 1,
- '_LT_COMPILER_OPTION' => 1,
- 'AM_SILENT_RULES' => 1,
- '_LT_COMPILER_BOILERPLATE' => 1,
- 'AC_LIBTOOL_PROG_LD_SHLIBS' => 1,
- 'AM_MISSING_HAS_RUN' => 1,
- 'm4_pattern_forbid' => 1,
- 'AM_ENABLE_STATIC' => 1,
- 'AC_ENABLE_STATIC' => 1,
- 'AC_PROG_LD_RELOAD_FLAG' => 1,
- '_AM_SUBST_NOTMAKE' => 1,
- 'AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE' => 1,
- 'm4_pattern_allow' => 1,
- 'LTSUGAR_VERSION' => 1,
- 'AM_INIT_AUTOMAKE' => 1,
- '_LT_PROG_FC' => 1,
- 'AC_LIBTOOL_SYS_HARD_LINK_LOCKS' => 1,
- 'AC_DEFUN' => 1,
- 'AM_PROG_INSTALL_SH' => 1,
- 'AC_LIBTOOL_LANG_F77_CONFIG' => 1,
- '_LT_PATH_TOOL_PREFIX' => 1,
- 'AC_CONFIG_MACRO_DIR_TRACE' => 1,
- 'AC_LIBTOOL_DLOPEN' => 1,
- 'LT_OUTPUT' => 1,
- 'AC_PROG_LD' => 1,
- 'LT_LANG' => 1,
- 'AC_LIBTOOL_COMPILER_OPTION' => 1,
- '_LT_CC_BASENAME' => 1,
- 'AC_DISABLE_STATIC' => 1,
- '_LT_AC_SYS_COMPILER' => 1,
- '_LT_AC_LANG_RC_CONFIG' => 1,
- 'AM_DISABLE_SHARED' => 1,
- 'AM_OUTPUT_DEPENDENCY_COMMANDS' => 1,
- '_LT_REQUIRED_DARWIN_CHECKS' => 1,
- 'LT_SYS_DLOPEN_SELF' => 1,
- '_LT_AC_FILE_LTDLL_C' => 1,
- 'LT_AC_PROG_SED' => 1,
- '_LT_PROG_CXX' => 1,
- 'LTOBSOLETE_VERSION' => 1,
- '_LT_DLL_DEF_P' => 1,
- 'AC_LIBTOOL_LANG_GCJ_CONFIG' => 1,
- 'AM_SET_CURRENT_AUTOMAKE_VERSION' => 1,
- 'AM_AUTOMAKE_VERSION' => 1,
- 'include' => 1,
- 'AC_LIBTOOL_LANG_RC_CONFIG' => 1,
- 'AC_LIBTOOL_POSTDEP_PREDEP' => 1,
- 'LT_PROG_GO' => 1,
- '_LT_AC_TRY_DLOPEN_SELF' => 1,
- 'AC_DISABLE_FAST_INSTALL' => 1,
- 'AC_DEFUN_ONCE' => 1,
- 'AM_DISABLE_STATIC' => 1,
'm4_include' => 1,
- 'AM_PROG_CC_C_O' => 1,
- 'AC_LIBTOOL_LANG_C_CONFIG' => 1,
- 'LT_INIT' => 1,
- 'AC_ENABLE_SHARED' => 1,
- 'AC_LIBTOOL_LINKER_OPTION' => 1,
- '_LT_AC_LANG_GCJ_CONFIG' => 1,
- 'AM_PROG_NM' => 1,
- 'AC_LIBTOOL_PROG_COMPILER_PIC' => 1,
- 'AC_LIBTOOL_PICMODE' => 1,
- 'AM_DEP_TRACK' => 1,
- 'AC_DISABLE_SHARED' => 1,
- '_LT_AC_LANG_CXX_CONFIG' => 1,
- 'LT_CMD_MAX_LEN' => 1,
- '_AM_CONFIG_MACRO_DIRS' => 1,
- 'LT_AC_PROG_EGREP' => 1,
- '_LT_AC_LANG_C_CONFIG' => 1,
- 'AC_CHECK_LIBM' => 1,
- '_LT_PROG_ECHO_BACKSLASH' => 1,
- '_LT_AC_LANG_CXX' => 1,
- 'AC_PATH_MAGIC' => 1,
- 'LT_PROG_GCJ' => 1,
'_m4_warn' => 1,
- '_LT_AC_SYS_LIBPATH_AIX' => 1,
- 'AC_PATH_TOOL_PREFIX' => 1,
- 'AC_LIBTOOL_RC' => 1,
- 'AC_LIBTOOL_FC' => 1,
- 'AM_SET_DEPDIR' => 1,
- 'AC_LIBTOOL_WIN32_DLL' => 1,
- 'AC_LIBTOOL_SYS_MAX_CMD_LEN' => 1,
- '_AM_SET_OPTIONS' => 1,
- 'AC_LIBTOOL_SYS_DYNAMIC_LINKER' => 1,
- 'AC_LTDL_PREOPEN' => 1,
- 'AC_LIBTOOL_SYS_LIB_STRIP' => 1,
- '_LT_AC_SHELL_INIT' => 1,
- '_LT_PROG_LTMAIN' => 1,
- '_AC_AM_CONFIG_HEADER_HOOK' => 1,
- 'LTVERSION_VERSION' => 1,
- 'AM_SET_LEADING_DOT' => 1,
- 'AC_LIBTOOL_CXX' => 1,
- 'AC_LTDL_ENABLE_INSTALL' => 1,
- 'AC_LIBTOOL_SETUP' => 1,
- 'AC_LIBTOOL_OBJDIR' => 1,
- 'AC_DEPLIBS_CHECK_METHOD' => 1,
- 'AC_LIBTOOL_LANG_CXX_CONFIG' => 1,
- '_AM_AUTOCONF_VERSION' => 1,
- 'AC_CONFIG_MACRO_DIR' => 1,
+ '_LT_COMPILER_OPTION' => 1,
+ '_LT_PREPARE_SED_QUOTE_VARS' => 1,
'AM_PROG_AS' => 1,
- 'AM_MAINTAINER_MODE' => 1,
+ 'AM_AUTOMAKE_VERSION' => 1,
+ '_LT_AC_LANG_C_CONFIG' => 1,
+ 'm4_pattern_forbid' => 1,
+ 'AC_LTDL_OBJDIR' => 1,
+ 'AM_CONDITIONAL' => 1,
+ '_LT_PROG_LTMAIN' => 1,
+ 'LT_AC_PROG_GCJ' => 1,
+ 'AC_LIBTOOL_CONFIG' => 1,
+ '_LT_LINKER_OPTION' => 1,
+ 'AC_DEFUN_ONCE' => 1,
+ 'AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH' => 1,
+ '_LT_LINKER_BOILERPLATE' => 1,
+ 'LT_PROG_RC' => 1,
+ 'AC_LIBTOOL_PICMODE' => 1,
+ 'AC_LIBTOOL_SYS_LIB_STRIP' => 1,
+ 'AC_CONFIG_MACRO_DIR' => 1,
+ '_LT_AC_LANG_F77' => 1,
+ '_LT_AC_LANG_CXX_CONFIG' => 1,
+ 'AC_LIBTOOL_FC' => 1,
+ 'AM_SANITY_CHECK' => 1,
+ '_LT_AC_PROG_ECHO_BACKSLASH' => 1,
+ '_LT_AC_LANG_GCJ_CONFIG' => 1,
+ '_LT_PROG_CXX' => 1,
+ 'AM_PROG_CC_C_O' => 1,
+ 'AM_INIT_AUTOMAKE' => 1,
+ '_LT_AC_LOCK' => 1,
+ 'AC_LIBTOOL_LANG_C_CONFIG' => 1,
+ 'AC_LIBTOOL_PROG_LD_SHLIBS' => 1,
+ 'AC_LIBTOOL_POSTDEP_PREDEP' => 1,
+ '_LT_PATH_TOOL_PREFIX' => 1,
+ '_LT_AC_SYS_COMPILER' => 1,
+ '_LT_AC_TRY_DLOPEN_SELF' => 1,
+ 'AC_LIBTOOL_COMPILER_OPTION' => 1,
+ 'AU_DEFUN' => 1,
+ 'AC_LIBTOOL_RC' => 1,
+ 'LT_AC_PROG_EGREP' => 1,
+ '_LT_WITH_SYSROOT' => 1,
+ 'LTSUGAR_VERSION' => 1,
+ 'AC_DISABLE_STATIC' => 1,
+ '_LT_CC_BASENAME' => 1,
+ 'AC_LIBTOOL_CXX' => 1,
+ '_AM_MANGLE_OPTION' => 1,
+ 'AM_ENABLE_STATIC' => 1,
+ 'AM_PROG_LD' => 1,
+ 'AC_LIBTOOL_F77' => 1,
+ '_AM_AUTOCONF_VERSION' => 1,
+ 'AC_LIBTOOL_SYS_HARD_LINK_LOCKS' => 1,
+ 'AC_LIBTOOL_WIN32_DLL' => 1,
+ 'AC_CHECK_LIBM' => 1,
+ 'AC_LIBTOOL_LANG_GCJ_CONFIG' => 1,
+ '_AM_SET_OPTIONS' => 1,
+ '_LT_AC_LANG_RC_CONFIG' => 1,
+ 'LT_AC_PROG_RC' => 1,
+ '_AM_PROG_CC_C_O' => 1,
+ 'AM_PROG_NM' => 1,
+ 'LTOBSOLETE_VERSION' => 1,
+ 'AC_PROG_LD_RELOAD_FLAG' => 1,
+ 'm4_pattern_allow' => 1,
+ 'AC_PROG_NM' => 1,
+ 'AM_DEP_TRACK' => 1,
+ 'AC_PROG_LD' => 1,
+ '_LT_PROG_ECHO_BACKSLASH' => 1,
+ 'AC_LIBTOOL_SETUP' => 1,
+ 'AC_PROG_EGREP' => 1,
+ 'AM_DISABLE_STATIC' => 1,
+ 'AM_SILENT_RULES' => 1,
+ 'AC_LIBTOOL_GCJ' => 1,
+ '_LT_DLL_DEF_P' => 1,
+ 'LT_PROG_GO' => 1,
+ 'AC_ENABLE_STATIC' => 1,
+ 'AC_LIBTOOL_PROG_COMPILER_PIC' => 1,
+ '_LT_AC_FILE_LTDLL_C' => 1,
+ '_LT_PROG_FC' => 1,
+ '_AM_SUBST_NOTMAKE' => 1,
+ '_LT_REQUIRED_DARWIN_CHECKS' => 1,
+ 'GC_SET_VERSION' => 1,
+ 'AC_LIBTOOL_LANG_CXX_CONFIG' => 1,
+ 'AM_ENABLE_SHARED' => 1,
+ 'AM_PROG_INSTALL_SH' => 1,
+ 'LTVERSION_VERSION' => 1,
+ 'LT_PROG_GCJ' => 1,
+ '_LT_AC_PROG_CXXCPP' => 1,
+ 'LT_AC_PROG_SED' => 1,
'_LT_AC_TAGCONFIG' => 1,
+ '_LT_AC_LANG_GCJ' => 1,
+ 'AC_LIBTOOL_LANG_RC_CONFIG' => 1,
+ 'AC_PROG_LIBTOOL' => 1,
+ 'AC_LIBTOOL_LANG_F77_CONFIG' => 1,
+ 'AC_LIBTOOL_LINKER_OPTION' => 1,
+ '_AM_PROG_TAR' => 1,
+ 'AC_LTDL_PREOPEN' => 1,
+ 'AC_LIBTOOL_SYS_OLD_ARCHIVE' => 1,
+ '_AM_IF_OPTION' => 1,
+ 'LT_SYS_DLOPEN_SELF' => 1,
+ '_AM_DEPENDENCIES' => 1,
+ 'LT_CMD_MAX_LEN' => 1,
+ 'AC_LIBTOOL_PROG_CC_C_O' => 1,
+ 'AM_SUBST_NOTMAKE' => 1,
+ 'AC_DISABLE_FAST_INSTALL' => 1,
+ 'AM_SET_CURRENT_AUTOMAKE_VERSION' => 1,
+ 'AC_DISABLE_SHARED' => 1,
+ 'LT_OUTPUT' => 1,
+ 'AC_LIBTOOL_DLOPEN_SELF' => 1,
+ '_AM_CONFIG_MACRO_DIRS' => 1,
+ 'AC_CONFIG_MACRO_DIR_TRACE' => 1,
+ 'AC_LIBTOOL_SYS_DYNAMIC_LINKER' => 1,
+ 'AM_MAINTAINER_MODE' => 1,
+ 'LT_PATH_LD' => 1,
+ '_AC_AM_CONFIG_HEADER_HOOK' => 1,
+ 'AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE' => 1,
+ 'AM_MISSING_PROG' => 1,
+ 'AM_PROG_INSTALL_STRIP' => 1,
+ 'AM_SET_LEADING_DOT' => 1,
+ 'AC_LIBTOOL_PROG_COMPILER_NO_RTTI' => 1,
+ 'AC_LIBTOOL_SYS_MAX_CMD_LEN' => 1,
+ '_LT_AC_SHELL_INIT' => 1,
+ 'LTOPTIONS_VERSION' => 1,
+ 'AM_AUX_DIR_EXPAND' => 1,
+ 'AC_LIBTOOL_DLOPEN' => 1,
+ 'include' => 1,
+ 'AC_DEFUN' => 1,
+ 'AM_MISSING_HAS_RUN' => 1,
+ 'AM_MAKE_INCLUDE' => 1,
+ 'AC_ENABLE_SHARED' => 1,
+ '_LT_PROG_F77' => 1,
+ 'AC_PATH_TOOL_PREFIX' => 1,
+ 'LT_PATH_NM' => 1,
+ '_AC_PROG_LIBTOOL' => 1,
+ '_LT_AC_LANG_CXX' => 1,
+ 'AC_LIBTOOL_OBJDIR' => 1,
+ 'AM_DISABLE_SHARED' => 1,
+ 'LT_LANG' => 1,
+ 'LT_INIT' => 1,
+ 'AC_PROG_LD_GNU' => 1,
+ '_AM_OUTPUT_DEPENDENCY_COMMANDS' => 1,
+ 'AC_ENABLE_FAST_INSTALL' => 1,
+ '_LT_COMPILER_BOILERPLATE' => 1,
+ 'AC_DEPLIBS_CHECK_METHOD' => 1,
+ 'AM_PROG_LIBTOOL' => 1,
+ 'AM_SET_DEPDIR' => 1,
+ 'AC_PATH_MAGIC' => 1,
+ '_LT_AC_LANG_F77_CONFIG' => 1,
+ 'AC_LTDL_ENABLE_INSTALL' => 1,
+ 'LT_SUPPORTED_TAG' => 1,
+ 'AM_OUTPUT_DEPENDENCY_COMMANDS' => 1,
+ '_AM_SET_OPTION' => 1,
'LT_LIB_M' => 1,
'_LT_AC_CHECK_DLFCN' => 1,
- '_LT_AC_LOCK' => 1,
'_LT_AC_TAGVAR' => 1,
- '_AM_DEPENDENCIES' => 1,
- 'AM_SANITY_CHECK' => 1,
- 'LT_AC_PROG_GCJ' => 1,
- '_AM_OUTPUT_DEPENDENCY_COMMANDS' => 1,
- '_LT_PREPARE_SED_QUOTE_VARS' => 1,
- 'AM_MAKE_INCLUDE' => 1,
- '_LT_PROG_F77' => 1,
- '_LT_AC_LANG_F77_CONFIG' => 1,
- 'AC_ENABLE_FAST_INSTALL' => 1,
- 'LT_SUPPORTED_TAG' => 1,
- 'AU_DEFUN' => 1,
- 'AC_LIBTOOL_F77' => 1,
- 'AC_LTDL_OBJDIR' => 1,
- '_AM_IF_OPTION' => 1,
- 'AM_ENABLE_SHARED' => 1,
- '_AC_PROG_LIBTOOL' => 1,
- 'AM_PROG_LD' => 1,
- 'LT_PATH_LD' => 1,
- '_AM_MANGLE_OPTION' => 1,
- '_LT_LINKER_OPTION' => 1,
- 'AC_PROG_EGREP' => 1,
- 'AC_PROG_LD_GNU' => 1,
- 'AC_LIBTOOL_DLOPEN_SELF' => 1,
- 'AM_PROG_INSTALL_STRIP' => 1,
- 'AC_LIBTOOL_SYS_OLD_ARCHIVE' => 1,
- '_LT_WITH_SYSROOT' => 1,
- 'LT_PROG_RC' => 1,
- '_AM_SET_OPTION' => 1,
- '_LT_AC_LANG_GCJ' => 1,
- '_AM_PROG_CC_C_O' => 1,
- 'GC_SET_VERSION' => 1,
- 'AC_PROG_NM' => 1,
- 'AC_PROG_LIBTOOL' => 1,
- 'AM_SUBST_NOTMAKE' => 1,
- 'AC_LIBTOOL_PROG_COMPILER_NO_RTTI' => 1,
- 'AC_LIBTOOL_GCJ' => 1,
- '_LT_AC_PROG_ECHO_BACKSLASH' => 1,
- 'AC_LIBTOOL_PROG_CC_C_O' => 1,
- 'AM_AUX_DIR_EXPAND' => 1,
- 'AC_LIBTOOL_CONFIG' => 1,
- '_LT_AC_PROG_CXXCPP' => 1,
- 'AM_CONDITIONAL' => 1,
- 'LT_PATH_NM' => 1,
- 'AM_PROG_LIBTOOL' => 1,
'AM_RUN_LOG' => 1,
- '_AM_PROG_TAR' => 1,
- 'AM_MISSING_PROG' => 1,
- 'LT_AC_PROG_RC' => 1,
- 'AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH' => 1,
- 'LTOPTIONS_VERSION' => 1,
- '_LT_LINKER_BOILERPLATE' => 1
+ '_LT_AC_SYS_LIBPATH_AIX' => 1
}
], 'Autom4te::Request' )
);
diff --git a/external/bdwgc/config.log b/external/bdwgc/config.log
index ac5e81ba89..1a1a6fe142 100644
--- a/external/bdwgc/config.log
+++ b/external/bdwgc/config.log
@@ -10,11 +10,11 @@ generated by GNU Autoconf 2.69. Invocation command line was
## Platform. ##
## --------- ##
-hostname = az-ubuntu-generala37872
+hostname = az-ubuntu-general34f900
uname -m = x86_64
-uname -r = 4.15.0-1082-azure
+uname -r = 4.15.0-1091-azure
uname -s = Linux
-uname -v = #92~16.04.1-Ubuntu SMP Tue Apr 14 22:28:34 UTC 2020
+uname -v = #101~16.04.1-Ubuntu SMP Fri Jun 26 01:14:12 UTC 2020
/usr/bin/uname -p = unknown
/bin/uname -X = unknown
@@ -747,7 +747,7 @@ generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_COMMANDS =
$ ./config.status
-on az-ubuntu-generala37872
+on az-ubuntu-general34f900
config.status:1238: creating Makefile
config.status:1238: creating bdw-gc.pc
diff --git a/external/bdwgc/libatomic_ops/Makefile.in b/external/bdwgc/libatomic_ops/Makefile.in
new file mode 100644
index 0000000000..ea61f29d5b
--- /dev/null
+++ b/external/bdwgc/libatomic_ops/Makefile.in
@@ -0,0 +1,895 @@
+# Makefile.in generated by automake 1.15 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
+
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+VPATH = @srcdir@
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+subdir = .
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
+ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+ $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \
+ $(am__configure_deps) $(dist_pkgdata_DATA) $(am__DIST_COMMON)
+am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
+ configure.lineno config.status.lineno
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/src/config.h
+CONFIG_CLEAN_FILES = pkgconfig/atomic_ops.pc \
+ pkgconfig/atomic_ops-uninstalled.pc
+CONFIG_CLEAN_VPATH_FILES =
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 =
+SOURCES =
+DIST_SOURCES =
+RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
+ ctags-recursive dvi-recursive html-recursive info-recursive \
+ install-data-recursive install-dvi-recursive \
+ install-exec-recursive install-html-recursive \
+ install-info-recursive install-pdf-recursive \
+ install-ps-recursive install-recursive installcheck-recursive \
+ installdirs-recursive pdf-recursive ps-recursive \
+ tags-recursive uninstall-recursive
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+ test -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && rm -f $$files; }; \
+ }
+am__installdirs = "$(DESTDIR)$(pkgdatadir)" \
+ "$(DESTDIR)$(pkgconfigdir)"
+DATA = $(dist_pkgdata_DATA) $(noinst_DATA) $(pkgconfig_DATA)
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
+ distclean-recursive maintainer-clean-recursive
+am__recursive_targets = \
+ $(RECURSIVE_TARGETS) \
+ $(RECURSIVE_CLEAN_TARGETS) \
+ $(am__extra_recursive_targets)
+AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
+ cscope distdir dist dist-all distcheck
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates. Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+ BEGIN { nonempty = 0; } \
+ { items[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique. This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+ list='$(am__tagged_files)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | $(am__uniquify_input)`
+ETAGS = etags
+CTAGS = ctags
+CSCOPE = cscope
+DIST_SUBDIRS = $(SUBDIRS)
+am__DIST_COMMON = $(srcdir)/Makefile.in \
+ $(top_srcdir)/pkgconfig/atomic_ops-uninstalled.pc.in \
+ $(top_srcdir)/pkgconfig/atomic_ops.pc.in AUTHORS COPYING \
+ ChangeLog TODO compile config.guess config.sub install-sh \
+ ltmain.sh missing
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+distdir = $(PACKAGE)-$(VERSION)
+top_distdir = $(distdir)
+am__remove_distdir = \
+ if test -d "$(distdir)"; then \
+ find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
+ && rm -rf "$(distdir)" \
+ || { sleep 5 && rm -rf "$(distdir)"; }; \
+ else :; fi
+am__post_remove_distdir = $(am__remove_distdir)
+am__relativize = \
+ dir0=`pwd`; \
+ sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+ sed_rest='s,^[^/]*/*,,'; \
+ sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+ sed_butlast='s,/*[^/]*$$,,'; \
+ while test -n "$$dir1"; do \
+ first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+ if test "$$first" != "."; then \
+ if test "$$first" = ".."; then \
+ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+ else \
+ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+ if test "$$first2" = "$$first"; then \
+ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+ else \
+ dir2="../$$dir2"; \
+ fi; \
+ dir0="$$dir0"/"$$first"; \
+ fi; \
+ fi; \
+ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+ done; \
+ reldir="$$dir2"
+DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2
+GZIP_ENV = --best
+DIST_TARGETS = dist-bzip2 dist-gzip
+distuninstallcheck_listfiles = find . -type f -print
+am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
+ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
+distcleancheck_listfiles = find . -type f -print
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCAS = @CCAS@
+CCASDEPMODE = @CCASDEPMODE@
+CCASFLAGS = @CCASFLAGS@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PICFLAG = @PICFLAG@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+THREADDLLIBS = @THREADDLLIBS@
+VERSION = @VERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+runstatedir = @runstatedir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+SUBDIRS = src doc
+ACLOCAL_AMFLAGS = -I m4
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = pkgconfig/atomic_ops.pc
+noinst_DATA = pkgconfig/atomic_ops-uninstalled.pc
+dist_pkgdata_DATA = COPYING README.md
+EXTRA_DIST = autogen.sh
+all: all-recursive
+
+.SUFFIXES:
+am--refresh: Makefile
+ @:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \
+ $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ echo ' $(SHELL) ./config.status'; \
+ $(SHELL) ./config.status;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ $(SHELL) ./config.status --recheck
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ $(am__cd) $(srcdir) && $(AUTOCONF)
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+$(am__aclocal_m4_deps):
+pkgconfig/atomic_ops.pc: $(top_builddir)/config.status $(top_srcdir)/pkgconfig/atomic_ops.pc.in
+ cd $(top_builddir) && $(SHELL) ./config.status $@
+pkgconfig/atomic_ops-uninstalled.pc: $(top_builddir)/config.status $(top_srcdir)/pkgconfig/atomic_ops-uninstalled.pc.in
+ cd $(top_builddir) && $(SHELL) ./config.status $@
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+distclean-libtool:
+ -rm -f libtool config.lt
+install-dist_pkgdataDATA: $(dist_pkgdata_DATA)
+ @$(NORMAL_INSTALL)
+ @list='$(dist_pkgdata_DATA)'; test -n "$(pkgdatadir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(pkgdatadir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(pkgdatadir)" || exit 1; \
+ fi; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgdatadir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgdatadir)" || exit $$?; \
+ done
+
+uninstall-dist_pkgdataDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(dist_pkgdata_DATA)'; test -n "$(pkgdatadir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ dir='$(DESTDIR)$(pkgdatadir)'; $(am__uninstall_files_from_dir)
+install-pkgconfigDATA: $(pkgconfig_DATA)
+ @$(NORMAL_INSTALL)
+ @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(pkgconfigdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" || exit 1; \
+ fi; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \
+ done
+
+uninstall-pkgconfigDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir)
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run 'make' without going through this Makefile.
+# To change the values of 'make' variables: instead of editing Makefiles,
+# (1) if the variable is set in 'config.status', edit 'config.status'
+# (which will cause the Makefiles to be regenerated when you run 'make');
+# (2) otherwise, pass the desired values on the 'make' command line.
+$(am__recursive_targets):
+ @fail=; \
+ if $(am__make_keepgoing); then \
+ failcom='fail=yes'; \
+ else \
+ failcom='exit 1'; \
+ fi; \
+ dot_seen=no; \
+ target=`echo $@ | sed s/-recursive//`; \
+ case "$@" in \
+ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+ *) list='$(SUBDIRS)' ;; \
+ esac; \
+ for subdir in $$list; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ dot_seen=yes; \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done; \
+ if test "$$dot_seen" = "no"; then \
+ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ fi; test -z "$$fail"
+
+ID: $(am__tagged_files)
+ $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-recursive
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ set x; \
+ here=`pwd`; \
+ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+ include_option=--etags-include; \
+ empty_fix=.; \
+ else \
+ include_option=--include; \
+ empty_fix=; \
+ fi; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test ! -f $$subdir/TAGS || \
+ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
+ fi; \
+ done; \
+ $(am__define_uniq_tagged_files); \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: ctags-recursive
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ $(am__define_uniq_tagged_files); \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+cscope: cscope.files
+ test ! -s cscope.files \
+ || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS)
+clean-cscope:
+ -rm -f cscope.files
+cscope.files: clean-cscope cscopelist
+cscopelist: cscopelist-recursive
+
+cscopelist-am: $(am__tagged_files)
+ list='$(am__tagged_files)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+ -rm -f cscope.out cscope.in.out cscope.po.out cscope.files
+
+distdir: $(DISTFILES)
+ $(am__remove_distdir)
+ test -d "$(distdir)" || mkdir "$(distdir)"
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+ @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ $(am__make_dryrun) \
+ || test -d "$(distdir)/$$subdir" \
+ || $(MKDIR_P) "$(distdir)/$$subdir" \
+ || exit 1; \
+ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+ $(am__relativize); \
+ new_distdir=$$reldir; \
+ dir1=$$subdir; dir2="$(top_distdir)"; \
+ $(am__relativize); \
+ new_top_distdir=$$reldir; \
+ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+ ($(am__cd) $$subdir && \
+ $(MAKE) $(AM_MAKEFLAGS) \
+ top_distdir="$$new_top_distdir" \
+ distdir="$$new_distdir" \
+ am__remove_distdir=: \
+ am__skip_length_check=: \
+ am__skip_mode_fix=: \
+ distdir) \
+ || exit 1; \
+ fi; \
+ done
+ -test -n "$(am__skip_mode_fix)" \
+ || find "$(distdir)" -type d ! -perm -755 \
+ -exec chmod u+rwx,go+rx {} \; -o \
+ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
+ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
+ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
+ || chmod -R a+r "$(distdir)"
+dist-gzip: distdir
+ tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+ $(am__post_remove_distdir)
+dist-bzip2: distdir
+ tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
+ $(am__post_remove_distdir)
+
+dist-lzip: distdir
+ tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz
+ $(am__post_remove_distdir)
+
+dist-xz: distdir
+ tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
+ $(am__post_remove_distdir)
+
+dist-tarZ: distdir
+ @echo WARNING: "Support for distribution archives compressed with" \
+ "legacy program 'compress' is deprecated." >&2
+ @echo WARNING: "It will be removed altogether in Automake 2.0" >&2
+ tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
+ $(am__post_remove_distdir)
+
+dist-shar: distdir
+ @echo WARNING: "Support for shar distribution archives is" \
+ "deprecated." >&2
+ @echo WARNING: "It will be removed altogether in Automake 2.0" >&2
+ shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
+ $(am__post_remove_distdir)
+
+dist-zip: distdir
+ -rm -f $(distdir).zip
+ zip -rq $(distdir).zip $(distdir)
+ $(am__post_remove_distdir)
+
+dist dist-all:
+ $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:'
+ $(am__post_remove_distdir)
+
+# This target untars the dist file and tries a VPATH configuration. Then
+# it guarantees that the distribution is self-contained by making another
+# tarfile.
+distcheck: dist
+ case '$(DIST_ARCHIVES)' in \
+ *.tar.gz*) \
+ GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
+ *.tar.bz2*) \
+ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
+ *.tar.lz*) \
+ lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
+ *.tar.xz*) \
+ xz -dc $(distdir).tar.xz | $(am__untar) ;;\
+ *.tar.Z*) \
+ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
+ *.shar.gz*) \
+ GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
+ *.zip*) \
+ unzip $(distdir).zip ;;\
+ esac
+ chmod -R a-w $(distdir)
+ chmod u+w $(distdir)
+ mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst
+ chmod a-w $(distdir)
+ test -d $(distdir)/_build || exit 0; \
+ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
+ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
+ && am__cwd=`pwd` \
+ && $(am__cd) $(distdir)/_build/sub \
+ && ../../configure \
+ $(AM_DISTCHECK_CONFIGURE_FLAGS) \
+ $(DISTCHECK_CONFIGURE_FLAGS) \
+ --srcdir=../.. --prefix="$$dc_install_base" \
+ && $(MAKE) $(AM_MAKEFLAGS) \
+ && $(MAKE) $(AM_MAKEFLAGS) dvi \
+ && $(MAKE) $(AM_MAKEFLAGS) check \
+ && $(MAKE) $(AM_MAKEFLAGS) install \
+ && $(MAKE) $(AM_MAKEFLAGS) installcheck \
+ && $(MAKE) $(AM_MAKEFLAGS) uninstall \
+ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
+ distuninstallcheck \
+ && chmod -R a-w "$$dc_install_base" \
+ && ({ \
+ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \
+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
+ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
+ } || { rm -rf "$$dc_destdir"; exit 1; }) \
+ && rm -rf "$$dc_destdir" \
+ && $(MAKE) $(AM_MAKEFLAGS) dist \
+ && rm -rf $(DIST_ARCHIVES) \
+ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
+ && cd "$$am__cwd" \
+ || exit 1
+ $(am__post_remove_distdir)
+ @(echo "$(distdir) archives ready for distribution: "; \
+ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
+ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
+distuninstallcheck:
+ @test -n '$(distuninstallcheck_dir)' || { \
+ echo 'ERROR: trying to run $@ with an empty' \
+ '$$(distuninstallcheck_dir)' >&2; \
+ exit 1; \
+ }; \
+ $(am__cd) '$(distuninstallcheck_dir)' || { \
+ echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \
+ exit 1; \
+ }; \
+ test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \
+ || { echo "ERROR: files left after uninstall:" ; \
+ if test -n "$(DESTDIR)"; then \
+ echo " (check DESTDIR support)"; \
+ fi ; \
+ $(distuninstallcheck_listfiles) ; \
+ exit 1; } >&2
+distcleancheck: distclean
+ @if test '$(srcdir)' = . ; then \
+ echo "ERROR: distcleancheck can only run from a VPATH build" ; \
+ exit 1 ; \
+ fi
+ @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
+ || { echo "ERROR: files left in build directory after distclean:" ; \
+ $(distcleancheck_listfiles) ; \
+ exit 1; } >&2
+check-am: all-am
+check: check-recursive
+all-am: Makefile $(DATA)
+installdirs: installdirs-recursive
+installdirs-am:
+ for dir in "$(DESTDIR)$(pkgdatadir)" "$(DESTDIR)$(pkgconfigdir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-recursive
+
+clean-am: clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-recursive
+ -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-libtool \
+ distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+html-am:
+
+info: info-recursive
+
+info-am:
+
+install-data-am: install-dist_pkgdataDATA install-pkgconfigDATA
+
+install-dvi: install-dvi-recursive
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-recursive
+
+install-html-am:
+
+install-info: install-info-recursive
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-recursive
+
+install-pdf-am:
+
+install-ps: install-ps-recursive
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+ -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+ -rm -rf $(top_srcdir)/autom4te.cache
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-generic mostlyclean-libtool
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am: uninstall-dist_pkgdataDATA uninstall-pkgconfigDATA
+
+.MAKE: $(am__recursive_targets) install-am install-strip
+
+.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \
+ am--refresh check check-am clean clean-cscope clean-generic \
+ clean-libtool cscope cscopelist-am ctags ctags-am dist \
+ dist-all dist-bzip2 dist-gzip dist-lzip dist-shar dist-tarZ \
+ dist-xz dist-zip distcheck distclean distclean-generic \
+ distclean-libtool distclean-tags distcleancheck distdir \
+ distuninstallcheck dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am \
+ install-dist_pkgdataDATA install-dvi install-dvi-am \
+ install-exec install-exec-am install-html install-html-am \
+ install-info install-info-am install-man install-pdf \
+ install-pdf-am install-pkgconfigDATA install-ps install-ps-am \
+ install-strip installcheck installcheck-am installdirs \
+ installdirs-am maintainer-clean maintainer-clean-generic \
+ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \
+ ps ps-am tags tags-am uninstall uninstall-am \
+ uninstall-dist_pkgdataDATA uninstall-pkgconfigDATA
+
+.PRECIOUS: Makefile
+
+
+#distclean-local:
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/external/bdwgc/libatomic_ops/aclocal.m4 b/external/bdwgc/libatomic_ops/aclocal.m4
new file mode 100644
index 0000000000..2693665ae2
--- /dev/null
+++ b/external/bdwgc/libatomic_ops/aclocal.m4
@@ -0,0 +1,1213 @@
+# generated automatically by aclocal 1.15 -*- Autoconf -*-
+
+# Copyright (C) 1996-2014 Free Software Foundation, Inc.
+
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
+m4_ifndef([AC_AUTOCONF_VERSION],
+ [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
+[m4_warning([this file was generated for autoconf 2.69.
+You have another version of autoconf. It may work, but is not guaranteed to.
+If you have problems, you may need to regenerate the build system entirely.
+To do so, use the procedure documented by the package, typically 'autoreconf'.])])
+
+# Copyright (C) 2002-2014 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_AUTOMAKE_VERSION(VERSION)
+# ----------------------------
+# Automake X.Y traces this macro to ensure aclocal.m4 has been
+# generated from the m4 files accompanying Automake X.Y.
+# (This private macro should not be called outside this file.)
+AC_DEFUN([AM_AUTOMAKE_VERSION],
+[am__api_version='1.15'
+dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
+dnl require some minimum version. Point them to the right macro.
+m4_if([$1], [1.15], [],
+ [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
+])
+
+# _AM_AUTOCONF_VERSION(VERSION)
+# -----------------------------
+# aclocal traces this macro to find the Autoconf version.
+# This is a private macro too. Using m4_define simplifies
+# the logic in aclocal, which can simply ignore this definition.
+m4_define([_AM_AUTOCONF_VERSION], [])
+
+# AM_SET_CURRENT_AUTOMAKE_VERSION
+# -------------------------------
+# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
+# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
+AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
+[AM_AUTOMAKE_VERSION([1.15])dnl
+m4_ifndef([AC_AUTOCONF_VERSION],
+ [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
+
+# Figure out how to run the assembler. -*- Autoconf -*-
+
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_PROG_AS
+# ----------
+AC_DEFUN([AM_PROG_AS],
+[# By default we simply use the C compiler to build assembly code.
+AC_REQUIRE([AC_PROG_CC])
+test "${CCAS+set}" = set || CCAS=$CC
+test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS
+AC_ARG_VAR([CCAS], [assembler compiler command (defaults to CC)])
+AC_ARG_VAR([CCASFLAGS], [assembler compiler flags (defaults to CFLAGS)])
+_AM_IF_OPTION([no-dependencies],, [_AM_DEPENDENCIES([CCAS])])dnl
+])
+
+# AM_AUX_DIR_EXPAND -*- Autoconf -*-
+
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
+# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to
+# '$srcdir', '$srcdir/..', or '$srcdir/../..'.
+#
+# Of course, Automake must honor this variable whenever it calls a
+# tool from the auxiliary directory. The problem is that $srcdir (and
+# therefore $ac_aux_dir as well) can be either absolute or relative,
+# depending on how configure is run. This is pretty annoying, since
+# it makes $ac_aux_dir quite unusable in subdirectories: in the top
+# source directory, any form will work fine, but in subdirectories a
+# relative path needs to be adjusted first.
+#
+# $ac_aux_dir/missing
+# fails when called from a subdirectory if $ac_aux_dir is relative
+# $top_srcdir/$ac_aux_dir/missing
+# fails if $ac_aux_dir is absolute,
+# fails when called from a subdirectory in a VPATH build with
+# a relative $ac_aux_dir
+#
+# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
+# are both prefixed by $srcdir. In an in-source build this is usually
+# harmless because $srcdir is '.', but things will broke when you
+# start a VPATH build or use an absolute $srcdir.
+#
+# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
+# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
+# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
+# and then we would define $MISSING as
+# MISSING="\${SHELL} $am_aux_dir/missing"
+# This will work as long as MISSING is not called from configure, because
+# unfortunately $(top_srcdir) has no meaning in configure.
+# However there are other variables, like CC, which are often used in
+# configure, and could therefore not use this "fixed" $ac_aux_dir.
+#
+# Another solution, used here, is to always expand $ac_aux_dir to an
+# absolute PATH. The drawback is that using absolute paths prevent a
+# configured tree to be moved without reconfiguration.
+
+AC_DEFUN([AM_AUX_DIR_EXPAND],
+[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
+# Expand $ac_aux_dir to an absolute path.
+am_aux_dir=`cd "$ac_aux_dir" && pwd`
+])
+
+# AM_CONDITIONAL -*- Autoconf -*-
+
+# Copyright (C) 1997-2014 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_CONDITIONAL(NAME, SHELL-CONDITION)
+# -------------------------------------
+# Define a conditional.
+AC_DEFUN([AM_CONDITIONAL],
+[AC_PREREQ([2.52])dnl
+ m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
+ [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
+AC_SUBST([$1_TRUE])dnl
+AC_SUBST([$1_FALSE])dnl
+_AM_SUBST_NOTMAKE([$1_TRUE])dnl
+_AM_SUBST_NOTMAKE([$1_FALSE])dnl
+m4_define([_AM_COND_VALUE_$1], [$2])dnl
+if $2; then
+ $1_TRUE=
+ $1_FALSE='#'
+else
+ $1_TRUE='#'
+ $1_FALSE=
+fi
+AC_CONFIG_COMMANDS_PRE(
+[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
+ AC_MSG_ERROR([[conditional "$1" was never defined.
+Usually this means the macro was only invoked conditionally.]])
+fi])])
+
+# Copyright (C) 1999-2014 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+
+# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
+# written in clear, in which case automake, when reading aclocal.m4,
+# will think it sees a *use*, and therefore will trigger all it's
+# C support machinery. Also note that it means that autoscan, seeing
+# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
+
+
+# _AM_DEPENDENCIES(NAME)
+# ----------------------
+# See how the compiler implements dependency checking.
+# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
+# We try a few techniques and use that to set a single cache variable.
+#
+# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
+# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
+# dependency, and given that the user is not expected to run this macro,
+# just rely on AC_PROG_CC.
+AC_DEFUN([_AM_DEPENDENCIES],
+[AC_REQUIRE([AM_SET_DEPDIR])dnl
+AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
+AC_REQUIRE([AM_MAKE_INCLUDE])dnl
+AC_REQUIRE([AM_DEP_TRACK])dnl
+
+m4_if([$1], [CC], [depcc="$CC" am_compiler_list=],
+ [$1], [CXX], [depcc="$CXX" am_compiler_list=],
+ [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
+ [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
+ [$1], [UPC], [depcc="$UPC" am_compiler_list=],
+ [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
+ [depcc="$$1" am_compiler_list=])
+
+AC_CACHE_CHECK([dependency style of $depcc],
+ [am_cv_$1_dependencies_compiler_type],
+[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named 'D' -- because '-MD' means "put the output
+ # in D".
+ rm -rf conftest.dir
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
+
+ am_cv_$1_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
+ fi
+ am__universal=false
+ m4_case([$1], [CC],
+ [case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac],
+ [CXX],
+ [case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac])
+
+ for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
+ # Solaris 10 /bin/sh.
+ echo '/* dummy */' > sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+ # We check with '-c' and '-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle '-M -o', and we need to detect this. Also, some Intel
+ # versions had trouble with output in subdirs.
+ am__obj=sub/conftest.${OBJEXT-o}
+ am__minus_obj="-o $am__obj"
+ case $depmode in
+ gcc)
+ # This depmode causes a compiler race in universal mode.
+ test "$am__universal" = false || continue
+ ;;
+ nosideeffect)
+ # After this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested.
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ msvc7 | msvc7msys | msvisualcpp | msvcmsys)
+ # This compiler won't grok '-c -o', but also, the minuso test has
+ # not run yet. These depmodes are late enough in the game, and
+ # so weak that their functioning should not be impacted.
+ am__obj=conftest.${OBJEXT-o}
+ am__minus_obj=
+ ;;
+ none) break ;;
+ esac
+ if depmode=$depmode \
+ source=sub/conftest.c object=$am__obj \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+ am_cv_$1_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_$1_dependencies_compiler_type=none
+fi
+])
+AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
+AM_CONDITIONAL([am__fastdep$1], [
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
+])
+
+
+# AM_SET_DEPDIR
+# -------------
+# Choose a directory name for dependency files.
+# This macro is AC_REQUIREd in _AM_DEPENDENCIES.
+AC_DEFUN([AM_SET_DEPDIR],
+[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
+])
+
+
+# AM_DEP_TRACK
+# ------------
+AC_DEFUN([AM_DEP_TRACK],
+[AC_ARG_ENABLE([dependency-tracking], [dnl
+AS_HELP_STRING(
+ [--enable-dependency-tracking],
+ [do not reject slow dependency extractors])
+AS_HELP_STRING(
+ [--disable-dependency-tracking],
+ [speeds up one-time build])])
+if test "x$enable_dependency_tracking" != xno; then
+ am_depcomp="$ac_aux_dir/depcomp"
+ AMDEPBACKSLASH='\'
+ am__nodep='_no'
+fi
+AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
+AC_SUBST([AMDEPBACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
+AC_SUBST([am__nodep])dnl
+_AM_SUBST_NOTMAKE([am__nodep])dnl
+])
+
+# Generate code to set up dependency tracking. -*- Autoconf -*-
+
+# Copyright (C) 1999-2014 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+
+# _AM_OUTPUT_DEPENDENCY_COMMANDS
+# ------------------------------
+AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
+[{
+ # Older Autoconf quotes --file arguments for eval, but not when files
+ # are listed without --file. Let's play safe and only enable the eval
+ # if we detect the quoting.
+ case $CONFIG_FILES in
+ *\'*) eval set x "$CONFIG_FILES" ;;
+ *) set x $CONFIG_FILES ;;
+ esac
+ shift
+ for mf
+ do
+ # Strip MF so we end up with the name of the file.
+ mf=`echo "$mf" | sed -e 's/:.*$//'`
+ # Check whether this is an Automake generated Makefile or not.
+ # We used to match only the files named 'Makefile.in', but
+ # some people rename them; so instead we look at the file content.
+ # Grep'ing the first line is not enough: some people post-process
+ # each Makefile.in and add a new line on top of each file to say so.
+ # Grep'ing the whole file is not good either: AIX grep has a line
+ # limit of 2048, but all sed's we know have understand at least 4000.
+ if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+ dirpart=`AS_DIRNAME("$mf")`
+ else
+ continue
+ fi
+ # Extract the definition of DEPDIR, am__include, and am__quote
+ # from the Makefile without running 'make'.
+ DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+ test -z "$DEPDIR" && continue
+ am__include=`sed -n 's/^am__include = //p' < "$mf"`
+ test -z "$am__include" && continue
+ am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+ # Find all dependency output files, they are included files with
+ # $(DEPDIR) in their names. We invoke sed twice because it is the
+ # simplest approach to changing $(DEPDIR) to its actual value in the
+ # expansion.
+ for file in `sed -n "
+ s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
+ # Make sure the directory exists.
+ test -f "$dirpart/$file" && continue
+ fdir=`AS_DIRNAME(["$file"])`
+ AS_MKDIR_P([$dirpart/$fdir])
+ # echo "creating $dirpart/$file"
+ echo '# dummy' > "$dirpart/$file"
+ done
+ done
+}
+])# _AM_OUTPUT_DEPENDENCY_COMMANDS
+
+
+# AM_OUTPUT_DEPENDENCY_COMMANDS
+# -----------------------------
+# This macro should only be invoked once -- use via AC_REQUIRE.
+#
+# This code is only required when automatic dependency tracking
+# is enabled. FIXME. This creates each '.P' file that we will
+# need in order to bootstrap the dependency handling code.
+AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
+[AC_CONFIG_COMMANDS([depfiles],
+ [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
+ [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
+])
+
+# Do all the work for Automake. -*- Autoconf -*-
+
+# Copyright (C) 1996-2014 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This macro actually does too much. Some checks are only needed if
+# your package does certain things. But this isn't really a big deal.
+
+dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
+m4_define([AC_PROG_CC],
+m4_defn([AC_PROG_CC])
+[_AM_PROG_CC_C_O
+])
+
+# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
+# AM_INIT_AUTOMAKE([OPTIONS])
+# -----------------------------------------------
+# The call with PACKAGE and VERSION arguments is the old style
+# call (pre autoconf-2.50), which is being phased out. PACKAGE
+# and VERSION should now be passed to AC_INIT and removed from
+# the call to AM_INIT_AUTOMAKE.
+# We support both call styles for the transition. After
+# the next Automake release, Autoconf can make the AC_INIT
+# arguments mandatory, and then we can depend on a new Autoconf
+# release and drop the old call support.
+AC_DEFUN([AM_INIT_AUTOMAKE],
+[AC_PREREQ([2.65])dnl
+dnl Autoconf wants to disallow AM_ names. We explicitly allow
+dnl the ones we care about.
+m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
+AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
+AC_REQUIRE([AC_PROG_INSTALL])dnl
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+ # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+ # is not polluted with repeated "-I."
+ AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
+ # test to see if srcdir already configured
+ if test -f $srcdir/config.status; then
+ AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+ fi
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+ if (cygpath --version) >/dev/null 2>/dev/null; then
+ CYGPATH_W='cygpath -w'
+ else
+ CYGPATH_W=echo
+ fi
+fi
+AC_SUBST([CYGPATH_W])
+
+# Define the identity of the package.
+dnl Distinguish between old-style and new-style calls.
+m4_ifval([$2],
+[AC_DIAGNOSE([obsolete],
+ [$0: two- and three-arguments forms are deprecated.])
+m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
+ AC_SUBST([PACKAGE], [$1])dnl
+ AC_SUBST([VERSION], [$2])],
+[_AM_SET_OPTIONS([$1])dnl
+dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
+m4_if(
+ m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
+ [ok:ok],,
+ [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
+ AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
+ AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
+
+_AM_IF_OPTION([no-define],,
+[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
+ AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
+
+# Some tools Automake needs.
+AC_REQUIRE([AM_SANITY_CHECK])dnl
+AC_REQUIRE([AC_ARG_PROGRAM])dnl
+AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
+AM_MISSING_PROG([AUTOCONF], [autoconf])
+AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
+AM_MISSING_PROG([AUTOHEADER], [autoheader])
+AM_MISSING_PROG([MAKEINFO], [makeinfo])
+AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
+AC_REQUIRE([AC_PROG_MKDIR_P])dnl
+# For better backward compatibility. To be removed once Automake 1.9.x
+# dies out for good. For more background, see:
+#
+#
+AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
+# We need awk for the "check" target (and possibly the TAP driver). The
+# system "awk" is bad on some platforms.
+AC_REQUIRE([AC_PROG_AWK])dnl
+AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
+ [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
+ [_AM_PROG_TAR([v7])])])
+_AM_IF_OPTION([no-dependencies],,
+[AC_PROVIDE_IFELSE([AC_PROG_CC],
+ [_AM_DEPENDENCIES([CC])],
+ [m4_define([AC_PROG_CC],
+ m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_CXX],
+ [_AM_DEPENDENCIES([CXX])],
+ [m4_define([AC_PROG_CXX],
+ m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_OBJC],
+ [_AM_DEPENDENCIES([OBJC])],
+ [m4_define([AC_PROG_OBJC],
+ m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
+ [_AM_DEPENDENCIES([OBJCXX])],
+ [m4_define([AC_PROG_OBJCXX],
+ m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
+])
+AC_REQUIRE([AM_SILENT_RULES])dnl
+dnl The testsuite driver may need to know about EXEEXT, so add the
+dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This
+dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
+AC_CONFIG_COMMANDS_PRE(dnl
+[m4_provide_if([_AM_COMPILER_EXEEXT],
+ [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
+
+# POSIX will say in a future version that running "rm -f" with no argument
+# is OK; and we want to be able to make that assumption in our Makefile
+# recipes. So use an aggressive probe to check that the usage we want is
+# actually supported "in the wild" to an acceptable degree.
+# See automake bug#10828.
+# To make any issue more visible, cause the running configure to be aborted
+# by default if the 'rm' program in use doesn't match our expectations; the
+# user can still override this though.
+if rm -f && rm -fr && rm -rf; then : OK; else
+ cat >&2 <<'END'
+Oops!
+
+Your 'rm' program seems unable to run without file operands specified
+on the command line, even when the '-f' option is present. This is contrary
+to the behaviour of most rm programs out there, and not conforming with
+the upcoming POSIX standard:
+
+Please tell bug-automake@gnu.org about your system, including the value
+of your $PATH and any error possibly output before this message. This
+can help us improve future automake versions.
+
+END
+ if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
+ echo 'Configuration will proceed anyway, since you have set the' >&2
+ echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
+ echo >&2
+ else
+ cat >&2 <<'END'
+Aborting the configuration process, to ensure you take notice of the issue.
+
+You can download and install GNU coreutils to get an 'rm' implementation
+that behaves properly: .
+
+If you want to complete the configuration process using your problematic
+'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
+to "yes", and re-run configure.
+
+END
+ AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
+ fi
+fi
+dnl The trailing newline in this macro's definition is deliberate, for
+dnl backward compatibility and to allow trailing 'dnl'-style comments
+dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841.
+])
+
+dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
+dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
+dnl mangled by Autoconf and run in a shell conditional statement.
+m4_define([_AC_COMPILER_EXEEXT],
+m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
+
+# When config.status generates a header, we must update the stamp-h file.
+# This file resides in the same directory as the config header
+# that is generated. The stamp files are numbered to have different names.
+
+# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
+# loop where config.status creates the headers, so we can generate
+# our stamp files there.
+AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
+[# Compute $1's index in $config_headers.
+_am_arg=$1
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+ case $_am_header in
+ $_am_arg | $_am_arg:* )
+ break ;;
+ * )
+ _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+ esac
+done
+echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
+
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_PROG_INSTALL_SH
+# ------------------
+# Define $install_sh.
+AC_DEFUN([AM_PROG_INSTALL_SH],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+if test x"${install_sh+set}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+ *)
+ install_sh="\${SHELL} $am_aux_dir/install-sh"
+ esac
+fi
+AC_SUBST([install_sh])])
+
+# Copyright (C) 2003-2014 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# Check whether the underlying file-system supports filenames
+# with a leading dot. For instance MS-DOS doesn't.
+AC_DEFUN([AM_SET_LEADING_DOT],
+[rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+ am__leading_dot=.
+else
+ am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+AC_SUBST([am__leading_dot])])
+
+# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
+# From Jim Meyering
+
+# Copyright (C) 1996-2014 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_MAINTAINER_MODE([DEFAULT-MODE])
+# ----------------------------------
+# Control maintainer-specific portions of Makefiles.
+# Default is to disable them, unless 'enable' is passed literally.
+# For symmetry, 'disable' may be passed as well. Anyway, the user
+# can override the default with the --enable/--disable switch.
+AC_DEFUN([AM_MAINTAINER_MODE],
+[m4_case(m4_default([$1], [disable]),
+ [enable], [m4_define([am_maintainer_other], [disable])],
+ [disable], [m4_define([am_maintainer_other], [enable])],
+ [m4_define([am_maintainer_other], [enable])
+ m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
+AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
+ dnl maintainer-mode's default is 'disable' unless 'enable' is passed
+ AC_ARG_ENABLE([maintainer-mode],
+ [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode],
+ am_maintainer_other[ make rules and dependencies not useful
+ (and sometimes confusing) to the casual installer])],
+ [USE_MAINTAINER_MODE=$enableval],
+ [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
+ AC_MSG_RESULT([$USE_MAINTAINER_MODE])
+ AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
+ MAINT=$MAINTAINER_MODE_TRUE
+ AC_SUBST([MAINT])dnl
+]
+)
+
+# Check to see how 'make' treats includes. -*- Autoconf -*-
+
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_MAKE_INCLUDE()
+# -----------------
+# Check to see how make treats includes.
+AC_DEFUN([AM_MAKE_INCLUDE],
+[am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+ @echo this is the am__doit target
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+AC_MSG_CHECKING([for style of include used by $am_make])
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# Ignore all kinds of additional output from 'make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+ am__include=include
+ am__quote=
+ _am_result=GNU
+ ;;
+esac
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+ echo '.include "confinc"' > confmf
+ case `$am_make -s -f confmf 2> /dev/null` in #(
+ *the\ am__doit\ target*)
+ am__include=.include
+ am__quote="\""
+ _am_result=BSD
+ ;;
+ esac
+fi
+AC_SUBST([am__include])
+AC_SUBST([am__quote])
+AC_MSG_RESULT([$_am_result])
+rm -f confinc confmf
+])
+
+# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
+
+# Copyright (C) 1997-2014 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_MISSING_PROG(NAME, PROGRAM)
+# ------------------------------
+AC_DEFUN([AM_MISSING_PROG],
+[AC_REQUIRE([AM_MISSING_HAS_RUN])
+$1=${$1-"${am_missing_run}$2"}
+AC_SUBST($1)])
+
+# AM_MISSING_HAS_RUN
+# ------------------
+# Define MISSING if not defined so far and test if it is modern enough.
+# If it is, set am_missing_run to use it, otherwise, to nothing.
+AC_DEFUN([AM_MISSING_HAS_RUN],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([missing])dnl
+if test x"${MISSING+set}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
+ *)
+ MISSING="\${SHELL} $am_aux_dir/missing" ;;
+ esac
+fi
+# Use eval to expand $SHELL
+if eval "$MISSING --is-lightweight"; then
+ am_missing_run="$MISSING "
+else
+ am_missing_run=
+ AC_MSG_WARN(['missing' script is too old or missing])
+fi
+])
+
+# Helper functions for option handling. -*- Autoconf -*-
+
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# _AM_MANGLE_OPTION(NAME)
+# -----------------------
+AC_DEFUN([_AM_MANGLE_OPTION],
+[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
+
+# _AM_SET_OPTION(NAME)
+# --------------------
+# Set option NAME. Presently that only means defining a flag for this option.
+AC_DEFUN([_AM_SET_OPTION],
+[m4_define(_AM_MANGLE_OPTION([$1]), [1])])
+
+# _AM_SET_OPTIONS(OPTIONS)
+# ------------------------
+# OPTIONS is a space-separated list of Automake options.
+AC_DEFUN([_AM_SET_OPTIONS],
+[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
+
+# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
+# -------------------------------------------
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+AC_DEFUN([_AM_IF_OPTION],
+[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
+
+# Copyright (C) 1999-2014 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# _AM_PROG_CC_C_O
+# ---------------
+# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC
+# to automatically call this.
+AC_DEFUN([_AM_PROG_CC_C_O],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([compile])dnl
+AC_LANG_PUSH([C])dnl
+AC_CACHE_CHECK(
+ [whether $CC understands -c and -o together],
+ [am_cv_prog_cc_c_o],
+ [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
+ # Make sure it works both with $CC and with simple cc.
+ # Following AC_PROG_CC_C_O, we do the test twice because some
+ # compilers refuse to overwrite an existing .o file with -o,
+ # though they will create one.
+ am_cv_prog_cc_c_o=yes
+ for am_i in 1 2; do
+ if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
+ && test -f conftest2.$ac_objext; then
+ : OK
+ else
+ am_cv_prog_cc_c_o=no
+ break
+ fi
+ done
+ rm -f core conftest*
+ unset am_i])
+if test "$am_cv_prog_cc_c_o" != yes; then
+ # Losing compiler, so override with the script.
+ # FIXME: It is wrong to rewrite CC.
+ # But if we don't then we get into trouble of one sort or another.
+ # A longer-term fix would be to have automake use am__CC in this case,
+ # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
+ CC="$am_aux_dir/compile $CC"
+fi
+AC_LANG_POP([C])])
+
+# For backward compatibility.
+AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
+
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_RUN_LOG(COMMAND)
+# -------------------
+# Run COMMAND, save the exit status in ac_status, and log it.
+# (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
+AC_DEFUN([AM_RUN_LOG],
+[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
+ ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+ (exit $ac_status); }])
+
+# Check to make sure that the build environment is sane. -*- Autoconf -*-
+
+# Copyright (C) 1996-2014 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_SANITY_CHECK
+# ---------------
+AC_DEFUN([AM_SANITY_CHECK],
+[AC_MSG_CHECKING([whether build environment is sane])
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name. Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+ *[[\\\"\#\$\&\'\`$am_lf]]*)
+ AC_MSG_ERROR([unsafe absolute working directory name]);;
+esac
+case $srcdir in
+ *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
+ AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
+esac
+
+# Do 'set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ am_has_slept=no
+ for am_try in 1 2; do
+ echo "timestamp, slept: $am_has_slept" > conftest.file
+ set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+ if test "$[*]" = "X"; then
+ # -L didn't work.
+ set X `ls -t "$srcdir/configure" conftest.file`
+ fi
+ if test "$[*]" != "X $srcdir/configure conftest.file" \
+ && test "$[*]" != "X conftest.file $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
+ alias in your environment])
+ fi
+ if test "$[2]" = conftest.file || test $am_try -eq 2; then
+ break
+ fi
+ # Just in case.
+ sleep 1
+ am_has_slept=yes
+ done
+ test "$[2]" = conftest.file
+ )
+then
+ # Ok.
+ :
+else
+ AC_MSG_ERROR([newly created file is older than distributed files!
+Check your system clock])
+fi
+AC_MSG_RESULT([yes])
+# If we didn't sleep, we still need to ensure time stamps of config.status and
+# generated files are strictly newer.
+am_sleep_pid=
+if grep 'slept: no' conftest.file >/dev/null 2>&1; then
+ ( sleep 1 ) &
+ am_sleep_pid=$!
+fi
+AC_CONFIG_COMMANDS_PRE(
+ [AC_MSG_CHECKING([that generated files are newer than configure])
+ if test -n "$am_sleep_pid"; then
+ # Hide warnings about reused PIDs.
+ wait $am_sleep_pid 2>/dev/null
+ fi
+ AC_MSG_RESULT([done])])
+rm -f conftest.file
+])
+
+# Copyright (C) 2009-2014 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_SILENT_RULES([DEFAULT])
+# --------------------------
+# Enable less verbose build rules; with the default set to DEFAULT
+# ("yes" being less verbose, "no" or empty being verbose).
+AC_DEFUN([AM_SILENT_RULES],
+[AC_ARG_ENABLE([silent-rules], [dnl
+AS_HELP_STRING(
+ [--enable-silent-rules],
+ [less verbose build output (undo: "make V=1")])
+AS_HELP_STRING(
+ [--disable-silent-rules],
+ [verbose build output (undo: "make V=0")])dnl
+])
+case $enable_silent_rules in @%:@ (((
+ yes) AM_DEFAULT_VERBOSITY=0;;
+ no) AM_DEFAULT_VERBOSITY=1;;
+ *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
+esac
+dnl
+dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
+dnl do not support nested variable expansions.
+dnl See automake bug#9928 and bug#10237.
+am_make=${MAKE-make}
+AC_CACHE_CHECK([whether $am_make supports nested variables],
+ [am_cv_make_support_nested_variables],
+ [if AS_ECHO([['TRUE=$(BAR$(V))
+BAR0=false
+BAR1=true
+V=1
+am__doit:
+ @$(TRUE)
+.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
+ am_cv_make_support_nested_variables=yes
+else
+ am_cv_make_support_nested_variables=no
+fi])
+if test $am_cv_make_support_nested_variables = yes; then
+ dnl Using '$V' instead of '$(V)' breaks IRIX make.
+ AM_V='$(V)'
+ AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
+else
+ AM_V=$AM_DEFAULT_VERBOSITY
+ AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
+fi
+AC_SUBST([AM_V])dnl
+AM_SUBST_NOTMAKE([AM_V])dnl
+AC_SUBST([AM_DEFAULT_V])dnl
+AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
+AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
+AM_BACKSLASH='\'
+AC_SUBST([AM_BACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
+])
+
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_PROG_INSTALL_STRIP
+# ---------------------
+# One issue with vendor 'install' (even GNU) is that you can't
+# specify the program used to strip binaries. This is especially
+# annoying in cross-compiling environments, where the build's strip
+# is unlikely to handle the host's binaries.
+# Fortunately install-sh will honor a STRIPPROG variable, so we
+# always use install-sh in "make install-strip", and initialize
+# STRIPPROG with the value of the STRIP variable (set by the user).
+AC_DEFUN([AM_PROG_INSTALL_STRIP],
+[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+# Installed binaries are usually stripped using 'strip' when the user
+# run "make install-strip". However 'strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the 'STRIP' environment variable to overrule this program.
+dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
+if test "$cross_compiling" != no; then
+ AC_CHECK_TOOL([STRIP], [strip], :)
+fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+AC_SUBST([INSTALL_STRIP_PROGRAM])])
+
+# Copyright (C) 2006-2014 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# _AM_SUBST_NOTMAKE(VARIABLE)
+# ---------------------------
+# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
+# This macro is traced by Automake.
+AC_DEFUN([_AM_SUBST_NOTMAKE])
+
+# AM_SUBST_NOTMAKE(VARIABLE)
+# --------------------------
+# Public sister of _AM_SUBST_NOTMAKE.
+AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
+
+# Check how to create a tarball. -*- Autoconf -*-
+
+# Copyright (C) 2004-2014 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# _AM_PROG_TAR(FORMAT)
+# --------------------
+# Check how to create a tarball in format FORMAT.
+# FORMAT should be one of 'v7', 'ustar', or 'pax'.
+#
+# Substitute a variable $(am__tar) that is a command
+# writing to stdout a FORMAT-tarball containing the directory
+# $tardir.
+# tardir=directory && $(am__tar) > result.tar
+#
+# Substitute a variable $(am__untar) that extract such
+# a tarball read from stdin.
+# $(am__untar) < result.tar
+#
+AC_DEFUN([_AM_PROG_TAR],
+[# Always define AMTAR for backward compatibility. Yes, it's still used
+# in the wild :-( We should find a proper way to deprecate it ...
+AC_SUBST([AMTAR], ['$${TAR-tar}'])
+
+# We'll loop over all known methods to create a tar archive until one works.
+_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
+
+m4_if([$1], [v7],
+ [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
+
+ [m4_case([$1],
+ [ustar],
+ [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
+ # There is notably a 21 bits limit for the UID and the GID. In fact,
+ # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
+ # and bug#13588).
+ am_max_uid=2097151 # 2^21 - 1
+ am_max_gid=$am_max_uid
+ # The $UID and $GID variables are not portable, so we need to resort
+ # to the POSIX-mandated id(1) utility. Errors in the 'id' calls
+ # below are definitely unexpected, so allow the users to see them
+ # (that is, avoid stderr redirection).
+ am_uid=`id -u || echo unknown`
+ am_gid=`id -g || echo unknown`
+ AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
+ if test $am_uid -le $am_max_uid; then
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ _am_tools=none
+ fi
+ AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
+ if test $am_gid -le $am_max_gid; then
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ _am_tools=none
+ fi],
+
+ [pax],
+ [],
+
+ [m4_fatal([Unknown tar format])])
+
+ AC_MSG_CHECKING([how to create a $1 tar archive])
+
+ # Go ahead even if we have the value already cached. We do so because we
+ # need to set the values for the 'am__tar' and 'am__untar' variables.
+ _am_tools=${am_cv_prog_tar_$1-$_am_tools}
+
+ for _am_tool in $_am_tools; do
+ case $_am_tool in
+ gnutar)
+ for _am_tar in tar gnutar gtar; do
+ AM_RUN_LOG([$_am_tar --version]) && break
+ done
+ am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
+ am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
+ am__untar="$_am_tar -xf -"
+ ;;
+ plaintar)
+ # Must skip GNU tar: if it does not support --format= it doesn't create
+ # ustar tarball either.
+ (tar --version) >/dev/null 2>&1 && continue
+ am__tar='tar chf - "$$tardir"'
+ am__tar_='tar chf - "$tardir"'
+ am__untar='tar xf -'
+ ;;
+ pax)
+ am__tar='pax -L -x $1 -w "$$tardir"'
+ am__tar_='pax -L -x $1 -w "$tardir"'
+ am__untar='pax -r'
+ ;;
+ cpio)
+ am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
+ am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
+ am__untar='cpio -i -H $1 -d'
+ ;;
+ none)
+ am__tar=false
+ am__tar_=false
+ am__untar=false
+ ;;
+ esac
+
+ # If the value was cached, stop now. We just wanted to have am__tar
+ # and am__untar set.
+ test -n "${am_cv_prog_tar_$1}" && break
+
+ # tar/untar a dummy directory, and stop if the command works.
+ rm -rf conftest.dir
+ mkdir conftest.dir
+ echo GrepMe > conftest.dir/file
+ AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
+ rm -rf conftest.dir
+ if test -s conftest.tar; then
+ AM_RUN_LOG([$am__untar /dev/null 2>&1 && break
+ fi
+ done
+ rm -rf conftest.dir
+
+ AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
+ AC_MSG_RESULT([$am_cv_prog_tar_$1])])
+
+AC_SUBST([am__tar])
+AC_SUBST([am__untar])
+]) # _AM_PROG_TAR
+
+m4_include([m4/libtool.m4])
+m4_include([m4/ltoptions.m4])
+m4_include([m4/ltsugar.m4])
+m4_include([m4/ltversion.m4])
+m4_include([m4/lt~obsolete.m4])
diff --git a/external/bdwgc/libatomic_ops/autom4te.cache/output.0.REMOVED.git-id b/external/bdwgc/libatomic_ops/autom4te.cache/output.0.REMOVED.git-id
new file mode 100644
index 0000000000..656a2002f0
--- /dev/null
+++ b/external/bdwgc/libatomic_ops/autom4te.cache/output.0.REMOVED.git-id
@@ -0,0 +1 @@
+503d73065590595e5d71ea576187d317e0a74368
\ No newline at end of file
diff --git a/external/bdwgc/libatomic_ops/autom4te.cache/output.1.REMOVED.git-id b/external/bdwgc/libatomic_ops/autom4te.cache/output.1.REMOVED.git-id
new file mode 100644
index 0000000000..656a2002f0
--- /dev/null
+++ b/external/bdwgc/libatomic_ops/autom4te.cache/output.1.REMOVED.git-id
@@ -0,0 +1 @@
+503d73065590595e5d71ea576187d317e0a74368
\ No newline at end of file
diff --git a/external/bdwgc/libatomic_ops/autom4te.cache/output.2.REMOVED.git-id b/external/bdwgc/libatomic_ops/autom4te.cache/output.2.REMOVED.git-id
new file mode 100644
index 0000000000..656a2002f0
--- /dev/null
+++ b/external/bdwgc/libatomic_ops/autom4te.cache/output.2.REMOVED.git-id
@@ -0,0 +1 @@
+503d73065590595e5d71ea576187d317e0a74368
\ No newline at end of file
diff --git a/external/bdwgc/libatomic_ops/autom4te.cache/requests b/external/bdwgc/libatomic_ops/autom4te.cache/requests
new file mode 100644
index 0000000000..dc9e831bf6
--- /dev/null
+++ b/external/bdwgc/libatomic_ops/autom4te.cache/requests
@@ -0,0 +1,471 @@
+# This file was generated by Autom4te Fri Oct 23 20:57:39 UTC 2015.
+# It contains the lists of macros which have been traced.
+# It can be safely removed.
+
+@request = (
+ bless( [
+ '0',
+ 1,
+ [
+ '/usr/share/autoconf'
+ ],
+ [
+ '/usr/share/autoconf/autoconf/autoconf.m4f',
+ '-',
+ '/usr/share/aclocal-1.15/internal/ac-config-macro-dirs.m4',
+ '/usr/share/aclocal/libtool.m4',
+ '/usr/share/aclocal/ltoptions.m4',
+ '/usr/share/aclocal/ltsugar.m4',
+ '/usr/share/aclocal/ltversion.m4',
+ '/usr/share/aclocal/lt~obsolete.m4',
+ '/usr/share/aclocal-1.15/amversion.m4',
+ '/usr/share/aclocal-1.15/as.m4',
+ '/usr/share/aclocal-1.15/auxdir.m4',
+ '/usr/share/aclocal-1.15/cond.m4',
+ '/usr/share/aclocal-1.15/depend.m4',
+ '/usr/share/aclocal-1.15/depout.m4',
+ '/usr/share/aclocal-1.15/init.m4',
+ '/usr/share/aclocal-1.15/install-sh.m4',
+ '/usr/share/aclocal-1.15/lead-dot.m4',
+ '/usr/share/aclocal-1.15/maintainer.m4',
+ '/usr/share/aclocal-1.15/make.m4',
+ '/usr/share/aclocal-1.15/missing.m4',
+ '/usr/share/aclocal-1.15/options.m4',
+ '/usr/share/aclocal-1.15/prog-cc-c-o.m4',
+ '/usr/share/aclocal-1.15/runlog.m4',
+ '/usr/share/aclocal-1.15/sanity.m4',
+ '/usr/share/aclocal-1.15/silent.m4',
+ '/usr/share/aclocal-1.15/strip.m4',
+ '/usr/share/aclocal-1.15/substnot.m4',
+ '/usr/share/aclocal-1.15/tar.m4',
+ 'configure.ac'
+ ],
+ {
+ 'AM_CONDITIONAL' => 1,
+ 'AC_LTDL_OBJDIR' => 1,
+ '_LT_AC_SHELL_INIT' => 1,
+ 'LT_INIT' => 1,
+ '_LT_AC_SYS_LIBPATH_AIX' => 1,
+ 'AM_MISSING_HAS_RUN' => 1,
+ 'LT_PATH_NM' => 1,
+ '_AC_PROG_LIBTOOL' => 1,
+ 'AM_PROG_CC_C_O' => 1,
+ 'AC_LTDL_ENABLE_INSTALL' => 1,
+ 'AC_LIBTOOL_PROG_COMPILER_PIC' => 1,
+ '_AC_AM_CONFIG_HEADER_HOOK' => 1,
+ '_AM_PROG_TAR' => 1,
+ '_LT_AC_TRY_DLOPEN_SELF' => 1,
+ 'AC_LIBTOOL_LINKER_OPTION' => 1,
+ 'AC_PROG_LD_RELOAD_FLAG' => 1,
+ 'AC_LIBTOOL_CXX' => 1,
+ 'AC_LIBTOOL_LANG_GCJ_CONFIG' => 1,
+ 'AC_PROG_NM' => 1,
+ 'LT_LANG' => 1,
+ '_LT_WITH_SYSROOT' => 1,
+ 'm4_include' => 1,
+ '_AM_OUTPUT_DEPENDENCY_COMMANDS' => 1,
+ '_AM_SET_OPTION' => 1,
+ '_AM_MANGLE_OPTION' => 1,
+ 'AC_ENABLE_SHARED' => 1,
+ 'AC_LIBTOOL_DLOPEN' => 1,
+ 'AC_LIBTOOL_CONFIG' => 1,
+ 'AM_PROG_INSTALL_SH' => 1,
+ 'AC_PROG_LD' => 1,
+ '_LT_REQUIRED_DARWIN_CHECKS' => 1,
+ 'm4_pattern_forbid' => 1,
+ '_LT_AC_SYS_COMPILER' => 1,
+ '_LT_AC_LANG_RC_CONFIG' => 1,
+ 'AC_PROG_EGREP' => 1,
+ '_AM_CONFIG_MACRO_DIRS' => 1,
+ 'm4_pattern_allow' => 1,
+ 'LT_AC_PROG_EGREP' => 1,
+ '_m4_warn' => 1,
+ '_LT_LINKER_OPTION' => 1,
+ 'AC_DEFUN' => 1,
+ 'LT_AC_PROG_RC' => 1,
+ 'AC_PATH_TOOL_PREFIX' => 1,
+ 'AC_LIBTOOL_LANG_RC_CONFIG' => 1,
+ '_LT_AC_LANG_F77' => 1,
+ '_LT_PROG_F77' => 1,
+ '_AM_AUTOCONF_VERSION' => 1,
+ 'AC_CONFIG_MACRO_DIR_TRACE' => 1,
+ '_AM_IF_OPTION' => 1,
+ '_LT_AC_LANG_CXX' => 1,
+ '_LT_COMPILER_OPTION' => 1,
+ 'AM_SET_DEPDIR' => 1,
+ '_LT_PROG_FC' => 1,
+ '_LT_PROG_CXX' => 1,
+ 'AC_LIBTOOL_F77' => 1,
+ 'AM_SILENT_RULES' => 1,
+ '_LT_PROG_ECHO_BACKSLASH' => 1,
+ '_AM_DEPENDENCIES' => 1,
+ 'AM_PROG_LD' => 1,
+ 'AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE' => 1,
+ 'AC_PATH_MAGIC' => 1,
+ 'AC_LIBTOOL_SETUP' => 1,
+ 'AM_MAKE_INCLUDE' => 1,
+ 'AC_LIBTOOL_FC' => 1,
+ '_LT_AC_LANG_CXX_CONFIG' => 1,
+ 'AC_LIBTOOL_PICMODE' => 1,
+ 'AC_LIBTOOL_PROG_LD_SHLIBS' => 1,
+ '_AM_PROG_CC_C_O' => 1,
+ '_LT_PREPARE_SED_QUOTE_VARS' => 1,
+ 'LT_OUTPUT' => 1,
+ 'AM_SANITY_CHECK' => 1,
+ 'AC_LIBTOOL_POSTDEP_PREDEP' => 1,
+ 'LT_CMD_MAX_LEN' => 1,
+ 'LTVERSION_VERSION' => 1,
+ '_LT_LINKER_BOILERPLATE' => 1,
+ 'LT_PATH_LD' => 1,
+ 'AM_RUN_LOG' => 1,
+ 'AM_SUBST_NOTMAKE' => 1,
+ 'AM_MISSING_PROG' => 1,
+ 'AC_DISABLE_SHARED' => 1,
+ 'AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH' => 1,
+ 'AM_PROG_NM' => 1,
+ 'AC_PROG_LIBTOOL' => 1,
+ 'AC_DEFUN_ONCE' => 1,
+ '_LT_CC_BASENAME' => 1,
+ 'AM_DEP_TRACK' => 1,
+ '_LT_AC_LOCK' => 1,
+ 'AC_LIBTOOL_WIN32_DLL' => 1,
+ 'AM_ENABLE_STATIC' => 1,
+ 'AM_MAINTAINER_MODE' => 1,
+ '_AM_SET_OPTIONS' => 1,
+ 'AC_LIBTOOL_COMPILER_OPTION' => 1,
+ 'AM_SET_CURRENT_AUTOMAKE_VERSION' => 1,
+ '_LT_AC_LANG_F77_CONFIG' => 1,
+ 'include' => 1,
+ '_LT_AC_TAGCONFIG' => 1,
+ '_LT_AC_CHECK_DLFCN' => 1,
+ '_LT_PATH_TOOL_PREFIX' => 1,
+ 'AM_AUTOMAKE_VERSION' => 1,
+ 'LT_PROG_RC' => 1,
+ 'AC_DEPLIBS_CHECK_METHOD' => 1,
+ 'AM_DISABLE_STATIC' => 1,
+ '_LT_DLL_DEF_P' => 1,
+ 'AC_ENABLE_STATIC' => 1,
+ '_LT_AC_TAGVAR' => 1,
+ 'AC_LIBTOOL_LANG_F77_CONFIG' => 1,
+ 'AC_LIBTOOL_DLOPEN_SELF' => 1,
+ 'AC_LIBTOOL_LANG_CXX_CONFIG' => 1,
+ 'AC_LIBTOOL_PROG_COMPILER_NO_RTTI' => 1,
+ 'LT_AC_PROG_SED' => 1,
+ 'AC_LIBTOOL_GCJ' => 1,
+ 'AC_DISABLE_FAST_INSTALL' => 1,
+ 'AM_INIT_AUTOMAKE' => 1,
+ 'LT_PROG_GO' => 1,
+ 'AC_CHECK_LIBM' => 1,
+ '_LT_AC_LANG_GCJ' => 1,
+ 'AC_DISABLE_STATIC' => 1,
+ 'AC_LIBTOOL_PROG_CC_C_O' => 1,
+ 'AC_LIBTOOL_SYS_LIB_STRIP' => 1,
+ 'AM_OUTPUT_DEPENDENCY_COMMANDS' => 1,
+ 'LT_LIB_M' => 1,
+ '_LT_PROG_LTMAIN' => 1,
+ 'LTOBSOLETE_VERSION' => 1,
+ 'AU_DEFUN' => 1,
+ '_AM_SUBST_NOTMAKE' => 1,
+ 'AC_LIBTOOL_SYS_DYNAMIC_LINKER' => 1,
+ 'AC_ENABLE_FAST_INSTALL' => 1,
+ 'AM_SET_LEADING_DOT' => 1,
+ 'LT_SUPPORTED_TAG' => 1,
+ 'LT_SYS_DLOPEN_SELF' => 1,
+ '_LT_AC_PROG_CXXCPP' => 1,
+ 'AC_LIBTOOL_OBJDIR' => 1,
+ 'LTSUGAR_VERSION' => 1,
+ 'AM_AUX_DIR_EXPAND' => 1,
+ 'AC_LIBTOOL_SYS_HARD_LINK_LOCKS' => 1,
+ 'AC_PROG_LD_GNU' => 1,
+ 'AM_PROG_LIBTOOL' => 1,
+ 'AM_PROG_INSTALL_STRIP' => 1,
+ 'AC_LIBTOOL_RC' => 1,
+ 'AM_ENABLE_SHARED' => 1,
+ 'LTOPTIONS_VERSION' => 1,
+ 'LT_PROG_GCJ' => 1,
+ 'LT_AC_PROG_GCJ' => 1,
+ 'AC_CONFIG_MACRO_DIR' => 1,
+ 'AM_DISABLE_SHARED' => 1,
+ 'AC_LTDL_PREOPEN' => 1,
+ 'AM_PROG_AS' => 1,
+ '_LT_AC_LANG_GCJ_CONFIG' => 1,
+ '_LT_COMPILER_BOILERPLATE' => 1,
+ '_LT_AC_FILE_LTDLL_C' => 1,
+ '_LT_AC_PROG_ECHO_BACKSLASH' => 1,
+ 'AC_LIBTOOL_SYS_OLD_ARCHIVE' => 1,
+ 'AC_LIBTOOL_SYS_MAX_CMD_LEN' => 1,
+ 'AC_LIBTOOL_LANG_C_CONFIG' => 1,
+ '_LT_AC_LANG_C_CONFIG' => 1
+ }
+ ], 'Autom4te::Request' ),
+ bless( [
+ '1',
+ 1,
+ [
+ '/usr/share/autoconf'
+ ],
+ [
+ '/usr/share/autoconf/autoconf/autoconf.m4f',
+ 'aclocal.m4',
+ 'configure.ac'
+ ],
+ {
+ 'AM_MAKEFILE_INCLUDE' => 1,
+ 'AM_AUTOMAKE_VERSION' => 1,
+ 'AM_NLS' => 1,
+ 'AC_FC_FREEFORM' => 1,
+ '_LT_AC_TAGCONFIG' => 1,
+ 'include' => 1,
+ 'm4_include' => 1,
+ 'AM_SILENT_RULES' => 1,
+ 'AC_CONFIG_HEADERS' => 1,
+ 'AM_PROG_FC_C_O' => 1,
+ 'm4_sinclude' => 1,
+ 'AM_GNU_GETTEXT_INTL_SUBDIR' => 1,
+ 'AC_CANONICAL_HOST' => 1,
+ 'AC_CANONICAL_BUILD' => 1,
+ 'm4_pattern_forbid' => 1,
+ 'AM_PROG_F77_C_O' => 1,
+ 'LT_CONFIG_LTDL_DIR' => 1,
+ 'AM_XGETTEXT_OPTION' => 1,
+ 'sinclude' => 1,
+ 'AC_FC_PP_SRCEXT' => 1,
+ 'm4_pattern_allow' => 1,
+ 'AM_INIT_AUTOMAKE' => 1,
+ '_AM_COND_ENDIF' => 1,
+ 'AC_CANONICAL_TARGET' => 1,
+ 'AC_CONFIG_FILES' => 1,
+ 'AC_FC_PP_DEFINE' => 1,
+ 'AM_PATH_GUILE' => 1,
+ 'AM_GNU_GETTEXT' => 1,
+ 'LT_INIT' => 1,
+ 'AH_OUTPUT' => 1,
+ 'AC_SUBST' => 1,
+ '_m4_warn' => 1,
+ 'AM_CONDITIONAL' => 1,
+ 'AC_CONFIG_LINKS' => 1,
+ 'AC_PROG_LIBTOOL' => 1,
+ 'AM_PROG_CC_C_O' => 1,
+ 'AC_CONFIG_AUX_DIR' => 1,
+ 'AM_PROG_AR' => 1,
+ 'LT_SUPPORTED_TAG' => 1,
+ 'AM_PROG_CXX_C_O' => 1,
+ 'AC_CONFIG_SUBDIRS' => 1,
+ '_AM_SUBST_NOTMAKE' => 1,
+ 'AC_REQUIRE_AUX_FILE' => 1,
+ 'AM_PROG_MKDIR_P' => 1,
+ 'AC_FC_SRCEXT' => 1,
+ 'AC_DEFINE_TRACE_LITERAL' => 1,
+ '_AM_COND_ELSE' => 1,
+ '_AM_MAKEFILE_INCLUDE' => 1,
+ 'AM_EXTRA_RECURSIVE_TARGETS' => 1,
+ 'AM_PROG_LIBTOOL' => 1,
+ 'AM_MAINTAINER_MODE' => 1,
+ 'AM_ENABLE_MULTILIB' => 1,
+ 'AC_SUBST_TRACE' => 1,
+ 'AC_INIT' => 1,
+ 'AC_LIBSOURCE' => 1,
+ 'AM_POT_TOOLS' => 1,
+ 'AM_PROG_MOC' => 1,
+ 'AC_CANONICAL_SYSTEM' => 1,
+ '_AM_COND_IF' => 1,
+ 'AC_CONFIG_LIBOBJ_DIR' => 1
+ }
+ ], 'Autom4te::Request' ),
+ bless( [
+ '2',
+ 1,
+ [
+ '/usr/share/autoconf'
+ ],
+ [
+ '/usr/share/autoconf/autoconf/autoconf.m4f',
+ '-',
+ '/usr/share/aclocal-1.15/internal/ac-config-macro-dirs.m4',
+ '/usr/share/aclocal-1.15/amversion.m4',
+ '/usr/share/aclocal-1.15/as.m4',
+ '/usr/share/aclocal-1.15/auxdir.m4',
+ '/usr/share/aclocal-1.15/cond.m4',
+ '/usr/share/aclocal-1.15/depend.m4',
+ '/usr/share/aclocal-1.15/depout.m4',
+ '/usr/share/aclocal-1.15/init.m4',
+ '/usr/share/aclocal-1.15/install-sh.m4',
+ '/usr/share/aclocal-1.15/lead-dot.m4',
+ '/usr/share/aclocal-1.15/maintainer.m4',
+ '/usr/share/aclocal-1.15/make.m4',
+ '/usr/share/aclocal-1.15/missing.m4',
+ '/usr/share/aclocal-1.15/options.m4',
+ '/usr/share/aclocal-1.15/prog-cc-c-o.m4',
+ '/usr/share/aclocal-1.15/runlog.m4',
+ '/usr/share/aclocal-1.15/sanity.m4',
+ '/usr/share/aclocal-1.15/silent.m4',
+ '/usr/share/aclocal-1.15/strip.m4',
+ '/usr/share/aclocal-1.15/substnot.m4',
+ '/usr/share/aclocal-1.15/tar.m4',
+ 'm4/libtool.m4',
+ 'm4/ltoptions.m4',
+ 'm4/ltsugar.m4',
+ 'm4/ltversion.m4',
+ 'm4/lt~obsolete.m4',
+ 'configure.ac'
+ ],
+ {
+ 'AC_CHECK_LIBM' => 1,
+ '_LT_AC_LANG_GCJ' => 1,
+ 'AC_DISABLE_STATIC' => 1,
+ 'AC_DISABLE_FAST_INSTALL' => 1,
+ 'AC_LIBTOOL_GCJ' => 1,
+ 'AM_INIT_AUTOMAKE' => 1,
+ 'LT_PROG_GO' => 1,
+ 'AC_LIBTOOL_LANG_CXX_CONFIG' => 1,
+ 'AC_LIBTOOL_PROG_COMPILER_NO_RTTI' => 1,
+ 'LT_AC_PROG_SED' => 1,
+ 'AC_ENABLE_STATIC' => 1,
+ '_LT_AC_TAGVAR' => 1,
+ 'AC_LIBTOOL_LANG_F77_CONFIG' => 1,
+ 'AC_LIBTOOL_DLOPEN_SELF' => 1,
+ 'AM_DISABLE_STATIC' => 1,
+ '_LT_DLL_DEF_P' => 1,
+ 'LT_PROG_RC' => 1,
+ 'AC_DEPLIBS_CHECK_METHOD' => 1,
+ '_LT_AC_TAGCONFIG' => 1,
+ '_LT_PATH_TOOL_PREFIX' => 1,
+ '_LT_AC_CHECK_DLFCN' => 1,
+ 'AM_AUTOMAKE_VERSION' => 1,
+ '_LT_AC_LANG_F77_CONFIG' => 1,
+ 'include' => 1,
+ 'AM_ENABLE_STATIC' => 1,
+ 'AM_MAINTAINER_MODE' => 1,
+ '_AM_SET_OPTIONS' => 1,
+ 'AM_SET_CURRENT_AUTOMAKE_VERSION' => 1,
+ 'AC_LIBTOOL_COMPILER_OPTION' => 1,
+ 'AM_DEP_TRACK' => 1,
+ '_LT_AC_LOCK' => 1,
+ 'AC_LIBTOOL_WIN32_DLL' => 1,
+ '_LT_CC_BASENAME' => 1,
+ 'AC_DEFUN_ONCE' => 1,
+ 'AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH' => 1,
+ 'AC_DISABLE_SHARED' => 1,
+ 'AM_PROG_NM' => 1,
+ 'AC_PROG_LIBTOOL' => 1,
+ 'AM_SUBST_NOTMAKE' => 1,
+ 'AM_MISSING_PROG' => 1,
+ 'LT_PATH_LD' => 1,
+ '_LT_LINKER_BOILERPLATE' => 1,
+ 'AM_RUN_LOG' => 1,
+ '_LT_AC_LANG_C_CONFIG' => 1,
+ 'AC_LIBTOOL_LANG_C_CONFIG' => 1,
+ 'AC_LIBTOOL_SYS_OLD_ARCHIVE' => 1,
+ 'AC_LIBTOOL_SYS_MAX_CMD_LEN' => 1,
+ '_LT_AC_LANG_GCJ_CONFIG' => 1,
+ '_LT_AC_FILE_LTDLL_C' => 1,
+ '_LT_AC_PROG_ECHO_BACKSLASH' => 1,
+ '_LT_COMPILER_BOILERPLATE' => 1,
+ 'AM_DISABLE_SHARED' => 1,
+ 'AC_LTDL_PREOPEN' => 1,
+ 'AM_PROG_AS' => 1,
+ 'LT_AC_PROG_GCJ' => 1,
+ 'AC_CONFIG_MACRO_DIR' => 1,
+ 'AM_PROG_INSTALL_STRIP' => 1,
+ 'AC_LIBTOOL_RC' => 1,
+ 'AM_ENABLE_SHARED' => 1,
+ 'LTOPTIONS_VERSION' => 1,
+ 'LT_PROG_GCJ' => 1,
+ 'AM_PROG_LIBTOOL' => 1,
+ 'AC_PROG_LD_GNU' => 1,
+ 'LTSUGAR_VERSION' => 1,
+ 'AM_AUX_DIR_EXPAND' => 1,
+ 'AC_LIBTOOL_SYS_HARD_LINK_LOCKS' => 1,
+ 'AM_SET_LEADING_DOT' => 1,
+ 'AC_ENABLE_FAST_INSTALL' => 1,
+ 'LT_SYS_DLOPEN_SELF' => 1,
+ 'LT_SUPPORTED_TAG' => 1,
+ '_LT_AC_PROG_CXXCPP' => 1,
+ 'AC_LIBTOOL_OBJDIR' => 1,
+ 'LTOBSOLETE_VERSION' => 1,
+ 'AU_DEFUN' => 1,
+ '_AM_SUBST_NOTMAKE' => 1,
+ 'AC_LIBTOOL_SYS_DYNAMIC_LINKER' => 1,
+ '_LT_PROG_LTMAIN' => 1,
+ 'AM_OUTPUT_DEPENDENCY_COMMANDS' => 1,
+ 'LT_LIB_M' => 1,
+ 'AC_LIBTOOL_SYS_LIB_STRIP' => 1,
+ 'AC_LIBTOOL_PROG_CC_C_O' => 1,
+ 'm4_pattern_allow' => 1,
+ '_LT_AC_LANG_RC_CONFIG' => 1,
+ 'AC_PROG_EGREP' => 1,
+ '_AM_CONFIG_MACRO_DIRS' => 1,
+ 'm4_pattern_forbid' => 1,
+ '_LT_AC_SYS_COMPILER' => 1,
+ '_LT_REQUIRED_DARWIN_CHECKS' => 1,
+ 'AC_PROG_LD' => 1,
+ 'AC_LIBTOOL_DLOPEN' => 1,
+ 'AC_LIBTOOL_CONFIG' => 1,
+ 'AM_PROG_INSTALL_SH' => 1,
+ '_AM_SET_OPTION' => 1,
+ '_AM_MANGLE_OPTION' => 1,
+ 'AC_ENABLE_SHARED' => 1,
+ '_LT_WITH_SYSROOT' => 1,
+ 'm4_include' => 1,
+ '_AM_OUTPUT_DEPENDENCY_COMMANDS' => 1,
+ 'AC_LIBTOOL_LANG_GCJ_CONFIG' => 1,
+ 'LT_LANG' => 1,
+ 'AC_PROG_NM' => 1,
+ 'AC_PROG_LD_RELOAD_FLAG' => 1,
+ 'AC_LIBTOOL_CXX' => 1,
+ '_LT_AC_TRY_DLOPEN_SELF' => 1,
+ 'AC_LIBTOOL_LINKER_OPTION' => 1,
+ '_AC_AM_CONFIG_HEADER_HOOK' => 1,
+ '_AM_PROG_TAR' => 1,
+ 'AC_LIBTOOL_PROG_COMPILER_PIC' => 1,
+ 'LT_PATH_NM' => 1,
+ 'AM_MISSING_HAS_RUN' => 1,
+ '_AC_PROG_LIBTOOL' => 1,
+ 'AM_PROG_CC_C_O' => 1,
+ 'AC_LTDL_ENABLE_INSTALL' => 1,
+ '_LT_AC_SHELL_INIT' => 1,
+ 'LT_INIT' => 1,
+ '_LT_AC_SYS_LIBPATH_AIX' => 1,
+ 'AM_CONDITIONAL' => 1,
+ 'AC_LTDL_OBJDIR' => 1,
+ 'LT_CMD_MAX_LEN' => 1,
+ 'AC_LIBTOOL_POSTDEP_PREDEP' => 1,
+ 'LTVERSION_VERSION' => 1,
+ 'LT_OUTPUT' => 1,
+ 'AM_SANITY_CHECK' => 1,
+ '_AM_PROG_CC_C_O' => 1,
+ '_LT_PREPARE_SED_QUOTE_VARS' => 1,
+ 'AC_LIBTOOL_PICMODE' => 1,
+ 'AC_LIBTOOL_PROG_LD_SHLIBS' => 1,
+ 'AC_LIBTOOL_FC' => 1,
+ '_LT_AC_LANG_CXX_CONFIG' => 1,
+ 'AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE' => 1,
+ 'AM_MAKE_INCLUDE' => 1,
+ 'AC_PATH_MAGIC' => 1,
+ 'AC_LIBTOOL_SETUP' => 1,
+ 'AM_PROG_LD' => 1,
+ 'AM_SILENT_RULES' => 1,
+ 'AC_LIBTOOL_F77' => 1,
+ '_LT_PROG_ECHO_BACKSLASH' => 1,
+ '_AM_DEPENDENCIES' => 1,
+ 'AM_SET_DEPDIR' => 1,
+ '_LT_PROG_FC' => 1,
+ '_LT_PROG_CXX' => 1,
+ '_LT_AC_LANG_CXX' => 1,
+ '_LT_COMPILER_OPTION' => 1,
+ 'AC_CONFIG_MACRO_DIR_TRACE' => 1,
+ '_AM_IF_OPTION' => 1,
+ '_LT_AC_LANG_F77' => 1,
+ '_LT_PROG_F77' => 1,
+ '_AM_AUTOCONF_VERSION' => 1,
+ 'AC_LIBTOOL_LANG_RC_CONFIG' => 1,
+ 'AC_PATH_TOOL_PREFIX' => 1,
+ 'LT_AC_PROG_RC' => 1,
+ '_m4_warn' => 1,
+ 'LT_AC_PROG_EGREP' => 1,
+ 'AC_DEFUN' => 1,
+ '_LT_LINKER_OPTION' => 1
+ }
+ ], 'Autom4te::Request' )
+ );
+
diff --git a/external/bdwgc/libatomic_ops/autom4te.cache/traces.0 b/external/bdwgc/libatomic_ops/autom4te.cache/traces.0
new file mode 100644
index 0000000000..88fea7b24a
--- /dev/null
+++ b/external/bdwgc/libatomic_ops/autom4te.cache/traces.0
@@ -0,0 +1,2091 @@
+m4trace:/usr/share/aclocal/libtool.m4:61: -1- AC_DEFUN([LT_INIT], [AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK
+AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
+AC_BEFORE([$0], [LT_LANG])dnl
+AC_BEFORE([$0], [LT_OUTPUT])dnl
+AC_BEFORE([$0], [LTDL_INIT])dnl
+m4_require([_LT_CHECK_BUILDDIR])dnl
+
+dnl Autoconf doesn't catch unexpanded LT_ macros by default:
+m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
+m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
+dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
+dnl unless we require an AC_DEFUNed macro:
+AC_REQUIRE([LTOPTIONS_VERSION])dnl
+AC_REQUIRE([LTSUGAR_VERSION])dnl
+AC_REQUIRE([LTVERSION_VERSION])dnl
+AC_REQUIRE([LTOBSOLETE_VERSION])dnl
+m4_require([_LT_PROG_LTMAIN])dnl
+
+_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
+
+dnl Parse OPTIONS
+_LT_SET_OPTIONS([$0], [$1])
+
+# This can be used to rebuild libtool when needed
+LIBTOOL_DEPS=$ltmain
+
+# Always use our own libtool.
+LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+AC_SUBST(LIBTOOL)dnl
+
+_LT_SETUP
+
+# Only expand once:
+m4_define([LT_INIT])
+])
+m4trace:/usr/share/aclocal/libtool.m4:99: -1- AU_DEFUN([AC_PROG_LIBTOOL], [m4_if($#, 0, [LT_INIT], [LT_INIT($@)])])
+m4trace:/usr/share/aclocal/libtool.m4:99: -1- AC_DEFUN([AC_PROG_LIBTOOL], [AC_DIAGNOSE([obsolete], [The macro `AC_PROG_LIBTOOL' is obsolete.
+You should run autoupdate.])dnl
+m4_if($#, 0, [LT_INIT], [LT_INIT($@)])])
+m4trace:/usr/share/aclocal/libtool.m4:100: -1- AU_DEFUN([AM_PROG_LIBTOOL], [m4_if($#, 0, [LT_INIT], [LT_INIT($@)])])
+m4trace:/usr/share/aclocal/libtool.m4:100: -1- AC_DEFUN([AM_PROG_LIBTOOL], [AC_DIAGNOSE([obsolete], [The macro `AM_PROG_LIBTOOL' is obsolete.
+You should run autoupdate.])dnl
+m4_if($#, 0, [LT_INIT], [LT_INIT($@)])])
+m4trace:/usr/share/aclocal/libtool.m4:619: -1- AC_DEFUN([LT_OUTPUT], [: ${CONFIG_LT=./config.lt}
+AC_MSG_NOTICE([creating $CONFIG_LT])
+_LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
+[# Run this file to recreate a libtool stub with the current configuration.])
+
+cat >>"$CONFIG_LT" <<\_LTEOF
+lt_cl_silent=false
+exec AS_MESSAGE_LOG_FD>>config.log
+{
+ echo
+ AS_BOX([Running $as_me.])
+} >&AS_MESSAGE_LOG_FD
+
+lt_cl_help="\
+'$as_me' creates a local libtool stub from the current configuration,
+for use in further configure time tests before the real libtool is
+generated.
+
+Usage: $[0] [[OPTIONS]]
+
+ -h, --help print this help, then exit
+ -V, --version print version number, then exit
+ -q, --quiet do not print progress messages
+ -d, --debug don't remove temporary files
+
+Report bugs to ."
+
+lt_cl_version="\
+m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
+m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
+configured by $[0], generated by m4_PACKAGE_STRING.
+
+Copyright (C) 2011 Free Software Foundation, Inc.
+This config.lt script is free software; the Free Software Foundation
+gives unlimited permision to copy, distribute and modify it."
+
+while test 0 != $[#]
+do
+ case $[1] in
+ --version | --v* | -V )
+ echo "$lt_cl_version"; exit 0 ;;
+ --help | --h* | -h )
+ echo "$lt_cl_help"; exit 0 ;;
+ --debug | --d* | -d )
+ debug=: ;;
+ --quiet | --q* | --silent | --s* | -q )
+ lt_cl_silent=: ;;
+
+ -*) AC_MSG_ERROR([unrecognized option: $[1]
+Try '$[0] --help' for more information.]) ;;
+
+ *) AC_MSG_ERROR([unrecognized argument: $[1]
+Try '$[0] --help' for more information.]) ;;
+ esac
+ shift
+done
+
+if $lt_cl_silent; then
+ exec AS_MESSAGE_FD>/dev/null
+fi
+_LTEOF
+
+cat >>"$CONFIG_LT" <<_LTEOF
+_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
+_LTEOF
+
+cat >>"$CONFIG_LT" <<\_LTEOF
+AC_MSG_NOTICE([creating $ofile])
+_LT_OUTPUT_LIBTOOL_COMMANDS
+AS_EXIT(0)
+_LTEOF
+chmod +x "$CONFIG_LT"
+
+# configure is writing to config.log, but config.lt does its own redirection,
+# appending to config.log, which fails on DOS, as config.log is still kept
+# open by configure. Here we exec the FD to /dev/null, effectively closing
+# config.log, so it can be properly (re)opened and appended to by config.lt.
+lt_cl_success=:
+test yes = "$silent" &&
+ lt_config_lt_args="$lt_config_lt_args --quiet"
+exec AS_MESSAGE_LOG_FD>/dev/null
+$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
+exec AS_MESSAGE_LOG_FD>>config.log
+$lt_cl_success || AS_EXIT(1)
+])
+m4trace:/usr/share/aclocal/libtool.m4:812: -1- AC_DEFUN([LT_SUPPORTED_TAG], [])
+m4trace:/usr/share/aclocal/libtool.m4:823: -1- AC_DEFUN([LT_LANG], [AC_BEFORE([$0], [LT_OUTPUT])dnl
+m4_case([$1],
+ [C], [_LT_LANG(C)],
+ [C++], [_LT_LANG(CXX)],
+ [Go], [_LT_LANG(GO)],
+ [Java], [_LT_LANG(GCJ)],
+ [Fortran 77], [_LT_LANG(F77)],
+ [Fortran], [_LT_LANG(FC)],
+ [Windows Resource], [_LT_LANG(RC)],
+ [m4_ifdef([_LT_LANG_]$1[_CONFIG],
+ [_LT_LANG($1)],
+ [m4_fatal([$0: unsupported language: "$1"])])])dnl
+])
+m4trace:/usr/share/aclocal/libtool.m4:915: -1- AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
+m4trace:/usr/share/aclocal/libtool.m4:915: -1- AC_DEFUN([AC_LIBTOOL_CXX], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_CXX' is obsolete.
+You should run autoupdate.])dnl
+LT_LANG(C++)])
+m4trace:/usr/share/aclocal/libtool.m4:916: -1- AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
+m4trace:/usr/share/aclocal/libtool.m4:916: -1- AC_DEFUN([AC_LIBTOOL_F77], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_F77' is obsolete.
+You should run autoupdate.])dnl
+LT_LANG(Fortran 77)])
+m4trace:/usr/share/aclocal/libtool.m4:917: -1- AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
+m4trace:/usr/share/aclocal/libtool.m4:917: -1- AC_DEFUN([AC_LIBTOOL_FC], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_FC' is obsolete.
+You should run autoupdate.])dnl
+LT_LANG(Fortran)])
+m4trace:/usr/share/aclocal/libtool.m4:918: -1- AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
+m4trace:/usr/share/aclocal/libtool.m4:918: -1- AC_DEFUN([AC_LIBTOOL_GCJ], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_GCJ' is obsolete.
+You should run autoupdate.])dnl
+LT_LANG(Java)])
+m4trace:/usr/share/aclocal/libtool.m4:919: -1- AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
+m4trace:/usr/share/aclocal/libtool.m4:919: -1- AC_DEFUN([AC_LIBTOOL_RC], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_RC' is obsolete.
+You should run autoupdate.])dnl
+LT_LANG(Windows Resource)])
+m4trace:/usr/share/aclocal/libtool.m4:1247: -1- AC_DEFUN([_LT_WITH_SYSROOT], [AC_MSG_CHECKING([for sysroot])
+AC_ARG_WITH([sysroot],
+[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@],
+ [Search for dependent libraries within DIR (or the compiler's sysroot
+ if not specified).])],
+[], [with_sysroot=no])
+
+dnl lt_sysroot will always be passed unquoted. We quote it here
+dnl in case the user passed a directory name.
+lt_sysroot=
+case $with_sysroot in #(
+ yes)
+ if test yes = "$GCC"; then
+ lt_sysroot=`$CC --print-sysroot 2>/dev/null`
+ fi
+ ;; #(
+ /*)
+ lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
+ ;; #(
+ no|'')
+ ;; #(
+ *)
+ AC_MSG_RESULT([$with_sysroot])
+ AC_MSG_ERROR([The sysroot must be an absolute path.])
+ ;;
+esac
+
+ AC_MSG_RESULT([${lt_sysroot:-no}])
+_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
+[dependent libraries, and where our libraries should be installed.])])
+m4trace:/usr/share/aclocal/libtool.m4:1578: -1- AC_DEFUN([_LT_COMPILER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_SED])dnl
+AC_CACHE_CHECK([$1], [$2],
+ [$2=no
+ m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+ lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ # The option is referenced via a variable to avoid confusing sed.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&AS_MESSAGE_LOG_FD
+ echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+ if (exit $ac_status) && test -s "$ac_outfile"; then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings other than the usual output.
+ $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+ $2=yes
+ fi
+ fi
+ $RM conftest*
+])
+
+if test yes = "[$]$2"; then
+ m4_if([$5], , :, [$5])
+else
+ m4_if([$6], , :, [$6])
+fi
+])
+m4trace:/usr/share/aclocal/libtool.m4:1620: -1- AU_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [m4_if($#, 0, [_LT_COMPILER_OPTION], [_LT_COMPILER_OPTION($@)])])
+m4trace:/usr/share/aclocal/libtool.m4:1620: -1- AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_COMPILER_OPTION' is obsolete.
+You should run autoupdate.])dnl
+m4_if($#, 0, [_LT_COMPILER_OPTION], [_LT_COMPILER_OPTION($@)])])
+m4trace:/usr/share/aclocal/libtool.m4:1629: -1- AC_DEFUN([_LT_LINKER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_SED])dnl
+AC_CACHE_CHECK([$1], [$2],
+ [$2=no
+ save_LDFLAGS=$LDFLAGS
+ LDFLAGS="$LDFLAGS $3"
+ echo "$lt_simple_link_test_code" > conftest.$ac_ext
+ if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+ # The linker can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ if test -s conftest.err; then
+ # Append any errors to the config.log.
+ cat conftest.err 1>&AS_MESSAGE_LOG_FD
+ $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if diff conftest.exp conftest.er2 >/dev/null; then
+ $2=yes
+ fi
+ else
+ $2=yes
+ fi
+ fi
+ $RM -r conftest*
+ LDFLAGS=$save_LDFLAGS
+])
+
+if test yes = "[$]$2"; then
+ m4_if([$4], , :, [$4])
+else
+ m4_if([$5], , :, [$5])
+fi
+])
+m4trace:/usr/share/aclocal/libtool.m4:1664: -1- AU_DEFUN([AC_LIBTOOL_LINKER_OPTION], [m4_if($#, 0, [_LT_LINKER_OPTION], [_LT_LINKER_OPTION($@)])])
+m4trace:/usr/share/aclocal/libtool.m4:1664: -1- AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_LINKER_OPTION' is obsolete.
+You should run autoupdate.])dnl
+m4_if($#, 0, [_LT_LINKER_OPTION], [_LT_LINKER_OPTION($@)])])
+m4trace:/usr/share/aclocal/libtool.m4:1671: -1- AC_DEFUN([LT_CMD_MAX_LEN], [AC_REQUIRE([AC_CANONICAL_HOST])dnl
+# find the maximum length of command line arguments
+AC_MSG_CHECKING([the maximum length of command line arguments])
+AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
+ i=0
+ teststring=ABCD
+
+ case $build_os in
+ msdosdjgpp*)
+ # On DJGPP, this test can blow up pretty badly due to problems in libc
+ # (any single argument exceeding 2000 bytes causes a buffer overrun
+ # during glob expansion). Even if it were fixed, the result of this
+ # check would be larger than it should be.
+ lt_cv_sys_max_cmd_len=12288; # 12K is about right
+ ;;
+
+ gnu*)
+ # Under GNU Hurd, this test is not required because there is
+ # no limit to the length of command line arguments.
+ # Libtool will interpret -1 as no limit whatsoever
+ lt_cv_sys_max_cmd_len=-1;
+ ;;
+
+ cygwin* | mingw* | cegcc*)
+ # On Win9x/ME, this test blows up -- it succeeds, but takes
+ # about 5 minutes as the teststring grows exponentially.
+ # Worse, since 9x/ME are not pre-emptively multitasking,
+ # you end up with a "frozen" computer, even though with patience
+ # the test eventually succeeds (with a max line length of 256k).
+ # Instead, let's just punt: use the minimum linelength reported by
+ # all of the supported platforms: 8192 (on NT/2K/XP).
+ lt_cv_sys_max_cmd_len=8192;
+ ;;
+
+ mint*)
+ # On MiNT this can take a long time and run out of memory.
+ lt_cv_sys_max_cmd_len=8192;
+ ;;
+
+ amigaos*)
+ # On AmigaOS with pdksh, this test takes hours, literally.
+ # So we just punt and use a minimum line length of 8192.
+ lt_cv_sys_max_cmd_len=8192;
+ ;;
+
+ bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
+ # This has been around since 386BSD, at least. Likely further.
+ if test -x /sbin/sysctl; then
+ lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
+ elif test -x /usr/sbin/sysctl; then
+ lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
+ else
+ lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
+ fi
+ # And add a safety zone
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+ ;;
+
+ interix*)
+ # We know the value 262144 and hardcode it with a safety zone (like BSD)
+ lt_cv_sys_max_cmd_len=196608
+ ;;
+
+ os2*)
+ # The test takes a long time on OS/2.
+ lt_cv_sys_max_cmd_len=8192
+ ;;
+
+ osf*)
+ # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
+ # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
+ # nice to cause kernel panics so lets avoid the loop below.
+ # First set a reasonable default.
+ lt_cv_sys_max_cmd_len=16384
+ #
+ if test -x /sbin/sysconfig; then
+ case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
+ *1*) lt_cv_sys_max_cmd_len=-1 ;;
+ esac
+ fi
+ ;;
+ sco3.2v5*)
+ lt_cv_sys_max_cmd_len=102400
+ ;;
+ sysv5* | sco5v6* | sysv4.2uw2*)
+ kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
+ if test -n "$kargmax"; then
+ lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
+ else
+ lt_cv_sys_max_cmd_len=32768
+ fi
+ ;;
+ *)
+ lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
+ if test -n "$lt_cv_sys_max_cmd_len" && \
+ test undefined != "$lt_cv_sys_max_cmd_len"; then
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+ else
+ # Make teststring a little bigger before we do anything with it.
+ # a 1K string should be a reasonable start.
+ for i in 1 2 3 4 5 6 7 8; do
+ teststring=$teststring$teststring
+ done
+ SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
+ # If test is not a shell built-in, we'll probably end up computing a
+ # maximum length that is only half of the actual maximum length, but
+ # we can't tell.
+ while { test X`env echo "$teststring$teststring" 2>/dev/null` \
+ = "X$teststring$teststring"; } >/dev/null 2>&1 &&
+ test 17 != "$i" # 1/2 MB should be enough
+ do
+ i=`expr $i + 1`
+ teststring=$teststring$teststring
+ done
+ # Only check the string length outside the loop.
+ lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
+ teststring=
+ # Add a significant safety factor because C++ compilers can tack on
+ # massive amounts of additional arguments before passing them to the
+ # linker. It appears as though 1/2 is a usable value.
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
+ fi
+ ;;
+ esac
+])
+if test -n "$lt_cv_sys_max_cmd_len"; then
+ AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
+else
+ AC_MSG_RESULT(none)
+fi
+max_cmd_len=$lt_cv_sys_max_cmd_len
+_LT_DECL([], [max_cmd_len], [0],
+ [What is the maximum length of a command?])
+])
+m4trace:/usr/share/aclocal/libtool.m4:1810: -1- AU_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [m4_if($#, 0, [LT_CMD_MAX_LEN], [LT_CMD_MAX_LEN($@)])])
+m4trace:/usr/share/aclocal/libtool.m4:1810: -1- AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_SYS_MAX_CMD_LEN' is obsolete.
+You should run autoupdate.])dnl
+m4_if($#, 0, [LT_CMD_MAX_LEN], [LT_CMD_MAX_LEN($@)])])
+m4trace:/usr/share/aclocal/libtool.m4:1921: -1- AC_DEFUN([LT_SYS_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl
+if test yes != "$enable_dlopen"; then
+ enable_dlopen=unknown
+ enable_dlopen_self=unknown
+ enable_dlopen_self_static=unknown
+else
+ lt_cv_dlopen=no
+ lt_cv_dlopen_libs=
+
+ case $host_os in
+ beos*)
+ lt_cv_dlopen=load_add_on
+ lt_cv_dlopen_libs=
+ lt_cv_dlopen_self=yes
+ ;;
+
+ mingw* | pw32* | cegcc*)
+ lt_cv_dlopen=LoadLibrary
+ lt_cv_dlopen_libs=
+ ;;
+
+ cygwin*)
+ lt_cv_dlopen=dlopen
+ lt_cv_dlopen_libs=
+ ;;
+
+ darwin*)
+ # if libdl is installed we need to link against it
+ AC_CHECK_LIB([dl], [dlopen],
+ [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[
+ lt_cv_dlopen=dyld
+ lt_cv_dlopen_libs=
+ lt_cv_dlopen_self=yes
+ ])
+ ;;
+
+ tpf*)
+ # Don't try to run any link tests for TPF. We know it's impossible
+ # because TPF is a cross-compiler, and we know how we open DSOs.
+ lt_cv_dlopen=dlopen
+ lt_cv_dlopen_libs=
+ lt_cv_dlopen_self=no
+ ;;
+
+ *)
+ AC_CHECK_FUNC([shl_load],
+ [lt_cv_dlopen=shl_load],
+ [AC_CHECK_LIB([dld], [shl_load],
+ [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld],
+ [AC_CHECK_FUNC([dlopen],
+ [lt_cv_dlopen=dlopen],
+ [AC_CHECK_LIB([dl], [dlopen],
+ [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],
+ [AC_CHECK_LIB([svld], [dlopen],
+ [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld],
+ [AC_CHECK_LIB([dld], [dld_link],
+ [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld])
+ ])
+ ])
+ ])
+ ])
+ ])
+ ;;
+ esac
+
+ if test no = "$lt_cv_dlopen"; then
+ enable_dlopen=no
+ else
+ enable_dlopen=yes
+ fi
+
+ case $lt_cv_dlopen in
+ dlopen)
+ save_CPPFLAGS=$CPPFLAGS
+ test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
+
+ save_LDFLAGS=$LDFLAGS
+ wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
+
+ save_LIBS=$LIBS
+ LIBS="$lt_cv_dlopen_libs $LIBS"
+
+ AC_CACHE_CHECK([whether a program can dlopen itself],
+ lt_cv_dlopen_self, [dnl
+ _LT_TRY_DLOPEN_SELF(
+ lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
+ lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
+ ])
+
+ if test yes = "$lt_cv_dlopen_self"; then
+ wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
+ AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
+ lt_cv_dlopen_self_static, [dnl
+ _LT_TRY_DLOPEN_SELF(
+ lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
+ lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
+ ])
+ fi
+
+ CPPFLAGS=$save_CPPFLAGS
+ LDFLAGS=$save_LDFLAGS
+ LIBS=$save_LIBS
+ ;;
+ esac
+
+ case $lt_cv_dlopen_self in
+ yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
+ *) enable_dlopen_self=unknown ;;
+ esac
+
+ case $lt_cv_dlopen_self_static in
+ yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
+ *) enable_dlopen_self_static=unknown ;;
+ esac
+fi
+_LT_DECL([dlopen_support], [enable_dlopen], [0],
+ [Whether dlopen is supported])
+_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
+ [Whether dlopen of programs is supported])
+_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
+ [Whether dlopen of statically linked programs is supported])
+])
+m4trace:/usr/share/aclocal/libtool.m4:2046: -1- AU_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [m4_if($#, 0, [LT_SYS_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF($@)])])
+m4trace:/usr/share/aclocal/libtool.m4:2046: -1- AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_DLOPEN_SELF' is obsolete.
+You should run autoupdate.])dnl
+m4_if($#, 0, [LT_SYS_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF($@)])])
+m4trace:/usr/share/aclocal/libtool.m4:3167: -1- AC_DEFUN([_LT_PATH_TOOL_PREFIX], [m4_require([_LT_DECL_EGREP])dnl
+AC_MSG_CHECKING([for $1])
+AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
+[case $MAGIC_CMD in
+[[\\/*] | ?:[\\/]*])
+ lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
+ ;;
+*)
+ lt_save_MAGIC_CMD=$MAGIC_CMD
+ lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
+dnl $ac_dummy forces splitting on constant user-supplied paths.
+dnl POSIX.2 word splitting is done only on the output of word expansions,
+dnl not every word. This closes a longstanding sh security hole.
+ ac_dummy="m4_if([$2], , $PATH, [$2])"
+ for ac_dir in $ac_dummy; do
+ IFS=$lt_save_ifs
+ test -z "$ac_dir" && ac_dir=.
+ if test -f "$ac_dir/$1"; then
+ lt_cv_path_MAGIC_CMD=$ac_dir/"$1"
+ if test -n "$file_magic_test_file"; then
+ case $deplibs_check_method in
+ "file_magic "*)
+ file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
+ MAGIC_CMD=$lt_cv_path_MAGIC_CMD
+ if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+ $EGREP "$file_magic_regex" > /dev/null; then
+ :
+ else
+ cat <<_LT_EOF 1>&2
+
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such. This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem. Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool@gnu.org
+
+_LT_EOF
+ fi ;;
+ esac
+ fi
+ break
+ fi
+ done
+ IFS=$lt_save_ifs
+ MAGIC_CMD=$lt_save_MAGIC_CMD
+ ;;
+esac])
+MAGIC_CMD=$lt_cv_path_MAGIC_CMD
+if test -n "$MAGIC_CMD"; then
+ AC_MSG_RESULT($MAGIC_CMD)
+else
+ AC_MSG_RESULT(no)
+fi
+_LT_DECL([], [MAGIC_CMD], [0],
+ [Used to examine libraries when file_magic_cmd begins with "file"])dnl
+])
+m4trace:/usr/share/aclocal/libtool.m4:3229: -1- AU_DEFUN([AC_PATH_TOOL_PREFIX], [m4_if($#, 0, [_LT_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX($@)])])
+m4trace:/usr/share/aclocal/libtool.m4:3229: -1- AC_DEFUN([AC_PATH_TOOL_PREFIX], [AC_DIAGNOSE([obsolete], [The macro `AC_PATH_TOOL_PREFIX' is obsolete.
+You should run autoupdate.])dnl
+m4_if($#, 0, [_LT_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX($@)])])
+m4trace:/usr/share/aclocal/libtool.m4:3252: -1- AC_DEFUN([LT_PATH_LD], [AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+m4_require([_LT_DECL_SED])dnl
+m4_require([_LT_DECL_EGREP])dnl
+m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
+
+AC_ARG_WITH([gnu-ld],
+ [AS_HELP_STRING([--with-gnu-ld],
+ [assume the C compiler uses GNU ld @<:@default=no@:>@])],
+ [test no = "$withval" || with_gnu_ld=yes],
+ [with_gnu_ld=no])dnl
+
+ac_prog=ld
+if test yes = "$GCC"; then
+ # Check if gcc -print-prog-name=ld gives a path.
+ AC_MSG_CHECKING([for ld used by $CC])
+ case $host in
+ *-*-mingw*)
+ # gcc leaves a trailing carriage return, which upsets mingw
+ ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+ *)
+ ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+ esac
+ case $ac_prog in
+ # Accept absolute paths.
+ [[\\/]]* | ?:[[\\/]]*)
+ re_direlt='/[[^/]][[^/]]*/\.\./'
+ # Canonicalize the pathname of ld
+ ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
+ while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
+ ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
+ done
+ test -z "$LD" && LD=$ac_prog
+ ;;
+ "")
+ # If it fails, then pretend we aren't using GCC.
+ ac_prog=ld
+ ;;
+ *)
+ # If it is relative, then search for the first ld in PATH.
+ with_gnu_ld=unknown
+ ;;
+ esac
+elif test yes = "$with_gnu_ld"; then
+ AC_MSG_CHECKING([for GNU ld])
+else
+ AC_MSG_CHECKING([for non-GNU ld])
+fi
+AC_CACHE_VAL(lt_cv_path_LD,
+[if test -z "$LD"; then
+ lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH; do
+ IFS=$lt_save_ifs
+ test -z "$ac_dir" && ac_dir=.
+ if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+ lt_cv_path_LD=$ac_dir/$ac_prog
+ # Check to see if the program is GNU ld. I'd rather use --version,
+ # but apparently some variants of GNU ld only accept -v.
+ # Break only if it was the GNU/non-GNU ld that we prefer.
+ case `"$lt_cv_path_LD" -v 2>&1 &1 | sed '1q'` in
+ *$lt_bad_file* | *'Invalid file or object type'*)
+ lt_cv_path_NM="$tmp_nm -B"
+ break 2
+ ;;
+ *)
+ case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
+ */dev/null*)
+ lt_cv_path_NM="$tmp_nm -p"
+ break 2
+ ;;
+ *)
+ lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
+ continue # so that we can try to find one that supports BSD flags
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ done
+ IFS=$lt_save_ifs
+ done
+ : ${lt_cv_path_NM=no}
+fi])
+if test no != "$lt_cv_path_NM"; then
+ NM=$lt_cv_path_NM
+else
+ # Didn't find any BSD compatible name lister, look for dumpbin.
+ if test -n "$DUMPBIN"; then :
+ # Let the user override the test.
+ else
+ AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
+ case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
+ *COFF*)
+ DUMPBIN="$DUMPBIN -symbols -headers"
+ ;;
+ *)
+ DUMPBIN=:
+ ;;
+ esac
+ fi
+ AC_SUBST([DUMPBIN])
+ if test : != "$DUMPBIN"; then
+ NM=$DUMPBIN
+ fi
+fi
+test -z "$NM" && NM=nm
+AC_SUBST([NM])
+_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
+
+AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
+ [lt_cv_nm_interface="BSD nm"
+ echo "int some_variable = 0;" > conftest.$ac_ext
+ (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
+ (eval "$ac_compile" 2>conftest.err)
+ cat conftest.err >&AS_MESSAGE_LOG_FD
+ (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
+ (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
+ cat conftest.err >&AS_MESSAGE_LOG_FD
+ (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
+ cat conftest.out >&AS_MESSAGE_LOG_FD
+ if $GREP 'External.*some_variable' conftest.out > /dev/null; then
+ lt_cv_nm_interface="MS dumpbin"
+ fi
+ rm -f conftest*])
+])
+m4trace:/usr/share/aclocal/libtool.m4:3766: -1- AU_DEFUN([AM_PROG_NM], [m4_if($#, 0, [LT_PATH_NM], [LT_PATH_NM($@)])])
+m4trace:/usr/share/aclocal/libtool.m4:3766: -1- AC_DEFUN([AM_PROG_NM], [AC_DIAGNOSE([obsolete], [The macro `AM_PROG_NM' is obsolete.
+You should run autoupdate.])dnl
+m4_if($#, 0, [LT_PATH_NM], [LT_PATH_NM($@)])])
+m4trace:/usr/share/aclocal/libtool.m4:3767: -1- AU_DEFUN([AC_PROG_NM], [m4_if($#, 0, [LT_PATH_NM], [LT_PATH_NM($@)])])
+m4trace:/usr/share/aclocal/libtool.m4:3767: -1- AC_DEFUN([AC_PROG_NM], [AC_DIAGNOSE([obsolete], [The macro `AC_PROG_NM' is obsolete.
+You should run autoupdate.])dnl
+m4_if($#, 0, [LT_PATH_NM], [LT_PATH_NM($@)])])
+m4trace:/usr/share/aclocal/libtool.m4:3838: -1- AC_DEFUN([_LT_DLL_DEF_P], [dnl
+ test DEF = "`$SED -n dnl
+ -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace
+ -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments
+ -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl
+ -e q dnl Only consider the first "real" line
+ $1`" dnl
+])
+m4trace:/usr/share/aclocal/libtool.m4:3852: -1- AC_DEFUN([LT_LIB_M], [AC_REQUIRE([AC_CANONICAL_HOST])dnl
+LIBM=
+case $host in
+*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
+ # These system don't have libm, or don't need it
+ ;;
+*-ncr-sysv4.3*)
+ AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw)
+ AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
+ ;;
+*)
+ AC_CHECK_LIB(m, cos, LIBM=-lm)
+ ;;
+esac
+AC_SUBST([LIBM])
+])
+m4trace:/usr/share/aclocal/libtool.m4:3871: -1- AU_DEFUN([AC_CHECK_LIBM], [m4_if($#, 0, [LT_LIB_M], [LT_LIB_M($@)])])
+m4trace:/usr/share/aclocal/libtool.m4:3871: -1- AC_DEFUN([AC_CHECK_LIBM], [AC_DIAGNOSE([obsolete], [The macro `AC_CHECK_LIBM' is obsolete.
+You should run autoupdate.])dnl
+m4_if($#, 0, [LT_LIB_M], [LT_LIB_M($@)])])
+m4trace:/usr/share/aclocal/libtool.m4:8141: -1- AC_DEFUN([LT_PROG_GCJ], [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
+ [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
+ [AC_CHECK_TOOL(GCJ, gcj,)
+ test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2"
+ AC_SUBST(GCJFLAGS)])])[]dnl
+])
+m4trace:/usr/share/aclocal/libtool.m4:8150: -1- AU_DEFUN([LT_AC_PROG_GCJ], [m4_if($#, 0, [LT_PROG_GCJ], [LT_PROG_GCJ($@)])])
+m4trace:/usr/share/aclocal/libtool.m4:8150: -1- AC_DEFUN([LT_AC_PROG_GCJ], [AC_DIAGNOSE([obsolete], [The macro `LT_AC_PROG_GCJ' is obsolete.
+You should run autoupdate.])dnl
+m4_if($#, 0, [LT_PROG_GCJ], [LT_PROG_GCJ($@)])])
+m4trace:/usr/share/aclocal/libtool.m4:8157: -1- AC_DEFUN([LT_PROG_GO], [AC_CHECK_TOOL(GOC, gccgo,)
+])
+m4trace:/usr/share/aclocal/libtool.m4:8164: -1- AC_DEFUN([LT_PROG_RC], [AC_CHECK_TOOL(RC, windres,)
+])
+m4trace:/usr/share/aclocal/libtool.m4:8169: -1- AU_DEFUN([LT_AC_PROG_RC], [m4_if($#, 0, [LT_PROG_RC], [LT_PROG_RC($@)])])
+m4trace:/usr/share/aclocal/libtool.m4:8169: -1- AC_DEFUN([LT_AC_PROG_RC], [AC_DIAGNOSE([obsolete], [The macro `LT_AC_PROG_RC' is obsolete.
+You should run autoupdate.])dnl
+m4_if($#, 0, [LT_PROG_RC], [LT_PROG_RC($@)])])
+m4trace:/usr/share/aclocal/libtool.m4:8289: -1- AU_DEFUN([LT_AC_PROG_SED], [m4_if($#, 0, [AC_PROG_SED], [AC_PROG_SED($@)])])
+m4trace:/usr/share/aclocal/libtool.m4:8289: -1- AC_DEFUN([LT_AC_PROG_SED], [AC_DIAGNOSE([obsolete], [The macro `LT_AC_PROG_SED' is obsolete.
+You should run autoupdate.])dnl
+m4_if($#, 0, [AC_PROG_SED], [AC_PROG_SED($@)])])
+m4trace:/usr/share/aclocal/ltoptions.m4:14: -1- AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
+m4trace:/usr/share/aclocal/ltoptions.m4:113: -1- AU_DEFUN([AC_LIBTOOL_DLOPEN], [_LT_SET_OPTION([LT_INIT], [dlopen])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you
+put the 'dlopen' option into LT_INIT's first parameter.])
+])
+m4trace:/usr/share/aclocal/ltoptions.m4:113: -1- AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_DLOPEN' is obsolete.
+You should run autoupdate.])dnl
+_LT_SET_OPTION([LT_INIT], [dlopen])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you
+put the 'dlopen' option into LT_INIT's first parameter.])
+])
+m4trace:/usr/share/aclocal/ltoptions.m4:148: -1- AU_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_REQUIRE([AC_CANONICAL_HOST])dnl
+_LT_SET_OPTION([LT_INIT], [win32-dll])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you
+put the 'win32-dll' option into LT_INIT's first parameter.])
+])
+m4trace:/usr/share/aclocal/ltoptions.m4:148: -1- AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_WIN32_DLL' is obsolete.
+You should run autoupdate.])dnl
+AC_REQUIRE([AC_CANONICAL_HOST])dnl
+_LT_SET_OPTION([LT_INIT], [win32-dll])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you
+put the 'win32-dll' option into LT_INIT's first parameter.])
+])
+m4trace:/usr/share/aclocal/ltoptions.m4:197: -1- AC_DEFUN([AC_ENABLE_SHARED], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
+])
+m4trace:/usr/share/aclocal/ltoptions.m4:201: -1- AC_DEFUN([AC_DISABLE_SHARED], [_LT_SET_OPTION([LT_INIT], [disable-shared])
+])
+m4trace:/usr/share/aclocal/ltoptions.m4:205: -1- AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
+m4trace:/usr/share/aclocal/ltoptions.m4:205: -1- AC_DEFUN([AM_ENABLE_SHARED], [AC_DIAGNOSE([obsolete], [The macro `AM_ENABLE_SHARED' is obsolete.
+You should run autoupdate.])dnl
+AC_ENABLE_SHARED($@)])
+m4trace:/usr/share/aclocal/ltoptions.m4:206: -1- AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
+m4trace:/usr/share/aclocal/ltoptions.m4:206: -1- AC_DEFUN([AM_DISABLE_SHARED], [AC_DIAGNOSE([obsolete], [The macro `AM_DISABLE_SHARED' is obsolete.
+You should run autoupdate.])dnl
+AC_DISABLE_SHARED($@)])
+m4trace:/usr/share/aclocal/ltoptions.m4:251: -1- AC_DEFUN([AC_ENABLE_STATIC], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
+])
+m4trace:/usr/share/aclocal/ltoptions.m4:255: -1- AC_DEFUN([AC_DISABLE_STATIC], [_LT_SET_OPTION([LT_INIT], [disable-static])
+])
+m4trace:/usr/share/aclocal/ltoptions.m4:259: -1- AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
+m4trace:/usr/share/aclocal/ltoptions.m4:259: -1- AC_DEFUN([AM_ENABLE_STATIC], [AC_DIAGNOSE([obsolete], [The macro `AM_ENABLE_STATIC' is obsolete.
+You should run autoupdate.])dnl
+AC_ENABLE_STATIC($@)])
+m4trace:/usr/share/aclocal/ltoptions.m4:260: -1- AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
+m4trace:/usr/share/aclocal/ltoptions.m4:260: -1- AC_DEFUN([AM_DISABLE_STATIC], [AC_DIAGNOSE([obsolete], [The macro `AM_DISABLE_STATIC' is obsolete.
+You should run autoupdate.])dnl
+AC_DISABLE_STATIC($@)])
+m4trace:/usr/share/aclocal/ltoptions.m4:305: -1- AU_DEFUN([AC_ENABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you put
+the 'fast-install' option into LT_INIT's first parameter.])
+])
+m4trace:/usr/share/aclocal/ltoptions.m4:305: -1- AC_DEFUN([AC_ENABLE_FAST_INSTALL], [AC_DIAGNOSE([obsolete], [The macro `AC_ENABLE_FAST_INSTALL' is obsolete.
+You should run autoupdate.])dnl
+_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you put
+the 'fast-install' option into LT_INIT's first parameter.])
+])
+m4trace:/usr/share/aclocal/ltoptions.m4:312: -1- AU_DEFUN([AC_DISABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], [disable-fast-install])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you put
+the 'disable-fast-install' option into LT_INIT's first parameter.])
+])
+m4trace:/usr/share/aclocal/ltoptions.m4:312: -1- AC_DEFUN([AC_DISABLE_FAST_INSTALL], [AC_DIAGNOSE([obsolete], [The macro `AC_DISABLE_FAST_INSTALL' is obsolete.
+You should run autoupdate.])dnl
+_LT_SET_OPTION([LT_INIT], [disable-fast-install])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you put
+the 'disable-fast-install' option into LT_INIT's first parameter.])
+])
+m4trace:/usr/share/aclocal/ltoptions.m4:411: -1- AU_DEFUN([AC_LIBTOOL_PICMODE], [_LT_SET_OPTION([LT_INIT], [pic-only])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you
+put the 'pic-only' option into LT_INIT's first parameter.])
+])
+m4trace:/usr/share/aclocal/ltoptions.m4:411: -1- AC_DEFUN([AC_LIBTOOL_PICMODE], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_PICMODE' is obsolete.
+You should run autoupdate.])dnl
+_LT_SET_OPTION([LT_INIT], [pic-only])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you
+put the 'pic-only' option into LT_INIT's first parameter.])
+])
+m4trace:/usr/share/aclocal/ltsugar.m4:14: -1- AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
+m4trace:/usr/share/aclocal/ltversion.m4:18: -1- AC_DEFUN([LTVERSION_VERSION], [macro_version='2.4.6'
+macro_revision='2.4.6'
+_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
+_LT_DECL(, macro_revision, 0)
+])
+m4trace:/usr/share/aclocal/lt~obsolete.m4:37: -1- AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
+m4trace:/usr/share/aclocal/lt~obsolete.m4:41: -1- AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])
+m4trace:/usr/share/aclocal/lt~obsolete.m4:42: -1- AC_DEFUN([_LT_AC_SHELL_INIT])
+m4trace:/usr/share/aclocal/lt~obsolete.m4:43: -1- AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])
+m4trace:/usr/share/aclocal/lt~obsolete.m4:45: -1- AC_DEFUN([_LT_AC_TAGVAR])
+m4trace:/usr/share/aclocal/lt~obsolete.m4:46: -1- AC_DEFUN([AC_LTDL_ENABLE_INSTALL])
+m4trace:/usr/share/aclocal/lt~obsolete.m4:47: -1- AC_DEFUN([AC_LTDL_PREOPEN])
+m4trace:/usr/share/aclocal/lt~obsolete.m4:48: -1- AC_DEFUN([_LT_AC_SYS_COMPILER])
+m4trace:/usr/share/aclocal/lt~obsolete.m4:49: -1- AC_DEFUN([_LT_AC_LOCK])
+m4trace:/usr/share/aclocal/lt~obsolete.m4:50: -1- AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])
+m4trace:/usr/share/aclocal/lt~obsolete.m4:51: -1- AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])
+m4trace:/usr/share/aclocal/lt~obsolete.m4:52: -1- AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])
+m4trace:/usr/share/aclocal/lt~obsolete.m4:53: -1- AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])
+m4trace:/usr/share/aclocal/lt~obsolete.m4:54: -1- AC_DEFUN([AC_LIBTOOL_OBJDIR])
+m4trace:/usr/share/aclocal/lt~obsolete.m4:55: -1- AC_DEFUN([AC_LTDL_OBJDIR])
+m4trace:/usr/share/aclocal/lt~obsolete.m4:56: -1- AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])
+m4trace:/usr/share/aclocal/lt~obsolete.m4:57: -1- AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])
+m4trace:/usr/share/aclocal/lt~obsolete.m4:58: -1- AC_DEFUN([AC_PATH_MAGIC])
+m4trace:/usr/share/aclocal/lt~obsolete.m4:59: -1- AC_DEFUN([AC_PROG_LD_GNU])
+m4trace:/usr/share/aclocal/lt~obsolete.m4:60: -1- AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])
+m4trace:/usr/share/aclocal/lt~obsolete.m4:61: -1- AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])
+m4trace:/usr/share/aclocal/lt~obsolete.m4:62: -1- AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])
+m4trace:/usr/share/aclocal/lt~obsolete.m4:63: -1- AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])
+m4trace:/usr/share/aclocal/lt~obsolete.m4:64: -1- AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])
+m4trace:/usr/share/aclocal/lt~obsolete.m4:65: -1- AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])
+m4trace:/usr/share/aclocal/lt~obsolete.m4:66: -1- AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])
+m4trace:/usr/share/aclocal/lt~obsolete.m4:67: -1- AC_DEFUN([LT_AC_PROG_EGREP])
+m4trace:/usr/share/aclocal/lt~obsolete.m4:72: -1- AC_DEFUN([_AC_PROG_LIBTOOL])
+m4trace:/usr/share/aclocal/lt~obsolete.m4:73: -1- AC_DEFUN([AC_LIBTOOL_SETUP])
+m4trace:/usr/share/aclocal/lt~obsolete.m4:74: -1- AC_DEFUN([_LT_AC_CHECK_DLFCN])
+m4trace:/usr/share/aclocal/lt~obsolete.m4:75: -1- AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])
+m4trace:/usr/share/aclocal/lt~obsolete.m4:76: -1- AC_DEFUN([_LT_AC_TAGCONFIG])
+m4trace:/usr/share/aclocal/lt~obsolete.m4:78: -1- AC_DEFUN([_LT_AC_LANG_CXX])
+m4trace:/usr/share/aclocal/lt~obsolete.m4:79: -1- AC_DEFUN([_LT_AC_LANG_F77])
+m4trace:/usr/share/aclocal/lt~obsolete.m4:80: -1- AC_DEFUN([_LT_AC_LANG_GCJ])
+m4trace:/usr/share/aclocal/lt~obsolete.m4:81: -1- AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])
+m4trace:/usr/share/aclocal/lt~obsolete.m4:82: -1- AC_DEFUN([_LT_AC_LANG_C_CONFIG])
+m4trace:/usr/share/aclocal/lt~obsolete.m4:83: -1- AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])
+m4trace:/usr/share/aclocal/lt~obsolete.m4:84: -1- AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])
+m4trace:/usr/share/aclocal/lt~obsolete.m4:85: -1- AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])
+m4trace:/usr/share/aclocal/lt~obsolete.m4:86: -1- AC_DEFUN([_LT_AC_LANG_F77_CONFIG])
+m4trace:/usr/share/aclocal/lt~obsolete.m4:87: -1- AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])
+m4trace:/usr/share/aclocal/lt~obsolete.m4:88: -1- AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])
+m4trace:/usr/share/aclocal/lt~obsolete.m4:89: -1- AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])
+m4trace:/usr/share/aclocal/lt~obsolete.m4:90: -1- AC_DEFUN([_LT_AC_LANG_RC_CONFIG])
+m4trace:/usr/share/aclocal/lt~obsolete.m4:91: -1- AC_DEFUN([AC_LIBTOOL_CONFIG])
+m4trace:/usr/share/aclocal/lt~obsolete.m4:92: -1- AC_DEFUN([_LT_AC_FILE_LTDLL_C])
+m4trace:/usr/share/aclocal/lt~obsolete.m4:94: -1- AC_DEFUN([_LT_AC_PROG_CXXCPP])
+m4trace:/usr/share/aclocal/lt~obsolete.m4:97: -1- AC_DEFUN([_LT_PROG_F77])
+m4trace:/usr/share/aclocal/lt~obsolete.m4:98: -1- AC_DEFUN([_LT_PROG_FC])
+m4trace:/usr/share/aclocal/lt~obsolete.m4:99: -1- AC_DEFUN([_LT_PROG_CXX])
+m4trace:/usr/share/aclocal-1.15/amversion.m4:14: -1- AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.15'
+dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
+dnl require some minimum version. Point them to the right macro.
+m4_if([$1], [1.15], [],
+ [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
+])
+m4trace:/usr/share/aclocal-1.15/amversion.m4:33: -1- AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.15])dnl
+m4_ifndef([AC_AUTOCONF_VERSION],
+ [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
+m4trace:/usr/share/aclocal-1.15/as.m4:11: -1- AC_DEFUN([AM_PROG_AS], [# By default we simply use the C compiler to build assembly code.
+AC_REQUIRE([AC_PROG_CC])
+test "${CCAS+set}" = set || CCAS=$CC
+test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS
+AC_ARG_VAR([CCAS], [assembler compiler command (defaults to CC)])
+AC_ARG_VAR([CCASFLAGS], [assembler compiler flags (defaults to CFLAGS)])
+_AM_IF_OPTION([no-dependencies],, [_AM_DEPENDENCIES([CCAS])])dnl
+])
+m4trace:/usr/share/aclocal-1.15/auxdir.m4:47: -1- AC_DEFUN([AM_AUX_DIR_EXPAND], [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
+# Expand $ac_aux_dir to an absolute path.
+am_aux_dir=`cd "$ac_aux_dir" && pwd`
+])
+m4trace:/usr/share/aclocal-1.15/cond.m4:12: -1- AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ([2.52])dnl
+ m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
+ [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
+AC_SUBST([$1_TRUE])dnl
+AC_SUBST([$1_FALSE])dnl
+_AM_SUBST_NOTMAKE([$1_TRUE])dnl
+_AM_SUBST_NOTMAKE([$1_FALSE])dnl
+m4_define([_AM_COND_VALUE_$1], [$2])dnl
+if $2; then
+ $1_TRUE=
+ $1_FALSE='#'
+else
+ $1_TRUE='#'
+ $1_FALSE=
+fi
+AC_CONFIG_COMMANDS_PRE(
+[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
+ AC_MSG_ERROR([[conditional "$1" was never defined.
+Usually this means the macro was only invoked conditionally.]])
+fi])])
+m4trace:/usr/share/aclocal-1.15/depend.m4:26: -1- AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl
+AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
+AC_REQUIRE([AM_MAKE_INCLUDE])dnl
+AC_REQUIRE([AM_DEP_TRACK])dnl
+
+m4_if([$1], [CC], [depcc="$CC" am_compiler_list=],
+ [$1], [CXX], [depcc="$CXX" am_compiler_list=],
+ [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
+ [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
+ [$1], [UPC], [depcc="$UPC" am_compiler_list=],
+ [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
+ [depcc="$$1" am_compiler_list=])
+
+AC_CACHE_CHECK([dependency style of $depcc],
+ [am_cv_$1_dependencies_compiler_type],
+[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named 'D' -- because '-MD' means "put the output
+ # in D".
+ rm -rf conftest.dir
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
+
+ am_cv_$1_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
+ fi
+ am__universal=false
+ m4_case([$1], [CC],
+ [case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac],
+ [CXX],
+ [case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac])
+
+ for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
+ # Solaris 10 /bin/sh.
+ echo '/* dummy */' > sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+ # We check with '-c' and '-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle '-M -o', and we need to detect this. Also, some Intel
+ # versions had trouble with output in subdirs.
+ am__obj=sub/conftest.${OBJEXT-o}
+ am__minus_obj="-o $am__obj"
+ case $depmode in
+ gcc)
+ # This depmode causes a compiler race in universal mode.
+ test "$am__universal" = false || continue
+ ;;
+ nosideeffect)
+ # After this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested.
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ msvc7 | msvc7msys | msvisualcpp | msvcmsys)
+ # This compiler won't grok '-c -o', but also, the minuso test has
+ # not run yet. These depmodes are late enough in the game, and
+ # so weak that their functioning should not be impacted.
+ am__obj=conftest.${OBJEXT-o}
+ am__minus_obj=
+ ;;
+ none) break ;;
+ esac
+ if depmode=$depmode \
+ source=sub/conftest.c object=$am__obj \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+ am_cv_$1_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_$1_dependencies_compiler_type=none
+fi
+])
+AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
+AM_CONDITIONAL([am__fastdep$1], [
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
+])
+m4trace:/usr/share/aclocal-1.15/depend.m4:163: -1- AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
+])
+m4trace:/usr/share/aclocal-1.15/depend.m4:171: -1- AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE([dependency-tracking], [dnl
+AS_HELP_STRING(
+ [--enable-dependency-tracking],
+ [do not reject slow dependency extractors])
+AS_HELP_STRING(
+ [--disable-dependency-tracking],
+ [speeds up one-time build])])
+if test "x$enable_dependency_tracking" != xno; then
+ am_depcomp="$ac_aux_dir/depcomp"
+ AMDEPBACKSLASH='\'
+ am__nodep='_no'
+fi
+AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
+AC_SUBST([AMDEPBACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
+AC_SUBST([am__nodep])dnl
+_AM_SUBST_NOTMAKE([am__nodep])dnl
+])
+m4trace:/usr/share/aclocal-1.15/depout.m4:12: -1- AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{
+ # Older Autoconf quotes --file arguments for eval, but not when files
+ # are listed without --file. Let's play safe and only enable the eval
+ # if we detect the quoting.
+ case $CONFIG_FILES in
+ *\'*) eval set x "$CONFIG_FILES" ;;
+ *) set x $CONFIG_FILES ;;
+ esac
+ shift
+ for mf
+ do
+ # Strip MF so we end up with the name of the file.
+ mf=`echo "$mf" | sed -e 's/:.*$//'`
+ # Check whether this is an Automake generated Makefile or not.
+ # We used to match only the files named 'Makefile.in', but
+ # some people rename them; so instead we look at the file content.
+ # Grep'ing the first line is not enough: some people post-process
+ # each Makefile.in and add a new line on top of each file to say so.
+ # Grep'ing the whole file is not good either: AIX grep has a line
+ # limit of 2048, but all sed's we know have understand at least 4000.
+ if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+ dirpart=`AS_DIRNAME("$mf")`
+ else
+ continue
+ fi
+ # Extract the definition of DEPDIR, am__include, and am__quote
+ # from the Makefile without running 'make'.
+ DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+ test -z "$DEPDIR" && continue
+ am__include=`sed -n 's/^am__include = //p' < "$mf"`
+ test -z "$am__include" && continue
+ am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+ # Find all dependency output files, they are included files with
+ # $(DEPDIR) in their names. We invoke sed twice because it is the
+ # simplest approach to changing $(DEPDIR) to its actual value in the
+ # expansion.
+ for file in `sed -n "
+ s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
+ # Make sure the directory exists.
+ test -f "$dirpart/$file" && continue
+ fdir=`AS_DIRNAME(["$file"])`
+ AS_MKDIR_P([$dirpart/$fdir])
+ # echo "creating $dirpart/$file"
+ echo '# dummy' > "$dirpart/$file"
+ done
+ done
+}
+])
+m4trace:/usr/share/aclocal-1.15/depout.m4:71: -1- AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles],
+ [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
+ [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
+])
+m4trace:/usr/share/aclocal-1.15/init.m4:29: -1- AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.65])dnl
+dnl Autoconf wants to disallow AM_ names. We explicitly allow
+dnl the ones we care about.
+m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
+AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
+AC_REQUIRE([AC_PROG_INSTALL])dnl
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+ # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+ # is not polluted with repeated "-I."
+ AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
+ # test to see if srcdir already configured
+ if test -f $srcdir/config.status; then
+ AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+ fi
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+ if (cygpath --version) >/dev/null 2>/dev/null; then
+ CYGPATH_W='cygpath -w'
+ else
+ CYGPATH_W=echo
+ fi
+fi
+AC_SUBST([CYGPATH_W])
+
+# Define the identity of the package.
+dnl Distinguish between old-style and new-style calls.
+m4_ifval([$2],
+[AC_DIAGNOSE([obsolete],
+ [$0: two- and three-arguments forms are deprecated.])
+m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
+ AC_SUBST([PACKAGE], [$1])dnl
+ AC_SUBST([VERSION], [$2])],
+[_AM_SET_OPTIONS([$1])dnl
+dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
+m4_if(
+ m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
+ [ok:ok],,
+ [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
+ AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
+ AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
+
+_AM_IF_OPTION([no-define],,
+[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
+ AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
+
+# Some tools Automake needs.
+AC_REQUIRE([AM_SANITY_CHECK])dnl
+AC_REQUIRE([AC_ARG_PROGRAM])dnl
+AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
+AM_MISSING_PROG([AUTOCONF], [autoconf])
+AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
+AM_MISSING_PROG([AUTOHEADER], [autoheader])
+AM_MISSING_PROG([MAKEINFO], [makeinfo])
+AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
+AC_REQUIRE([AC_PROG_MKDIR_P])dnl
+# For better backward compatibility. To be removed once Automake 1.9.x
+# dies out for good. For more background, see:
+#
+#
+AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
+# We need awk for the "check" target (and possibly the TAP driver). The
+# system "awk" is bad on some platforms.
+AC_REQUIRE([AC_PROG_AWK])dnl
+AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
+ [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
+ [_AM_PROG_TAR([v7])])])
+_AM_IF_OPTION([no-dependencies],,
+[AC_PROVIDE_IFELSE([AC_PROG_CC],
+ [_AM_DEPENDENCIES([CC])],
+ [m4_define([AC_PROG_CC],
+ m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_CXX],
+ [_AM_DEPENDENCIES([CXX])],
+ [m4_define([AC_PROG_CXX],
+ m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_OBJC],
+ [_AM_DEPENDENCIES([OBJC])],
+ [m4_define([AC_PROG_OBJC],
+ m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
+ [_AM_DEPENDENCIES([OBJCXX])],
+ [m4_define([AC_PROG_OBJCXX],
+ m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
+])
+AC_REQUIRE([AM_SILENT_RULES])dnl
+dnl The testsuite driver may need to know about EXEEXT, so add the
+dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This
+dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
+AC_CONFIG_COMMANDS_PRE(dnl
+[m4_provide_if([_AM_COMPILER_EXEEXT],
+ [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
+
+# POSIX will say in a future version that running "rm -f" with no argument
+# is OK; and we want to be able to make that assumption in our Makefile
+# recipes. So use an aggressive probe to check that the usage we want is
+# actually supported "in the wild" to an acceptable degree.
+# See automake bug#10828.
+# To make any issue more visible, cause the running configure to be aborted
+# by default if the 'rm' program in use doesn't match our expectations; the
+# user can still override this though.
+if rm -f && rm -fr && rm -rf; then : OK; else
+ cat >&2 <<'END'
+Oops!
+
+Your 'rm' program seems unable to run without file operands specified
+on the command line, even when the '-f' option is present. This is contrary
+to the behaviour of most rm programs out there, and not conforming with
+the upcoming POSIX standard:
+
+Please tell bug-automake@gnu.org about your system, including the value
+of your $PATH and any error possibly output before this message. This
+can help us improve future automake versions.
+
+END
+ if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
+ echo 'Configuration will proceed anyway, since you have set the' >&2
+ echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
+ echo >&2
+ else
+ cat >&2 <<'END'
+Aborting the configuration process, to ensure you take notice of the issue.
+
+You can download and install GNU coreutils to get an 'rm' implementation
+that behaves properly: .
+
+If you want to complete the configuration process using your problematic
+'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
+to "yes", and re-run configure.
+
+END
+ AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
+ fi
+fi
+dnl The trailing newline in this macro's definition is deliberate, for
+dnl backward compatibility and to allow trailing 'dnl'-style comments
+dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841.
+])
+m4trace:/usr/share/aclocal-1.15/init.m4:186: -1- AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers.
+_am_arg=$1
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+ case $_am_header in
+ $_am_arg | $_am_arg:* )
+ break ;;
+ * )
+ _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+ esac
+done
+echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
+m4trace:/usr/share/aclocal-1.15/install-sh.m4:11: -1- AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+if test x"${install_sh+set}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+ *)
+ install_sh="\${SHELL} $am_aux_dir/install-sh"
+ esac
+fi
+AC_SUBST([install_sh])])
+m4trace:/usr/share/aclocal-1.15/lead-dot.m4:10: -1- AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+ am__leading_dot=.
+else
+ am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+AC_SUBST([am__leading_dot])])
+m4trace:/usr/share/aclocal-1.15/maintainer.m4:16: -1- AC_DEFUN([AM_MAINTAINER_MODE], [m4_case(m4_default([$1], [disable]),
+ [enable], [m4_define([am_maintainer_other], [disable])],
+ [disable], [m4_define([am_maintainer_other], [enable])],
+ [m4_define([am_maintainer_other], [enable])
+ m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
+AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
+ dnl maintainer-mode's default is 'disable' unless 'enable' is passed
+ AC_ARG_ENABLE([maintainer-mode],
+ [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode],
+ am_maintainer_other[ make rules and dependencies not useful
+ (and sometimes confusing) to the casual installer])],
+ [USE_MAINTAINER_MODE=$enableval],
+ [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
+ AC_MSG_RESULT([$USE_MAINTAINER_MODE])
+ AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
+ MAINT=$MAINTAINER_MODE_TRUE
+ AC_SUBST([MAINT])dnl
+
+])
+m4trace:/usr/share/aclocal-1.15/make.m4:12: -1- AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+ @echo this is the am__doit target
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+AC_MSG_CHECKING([for style of include used by $am_make])
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# Ignore all kinds of additional output from 'make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+ am__include=include
+ am__quote=
+ _am_result=GNU
+ ;;
+esac
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+ echo '.include "confinc"' > confmf
+ case `$am_make -s -f confmf 2> /dev/null` in #(
+ *the\ am__doit\ target*)
+ am__include=.include
+ am__quote="\""
+ _am_result=BSD
+ ;;
+ esac
+fi
+AC_SUBST([am__include])
+AC_SUBST([am__quote])
+AC_MSG_RESULT([$_am_result])
+rm -f confinc confmf
+])
+m4trace:/usr/share/aclocal-1.15/missing.m4:11: -1- AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN])
+$1=${$1-"${am_missing_run}$2"}
+AC_SUBST($1)])
+m4trace:/usr/share/aclocal-1.15/missing.m4:20: -1- AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([missing])dnl
+if test x"${MISSING+set}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
+ *)
+ MISSING="\${SHELL} $am_aux_dir/missing" ;;
+ esac
+fi
+# Use eval to expand $SHELL
+if eval "$MISSING --is-lightweight"; then
+ am_missing_run="$MISSING "
+else
+ am_missing_run=
+ AC_MSG_WARN(['missing' script is too old or missing])
+fi
+])
+m4trace:/usr/share/aclocal-1.15/options.m4:11: -1- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
+m4trace:/usr/share/aclocal-1.15/options.m4:17: -1- AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), [1])])
+m4trace:/usr/share/aclocal-1.15/options.m4:23: -1- AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
+m4trace:/usr/share/aclocal-1.15/options.m4:29: -1- AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
+m4trace:/usr/share/aclocal-1.15/prog-cc-c-o.m4:12: -1- AC_DEFUN([_AM_PROG_CC_C_O], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([compile])dnl
+AC_LANG_PUSH([C])dnl
+AC_CACHE_CHECK(
+ [whether $CC understands -c and -o together],
+ [am_cv_prog_cc_c_o],
+ [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
+ # Make sure it works both with $CC and with simple cc.
+ # Following AC_PROG_CC_C_O, we do the test twice because some
+ # compilers refuse to overwrite an existing .o file with -o,
+ # though they will create one.
+ am_cv_prog_cc_c_o=yes
+ for am_i in 1 2; do
+ if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
+ && test -f conftest2.$ac_objext; then
+ : OK
+ else
+ am_cv_prog_cc_c_o=no
+ break
+ fi
+ done
+ rm -f core conftest*
+ unset am_i])
+if test "$am_cv_prog_cc_c_o" != yes; then
+ # Losing compiler, so override with the script.
+ # FIXME: It is wrong to rewrite CC.
+ # But if we don't then we get into trouble of one sort or another.
+ # A longer-term fix would be to have automake use am__CC in this case,
+ # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
+ CC="$am_aux_dir/compile $CC"
+fi
+AC_LANG_POP([C])])
+m4trace:/usr/share/aclocal-1.15/prog-cc-c-o.m4:47: -1- AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
+m4trace:/usr/share/aclocal-1.15/runlog.m4:12: -1- AC_DEFUN([AM_RUN_LOG], [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
+ ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+ (exit $ac_status); }])
+m4trace:/usr/share/aclocal-1.15/sanity.m4:11: -1- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane])
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name. Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+ *[[\\\"\#\$\&\'\`$am_lf]]*)
+ AC_MSG_ERROR([unsafe absolute working directory name]);;
+esac
+case $srcdir in
+ *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
+ AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
+esac
+
+# Do 'set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ am_has_slept=no
+ for am_try in 1 2; do
+ echo "timestamp, slept: $am_has_slept" > conftest.file
+ set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+ if test "$[*]" = "X"; then
+ # -L didn't work.
+ set X `ls -t "$srcdir/configure" conftest.file`
+ fi
+ if test "$[*]" != "X $srcdir/configure conftest.file" \
+ && test "$[*]" != "X conftest.file $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
+ alias in your environment])
+ fi
+ if test "$[2]" = conftest.file || test $am_try -eq 2; then
+ break
+ fi
+ # Just in case.
+ sleep 1
+ am_has_slept=yes
+ done
+ test "$[2]" = conftest.file
+ )
+then
+ # Ok.
+ :
+else
+ AC_MSG_ERROR([newly created file is older than distributed files!
+Check your system clock])
+fi
+AC_MSG_RESULT([yes])
+# If we didn't sleep, we still need to ensure time stamps of config.status and
+# generated files are strictly newer.
+am_sleep_pid=
+if grep 'slept: no' conftest.file >/dev/null 2>&1; then
+ ( sleep 1 ) &
+ am_sleep_pid=$!
+fi
+AC_CONFIG_COMMANDS_PRE(
+ [AC_MSG_CHECKING([that generated files are newer than configure])
+ if test -n "$am_sleep_pid"; then
+ # Hide warnings about reused PIDs.
+ wait $am_sleep_pid 2>/dev/null
+ fi
+ AC_MSG_RESULT([done])])
+rm -f conftest.file
+])
+m4trace:/usr/share/aclocal-1.15/silent.m4:12: -1- AC_DEFUN([AM_SILENT_RULES], [AC_ARG_ENABLE([silent-rules], [dnl
+AS_HELP_STRING(
+ [--enable-silent-rules],
+ [less verbose build output (undo: "make V=1")])
+AS_HELP_STRING(
+ [--disable-silent-rules],
+ [verbose build output (undo: "make V=0")])dnl
+])
+case $enable_silent_rules in @%:@ (((
+ yes) AM_DEFAULT_VERBOSITY=0;;
+ no) AM_DEFAULT_VERBOSITY=1;;
+ *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
+esac
+dnl
+dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
+dnl do not support nested variable expansions.
+dnl See automake bug#9928 and bug#10237.
+am_make=${MAKE-make}
+AC_CACHE_CHECK([whether $am_make supports nested variables],
+ [am_cv_make_support_nested_variables],
+ [if AS_ECHO([['TRUE=$(BAR$(V))
+BAR0=false
+BAR1=true
+V=1
+am__doit:
+ @$(TRUE)
+.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
+ am_cv_make_support_nested_variables=yes
+else
+ am_cv_make_support_nested_variables=no
+fi])
+if test $am_cv_make_support_nested_variables = yes; then
+ dnl Using '$V' instead of '$(V)' breaks IRIX make.
+ AM_V='$(V)'
+ AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
+else
+ AM_V=$AM_DEFAULT_VERBOSITY
+ AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
+fi
+AC_SUBST([AM_V])dnl
+AM_SUBST_NOTMAKE([AM_V])dnl
+AC_SUBST([AM_DEFAULT_V])dnl
+AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
+AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
+AM_BACKSLASH='\'
+AC_SUBST([AM_BACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
+])
+m4trace:/usr/share/aclocal-1.15/strip.m4:17: -1- AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+# Installed binaries are usually stripped using 'strip' when the user
+# run "make install-strip". However 'strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the 'STRIP' environment variable to overrule this program.
+dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
+if test "$cross_compiling" != no; then
+ AC_CHECK_TOOL([STRIP], [strip], :)
+fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+AC_SUBST([INSTALL_STRIP_PROGRAM])])
+m4trace:/usr/share/aclocal-1.15/substnot.m4:12: -1- AC_DEFUN([_AM_SUBST_NOTMAKE])
+m4trace:/usr/share/aclocal-1.15/substnot.m4:17: -1- AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
+m4trace:/usr/share/aclocal-1.15/tar.m4:23: -1- AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. Yes, it's still used
+# in the wild :-( We should find a proper way to deprecate it ...
+AC_SUBST([AMTAR], ['$${TAR-tar}'])
+
+# We'll loop over all known methods to create a tar archive until one works.
+_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
+
+m4_if([$1], [v7],
+ [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
+
+ [m4_case([$1],
+ [ustar],
+ [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
+ # There is notably a 21 bits limit for the UID and the GID. In fact,
+ # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
+ # and bug#13588).
+ am_max_uid=2097151 # 2^21 - 1
+ am_max_gid=$am_max_uid
+ # The $UID and $GID variables are not portable, so we need to resort
+ # to the POSIX-mandated id(1) utility. Errors in the 'id' calls
+ # below are definitely unexpected, so allow the users to see them
+ # (that is, avoid stderr redirection).
+ am_uid=`id -u || echo unknown`
+ am_gid=`id -g || echo unknown`
+ AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
+ if test $am_uid -le $am_max_uid; then
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ _am_tools=none
+ fi
+ AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
+ if test $am_gid -le $am_max_gid; then
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ _am_tools=none
+ fi],
+
+ [pax],
+ [],
+
+ [m4_fatal([Unknown tar format])])
+
+ AC_MSG_CHECKING([how to create a $1 tar archive])
+
+ # Go ahead even if we have the value already cached. We do so because we
+ # need to set the values for the 'am__tar' and 'am__untar' variables.
+ _am_tools=${am_cv_prog_tar_$1-$_am_tools}
+
+ for _am_tool in $_am_tools; do
+ case $_am_tool in
+ gnutar)
+ for _am_tar in tar gnutar gtar; do
+ AM_RUN_LOG([$_am_tar --version]) && break
+ done
+ am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
+ am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
+ am__untar="$_am_tar -xf -"
+ ;;
+ plaintar)
+ # Must skip GNU tar: if it does not support --format= it doesn't create
+ # ustar tarball either.
+ (tar --version) >/dev/null 2>&1 && continue
+ am__tar='tar chf - "$$tardir"'
+ am__tar_='tar chf - "$tardir"'
+ am__untar='tar xf -'
+ ;;
+ pax)
+ am__tar='pax -L -x $1 -w "$$tardir"'
+ am__tar_='pax -L -x $1 -w "$tardir"'
+ am__untar='pax -r'
+ ;;
+ cpio)
+ am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
+ am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
+ am__untar='cpio -i -H $1 -d'
+ ;;
+ none)
+ am__tar=false
+ am__tar_=false
+ am__untar=false
+ ;;
+ esac
+
+ # If the value was cached, stop now. We just wanted to have am__tar
+ # and am__untar set.
+ test -n "${am_cv_prog_tar_$1}" && break
+
+ # tar/untar a dummy directory, and stop if the command works.
+ rm -rf conftest.dir
+ mkdir conftest.dir
+ echo GrepMe > conftest.dir/file
+ AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
+ rm -rf conftest.dir
+ if test -s conftest.tar; then
+ AM_RUN_LOG([$am__untar /dev/null 2>&1 && break
+ fi
+ done
+ rm -rf conftest.dir
+
+ AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
+ AC_MSG_RESULT([$am_cv_prog_tar_$1])])
+
+AC_SUBST([am__tar])
+AC_SUBST([am__untar])
+])
+m4trace:configure.ac:2: -1- m4_pattern_forbid([^_?A[CHUM]_])
+m4trace:configure.ac:2: -1- m4_pattern_forbid([_AC_])
+m4trace:configure.ac:2: -1- m4_pattern_forbid([^LIBOBJS$], [do not use LIBOBJS directly, use AC_LIBOBJ (see section `AC_LIBOBJ vs LIBOBJS'])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^AS_FLAGS$])
+m4trace:configure.ac:2: -1- m4_pattern_forbid([^_?m4_])
+m4trace:configure.ac:2: -1- m4_pattern_forbid([^dnl$])
+m4trace:configure.ac:2: -1- m4_pattern_forbid([^_?AS_])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^SHELL$])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^PATH_SEPARATOR$])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^PACKAGE_NAME$])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^PACKAGE_TARNAME$])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^PACKAGE_VERSION$])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^PACKAGE_STRING$])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^PACKAGE_BUGREPORT$])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^PACKAGE_URL$])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^exec_prefix$])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^prefix$])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^program_transform_name$])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^bindir$])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^sbindir$])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^libexecdir$])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^datarootdir$])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^datadir$])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^sysconfdir$])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^sharedstatedir$])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^localstatedir$])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^runstatedir$])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^includedir$])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^oldincludedir$])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^docdir$])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^infodir$])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^htmldir$])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^dvidir$])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^pdfdir$])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^psdir$])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^libdir$])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^localedir$])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^mandir$])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^PACKAGE_NAME$])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^PACKAGE_TARNAME$])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^PACKAGE_VERSION$])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^PACKAGE_STRING$])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^PACKAGE_BUGREPORT$])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^PACKAGE_URL$])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^DEFS$])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^ECHO_C$])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^ECHO_N$])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^ECHO_T$])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^LIBS$])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^build_alias$])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^host_alias$])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^target_alias$])
+m4trace:configure.ac:5: -1- m4_pattern_allow([^build$])
+m4trace:configure.ac:5: -1- m4_pattern_allow([^build_cpu$])
+m4trace:configure.ac:5: -1- m4_pattern_allow([^build_vendor$])
+m4trace:configure.ac:5: -1- m4_pattern_allow([^build_os$])
+m4trace:configure.ac:5: -1- m4_pattern_allow([^host$])
+m4trace:configure.ac:5: -1- m4_pattern_allow([^host_cpu$])
+m4trace:configure.ac:5: -1- m4_pattern_allow([^host_vendor$])
+m4trace:configure.ac:5: -1- m4_pattern_allow([^host_os$])
+m4trace:configure.ac:5: -1- m4_pattern_allow([^target$])
+m4trace:configure.ac:5: -1- m4_pattern_allow([^target_cpu$])
+m4trace:configure.ac:5: -1- m4_pattern_allow([^target_vendor$])
+m4trace:configure.ac:5: -1- m4_pattern_allow([^target_os$])
+m4trace:configure.ac:7: -1- AC_CONFIG_MACRO_DIR([m4])
+m4trace:configure.ac:8: -1- AM_INIT_AUTOMAKE([foreign dist-bzip2 nostdinc])
+m4trace:configure.ac:8: -1- m4_pattern_allow([^AM_[A-Z]+FLAGS$])
+m4trace:configure.ac:8: -1- AM_SET_CURRENT_AUTOMAKE_VERSION
+m4trace:configure.ac:8: -1- AM_AUTOMAKE_VERSION([1.15])
+m4trace:configure.ac:8: -1- _AM_AUTOCONF_VERSION([2.69])
+m4trace:configure.ac:8: -1- m4_pattern_allow([^INSTALL_PROGRAM$])
+m4trace:configure.ac:8: -1- m4_pattern_allow([^INSTALL_SCRIPT$])
+m4trace:configure.ac:8: -1- m4_pattern_allow([^INSTALL_DATA$])
+m4trace:configure.ac:8: -1- m4_pattern_allow([^am__isrc$])
+m4trace:configure.ac:8: -1- _AM_SUBST_NOTMAKE([am__isrc])
+m4trace:configure.ac:8: -1- m4_pattern_allow([^CYGPATH_W$])
+m4trace:configure.ac:8: -1- _AM_SET_OPTIONS([foreign dist-bzip2 nostdinc])
+m4trace:configure.ac:8: -1- _AM_SET_OPTION([foreign])
+m4trace:configure.ac:8: -2- _AM_MANGLE_OPTION([foreign])
+m4trace:configure.ac:8: -1- _AM_SET_OPTION([dist-bzip2])
+m4trace:configure.ac:8: -2- _AM_MANGLE_OPTION([dist-bzip2])
+m4trace:configure.ac:8: -1- _AM_SET_OPTION([nostdinc])
+m4trace:configure.ac:8: -2- _AM_MANGLE_OPTION([nostdinc])
+m4trace:configure.ac:8: -1- m4_pattern_allow([^PACKAGE$])
+m4trace:configure.ac:8: -1- m4_pattern_allow([^VERSION$])
+m4trace:configure.ac:8: -1- _AM_IF_OPTION([no-define], [], [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
+ AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])
+m4trace:configure.ac:8: -2- _AM_MANGLE_OPTION([no-define])
+m4trace:configure.ac:8: -1- m4_pattern_allow([^PACKAGE$])
+m4trace:configure.ac:8: -1- m4_pattern_allow([^VERSION$])
+m4trace:configure.ac:8: -1- AM_SANITY_CHECK
+m4trace:configure.ac:8: -1- AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
+m4trace:configure.ac:8: -1- AM_MISSING_HAS_RUN
+m4trace:configure.ac:8: -1- AM_AUX_DIR_EXPAND
+m4trace:configure.ac:8: -1- m4_pattern_allow([^ACLOCAL$])
+m4trace:configure.ac:8: -1- AM_MISSING_PROG([AUTOCONF], [autoconf])
+m4trace:configure.ac:8: -1- m4_pattern_allow([^AUTOCONF$])
+m4trace:configure.ac:8: -1- AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
+m4trace:configure.ac:8: -1- m4_pattern_allow([^AUTOMAKE$])
+m4trace:configure.ac:8: -1- AM_MISSING_PROG([AUTOHEADER], [autoheader])
+m4trace:configure.ac:8: -1- m4_pattern_allow([^AUTOHEADER$])
+m4trace:configure.ac:8: -1- AM_MISSING_PROG([MAKEINFO], [makeinfo])
+m4trace:configure.ac:8: -1- m4_pattern_allow([^MAKEINFO$])
+m4trace:configure.ac:8: -1- AM_PROG_INSTALL_SH
+m4trace:configure.ac:8: -1- m4_pattern_allow([^install_sh$])
+m4trace:configure.ac:8: -1- AM_PROG_INSTALL_STRIP
+m4trace:configure.ac:8: -1- m4_pattern_allow([^STRIP$])
+m4trace:configure.ac:8: -1- m4_pattern_allow([^INSTALL_STRIP_PROGRAM$])
+m4trace:configure.ac:8: -1- m4_pattern_allow([^MKDIR_P$])
+m4trace:configure.ac:8: -1- m4_pattern_allow([^mkdir_p$])
+m4trace:configure.ac:8: -1- m4_pattern_allow([^AWK$])
+m4trace:configure.ac:8: -1- m4_pattern_allow([^SET_MAKE$])
+m4trace:configure.ac:8: -1- AM_SET_LEADING_DOT
+m4trace:configure.ac:8: -1- m4_pattern_allow([^am__leading_dot$])
+m4trace:configure.ac:8: -1- _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
+ [_AM_PROG_TAR([v7])])])
+m4trace:configure.ac:8: -2- _AM_MANGLE_OPTION([tar-ustar])
+m4trace:configure.ac:8: -1- _AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])
+m4trace:configure.ac:8: -2- _AM_MANGLE_OPTION([tar-pax])
+m4trace:configure.ac:8: -1- _AM_PROG_TAR([v7])
+m4trace:configure.ac:8: -1- m4_pattern_allow([^AMTAR$])
+m4trace:configure.ac:8: -1- m4_pattern_allow([^am__tar$])
+m4trace:configure.ac:8: -1- m4_pattern_allow([^am__untar$])
+m4trace:configure.ac:8: -1- _AM_IF_OPTION([no-dependencies], [], [AC_PROVIDE_IFELSE([AC_PROG_CC],
+ [_AM_DEPENDENCIES([CC])],
+ [m4_define([AC_PROG_CC],
+ m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_CXX],
+ [_AM_DEPENDENCIES([CXX])],
+ [m4_define([AC_PROG_CXX],
+ m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_OBJC],
+ [_AM_DEPENDENCIES([OBJC])],
+ [m4_define([AC_PROG_OBJC],
+ m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
+ [_AM_DEPENDENCIES([OBJCXX])],
+ [m4_define([AC_PROG_OBJCXX],
+ m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
+])
+m4trace:configure.ac:8: -2- _AM_MANGLE_OPTION([no-dependencies])
+m4trace:configure.ac:8: -1- AM_SILENT_RULES
+m4trace:configure.ac:8: -1- m4_pattern_allow([^AM_V$])
+m4trace:configure.ac:8: -1- AM_SUBST_NOTMAKE([AM_V])
+m4trace:configure.ac:8: -1- _AM_SUBST_NOTMAKE([AM_V])
+m4trace:configure.ac:8: -1- m4_pattern_allow([^AM_DEFAULT_V$])
+m4trace:configure.ac:8: -1- AM_SUBST_NOTMAKE([AM_DEFAULT_V])
+m4trace:configure.ac:8: -1- _AM_SUBST_NOTMAKE([AM_DEFAULT_V])
+m4trace:configure.ac:8: -1- m4_pattern_allow([^AM_DEFAULT_VERBOSITY$])
+m4trace:configure.ac:8: -1- m4_pattern_allow([^AM_BACKSLASH$])
+m4trace:configure.ac:8: -1- _AM_SUBST_NOTMAKE([AM_BACKSLASH])
+m4trace:configure.ac:9: -1- AM_MAINTAINER_MODE
+m4trace:configure.ac:9: -1- AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
+m4trace:configure.ac:9: -1- m4_pattern_allow([^MAINTAINER_MODE_TRUE$])
+m4trace:configure.ac:9: -1- m4_pattern_allow([^MAINTAINER_MODE_FALSE$])
+m4trace:configure.ac:9: -1- _AM_SUBST_NOTMAKE([MAINTAINER_MODE_TRUE])
+m4trace:configure.ac:9: -1- _AM_SUBST_NOTMAKE([MAINTAINER_MODE_FALSE])
+m4trace:configure.ac:9: -1- m4_pattern_allow([^MAINT$])
+m4trace:configure.ac:14: -1- AM_PROG_CC_C_O
+m4trace:configure.ac:14: -1- m4_pattern_allow([^CC$])
+m4trace:configure.ac:14: -1- m4_pattern_allow([^CFLAGS$])
+m4trace:configure.ac:14: -1- m4_pattern_allow([^LDFLAGS$])
+m4trace:configure.ac:14: -1- m4_pattern_allow([^LIBS$])
+m4trace:configure.ac:14: -1- m4_pattern_allow([^CPPFLAGS$])
+m4trace:configure.ac:14: -1- m4_pattern_allow([^CC$])
+m4trace:configure.ac:14: -1- m4_pattern_allow([^CC$])
+m4trace:configure.ac:14: -1- m4_pattern_allow([^CC$])
+m4trace:configure.ac:14: -1- m4_pattern_allow([^CC$])
+m4trace:configure.ac:14: -1- m4_pattern_allow([^ac_ct_CC$])
+m4trace:configure.ac:14: -1- m4_pattern_allow([^EXEEXT$])
+m4trace:configure.ac:14: -1- m4_pattern_allow([^OBJEXT$])
+m4trace:configure.ac:14: -1- _AM_PROG_CC_C_O
+m4trace:configure.ac:14: -1- AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext])
+m4trace:configure.ac:14: -1- _AM_DEPENDENCIES([CC])
+m4trace:configure.ac:14: -1- AM_SET_DEPDIR
+m4trace:configure.ac:14: -1- m4_pattern_allow([^DEPDIR$])
+m4trace:configure.ac:14: -1- AM_OUTPUT_DEPENDENCY_COMMANDS
+m4trace:configure.ac:14: -1- AM_MAKE_INCLUDE
+m4trace:configure.ac:14: -1- m4_pattern_allow([^am__include$])
+m4trace:configure.ac:14: -1- m4_pattern_allow([^am__quote$])
+m4trace:configure.ac:14: -1- AM_DEP_TRACK
+m4trace:configure.ac:14: -1- AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
+m4trace:configure.ac:14: -1- m4_pattern_allow([^AMDEP_TRUE$])
+m4trace:configure.ac:14: -1- m4_pattern_allow([^AMDEP_FALSE$])
+m4trace:configure.ac:14: -1- _AM_SUBST_NOTMAKE([AMDEP_TRUE])
+m4trace:configure.ac:14: -1- _AM_SUBST_NOTMAKE([AMDEP_FALSE])
+m4trace:configure.ac:14: -1- m4_pattern_allow([^AMDEPBACKSLASH$])
+m4trace:configure.ac:14: -1- _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])
+m4trace:configure.ac:14: -1- m4_pattern_allow([^am__nodep$])
+m4trace:configure.ac:14: -1- _AM_SUBST_NOTMAKE([am__nodep])
+m4trace:configure.ac:14: -1- m4_pattern_allow([^CCDEPMODE$])
+m4trace:configure.ac:14: -1- AM_CONDITIONAL([am__fastdepCC], [
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_CC_dependencies_compiler_type" = gcc3])
+m4trace:configure.ac:14: -1- m4_pattern_allow([^am__fastdepCC_TRUE$])
+m4trace:configure.ac:14: -1- m4_pattern_allow([^am__fastdepCC_FALSE$])
+m4trace:configure.ac:14: -1- _AM_SUBST_NOTMAKE([am__fastdepCC_TRUE])
+m4trace:configure.ac:14: -1- _AM_SUBST_NOTMAKE([am__fastdepCC_FALSE])
+m4trace:configure.ac:15: -1- AM_PROG_AS
+m4trace:configure.ac:15: -1- m4_pattern_allow([^CCAS$])
+m4trace:configure.ac:15: -1- m4_pattern_allow([^CCASFLAGS$])
+m4trace:configure.ac:15: -1- _AM_IF_OPTION([no-dependencies], [], [_AM_DEPENDENCIES([CCAS])])
+m4trace:configure.ac:15: -2- _AM_MANGLE_OPTION([no-dependencies])
+m4trace:configure.ac:15: -1- _AM_DEPENDENCIES([CCAS])
+m4trace:configure.ac:15: -1- m4_pattern_allow([^CCASDEPMODE$])
+m4trace:configure.ac:15: -1- AM_CONDITIONAL([am__fastdepCCAS], [
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_CCAS_dependencies_compiler_type" = gcc3])
+m4trace:configure.ac:15: -1- m4_pattern_allow([^am__fastdepCCAS_TRUE$])
+m4trace:configure.ac:15: -1- m4_pattern_allow([^am__fastdepCCAS_FALSE$])
+m4trace:configure.ac:15: -1- _AM_SUBST_NOTMAKE([am__fastdepCCAS_TRUE])
+m4trace:configure.ac:15: -1- _AM_SUBST_NOTMAKE([am__fastdepCCAS_FALSE])
+m4trace:configure.ac:16: -1- LT_INIT([disable-shared])
+m4trace:configure.ac:16: -1- m4_pattern_forbid([^_?LT_[A-Z_]+$])
+m4trace:configure.ac:16: -1- m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])
+m4trace:configure.ac:16: -1- LTOPTIONS_VERSION
+m4trace:configure.ac:16: -1- LTSUGAR_VERSION
+m4trace:configure.ac:16: -1- LTVERSION_VERSION
+m4trace:configure.ac:16: -1- LTOBSOLETE_VERSION
+m4trace:configure.ac:16: -1- _LT_PROG_LTMAIN
+m4trace:configure.ac:16: -1- m4_pattern_allow([^LIBTOOL$])
+m4trace:configure.ac:16: -1- _LT_PREPARE_SED_QUOTE_VARS
+m4trace:configure.ac:16: -1- _LT_PROG_ECHO_BACKSLASH
+m4trace:configure.ac:16: -1- LT_PATH_LD
+m4trace:configure.ac:16: -1- m4_pattern_allow([^SED$])
+m4trace:configure.ac:16: -1- AC_PROG_EGREP
+m4trace:configure.ac:16: -1- m4_pattern_allow([^GREP$])
+m4trace:configure.ac:16: -1- m4_pattern_allow([^EGREP$])
+m4trace:configure.ac:16: -1- m4_pattern_allow([^FGREP$])
+m4trace:configure.ac:16: -1- m4_pattern_allow([^GREP$])
+m4trace:configure.ac:16: -1- m4_pattern_allow([^LD$])
+m4trace:configure.ac:16: -1- LT_PATH_NM
+m4trace:configure.ac:16: -1- m4_pattern_allow([^DUMPBIN$])
+m4trace:configure.ac:16: -1- m4_pattern_allow([^ac_ct_DUMPBIN$])
+m4trace:configure.ac:16: -1- m4_pattern_allow([^DUMPBIN$])
+m4trace:configure.ac:16: -1- m4_pattern_allow([^NM$])
+m4trace:configure.ac:16: -1- m4_pattern_allow([^LN_S$])
+m4trace:configure.ac:16: -1- LT_CMD_MAX_LEN
+m4trace:configure.ac:16: -1- m4_pattern_allow([^OBJDUMP$])
+m4trace:configure.ac:16: -1- m4_pattern_allow([^OBJDUMP$])
+m4trace:configure.ac:16: -1- m4_pattern_allow([^DLLTOOL$])
+m4trace:configure.ac:16: -1- m4_pattern_allow([^DLLTOOL$])
+m4trace:configure.ac:16: -1- m4_pattern_allow([^AR$])
+m4trace:configure.ac:16: -1- m4_pattern_allow([^ac_ct_AR$])
+m4trace:configure.ac:16: -1- m4_pattern_allow([^STRIP$])
+m4trace:configure.ac:16: -1- m4_pattern_allow([^RANLIB$])
+m4trace:configure.ac:16: -1- _LT_WITH_SYSROOT
+m4trace:configure.ac:16: -1- m4_pattern_allow([LT_OBJDIR])
+m4trace:configure.ac:16: -1- m4_pattern_allow([^LT_OBJDIR$])
+m4trace:configure.ac:16: -1- _LT_CC_BASENAME([$compiler])
+m4trace:configure.ac:16: -1- _LT_PATH_TOOL_PREFIX([${ac_tool_prefix}file], [/usr/bin$PATH_SEPARATOR$PATH])
+m4trace:configure.ac:16: -1- _LT_PATH_TOOL_PREFIX([file], [/usr/bin$PATH_SEPARATOR$PATH])
+m4trace:configure.ac:16: -1- LT_SUPPORTED_TAG([CC])
+m4trace:configure.ac:16: -1- _LT_COMPILER_BOILERPLATE
+m4trace:configure.ac:16: -1- _LT_LINKER_BOILERPLATE
+m4trace:configure.ac:16: -1- _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], [lt_cv_prog_compiler_rtti_exceptions], [-fno-rtti -fno-exceptions], [], [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, )="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, ) -fno-rtti -fno-exceptions"])
+m4trace:configure.ac:16: -1- _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, ) works], [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, )], [$_LT_TAGVAR(lt_prog_compiler_pic, )@&t@m4_if([],[],[ -DPIC],[m4_if([],[CXX],[ -DPIC],[])])], [], [case $_LT_TAGVAR(lt_prog_compiler_pic, ) in
+ "" | " "*) ;;
+ *) _LT_TAGVAR(lt_prog_compiler_pic, )=" $_LT_TAGVAR(lt_prog_compiler_pic, )" ;;
+ esac], [_LT_TAGVAR(lt_prog_compiler_pic, )=
+ _LT_TAGVAR(lt_prog_compiler_can_build_shared, )=no])
+m4trace:configure.ac:16: -1- _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], [lt_cv_prog_compiler_static_works], [$lt_tmp_static_flag], [], [_LT_TAGVAR(lt_prog_compiler_static, )=])
+m4trace:configure.ac:16: -1- m4_pattern_allow([^MANIFEST_TOOL$])
+m4trace:configure.ac:16: -1- _LT_DLL_DEF_P([$export_symbols])
+m4trace:configure.ac:16: -1- _LT_DLL_DEF_P([$export_symbols])
+m4trace:configure.ac:16: -1- _LT_REQUIRED_DARWIN_CHECKS
+m4trace:configure.ac:16: -1- m4_pattern_allow([^DSYMUTIL$])
+m4trace:configure.ac:16: -1- m4_pattern_allow([^NMEDIT$])
+m4trace:configure.ac:16: -1- m4_pattern_allow([^LIPO$])
+m4trace:configure.ac:16: -1- m4_pattern_allow([^OTOOL$])
+m4trace:configure.ac:16: -1- m4_pattern_allow([^OTOOL64$])
+m4trace:configure.ac:16: -1- _LT_LINKER_OPTION([if $CC understands -b], [lt_cv_prog_compiler__b], [-b], [_LT_TAGVAR(archive_cmds, )='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], [_LT_TAGVAR(archive_cmds, )='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])
+m4trace:configure.ac:16: -1- m4_pattern_allow([^LT_SYS_LIBRARY_PATH$])
+m4trace:configure.ac:16: -1- LT_SYS_DLOPEN_SELF
+m4trace:configure.ac:16: -1- m4_pattern_allow([^CPP$])
+m4trace:configure.ac:16: -1- m4_pattern_allow([^CPPFLAGS$])
+m4trace:configure.ac:16: -1- m4_pattern_allow([^CPP$])
+m4trace:configure.ac:16: -1- m4_pattern_allow([^STDC_HEADERS$])
+m4trace:configure.ac:16: -1- m4_pattern_allow([^HAVE_DLFCN_H$])
+m4trace:configure.ac:19: -1- AC_DEFUN([_AC_Header_stdlib_h], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_header_list], [" stdlib.h"])])
+_AC_HEADERS_EXPANSION])
+m4trace:configure.ac:19: -1- AC_DEFUN([_AC_Header_unistd_h], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_header_list], [" unistd.h"])])
+_AC_HEADERS_EXPANSION])
+m4trace:configure.ac:19: -1- AC_DEFUN([_AC_Header_sys_param_h], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_header_list], [" sys/param.h"])])
+_AC_HEADERS_EXPANSION])
+m4trace:configure.ac:19: -1- m4_pattern_allow([^HAVE_GETPAGESIZE$])
+m4trace:configure.ac:19: -1- m4_pattern_allow([^HAVE_MMAP$])
+m4trace:configure.ac:38: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2625: AC_TRY_COMPILE is expanded from...
+configure.ac:38: the top level])
+m4trace:configure.ac:54: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2625: AC_TRY_COMPILE is expanded from...
+configure.ac:54: the top level])
+m4trace:configure.ac:83: -1- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:207: AC_HELP_STRING is expanded from...
+../../lib/autoconf/general.m4:1473: AC_ARG_ENABLE is expanded from...
+configure.ac:83: the top level])
+m4trace:configure.ac:86: -1- m4_pattern_allow([^NDEBUG$])
+m4trace:configure.ac:89: -1- m4_pattern_allow([^PICFLAG$])
+m4trace:configure.ac:90: -1- m4_pattern_allow([^DEFS$])
+m4trace:configure.ac:141: -1- m4_pattern_allow([^_REENTRANT$])
+m4trace:configure.ac:151: -1- m4_pattern_allow([^_PTHREADS$])
+m4trace:configure.ac:169: -1- m4_pattern_allow([^AO_NO_PTHREADS$])
+m4trace:configure.ac:173: -1- m4_pattern_allow([^THREADDLLIBS$])
+m4trace:configure.ac:175: -1- AM_CONDITIONAL([HAVE_PTHREAD_H], [test x$have_pthreads = xtrue])
+m4trace:configure.ac:175: -1- m4_pattern_allow([^HAVE_PTHREAD_H_TRUE$])
+m4trace:configure.ac:175: -1- m4_pattern_allow([^HAVE_PTHREAD_H_FALSE$])
+m4trace:configure.ac:175: -1- _AM_SUBST_NOTMAKE([HAVE_PTHREAD_H_TRUE])
+m4trace:configure.ac:175: -1- _AM_SUBST_NOTMAKE([HAVE_PTHREAD_H_FALSE])
+m4trace:configure.ac:176: -1- AM_CONDITIONAL([NEED_ASM], [test x$need_asm = xtrue])
+m4trace:configure.ac:176: -1- m4_pattern_allow([^NEED_ASM_TRUE$])
+m4trace:configure.ac:176: -1- m4_pattern_allow([^NEED_ASM_FALSE$])
+m4trace:configure.ac:176: -1- _AM_SUBST_NOTMAKE([NEED_ASM_TRUE])
+m4trace:configure.ac:176: -1- _AM_SUBST_NOTMAKE([NEED_ASM_FALSE])
+m4trace:configure.ac:190: -1- m4_pattern_allow([^LIB@&t@OBJS$])
+m4trace:configure.ac:190: -1- m4_pattern_allow([^LTLIBOBJS$])
+m4trace:configure.ac:190: -1- AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])
+m4trace:configure.ac:190: -1- m4_pattern_allow([^am__EXEEXT_TRUE$])
+m4trace:configure.ac:190: -1- m4_pattern_allow([^am__EXEEXT_FALSE$])
+m4trace:configure.ac:190: -1- _AM_SUBST_NOTMAKE([am__EXEEXT_TRUE])
+m4trace:configure.ac:190: -1- _AM_SUBST_NOTMAKE([am__EXEEXT_FALSE])
+m4trace:configure.ac:190: -1- _AC_AM_CONFIG_HEADER_HOOK(["$ac_file"])
+m4trace:configure.ac:190: -1- _AM_OUTPUT_DEPENDENCY_COMMANDS
+m4trace:configure.ac:190: -1- _LT_PROG_LTMAIN
diff --git a/external/bdwgc/libatomic_ops/autom4te.cache/traces.1 b/external/bdwgc/libatomic_ops/autom4te.cache/traces.1
new file mode 100644
index 0000000000..009a47b1e3
--- /dev/null
+++ b/external/bdwgc/libatomic_ops/autom4te.cache/traces.1
@@ -0,0 +1,682 @@
+m4trace:aclocal.m4:1209: -1- m4_include([m4/libtool.m4])
+m4trace:aclocal.m4:1210: -1- m4_include([m4/ltoptions.m4])
+m4trace:aclocal.m4:1211: -1- m4_include([m4/ltsugar.m4])
+m4trace:aclocal.m4:1212: -1- m4_include([m4/ltversion.m4])
+m4trace:aclocal.m4:1213: -1- m4_include([m4/lt~obsolete.m4])
+m4trace:configure.ac:2: -1- AC_INIT([libatomic_ops], [7.4.2], [bdwgc@lists.opendylan.org])
+m4trace:configure.ac:2: -1- m4_pattern_forbid([^_?A[CHUM]_])
+m4trace:configure.ac:2: -1- m4_pattern_forbid([_AC_])
+m4trace:configure.ac:2: -1- m4_pattern_forbid([^LIBOBJS$], [do not use LIBOBJS directly, use AC_LIBOBJ (see section `AC_LIBOBJ vs LIBOBJS'])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^AS_FLAGS$])
+m4trace:configure.ac:2: -1- m4_pattern_forbid([^_?m4_])
+m4trace:configure.ac:2: -1- m4_pattern_forbid([^dnl$])
+m4trace:configure.ac:2: -1- m4_pattern_forbid([^_?AS_])
+m4trace:configure.ac:2: -1- AC_SUBST([SHELL])
+m4trace:configure.ac:2: -1- AC_SUBST_TRACE([SHELL])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^SHELL$])
+m4trace:configure.ac:2: -1- AC_SUBST([PATH_SEPARATOR])
+m4trace:configure.ac:2: -1- AC_SUBST_TRACE([PATH_SEPARATOR])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^PATH_SEPARATOR$])
+m4trace:configure.ac:2: -1- AC_SUBST([PACKAGE_NAME], [m4_ifdef([AC_PACKAGE_NAME], ['AC_PACKAGE_NAME'])])
+m4trace:configure.ac:2: -1- AC_SUBST_TRACE([PACKAGE_NAME])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^PACKAGE_NAME$])
+m4trace:configure.ac:2: -1- AC_SUBST([PACKAGE_TARNAME], [m4_ifdef([AC_PACKAGE_TARNAME], ['AC_PACKAGE_TARNAME'])])
+m4trace:configure.ac:2: -1- AC_SUBST_TRACE([PACKAGE_TARNAME])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^PACKAGE_TARNAME$])
+m4trace:configure.ac:2: -1- AC_SUBST([PACKAGE_VERSION], [m4_ifdef([AC_PACKAGE_VERSION], ['AC_PACKAGE_VERSION'])])
+m4trace:configure.ac:2: -1- AC_SUBST_TRACE([PACKAGE_VERSION])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^PACKAGE_VERSION$])
+m4trace:configure.ac:2: -1- AC_SUBST([PACKAGE_STRING], [m4_ifdef([AC_PACKAGE_STRING], ['AC_PACKAGE_STRING'])])
+m4trace:configure.ac:2: -1- AC_SUBST_TRACE([PACKAGE_STRING])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^PACKAGE_STRING$])
+m4trace:configure.ac:2: -1- AC_SUBST([PACKAGE_BUGREPORT], [m4_ifdef([AC_PACKAGE_BUGREPORT], ['AC_PACKAGE_BUGREPORT'])])
+m4trace:configure.ac:2: -1- AC_SUBST_TRACE([PACKAGE_BUGREPORT])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^PACKAGE_BUGREPORT$])
+m4trace:configure.ac:2: -1- AC_SUBST([PACKAGE_URL], [m4_ifdef([AC_PACKAGE_URL], ['AC_PACKAGE_URL'])])
+m4trace:configure.ac:2: -1- AC_SUBST_TRACE([PACKAGE_URL])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^PACKAGE_URL$])
+m4trace:configure.ac:2: -1- AC_SUBST([exec_prefix], [NONE])
+m4trace:configure.ac:2: -1- AC_SUBST_TRACE([exec_prefix])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^exec_prefix$])
+m4trace:configure.ac:2: -1- AC_SUBST([prefix], [NONE])
+m4trace:configure.ac:2: -1- AC_SUBST_TRACE([prefix])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^prefix$])
+m4trace:configure.ac:2: -1- AC_SUBST([program_transform_name], [s,x,x,])
+m4trace:configure.ac:2: -1- AC_SUBST_TRACE([program_transform_name])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^program_transform_name$])
+m4trace:configure.ac:2: -1- AC_SUBST([bindir], ['${exec_prefix}/bin'])
+m4trace:configure.ac:2: -1- AC_SUBST_TRACE([bindir])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^bindir$])
+m4trace:configure.ac:2: -1- AC_SUBST([sbindir], ['${exec_prefix}/sbin'])
+m4trace:configure.ac:2: -1- AC_SUBST_TRACE([sbindir])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^sbindir$])
+m4trace:configure.ac:2: -1- AC_SUBST([libexecdir], ['${exec_prefix}/libexec'])
+m4trace:configure.ac:2: -1- AC_SUBST_TRACE([libexecdir])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^libexecdir$])
+m4trace:configure.ac:2: -1- AC_SUBST([datarootdir], ['${prefix}/share'])
+m4trace:configure.ac:2: -1- AC_SUBST_TRACE([datarootdir])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^datarootdir$])
+m4trace:configure.ac:2: -1- AC_SUBST([datadir], ['${datarootdir}'])
+m4trace:configure.ac:2: -1- AC_SUBST_TRACE([datadir])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^datadir$])
+m4trace:configure.ac:2: -1- AC_SUBST([sysconfdir], ['${prefix}/etc'])
+m4trace:configure.ac:2: -1- AC_SUBST_TRACE([sysconfdir])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^sysconfdir$])
+m4trace:configure.ac:2: -1- AC_SUBST([sharedstatedir], ['${prefix}/com'])
+m4trace:configure.ac:2: -1- AC_SUBST_TRACE([sharedstatedir])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^sharedstatedir$])
+m4trace:configure.ac:2: -1- AC_SUBST([localstatedir], ['${prefix}/var'])
+m4trace:configure.ac:2: -1- AC_SUBST_TRACE([localstatedir])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^localstatedir$])
+m4trace:configure.ac:2: -1- AC_SUBST([runstatedir], ['${localstatedir}/run'])
+m4trace:configure.ac:2: -1- AC_SUBST_TRACE([runstatedir])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^runstatedir$])
+m4trace:configure.ac:2: -1- AC_SUBST([includedir], ['${prefix}/include'])
+m4trace:configure.ac:2: -1- AC_SUBST_TRACE([includedir])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^includedir$])
+m4trace:configure.ac:2: -1- AC_SUBST([oldincludedir], ['/usr/include'])
+m4trace:configure.ac:2: -1- AC_SUBST_TRACE([oldincludedir])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^oldincludedir$])
+m4trace:configure.ac:2: -1- AC_SUBST([docdir], [m4_ifset([AC_PACKAGE_TARNAME],
+ ['${datarootdir}/doc/${PACKAGE_TARNAME}'],
+ ['${datarootdir}/doc/${PACKAGE}'])])
+m4trace:configure.ac:2: -1- AC_SUBST_TRACE([docdir])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^docdir$])
+m4trace:configure.ac:2: -1- AC_SUBST([infodir], ['${datarootdir}/info'])
+m4trace:configure.ac:2: -1- AC_SUBST_TRACE([infodir])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^infodir$])
+m4trace:configure.ac:2: -1- AC_SUBST([htmldir], ['${docdir}'])
+m4trace:configure.ac:2: -1- AC_SUBST_TRACE([htmldir])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^htmldir$])
+m4trace:configure.ac:2: -1- AC_SUBST([dvidir], ['${docdir}'])
+m4trace:configure.ac:2: -1- AC_SUBST_TRACE([dvidir])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^dvidir$])
+m4trace:configure.ac:2: -1- AC_SUBST([pdfdir], ['${docdir}'])
+m4trace:configure.ac:2: -1- AC_SUBST_TRACE([pdfdir])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^pdfdir$])
+m4trace:configure.ac:2: -1- AC_SUBST([psdir], ['${docdir}'])
+m4trace:configure.ac:2: -1- AC_SUBST_TRACE([psdir])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^psdir$])
+m4trace:configure.ac:2: -1- AC_SUBST([libdir], ['${exec_prefix}/lib'])
+m4trace:configure.ac:2: -1- AC_SUBST_TRACE([libdir])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^libdir$])
+m4trace:configure.ac:2: -1- AC_SUBST([localedir], ['${datarootdir}/locale'])
+m4trace:configure.ac:2: -1- AC_SUBST_TRACE([localedir])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^localedir$])
+m4trace:configure.ac:2: -1- AC_SUBST([mandir], ['${datarootdir}/man'])
+m4trace:configure.ac:2: -1- AC_SUBST_TRACE([mandir])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^mandir$])
+m4trace:configure.ac:2: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_NAME])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^PACKAGE_NAME$])
+m4trace:configure.ac:2: -1- AH_OUTPUT([PACKAGE_NAME], [/* Define to the full name of this package. */
+@%:@undef PACKAGE_NAME])
+m4trace:configure.ac:2: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_TARNAME])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^PACKAGE_TARNAME$])
+m4trace:configure.ac:2: -1- AH_OUTPUT([PACKAGE_TARNAME], [/* Define to the one symbol short name of this package. */
+@%:@undef PACKAGE_TARNAME])
+m4trace:configure.ac:2: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_VERSION])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^PACKAGE_VERSION$])
+m4trace:configure.ac:2: -1- AH_OUTPUT([PACKAGE_VERSION], [/* Define to the version of this package. */
+@%:@undef PACKAGE_VERSION])
+m4trace:configure.ac:2: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_STRING])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^PACKAGE_STRING$])
+m4trace:configure.ac:2: -1- AH_OUTPUT([PACKAGE_STRING], [/* Define to the full name and version of this package. */
+@%:@undef PACKAGE_STRING])
+m4trace:configure.ac:2: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_BUGREPORT])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^PACKAGE_BUGREPORT$])
+m4trace:configure.ac:2: -1- AH_OUTPUT([PACKAGE_BUGREPORT], [/* Define to the address where bug reports for this package should be sent. */
+@%:@undef PACKAGE_BUGREPORT])
+m4trace:configure.ac:2: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_URL])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^PACKAGE_URL$])
+m4trace:configure.ac:2: -1- AH_OUTPUT([PACKAGE_URL], [/* Define to the home page for this package. */
+@%:@undef PACKAGE_URL])
+m4trace:configure.ac:2: -1- AC_SUBST([DEFS])
+m4trace:configure.ac:2: -1- AC_SUBST_TRACE([DEFS])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^DEFS$])
+m4trace:configure.ac:2: -1- AC_SUBST([ECHO_C])
+m4trace:configure.ac:2: -1- AC_SUBST_TRACE([ECHO_C])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^ECHO_C$])
+m4trace:configure.ac:2: -1- AC_SUBST([ECHO_N])
+m4trace:configure.ac:2: -1- AC_SUBST_TRACE([ECHO_N])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^ECHO_N$])
+m4trace:configure.ac:2: -1- AC_SUBST([ECHO_T])
+m4trace:configure.ac:2: -1- AC_SUBST_TRACE([ECHO_T])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^ECHO_T$])
+m4trace:configure.ac:2: -1- AC_SUBST([LIBS])
+m4trace:configure.ac:2: -1- AC_SUBST_TRACE([LIBS])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^LIBS$])
+m4trace:configure.ac:2: -1- AC_SUBST([build_alias])
+m4trace:configure.ac:2: -1- AC_SUBST_TRACE([build_alias])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^build_alias$])
+m4trace:configure.ac:2: -1- AC_SUBST([host_alias])
+m4trace:configure.ac:2: -1- AC_SUBST_TRACE([host_alias])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^host_alias$])
+m4trace:configure.ac:2: -1- AC_SUBST([target_alias])
+m4trace:configure.ac:2: -1- AC_SUBST_TRACE([target_alias])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^target_alias$])
+m4trace:configure.ac:5: -1- AC_CANONICAL_TARGET([])
+m4trace:configure.ac:5: -1- AC_CANONICAL_HOST
+m4trace:configure.ac:5: -1- AC_CANONICAL_BUILD
+m4trace:configure.ac:5: -1- AC_REQUIRE_AUX_FILE([config.sub])
+m4trace:configure.ac:5: -1- AC_REQUIRE_AUX_FILE([config.guess])
+m4trace:configure.ac:5: -1- AC_SUBST([build], [$ac_cv_build])
+m4trace:configure.ac:5: -1- AC_SUBST_TRACE([build])
+m4trace:configure.ac:5: -1- m4_pattern_allow([^build$])
+m4trace:configure.ac:5: -1- AC_SUBST([build_cpu], [$[1]])
+m4trace:configure.ac:5: -1- AC_SUBST_TRACE([build_cpu])
+m4trace:configure.ac:5: -1- m4_pattern_allow([^build_cpu$])
+m4trace:configure.ac:5: -1- AC_SUBST([build_vendor], [$[2]])
+m4trace:configure.ac:5: -1- AC_SUBST_TRACE([build_vendor])
+m4trace:configure.ac:5: -1- m4_pattern_allow([^build_vendor$])
+m4trace:configure.ac:5: -1- AC_SUBST([build_os])
+m4trace:configure.ac:5: -1- AC_SUBST_TRACE([build_os])
+m4trace:configure.ac:5: -1- m4_pattern_allow([^build_os$])
+m4trace:configure.ac:5: -1- AC_SUBST([host], [$ac_cv_host])
+m4trace:configure.ac:5: -1- AC_SUBST_TRACE([host])
+m4trace:configure.ac:5: -1- m4_pattern_allow([^host$])
+m4trace:configure.ac:5: -1- AC_SUBST([host_cpu], [$[1]])
+m4trace:configure.ac:5: -1- AC_SUBST_TRACE([host_cpu])
+m4trace:configure.ac:5: -1- m4_pattern_allow([^host_cpu$])
+m4trace:configure.ac:5: -1- AC_SUBST([host_vendor], [$[2]])
+m4trace:configure.ac:5: -1- AC_SUBST_TRACE([host_vendor])
+m4trace:configure.ac:5: -1- m4_pattern_allow([^host_vendor$])
+m4trace:configure.ac:5: -1- AC_SUBST([host_os])
+m4trace:configure.ac:5: -1- AC_SUBST_TRACE([host_os])
+m4trace:configure.ac:5: -1- m4_pattern_allow([^host_os$])
+m4trace:configure.ac:5: -1- AC_SUBST([target], [$ac_cv_target])
+m4trace:configure.ac:5: -1- AC_SUBST_TRACE([target])
+m4trace:configure.ac:5: -1- m4_pattern_allow([^target$])
+m4trace:configure.ac:5: -1- AC_SUBST([target_cpu], [$[1]])
+m4trace:configure.ac:5: -1- AC_SUBST_TRACE([target_cpu])
+m4trace:configure.ac:5: -1- m4_pattern_allow([^target_cpu$])
+m4trace:configure.ac:5: -1- AC_SUBST([target_vendor], [$[2]])
+m4trace:configure.ac:5: -1- AC_SUBST_TRACE([target_vendor])
+m4trace:configure.ac:5: -1- m4_pattern_allow([^target_vendor$])
+m4trace:configure.ac:5: -1- AC_SUBST([target_os])
+m4trace:configure.ac:5: -1- AC_SUBST_TRACE([target_os])
+m4trace:configure.ac:5: -1- m4_pattern_allow([^target_os$])
+m4trace:configure.ac:8: -1- AM_INIT_AUTOMAKE([foreign dist-bzip2 nostdinc])
+m4trace:configure.ac:8: -1- m4_pattern_allow([^AM_[A-Z]+FLAGS$])
+m4trace:configure.ac:8: -1- AM_AUTOMAKE_VERSION([1.15])
+m4trace:configure.ac:8: -1- AC_REQUIRE_AUX_FILE([install-sh])
+m4trace:configure.ac:8: -1- AC_SUBST([INSTALL_PROGRAM])
+m4trace:configure.ac:8: -1- AC_SUBST_TRACE([INSTALL_PROGRAM])
+m4trace:configure.ac:8: -1- m4_pattern_allow([^INSTALL_PROGRAM$])
+m4trace:configure.ac:8: -1- AC_SUBST([INSTALL_SCRIPT])
+m4trace:configure.ac:8: -1- AC_SUBST_TRACE([INSTALL_SCRIPT])
+m4trace:configure.ac:8: -1- m4_pattern_allow([^INSTALL_SCRIPT$])
+m4trace:configure.ac:8: -1- AC_SUBST([INSTALL_DATA])
+m4trace:configure.ac:8: -1- AC_SUBST_TRACE([INSTALL_DATA])
+m4trace:configure.ac:8: -1- m4_pattern_allow([^INSTALL_DATA$])
+m4trace:configure.ac:8: -1- AC_SUBST([am__isrc], [' -I$(srcdir)'])
+m4trace:configure.ac:8: -1- AC_SUBST_TRACE([am__isrc])
+m4trace:configure.ac:8: -1- m4_pattern_allow([^am__isrc$])
+m4trace:configure.ac:8: -1- _AM_SUBST_NOTMAKE([am__isrc])
+m4trace:configure.ac:8: -1- AC_SUBST([CYGPATH_W])
+m4trace:configure.ac:8: -1- AC_SUBST_TRACE([CYGPATH_W])
+m4trace:configure.ac:8: -1- m4_pattern_allow([^CYGPATH_W$])
+m4trace:configure.ac:8: -1- AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])
+m4trace:configure.ac:8: -1- AC_SUBST_TRACE([PACKAGE])
+m4trace:configure.ac:8: -1- m4_pattern_allow([^PACKAGE$])
+m4trace:configure.ac:8: -1- AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])
+m4trace:configure.ac:8: -1- AC_SUBST_TRACE([VERSION])
+m4trace:configure.ac:8: -1- m4_pattern_allow([^VERSION$])
+m4trace:configure.ac:8: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE])
+m4trace:configure.ac:8: -1- m4_pattern_allow([^PACKAGE$])
+m4trace:configure.ac:8: -1- AH_OUTPUT([PACKAGE], [/* Name of package */
+@%:@undef PACKAGE])
+m4trace:configure.ac:8: -1- AC_DEFINE_TRACE_LITERAL([VERSION])
+m4trace:configure.ac:8: -1- m4_pattern_allow([^VERSION$])
+m4trace:configure.ac:8: -1- AH_OUTPUT([VERSION], [/* Version number of package */
+@%:@undef VERSION])
+m4trace:configure.ac:8: -1- AC_REQUIRE_AUX_FILE([missing])
+m4trace:configure.ac:8: -1- AC_SUBST([ACLOCAL])
+m4trace:configure.ac:8: -1- AC_SUBST_TRACE([ACLOCAL])
+m4trace:configure.ac:8: -1- m4_pattern_allow([^ACLOCAL$])
+m4trace:configure.ac:8: -1- AC_SUBST([AUTOCONF])
+m4trace:configure.ac:8: -1- AC_SUBST_TRACE([AUTOCONF])
+m4trace:configure.ac:8: -1- m4_pattern_allow([^AUTOCONF$])
+m4trace:configure.ac:8: -1- AC_SUBST([AUTOMAKE])
+m4trace:configure.ac:8: -1- AC_SUBST_TRACE([AUTOMAKE])
+m4trace:configure.ac:8: -1- m4_pattern_allow([^AUTOMAKE$])
+m4trace:configure.ac:8: -1- AC_SUBST([AUTOHEADER])
+m4trace:configure.ac:8: -1- AC_SUBST_TRACE([AUTOHEADER])
+m4trace:configure.ac:8: -1- m4_pattern_allow([^AUTOHEADER$])
+m4trace:configure.ac:8: -1- AC_SUBST([MAKEINFO])
+m4trace:configure.ac:8: -1- AC_SUBST_TRACE([MAKEINFO])
+m4trace:configure.ac:8: -1- m4_pattern_allow([^MAKEINFO$])
+m4trace:configure.ac:8: -1- AC_SUBST([install_sh])
+m4trace:configure.ac:8: -1- AC_SUBST_TRACE([install_sh])
+m4trace:configure.ac:8: -1- m4_pattern_allow([^install_sh$])
+m4trace:configure.ac:8: -1- AC_SUBST([STRIP])
+m4trace:configure.ac:8: -1- AC_SUBST_TRACE([STRIP])
+m4trace:configure.ac:8: -1- m4_pattern_allow([^STRIP$])
+m4trace:configure.ac:8: -1- AC_SUBST([INSTALL_STRIP_PROGRAM])
+m4trace:configure.ac:8: -1- AC_SUBST_TRACE([INSTALL_STRIP_PROGRAM])
+m4trace:configure.ac:8: -1- m4_pattern_allow([^INSTALL_STRIP_PROGRAM$])
+m4trace:configure.ac:8: -1- AC_REQUIRE_AUX_FILE([install-sh])
+m4trace:configure.ac:8: -1- AC_SUBST([MKDIR_P])
+m4trace:configure.ac:8: -1- AC_SUBST_TRACE([MKDIR_P])
+m4trace:configure.ac:8: -1- m4_pattern_allow([^MKDIR_P$])
+m4trace:configure.ac:8: -1- AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
+m4trace:configure.ac:8: -1- AC_SUBST_TRACE([mkdir_p])
+m4trace:configure.ac:8: -1- m4_pattern_allow([^mkdir_p$])
+m4trace:configure.ac:8: -1- AC_SUBST([AWK])
+m4trace:configure.ac:8: -1- AC_SUBST_TRACE([AWK])
+m4trace:configure.ac:8: -1- m4_pattern_allow([^AWK$])
+m4trace:configure.ac:8: -1- AC_SUBST([SET_MAKE])
+m4trace:configure.ac:8: -1- AC_SUBST_TRACE([SET_MAKE])
+m4trace:configure.ac:8: -1- m4_pattern_allow([^SET_MAKE$])
+m4trace:configure.ac:8: -1- AC_SUBST([am__leading_dot])
+m4trace:configure.ac:8: -1- AC_SUBST_TRACE([am__leading_dot])
+m4trace:configure.ac:8: -1- m4_pattern_allow([^am__leading_dot$])
+m4trace:configure.ac:8: -1- AC_SUBST([AMTAR], ['$${TAR-tar}'])
+m4trace:configure.ac:8: -1- AC_SUBST_TRACE([AMTAR])
+m4trace:configure.ac:8: -1- m4_pattern_allow([^AMTAR$])
+m4trace:configure.ac:8: -1- AC_SUBST([am__tar])
+m4trace:configure.ac:8: -1- AC_SUBST_TRACE([am__tar])
+m4trace:configure.ac:8: -1- m4_pattern_allow([^am__tar$])
+m4trace:configure.ac:8: -1- AC_SUBST([am__untar])
+m4trace:configure.ac:8: -1- AC_SUBST_TRACE([am__untar])
+m4trace:configure.ac:8: -1- m4_pattern_allow([^am__untar$])
+m4trace:configure.ac:8: -1- AM_SILENT_RULES
+m4trace:configure.ac:8: -1- AC_SUBST([AM_V])
+m4trace:configure.ac:8: -1- AC_SUBST_TRACE([AM_V])
+m4trace:configure.ac:8: -1- m4_pattern_allow([^AM_V$])
+m4trace:configure.ac:8: -1- _AM_SUBST_NOTMAKE([AM_V])
+m4trace:configure.ac:8: -1- AC_SUBST([AM_DEFAULT_V])
+m4trace:configure.ac:8: -1- AC_SUBST_TRACE([AM_DEFAULT_V])
+m4trace:configure.ac:8: -1- m4_pattern_allow([^AM_DEFAULT_V$])
+m4trace:configure.ac:8: -1- _AM_SUBST_NOTMAKE([AM_DEFAULT_V])
+m4trace:configure.ac:8: -1- AC_SUBST([AM_DEFAULT_VERBOSITY])
+m4trace:configure.ac:8: -1- AC_SUBST_TRACE([AM_DEFAULT_VERBOSITY])
+m4trace:configure.ac:8: -1- m4_pattern_allow([^AM_DEFAULT_VERBOSITY$])
+m4trace:configure.ac:8: -1- AC_SUBST([AM_BACKSLASH])
+m4trace:configure.ac:8: -1- AC_SUBST_TRACE([AM_BACKSLASH])
+m4trace:configure.ac:8: -1- m4_pattern_allow([^AM_BACKSLASH$])
+m4trace:configure.ac:8: -1- _AM_SUBST_NOTMAKE([AM_BACKSLASH])
+m4trace:configure.ac:9: -1- AM_MAINTAINER_MODE
+m4trace:configure.ac:9: -1- AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
+m4trace:configure.ac:9: -1- AC_SUBST([MAINTAINER_MODE_TRUE])
+m4trace:configure.ac:9: -1- AC_SUBST_TRACE([MAINTAINER_MODE_TRUE])
+m4trace:configure.ac:9: -1- m4_pattern_allow([^MAINTAINER_MODE_TRUE$])
+m4trace:configure.ac:9: -1- AC_SUBST([MAINTAINER_MODE_FALSE])
+m4trace:configure.ac:9: -1- AC_SUBST_TRACE([MAINTAINER_MODE_FALSE])
+m4trace:configure.ac:9: -1- m4_pattern_allow([^MAINTAINER_MODE_FALSE$])
+m4trace:configure.ac:9: -1- _AM_SUBST_NOTMAKE([MAINTAINER_MODE_TRUE])
+m4trace:configure.ac:9: -1- _AM_SUBST_NOTMAKE([MAINTAINER_MODE_FALSE])
+m4trace:configure.ac:9: -1- AC_SUBST([MAINT])
+m4trace:configure.ac:9: -1- AC_SUBST_TRACE([MAINT])
+m4trace:configure.ac:9: -1- m4_pattern_allow([^MAINT$])
+m4trace:configure.ac:11: -1- AC_CONFIG_HEADERS([src/config.h])
+m4trace:configure.ac:14: -1- AM_PROG_CC_C_O
+m4trace:configure.ac:14: -1- AC_SUBST([CC])
+m4trace:configure.ac:14: -1- AC_SUBST_TRACE([CC])
+m4trace:configure.ac:14: -1- m4_pattern_allow([^CC$])
+m4trace:configure.ac:14: -1- AC_SUBST([CFLAGS])
+m4trace:configure.ac:14: -1- AC_SUBST_TRACE([CFLAGS])
+m4trace:configure.ac:14: -1- m4_pattern_allow([^CFLAGS$])
+m4trace:configure.ac:14: -1- AC_SUBST([LDFLAGS])
+m4trace:configure.ac:14: -1- AC_SUBST_TRACE([LDFLAGS])
+m4trace:configure.ac:14: -1- m4_pattern_allow([^LDFLAGS$])
+m4trace:configure.ac:14: -1- AC_SUBST([LIBS])
+m4trace:configure.ac:14: -1- AC_SUBST_TRACE([LIBS])
+m4trace:configure.ac:14: -1- m4_pattern_allow([^LIBS$])
+m4trace:configure.ac:14: -1- AC_SUBST([CPPFLAGS])
+m4trace:configure.ac:14: -1- AC_SUBST_TRACE([CPPFLAGS])
+m4trace:configure.ac:14: -1- m4_pattern_allow([^CPPFLAGS$])
+m4trace:configure.ac:14: -1- AC_SUBST([CC])
+m4trace:configure.ac:14: -1- AC_SUBST_TRACE([CC])
+m4trace:configure.ac:14: -1- m4_pattern_allow([^CC$])
+m4trace:configure.ac:14: -1- AC_SUBST([CC])
+m4trace:configure.ac:14: -1- AC_SUBST_TRACE([CC])
+m4trace:configure.ac:14: -1- m4_pattern_allow([^CC$])
+m4trace:configure.ac:14: -1- AC_SUBST([CC])
+m4trace:configure.ac:14: -1- AC_SUBST_TRACE([CC])
+m4trace:configure.ac:14: -1- m4_pattern_allow([^CC$])
+m4trace:configure.ac:14: -1- AC_SUBST([CC])
+m4trace:configure.ac:14: -1- AC_SUBST_TRACE([CC])
+m4trace:configure.ac:14: -1- m4_pattern_allow([^CC$])
+m4trace:configure.ac:14: -1- AC_SUBST([ac_ct_CC])
+m4trace:configure.ac:14: -1- AC_SUBST_TRACE([ac_ct_CC])
+m4trace:configure.ac:14: -1- m4_pattern_allow([^ac_ct_CC$])
+m4trace:configure.ac:14: -1- AC_SUBST([EXEEXT], [$ac_cv_exeext])
+m4trace:configure.ac:14: -1- AC_SUBST_TRACE([EXEEXT])
+m4trace:configure.ac:14: -1- m4_pattern_allow([^EXEEXT$])
+m4trace:configure.ac:14: -1- AC_SUBST([OBJEXT], [$ac_cv_objext])
+m4trace:configure.ac:14: -1- AC_SUBST_TRACE([OBJEXT])
+m4trace:configure.ac:14: -1- m4_pattern_allow([^OBJEXT$])
+m4trace:configure.ac:14: -1- AC_REQUIRE_AUX_FILE([compile])
+m4trace:configure.ac:14: -1- AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])
+m4trace:configure.ac:14: -1- AC_SUBST_TRACE([DEPDIR])
+m4trace:configure.ac:14: -1- m4_pattern_allow([^DEPDIR$])
+m4trace:configure.ac:14: -1- AC_SUBST([am__include])
+m4trace:configure.ac:14: -1- AC_SUBST_TRACE([am__include])
+m4trace:configure.ac:14: -1- m4_pattern_allow([^am__include$])
+m4trace:configure.ac:14: -1- AC_SUBST([am__quote])
+m4trace:configure.ac:14: -1- AC_SUBST_TRACE([am__quote])
+m4trace:configure.ac:14: -1- m4_pattern_allow([^am__quote$])
+m4trace:configure.ac:14: -1- AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
+m4trace:configure.ac:14: -1- AC_SUBST([AMDEP_TRUE])
+m4trace:configure.ac:14: -1- AC_SUBST_TRACE([AMDEP_TRUE])
+m4trace:configure.ac:14: -1- m4_pattern_allow([^AMDEP_TRUE$])
+m4trace:configure.ac:14: -1- AC_SUBST([AMDEP_FALSE])
+m4trace:configure.ac:14: -1- AC_SUBST_TRACE([AMDEP_FALSE])
+m4trace:configure.ac:14: -1- m4_pattern_allow([^AMDEP_FALSE$])
+m4trace:configure.ac:14: -1- _AM_SUBST_NOTMAKE([AMDEP_TRUE])
+m4trace:configure.ac:14: -1- _AM_SUBST_NOTMAKE([AMDEP_FALSE])
+m4trace:configure.ac:14: -1- AC_SUBST([AMDEPBACKSLASH])
+m4trace:configure.ac:14: -1- AC_SUBST_TRACE([AMDEPBACKSLASH])
+m4trace:configure.ac:14: -1- m4_pattern_allow([^AMDEPBACKSLASH$])
+m4trace:configure.ac:14: -1- _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])
+m4trace:configure.ac:14: -1- AC_SUBST([am__nodep])
+m4trace:configure.ac:14: -1- AC_SUBST_TRACE([am__nodep])
+m4trace:configure.ac:14: -1- m4_pattern_allow([^am__nodep$])
+m4trace:configure.ac:14: -1- _AM_SUBST_NOTMAKE([am__nodep])
+m4trace:configure.ac:14: -1- AC_SUBST([CCDEPMODE], [depmode=$am_cv_CC_dependencies_compiler_type])
+m4trace:configure.ac:14: -1- AC_SUBST_TRACE([CCDEPMODE])
+m4trace:configure.ac:14: -1- m4_pattern_allow([^CCDEPMODE$])
+m4trace:configure.ac:14: -1- AM_CONDITIONAL([am__fastdepCC], [
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_CC_dependencies_compiler_type" = gcc3])
+m4trace:configure.ac:14: -1- AC_SUBST([am__fastdepCC_TRUE])
+m4trace:configure.ac:14: -1- AC_SUBST_TRACE([am__fastdepCC_TRUE])
+m4trace:configure.ac:14: -1- m4_pattern_allow([^am__fastdepCC_TRUE$])
+m4trace:configure.ac:14: -1- AC_SUBST([am__fastdepCC_FALSE])
+m4trace:configure.ac:14: -1- AC_SUBST_TRACE([am__fastdepCC_FALSE])
+m4trace:configure.ac:14: -1- m4_pattern_allow([^am__fastdepCC_FALSE$])
+m4trace:configure.ac:14: -1- _AM_SUBST_NOTMAKE([am__fastdepCC_TRUE])
+m4trace:configure.ac:14: -1- _AM_SUBST_NOTMAKE([am__fastdepCC_FALSE])
+m4trace:configure.ac:15: -1- AC_SUBST([CCAS])
+m4trace:configure.ac:15: -1- AC_SUBST_TRACE([CCAS])
+m4trace:configure.ac:15: -1- m4_pattern_allow([^CCAS$])
+m4trace:configure.ac:15: -1- AC_SUBST([CCASFLAGS])
+m4trace:configure.ac:15: -1- AC_SUBST_TRACE([CCASFLAGS])
+m4trace:configure.ac:15: -1- m4_pattern_allow([^CCASFLAGS$])
+m4trace:configure.ac:15: -1- AC_SUBST([CCASDEPMODE], [depmode=$am_cv_CCAS_dependencies_compiler_type])
+m4trace:configure.ac:15: -1- AC_SUBST_TRACE([CCASDEPMODE])
+m4trace:configure.ac:15: -1- m4_pattern_allow([^CCASDEPMODE$])
+m4trace:configure.ac:15: -1- AM_CONDITIONAL([am__fastdepCCAS], [
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_CCAS_dependencies_compiler_type" = gcc3])
+m4trace:configure.ac:15: -1- AC_SUBST([am__fastdepCCAS_TRUE])
+m4trace:configure.ac:15: -1- AC_SUBST_TRACE([am__fastdepCCAS_TRUE])
+m4trace:configure.ac:15: -1- m4_pattern_allow([^am__fastdepCCAS_TRUE$])
+m4trace:configure.ac:15: -1- AC_SUBST([am__fastdepCCAS_FALSE])
+m4trace:configure.ac:15: -1- AC_SUBST_TRACE([am__fastdepCCAS_FALSE])
+m4trace:configure.ac:15: -1- m4_pattern_allow([^am__fastdepCCAS_FALSE$])
+m4trace:configure.ac:15: -1- _AM_SUBST_NOTMAKE([am__fastdepCCAS_TRUE])
+m4trace:configure.ac:15: -1- _AM_SUBST_NOTMAKE([am__fastdepCCAS_FALSE])
+m4trace:configure.ac:16: -1- LT_INIT([disable-shared])
+m4trace:configure.ac:16: -1- m4_pattern_forbid([^_?LT_[A-Z_]+$])
+m4trace:configure.ac:16: -1- m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])
+m4trace:configure.ac:16: -1- AC_REQUIRE_AUX_FILE([ltmain.sh])
+m4trace:configure.ac:16: -1- AC_SUBST([LIBTOOL])
+m4trace:configure.ac:16: -1- AC_SUBST_TRACE([LIBTOOL])
+m4trace:configure.ac:16: -1- m4_pattern_allow([^LIBTOOL$])
+m4trace:configure.ac:16: -1- AC_SUBST([SED])
+m4trace:configure.ac:16: -1- AC_SUBST_TRACE([SED])
+m4trace:configure.ac:16: -1- m4_pattern_allow([^SED$])
+m4trace:configure.ac:16: -1- AC_SUBST([GREP])
+m4trace:configure.ac:16: -1- AC_SUBST_TRACE([GREP])
+m4trace:configure.ac:16: -1- m4_pattern_allow([^GREP$])
+m4trace:configure.ac:16: -1- AC_SUBST([EGREP])
+m4trace:configure.ac:16: -1- AC_SUBST_TRACE([EGREP])
+m4trace:configure.ac:16: -1- m4_pattern_allow([^EGREP$])
+m4trace:configure.ac:16: -1- AC_SUBST([FGREP])
+m4trace:configure.ac:16: -1- AC_SUBST_TRACE([FGREP])
+m4trace:configure.ac:16: -1- m4_pattern_allow([^FGREP$])
+m4trace:configure.ac:16: -1- AC_SUBST([GREP])
+m4trace:configure.ac:16: -1- AC_SUBST_TRACE([GREP])
+m4trace:configure.ac:16: -1- m4_pattern_allow([^GREP$])
+m4trace:configure.ac:16: -1- AC_SUBST([LD])
+m4trace:configure.ac:16: -1- AC_SUBST_TRACE([LD])
+m4trace:configure.ac:16: -1- m4_pattern_allow([^LD$])
+m4trace:configure.ac:16: -1- AC_SUBST([DUMPBIN])
+m4trace:configure.ac:16: -1- AC_SUBST_TRACE([DUMPBIN])
+m4trace:configure.ac:16: -1- m4_pattern_allow([^DUMPBIN$])
+m4trace:configure.ac:16: -1- AC_SUBST([ac_ct_DUMPBIN])
+m4trace:configure.ac:16: -1- AC_SUBST_TRACE([ac_ct_DUMPBIN])
+m4trace:configure.ac:16: -1- m4_pattern_allow([^ac_ct_DUMPBIN$])
+m4trace:configure.ac:16: -1- AC_SUBST([DUMPBIN])
+m4trace:configure.ac:16: -1- AC_SUBST_TRACE([DUMPBIN])
+m4trace:configure.ac:16: -1- m4_pattern_allow([^DUMPBIN$])
+m4trace:configure.ac:16: -1- AC_SUBST([NM])
+m4trace:configure.ac:16: -1- AC_SUBST_TRACE([NM])
+m4trace:configure.ac:16: -1- m4_pattern_allow([^NM$])
+m4trace:configure.ac:16: -1- AC_SUBST([LN_S], [$as_ln_s])
+m4trace:configure.ac:16: -1- AC_SUBST_TRACE([LN_S])
+m4trace:configure.ac:16: -1- m4_pattern_allow([^LN_S$])
+m4trace:configure.ac:16: -1- AC_SUBST([OBJDUMP])
+m4trace:configure.ac:16: -1- AC_SUBST_TRACE([OBJDUMP])
+m4trace:configure.ac:16: -1- m4_pattern_allow([^OBJDUMP$])
+m4trace:configure.ac:16: -1- AC_SUBST([OBJDUMP])
+m4trace:configure.ac:16: -1- AC_SUBST_TRACE([OBJDUMP])
+m4trace:configure.ac:16: -1- m4_pattern_allow([^OBJDUMP$])
+m4trace:configure.ac:16: -1- AC_SUBST([DLLTOOL])
+m4trace:configure.ac:16: -1- AC_SUBST_TRACE([DLLTOOL])
+m4trace:configure.ac:16: -1- m4_pattern_allow([^DLLTOOL$])
+m4trace:configure.ac:16: -1- AC_SUBST([DLLTOOL])
+m4trace:configure.ac:16: -1- AC_SUBST_TRACE([DLLTOOL])
+m4trace:configure.ac:16: -1- m4_pattern_allow([^DLLTOOL$])
+m4trace:configure.ac:16: -1- AC_SUBST([AR])
+m4trace:configure.ac:16: -1- AC_SUBST_TRACE([AR])
+m4trace:configure.ac:16: -1- m4_pattern_allow([^AR$])
+m4trace:configure.ac:16: -1- AC_SUBST([ac_ct_AR])
+m4trace:configure.ac:16: -1- AC_SUBST_TRACE([ac_ct_AR])
+m4trace:configure.ac:16: -1- m4_pattern_allow([^ac_ct_AR$])
+m4trace:configure.ac:16: -1- AC_SUBST([STRIP])
+m4trace:configure.ac:16: -1- AC_SUBST_TRACE([STRIP])
+m4trace:configure.ac:16: -1- m4_pattern_allow([^STRIP$])
+m4trace:configure.ac:16: -1- AC_SUBST([RANLIB])
+m4trace:configure.ac:16: -1- AC_SUBST_TRACE([RANLIB])
+m4trace:configure.ac:16: -1- m4_pattern_allow([^RANLIB$])
+m4trace:configure.ac:16: -1- m4_pattern_allow([LT_OBJDIR])
+m4trace:configure.ac:16: -1- AC_DEFINE_TRACE_LITERAL([LT_OBJDIR])
+m4trace:configure.ac:16: -1- m4_pattern_allow([^LT_OBJDIR$])
+m4trace:configure.ac:16: -1- AH_OUTPUT([LT_OBJDIR], [/* Define to the sub-directory where libtool stores uninstalled libraries. */
+@%:@undef LT_OBJDIR])
+m4trace:configure.ac:16: -1- LT_SUPPORTED_TAG([CC])
+m4trace:configure.ac:16: -1- AC_SUBST([MANIFEST_TOOL])
+m4trace:configure.ac:16: -1- AC_SUBST_TRACE([MANIFEST_TOOL])
+m4trace:configure.ac:16: -1- m4_pattern_allow([^MANIFEST_TOOL$])
+m4trace:configure.ac:16: -1- AC_SUBST([DSYMUTIL])
+m4trace:configure.ac:16: -1- AC_SUBST_TRACE([DSYMUTIL])
+m4trace:configure.ac:16: -1- m4_pattern_allow([^DSYMUTIL$])
+m4trace:configure.ac:16: -1- AC_SUBST([NMEDIT])
+m4trace:configure.ac:16: -1- AC_SUBST_TRACE([NMEDIT])
+m4trace:configure.ac:16: -1- m4_pattern_allow([^NMEDIT$])
+m4trace:configure.ac:16: -1- AC_SUBST([LIPO])
+m4trace:configure.ac:16: -1- AC_SUBST_TRACE([LIPO])
+m4trace:configure.ac:16: -1- m4_pattern_allow([^LIPO$])
+m4trace:configure.ac:16: -1- AC_SUBST([OTOOL])
+m4trace:configure.ac:16: -1- AC_SUBST_TRACE([OTOOL])
+m4trace:configure.ac:16: -1- m4_pattern_allow([^OTOOL$])
+m4trace:configure.ac:16: -1- AC_SUBST([OTOOL64])
+m4trace:configure.ac:16: -1- AC_SUBST_TRACE([OTOOL64])
+m4trace:configure.ac:16: -1- m4_pattern_allow([^OTOOL64$])
+m4trace:configure.ac:16: -1- AC_SUBST([LT_SYS_LIBRARY_PATH])
+m4trace:configure.ac:16: -1- AC_SUBST_TRACE([LT_SYS_LIBRARY_PATH])
+m4trace:configure.ac:16: -1- m4_pattern_allow([^LT_SYS_LIBRARY_PATH$])
+m4trace:configure.ac:16: -1- AH_OUTPUT([HAVE_DLFCN_H], [/* Define to 1 if you have the header file. */
+@%:@undef HAVE_DLFCN_H])
+m4trace:configure.ac:16: -1- AC_SUBST([CPP])
+m4trace:configure.ac:16: -1- AC_SUBST_TRACE([CPP])
+m4trace:configure.ac:16: -1- m4_pattern_allow([^CPP$])
+m4trace:configure.ac:16: -1- AC_SUBST([CPPFLAGS])
+m4trace:configure.ac:16: -1- AC_SUBST_TRACE([CPPFLAGS])
+m4trace:configure.ac:16: -1- m4_pattern_allow([^CPPFLAGS$])
+m4trace:configure.ac:16: -1- AC_SUBST([CPP])
+m4trace:configure.ac:16: -1- AC_SUBST_TRACE([CPP])
+m4trace:configure.ac:16: -1- m4_pattern_allow([^CPP$])
+m4trace:configure.ac:16: -1- AC_DEFINE_TRACE_LITERAL([STDC_HEADERS])
+m4trace:configure.ac:16: -1- m4_pattern_allow([^STDC_HEADERS$])
+m4trace:configure.ac:16: -1- AH_OUTPUT([STDC_HEADERS], [/* Define to 1 if you have the ANSI C header files. */
+@%:@undef STDC_HEADERS])
+m4trace:configure.ac:16: -1- AH_OUTPUT([HAVE_SYS_TYPES_H], [/* Define to 1 if you have the header file. */
+@%:@undef HAVE_SYS_TYPES_H])
+m4trace:configure.ac:16: -1- AH_OUTPUT([HAVE_SYS_STAT_H], [/* Define to 1 if you have the header file. */
+@%:@undef HAVE_SYS_STAT_H])
+m4trace:configure.ac:16: -1- AH_OUTPUT([HAVE_STDLIB_H], [/* Define to 1 if you have the header file. */
+@%:@undef HAVE_STDLIB_H])
+m4trace:configure.ac:16: -1- AH_OUTPUT([HAVE_STRING_H], [/* Define to 1 if you have the header file. */
+@%:@undef HAVE_STRING_H])
+m4trace:configure.ac:16: -1- AH_OUTPUT([HAVE_MEMORY_H], [/* Define to 1 if you have the header file. */
+@%:@undef HAVE_MEMORY_H])
+m4trace:configure.ac:16: -1- AH_OUTPUT([HAVE_STRINGS_H], [/* Define to 1 if you have the header file. */
+@%:@undef HAVE_STRINGS_H])
+m4trace:configure.ac:16: -1- AH_OUTPUT([HAVE_INTTYPES_H], [/* Define to 1 if you have the header file. */
+@%:@undef HAVE_INTTYPES_H])
+m4trace:configure.ac:16: -1- AH_OUTPUT([HAVE_STDINT_H], [/* Define to 1 if you have the header file. */
+@%:@undef HAVE_STDINT_H])
+m4trace:configure.ac:16: -1- AH_OUTPUT([HAVE_UNISTD_H], [/* Define to 1 if you have the header file. */
+@%:@undef HAVE_UNISTD_H])
+m4trace:configure.ac:16: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DLFCN_H])
+m4trace:configure.ac:16: -1- m4_pattern_allow([^HAVE_DLFCN_H$])
+m4trace:configure.ac:19: -1- AH_OUTPUT([HAVE_STDLIB_H], [/* Define to 1 if you have the header file. */
+@%:@undef HAVE_STDLIB_H])
+m4trace:configure.ac:19: -1- AH_OUTPUT([HAVE_UNISTD_H], [/* Define to 1 if you have the header file. */
+@%:@undef HAVE_UNISTD_H])
+m4trace:configure.ac:19: -1- AH_OUTPUT([HAVE_SYS_PARAM_H], [/* Define to 1 if you have the header file. */
+@%:@undef HAVE_SYS_PARAM_H])
+m4trace:configure.ac:19: -1- AH_OUTPUT([HAVE_GETPAGESIZE], [/* Define to 1 if you have the `getpagesize\' function. */
+@%:@undef HAVE_GETPAGESIZE])
+m4trace:configure.ac:19: -1- AC_DEFINE_TRACE_LITERAL([HAVE_GETPAGESIZE])
+m4trace:configure.ac:19: -1- m4_pattern_allow([^HAVE_GETPAGESIZE$])
+m4trace:configure.ac:19: -1- AC_DEFINE_TRACE_LITERAL([HAVE_MMAP])
+m4trace:configure.ac:19: -1- m4_pattern_allow([^HAVE_MMAP$])
+m4trace:configure.ac:19: -1- AH_OUTPUT([HAVE_MMAP], [/* Define to 1 if you have a working `mmap\' system call. */
+@%:@undef HAVE_MMAP])
+m4trace:configure.ac:38: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2625: AC_TRY_COMPILE is expanded from...
+configure.ac:38: the top level])
+m4trace:configure.ac:54: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2625: AC_TRY_COMPILE is expanded from...
+configure.ac:54: the top level])
+m4trace:configure.ac:83: -1- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:207: AC_HELP_STRING is expanded from...
+../../lib/autoconf/general.m4:1473: AC_ARG_ENABLE is expanded from...
+configure.ac:83: the top level])
+m4trace:configure.ac:86: -1- AC_DEFINE_TRACE_LITERAL([NDEBUG])
+m4trace:configure.ac:86: -1- m4_pattern_allow([^NDEBUG$])
+m4trace:configure.ac:86: -1- AH_OUTPUT([NDEBUG], [/* Define to disable assertion checking. */
+@%:@undef NDEBUG])
+m4trace:configure.ac:89: -1- AC_SUBST([PICFLAG])
+m4trace:configure.ac:89: -1- AC_SUBST_TRACE([PICFLAG])
+m4trace:configure.ac:89: -1- m4_pattern_allow([^PICFLAG$])
+m4trace:configure.ac:90: -1- AC_SUBST([DEFS])
+m4trace:configure.ac:90: -1- AC_SUBST_TRACE([DEFS])
+m4trace:configure.ac:90: -1- m4_pattern_allow([^DEFS$])
+m4trace:configure.ac:92: -1- AH_OUTPUT([_PTHREADS], [/* Indicates the use of pthreads (NetBSD). */
+@%:@undef _PTHREADS])
+m4trace:configure.ac:94: -1- AH_OUTPUT([AO_USE_NANOSLEEP], [/* Use nanosleep() instead of select() (only if atomic operations are
+ emulated) */
+@%:@undef AO_USE_NANOSLEEP])
+m4trace:configure.ac:97: -1- AH_OUTPUT([AO_USE_NO_SIGNALS], [/* Do not block signals in compare_and_swap (only if atomic operations are
+ emulated) */
+@%:@undef AO_USE_NO_SIGNALS])
+m4trace:configure.ac:100: -1- AH_OUTPUT([AO_USE_WIN32_PTHREADS], [/* Use Win32 Sleep() instead of select() (only if atomic operations are
+ emulated) */
+@%:@undef AO_USE_WIN32_PTHREADS])
+m4trace:configure.ac:103: -1- AH_OUTPUT([AO_TRACE_MALLOC], [/* Trace AO_malloc/free calls (for debug only) */
+@%:@undef AO_TRACE_MALLOC])
+m4trace:configure.ac:106: -1- AH_OUTPUT([AO_GENERALIZE_ASM_BOOL_CAS], [/* Force compare_and_swap definition via fetch_compare_and_swap */
+@%:@undef AO_GENERALIZE_ASM_BOOL_CAS])
+m4trace:configure.ac:108: -1- AH_OUTPUT([AO_PREFER_GENERALIZED], [/* Prefer generalized definitions to direct assembly-based ones */
+@%:@undef AO_PREFER_GENERALIZED])
+m4trace:configure.ac:110: -1- AH_OUTPUT([AO_USE_PTHREAD_DEFS], [/* Emulate atomic operations via slow and async-signal-unsafe pthread locking
+ */
+@%:@undef AO_USE_PTHREAD_DEFS])
+m4trace:configure.ac:113: -1- AH_OUTPUT([AO_ASM_X64_AVAILABLE], [/* Inline assembly avalable (only VC/x86_64) */
+@%:@undef AO_ASM_X64_AVAILABLE])
+m4trace:configure.ac:115: -1- AH_OUTPUT([AO_ASSUME_VISTA], [/* Assume Windows Server 2003, Vista or later target (only VC/x86) */
+@%:@undef AO_ASSUME_VISTA])
+m4trace:configure.ac:117: -1- AH_OUTPUT([AO_ASSUME_WINDOWS98], [/* Assume hardware compare-and-swap functionality available on target (only
+ VC/x86) */
+@%:@undef AO_ASSUME_WINDOWS98])
+m4trace:configure.ac:120: -1- AH_OUTPUT([AO_CMPXCHG16B_AVAILABLE], [/* Assume target is not old AMD Opteron chip (only x86_64) */
+@%:@undef AO_CMPXCHG16B_AVAILABLE])
+m4trace:configure.ac:122: -1- AH_OUTPUT([AO_FORCE_USE_SWP], [/* Force test_and_set to use SWP instruction instead of LDREX/STREX (only arm
+ v6+) */
+@%:@undef AO_FORCE_USE_SWP])
+m4trace:configure.ac:125: -1- AH_OUTPUT([AO_NO_SPARC_V9], [/* Assume target is not sparc v9+ (only sparc) */
+@%:@undef AO_NO_SPARC_V9])
+m4trace:configure.ac:126: -1- AH_OUTPUT([AO_OLD_STYLE_INTERLOCKED_COMPARE_EXCHANGE], [/* Assume ancient MS VS Win32 headers (only VC/arm v6+, VC/x86) */
+@%:@undef AO_OLD_STYLE_INTERLOCKED_COMPARE_EXCHANGE])
+m4trace:configure.ac:128: -1- AH_OUTPUT([AO_UNIPROCESSOR], [/* Assume single-core target (only arm v6+) */
+@%:@undef AO_UNIPROCESSOR])
+m4trace:configure.ac:129: -1- AH_OUTPUT([AO_USE_INTERLOCKED_INTRINSICS], [/* Assume Win32 _Interlocked primitives available as intrinsics (only VC/arm)
+ */
+@%:@undef AO_USE_INTERLOCKED_INTRINSICS])
+m4trace:configure.ac:132: -1- AH_OUTPUT([AO_USE_PENTIUM4_INSTRS], [/* Use Pentium 4 \'mfence\' instruction (only x86) */
+@%:@undef AO_USE_PENTIUM4_INSTRS])
+m4trace:configure.ac:134: -1- AH_OUTPUT([AO_USE_SYNC_CAS_BUILTIN], [/* Prefer GCC built-in CAS intrinsics in favor of inline assembly (only
+ gcc/x86, gcc/x86_64) */
+@%:@undef AO_USE_SYNC_CAS_BUILTIN])
+m4trace:configure.ac:137: -1- AH_OUTPUT([AO_WEAK_DOUBLE_CAS_EMULATION], [/* Emulate double-width CAS via pthread locking in case of no hardware support
+ (only gcc/x86_64, the emulation is unsafe) */
+@%:@undef AO_WEAK_DOUBLE_CAS_EMULATION])
+m4trace:configure.ac:141: -1- AC_DEFINE_TRACE_LITERAL([_REENTRANT])
+m4trace:configure.ac:141: -1- m4_pattern_allow([^_REENTRANT$])
+m4trace:configure.ac:141: -1- AH_OUTPUT([_REENTRANT], [/* Required define if using POSIX threads. */
+@%:@undef _REENTRANT])
+m4trace:configure.ac:151: -1- AC_DEFINE_TRACE_LITERAL([_PTHREADS])
+m4trace:configure.ac:151: -1- m4_pattern_allow([^_PTHREADS$])
+m4trace:configure.ac:169: -1- AC_DEFINE_TRACE_LITERAL([AO_NO_PTHREADS])
+m4trace:configure.ac:169: -1- m4_pattern_allow([^AO_NO_PTHREADS$])
+m4trace:configure.ac:169: -1- AH_OUTPUT([AO_NO_PTHREADS], [/* No pthreads library available */
+@%:@undef AO_NO_PTHREADS])
+m4trace:configure.ac:173: -1- AC_SUBST([THREADDLLIBS])
+m4trace:configure.ac:173: -1- AC_SUBST_TRACE([THREADDLLIBS])
+m4trace:configure.ac:173: -1- m4_pattern_allow([^THREADDLLIBS$])
+m4trace:configure.ac:175: -1- AM_CONDITIONAL([HAVE_PTHREAD_H], [test x$have_pthreads = xtrue])
+m4trace:configure.ac:175: -1- AC_SUBST([HAVE_PTHREAD_H_TRUE])
+m4trace:configure.ac:175: -1- AC_SUBST_TRACE([HAVE_PTHREAD_H_TRUE])
+m4trace:configure.ac:175: -1- m4_pattern_allow([^HAVE_PTHREAD_H_TRUE$])
+m4trace:configure.ac:175: -1- AC_SUBST([HAVE_PTHREAD_H_FALSE])
+m4trace:configure.ac:175: -1- AC_SUBST_TRACE([HAVE_PTHREAD_H_FALSE])
+m4trace:configure.ac:175: -1- m4_pattern_allow([^HAVE_PTHREAD_H_FALSE$])
+m4trace:configure.ac:175: -1- _AM_SUBST_NOTMAKE([HAVE_PTHREAD_H_TRUE])
+m4trace:configure.ac:175: -1- _AM_SUBST_NOTMAKE([HAVE_PTHREAD_H_FALSE])
+m4trace:configure.ac:176: -1- AM_CONDITIONAL([NEED_ASM], [test x$need_asm = xtrue])
+m4trace:configure.ac:176: -1- AC_SUBST([NEED_ASM_TRUE])
+m4trace:configure.ac:176: -1- AC_SUBST_TRACE([NEED_ASM_TRUE])
+m4trace:configure.ac:176: -1- m4_pattern_allow([^NEED_ASM_TRUE$])
+m4trace:configure.ac:176: -1- AC_SUBST([NEED_ASM_FALSE])
+m4trace:configure.ac:176: -1- AC_SUBST_TRACE([NEED_ASM_FALSE])
+m4trace:configure.ac:176: -1- m4_pattern_allow([^NEED_ASM_FALSE$])
+m4trace:configure.ac:176: -1- _AM_SUBST_NOTMAKE([NEED_ASM_TRUE])
+m4trace:configure.ac:176: -1- _AM_SUBST_NOTMAKE([NEED_ASM_FALSE])
+m4trace:configure.ac:178: -1- AC_CONFIG_FILES([
+ Makefile
+ doc/Makefile
+ src/Makefile
+ pkgconfig/atomic_ops.pc
+ pkgconfig/atomic_ops-uninstalled.pc ])
+m4trace:configure.ac:190: -1- AC_SUBST([LIB@&t@OBJS], [$ac_libobjs])
+m4trace:configure.ac:190: -1- AC_SUBST_TRACE([LIB@&t@OBJS])
+m4trace:configure.ac:190: -1- m4_pattern_allow([^LIB@&t@OBJS$])
+m4trace:configure.ac:190: -1- AC_SUBST([LTLIBOBJS], [$ac_ltlibobjs])
+m4trace:configure.ac:190: -1- AC_SUBST_TRACE([LTLIBOBJS])
+m4trace:configure.ac:190: -1- m4_pattern_allow([^LTLIBOBJS$])
+m4trace:configure.ac:190: -1- AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])
+m4trace:configure.ac:190: -1- AC_SUBST([am__EXEEXT_TRUE])
+m4trace:configure.ac:190: -1- AC_SUBST_TRACE([am__EXEEXT_TRUE])
+m4trace:configure.ac:190: -1- m4_pattern_allow([^am__EXEEXT_TRUE$])
+m4trace:configure.ac:190: -1- AC_SUBST([am__EXEEXT_FALSE])
+m4trace:configure.ac:190: -1- AC_SUBST_TRACE([am__EXEEXT_FALSE])
+m4trace:configure.ac:190: -1- m4_pattern_allow([^am__EXEEXT_FALSE$])
+m4trace:configure.ac:190: -1- _AM_SUBST_NOTMAKE([am__EXEEXT_TRUE])
+m4trace:configure.ac:190: -1- _AM_SUBST_NOTMAKE([am__EXEEXT_FALSE])
+m4trace:configure.ac:190: -1- AC_SUBST_TRACE([top_builddir])
+m4trace:configure.ac:190: -1- AC_SUBST_TRACE([top_build_prefix])
+m4trace:configure.ac:190: -1- AC_SUBST_TRACE([srcdir])
+m4trace:configure.ac:190: -1- AC_SUBST_TRACE([abs_srcdir])
+m4trace:configure.ac:190: -1- AC_SUBST_TRACE([top_srcdir])
+m4trace:configure.ac:190: -1- AC_SUBST_TRACE([abs_top_srcdir])
+m4trace:configure.ac:190: -1- AC_SUBST_TRACE([builddir])
+m4trace:configure.ac:190: -1- AC_SUBST_TRACE([abs_builddir])
+m4trace:configure.ac:190: -1- AC_SUBST_TRACE([abs_top_builddir])
+m4trace:configure.ac:190: -1- AC_SUBST_TRACE([INSTALL])
+m4trace:configure.ac:190: -1- AC_SUBST_TRACE([MKDIR_P])
+m4trace:configure.ac:190: -1- AC_REQUIRE_AUX_FILE([ltmain.sh])
diff --git a/external/bdwgc/libatomic_ops/autom4te.cache/traces.2 b/external/bdwgc/libatomic_ops/autom4te.cache/traces.2
new file mode 100644
index 0000000000..95372571c8
--- /dev/null
+++ b/external/bdwgc/libatomic_ops/autom4te.cache/traces.2
@@ -0,0 +1,2091 @@
+m4trace:/usr/share/aclocal-1.15/amversion.m4:14: -1- AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.15'
+dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
+dnl require some minimum version. Point them to the right macro.
+m4_if([$1], [1.15], [],
+ [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
+])
+m4trace:/usr/share/aclocal-1.15/amversion.m4:33: -1- AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.15])dnl
+m4_ifndef([AC_AUTOCONF_VERSION],
+ [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
+m4trace:/usr/share/aclocal-1.15/as.m4:11: -1- AC_DEFUN([AM_PROG_AS], [# By default we simply use the C compiler to build assembly code.
+AC_REQUIRE([AC_PROG_CC])
+test "${CCAS+set}" = set || CCAS=$CC
+test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS
+AC_ARG_VAR([CCAS], [assembler compiler command (defaults to CC)])
+AC_ARG_VAR([CCASFLAGS], [assembler compiler flags (defaults to CFLAGS)])
+_AM_IF_OPTION([no-dependencies],, [_AM_DEPENDENCIES([CCAS])])dnl
+])
+m4trace:/usr/share/aclocal-1.15/auxdir.m4:47: -1- AC_DEFUN([AM_AUX_DIR_EXPAND], [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
+# Expand $ac_aux_dir to an absolute path.
+am_aux_dir=`cd "$ac_aux_dir" && pwd`
+])
+m4trace:/usr/share/aclocal-1.15/cond.m4:12: -1- AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ([2.52])dnl
+ m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
+ [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
+AC_SUBST([$1_TRUE])dnl
+AC_SUBST([$1_FALSE])dnl
+_AM_SUBST_NOTMAKE([$1_TRUE])dnl
+_AM_SUBST_NOTMAKE([$1_FALSE])dnl
+m4_define([_AM_COND_VALUE_$1], [$2])dnl
+if $2; then
+ $1_TRUE=
+ $1_FALSE='#'
+else
+ $1_TRUE='#'
+ $1_FALSE=
+fi
+AC_CONFIG_COMMANDS_PRE(
+[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
+ AC_MSG_ERROR([[conditional "$1" was never defined.
+Usually this means the macro was only invoked conditionally.]])
+fi])])
+m4trace:/usr/share/aclocal-1.15/depend.m4:26: -1- AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl
+AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
+AC_REQUIRE([AM_MAKE_INCLUDE])dnl
+AC_REQUIRE([AM_DEP_TRACK])dnl
+
+m4_if([$1], [CC], [depcc="$CC" am_compiler_list=],
+ [$1], [CXX], [depcc="$CXX" am_compiler_list=],
+ [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
+ [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
+ [$1], [UPC], [depcc="$UPC" am_compiler_list=],
+ [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
+ [depcc="$$1" am_compiler_list=])
+
+AC_CACHE_CHECK([dependency style of $depcc],
+ [am_cv_$1_dependencies_compiler_type],
+[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named 'D' -- because '-MD' means "put the output
+ # in D".
+ rm -rf conftest.dir
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
+
+ am_cv_$1_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
+ fi
+ am__universal=false
+ m4_case([$1], [CC],
+ [case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac],
+ [CXX],
+ [case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac])
+
+ for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
+ # Solaris 10 /bin/sh.
+ echo '/* dummy */' > sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+ # We check with '-c' and '-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle '-M -o', and we need to detect this. Also, some Intel
+ # versions had trouble with output in subdirs.
+ am__obj=sub/conftest.${OBJEXT-o}
+ am__minus_obj="-o $am__obj"
+ case $depmode in
+ gcc)
+ # This depmode causes a compiler race in universal mode.
+ test "$am__universal" = false || continue
+ ;;
+ nosideeffect)
+ # After this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested.
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ msvc7 | msvc7msys | msvisualcpp | msvcmsys)
+ # This compiler won't grok '-c -o', but also, the minuso test has
+ # not run yet. These depmodes are late enough in the game, and
+ # so weak that their functioning should not be impacted.
+ am__obj=conftest.${OBJEXT-o}
+ am__minus_obj=
+ ;;
+ none) break ;;
+ esac
+ if depmode=$depmode \
+ source=sub/conftest.c object=$am__obj \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+ am_cv_$1_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_$1_dependencies_compiler_type=none
+fi
+])
+AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
+AM_CONDITIONAL([am__fastdep$1], [
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
+])
+m4trace:/usr/share/aclocal-1.15/depend.m4:163: -1- AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
+])
+m4trace:/usr/share/aclocal-1.15/depend.m4:171: -1- AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE([dependency-tracking], [dnl
+AS_HELP_STRING(
+ [--enable-dependency-tracking],
+ [do not reject slow dependency extractors])
+AS_HELP_STRING(
+ [--disable-dependency-tracking],
+ [speeds up one-time build])])
+if test "x$enable_dependency_tracking" != xno; then
+ am_depcomp="$ac_aux_dir/depcomp"
+ AMDEPBACKSLASH='\'
+ am__nodep='_no'
+fi
+AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
+AC_SUBST([AMDEPBACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
+AC_SUBST([am__nodep])dnl
+_AM_SUBST_NOTMAKE([am__nodep])dnl
+])
+m4trace:/usr/share/aclocal-1.15/depout.m4:12: -1- AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{
+ # Older Autoconf quotes --file arguments for eval, but not when files
+ # are listed without --file. Let's play safe and only enable the eval
+ # if we detect the quoting.
+ case $CONFIG_FILES in
+ *\'*) eval set x "$CONFIG_FILES" ;;
+ *) set x $CONFIG_FILES ;;
+ esac
+ shift
+ for mf
+ do
+ # Strip MF so we end up with the name of the file.
+ mf=`echo "$mf" | sed -e 's/:.*$//'`
+ # Check whether this is an Automake generated Makefile or not.
+ # We used to match only the files named 'Makefile.in', but
+ # some people rename them; so instead we look at the file content.
+ # Grep'ing the first line is not enough: some people post-process
+ # each Makefile.in and add a new line on top of each file to say so.
+ # Grep'ing the whole file is not good either: AIX grep has a line
+ # limit of 2048, but all sed's we know have understand at least 4000.
+ if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+ dirpart=`AS_DIRNAME("$mf")`
+ else
+ continue
+ fi
+ # Extract the definition of DEPDIR, am__include, and am__quote
+ # from the Makefile without running 'make'.
+ DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+ test -z "$DEPDIR" && continue
+ am__include=`sed -n 's/^am__include = //p' < "$mf"`
+ test -z "$am__include" && continue
+ am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+ # Find all dependency output files, they are included files with
+ # $(DEPDIR) in their names. We invoke sed twice because it is the
+ # simplest approach to changing $(DEPDIR) to its actual value in the
+ # expansion.
+ for file in `sed -n "
+ s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
+ # Make sure the directory exists.
+ test -f "$dirpart/$file" && continue
+ fdir=`AS_DIRNAME(["$file"])`
+ AS_MKDIR_P([$dirpart/$fdir])
+ # echo "creating $dirpart/$file"
+ echo '# dummy' > "$dirpart/$file"
+ done
+ done
+}
+])
+m4trace:/usr/share/aclocal-1.15/depout.m4:71: -1- AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles],
+ [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
+ [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
+])
+m4trace:/usr/share/aclocal-1.15/init.m4:29: -1- AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.65])dnl
+dnl Autoconf wants to disallow AM_ names. We explicitly allow
+dnl the ones we care about.
+m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
+AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
+AC_REQUIRE([AC_PROG_INSTALL])dnl
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+ # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+ # is not polluted with repeated "-I."
+ AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
+ # test to see if srcdir already configured
+ if test -f $srcdir/config.status; then
+ AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+ fi
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+ if (cygpath --version) >/dev/null 2>/dev/null; then
+ CYGPATH_W='cygpath -w'
+ else
+ CYGPATH_W=echo
+ fi
+fi
+AC_SUBST([CYGPATH_W])
+
+# Define the identity of the package.
+dnl Distinguish between old-style and new-style calls.
+m4_ifval([$2],
+[AC_DIAGNOSE([obsolete],
+ [$0: two- and three-arguments forms are deprecated.])
+m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
+ AC_SUBST([PACKAGE], [$1])dnl
+ AC_SUBST([VERSION], [$2])],
+[_AM_SET_OPTIONS([$1])dnl
+dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
+m4_if(
+ m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
+ [ok:ok],,
+ [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
+ AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
+ AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
+
+_AM_IF_OPTION([no-define],,
+[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
+ AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
+
+# Some tools Automake needs.
+AC_REQUIRE([AM_SANITY_CHECK])dnl
+AC_REQUIRE([AC_ARG_PROGRAM])dnl
+AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
+AM_MISSING_PROG([AUTOCONF], [autoconf])
+AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
+AM_MISSING_PROG([AUTOHEADER], [autoheader])
+AM_MISSING_PROG([MAKEINFO], [makeinfo])
+AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
+AC_REQUIRE([AC_PROG_MKDIR_P])dnl
+# For better backward compatibility. To be removed once Automake 1.9.x
+# dies out for good. For more background, see:
+#
+#
+AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
+# We need awk for the "check" target (and possibly the TAP driver). The
+# system "awk" is bad on some platforms.
+AC_REQUIRE([AC_PROG_AWK])dnl
+AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
+ [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
+ [_AM_PROG_TAR([v7])])])
+_AM_IF_OPTION([no-dependencies],,
+[AC_PROVIDE_IFELSE([AC_PROG_CC],
+ [_AM_DEPENDENCIES([CC])],
+ [m4_define([AC_PROG_CC],
+ m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_CXX],
+ [_AM_DEPENDENCIES([CXX])],
+ [m4_define([AC_PROG_CXX],
+ m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_OBJC],
+ [_AM_DEPENDENCIES([OBJC])],
+ [m4_define([AC_PROG_OBJC],
+ m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
+ [_AM_DEPENDENCIES([OBJCXX])],
+ [m4_define([AC_PROG_OBJCXX],
+ m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
+])
+AC_REQUIRE([AM_SILENT_RULES])dnl
+dnl The testsuite driver may need to know about EXEEXT, so add the
+dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This
+dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
+AC_CONFIG_COMMANDS_PRE(dnl
+[m4_provide_if([_AM_COMPILER_EXEEXT],
+ [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
+
+# POSIX will say in a future version that running "rm -f" with no argument
+# is OK; and we want to be able to make that assumption in our Makefile
+# recipes. So use an aggressive probe to check that the usage we want is
+# actually supported "in the wild" to an acceptable degree.
+# See automake bug#10828.
+# To make any issue more visible, cause the running configure to be aborted
+# by default if the 'rm' program in use doesn't match our expectations; the
+# user can still override this though.
+if rm -f && rm -fr && rm -rf; then : OK; else
+ cat >&2 <<'END'
+Oops!
+
+Your 'rm' program seems unable to run without file operands specified
+on the command line, even when the '-f' option is present. This is contrary
+to the behaviour of most rm programs out there, and not conforming with
+the upcoming POSIX standard:
+
+Please tell bug-automake@gnu.org about your system, including the value
+of your $PATH and any error possibly output before this message. This
+can help us improve future automake versions.
+
+END
+ if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
+ echo 'Configuration will proceed anyway, since you have set the' >&2
+ echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
+ echo >&2
+ else
+ cat >&2 <<'END'
+Aborting the configuration process, to ensure you take notice of the issue.
+
+You can download and install GNU coreutils to get an 'rm' implementation
+that behaves properly: .
+
+If you want to complete the configuration process using your problematic
+'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
+to "yes", and re-run configure.
+
+END
+ AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
+ fi
+fi
+dnl The trailing newline in this macro's definition is deliberate, for
+dnl backward compatibility and to allow trailing 'dnl'-style comments
+dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841.
+])
+m4trace:/usr/share/aclocal-1.15/init.m4:186: -1- AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers.
+_am_arg=$1
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+ case $_am_header in
+ $_am_arg | $_am_arg:* )
+ break ;;
+ * )
+ _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+ esac
+done
+echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
+m4trace:/usr/share/aclocal-1.15/install-sh.m4:11: -1- AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+if test x"${install_sh+set}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+ *)
+ install_sh="\${SHELL} $am_aux_dir/install-sh"
+ esac
+fi
+AC_SUBST([install_sh])])
+m4trace:/usr/share/aclocal-1.15/lead-dot.m4:10: -1- AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+ am__leading_dot=.
+else
+ am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+AC_SUBST([am__leading_dot])])
+m4trace:/usr/share/aclocal-1.15/maintainer.m4:16: -1- AC_DEFUN([AM_MAINTAINER_MODE], [m4_case(m4_default([$1], [disable]),
+ [enable], [m4_define([am_maintainer_other], [disable])],
+ [disable], [m4_define([am_maintainer_other], [enable])],
+ [m4_define([am_maintainer_other], [enable])
+ m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
+AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
+ dnl maintainer-mode's default is 'disable' unless 'enable' is passed
+ AC_ARG_ENABLE([maintainer-mode],
+ [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode],
+ am_maintainer_other[ make rules and dependencies not useful
+ (and sometimes confusing) to the casual installer])],
+ [USE_MAINTAINER_MODE=$enableval],
+ [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
+ AC_MSG_RESULT([$USE_MAINTAINER_MODE])
+ AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
+ MAINT=$MAINTAINER_MODE_TRUE
+ AC_SUBST([MAINT])dnl
+
+])
+m4trace:/usr/share/aclocal-1.15/make.m4:12: -1- AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+ @echo this is the am__doit target
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+AC_MSG_CHECKING([for style of include used by $am_make])
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# Ignore all kinds of additional output from 'make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+ am__include=include
+ am__quote=
+ _am_result=GNU
+ ;;
+esac
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+ echo '.include "confinc"' > confmf
+ case `$am_make -s -f confmf 2> /dev/null` in #(
+ *the\ am__doit\ target*)
+ am__include=.include
+ am__quote="\""
+ _am_result=BSD
+ ;;
+ esac
+fi
+AC_SUBST([am__include])
+AC_SUBST([am__quote])
+AC_MSG_RESULT([$_am_result])
+rm -f confinc confmf
+])
+m4trace:/usr/share/aclocal-1.15/missing.m4:11: -1- AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN])
+$1=${$1-"${am_missing_run}$2"}
+AC_SUBST($1)])
+m4trace:/usr/share/aclocal-1.15/missing.m4:20: -1- AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([missing])dnl
+if test x"${MISSING+set}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
+ *)
+ MISSING="\${SHELL} $am_aux_dir/missing" ;;
+ esac
+fi
+# Use eval to expand $SHELL
+if eval "$MISSING --is-lightweight"; then
+ am_missing_run="$MISSING "
+else
+ am_missing_run=
+ AC_MSG_WARN(['missing' script is too old or missing])
+fi
+])
+m4trace:/usr/share/aclocal-1.15/options.m4:11: -1- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
+m4trace:/usr/share/aclocal-1.15/options.m4:17: -1- AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), [1])])
+m4trace:/usr/share/aclocal-1.15/options.m4:23: -1- AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
+m4trace:/usr/share/aclocal-1.15/options.m4:29: -1- AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
+m4trace:/usr/share/aclocal-1.15/prog-cc-c-o.m4:12: -1- AC_DEFUN([_AM_PROG_CC_C_O], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([compile])dnl
+AC_LANG_PUSH([C])dnl
+AC_CACHE_CHECK(
+ [whether $CC understands -c and -o together],
+ [am_cv_prog_cc_c_o],
+ [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
+ # Make sure it works both with $CC and with simple cc.
+ # Following AC_PROG_CC_C_O, we do the test twice because some
+ # compilers refuse to overwrite an existing .o file with -o,
+ # though they will create one.
+ am_cv_prog_cc_c_o=yes
+ for am_i in 1 2; do
+ if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
+ && test -f conftest2.$ac_objext; then
+ : OK
+ else
+ am_cv_prog_cc_c_o=no
+ break
+ fi
+ done
+ rm -f core conftest*
+ unset am_i])
+if test "$am_cv_prog_cc_c_o" != yes; then
+ # Losing compiler, so override with the script.
+ # FIXME: It is wrong to rewrite CC.
+ # But if we don't then we get into trouble of one sort or another.
+ # A longer-term fix would be to have automake use am__CC in this case,
+ # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
+ CC="$am_aux_dir/compile $CC"
+fi
+AC_LANG_POP([C])])
+m4trace:/usr/share/aclocal-1.15/prog-cc-c-o.m4:47: -1- AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
+m4trace:/usr/share/aclocal-1.15/runlog.m4:12: -1- AC_DEFUN([AM_RUN_LOG], [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
+ ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+ (exit $ac_status); }])
+m4trace:/usr/share/aclocal-1.15/sanity.m4:11: -1- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane])
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name. Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+ *[[\\\"\#\$\&\'\`$am_lf]]*)
+ AC_MSG_ERROR([unsafe absolute working directory name]);;
+esac
+case $srcdir in
+ *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
+ AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
+esac
+
+# Do 'set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ am_has_slept=no
+ for am_try in 1 2; do
+ echo "timestamp, slept: $am_has_slept" > conftest.file
+ set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+ if test "$[*]" = "X"; then
+ # -L didn't work.
+ set X `ls -t "$srcdir/configure" conftest.file`
+ fi
+ if test "$[*]" != "X $srcdir/configure conftest.file" \
+ && test "$[*]" != "X conftest.file $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
+ alias in your environment])
+ fi
+ if test "$[2]" = conftest.file || test $am_try -eq 2; then
+ break
+ fi
+ # Just in case.
+ sleep 1
+ am_has_slept=yes
+ done
+ test "$[2]" = conftest.file
+ )
+then
+ # Ok.
+ :
+else
+ AC_MSG_ERROR([newly created file is older than distributed files!
+Check your system clock])
+fi
+AC_MSG_RESULT([yes])
+# If we didn't sleep, we still need to ensure time stamps of config.status and
+# generated files are strictly newer.
+am_sleep_pid=
+if grep 'slept: no' conftest.file >/dev/null 2>&1; then
+ ( sleep 1 ) &
+ am_sleep_pid=$!
+fi
+AC_CONFIG_COMMANDS_PRE(
+ [AC_MSG_CHECKING([that generated files are newer than configure])
+ if test -n "$am_sleep_pid"; then
+ # Hide warnings about reused PIDs.
+ wait $am_sleep_pid 2>/dev/null
+ fi
+ AC_MSG_RESULT([done])])
+rm -f conftest.file
+])
+m4trace:/usr/share/aclocal-1.15/silent.m4:12: -1- AC_DEFUN([AM_SILENT_RULES], [AC_ARG_ENABLE([silent-rules], [dnl
+AS_HELP_STRING(
+ [--enable-silent-rules],
+ [less verbose build output (undo: "make V=1")])
+AS_HELP_STRING(
+ [--disable-silent-rules],
+ [verbose build output (undo: "make V=0")])dnl
+])
+case $enable_silent_rules in @%:@ (((
+ yes) AM_DEFAULT_VERBOSITY=0;;
+ no) AM_DEFAULT_VERBOSITY=1;;
+ *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
+esac
+dnl
+dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
+dnl do not support nested variable expansions.
+dnl See automake bug#9928 and bug#10237.
+am_make=${MAKE-make}
+AC_CACHE_CHECK([whether $am_make supports nested variables],
+ [am_cv_make_support_nested_variables],
+ [if AS_ECHO([['TRUE=$(BAR$(V))
+BAR0=false
+BAR1=true
+V=1
+am__doit:
+ @$(TRUE)
+.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
+ am_cv_make_support_nested_variables=yes
+else
+ am_cv_make_support_nested_variables=no
+fi])
+if test $am_cv_make_support_nested_variables = yes; then
+ dnl Using '$V' instead of '$(V)' breaks IRIX make.
+ AM_V='$(V)'
+ AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
+else
+ AM_V=$AM_DEFAULT_VERBOSITY
+ AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
+fi
+AC_SUBST([AM_V])dnl
+AM_SUBST_NOTMAKE([AM_V])dnl
+AC_SUBST([AM_DEFAULT_V])dnl
+AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
+AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
+AM_BACKSLASH='\'
+AC_SUBST([AM_BACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
+])
+m4trace:/usr/share/aclocal-1.15/strip.m4:17: -1- AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+# Installed binaries are usually stripped using 'strip' when the user
+# run "make install-strip". However 'strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the 'STRIP' environment variable to overrule this program.
+dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
+if test "$cross_compiling" != no; then
+ AC_CHECK_TOOL([STRIP], [strip], :)
+fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+AC_SUBST([INSTALL_STRIP_PROGRAM])])
+m4trace:/usr/share/aclocal-1.15/substnot.m4:12: -1- AC_DEFUN([_AM_SUBST_NOTMAKE])
+m4trace:/usr/share/aclocal-1.15/substnot.m4:17: -1- AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
+m4trace:/usr/share/aclocal-1.15/tar.m4:23: -1- AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. Yes, it's still used
+# in the wild :-( We should find a proper way to deprecate it ...
+AC_SUBST([AMTAR], ['$${TAR-tar}'])
+
+# We'll loop over all known methods to create a tar archive until one works.
+_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
+
+m4_if([$1], [v7],
+ [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
+
+ [m4_case([$1],
+ [ustar],
+ [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
+ # There is notably a 21 bits limit for the UID and the GID. In fact,
+ # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
+ # and bug#13588).
+ am_max_uid=2097151 # 2^21 - 1
+ am_max_gid=$am_max_uid
+ # The $UID and $GID variables are not portable, so we need to resort
+ # to the POSIX-mandated id(1) utility. Errors in the 'id' calls
+ # below are definitely unexpected, so allow the users to see them
+ # (that is, avoid stderr redirection).
+ am_uid=`id -u || echo unknown`
+ am_gid=`id -g || echo unknown`
+ AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
+ if test $am_uid -le $am_max_uid; then
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ _am_tools=none
+ fi
+ AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
+ if test $am_gid -le $am_max_gid; then
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ _am_tools=none
+ fi],
+
+ [pax],
+ [],
+
+ [m4_fatal([Unknown tar format])])
+
+ AC_MSG_CHECKING([how to create a $1 tar archive])
+
+ # Go ahead even if we have the value already cached. We do so because we
+ # need to set the values for the 'am__tar' and 'am__untar' variables.
+ _am_tools=${am_cv_prog_tar_$1-$_am_tools}
+
+ for _am_tool in $_am_tools; do
+ case $_am_tool in
+ gnutar)
+ for _am_tar in tar gnutar gtar; do
+ AM_RUN_LOG([$_am_tar --version]) && break
+ done
+ am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
+ am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
+ am__untar="$_am_tar -xf -"
+ ;;
+ plaintar)
+ # Must skip GNU tar: if it does not support --format= it doesn't create
+ # ustar tarball either.
+ (tar --version) >/dev/null 2>&1 && continue
+ am__tar='tar chf - "$$tardir"'
+ am__tar_='tar chf - "$tardir"'
+ am__untar='tar xf -'
+ ;;
+ pax)
+ am__tar='pax -L -x $1 -w "$$tardir"'
+ am__tar_='pax -L -x $1 -w "$tardir"'
+ am__untar='pax -r'
+ ;;
+ cpio)
+ am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
+ am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
+ am__untar='cpio -i -H $1 -d'
+ ;;
+ none)
+ am__tar=false
+ am__tar_=false
+ am__untar=false
+ ;;
+ esac
+
+ # If the value was cached, stop now. We just wanted to have am__tar
+ # and am__untar set.
+ test -n "${am_cv_prog_tar_$1}" && break
+
+ # tar/untar a dummy directory, and stop if the command works.
+ rm -rf conftest.dir
+ mkdir conftest.dir
+ echo GrepMe > conftest.dir/file
+ AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
+ rm -rf conftest.dir
+ if test -s conftest.tar; then
+ AM_RUN_LOG([$am__untar /dev/null 2>&1 && break
+ fi
+ done
+ rm -rf conftest.dir
+
+ AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
+ AC_MSG_RESULT([$am_cv_prog_tar_$1])])
+
+AC_SUBST([am__tar])
+AC_SUBST([am__untar])
+])
+m4trace:m4/libtool.m4:61: -1- AC_DEFUN([LT_INIT], [AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK
+AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
+AC_BEFORE([$0], [LT_LANG])dnl
+AC_BEFORE([$0], [LT_OUTPUT])dnl
+AC_BEFORE([$0], [LTDL_INIT])dnl
+m4_require([_LT_CHECK_BUILDDIR])dnl
+
+dnl Autoconf doesn't catch unexpanded LT_ macros by default:
+m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
+m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
+dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
+dnl unless we require an AC_DEFUNed macro:
+AC_REQUIRE([LTOPTIONS_VERSION])dnl
+AC_REQUIRE([LTSUGAR_VERSION])dnl
+AC_REQUIRE([LTVERSION_VERSION])dnl
+AC_REQUIRE([LTOBSOLETE_VERSION])dnl
+m4_require([_LT_PROG_LTMAIN])dnl
+
+_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
+
+dnl Parse OPTIONS
+_LT_SET_OPTIONS([$0], [$1])
+
+# This can be used to rebuild libtool when needed
+LIBTOOL_DEPS=$ltmain
+
+# Always use our own libtool.
+LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+AC_SUBST(LIBTOOL)dnl
+
+_LT_SETUP
+
+# Only expand once:
+m4_define([LT_INIT])
+])
+m4trace:m4/libtool.m4:99: -1- AU_DEFUN([AC_PROG_LIBTOOL], [m4_if($#, 0, [LT_INIT], [LT_INIT($@)])])
+m4trace:m4/libtool.m4:99: -1- AC_DEFUN([AC_PROG_LIBTOOL], [AC_DIAGNOSE([obsolete], [The macro `AC_PROG_LIBTOOL' is obsolete.
+You should run autoupdate.])dnl
+m4_if($#, 0, [LT_INIT], [LT_INIT($@)])])
+m4trace:m4/libtool.m4:100: -1- AU_DEFUN([AM_PROG_LIBTOOL], [m4_if($#, 0, [LT_INIT], [LT_INIT($@)])])
+m4trace:m4/libtool.m4:100: -1- AC_DEFUN([AM_PROG_LIBTOOL], [AC_DIAGNOSE([obsolete], [The macro `AM_PROG_LIBTOOL' is obsolete.
+You should run autoupdate.])dnl
+m4_if($#, 0, [LT_INIT], [LT_INIT($@)])])
+m4trace:m4/libtool.m4:619: -1- AC_DEFUN([LT_OUTPUT], [: ${CONFIG_LT=./config.lt}
+AC_MSG_NOTICE([creating $CONFIG_LT])
+_LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
+[# Run this file to recreate a libtool stub with the current configuration.])
+
+cat >>"$CONFIG_LT" <<\_LTEOF
+lt_cl_silent=false
+exec AS_MESSAGE_LOG_FD>>config.log
+{
+ echo
+ AS_BOX([Running $as_me.])
+} >&AS_MESSAGE_LOG_FD
+
+lt_cl_help="\
+'$as_me' creates a local libtool stub from the current configuration,
+for use in further configure time tests before the real libtool is
+generated.
+
+Usage: $[0] [[OPTIONS]]
+
+ -h, --help print this help, then exit
+ -V, --version print version number, then exit
+ -q, --quiet do not print progress messages
+ -d, --debug don't remove temporary files
+
+Report bugs to ."
+
+lt_cl_version="\
+m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
+m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
+configured by $[0], generated by m4_PACKAGE_STRING.
+
+Copyright (C) 2011 Free Software Foundation, Inc.
+This config.lt script is free software; the Free Software Foundation
+gives unlimited permision to copy, distribute and modify it."
+
+while test 0 != $[#]
+do
+ case $[1] in
+ --version | --v* | -V )
+ echo "$lt_cl_version"; exit 0 ;;
+ --help | --h* | -h )
+ echo "$lt_cl_help"; exit 0 ;;
+ --debug | --d* | -d )
+ debug=: ;;
+ --quiet | --q* | --silent | --s* | -q )
+ lt_cl_silent=: ;;
+
+ -*) AC_MSG_ERROR([unrecognized option: $[1]
+Try '$[0] --help' for more information.]) ;;
+
+ *) AC_MSG_ERROR([unrecognized argument: $[1]
+Try '$[0] --help' for more information.]) ;;
+ esac
+ shift
+done
+
+if $lt_cl_silent; then
+ exec AS_MESSAGE_FD>/dev/null
+fi
+_LTEOF
+
+cat >>"$CONFIG_LT" <<_LTEOF
+_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
+_LTEOF
+
+cat >>"$CONFIG_LT" <<\_LTEOF
+AC_MSG_NOTICE([creating $ofile])
+_LT_OUTPUT_LIBTOOL_COMMANDS
+AS_EXIT(0)
+_LTEOF
+chmod +x "$CONFIG_LT"
+
+# configure is writing to config.log, but config.lt does its own redirection,
+# appending to config.log, which fails on DOS, as config.log is still kept
+# open by configure. Here we exec the FD to /dev/null, effectively closing
+# config.log, so it can be properly (re)opened and appended to by config.lt.
+lt_cl_success=:
+test yes = "$silent" &&
+ lt_config_lt_args="$lt_config_lt_args --quiet"
+exec AS_MESSAGE_LOG_FD>/dev/null
+$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
+exec AS_MESSAGE_LOG_FD>>config.log
+$lt_cl_success || AS_EXIT(1)
+])
+m4trace:m4/libtool.m4:812: -1- AC_DEFUN([LT_SUPPORTED_TAG], [])
+m4trace:m4/libtool.m4:823: -1- AC_DEFUN([LT_LANG], [AC_BEFORE([$0], [LT_OUTPUT])dnl
+m4_case([$1],
+ [C], [_LT_LANG(C)],
+ [C++], [_LT_LANG(CXX)],
+ [Go], [_LT_LANG(GO)],
+ [Java], [_LT_LANG(GCJ)],
+ [Fortran 77], [_LT_LANG(F77)],
+ [Fortran], [_LT_LANG(FC)],
+ [Windows Resource], [_LT_LANG(RC)],
+ [m4_ifdef([_LT_LANG_]$1[_CONFIG],
+ [_LT_LANG($1)],
+ [m4_fatal([$0: unsupported language: "$1"])])])dnl
+])
+m4trace:m4/libtool.m4:915: -1- AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
+m4trace:m4/libtool.m4:915: -1- AC_DEFUN([AC_LIBTOOL_CXX], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_CXX' is obsolete.
+You should run autoupdate.])dnl
+LT_LANG(C++)])
+m4trace:m4/libtool.m4:916: -1- AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
+m4trace:m4/libtool.m4:916: -1- AC_DEFUN([AC_LIBTOOL_F77], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_F77' is obsolete.
+You should run autoupdate.])dnl
+LT_LANG(Fortran 77)])
+m4trace:m4/libtool.m4:917: -1- AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
+m4trace:m4/libtool.m4:917: -1- AC_DEFUN([AC_LIBTOOL_FC], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_FC' is obsolete.
+You should run autoupdate.])dnl
+LT_LANG(Fortran)])
+m4trace:m4/libtool.m4:918: -1- AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
+m4trace:m4/libtool.m4:918: -1- AC_DEFUN([AC_LIBTOOL_GCJ], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_GCJ' is obsolete.
+You should run autoupdate.])dnl
+LT_LANG(Java)])
+m4trace:m4/libtool.m4:919: -1- AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
+m4trace:m4/libtool.m4:919: -1- AC_DEFUN([AC_LIBTOOL_RC], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_RC' is obsolete.
+You should run autoupdate.])dnl
+LT_LANG(Windows Resource)])
+m4trace:m4/libtool.m4:1247: -1- AC_DEFUN([_LT_WITH_SYSROOT], [AC_MSG_CHECKING([for sysroot])
+AC_ARG_WITH([sysroot],
+[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@],
+ [Search for dependent libraries within DIR (or the compiler's sysroot
+ if not specified).])],
+[], [with_sysroot=no])
+
+dnl lt_sysroot will always be passed unquoted. We quote it here
+dnl in case the user passed a directory name.
+lt_sysroot=
+case $with_sysroot in #(
+ yes)
+ if test yes = "$GCC"; then
+ lt_sysroot=`$CC --print-sysroot 2>/dev/null`
+ fi
+ ;; #(
+ /*)
+ lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
+ ;; #(
+ no|'')
+ ;; #(
+ *)
+ AC_MSG_RESULT([$with_sysroot])
+ AC_MSG_ERROR([The sysroot must be an absolute path.])
+ ;;
+esac
+
+ AC_MSG_RESULT([${lt_sysroot:-no}])
+_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
+[dependent libraries, and where our libraries should be installed.])])
+m4trace:m4/libtool.m4:1578: -1- AC_DEFUN([_LT_COMPILER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_SED])dnl
+AC_CACHE_CHECK([$1], [$2],
+ [$2=no
+ m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+ lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ # The option is referenced via a variable to avoid confusing sed.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&AS_MESSAGE_LOG_FD
+ echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+ if (exit $ac_status) && test -s "$ac_outfile"; then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings other than the usual output.
+ $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+ $2=yes
+ fi
+ fi
+ $RM conftest*
+])
+
+if test yes = "[$]$2"; then
+ m4_if([$5], , :, [$5])
+else
+ m4_if([$6], , :, [$6])
+fi
+])
+m4trace:m4/libtool.m4:1620: -1- AU_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [m4_if($#, 0, [_LT_COMPILER_OPTION], [_LT_COMPILER_OPTION($@)])])
+m4trace:m4/libtool.m4:1620: -1- AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_COMPILER_OPTION' is obsolete.
+You should run autoupdate.])dnl
+m4_if($#, 0, [_LT_COMPILER_OPTION], [_LT_COMPILER_OPTION($@)])])
+m4trace:m4/libtool.m4:1629: -1- AC_DEFUN([_LT_LINKER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_SED])dnl
+AC_CACHE_CHECK([$1], [$2],
+ [$2=no
+ save_LDFLAGS=$LDFLAGS
+ LDFLAGS="$LDFLAGS $3"
+ echo "$lt_simple_link_test_code" > conftest.$ac_ext
+ if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+ # The linker can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ if test -s conftest.err; then
+ # Append any errors to the config.log.
+ cat conftest.err 1>&AS_MESSAGE_LOG_FD
+ $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if diff conftest.exp conftest.er2 >/dev/null; then
+ $2=yes
+ fi
+ else
+ $2=yes
+ fi
+ fi
+ $RM -r conftest*
+ LDFLAGS=$save_LDFLAGS
+])
+
+if test yes = "[$]$2"; then
+ m4_if([$4], , :, [$4])
+else
+ m4_if([$5], , :, [$5])
+fi
+])
+m4trace:m4/libtool.m4:1664: -1- AU_DEFUN([AC_LIBTOOL_LINKER_OPTION], [m4_if($#, 0, [_LT_LINKER_OPTION], [_LT_LINKER_OPTION($@)])])
+m4trace:m4/libtool.m4:1664: -1- AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_LINKER_OPTION' is obsolete.
+You should run autoupdate.])dnl
+m4_if($#, 0, [_LT_LINKER_OPTION], [_LT_LINKER_OPTION($@)])])
+m4trace:m4/libtool.m4:1671: -1- AC_DEFUN([LT_CMD_MAX_LEN], [AC_REQUIRE([AC_CANONICAL_HOST])dnl
+# find the maximum length of command line arguments
+AC_MSG_CHECKING([the maximum length of command line arguments])
+AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
+ i=0
+ teststring=ABCD
+
+ case $build_os in
+ msdosdjgpp*)
+ # On DJGPP, this test can blow up pretty badly due to problems in libc
+ # (any single argument exceeding 2000 bytes causes a buffer overrun
+ # during glob expansion). Even if it were fixed, the result of this
+ # check would be larger than it should be.
+ lt_cv_sys_max_cmd_len=12288; # 12K is about right
+ ;;
+
+ gnu*)
+ # Under GNU Hurd, this test is not required because there is
+ # no limit to the length of command line arguments.
+ # Libtool will interpret -1 as no limit whatsoever
+ lt_cv_sys_max_cmd_len=-1;
+ ;;
+
+ cygwin* | mingw* | cegcc*)
+ # On Win9x/ME, this test blows up -- it succeeds, but takes
+ # about 5 minutes as the teststring grows exponentially.
+ # Worse, since 9x/ME are not pre-emptively multitasking,
+ # you end up with a "frozen" computer, even though with patience
+ # the test eventually succeeds (with a max line length of 256k).
+ # Instead, let's just punt: use the minimum linelength reported by
+ # all of the supported platforms: 8192 (on NT/2K/XP).
+ lt_cv_sys_max_cmd_len=8192;
+ ;;
+
+ mint*)
+ # On MiNT this can take a long time and run out of memory.
+ lt_cv_sys_max_cmd_len=8192;
+ ;;
+
+ amigaos*)
+ # On AmigaOS with pdksh, this test takes hours, literally.
+ # So we just punt and use a minimum line length of 8192.
+ lt_cv_sys_max_cmd_len=8192;
+ ;;
+
+ bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*)
+ # This has been around since 386BSD, at least. Likely further.
+ if test -x /sbin/sysctl; then
+ lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
+ elif test -x /usr/sbin/sysctl; then
+ lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
+ else
+ lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
+ fi
+ # And add a safety zone
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+ ;;
+
+ interix*)
+ # We know the value 262144 and hardcode it with a safety zone (like BSD)
+ lt_cv_sys_max_cmd_len=196608
+ ;;
+
+ os2*)
+ # The test takes a long time on OS/2.
+ lt_cv_sys_max_cmd_len=8192
+ ;;
+
+ osf*)
+ # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
+ # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
+ # nice to cause kernel panics so lets avoid the loop below.
+ # First set a reasonable default.
+ lt_cv_sys_max_cmd_len=16384
+ #
+ if test -x /sbin/sysconfig; then
+ case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
+ *1*) lt_cv_sys_max_cmd_len=-1 ;;
+ esac
+ fi
+ ;;
+ sco3.2v5*)
+ lt_cv_sys_max_cmd_len=102400
+ ;;
+ sysv5* | sco5v6* | sysv4.2uw2*)
+ kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
+ if test -n "$kargmax"; then
+ lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
+ else
+ lt_cv_sys_max_cmd_len=32768
+ fi
+ ;;
+ *)
+ lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
+ if test -n "$lt_cv_sys_max_cmd_len" && \
+ test undefined != "$lt_cv_sys_max_cmd_len"; then
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+ else
+ # Make teststring a little bigger before we do anything with it.
+ # a 1K string should be a reasonable start.
+ for i in 1 2 3 4 5 6 7 8; do
+ teststring=$teststring$teststring
+ done
+ SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
+ # If test is not a shell built-in, we'll probably end up computing a
+ # maximum length that is only half of the actual maximum length, but
+ # we can't tell.
+ while { test X`env echo "$teststring$teststring" 2>/dev/null` \
+ = "X$teststring$teststring"; } >/dev/null 2>&1 &&
+ test 17 != "$i" # 1/2 MB should be enough
+ do
+ i=`expr $i + 1`
+ teststring=$teststring$teststring
+ done
+ # Only check the string length outside the loop.
+ lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
+ teststring=
+ # Add a significant safety factor because C++ compilers can tack on
+ # massive amounts of additional arguments before passing them to the
+ # linker. It appears as though 1/2 is a usable value.
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
+ fi
+ ;;
+ esac
+])
+if test -n "$lt_cv_sys_max_cmd_len"; then
+ AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
+else
+ AC_MSG_RESULT(none)
+fi
+max_cmd_len=$lt_cv_sys_max_cmd_len
+_LT_DECL([], [max_cmd_len], [0],
+ [What is the maximum length of a command?])
+])
+m4trace:m4/libtool.m4:1810: -1- AU_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [m4_if($#, 0, [LT_CMD_MAX_LEN], [LT_CMD_MAX_LEN($@)])])
+m4trace:m4/libtool.m4:1810: -1- AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_SYS_MAX_CMD_LEN' is obsolete.
+You should run autoupdate.])dnl
+m4_if($#, 0, [LT_CMD_MAX_LEN], [LT_CMD_MAX_LEN($@)])])
+m4trace:m4/libtool.m4:1921: -1- AC_DEFUN([LT_SYS_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl
+if test yes != "$enable_dlopen"; then
+ enable_dlopen=unknown
+ enable_dlopen_self=unknown
+ enable_dlopen_self_static=unknown
+else
+ lt_cv_dlopen=no
+ lt_cv_dlopen_libs=
+
+ case $host_os in
+ beos*)
+ lt_cv_dlopen=load_add_on
+ lt_cv_dlopen_libs=
+ lt_cv_dlopen_self=yes
+ ;;
+
+ mingw* | pw32* | cegcc*)
+ lt_cv_dlopen=LoadLibrary
+ lt_cv_dlopen_libs=
+ ;;
+
+ cygwin*)
+ lt_cv_dlopen=dlopen
+ lt_cv_dlopen_libs=
+ ;;
+
+ darwin*)
+ # if libdl is installed we need to link against it
+ AC_CHECK_LIB([dl], [dlopen],
+ [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[
+ lt_cv_dlopen=dyld
+ lt_cv_dlopen_libs=
+ lt_cv_dlopen_self=yes
+ ])
+ ;;
+
+ tpf*)
+ # Don't try to run any link tests for TPF. We know it's impossible
+ # because TPF is a cross-compiler, and we know how we open DSOs.
+ lt_cv_dlopen=dlopen
+ lt_cv_dlopen_libs=
+ lt_cv_dlopen_self=no
+ ;;
+
+ *)
+ AC_CHECK_FUNC([shl_load],
+ [lt_cv_dlopen=shl_load],
+ [AC_CHECK_LIB([dld], [shl_load],
+ [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld],
+ [AC_CHECK_FUNC([dlopen],
+ [lt_cv_dlopen=dlopen],
+ [AC_CHECK_LIB([dl], [dlopen],
+ [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],
+ [AC_CHECK_LIB([svld], [dlopen],
+ [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld],
+ [AC_CHECK_LIB([dld], [dld_link],
+ [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld])
+ ])
+ ])
+ ])
+ ])
+ ])
+ ;;
+ esac
+
+ if test no = "$lt_cv_dlopen"; then
+ enable_dlopen=no
+ else
+ enable_dlopen=yes
+ fi
+
+ case $lt_cv_dlopen in
+ dlopen)
+ save_CPPFLAGS=$CPPFLAGS
+ test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
+
+ save_LDFLAGS=$LDFLAGS
+ wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
+
+ save_LIBS=$LIBS
+ LIBS="$lt_cv_dlopen_libs $LIBS"
+
+ AC_CACHE_CHECK([whether a program can dlopen itself],
+ lt_cv_dlopen_self, [dnl
+ _LT_TRY_DLOPEN_SELF(
+ lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
+ lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
+ ])
+
+ if test yes = "$lt_cv_dlopen_self"; then
+ wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
+ AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
+ lt_cv_dlopen_self_static, [dnl
+ _LT_TRY_DLOPEN_SELF(
+ lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
+ lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
+ ])
+ fi
+
+ CPPFLAGS=$save_CPPFLAGS
+ LDFLAGS=$save_LDFLAGS
+ LIBS=$save_LIBS
+ ;;
+ esac
+
+ case $lt_cv_dlopen_self in
+ yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
+ *) enable_dlopen_self=unknown ;;
+ esac
+
+ case $lt_cv_dlopen_self_static in
+ yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
+ *) enable_dlopen_self_static=unknown ;;
+ esac
+fi
+_LT_DECL([dlopen_support], [enable_dlopen], [0],
+ [Whether dlopen is supported])
+_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
+ [Whether dlopen of programs is supported])
+_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
+ [Whether dlopen of statically linked programs is supported])
+])
+m4trace:m4/libtool.m4:2046: -1- AU_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [m4_if($#, 0, [LT_SYS_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF($@)])])
+m4trace:m4/libtool.m4:2046: -1- AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_DLOPEN_SELF' is obsolete.
+You should run autoupdate.])dnl
+m4_if($#, 0, [LT_SYS_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF($@)])])
+m4trace:m4/libtool.m4:3167: -1- AC_DEFUN([_LT_PATH_TOOL_PREFIX], [m4_require([_LT_DECL_EGREP])dnl
+AC_MSG_CHECKING([for $1])
+AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
+[case $MAGIC_CMD in
+[[\\/*] | ?:[\\/]*])
+ lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
+ ;;
+*)
+ lt_save_MAGIC_CMD=$MAGIC_CMD
+ lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
+dnl $ac_dummy forces splitting on constant user-supplied paths.
+dnl POSIX.2 word splitting is done only on the output of word expansions,
+dnl not every word. This closes a longstanding sh security hole.
+ ac_dummy="m4_if([$2], , $PATH, [$2])"
+ for ac_dir in $ac_dummy; do
+ IFS=$lt_save_ifs
+ test -z "$ac_dir" && ac_dir=.
+ if test -f "$ac_dir/$1"; then
+ lt_cv_path_MAGIC_CMD=$ac_dir/"$1"
+ if test -n "$file_magic_test_file"; then
+ case $deplibs_check_method in
+ "file_magic "*)
+ file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
+ MAGIC_CMD=$lt_cv_path_MAGIC_CMD
+ if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+ $EGREP "$file_magic_regex" > /dev/null; then
+ :
+ else
+ cat <<_LT_EOF 1>&2
+
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such. This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem. Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool@gnu.org
+
+_LT_EOF
+ fi ;;
+ esac
+ fi
+ break
+ fi
+ done
+ IFS=$lt_save_ifs
+ MAGIC_CMD=$lt_save_MAGIC_CMD
+ ;;
+esac])
+MAGIC_CMD=$lt_cv_path_MAGIC_CMD
+if test -n "$MAGIC_CMD"; then
+ AC_MSG_RESULT($MAGIC_CMD)
+else
+ AC_MSG_RESULT(no)
+fi
+_LT_DECL([], [MAGIC_CMD], [0],
+ [Used to examine libraries when file_magic_cmd begins with "file"])dnl
+])
+m4trace:m4/libtool.m4:3229: -1- AU_DEFUN([AC_PATH_TOOL_PREFIX], [m4_if($#, 0, [_LT_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX($@)])])
+m4trace:m4/libtool.m4:3229: -1- AC_DEFUN([AC_PATH_TOOL_PREFIX], [AC_DIAGNOSE([obsolete], [The macro `AC_PATH_TOOL_PREFIX' is obsolete.
+You should run autoupdate.])dnl
+m4_if($#, 0, [_LT_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX($@)])])
+m4trace:m4/libtool.m4:3252: -1- AC_DEFUN([LT_PATH_LD], [AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+m4_require([_LT_DECL_SED])dnl
+m4_require([_LT_DECL_EGREP])dnl
+m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
+
+AC_ARG_WITH([gnu-ld],
+ [AS_HELP_STRING([--with-gnu-ld],
+ [assume the C compiler uses GNU ld @<:@default=no@:>@])],
+ [test no = "$withval" || with_gnu_ld=yes],
+ [with_gnu_ld=no])dnl
+
+ac_prog=ld
+if test yes = "$GCC"; then
+ # Check if gcc -print-prog-name=ld gives a path.
+ AC_MSG_CHECKING([for ld used by $CC])
+ case $host in
+ *-*-mingw*)
+ # gcc leaves a trailing carriage return, which upsets mingw
+ ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+ *)
+ ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+ esac
+ case $ac_prog in
+ # Accept absolute paths.
+ [[\\/]]* | ?:[[\\/]]*)
+ re_direlt='/[[^/]][[^/]]*/\.\./'
+ # Canonicalize the pathname of ld
+ ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
+ while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
+ ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
+ done
+ test -z "$LD" && LD=$ac_prog
+ ;;
+ "")
+ # If it fails, then pretend we aren't using GCC.
+ ac_prog=ld
+ ;;
+ *)
+ # If it is relative, then search for the first ld in PATH.
+ with_gnu_ld=unknown
+ ;;
+ esac
+elif test yes = "$with_gnu_ld"; then
+ AC_MSG_CHECKING([for GNU ld])
+else
+ AC_MSG_CHECKING([for non-GNU ld])
+fi
+AC_CACHE_VAL(lt_cv_path_LD,
+[if test -z "$LD"; then
+ lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH; do
+ IFS=$lt_save_ifs
+ test -z "$ac_dir" && ac_dir=.
+ if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+ lt_cv_path_LD=$ac_dir/$ac_prog
+ # Check to see if the program is GNU ld. I'd rather use --version,
+ # but apparently some variants of GNU ld only accept -v.
+ # Break only if it was the GNU/non-GNU ld that we prefer.
+ case `"$lt_cv_path_LD" -v 2>&1 &1 | sed '1q'` in
+ *$lt_bad_file* | *'Invalid file or object type'*)
+ lt_cv_path_NM="$tmp_nm -B"
+ break 2
+ ;;
+ *)
+ case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
+ */dev/null*)
+ lt_cv_path_NM="$tmp_nm -p"
+ break 2
+ ;;
+ *)
+ lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
+ continue # so that we can try to find one that supports BSD flags
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ done
+ IFS=$lt_save_ifs
+ done
+ : ${lt_cv_path_NM=no}
+fi])
+if test no != "$lt_cv_path_NM"; then
+ NM=$lt_cv_path_NM
+else
+ # Didn't find any BSD compatible name lister, look for dumpbin.
+ if test -n "$DUMPBIN"; then :
+ # Let the user override the test.
+ else
+ AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
+ case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in
+ *COFF*)
+ DUMPBIN="$DUMPBIN -symbols -headers"
+ ;;
+ *)
+ DUMPBIN=:
+ ;;
+ esac
+ fi
+ AC_SUBST([DUMPBIN])
+ if test : != "$DUMPBIN"; then
+ NM=$DUMPBIN
+ fi
+fi
+test -z "$NM" && NM=nm
+AC_SUBST([NM])
+_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
+
+AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
+ [lt_cv_nm_interface="BSD nm"
+ echo "int some_variable = 0;" > conftest.$ac_ext
+ (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
+ (eval "$ac_compile" 2>conftest.err)
+ cat conftest.err >&AS_MESSAGE_LOG_FD
+ (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
+ (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
+ cat conftest.err >&AS_MESSAGE_LOG_FD
+ (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
+ cat conftest.out >&AS_MESSAGE_LOG_FD
+ if $GREP 'External.*some_variable' conftest.out > /dev/null; then
+ lt_cv_nm_interface="MS dumpbin"
+ fi
+ rm -f conftest*])
+])
+m4trace:m4/libtool.m4:3766: -1- AU_DEFUN([AM_PROG_NM], [m4_if($#, 0, [LT_PATH_NM], [LT_PATH_NM($@)])])
+m4trace:m4/libtool.m4:3766: -1- AC_DEFUN([AM_PROG_NM], [AC_DIAGNOSE([obsolete], [The macro `AM_PROG_NM' is obsolete.
+You should run autoupdate.])dnl
+m4_if($#, 0, [LT_PATH_NM], [LT_PATH_NM($@)])])
+m4trace:m4/libtool.m4:3767: -1- AU_DEFUN([AC_PROG_NM], [m4_if($#, 0, [LT_PATH_NM], [LT_PATH_NM($@)])])
+m4trace:m4/libtool.m4:3767: -1- AC_DEFUN([AC_PROG_NM], [AC_DIAGNOSE([obsolete], [The macro `AC_PROG_NM' is obsolete.
+You should run autoupdate.])dnl
+m4_if($#, 0, [LT_PATH_NM], [LT_PATH_NM($@)])])
+m4trace:m4/libtool.m4:3838: -1- AC_DEFUN([_LT_DLL_DEF_P], [dnl
+ test DEF = "`$SED -n dnl
+ -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace
+ -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments
+ -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl
+ -e q dnl Only consider the first "real" line
+ $1`" dnl
+])
+m4trace:m4/libtool.m4:3852: -1- AC_DEFUN([LT_LIB_M], [AC_REQUIRE([AC_CANONICAL_HOST])dnl
+LIBM=
+case $host in
+*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
+ # These system don't have libm, or don't need it
+ ;;
+*-ncr-sysv4.3*)
+ AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw)
+ AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
+ ;;
+*)
+ AC_CHECK_LIB(m, cos, LIBM=-lm)
+ ;;
+esac
+AC_SUBST([LIBM])
+])
+m4trace:m4/libtool.m4:3871: -1- AU_DEFUN([AC_CHECK_LIBM], [m4_if($#, 0, [LT_LIB_M], [LT_LIB_M($@)])])
+m4trace:m4/libtool.m4:3871: -1- AC_DEFUN([AC_CHECK_LIBM], [AC_DIAGNOSE([obsolete], [The macro `AC_CHECK_LIBM' is obsolete.
+You should run autoupdate.])dnl
+m4_if($#, 0, [LT_LIB_M], [LT_LIB_M($@)])])
+m4trace:m4/libtool.m4:8141: -1- AC_DEFUN([LT_PROG_GCJ], [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
+ [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
+ [AC_CHECK_TOOL(GCJ, gcj,)
+ test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2"
+ AC_SUBST(GCJFLAGS)])])[]dnl
+])
+m4trace:m4/libtool.m4:8150: -1- AU_DEFUN([LT_AC_PROG_GCJ], [m4_if($#, 0, [LT_PROG_GCJ], [LT_PROG_GCJ($@)])])
+m4trace:m4/libtool.m4:8150: -1- AC_DEFUN([LT_AC_PROG_GCJ], [AC_DIAGNOSE([obsolete], [The macro `LT_AC_PROG_GCJ' is obsolete.
+You should run autoupdate.])dnl
+m4_if($#, 0, [LT_PROG_GCJ], [LT_PROG_GCJ($@)])])
+m4trace:m4/libtool.m4:8157: -1- AC_DEFUN([LT_PROG_GO], [AC_CHECK_TOOL(GOC, gccgo,)
+])
+m4trace:m4/libtool.m4:8164: -1- AC_DEFUN([LT_PROG_RC], [AC_CHECK_TOOL(RC, windres,)
+])
+m4trace:m4/libtool.m4:8169: -1- AU_DEFUN([LT_AC_PROG_RC], [m4_if($#, 0, [LT_PROG_RC], [LT_PROG_RC($@)])])
+m4trace:m4/libtool.m4:8169: -1- AC_DEFUN([LT_AC_PROG_RC], [AC_DIAGNOSE([obsolete], [The macro `LT_AC_PROG_RC' is obsolete.
+You should run autoupdate.])dnl
+m4_if($#, 0, [LT_PROG_RC], [LT_PROG_RC($@)])])
+m4trace:m4/libtool.m4:8289: -1- AU_DEFUN([LT_AC_PROG_SED], [m4_if($#, 0, [AC_PROG_SED], [AC_PROG_SED($@)])])
+m4trace:m4/libtool.m4:8289: -1- AC_DEFUN([LT_AC_PROG_SED], [AC_DIAGNOSE([obsolete], [The macro `LT_AC_PROG_SED' is obsolete.
+You should run autoupdate.])dnl
+m4_if($#, 0, [AC_PROG_SED], [AC_PROG_SED($@)])])
+m4trace:m4/ltoptions.m4:14: -1- AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
+m4trace:m4/ltoptions.m4:113: -1- AU_DEFUN([AC_LIBTOOL_DLOPEN], [_LT_SET_OPTION([LT_INIT], [dlopen])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you
+put the 'dlopen' option into LT_INIT's first parameter.])
+])
+m4trace:m4/ltoptions.m4:113: -1- AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_DLOPEN' is obsolete.
+You should run autoupdate.])dnl
+_LT_SET_OPTION([LT_INIT], [dlopen])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you
+put the 'dlopen' option into LT_INIT's first parameter.])
+])
+m4trace:m4/ltoptions.m4:148: -1- AU_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_REQUIRE([AC_CANONICAL_HOST])dnl
+_LT_SET_OPTION([LT_INIT], [win32-dll])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you
+put the 'win32-dll' option into LT_INIT's first parameter.])
+])
+m4trace:m4/ltoptions.m4:148: -1- AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_WIN32_DLL' is obsolete.
+You should run autoupdate.])dnl
+AC_REQUIRE([AC_CANONICAL_HOST])dnl
+_LT_SET_OPTION([LT_INIT], [win32-dll])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you
+put the 'win32-dll' option into LT_INIT's first parameter.])
+])
+m4trace:m4/ltoptions.m4:197: -1- AC_DEFUN([AC_ENABLE_SHARED], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
+])
+m4trace:m4/ltoptions.m4:201: -1- AC_DEFUN([AC_DISABLE_SHARED], [_LT_SET_OPTION([LT_INIT], [disable-shared])
+])
+m4trace:m4/ltoptions.m4:205: -1- AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
+m4trace:m4/ltoptions.m4:205: -1- AC_DEFUN([AM_ENABLE_SHARED], [AC_DIAGNOSE([obsolete], [The macro `AM_ENABLE_SHARED' is obsolete.
+You should run autoupdate.])dnl
+AC_ENABLE_SHARED($@)])
+m4trace:m4/ltoptions.m4:206: -1- AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
+m4trace:m4/ltoptions.m4:206: -1- AC_DEFUN([AM_DISABLE_SHARED], [AC_DIAGNOSE([obsolete], [The macro `AM_DISABLE_SHARED' is obsolete.
+You should run autoupdate.])dnl
+AC_DISABLE_SHARED($@)])
+m4trace:m4/ltoptions.m4:251: -1- AC_DEFUN([AC_ENABLE_STATIC], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
+])
+m4trace:m4/ltoptions.m4:255: -1- AC_DEFUN([AC_DISABLE_STATIC], [_LT_SET_OPTION([LT_INIT], [disable-static])
+])
+m4trace:m4/ltoptions.m4:259: -1- AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
+m4trace:m4/ltoptions.m4:259: -1- AC_DEFUN([AM_ENABLE_STATIC], [AC_DIAGNOSE([obsolete], [The macro `AM_ENABLE_STATIC' is obsolete.
+You should run autoupdate.])dnl
+AC_ENABLE_STATIC($@)])
+m4trace:m4/ltoptions.m4:260: -1- AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
+m4trace:m4/ltoptions.m4:260: -1- AC_DEFUN([AM_DISABLE_STATIC], [AC_DIAGNOSE([obsolete], [The macro `AM_DISABLE_STATIC' is obsolete.
+You should run autoupdate.])dnl
+AC_DISABLE_STATIC($@)])
+m4trace:m4/ltoptions.m4:305: -1- AU_DEFUN([AC_ENABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you put
+the 'fast-install' option into LT_INIT's first parameter.])
+])
+m4trace:m4/ltoptions.m4:305: -1- AC_DEFUN([AC_ENABLE_FAST_INSTALL], [AC_DIAGNOSE([obsolete], [The macro `AC_ENABLE_FAST_INSTALL' is obsolete.
+You should run autoupdate.])dnl
+_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you put
+the 'fast-install' option into LT_INIT's first parameter.])
+])
+m4trace:m4/ltoptions.m4:312: -1- AU_DEFUN([AC_DISABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], [disable-fast-install])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you put
+the 'disable-fast-install' option into LT_INIT's first parameter.])
+])
+m4trace:m4/ltoptions.m4:312: -1- AC_DEFUN([AC_DISABLE_FAST_INSTALL], [AC_DIAGNOSE([obsolete], [The macro `AC_DISABLE_FAST_INSTALL' is obsolete.
+You should run autoupdate.])dnl
+_LT_SET_OPTION([LT_INIT], [disable-fast-install])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you put
+the 'disable-fast-install' option into LT_INIT's first parameter.])
+])
+m4trace:m4/ltoptions.m4:411: -1- AU_DEFUN([AC_LIBTOOL_PICMODE], [_LT_SET_OPTION([LT_INIT], [pic-only])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you
+put the 'pic-only' option into LT_INIT's first parameter.])
+])
+m4trace:m4/ltoptions.m4:411: -1- AC_DEFUN([AC_LIBTOOL_PICMODE], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_PICMODE' is obsolete.
+You should run autoupdate.])dnl
+_LT_SET_OPTION([LT_INIT], [pic-only])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you
+put the 'pic-only' option into LT_INIT's first parameter.])
+])
+m4trace:m4/ltsugar.m4:14: -1- AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
+m4trace:m4/ltversion.m4:18: -1- AC_DEFUN([LTVERSION_VERSION], [macro_version='2.4.6'
+macro_revision='2.4.6'
+_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
+_LT_DECL(, macro_revision, 0)
+])
+m4trace:m4/lt~obsolete.m4:37: -1- AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
+m4trace:m4/lt~obsolete.m4:41: -1- AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])
+m4trace:m4/lt~obsolete.m4:42: -1- AC_DEFUN([_LT_AC_SHELL_INIT])
+m4trace:m4/lt~obsolete.m4:43: -1- AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])
+m4trace:m4/lt~obsolete.m4:45: -1- AC_DEFUN([_LT_AC_TAGVAR])
+m4trace:m4/lt~obsolete.m4:46: -1- AC_DEFUN([AC_LTDL_ENABLE_INSTALL])
+m4trace:m4/lt~obsolete.m4:47: -1- AC_DEFUN([AC_LTDL_PREOPEN])
+m4trace:m4/lt~obsolete.m4:48: -1- AC_DEFUN([_LT_AC_SYS_COMPILER])
+m4trace:m4/lt~obsolete.m4:49: -1- AC_DEFUN([_LT_AC_LOCK])
+m4trace:m4/lt~obsolete.m4:50: -1- AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])
+m4trace:m4/lt~obsolete.m4:51: -1- AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])
+m4trace:m4/lt~obsolete.m4:52: -1- AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])
+m4trace:m4/lt~obsolete.m4:53: -1- AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])
+m4trace:m4/lt~obsolete.m4:54: -1- AC_DEFUN([AC_LIBTOOL_OBJDIR])
+m4trace:m4/lt~obsolete.m4:55: -1- AC_DEFUN([AC_LTDL_OBJDIR])
+m4trace:m4/lt~obsolete.m4:56: -1- AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])
+m4trace:m4/lt~obsolete.m4:57: -1- AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])
+m4trace:m4/lt~obsolete.m4:58: -1- AC_DEFUN([AC_PATH_MAGIC])
+m4trace:m4/lt~obsolete.m4:59: -1- AC_DEFUN([AC_PROG_LD_GNU])
+m4trace:m4/lt~obsolete.m4:60: -1- AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])
+m4trace:m4/lt~obsolete.m4:61: -1- AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])
+m4trace:m4/lt~obsolete.m4:62: -1- AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])
+m4trace:m4/lt~obsolete.m4:63: -1- AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])
+m4trace:m4/lt~obsolete.m4:64: -1- AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])
+m4trace:m4/lt~obsolete.m4:65: -1- AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])
+m4trace:m4/lt~obsolete.m4:66: -1- AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])
+m4trace:m4/lt~obsolete.m4:67: -1- AC_DEFUN([LT_AC_PROG_EGREP])
+m4trace:m4/lt~obsolete.m4:72: -1- AC_DEFUN([_AC_PROG_LIBTOOL])
+m4trace:m4/lt~obsolete.m4:73: -1- AC_DEFUN([AC_LIBTOOL_SETUP])
+m4trace:m4/lt~obsolete.m4:74: -1- AC_DEFUN([_LT_AC_CHECK_DLFCN])
+m4trace:m4/lt~obsolete.m4:75: -1- AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])
+m4trace:m4/lt~obsolete.m4:76: -1- AC_DEFUN([_LT_AC_TAGCONFIG])
+m4trace:m4/lt~obsolete.m4:78: -1- AC_DEFUN([_LT_AC_LANG_CXX])
+m4trace:m4/lt~obsolete.m4:79: -1- AC_DEFUN([_LT_AC_LANG_F77])
+m4trace:m4/lt~obsolete.m4:80: -1- AC_DEFUN([_LT_AC_LANG_GCJ])
+m4trace:m4/lt~obsolete.m4:81: -1- AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])
+m4trace:m4/lt~obsolete.m4:82: -1- AC_DEFUN([_LT_AC_LANG_C_CONFIG])
+m4trace:m4/lt~obsolete.m4:83: -1- AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])
+m4trace:m4/lt~obsolete.m4:84: -1- AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])
+m4trace:m4/lt~obsolete.m4:85: -1- AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])
+m4trace:m4/lt~obsolete.m4:86: -1- AC_DEFUN([_LT_AC_LANG_F77_CONFIG])
+m4trace:m4/lt~obsolete.m4:87: -1- AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])
+m4trace:m4/lt~obsolete.m4:88: -1- AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])
+m4trace:m4/lt~obsolete.m4:89: -1- AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])
+m4trace:m4/lt~obsolete.m4:90: -1- AC_DEFUN([_LT_AC_LANG_RC_CONFIG])
+m4trace:m4/lt~obsolete.m4:91: -1- AC_DEFUN([AC_LIBTOOL_CONFIG])
+m4trace:m4/lt~obsolete.m4:92: -1- AC_DEFUN([_LT_AC_FILE_LTDLL_C])
+m4trace:m4/lt~obsolete.m4:94: -1- AC_DEFUN([_LT_AC_PROG_CXXCPP])
+m4trace:m4/lt~obsolete.m4:97: -1- AC_DEFUN([_LT_PROG_F77])
+m4trace:m4/lt~obsolete.m4:98: -1- AC_DEFUN([_LT_PROG_FC])
+m4trace:m4/lt~obsolete.m4:99: -1- AC_DEFUN([_LT_PROG_CXX])
+m4trace:configure.ac:2: -1- m4_pattern_forbid([^_?A[CHUM]_])
+m4trace:configure.ac:2: -1- m4_pattern_forbid([_AC_])
+m4trace:configure.ac:2: -1- m4_pattern_forbid([^LIBOBJS$], [do not use LIBOBJS directly, use AC_LIBOBJ (see section `AC_LIBOBJ vs LIBOBJS'])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^AS_FLAGS$])
+m4trace:configure.ac:2: -1- m4_pattern_forbid([^_?m4_])
+m4trace:configure.ac:2: -1- m4_pattern_forbid([^dnl$])
+m4trace:configure.ac:2: -1- m4_pattern_forbid([^_?AS_])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^SHELL$])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^PATH_SEPARATOR$])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^PACKAGE_NAME$])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^PACKAGE_TARNAME$])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^PACKAGE_VERSION$])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^PACKAGE_STRING$])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^PACKAGE_BUGREPORT$])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^PACKAGE_URL$])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^exec_prefix$])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^prefix$])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^program_transform_name$])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^bindir$])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^sbindir$])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^libexecdir$])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^datarootdir$])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^datadir$])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^sysconfdir$])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^sharedstatedir$])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^localstatedir$])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^runstatedir$])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^includedir$])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^oldincludedir$])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^docdir$])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^infodir$])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^htmldir$])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^dvidir$])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^pdfdir$])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^psdir$])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^libdir$])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^localedir$])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^mandir$])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^PACKAGE_NAME$])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^PACKAGE_TARNAME$])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^PACKAGE_VERSION$])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^PACKAGE_STRING$])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^PACKAGE_BUGREPORT$])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^PACKAGE_URL$])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^DEFS$])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^ECHO_C$])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^ECHO_N$])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^ECHO_T$])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^LIBS$])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^build_alias$])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^host_alias$])
+m4trace:configure.ac:2: -1- m4_pattern_allow([^target_alias$])
+m4trace:configure.ac:5: -1- m4_pattern_allow([^build$])
+m4trace:configure.ac:5: -1- m4_pattern_allow([^build_cpu$])
+m4trace:configure.ac:5: -1- m4_pattern_allow([^build_vendor$])
+m4trace:configure.ac:5: -1- m4_pattern_allow([^build_os$])
+m4trace:configure.ac:5: -1- m4_pattern_allow([^host$])
+m4trace:configure.ac:5: -1- m4_pattern_allow([^host_cpu$])
+m4trace:configure.ac:5: -1- m4_pattern_allow([^host_vendor$])
+m4trace:configure.ac:5: -1- m4_pattern_allow([^host_os$])
+m4trace:configure.ac:5: -1- m4_pattern_allow([^target$])
+m4trace:configure.ac:5: -1- m4_pattern_allow([^target_cpu$])
+m4trace:configure.ac:5: -1- m4_pattern_allow([^target_vendor$])
+m4trace:configure.ac:5: -1- m4_pattern_allow([^target_os$])
+m4trace:configure.ac:7: -1- AC_CONFIG_MACRO_DIR([m4])
+m4trace:configure.ac:8: -1- AM_INIT_AUTOMAKE([foreign dist-bzip2 nostdinc])
+m4trace:configure.ac:8: -1- m4_pattern_allow([^AM_[A-Z]+FLAGS$])
+m4trace:configure.ac:8: -1- AM_SET_CURRENT_AUTOMAKE_VERSION
+m4trace:configure.ac:8: -1- AM_AUTOMAKE_VERSION([1.15])
+m4trace:configure.ac:8: -1- _AM_AUTOCONF_VERSION([2.69])
+m4trace:configure.ac:8: -1- m4_pattern_allow([^INSTALL_PROGRAM$])
+m4trace:configure.ac:8: -1- m4_pattern_allow([^INSTALL_SCRIPT$])
+m4trace:configure.ac:8: -1- m4_pattern_allow([^INSTALL_DATA$])
+m4trace:configure.ac:8: -1- m4_pattern_allow([^am__isrc$])
+m4trace:configure.ac:8: -1- _AM_SUBST_NOTMAKE([am__isrc])
+m4trace:configure.ac:8: -1- m4_pattern_allow([^CYGPATH_W$])
+m4trace:configure.ac:8: -1- _AM_SET_OPTIONS([foreign dist-bzip2 nostdinc])
+m4trace:configure.ac:8: -1- _AM_SET_OPTION([foreign])
+m4trace:configure.ac:8: -2- _AM_MANGLE_OPTION([foreign])
+m4trace:configure.ac:8: -1- _AM_SET_OPTION([dist-bzip2])
+m4trace:configure.ac:8: -2- _AM_MANGLE_OPTION([dist-bzip2])
+m4trace:configure.ac:8: -1- _AM_SET_OPTION([nostdinc])
+m4trace:configure.ac:8: -2- _AM_MANGLE_OPTION([nostdinc])
+m4trace:configure.ac:8: -1- m4_pattern_allow([^PACKAGE$])
+m4trace:configure.ac:8: -1- m4_pattern_allow([^VERSION$])
+m4trace:configure.ac:8: -1- _AM_IF_OPTION([no-define], [], [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
+ AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])
+m4trace:configure.ac:8: -2- _AM_MANGLE_OPTION([no-define])
+m4trace:configure.ac:8: -1- m4_pattern_allow([^PACKAGE$])
+m4trace:configure.ac:8: -1- m4_pattern_allow([^VERSION$])
+m4trace:configure.ac:8: -1- AM_SANITY_CHECK
+m4trace:configure.ac:8: -1- AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
+m4trace:configure.ac:8: -1- AM_MISSING_HAS_RUN
+m4trace:configure.ac:8: -1- AM_AUX_DIR_EXPAND
+m4trace:configure.ac:8: -1- m4_pattern_allow([^ACLOCAL$])
+m4trace:configure.ac:8: -1- AM_MISSING_PROG([AUTOCONF], [autoconf])
+m4trace:configure.ac:8: -1- m4_pattern_allow([^AUTOCONF$])
+m4trace:configure.ac:8: -1- AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
+m4trace:configure.ac:8: -1- m4_pattern_allow([^AUTOMAKE$])
+m4trace:configure.ac:8: -1- AM_MISSING_PROG([AUTOHEADER], [autoheader])
+m4trace:configure.ac:8: -1- m4_pattern_allow([^AUTOHEADER$])
+m4trace:configure.ac:8: -1- AM_MISSING_PROG([MAKEINFO], [makeinfo])
+m4trace:configure.ac:8: -1- m4_pattern_allow([^MAKEINFO$])
+m4trace:configure.ac:8: -1- AM_PROG_INSTALL_SH
+m4trace:configure.ac:8: -1- m4_pattern_allow([^install_sh$])
+m4trace:configure.ac:8: -1- AM_PROG_INSTALL_STRIP
+m4trace:configure.ac:8: -1- m4_pattern_allow([^STRIP$])
+m4trace:configure.ac:8: -1- m4_pattern_allow([^INSTALL_STRIP_PROGRAM$])
+m4trace:configure.ac:8: -1- m4_pattern_allow([^MKDIR_P$])
+m4trace:configure.ac:8: -1- m4_pattern_allow([^mkdir_p$])
+m4trace:configure.ac:8: -1- m4_pattern_allow([^AWK$])
+m4trace:configure.ac:8: -1- m4_pattern_allow([^SET_MAKE$])
+m4trace:configure.ac:8: -1- AM_SET_LEADING_DOT
+m4trace:configure.ac:8: -1- m4_pattern_allow([^am__leading_dot$])
+m4trace:configure.ac:8: -1- _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
+ [_AM_PROG_TAR([v7])])])
+m4trace:configure.ac:8: -2- _AM_MANGLE_OPTION([tar-ustar])
+m4trace:configure.ac:8: -1- _AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])
+m4trace:configure.ac:8: -2- _AM_MANGLE_OPTION([tar-pax])
+m4trace:configure.ac:8: -1- _AM_PROG_TAR([v7])
+m4trace:configure.ac:8: -1- m4_pattern_allow([^AMTAR$])
+m4trace:configure.ac:8: -1- m4_pattern_allow([^am__tar$])
+m4trace:configure.ac:8: -1- m4_pattern_allow([^am__untar$])
+m4trace:configure.ac:8: -1- _AM_IF_OPTION([no-dependencies], [], [AC_PROVIDE_IFELSE([AC_PROG_CC],
+ [_AM_DEPENDENCIES([CC])],
+ [m4_define([AC_PROG_CC],
+ m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_CXX],
+ [_AM_DEPENDENCIES([CXX])],
+ [m4_define([AC_PROG_CXX],
+ m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_OBJC],
+ [_AM_DEPENDENCIES([OBJC])],
+ [m4_define([AC_PROG_OBJC],
+ m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
+ [_AM_DEPENDENCIES([OBJCXX])],
+ [m4_define([AC_PROG_OBJCXX],
+ m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
+])
+m4trace:configure.ac:8: -2- _AM_MANGLE_OPTION([no-dependencies])
+m4trace:configure.ac:8: -1- AM_SILENT_RULES
+m4trace:configure.ac:8: -1- m4_pattern_allow([^AM_V$])
+m4trace:configure.ac:8: -1- AM_SUBST_NOTMAKE([AM_V])
+m4trace:configure.ac:8: -1- _AM_SUBST_NOTMAKE([AM_V])
+m4trace:configure.ac:8: -1- m4_pattern_allow([^AM_DEFAULT_V$])
+m4trace:configure.ac:8: -1- AM_SUBST_NOTMAKE([AM_DEFAULT_V])
+m4trace:configure.ac:8: -1- _AM_SUBST_NOTMAKE([AM_DEFAULT_V])
+m4trace:configure.ac:8: -1- m4_pattern_allow([^AM_DEFAULT_VERBOSITY$])
+m4trace:configure.ac:8: -1- m4_pattern_allow([^AM_BACKSLASH$])
+m4trace:configure.ac:8: -1- _AM_SUBST_NOTMAKE([AM_BACKSLASH])
+m4trace:configure.ac:9: -1- AM_MAINTAINER_MODE
+m4trace:configure.ac:9: -1- AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
+m4trace:configure.ac:9: -1- m4_pattern_allow([^MAINTAINER_MODE_TRUE$])
+m4trace:configure.ac:9: -1- m4_pattern_allow([^MAINTAINER_MODE_FALSE$])
+m4trace:configure.ac:9: -1- _AM_SUBST_NOTMAKE([MAINTAINER_MODE_TRUE])
+m4trace:configure.ac:9: -1- _AM_SUBST_NOTMAKE([MAINTAINER_MODE_FALSE])
+m4trace:configure.ac:9: -1- m4_pattern_allow([^MAINT$])
+m4trace:configure.ac:14: -1- AM_PROG_CC_C_O
+m4trace:configure.ac:14: -1- m4_pattern_allow([^CC$])
+m4trace:configure.ac:14: -1- m4_pattern_allow([^CFLAGS$])
+m4trace:configure.ac:14: -1- m4_pattern_allow([^LDFLAGS$])
+m4trace:configure.ac:14: -1- m4_pattern_allow([^LIBS$])
+m4trace:configure.ac:14: -1- m4_pattern_allow([^CPPFLAGS$])
+m4trace:configure.ac:14: -1- m4_pattern_allow([^CC$])
+m4trace:configure.ac:14: -1- m4_pattern_allow([^CC$])
+m4trace:configure.ac:14: -1- m4_pattern_allow([^CC$])
+m4trace:configure.ac:14: -1- m4_pattern_allow([^CC$])
+m4trace:configure.ac:14: -1- m4_pattern_allow([^ac_ct_CC$])
+m4trace:configure.ac:14: -1- m4_pattern_allow([^EXEEXT$])
+m4trace:configure.ac:14: -1- m4_pattern_allow([^OBJEXT$])
+m4trace:configure.ac:14: -1- _AM_PROG_CC_C_O
+m4trace:configure.ac:14: -1- AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext])
+m4trace:configure.ac:14: -1- _AM_DEPENDENCIES([CC])
+m4trace:configure.ac:14: -1- AM_SET_DEPDIR
+m4trace:configure.ac:14: -1- m4_pattern_allow([^DEPDIR$])
+m4trace:configure.ac:14: -1- AM_OUTPUT_DEPENDENCY_COMMANDS
+m4trace:configure.ac:14: -1- AM_MAKE_INCLUDE
+m4trace:configure.ac:14: -1- m4_pattern_allow([^am__include$])
+m4trace:configure.ac:14: -1- m4_pattern_allow([^am__quote$])
+m4trace:configure.ac:14: -1- AM_DEP_TRACK
+m4trace:configure.ac:14: -1- AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
+m4trace:configure.ac:14: -1- m4_pattern_allow([^AMDEP_TRUE$])
+m4trace:configure.ac:14: -1- m4_pattern_allow([^AMDEP_FALSE$])
+m4trace:configure.ac:14: -1- _AM_SUBST_NOTMAKE([AMDEP_TRUE])
+m4trace:configure.ac:14: -1- _AM_SUBST_NOTMAKE([AMDEP_FALSE])
+m4trace:configure.ac:14: -1- m4_pattern_allow([^AMDEPBACKSLASH$])
+m4trace:configure.ac:14: -1- _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])
+m4trace:configure.ac:14: -1- m4_pattern_allow([^am__nodep$])
+m4trace:configure.ac:14: -1- _AM_SUBST_NOTMAKE([am__nodep])
+m4trace:configure.ac:14: -1- m4_pattern_allow([^CCDEPMODE$])
+m4trace:configure.ac:14: -1- AM_CONDITIONAL([am__fastdepCC], [
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_CC_dependencies_compiler_type" = gcc3])
+m4trace:configure.ac:14: -1- m4_pattern_allow([^am__fastdepCC_TRUE$])
+m4trace:configure.ac:14: -1- m4_pattern_allow([^am__fastdepCC_FALSE$])
+m4trace:configure.ac:14: -1- _AM_SUBST_NOTMAKE([am__fastdepCC_TRUE])
+m4trace:configure.ac:14: -1- _AM_SUBST_NOTMAKE([am__fastdepCC_FALSE])
+m4trace:configure.ac:15: -1- AM_PROG_AS
+m4trace:configure.ac:15: -1- m4_pattern_allow([^CCAS$])
+m4trace:configure.ac:15: -1- m4_pattern_allow([^CCASFLAGS$])
+m4trace:configure.ac:15: -1- _AM_IF_OPTION([no-dependencies], [], [_AM_DEPENDENCIES([CCAS])])
+m4trace:configure.ac:15: -2- _AM_MANGLE_OPTION([no-dependencies])
+m4trace:configure.ac:15: -1- _AM_DEPENDENCIES([CCAS])
+m4trace:configure.ac:15: -1- m4_pattern_allow([^CCASDEPMODE$])
+m4trace:configure.ac:15: -1- AM_CONDITIONAL([am__fastdepCCAS], [
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_CCAS_dependencies_compiler_type" = gcc3])
+m4trace:configure.ac:15: -1- m4_pattern_allow([^am__fastdepCCAS_TRUE$])
+m4trace:configure.ac:15: -1- m4_pattern_allow([^am__fastdepCCAS_FALSE$])
+m4trace:configure.ac:15: -1- _AM_SUBST_NOTMAKE([am__fastdepCCAS_TRUE])
+m4trace:configure.ac:15: -1- _AM_SUBST_NOTMAKE([am__fastdepCCAS_FALSE])
+m4trace:configure.ac:16: -1- LT_INIT([disable-shared])
+m4trace:configure.ac:16: -1- m4_pattern_forbid([^_?LT_[A-Z_]+$])
+m4trace:configure.ac:16: -1- m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])
+m4trace:configure.ac:16: -1- LTOPTIONS_VERSION
+m4trace:configure.ac:16: -1- LTSUGAR_VERSION
+m4trace:configure.ac:16: -1- LTVERSION_VERSION
+m4trace:configure.ac:16: -1- LTOBSOLETE_VERSION
+m4trace:configure.ac:16: -1- _LT_PROG_LTMAIN
+m4trace:configure.ac:16: -1- m4_pattern_allow([^LIBTOOL$])
+m4trace:configure.ac:16: -1- _LT_PREPARE_SED_QUOTE_VARS
+m4trace:configure.ac:16: -1- _LT_PROG_ECHO_BACKSLASH
+m4trace:configure.ac:16: -1- LT_PATH_LD
+m4trace:configure.ac:16: -1- m4_pattern_allow([^SED$])
+m4trace:configure.ac:16: -1- AC_PROG_EGREP
+m4trace:configure.ac:16: -1- m4_pattern_allow([^GREP$])
+m4trace:configure.ac:16: -1- m4_pattern_allow([^EGREP$])
+m4trace:configure.ac:16: -1- m4_pattern_allow([^FGREP$])
+m4trace:configure.ac:16: -1- m4_pattern_allow([^GREP$])
+m4trace:configure.ac:16: -1- m4_pattern_allow([^LD$])
+m4trace:configure.ac:16: -1- LT_PATH_NM
+m4trace:configure.ac:16: -1- m4_pattern_allow([^DUMPBIN$])
+m4trace:configure.ac:16: -1- m4_pattern_allow([^ac_ct_DUMPBIN$])
+m4trace:configure.ac:16: -1- m4_pattern_allow([^DUMPBIN$])
+m4trace:configure.ac:16: -1- m4_pattern_allow([^NM$])
+m4trace:configure.ac:16: -1- m4_pattern_allow([^LN_S$])
+m4trace:configure.ac:16: -1- LT_CMD_MAX_LEN
+m4trace:configure.ac:16: -1- m4_pattern_allow([^OBJDUMP$])
+m4trace:configure.ac:16: -1- m4_pattern_allow([^OBJDUMP$])
+m4trace:configure.ac:16: -1- m4_pattern_allow([^DLLTOOL$])
+m4trace:configure.ac:16: -1- m4_pattern_allow([^DLLTOOL$])
+m4trace:configure.ac:16: -1- m4_pattern_allow([^AR$])
+m4trace:configure.ac:16: -1- m4_pattern_allow([^ac_ct_AR$])
+m4trace:configure.ac:16: -1- m4_pattern_allow([^STRIP$])
+m4trace:configure.ac:16: -1- m4_pattern_allow([^RANLIB$])
+m4trace:configure.ac:16: -1- _LT_WITH_SYSROOT
+m4trace:configure.ac:16: -1- m4_pattern_allow([LT_OBJDIR])
+m4trace:configure.ac:16: -1- m4_pattern_allow([^LT_OBJDIR$])
+m4trace:configure.ac:16: -1- _LT_CC_BASENAME([$compiler])
+m4trace:configure.ac:16: -1- _LT_PATH_TOOL_PREFIX([${ac_tool_prefix}file], [/usr/bin$PATH_SEPARATOR$PATH])
+m4trace:configure.ac:16: -1- _LT_PATH_TOOL_PREFIX([file], [/usr/bin$PATH_SEPARATOR$PATH])
+m4trace:configure.ac:16: -1- LT_SUPPORTED_TAG([CC])
+m4trace:configure.ac:16: -1- _LT_COMPILER_BOILERPLATE
+m4trace:configure.ac:16: -1- _LT_LINKER_BOILERPLATE
+m4trace:configure.ac:16: -1- _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], [lt_cv_prog_compiler_rtti_exceptions], [-fno-rtti -fno-exceptions], [], [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, )="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, ) -fno-rtti -fno-exceptions"])
+m4trace:configure.ac:16: -1- _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, ) works], [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, )], [$_LT_TAGVAR(lt_prog_compiler_pic, )@&t@m4_if([],[],[ -DPIC],[m4_if([],[CXX],[ -DPIC],[])])], [], [case $_LT_TAGVAR(lt_prog_compiler_pic, ) in
+ "" | " "*) ;;
+ *) _LT_TAGVAR(lt_prog_compiler_pic, )=" $_LT_TAGVAR(lt_prog_compiler_pic, )" ;;
+ esac], [_LT_TAGVAR(lt_prog_compiler_pic, )=
+ _LT_TAGVAR(lt_prog_compiler_can_build_shared, )=no])
+m4trace:configure.ac:16: -1- _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], [lt_cv_prog_compiler_static_works], [$lt_tmp_static_flag], [], [_LT_TAGVAR(lt_prog_compiler_static, )=])
+m4trace:configure.ac:16: -1- m4_pattern_allow([^MANIFEST_TOOL$])
+m4trace:configure.ac:16: -1- _LT_DLL_DEF_P([$export_symbols])
+m4trace:configure.ac:16: -1- _LT_DLL_DEF_P([$export_symbols])
+m4trace:configure.ac:16: -1- _LT_REQUIRED_DARWIN_CHECKS
+m4trace:configure.ac:16: -1- m4_pattern_allow([^DSYMUTIL$])
+m4trace:configure.ac:16: -1- m4_pattern_allow([^NMEDIT$])
+m4trace:configure.ac:16: -1- m4_pattern_allow([^LIPO$])
+m4trace:configure.ac:16: -1- m4_pattern_allow([^OTOOL$])
+m4trace:configure.ac:16: -1- m4_pattern_allow([^OTOOL64$])
+m4trace:configure.ac:16: -1- _LT_LINKER_OPTION([if $CC understands -b], [lt_cv_prog_compiler__b], [-b], [_LT_TAGVAR(archive_cmds, )='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], [_LT_TAGVAR(archive_cmds, )='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])
+m4trace:configure.ac:16: -1- m4_pattern_allow([^LT_SYS_LIBRARY_PATH$])
+m4trace:configure.ac:16: -1- LT_SYS_DLOPEN_SELF
+m4trace:configure.ac:16: -1- m4_pattern_allow([^CPP$])
+m4trace:configure.ac:16: -1- m4_pattern_allow([^CPPFLAGS$])
+m4trace:configure.ac:16: -1- m4_pattern_allow([^CPP$])
+m4trace:configure.ac:16: -1- m4_pattern_allow([^STDC_HEADERS$])
+m4trace:configure.ac:16: -1- m4_pattern_allow([^HAVE_DLFCN_H$])
+m4trace:configure.ac:19: -1- AC_DEFUN([_AC_Header_stdlib_h], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_header_list], [" stdlib.h"])])
+_AC_HEADERS_EXPANSION])
+m4trace:configure.ac:19: -1- AC_DEFUN([_AC_Header_unistd_h], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_header_list], [" unistd.h"])])
+_AC_HEADERS_EXPANSION])
+m4trace:configure.ac:19: -1- AC_DEFUN([_AC_Header_sys_param_h], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_header_list], [" sys/param.h"])])
+_AC_HEADERS_EXPANSION])
+m4trace:configure.ac:19: -1- m4_pattern_allow([^HAVE_GETPAGESIZE$])
+m4trace:configure.ac:19: -1- m4_pattern_allow([^HAVE_MMAP$])
+m4trace:configure.ac:38: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2625: AC_TRY_COMPILE is expanded from...
+configure.ac:38: the top level])
+m4trace:configure.ac:54: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2625: AC_TRY_COMPILE is expanded from...
+configure.ac:54: the top level])
+m4trace:configure.ac:83: -1- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:207: AC_HELP_STRING is expanded from...
+../../lib/autoconf/general.m4:1473: AC_ARG_ENABLE is expanded from...
+configure.ac:83: the top level])
+m4trace:configure.ac:86: -1- m4_pattern_allow([^NDEBUG$])
+m4trace:configure.ac:89: -1- m4_pattern_allow([^PICFLAG$])
+m4trace:configure.ac:90: -1- m4_pattern_allow([^DEFS$])
+m4trace:configure.ac:141: -1- m4_pattern_allow([^_REENTRANT$])
+m4trace:configure.ac:151: -1- m4_pattern_allow([^_PTHREADS$])
+m4trace:configure.ac:169: -1- m4_pattern_allow([^AO_NO_PTHREADS$])
+m4trace:configure.ac:173: -1- m4_pattern_allow([^THREADDLLIBS$])
+m4trace:configure.ac:175: -1- AM_CONDITIONAL([HAVE_PTHREAD_H], [test x$have_pthreads = xtrue])
+m4trace:configure.ac:175: -1- m4_pattern_allow([^HAVE_PTHREAD_H_TRUE$])
+m4trace:configure.ac:175: -1- m4_pattern_allow([^HAVE_PTHREAD_H_FALSE$])
+m4trace:configure.ac:175: -1- _AM_SUBST_NOTMAKE([HAVE_PTHREAD_H_TRUE])
+m4trace:configure.ac:175: -1- _AM_SUBST_NOTMAKE([HAVE_PTHREAD_H_FALSE])
+m4trace:configure.ac:176: -1- AM_CONDITIONAL([NEED_ASM], [test x$need_asm = xtrue])
+m4trace:configure.ac:176: -1- m4_pattern_allow([^NEED_ASM_TRUE$])
+m4trace:configure.ac:176: -1- m4_pattern_allow([^NEED_ASM_FALSE$])
+m4trace:configure.ac:176: -1- _AM_SUBST_NOTMAKE([NEED_ASM_TRUE])
+m4trace:configure.ac:176: -1- _AM_SUBST_NOTMAKE([NEED_ASM_FALSE])
+m4trace:configure.ac:190: -1- m4_pattern_allow([^LIB@&t@OBJS$])
+m4trace:configure.ac:190: -1- m4_pattern_allow([^LTLIBOBJS$])
+m4trace:configure.ac:190: -1- AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])
+m4trace:configure.ac:190: -1- m4_pattern_allow([^am__EXEEXT_TRUE$])
+m4trace:configure.ac:190: -1- m4_pattern_allow([^am__EXEEXT_FALSE$])
+m4trace:configure.ac:190: -1- _AM_SUBST_NOTMAKE([am__EXEEXT_TRUE])
+m4trace:configure.ac:190: -1- _AM_SUBST_NOTMAKE([am__EXEEXT_FALSE])
+m4trace:configure.ac:190: -1- _AC_AM_CONFIG_HEADER_HOOK(["$ac_file"])
+m4trace:configure.ac:190: -1- _AM_OUTPUT_DEPENDENCY_COMMANDS
+m4trace:configure.ac:190: -1- _LT_PROG_LTMAIN
diff --git a/external/bdwgc/libatomic_ops/compile b/external/bdwgc/libatomic_ops/compile
new file mode 100755
index 0000000000..a85b723c7e
--- /dev/null
+++ b/external/bdwgc/libatomic_ops/compile
@@ -0,0 +1,347 @@
+#! /bin/sh
+# Wrapper for compilers which do not understand '-c -o'.
+
+scriptversion=2012-10-14.11; # UTC
+
+# Copyright (C) 1999-2014 Free Software Foundation, Inc.
+# Written by Tom Tromey .
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# This file is maintained in Automake, please report
+# bugs to or send patches to
+# .
+
+nl='
+'
+
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent tools from complaining about whitespace usage.
+IFS=" "" $nl"
+
+file_conv=
+
+# func_file_conv build_file lazy
+# Convert a $build file to $host form and store it in $file
+# Currently only supports Windows hosts. If the determined conversion
+# type is listed in (the comma separated) LAZY, no conversion will
+# take place.
+func_file_conv ()
+{
+ file=$1
+ case $file in
+ / | /[!/]*) # absolute file, and not a UNC file
+ if test -z "$file_conv"; then
+ # lazily determine how to convert abs files
+ case `uname -s` in
+ MINGW*)
+ file_conv=mingw
+ ;;
+ CYGWIN*)
+ file_conv=cygwin
+ ;;
+ *)
+ file_conv=wine
+ ;;
+ esac
+ fi
+ case $file_conv/,$2, in
+ *,$file_conv,*)
+ ;;
+ mingw/*)
+ file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
+ ;;
+ cygwin/*)
+ file=`cygpath -m "$file" || echo "$file"`
+ ;;
+ wine/*)
+ file=`winepath -w "$file" || echo "$file"`
+ ;;
+ esac
+ ;;
+ esac
+}
+
+# func_cl_dashL linkdir
+# Make cl look for libraries in LINKDIR
+func_cl_dashL ()
+{
+ func_file_conv "$1"
+ if test -z "$lib_path"; then
+ lib_path=$file
+ else
+ lib_path="$lib_path;$file"
+ fi
+ linker_opts="$linker_opts -LIBPATH:$file"
+}
+
+# func_cl_dashl library
+# Do a library search-path lookup for cl
+func_cl_dashl ()
+{
+ lib=$1
+ found=no
+ save_IFS=$IFS
+ IFS=';'
+ for dir in $lib_path $LIB
+ do
+ IFS=$save_IFS
+ if $shared && test -f "$dir/$lib.dll.lib"; then
+ found=yes
+ lib=$dir/$lib.dll.lib
+ break
+ fi
+ if test -f "$dir/$lib.lib"; then
+ found=yes
+ lib=$dir/$lib.lib
+ break
+ fi
+ if test -f "$dir/lib$lib.a"; then
+ found=yes
+ lib=$dir/lib$lib.a
+ break
+ fi
+ done
+ IFS=$save_IFS
+
+ if test "$found" != yes; then
+ lib=$lib.lib
+ fi
+}
+
+# func_cl_wrapper cl arg...
+# Adjust compile command to suit cl
+func_cl_wrapper ()
+{
+ # Assume a capable shell
+ lib_path=
+ shared=:
+ linker_opts=
+ for arg
+ do
+ if test -n "$eat"; then
+ eat=
+ else
+ case $1 in
+ -o)
+ # configure might choose to run compile as 'compile cc -o foo foo.c'.
+ eat=1
+ case $2 in
+ *.o | *.[oO][bB][jJ])
+ func_file_conv "$2"
+ set x "$@" -Fo"$file"
+ shift
+ ;;
+ *)
+ func_file_conv "$2"
+ set x "$@" -Fe"$file"
+ shift
+ ;;
+ esac
+ ;;
+ -I)
+ eat=1
+ func_file_conv "$2" mingw
+ set x "$@" -I"$file"
+ shift
+ ;;
+ -I*)
+ func_file_conv "${1#-I}" mingw
+ set x "$@" -I"$file"
+ shift
+ ;;
+ -l)
+ eat=1
+ func_cl_dashl "$2"
+ set x "$@" "$lib"
+ shift
+ ;;
+ -l*)
+ func_cl_dashl "${1#-l}"
+ set x "$@" "$lib"
+ shift
+ ;;
+ -L)
+ eat=1
+ func_cl_dashL "$2"
+ ;;
+ -L*)
+ func_cl_dashL "${1#-L}"
+ ;;
+ -static)
+ shared=false
+ ;;
+ -Wl,*)
+ arg=${1#-Wl,}
+ save_ifs="$IFS"; IFS=','
+ for flag in $arg; do
+ IFS="$save_ifs"
+ linker_opts="$linker_opts $flag"
+ done
+ IFS="$save_ifs"
+ ;;
+ -Xlinker)
+ eat=1
+ linker_opts="$linker_opts $2"
+ ;;
+ -*)
+ set x "$@" "$1"
+ shift
+ ;;
+ *.cc | *.CC | *.cxx | *.CXX | *.[cC]++)
+ func_file_conv "$1"
+ set x "$@" -Tp"$file"
+ shift
+ ;;
+ *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO])
+ func_file_conv "$1" mingw
+ set x "$@" "$file"
+ shift
+ ;;
+ *)
+ set x "$@" "$1"
+ shift
+ ;;
+ esac
+ fi
+ shift
+ done
+ if test -n "$linker_opts"; then
+ linker_opts="-link$linker_opts"
+ fi
+ exec "$@" $linker_opts
+ exit 1
+}
+
+eat=
+
+case $1 in
+ '')
+ echo "$0: No command. Try '$0 --help' for more information." 1>&2
+ exit 1;
+ ;;
+ -h | --h*)
+ cat <<\EOF
+Usage: compile [--help] [--version] PROGRAM [ARGS]
+
+Wrapper for compilers which do not understand '-c -o'.
+Remove '-o dest.o' from ARGS, run PROGRAM with the remaining
+arguments, and rename the output as expected.
+
+If you are trying to build a whole package this is not the
+right script to run: please start by reading the file 'INSTALL'.
+
+Report bugs to .
+EOF
+ exit $?
+ ;;
+ -v | --v*)
+ echo "compile $scriptversion"
+ exit $?
+ ;;
+ cl | *[/\\]cl | cl.exe | *[/\\]cl.exe )
+ func_cl_wrapper "$@" # Doesn't return...
+ ;;
+esac
+
+ofile=
+cfile=
+
+for arg
+do
+ if test -n "$eat"; then
+ eat=
+ else
+ case $1 in
+ -o)
+ # configure might choose to run compile as 'compile cc -o foo foo.c'.
+ # So we strip '-o arg' only if arg is an object.
+ eat=1
+ case $2 in
+ *.o | *.obj)
+ ofile=$2
+ ;;
+ *)
+ set x "$@" -o "$2"
+ shift
+ ;;
+ esac
+ ;;
+ *.c)
+ cfile=$1
+ set x "$@" "$1"
+ shift
+ ;;
+ *)
+ set x "$@" "$1"
+ shift
+ ;;
+ esac
+ fi
+ shift
+done
+
+if test -z "$ofile" || test -z "$cfile"; then
+ # If no '-o' option was seen then we might have been invoked from a
+ # pattern rule where we don't need one. That is ok -- this is a
+ # normal compilation that the losing compiler can handle. If no
+ # '.c' file was seen then we are probably linking. That is also
+ # ok.
+ exec "$@"
+fi
+
+# Name of file we expect compiler to create.
+cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'`
+
+# Create the lock directory.
+# Note: use '[/\\:.-]' here to ensure that we don't use the same name
+# that we are using for the .o file. Also, base the name on the expected
+# object file name, since that is what matters with a parallel build.
+lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d
+while true; do
+ if mkdir "$lockdir" >/dev/null 2>&1; then
+ break
+ fi
+ sleep 1
+done
+# FIXME: race condition here if user kills between mkdir and trap.
+trap "rmdir '$lockdir'; exit 1" 1 2 15
+
+# Run the compile.
+"$@"
+ret=$?
+
+if test -f "$cofile"; then
+ test "$cofile" = "$ofile" || mv "$cofile" "$ofile"
+elif test -f "${cofile}bj"; then
+ test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile"
+fi
+
+rmdir "$lockdir"
+exit $ret
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/external/bdwgc/libatomic_ops/config.guess b/external/bdwgc/libatomic_ops/config.guess
new file mode 100755
index 0000000000..16592509d4
--- /dev/null
+++ b/external/bdwgc/libatomic_ops/config.guess
@@ -0,0 +1,1441 @@
+#! /bin/sh
+# Attempt to guess a canonical system name.
+# Copyright 1992-2015 Free Software Foundation, Inc.
+
+timestamp='2015-08-20'
+
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, see .
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that
+# program. This Exception is an additional permission under section 7
+# of the GNU General Public License, version 3 ("GPLv3").
+#
+# Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
+#
+# You can get the latest version of this script from:
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+#
+# Please send patches to .
+
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION]
+
+Output the configuration name of the system \`$me' is run on.
+
+Operation modes:
+ -h, --help print this help, then exit
+ -t, --time-stamp print date of last modification, then exit
+ -v, --version print version number, then exit
+
+Report bugs and patches to ."
+
+version="\
+GNU config.guess ($timestamp)
+
+Originally written by Per Bothner.
+Copyright 1992-2015 Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+ case $1 in
+ --time-stamp | --time* | -t )
+ echo "$timestamp" ; exit ;;
+ --version | -v )
+ echo "$version" ; exit ;;
+ --help | --h* | -h )
+ echo "$usage"; exit ;;
+ -- ) # Stop option processing
+ shift; break ;;
+ - ) # Use stdin as input.
+ break ;;
+ -* )
+ echo "$me: invalid option $1$help" >&2
+ exit 1 ;;
+ * )
+ break ;;
+ esac
+done
+
+if test $# != 0; then
+ echo "$me: too many arguments$help" >&2
+ exit 1
+fi
+
+trap 'exit 1' 1 2 15
+
+# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
+# compiler to aid in system detection is discouraged as it requires
+# temporary files to be created and, as you can see below, it is a
+# headache to deal with in a portable fashion.
+
+# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
+# use `HOST_CC' if defined, but it is deprecated.
+
+# Portable tmp directory creation inspired by the Autoconf team.
+
+set_cc_for_build='
+trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
+trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
+: ${TMPDIR=/tmp} ;
+ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
+ { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
+ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
+ { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
+dummy=$tmp/dummy ;
+tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
+case $CC_FOR_BUILD,$HOST_CC,$CC in
+ ,,) echo "int x;" > $dummy.c ;
+ for c in cc gcc c89 c99 ; do
+ if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
+ CC_FOR_BUILD="$c"; break ;
+ fi ;
+ done ;
+ if test x"$CC_FOR_BUILD" = x ; then
+ CC_FOR_BUILD=no_compiler_found ;
+ fi
+ ;;
+ ,,*) CC_FOR_BUILD=$CC ;;
+ ,*,*) CC_FOR_BUILD=$HOST_CC ;;
+esac ; set_cc_for_build= ;'
+
+# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
+# (ghazi@noc.rutgers.edu 1994-08-24)
+if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
+ PATH=$PATH:/.attbin ; export PATH
+fi
+
+UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
+UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
+UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
+UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+
+case "${UNAME_SYSTEM}" in
+Linux|GNU|GNU/*)
+ # If the system lacks a compiler, then just pick glibc.
+ # We could probably try harder.
+ LIBC=gnu
+
+ eval $set_cc_for_build
+ cat <<-EOF > $dummy.c
+ #include
+ #if defined(__UCLIBC__)
+ LIBC=uclibc
+ #elif defined(__dietlibc__)
+ LIBC=dietlibc
+ #else
+ LIBC=gnu
+ #endif
+ EOF
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
+ ;;
+esac
+
+# Note: order is significant - the case branches are not exclusive.
+
+case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+ *:NetBSD:*:*)
+ # NetBSD (nbsd) targets should (where applicable) match one or
+ # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
+ # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
+ # switched to ELF, *-*-netbsd* would select the old
+ # object file format. This provides both forward
+ # compatibility and a consistent mechanism for selecting the
+ # object file format.
+ #
+ # Note: NetBSD doesn't particularly care about the vendor
+ # portion of the name. We always set it to "unknown".
+ sysctl="sysctl -n hw.machine_arch"
+ UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
+ /sbin/$sysctl 2>/dev/null || \
+ /usr/sbin/$sysctl 2>/dev/null || \
+ echo unknown)`
+ case "${UNAME_MACHINE_ARCH}" in
+ armeb) machine=armeb-unknown ;;
+ arm*) machine=arm-unknown ;;
+ sh3el) machine=shl-unknown ;;
+ sh3eb) machine=sh-unknown ;;
+ sh5el) machine=sh5le-unknown ;;
+ earmv*)
+ arch=`echo ${UNAME_MACHINE_ARCH} | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
+ endian=`echo ${UNAME_MACHINE_ARCH} | sed -ne 's,^.*\(eb\)$,\1,p'`
+ machine=${arch}${endian}-unknown
+ ;;
+ *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
+ esac
+ # The Operating System including object format, if it has switched
+ # to ELF recently, or will in the future.
+ case "${UNAME_MACHINE_ARCH}" in
+ arm*|earm*|i386|m68k|ns32k|sh3*|sparc|vax)
+ eval $set_cc_for_build
+ if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ELF__
+ then
+ # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
+ # Return netbsd for either. FIX?
+ os=netbsd
+ else
+ os=netbsdelf
+ fi
+ ;;
+ *)
+ os=netbsd
+ ;;
+ esac
+ # Determine ABI tags.
+ case "${UNAME_MACHINE_ARCH}" in
+ earm*)
+ expr='s/^earmv[0-9]/-eabi/;s/eb$//'
+ abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"`
+ ;;
+ esac
+ # The OS release
+ # Debian GNU/NetBSD machines have a different userland, and
+ # thus, need a distinct triplet. However, they do not need
+ # kernel version information, so it can be replaced with a
+ # suitable tag, in the style of linux-gnu.
+ case "${UNAME_VERSION}" in
+ Debian*)
+ release='-gnu'
+ ;;
+ *)
+ release=`echo ${UNAME_RELEASE} | sed -e 's/[-_].*//' | cut -d. -f1,2`
+ ;;
+ esac
+ # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
+ # contains redundant information, the shorter form:
+ # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
+ echo "${machine}-${os}${release}${abi}"
+ exit ;;
+ *:Bitrig:*:*)
+ UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
+ echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
+ exit ;;
+ *:OpenBSD:*:*)
+ UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
+ echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
+ exit ;;
+ *:ekkoBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
+ exit ;;
+ *:SolidBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
+ exit ;;
+ macppc:MirBSD:*:*)
+ echo powerpc-unknown-mirbsd${UNAME_RELEASE}
+ exit ;;
+ *:MirBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
+ exit ;;
+ *:Sortix:*:*)
+ echo ${UNAME_MACHINE}-unknown-sortix
+ exit ;;
+ alpha:OSF1:*:*)
+ case $UNAME_RELEASE in
+ *4.0)
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
+ ;;
+ *5.*)
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
+ ;;
+ esac
+ # According to Compaq, /usr/sbin/psrinfo has been available on
+ # OSF/1 and Tru64 systems produced since 1995. I hope that
+ # covers most systems running today. This code pipes the CPU
+ # types through head -n 1, so we only detect the type of CPU 0.
+ ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
+ case "$ALPHA_CPU_TYPE" in
+ "EV4 (21064)")
+ UNAME_MACHINE="alpha" ;;
+ "EV4.5 (21064)")
+ UNAME_MACHINE="alpha" ;;
+ "LCA4 (21066/21068)")
+ UNAME_MACHINE="alpha" ;;
+ "EV5 (21164)")
+ UNAME_MACHINE="alphaev5" ;;
+ "EV5.6 (21164A)")
+ UNAME_MACHINE="alphaev56" ;;
+ "EV5.6 (21164PC)")
+ UNAME_MACHINE="alphapca56" ;;
+ "EV5.7 (21164PC)")
+ UNAME_MACHINE="alphapca57" ;;
+ "EV6 (21264)")
+ UNAME_MACHINE="alphaev6" ;;
+ "EV6.7 (21264A)")
+ UNAME_MACHINE="alphaev67" ;;
+ "EV6.8CB (21264C)")
+ UNAME_MACHINE="alphaev68" ;;
+ "EV6.8AL (21264B)")
+ UNAME_MACHINE="alphaev68" ;;
+ "EV6.8CX (21264D)")
+ UNAME_MACHINE="alphaev68" ;;
+ "EV6.9A (21264/EV69A)")
+ UNAME_MACHINE="alphaev69" ;;
+ "EV7 (21364)")
+ UNAME_MACHINE="alphaev7" ;;
+ "EV7.9 (21364A)")
+ UNAME_MACHINE="alphaev79" ;;
+ esac
+ # A Pn.n version is a patched version.
+ # A Vn.n version is a released version.
+ # A Tn.n version is a released field test version.
+ # A Xn.n version is an unreleased experimental baselevel.
+ # 1.2 uses "1.2" for uname -r.
+ echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
+ exitcode=$?
+ trap '' 0
+ exit $exitcode ;;
+ Alpha\ *:Windows_NT*:*)
+ # How do we know it's Interix rather than the generic POSIX subsystem?
+ # Should we change UNAME_MACHINE based on the output of uname instead
+ # of the specific Alpha model?
+ echo alpha-pc-interix
+ exit ;;
+ 21064:Windows_NT:50:3)
+ echo alpha-dec-winnt3.5
+ exit ;;
+ Amiga*:UNIX_System_V:4.0:*)
+ echo m68k-unknown-sysv4
+ exit ;;
+ *:[Aa]miga[Oo][Ss]:*:*)
+ echo ${UNAME_MACHINE}-unknown-amigaos
+ exit ;;
+ *:[Mm]orph[Oo][Ss]:*:*)
+ echo ${UNAME_MACHINE}-unknown-morphos
+ exit ;;
+ *:OS/390:*:*)
+ echo i370-ibm-openedition
+ exit ;;
+ *:z/VM:*:*)
+ echo s390-ibm-zvmoe
+ exit ;;
+ *:OS400:*:*)
+ echo powerpc-ibm-os400
+ exit ;;
+ arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
+ echo arm-acorn-riscix${UNAME_RELEASE}
+ exit ;;
+ arm*:riscos:*:*|arm*:RISCOS:*:*)
+ echo arm-unknown-riscos
+ exit ;;
+ SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
+ echo hppa1.1-hitachi-hiuxmpp
+ exit ;;
+ Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
+ # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
+ if test "`(/bin/universe) 2>/dev/null`" = att ; then
+ echo pyramid-pyramid-sysv3
+ else
+ echo pyramid-pyramid-bsd
+ fi
+ exit ;;
+ NILE*:*:*:dcosx)
+ echo pyramid-pyramid-svr4
+ exit ;;
+ DRS?6000:unix:4.0:6*)
+ echo sparc-icl-nx6
+ exit ;;
+ DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
+ case `/usr/bin/uname -p` in
+ sparc) echo sparc-icl-nx7; exit ;;
+ esac ;;
+ s390x:SunOS:*:*)
+ echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4H:SunOS:5.*:*)
+ echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
+ echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
+ echo i386-pc-auroraux${UNAME_RELEASE}
+ exit ;;
+ i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
+ eval $set_cc_for_build
+ SUN_ARCH="i386"
+ # If there is a compiler, see if it is configured for 64-bit objects.
+ # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
+ # This test works for both compilers.
+ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+ if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
+ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_64BIT_ARCH >/dev/null
+ then
+ SUN_ARCH="x86_64"
+ fi
+ fi
+ echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4*:SunOS:6*:*)
+ # According to config.sub, this is the proper way to canonicalize
+ # SunOS6. Hard to guess exactly what SunOS6 will be like, but
+ # it's likely to be more like Solaris than SunOS4.
+ echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4*:SunOS:*:*)
+ case "`/usr/bin/arch -k`" in
+ Series*|S4*)
+ UNAME_RELEASE=`uname -v`
+ ;;
+ esac
+ # Japanese Language versions have a version number like `4.1.3-JL'.
+ echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
+ exit ;;
+ sun3*:SunOS:*:*)
+ echo m68k-sun-sunos${UNAME_RELEASE}
+ exit ;;
+ sun*:*:4.2BSD:*)
+ UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
+ test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
+ case "`/bin/arch`" in
+ sun3)
+ echo m68k-sun-sunos${UNAME_RELEASE}
+ ;;
+ sun4)
+ echo sparc-sun-sunos${UNAME_RELEASE}
+ ;;
+ esac
+ exit ;;
+ aushp:SunOS:*:*)
+ echo sparc-auspex-sunos${UNAME_RELEASE}
+ exit ;;
+ # The situation for MiNT is a little confusing. The machine name
+ # can be virtually everything (everything which is not
+ # "atarist" or "atariste" at least should have a processor
+ # > m68000). The system name ranges from "MiNT" over "FreeMiNT"
+ # to the lowercase version "mint" (or "freemint"). Finally
+ # the system name "TOS" denotes a system which is actually not
+ # MiNT. But MiNT is downward compatible to TOS, so this should
+ # be no problem.
+ atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit ;;
+ atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit ;;
+ *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit ;;
+ milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
+ echo m68k-milan-mint${UNAME_RELEASE}
+ exit ;;
+ hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
+ echo m68k-hades-mint${UNAME_RELEASE}
+ exit ;;
+ *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
+ echo m68k-unknown-mint${UNAME_RELEASE}
+ exit ;;
+ m68k:machten:*:*)
+ echo m68k-apple-machten${UNAME_RELEASE}
+ exit ;;
+ powerpc:machten:*:*)
+ echo powerpc-apple-machten${UNAME_RELEASE}
+ exit ;;
+ RISC*:Mach:*:*)
+ echo mips-dec-mach_bsd4.3
+ exit ;;
+ RISC*:ULTRIX:*:*)
+ echo mips-dec-ultrix${UNAME_RELEASE}
+ exit ;;
+ VAX*:ULTRIX*:*:*)
+ echo vax-dec-ultrix${UNAME_RELEASE}
+ exit ;;
+ 2020:CLIX:*:* | 2430:CLIX:*:*)
+ echo clipper-intergraph-clix${UNAME_RELEASE}
+ exit ;;
+ mips:*:*:UMIPS | mips:*:*:RISCos)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+#ifdef __cplusplus
+#include /* for printf() prototype */
+ int main (int argc, char *argv[]) {
+#else
+ int main (argc, argv) int argc; char *argv[]; {
+#endif
+ #if defined (host_mips) && defined (MIPSEB)
+ #if defined (SYSTYPE_SYSV)
+ printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
+ #endif
+ #if defined (SYSTYPE_SVR4)
+ printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
+ #endif
+ #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
+ printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
+ #endif
+ #endif
+ exit (-1);
+ }
+EOF
+ $CC_FOR_BUILD -o $dummy $dummy.c &&
+ dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
+ SYSTEM_NAME=`$dummy $dummyarg` &&
+ { echo "$SYSTEM_NAME"; exit; }
+ echo mips-mips-riscos${UNAME_RELEASE}
+ exit ;;
+ Motorola:PowerMAX_OS:*:*)
+ echo powerpc-motorola-powermax
+ exit ;;
+ Motorola:*:4.3:PL8-*)
+ echo powerpc-harris-powermax
+ exit ;;
+ Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
+ echo powerpc-harris-powermax
+ exit ;;
+ Night_Hawk:Power_UNIX:*:*)
+ echo powerpc-harris-powerunix
+ exit ;;
+ m88k:CX/UX:7*:*)
+ echo m88k-harris-cxux7
+ exit ;;
+ m88k:*:4*:R4*)
+ echo m88k-motorola-sysv4
+ exit ;;
+ m88k:*:3*:R3*)
+ echo m88k-motorola-sysv3
+ exit ;;
+ AViiON:dgux:*:*)
+ # DG/UX returns AViiON for all architectures
+ UNAME_PROCESSOR=`/usr/bin/uname -p`
+ if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
+ then
+ if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
+ [ ${TARGET_BINARY_INTERFACE}x = x ]
+ then
+ echo m88k-dg-dgux${UNAME_RELEASE}
+ else
+ echo m88k-dg-dguxbcs${UNAME_RELEASE}
+ fi
+ else
+ echo i586-dg-dgux${UNAME_RELEASE}
+ fi
+ exit ;;
+ M88*:DolphinOS:*:*) # DolphinOS (SVR3)
+ echo m88k-dolphin-sysv3
+ exit ;;
+ M88*:*:R3*:*)
+ # Delta 88k system running SVR3
+ echo m88k-motorola-sysv3
+ exit ;;
+ XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
+ echo m88k-tektronix-sysv3
+ exit ;;
+ Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
+ echo m68k-tektronix-bsd
+ exit ;;
+ *:IRIX*:*:*)
+ echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
+ exit ;;
+ ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
+ echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
+ exit ;; # Note that: echo "'`uname -s`'" gives 'AIX '
+ i*86:AIX:*:*)
+ echo i386-ibm-aix
+ exit ;;
+ ia64:AIX:*:*)
+ if [ -x /usr/bin/oslevel ] ; then
+ IBM_REV=`/usr/bin/oslevel`
+ else
+ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+ fi
+ echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
+ exit ;;
+ *:AIX:2:3)
+ if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #include
+
+ main()
+ {
+ if (!__power_pc())
+ exit(1);
+ puts("powerpc-ibm-aix3.2.5");
+ exit(0);
+ }
+EOF
+ if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
+ then
+ echo "$SYSTEM_NAME"
+ else
+ echo rs6000-ibm-aix3.2.5
+ fi
+ elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
+ echo rs6000-ibm-aix3.2.4
+ else
+ echo rs6000-ibm-aix3.2
+ fi
+ exit ;;
+ *:AIX:*:[4567])
+ IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
+ if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
+ IBM_ARCH=rs6000
+ else
+ IBM_ARCH=powerpc
+ fi
+ if [ -x /usr/bin/lslpp ] ; then
+ IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc |
+ awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
+ else
+ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+ fi
+ echo ${IBM_ARCH}-ibm-aix${IBM_REV}
+ exit ;;
+ *:AIX:*:*)
+ echo rs6000-ibm-aix
+ exit ;;
+ ibmrt:4.4BSD:*|romp-ibm:BSD:*)
+ echo romp-ibm-bsd4.4
+ exit ;;
+ ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
+ echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
+ exit ;; # report: romp-ibm BSD 4.3
+ *:BOSX:*:*)
+ echo rs6000-bull-bosx
+ exit ;;
+ DPX/2?00:B.O.S.:*:*)
+ echo m68k-bull-sysv3
+ exit ;;
+ 9000/[34]??:4.3bsd:1.*:*)
+ echo m68k-hp-bsd
+ exit ;;
+ hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
+ echo m68k-hp-bsd4.4
+ exit ;;
+ 9000/[34678]??:HP-UX:*:*)
+ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+ case "${UNAME_MACHINE}" in
+ 9000/31? ) HP_ARCH=m68000 ;;
+ 9000/[34]?? ) HP_ARCH=m68k ;;
+ 9000/[678][0-9][0-9])
+ if [ -x /usr/bin/getconf ]; then
+ sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
+ sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
+ case "${sc_cpu_version}" in
+ 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
+ 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
+ 532) # CPU_PA_RISC2_0
+ case "${sc_kernel_bits}" in
+ 32) HP_ARCH="hppa2.0n" ;;
+ 64) HP_ARCH="hppa2.0w" ;;
+ '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
+ esac ;;
+ esac
+ fi
+ if [ "${HP_ARCH}" = "" ]; then
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+
+ #define _HPUX_SOURCE
+ #include
+ #include
+
+ int main ()
+ {
+ #if defined(_SC_KERNEL_BITS)
+ long bits = sysconf(_SC_KERNEL_BITS);
+ #endif
+ long cpu = sysconf (_SC_CPU_VERSION);
+
+ switch (cpu)
+ {
+ case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+ case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+ case CPU_PA_RISC2_0:
+ #if defined(_SC_KERNEL_BITS)
+ switch (bits)
+ {
+ case 64: puts ("hppa2.0w"); break;
+ case 32: puts ("hppa2.0n"); break;
+ default: puts ("hppa2.0"); break;
+ } break;
+ #else /* !defined(_SC_KERNEL_BITS) */
+ puts ("hppa2.0"); break;
+ #endif
+ default: puts ("hppa1.0"); break;
+ }
+ exit (0);
+ }
+EOF
+ (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
+ test -z "$HP_ARCH" && HP_ARCH=hppa
+ fi ;;
+ esac
+ if [ ${HP_ARCH} = "hppa2.0w" ]
+ then
+ eval $set_cc_for_build
+
+ # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
+ # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
+ # generating 64-bit code. GNU and HP use different nomenclature:
+ #
+ # $ CC_FOR_BUILD=cc ./config.guess
+ # => hppa2.0w-hp-hpux11.23
+ # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
+ # => hppa64-hp-hpux11.23
+
+ if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
+ grep -q __LP64__
+ then
+ HP_ARCH="hppa2.0w"
+ else
+ HP_ARCH="hppa64"
+ fi
+ fi
+ echo ${HP_ARCH}-hp-hpux${HPUX_REV}
+ exit ;;
+ ia64:HP-UX:*:*)
+ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+ echo ia64-hp-hpux${HPUX_REV}
+ exit ;;
+ 3050*:HI-UX:*:*)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #include
+ int
+ main ()
+ {
+ long cpu = sysconf (_SC_CPU_VERSION);
+ /* The order matters, because CPU_IS_HP_MC68K erroneously returns
+ true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
+ results, however. */
+ if (CPU_IS_PA_RISC (cpu))
+ {
+ switch (cpu)
+ {
+ case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
+ case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
+ case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
+ default: puts ("hppa-hitachi-hiuxwe2"); break;
+ }
+ }
+ else if (CPU_IS_HP_MC68K (cpu))
+ puts ("m68k-hitachi-hiuxwe2");
+ else puts ("unknown-hitachi-hiuxwe2");
+ exit (0);
+ }
+EOF
+ $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
+ { echo "$SYSTEM_NAME"; exit; }
+ echo unknown-hitachi-hiuxwe2
+ exit ;;
+ 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
+ echo hppa1.1-hp-bsd
+ exit ;;
+ 9000/8??:4.3bsd:*:*)
+ echo hppa1.0-hp-bsd
+ exit ;;
+ *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
+ echo hppa1.0-hp-mpeix
+ exit ;;
+ hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
+ echo hppa1.1-hp-osf
+ exit ;;
+ hp8??:OSF1:*:*)
+ echo hppa1.0-hp-osf
+ exit ;;
+ i*86:OSF1:*:*)
+ if [ -x /usr/sbin/sysversion ] ; then
+ echo ${UNAME_MACHINE}-unknown-osf1mk
+ else
+ echo ${UNAME_MACHINE}-unknown-osf1
+ fi
+ exit ;;
+ parisc*:Lites*:*:*)
+ echo hppa1.1-hp-lites
+ exit ;;
+ C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
+ echo c1-convex-bsd
+ exit ;;
+ C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
+ if getsysinfo -f scalar_acc
+ then echo c32-convex-bsd
+ else echo c2-convex-bsd
+ fi
+ exit ;;
+ C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
+ echo c34-convex-bsd
+ exit ;;
+ C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
+ echo c38-convex-bsd
+ exit ;;
+ C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
+ echo c4-convex-bsd
+ exit ;;
+ CRAY*Y-MP:*:*:*)
+ echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*[A-Z]90:*:*:*)
+ echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
+ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
+ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
+ -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*TS:*:*:*)
+ echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*T3E:*:*:*)
+ echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*SV1:*:*:*)
+ echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ *:UNICOS/mp:*:*)
+ echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
+ FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+ FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
+ echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+ exit ;;
+ 5000:UNIX_System_V:4.*:*)
+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+ FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
+ echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+ exit ;;
+ i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
+ echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
+ exit ;;
+ sparc*:BSD/OS:*:*)
+ echo sparc-unknown-bsdi${UNAME_RELEASE}
+ exit ;;
+ *:BSD/OS:*:*)
+ echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
+ exit ;;
+ *:FreeBSD:*:*)
+ UNAME_PROCESSOR=`/usr/bin/uname -p`
+ case ${UNAME_PROCESSOR} in
+ amd64)
+ echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ *)
+ echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ esac
+ exit ;;
+ i*:CYGWIN*:*)
+ echo ${UNAME_MACHINE}-pc-cygwin
+ exit ;;
+ *:MINGW64*:*)
+ echo ${UNAME_MACHINE}-pc-mingw64
+ exit ;;
+ *:MINGW*:*)
+ echo ${UNAME_MACHINE}-pc-mingw32
+ exit ;;
+ *:MSYS*:*)
+ echo ${UNAME_MACHINE}-pc-msys
+ exit ;;
+ i*:windows32*:*)
+ # uname -m includes "-pc" on this system.
+ echo ${UNAME_MACHINE}-mingw32
+ exit ;;
+ i*:PW*:*)
+ echo ${UNAME_MACHINE}-pc-pw32
+ exit ;;
+ *:Interix*:*)
+ case ${UNAME_MACHINE} in
+ x86)
+ echo i586-pc-interix${UNAME_RELEASE}
+ exit ;;
+ authenticamd | genuineintel | EM64T)
+ echo x86_64-unknown-interix${UNAME_RELEASE}
+ exit ;;
+ IA64)
+ echo ia64-unknown-interix${UNAME_RELEASE}
+ exit ;;
+ esac ;;
+ [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
+ echo i${UNAME_MACHINE}-pc-mks
+ exit ;;
+ 8664:Windows_NT:*)
+ echo x86_64-pc-mks
+ exit ;;
+ i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
+ # How do we know it's Interix rather than the generic POSIX subsystem?
+ # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
+ # UNAME_MACHINE based on the output of uname instead of i386?
+ echo i586-pc-interix
+ exit ;;
+ i*:UWIN*:*)
+ echo ${UNAME_MACHINE}-pc-uwin
+ exit ;;
+ amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
+ echo x86_64-unknown-cygwin
+ exit ;;
+ p*:CYGWIN*:*)
+ echo powerpcle-unknown-cygwin
+ exit ;;
+ prep*:SunOS:5.*:*)
+ echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ *:GNU:*:*)
+ # the GNU system
+ echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+ exit ;;
+ *:GNU/*:*:*)
+ # other systems with GNU libc and userland
+ echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
+ exit ;;
+ i*86:Minix:*:*)
+ echo ${UNAME_MACHINE}-pc-minix
+ exit ;;
+ aarch64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ aarch64_be:Linux:*:*)
+ UNAME_MACHINE=aarch64_be
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ alpha:Linux:*:*)
+ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+ EV5) UNAME_MACHINE=alphaev5 ;;
+ EV56) UNAME_MACHINE=alphaev56 ;;
+ PCA56) UNAME_MACHINE=alphapca56 ;;
+ PCA57) UNAME_MACHINE=alphapca56 ;;
+ EV6) UNAME_MACHINE=alphaev6 ;;
+ EV67) UNAME_MACHINE=alphaev67 ;;
+ EV68*) UNAME_MACHINE=alphaev68 ;;
+ esac
+ objdump --private-headers /bin/sh | grep -q ld.so.1
+ if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ arc:Linux:*:* | arceb:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ arm*:Linux:*:*)
+ eval $set_cc_for_build
+ if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ARM_EABI__
+ then
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ else
+ if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ARM_PCS_VFP
+ then
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
+ else
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
+ fi
+ fi
+ exit ;;
+ avr32*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ cris:Linux:*:*)
+ echo ${UNAME_MACHINE}-axis-linux-${LIBC}
+ exit ;;
+ crisv32:Linux:*:*)
+ echo ${UNAME_MACHINE}-axis-linux-${LIBC}
+ exit ;;
+ e2k:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ frv:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ hexagon:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ i*86:Linux:*:*)
+ echo ${UNAME_MACHINE}-pc-linux-${LIBC}
+ exit ;;
+ ia64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ m32r*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ m68*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ mips:Linux:*:* | mips64:Linux:*:*)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #undef CPU
+ #undef ${UNAME_MACHINE}
+ #undef ${UNAME_MACHINE}el
+ #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+ CPU=${UNAME_MACHINE}el
+ #else
+ #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+ CPU=${UNAME_MACHINE}
+ #else
+ CPU=
+ #endif
+ #endif
+EOF
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
+ ;;
+ openrisc*:Linux:*:*)
+ echo or1k-unknown-linux-${LIBC}
+ exit ;;
+ or32:Linux:*:* | or1k*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ padre:Linux:*:*)
+ echo sparc-unknown-linux-${LIBC}
+ exit ;;
+ parisc64:Linux:*:* | hppa64:Linux:*:*)
+ echo hppa64-unknown-linux-${LIBC}
+ exit ;;
+ parisc:Linux:*:* | hppa:Linux:*:*)
+ # Look for CPU level
+ case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
+ PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
+ PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
+ *) echo hppa-unknown-linux-${LIBC} ;;
+ esac
+ exit ;;
+ ppc64:Linux:*:*)
+ echo powerpc64-unknown-linux-${LIBC}
+ exit ;;
+ ppc:Linux:*:*)
+ echo powerpc-unknown-linux-${LIBC}
+ exit ;;
+ ppc64le:Linux:*:*)
+ echo powerpc64le-unknown-linux-${LIBC}
+ exit ;;
+ ppcle:Linux:*:*)
+ echo powerpcle-unknown-linux-${LIBC}
+ exit ;;
+ s390:Linux:*:* | s390x:Linux:*:*)
+ echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
+ exit ;;
+ sh64*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ sh*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ sparc:Linux:*:* | sparc64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ tile*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ vax:Linux:*:*)
+ echo ${UNAME_MACHINE}-dec-linux-${LIBC}
+ exit ;;
+ x86_64:Linux:*:*)
+ echo ${UNAME_MACHINE}-pc-linux-${LIBC}
+ exit ;;
+ xtensa*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ i*86:DYNIX/ptx:4*:*)
+ # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
+ # earlier versions are messed up and put the nodename in both
+ # sysname and nodename.
+ echo i386-sequent-sysv4
+ exit ;;
+ i*86:UNIX_SV:4.2MP:2.*)
+ # Unixware is an offshoot of SVR4, but it has its own version
+ # number series starting with 2...
+ # I am not positive that other SVR4 systems won't match this,
+ # I just have to hope. -- rms.
+ # Use sysv4.2uw... so that sysv4* matches it.
+ echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
+ exit ;;
+ i*86:OS/2:*:*)
+ # If we were able to find `uname', then EMX Unix compatibility
+ # is probably installed.
+ echo ${UNAME_MACHINE}-pc-os2-emx
+ exit ;;
+ i*86:XTS-300:*:STOP)
+ echo ${UNAME_MACHINE}-unknown-stop
+ exit ;;
+ i*86:atheos:*:*)
+ echo ${UNAME_MACHINE}-unknown-atheos
+ exit ;;
+ i*86:syllable:*:*)
+ echo ${UNAME_MACHINE}-pc-syllable
+ exit ;;
+ i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
+ echo i386-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ i*86:*DOS:*:*)
+ echo ${UNAME_MACHINE}-pc-msdosdjgpp
+ exit ;;
+ i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
+ UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
+ if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
+ echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
+ else
+ echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
+ fi
+ exit ;;
+ i*86:*:5:[678]*)
+ # UnixWare 7.x, OpenUNIX and OpenServer 6.
+ case `/bin/uname -X | grep "^Machine"` in
+ *486*) UNAME_MACHINE=i486 ;;
+ *Pentium) UNAME_MACHINE=i586 ;;
+ *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
+ esac
+ echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
+ exit ;;
+ i*86:*:3.2:*)
+ if test -f /usr/options/cb.name; then
+ UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then
+ UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
+ (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
+ (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
+ && UNAME_MACHINE=i586
+ (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
+ && UNAME_MACHINE=i686
+ (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
+ && UNAME_MACHINE=i686
+ echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
+ else
+ echo ${UNAME_MACHINE}-pc-sysv32
+ fi
+ exit ;;
+ pc:*:*:*)
+ # Left here for compatibility:
+ # uname -m prints for DJGPP always 'pc', but it prints nothing about
+ # the processor, so we play safe by assuming i586.
+ # Note: whatever this is, it MUST be the same as what config.sub
+ # prints for the "djgpp" host, or else GDB configury will decide that
+ # this is a cross-build.
+ echo i586-pc-msdosdjgpp
+ exit ;;
+ Intel:Mach:3*:*)
+ echo i386-pc-mach3
+ exit ;;
+ paragon:*:*:*)
+ echo i860-intel-osf1
+ exit ;;
+ i860:*:4.*:*) # i860-SVR4
+ if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
+ echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
+ else # Add other i860-SVR4 vendors below as they are discovered.
+ echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
+ fi
+ exit ;;
+ mini*:CTIX:SYS*5:*)
+ # "miniframe"
+ echo m68010-convergent-sysv
+ exit ;;
+ mc68k:UNIX:SYSTEM5:3.51m)
+ echo m68k-convergent-sysv
+ exit ;;
+ M680?0:D-NIX:5.3:*)
+ echo m68k-diab-dnix
+ exit ;;
+ M68*:*:R3V[5678]*:*)
+ test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
+ 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
+ OS_REL=''
+ test -r /etc/.relid \
+ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+ 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4; exit; } ;;
+ NCR*:*:4.2:* | MPRAS*:*:4.2:*)
+ OS_REL='.3'
+ test -r /etc/.relid \
+ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
+ /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+ m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
+ echo m68k-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ mc68030:UNIX_System_V:4.*:*)
+ echo m68k-atari-sysv4
+ exit ;;
+ TSUNAMI:LynxOS:2.*:*)
+ echo sparc-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ rs6000:LynxOS:2.*:*)
+ echo rs6000-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
+ echo powerpc-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ SM[BE]S:UNIX_SV:*:*)
+ echo mips-dde-sysv${UNAME_RELEASE}
+ exit ;;
+ RM*:ReliantUNIX-*:*:*)
+ echo mips-sni-sysv4
+ exit ;;
+ RM*:SINIX-*:*:*)
+ echo mips-sni-sysv4
+ exit ;;
+ *:SINIX-*:*:*)
+ if uname -p 2>/dev/null >/dev/null ; then
+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
+ echo ${UNAME_MACHINE}-sni-sysv4
+ else
+ echo ns32k-sni-sysv
+ fi
+ exit ;;
+ PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+ # says
+ echo i586-unisys-sysv4
+ exit ;;
+ *:UNIX_System_V:4*:FTX*)
+ # From Gerald Hewes .
+ # How about differentiating between stratus architectures? -djm
+ echo hppa1.1-stratus-sysv4
+ exit ;;
+ *:*:*:FTX*)
+ # From seanf@swdc.stratus.com.
+ echo i860-stratus-sysv4
+ exit ;;
+ i*86:VOS:*:*)
+ # From Paul.Green@stratus.com.
+ echo ${UNAME_MACHINE}-stratus-vos
+ exit ;;
+ *:VOS:*:*)
+ # From Paul.Green@stratus.com.
+ echo hppa1.1-stratus-vos
+ exit ;;
+ mc68*:A/UX:*:*)
+ echo m68k-apple-aux${UNAME_RELEASE}
+ exit ;;
+ news*:NEWS-OS:6*:*)
+ echo mips-sony-newsos6
+ exit ;;
+ R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
+ if [ -d /usr/nec ]; then
+ echo mips-nec-sysv${UNAME_RELEASE}
+ else
+ echo mips-unknown-sysv${UNAME_RELEASE}
+ fi
+ exit ;;
+ BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
+ echo powerpc-be-beos
+ exit ;;
+ BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
+ echo powerpc-apple-beos
+ exit ;;
+ BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
+ echo i586-pc-beos
+ exit ;;
+ BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
+ echo i586-pc-haiku
+ exit ;;
+ x86_64:Haiku:*:*)
+ echo x86_64-unknown-haiku
+ exit ;;
+ SX-4:SUPER-UX:*:*)
+ echo sx4-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-5:SUPER-UX:*:*)
+ echo sx5-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-6:SUPER-UX:*:*)
+ echo sx6-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-7:SUPER-UX:*:*)
+ echo sx7-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-8:SUPER-UX:*:*)
+ echo sx8-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-8R:SUPER-UX:*:*)
+ echo sx8r-nec-superux${UNAME_RELEASE}
+ exit ;;
+ Power*:Rhapsody:*:*)
+ echo powerpc-apple-rhapsody${UNAME_RELEASE}
+ exit ;;
+ *:Rhapsody:*:*)
+ echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
+ exit ;;
+ *:Darwin:*:*)
+ UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
+ eval $set_cc_for_build
+ if test "$UNAME_PROCESSOR" = unknown ; then
+ UNAME_PROCESSOR=powerpc
+ fi
+ if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
+ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+ if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
+ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_64BIT_ARCH >/dev/null
+ then
+ case $UNAME_PROCESSOR in
+ i386) UNAME_PROCESSOR=x86_64 ;;
+ powerpc) UNAME_PROCESSOR=powerpc64 ;;
+ esac
+ fi
+ fi
+ elif test "$UNAME_PROCESSOR" = i386 ; then
+ # Avoid executing cc on OS X 10.9, as it ships with a stub
+ # that puts up a graphical alert prompting to install
+ # developer tools. Any system running Mac OS X 10.7 or
+ # later (Darwin 11 and later) is required to have a 64-bit
+ # processor. This is not true of the ARM version of Darwin
+ # that Apple uses in portable devices.
+ UNAME_PROCESSOR=x86_64
+ fi
+ echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
+ exit ;;
+ *:procnto*:*:* | *:QNX:[0123456789]*:*)
+ UNAME_PROCESSOR=`uname -p`
+ if test "$UNAME_PROCESSOR" = "x86"; then
+ UNAME_PROCESSOR=i386
+ UNAME_MACHINE=pc
+ fi
+ echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
+ exit ;;
+ *:QNX:*:4*)
+ echo i386-pc-qnx
+ exit ;;
+ NEO-?:NONSTOP_KERNEL:*:*)
+ echo neo-tandem-nsk${UNAME_RELEASE}
+ exit ;;
+ NSE-*:NONSTOP_KERNEL:*:*)
+ echo nse-tandem-nsk${UNAME_RELEASE}
+ exit ;;
+ NSR-?:NONSTOP_KERNEL:*:*)
+ echo nsr-tandem-nsk${UNAME_RELEASE}
+ exit ;;
+ *:NonStop-UX:*:*)
+ echo mips-compaq-nonstopux
+ exit ;;
+ BS2000:POSIX*:*:*)
+ echo bs2000-siemens-sysv
+ exit ;;
+ DS/*:UNIX_System_V:*:*)
+ echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
+ exit ;;
+ *:Plan9:*:*)
+ # "uname -m" is not consistent, so use $cputype instead. 386
+ # is converted to i386 for consistency with other x86
+ # operating systems.
+ if test "$cputype" = "386"; then
+ UNAME_MACHINE=i386
+ else
+ UNAME_MACHINE="$cputype"
+ fi
+ echo ${UNAME_MACHINE}-unknown-plan9
+ exit ;;
+ *:TOPS-10:*:*)
+ echo pdp10-unknown-tops10
+ exit ;;
+ *:TENEX:*:*)
+ echo pdp10-unknown-tenex
+ exit ;;
+ KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
+ echo pdp10-dec-tops20
+ exit ;;
+ XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
+ echo pdp10-xkl-tops20
+ exit ;;
+ *:TOPS-20:*:*)
+ echo pdp10-unknown-tops20
+ exit ;;
+ *:ITS:*:*)
+ echo pdp10-unknown-its
+ exit ;;
+ SEI:*:*:SEIUX)
+ echo mips-sei-seiux${UNAME_RELEASE}
+ exit ;;
+ *:DragonFly:*:*)
+ echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+ exit ;;
+ *:*VMS:*:*)
+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
+ case "${UNAME_MACHINE}" in
+ A*) echo alpha-dec-vms ; exit ;;
+ I*) echo ia64-dec-vms ; exit ;;
+ V*) echo vax-dec-vms ; exit ;;
+ esac ;;
+ *:XENIX:*:SysV)
+ echo i386-pc-xenix
+ exit ;;
+ i*86:skyos:*:*)
+ echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
+ exit ;;
+ i*86:rdos:*:*)
+ echo ${UNAME_MACHINE}-pc-rdos
+ exit ;;
+ i*86:AROS:*:*)
+ echo ${UNAME_MACHINE}-pc-aros
+ exit ;;
+ x86_64:VMkernel:*:*)
+ echo ${UNAME_MACHINE}-unknown-esx
+ exit ;;
+esac
+
+cat >&2 < in order to provide the needed
+information to handle your system.
+
+config.guess timestamp = $timestamp
+
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null`
+
+hostinfo = `(hostinfo) 2>/dev/null`
+/bin/universe = `(/bin/universe) 2>/dev/null`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null`
+/bin/arch = `(/bin/arch) 2>/dev/null`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
+
+UNAME_MACHINE = ${UNAME_MACHINE}
+UNAME_RELEASE = ${UNAME_RELEASE}
+UNAME_SYSTEM = ${UNAME_SYSTEM}
+UNAME_VERSION = ${UNAME_VERSION}
+EOF
+
+exit 1
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/external/bdwgc/libatomic_ops/config.sub b/external/bdwgc/libatomic_ops/config.sub
new file mode 100755
index 0000000000..1acc966a33
--- /dev/null
+++ b/external/bdwgc/libatomic_ops/config.sub
@@ -0,0 +1,1813 @@
+#! /bin/sh
+# Configuration validation subroutine script.
+# Copyright 1992-2015 Free Software Foundation, Inc.
+
+timestamp='2015-08-20'
+
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, see .
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that
+# program. This Exception is an additional permission under section 7
+# of the GNU General Public License, version 3 ("GPLv3").
+
+
+# Please send patches to .
+#
+# Configuration subroutine to validate and canonicalize a configuration type.
+# Supply the specified configuration type as an argument.
+# If it is invalid, we print an error message on stderr and exit with code 1.
+# Otherwise, we print the canonical config type on stdout and succeed.
+
+# You can get the latest version of this script from:
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+
+# This file is supposed to be the same for all GNU packages
+# and recognize all the CPU types, system types and aliases
+# that are meaningful with *any* GNU software.
+# Each package is responsible for reporting which valid configurations
+# it does not support. The user should be able to distinguish
+# a failure to support a valid configuration from a meaningless
+# configuration.
+
+# The goal of this file is to map all the various variations of a given
+# machine specification into a single specification in the form:
+# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or in some cases, the newer four-part form:
+# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+# It is wrong to echo any other type of specification.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION] CPU-MFR-OPSYS
+ $0 [OPTION] ALIAS
+
+Canonicalize a configuration name.
+
+Operation modes:
+ -h, --help print this help, then exit
+ -t, --time-stamp print date of last modification, then exit
+ -v, --version print version number, then exit
+
+Report bugs and patches to ."
+
+version="\
+GNU config.sub ($timestamp)
+
+Copyright 1992-2015 Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+ case $1 in
+ --time-stamp | --time* | -t )
+ echo "$timestamp" ; exit ;;
+ --version | -v )
+ echo "$version" ; exit ;;
+ --help | --h* | -h )
+ echo "$usage"; exit ;;
+ -- ) # Stop option processing
+ shift; break ;;
+ - ) # Use stdin as input.
+ break ;;
+ -* )
+ echo "$me: invalid option $1$help"
+ exit 1 ;;
+
+ *local*)
+ # First pass through any local machine types.
+ echo $1
+ exit ;;
+
+ * )
+ break ;;
+ esac
+done
+
+case $# in
+ 0) echo "$me: missing argument$help" >&2
+ exit 1;;
+ 1) ;;
+ *) echo "$me: too many arguments$help" >&2
+ exit 1;;
+esac
+
+# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
+# Here we must recognize all the valid KERNEL-OS combinations.
+maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
+case $maybe_os in
+ nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
+ linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
+ knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \
+ kopensolaris*-gnu* | \
+ storm-chaos* | os2-emx* | rtmk-nova*)
+ os=-$maybe_os
+ basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
+ ;;
+ android-linux)
+ os=-linux-android
+ basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
+ ;;
+ *)
+ basic_machine=`echo $1 | sed 's/-[^-]*$//'`
+ if [ $basic_machine != $1 ]
+ then os=`echo $1 | sed 's/.*-/-/'`
+ else os=; fi
+ ;;
+esac
+
+### Let's recognize common machines as not being operating systems so
+### that things like config.sub decstation-3100 work. We also
+### recognize some manufacturers as not being operating systems, so we
+### can provide default operating systems below.
+case $os in
+ -sun*os*)
+ # Prevent following clause from handling this invalid input.
+ ;;
+ -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
+ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
+ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
+ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
+ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
+ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
+ -apple | -axis | -knuth | -cray | -microblaze*)
+ os=
+ basic_machine=$1
+ ;;
+ -bluegene*)
+ os=-cnk
+ ;;
+ -sim | -cisco | -oki | -wec | -winbond)
+ os=
+ basic_machine=$1
+ ;;
+ -scout)
+ ;;
+ -wrs)
+ os=-vxworks
+ basic_machine=$1
+ ;;
+ -chorusos*)
+ os=-chorusos
+ basic_machine=$1
+ ;;
+ -chorusrdb)
+ os=-chorusrdb
+ basic_machine=$1
+ ;;
+ -hiux*)
+ os=-hiuxwe2
+ ;;
+ -sco6)
+ os=-sco5v6
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco5)
+ os=-sco3.2v5
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco4)
+ os=-sco3.2v4
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco3.2.[4-9]*)
+ os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco3.2v[4-9]*)
+ # Don't forget version if it is 3.2v4 or newer.
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco5v6*)
+ # Don't forget version if it is 3.2v4 or newer.
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco*)
+ os=-sco3.2v2
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -udk*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -isc)
+ os=-isc2.2
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -clix*)
+ basic_machine=clipper-intergraph
+ ;;
+ -isc*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -lynx*178)
+ os=-lynxos178
+ ;;
+ -lynx*5)
+ os=-lynxos5
+ ;;
+ -lynx*)
+ os=-lynxos
+ ;;
+ -ptx*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
+ ;;
+ -windowsnt*)
+ os=`echo $os | sed -e 's/windowsnt/winnt/'`
+ ;;
+ -psos*)
+ os=-psos
+ ;;
+ -mint | -mint[0-9]*)
+ basic_machine=m68k-atari
+ os=-mint
+ ;;
+esac
+
+# Decode aliases for certain CPU-COMPANY combinations.
+case $basic_machine in
+ # Recognize the basic CPU types without company name.
+ # Some are omitted here because they have special meanings below.
+ 1750a | 580 \
+ | a29k \
+ | aarch64 | aarch64_be \
+ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
+ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
+ | am33_2.0 \
+ | arc | arceb \
+ | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
+ | avr | avr32 \
+ | ba \
+ | be32 | be64 \
+ | bfin \
+ | c4x | c8051 | clipper \
+ | d10v | d30v | dlx | dsp16xx \
+ | e2k | epiphany \
+ | fido | fr30 | frv | ft32 \
+ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+ | hexagon \
+ | i370 | i860 | i960 | ia64 \
+ | ip2k | iq2000 \
+ | k1om \
+ | le32 | le64 \
+ | lm32 \
+ | m32c | m32r | m32rle | m68000 | m68k | m88k \
+ | maxq | mb | microblaze | microblazeel | mcore | mep | metag \
+ | mips | mipsbe | mipseb | mipsel | mipsle \
+ | mips16 \
+ | mips64 | mips64el \
+ | mips64octeon | mips64octeonel \
+ | mips64orion | mips64orionel \
+ | mips64r5900 | mips64r5900el \
+ | mips64vr | mips64vrel \
+ | mips64vr4100 | mips64vr4100el \
+ | mips64vr4300 | mips64vr4300el \
+ | mips64vr5000 | mips64vr5000el \
+ | mips64vr5900 | mips64vr5900el \
+ | mipsisa32 | mipsisa32el \
+ | mipsisa32r2 | mipsisa32r2el \
+ | mipsisa32r6 | mipsisa32r6el \
+ | mipsisa64 | mipsisa64el \
+ | mipsisa64r2 | mipsisa64r2el \
+ | mipsisa64r6 | mipsisa64r6el \
+ | mipsisa64sb1 | mipsisa64sb1el \
+ | mipsisa64sr71k | mipsisa64sr71kel \
+ | mipsr5900 | mipsr5900el \
+ | mipstx39 | mipstx39el \
+ | mn10200 | mn10300 \
+ | moxie \
+ | mt \
+ | msp430 \
+ | nds32 | nds32le | nds32be \
+ | nios | nios2 | nios2eb | nios2el \
+ | ns16k | ns32k \
+ | open8 | or1k | or1knd | or32 \
+ | pdp10 | pdp11 | pj | pjl \
+ | powerpc | powerpc64 | powerpc64le | powerpcle \
+ | pyramid \
+ | riscv32 | riscv64 \
+ | rl78 | rx \
+ | score \
+ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
+ | sh64 | sh64le \
+ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
+ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
+ | spu \
+ | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
+ | ubicom32 \
+ | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
+ | visium \
+ | we32k \
+ | x86 | xc16x | xstormy16 | xtensa \
+ | z8k | z80)
+ basic_machine=$basic_machine-unknown
+ ;;
+ c54x)
+ basic_machine=tic54x-unknown
+ ;;
+ c55x)
+ basic_machine=tic55x-unknown
+ ;;
+ c6x)
+ basic_machine=tic6x-unknown
+ ;;
+ leon|leon[3-9])
+ basic_machine=sparc-$basic_machine
+ ;;
+ m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
+ basic_machine=$basic_machine-unknown
+ os=-none
+ ;;
+ m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
+ ;;
+ ms1)
+ basic_machine=mt-unknown
+ ;;
+
+ strongarm | thumb | xscale)
+ basic_machine=arm-unknown
+ ;;
+ xgate)
+ basic_machine=$basic_machine-unknown
+ os=-none
+ ;;
+ xscaleeb)
+ basic_machine=armeb-unknown
+ ;;
+
+ xscaleel)
+ basic_machine=armel-unknown
+ ;;
+
+ # We use `pc' rather than `unknown'
+ # because (1) that's what they normally are, and
+ # (2) the word "unknown" tends to confuse beginning users.
+ i*86 | x86_64)
+ basic_machine=$basic_machine-pc
+ ;;
+ # Object if more than one company name word.
+ *-*-*)
+ echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+ exit 1
+ ;;
+ # Recognize the basic CPU types with company name.
+ 580-* \
+ | a29k-* \
+ | aarch64-* | aarch64_be-* \
+ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
+ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
+ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
+ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
+ | avr-* | avr32-* \
+ | ba-* \
+ | be32-* | be64-* \
+ | bfin-* | bs2000-* \
+ | c[123]* | c30-* | [cjt]90-* | c4x-* \
+ | c8051-* | clipper-* | craynv-* | cydra-* \
+ | d10v-* | d30v-* | dlx-* \
+ | e2k-* | elxsi-* \
+ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
+ | h8300-* | h8500-* \
+ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
+ | hexagon-* \
+ | i*86-* | i860-* | i960-* | ia64-* \
+ | ip2k-* | iq2000-* \
+ | k1om-* \
+ | le32-* | le64-* \
+ | lm32-* \
+ | m32c-* | m32r-* | m32rle-* \
+ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
+ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
+ | microblaze-* | microblazeel-* \
+ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
+ | mips16-* \
+ | mips64-* | mips64el-* \
+ | mips64octeon-* | mips64octeonel-* \
+ | mips64orion-* | mips64orionel-* \
+ | mips64r5900-* | mips64r5900el-* \
+ | mips64vr-* | mips64vrel-* \
+ | mips64vr4100-* | mips64vr4100el-* \
+ | mips64vr4300-* | mips64vr4300el-* \
+ | mips64vr5000-* | mips64vr5000el-* \
+ | mips64vr5900-* | mips64vr5900el-* \
+ | mipsisa32-* | mipsisa32el-* \
+ | mipsisa32r2-* | mipsisa32r2el-* \
+ | mipsisa32r6-* | mipsisa32r6el-* \
+ | mipsisa64-* | mipsisa64el-* \
+ | mipsisa64r2-* | mipsisa64r2el-* \
+ | mipsisa64r6-* | mipsisa64r6el-* \
+ | mipsisa64sb1-* | mipsisa64sb1el-* \
+ | mipsisa64sr71k-* | mipsisa64sr71kel-* \
+ | mipsr5900-* | mipsr5900el-* \
+ | mipstx39-* | mipstx39el-* \
+ | mmix-* \
+ | mt-* \
+ | msp430-* \
+ | nds32-* | nds32le-* | nds32be-* \
+ | nios-* | nios2-* | nios2eb-* | nios2el-* \
+ | none-* | np1-* | ns16k-* | ns32k-* \
+ | open8-* \
+ | or1k*-* \
+ | orion-* \
+ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
+ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
+ | pyramid-* \
+ | riscv32-* | riscv64-* \
+ | rl78-* | romp-* | rs6000-* | rx-* \
+ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
+ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
+ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
+ | sparclite-* \
+ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \
+ | tahoe-* \
+ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
+ | tile*-* \
+ | tron-* \
+ | ubicom32-* \
+ | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
+ | vax-* \
+ | visium-* \
+ | we32k-* \
+ | x86-* | x86_64-* | xc16x-* | xps100-* \
+ | xstormy16-* | xtensa*-* \
+ | ymp-* \
+ | z8k-* | z80-*)
+ ;;
+ # Recognize the basic CPU types without company name, with glob match.
+ xtensa*)
+ basic_machine=$basic_machine-unknown
+ ;;
+ # Recognize the various machine names and aliases which stand
+ # for a CPU type and a company and sometimes even an OS.
+ 386bsd)
+ basic_machine=i386-unknown
+ os=-bsd
+ ;;
+ 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
+ basic_machine=m68000-att
+ ;;
+ 3b*)
+ basic_machine=we32k-att
+ ;;
+ a29khif)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ abacus)
+ basic_machine=abacus-unknown
+ ;;
+ adobe68k)
+ basic_machine=m68010-adobe
+ os=-scout
+ ;;
+ alliant | fx80)
+ basic_machine=fx80-alliant
+ ;;
+ altos | altos3068)
+ basic_machine=m68k-altos
+ ;;
+ am29k)
+ basic_machine=a29k-none
+ os=-bsd
+ ;;
+ amd64)
+ basic_machine=x86_64-pc
+ ;;
+ amd64-*)
+ basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ amdahl)
+ basic_machine=580-amdahl
+ os=-sysv
+ ;;
+ amiga | amiga-*)
+ basic_machine=m68k-unknown
+ ;;
+ amigaos | amigados)
+ basic_machine=m68k-unknown
+ os=-amigaos
+ ;;
+ amigaunix | amix)
+ basic_machine=m68k-unknown
+ os=-sysv4
+ ;;
+ apollo68)
+ basic_machine=m68k-apollo
+ os=-sysv
+ ;;
+ apollo68bsd)
+ basic_machine=m68k-apollo
+ os=-bsd
+ ;;
+ aros)
+ basic_machine=i386-pc
+ os=-aros
+ ;;
+ asmjs)
+ basic_machine=asmjs-unknown
+ ;;
+ aux)
+ basic_machine=m68k-apple
+ os=-aux
+ ;;
+ balance)
+ basic_machine=ns32k-sequent
+ os=-dynix
+ ;;
+ blackfin)
+ basic_machine=bfin-unknown
+ os=-linux
+ ;;
+ blackfin-*)
+ basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
+ os=-linux
+ ;;
+ bluegene*)
+ basic_machine=powerpc-ibm
+ os=-cnk
+ ;;
+ c54x-*)
+ basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ c55x-*)
+ basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ c6x-*)
+ basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ c90)
+ basic_machine=c90-cray
+ os=-unicos
+ ;;
+ cegcc)
+ basic_machine=arm-unknown
+ os=-cegcc
+ ;;
+ convex-c1)
+ basic_machine=c1-convex
+ os=-bsd
+ ;;
+ convex-c2)
+ basic_machine=c2-convex
+ os=-bsd
+ ;;
+ convex-c32)
+ basic_machine=c32-convex
+ os=-bsd
+ ;;
+ convex-c34)
+ basic_machine=c34-convex
+ os=-bsd
+ ;;
+ convex-c38)
+ basic_machine=c38-convex
+ os=-bsd
+ ;;
+ cray | j90)
+ basic_machine=j90-cray
+ os=-unicos
+ ;;
+ craynv)
+ basic_machine=craynv-cray
+ os=-unicosmp
+ ;;
+ cr16 | cr16-*)
+ basic_machine=cr16-unknown
+ os=-elf
+ ;;
+ crds | unos)
+ basic_machine=m68k-crds
+ ;;
+ crisv32 | crisv32-* | etraxfs*)
+ basic_machine=crisv32-axis
+ ;;
+ cris | cris-* | etrax*)
+ basic_machine=cris-axis
+ ;;
+ crx)
+ basic_machine=crx-unknown
+ os=-elf
+ ;;
+ da30 | da30-*)
+ basic_machine=m68k-da30
+ ;;
+ decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
+ basic_machine=mips-dec
+ ;;
+ decsystem10* | dec10*)
+ basic_machine=pdp10-dec
+ os=-tops10
+ ;;
+ decsystem20* | dec20*)
+ basic_machine=pdp10-dec
+ os=-tops20
+ ;;
+ delta | 3300 | motorola-3300 | motorola-delta \
+ | 3300-motorola | delta-motorola)
+ basic_machine=m68k-motorola
+ ;;
+ delta88)
+ basic_machine=m88k-motorola
+ os=-sysv3
+ ;;
+ dicos)
+ basic_machine=i686-pc
+ os=-dicos
+ ;;
+ djgpp)
+ basic_machine=i586-pc
+ os=-msdosdjgpp
+ ;;
+ dpx20 | dpx20-*)
+ basic_machine=rs6000-bull
+ os=-bosx
+ ;;
+ dpx2* | dpx2*-bull)
+ basic_machine=m68k-bull
+ os=-sysv3
+ ;;
+ ebmon29k)
+ basic_machine=a29k-amd
+ os=-ebmon
+ ;;
+ elxsi)
+ basic_machine=elxsi-elxsi
+ os=-bsd
+ ;;
+ encore | umax | mmax)
+ basic_machine=ns32k-encore
+ ;;
+ es1800 | OSE68k | ose68k | ose | OSE)
+ basic_machine=m68k-ericsson
+ os=-ose
+ ;;
+ fx2800)
+ basic_machine=i860-alliant
+ ;;
+ genix)
+ basic_machine=ns32k-ns
+ ;;
+ gmicro)
+ basic_machine=tron-gmicro
+ os=-sysv
+ ;;
+ go32)
+ basic_machine=i386-pc
+ os=-go32
+ ;;
+ h3050r* | hiux*)
+ basic_machine=hppa1.1-hitachi
+ os=-hiuxwe2
+ ;;
+ h8300hms)
+ basic_machine=h8300-hitachi
+ os=-hms
+ ;;
+ h8300xray)
+ basic_machine=h8300-hitachi
+ os=-xray
+ ;;
+ h8500hms)
+ basic_machine=h8500-hitachi
+ os=-hms
+ ;;
+ harris)
+ basic_machine=m88k-harris
+ os=-sysv3
+ ;;
+ hp300-*)
+ basic_machine=m68k-hp
+ ;;
+ hp300bsd)
+ basic_machine=m68k-hp
+ os=-bsd
+ ;;
+ hp300hpux)
+ basic_machine=m68k-hp
+ os=-hpux
+ ;;
+ hp3k9[0-9][0-9] | hp9[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hp9k2[0-9][0-9] | hp9k31[0-9])
+ basic_machine=m68000-hp
+ ;;
+ hp9k3[2-9][0-9])
+ basic_machine=m68k-hp
+ ;;
+ hp9k6[0-9][0-9] | hp6[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hp9k7[0-79][0-9] | hp7[0-79][0-9])
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k78[0-9] | hp78[0-9])
+ # FIXME: really hppa2.0-hp
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
+ # FIXME: really hppa2.0-hp
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[0-9][13679] | hp8[0-9][13679])
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[0-9][0-9] | hp8[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hppa-next)
+ os=-nextstep3
+ ;;
+ hppaosf)
+ basic_machine=hppa1.1-hp
+ os=-osf
+ ;;
+ hppro)
+ basic_machine=hppa1.1-hp
+ os=-proelf
+ ;;
+ i370-ibm* | ibm*)
+ basic_machine=i370-ibm
+ ;;
+ i*86v32)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv32
+ ;;
+ i*86v4*)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv4
+ ;;
+ i*86v)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv
+ ;;
+ i*86sol2)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-solaris2
+ ;;
+ i386mach)
+ basic_machine=i386-mach
+ os=-mach
+ ;;
+ i386-vsta | vsta)
+ basic_machine=i386-unknown
+ os=-vsta
+ ;;
+ iris | iris4d)
+ basic_machine=mips-sgi
+ case $os in
+ -irix*)
+ ;;
+ *)
+ os=-irix4
+ ;;
+ esac
+ ;;
+ isi68 | isi)
+ basic_machine=m68k-isi
+ os=-sysv
+ ;;
+ leon-*|leon[3-9]-*)
+ basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'`
+ ;;
+ m68knommu)
+ basic_machine=m68k-unknown
+ os=-linux
+ ;;
+ m68knommu-*)
+ basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
+ os=-linux
+ ;;
+ m88k-omron*)
+ basic_machine=m88k-omron
+ ;;
+ magnum | m3230)
+ basic_machine=mips-mips
+ os=-sysv
+ ;;
+ merlin)
+ basic_machine=ns32k-utek
+ os=-sysv
+ ;;
+ microblaze*)
+ basic_machine=microblaze-xilinx
+ ;;
+ mingw64)
+ basic_machine=x86_64-pc
+ os=-mingw64
+ ;;
+ mingw32)
+ basic_machine=i686-pc
+ os=-mingw32
+ ;;
+ mingw32ce)
+ basic_machine=arm-unknown
+ os=-mingw32ce
+ ;;
+ miniframe)
+ basic_machine=m68000-convergent
+ ;;
+ *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
+ basic_machine=m68k-atari
+ os=-mint
+ ;;
+ mips3*-*)
+ basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
+ ;;
+ mips3*)
+ basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
+ ;;
+ monitor)
+ basic_machine=m68k-rom68k
+ os=-coff
+ ;;
+ morphos)
+ basic_machine=powerpc-unknown
+ os=-morphos
+ ;;
+ moxiebox)
+ basic_machine=moxie-unknown
+ os=-moxiebox
+ ;;
+ msdos)
+ basic_machine=i386-pc
+ os=-msdos
+ ;;
+ ms1-*)
+ basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
+ ;;
+ msys)
+ basic_machine=i686-pc
+ os=-msys
+ ;;
+ mvs)
+ basic_machine=i370-ibm
+ os=-mvs
+ ;;
+ nacl)
+ basic_machine=le32-unknown
+ os=-nacl
+ ;;
+ ncr3000)
+ basic_machine=i486-ncr
+ os=-sysv4
+ ;;
+ netbsd386)
+ basic_machine=i386-unknown
+ os=-netbsd
+ ;;
+ netwinder)
+ basic_machine=armv4l-rebel
+ os=-linux
+ ;;
+ news | news700 | news800 | news900)
+ basic_machine=m68k-sony
+ os=-newsos
+ ;;
+ news1000)
+ basic_machine=m68030-sony
+ os=-newsos
+ ;;
+ news-3600 | risc-news)
+ basic_machine=mips-sony
+ os=-newsos
+ ;;
+ necv70)
+ basic_machine=v70-nec
+ os=-sysv
+ ;;
+ next | m*-next )
+ basic_machine=m68k-next
+ case $os in
+ -nextstep* )
+ ;;
+ -ns2*)
+ os=-nextstep2
+ ;;
+ *)
+ os=-nextstep3
+ ;;
+ esac
+ ;;
+ nh3000)
+ basic_machine=m68k-harris
+ os=-cxux
+ ;;
+ nh[45]000)
+ basic_machine=m88k-harris
+ os=-cxux
+ ;;
+ nindy960)
+ basic_machine=i960-intel
+ os=-nindy
+ ;;
+ mon960)
+ basic_machine=i960-intel
+ os=-mon960
+ ;;
+ nonstopux)
+ basic_machine=mips-compaq
+ os=-nonstopux
+ ;;
+ np1)
+ basic_machine=np1-gould
+ ;;
+ neo-tandem)
+ basic_machine=neo-tandem
+ ;;
+ nse-tandem)
+ basic_machine=nse-tandem
+ ;;
+ nsr-tandem)
+ basic_machine=nsr-tandem
+ ;;
+ op50n-* | op60c-*)
+ basic_machine=hppa1.1-oki
+ os=-proelf
+ ;;
+ openrisc | openrisc-*)
+ basic_machine=or32-unknown
+ ;;
+ os400)
+ basic_machine=powerpc-ibm
+ os=-os400
+ ;;
+ OSE68000 | ose68000)
+ basic_machine=m68000-ericsson
+ os=-ose
+ ;;
+ os68k)
+ basic_machine=m68k-none
+ os=-os68k
+ ;;
+ pa-hitachi)
+ basic_machine=hppa1.1-hitachi
+ os=-hiuxwe2
+ ;;
+ paragon)
+ basic_machine=i860-intel
+ os=-osf
+ ;;
+ parisc)
+ basic_machine=hppa-unknown
+ os=-linux
+ ;;
+ parisc-*)
+ basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
+ os=-linux
+ ;;
+ pbd)
+ basic_machine=sparc-tti
+ ;;
+ pbb)
+ basic_machine=m68k-tti
+ ;;
+ pc532 | pc532-*)
+ basic_machine=ns32k-pc532
+ ;;
+ pc98)
+ basic_machine=i386-pc
+ ;;
+ pc98-*)
+ basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentium | p5 | k5 | k6 | nexgen | viac3)
+ basic_machine=i586-pc
+ ;;
+ pentiumpro | p6 | 6x86 | athlon | athlon_*)
+ basic_machine=i686-pc
+ ;;
+ pentiumii | pentium2 | pentiumiii | pentium3)
+ basic_machine=i686-pc
+ ;;
+ pentium4)
+ basic_machine=i786-pc
+ ;;
+ pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
+ basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentiumpro-* | p6-* | 6x86-* | athlon-*)
+ basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
+ basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentium4-*)
+ basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pn)
+ basic_machine=pn-gould
+ ;;
+ power) basic_machine=power-ibm
+ ;;
+ ppc | ppcbe) basic_machine=powerpc-unknown
+ ;;
+ ppc-* | ppcbe-*)
+ basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppcle | powerpclittle | ppc-le | powerpc-little)
+ basic_machine=powerpcle-unknown
+ ;;
+ ppcle-* | powerpclittle-*)
+ basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppc64) basic_machine=powerpc64-unknown
+ ;;
+ ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppc64le | powerpc64little | ppc64-le | powerpc64-little)
+ basic_machine=powerpc64le-unknown
+ ;;
+ ppc64le-* | powerpc64little-*)
+ basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ps2)
+ basic_machine=i386-ibm
+ ;;
+ pw32)
+ basic_machine=i586-unknown
+ os=-pw32
+ ;;
+ rdos | rdos64)
+ basic_machine=x86_64-pc
+ os=-rdos
+ ;;
+ rdos32)
+ basic_machine=i386-pc
+ os=-rdos
+ ;;
+ rom68k)
+ basic_machine=m68k-rom68k
+ os=-coff
+ ;;
+ rm[46]00)
+ basic_machine=mips-siemens
+ ;;
+ rtpc | rtpc-*)
+ basic_machine=romp-ibm
+ ;;
+ s390 | s390-*)
+ basic_machine=s390-ibm
+ ;;
+ s390x | s390x-*)
+ basic_machine=s390x-ibm
+ ;;
+ sa29200)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ sb1)
+ basic_machine=mipsisa64sb1-unknown
+ ;;
+ sb1el)
+ basic_machine=mipsisa64sb1el-unknown
+ ;;
+ sde)
+ basic_machine=mipsisa32-sde
+ os=-elf
+ ;;
+ sei)
+ basic_machine=mips-sei
+ os=-seiux
+ ;;
+ sequent)
+ basic_machine=i386-sequent
+ ;;
+ sh)
+ basic_machine=sh-hitachi
+ os=-hms
+ ;;
+ sh5el)
+ basic_machine=sh5le-unknown
+ ;;
+ sh64)
+ basic_machine=sh64-unknown
+ ;;
+ sparclite-wrs | simso-wrs)
+ basic_machine=sparclite-wrs
+ os=-vxworks
+ ;;
+ sps7)
+ basic_machine=m68k-bull
+ os=-sysv2
+ ;;
+ spur)
+ basic_machine=spur-unknown
+ ;;
+ st2000)
+ basic_machine=m68k-tandem
+ ;;
+ stratus)
+ basic_machine=i860-stratus
+ os=-sysv4
+ ;;
+ strongarm-* | thumb-*)
+ basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ sun2)
+ basic_machine=m68000-sun
+ ;;
+ sun2os3)
+ basic_machine=m68000-sun
+ os=-sunos3
+ ;;
+ sun2os4)
+ basic_machine=m68000-sun
+ os=-sunos4
+ ;;
+ sun3os3)
+ basic_machine=m68k-sun
+ os=-sunos3
+ ;;
+ sun3os4)
+ basic_machine=m68k-sun
+ os=-sunos4
+ ;;
+ sun4os3)
+ basic_machine=sparc-sun
+ os=-sunos3
+ ;;
+ sun4os4)
+ basic_machine=sparc-sun
+ os=-sunos4
+ ;;
+ sun4sol2)
+ basic_machine=sparc-sun
+ os=-solaris2
+ ;;
+ sun3 | sun3-*)
+ basic_machine=m68k-sun
+ ;;
+ sun4)
+ basic_machine=sparc-sun
+ ;;
+ sun386 | sun386i | roadrunner)
+ basic_machine=i386-sun
+ ;;
+ sv1)
+ basic_machine=sv1-cray
+ os=-unicos
+ ;;
+ symmetry)
+ basic_machine=i386-sequent
+ os=-dynix
+ ;;
+ t3e)
+ basic_machine=alphaev5-cray
+ os=-unicos
+ ;;
+ t90)
+ basic_machine=t90-cray
+ os=-unicos
+ ;;
+ tile*)
+ basic_machine=$basic_machine-unknown
+ os=-linux-gnu
+ ;;
+ tx39)
+ basic_machine=mipstx39-unknown
+ ;;
+ tx39el)
+ basic_machine=mipstx39el-unknown
+ ;;
+ toad1)
+ basic_machine=pdp10-xkl
+ os=-tops20
+ ;;
+ tower | tower-32)
+ basic_machine=m68k-ncr
+ ;;
+ tpf)
+ basic_machine=s390x-ibm
+ os=-tpf
+ ;;
+ udi29k)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ ultra3)
+ basic_machine=a29k-nyu
+ os=-sym1
+ ;;
+ v810 | necv810)
+ basic_machine=v810-nec
+ os=-none
+ ;;
+ vaxv)
+ basic_machine=vax-dec
+ os=-sysv
+ ;;
+ vms)
+ basic_machine=vax-dec
+ os=-vms
+ ;;
+ vpp*|vx|vx-*)
+ basic_machine=f301-fujitsu
+ ;;
+ vxworks960)
+ basic_machine=i960-wrs
+ os=-vxworks
+ ;;
+ vxworks68)
+ basic_machine=m68k-wrs
+ os=-vxworks
+ ;;
+ vxworks29k)
+ basic_machine=a29k-wrs
+ os=-vxworks
+ ;;
+ w65*)
+ basic_machine=w65-wdc
+ os=-none
+ ;;
+ w89k-*)
+ basic_machine=hppa1.1-winbond
+ os=-proelf
+ ;;
+ xbox)
+ basic_machine=i686-pc
+ os=-mingw32
+ ;;
+ xps | xps100)
+ basic_machine=xps100-honeywell
+ ;;
+ xscale-* | xscalee[bl]-*)
+ basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
+ ;;
+ ymp)
+ basic_machine=ymp-cray
+ os=-unicos
+ ;;
+ z8k-*-coff)
+ basic_machine=z8k-unknown
+ os=-sim
+ ;;
+ z80-*-coff)
+ basic_machine=z80-unknown
+ os=-sim
+ ;;
+ none)
+ basic_machine=none-none
+ os=-none
+ ;;
+
+# Here we handle the default manufacturer of certain CPU types. It is in
+# some cases the only manufacturer, in others, it is the most popular.
+ w89k)
+ basic_machine=hppa1.1-winbond
+ ;;
+ op50n)
+ basic_machine=hppa1.1-oki
+ ;;
+ op60c)
+ basic_machine=hppa1.1-oki
+ ;;
+ romp)
+ basic_machine=romp-ibm
+ ;;
+ mmix)
+ basic_machine=mmix-knuth
+ ;;
+ rs6000)
+ basic_machine=rs6000-ibm
+ ;;
+ vax)
+ basic_machine=vax-dec
+ ;;
+ pdp10)
+ # there are many clones, so DEC is not a safe bet
+ basic_machine=pdp10-unknown
+ ;;
+ pdp11)
+ basic_machine=pdp11-dec
+ ;;
+ we32k)
+ basic_machine=we32k-att
+ ;;
+ sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
+ basic_machine=sh-unknown
+ ;;
+ sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
+ basic_machine=sparc-sun
+ ;;
+ cydra)
+ basic_machine=cydra-cydrome
+ ;;
+ orion)
+ basic_machine=orion-highlevel
+ ;;
+ orion105)
+ basic_machine=clipper-highlevel
+ ;;
+ mac | mpw | mac-mpw)
+ basic_machine=m68k-apple
+ ;;
+ pmac | pmac-mpw)
+ basic_machine=powerpc-apple
+ ;;
+ *-unknown)
+ # Make sure to match an already-canonicalized machine name.
+ ;;
+ *)
+ echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+ exit 1
+ ;;
+esac
+
+# Here we canonicalize certain aliases for manufacturers.
+case $basic_machine in
+ *-digital*)
+ basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
+ ;;
+ *-commodore*)
+ basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
+ ;;
+ *)
+ ;;
+esac
+
+# Decode manufacturer-specific aliases for certain operating systems.
+
+if [ x"$os" != x"" ]
+then
+case $os in
+ # First match some system type aliases
+ # that might get confused with valid system types.
+ # -solaris* is a basic system type, with this one exception.
+ -auroraux)
+ os=-auroraux
+ ;;
+ -solaris1 | -solaris1.*)
+ os=`echo $os | sed -e 's|solaris1|sunos4|'`
+ ;;
+ -solaris)
+ os=-solaris2
+ ;;
+ -svr4*)
+ os=-sysv4
+ ;;
+ -unixware*)
+ os=-sysv4.2uw
+ ;;
+ -gnu/linux*)
+ os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
+ ;;
+ # First accept the basic system types.
+ # The portable systems comes first.
+ # Each alternative MUST END IN A *, to match a version number.
+ # -sysv* is not here because it comes later, after sysvr4.
+ -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
+ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
+ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
+ | -sym* | -kopensolaris* | -plan9* \
+ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
+ | -aos* | -aros* | -cloudabi* | -sortix* \
+ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
+ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
+ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
+ | -bitrig* | -openbsd* | -solidbsd* \
+ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
+ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
+ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
+ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
+ | -chorusos* | -chorusrdb* | -cegcc* \
+ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+ | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
+ | -linux-newlib* | -linux-musl* | -linux-uclibc* \
+ | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \
+ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
+ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
+ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
+ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
+ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
+ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
+ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*)
+ # Remember, each alternative MUST END IN *, to match a version number.
+ ;;
+ -qnx*)
+ case $basic_machine in
+ x86-* | i*86-*)
+ ;;
+ *)
+ os=-nto$os
+ ;;
+ esac
+ ;;
+ -nto-qnx*)
+ ;;
+ -nto*)
+ os=`echo $os | sed -e 's|nto|nto-qnx|'`
+ ;;
+ -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
+ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
+ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
+ ;;
+ -mac*)
+ os=`echo $os | sed -e 's|mac|macos|'`
+ ;;
+ -linux-dietlibc)
+ os=-linux-dietlibc
+ ;;
+ -linux*)
+ os=`echo $os | sed -e 's|linux|linux-gnu|'`
+ ;;
+ -sunos5*)
+ os=`echo $os | sed -e 's|sunos5|solaris2|'`
+ ;;
+ -sunos6*)
+ os=`echo $os | sed -e 's|sunos6|solaris3|'`
+ ;;
+ -opened*)
+ os=-openedition
+ ;;
+ -os400*)
+ os=-os400
+ ;;
+ -wince*)
+ os=-wince
+ ;;
+ -osfrose*)
+ os=-osfrose
+ ;;
+ -osf*)
+ os=-osf
+ ;;
+ -utek*)
+ os=-bsd
+ ;;
+ -dynix*)
+ os=-bsd
+ ;;
+ -acis*)
+ os=-aos
+ ;;
+ -atheos*)
+ os=-atheos
+ ;;
+ -syllable*)
+ os=-syllable
+ ;;
+ -386bsd)
+ os=-bsd
+ ;;
+ -ctix* | -uts*)
+ os=-sysv
+ ;;
+ -nova*)
+ os=-rtmk-nova
+ ;;
+ -ns2 )
+ os=-nextstep2
+ ;;
+ -nsk*)
+ os=-nsk
+ ;;
+ # Preserve the version number of sinix5.
+ -sinix5.*)
+ os=`echo $os | sed -e 's|sinix|sysv|'`
+ ;;
+ -sinix*)
+ os=-sysv4
+ ;;
+ -tpf*)
+ os=-tpf
+ ;;
+ -triton*)
+ os=-sysv3
+ ;;
+ -oss*)
+ os=-sysv3
+ ;;
+ -svr4)
+ os=-sysv4
+ ;;
+ -svr3)
+ os=-sysv3
+ ;;
+ -sysvr4)
+ os=-sysv4
+ ;;
+ # This must come after -sysvr4.
+ -sysv*)
+ ;;
+ -ose*)
+ os=-ose
+ ;;
+ -es1800*)
+ os=-ose
+ ;;
+ -xenix)
+ os=-xenix
+ ;;
+ -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+ os=-mint
+ ;;
+ -aros*)
+ os=-aros
+ ;;
+ -zvmoe)
+ os=-zvmoe
+ ;;
+ -dicos*)
+ os=-dicos
+ ;;
+ -nacl*)
+ ;;
+ -none)
+ ;;
+ *)
+ # Get rid of the `-' at the beginning of $os.
+ os=`echo $os | sed 's/[^-]*-//'`
+ echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
+ exit 1
+ ;;
+esac
+else
+
+# Here we handle the default operating systems that come with various machines.
+# The value should be what the vendor currently ships out the door with their
+# machine or put another way, the most popular os provided with the machine.
+
+# Note that if you're going to try to match "-MANUFACTURER" here (say,
+# "-sun"), then you have to tell the case statement up towards the top
+# that MANUFACTURER isn't an operating system. Otherwise, code above
+# will signal an error saying that MANUFACTURER isn't an operating
+# system, and we'll never get to this point.
+
+case $basic_machine in
+ score-*)
+ os=-elf
+ ;;
+ spu-*)
+ os=-elf
+ ;;
+ *-acorn)
+ os=-riscix1.2
+ ;;
+ arm*-rebel)
+ os=-linux
+ ;;
+ arm*-semi)
+ os=-aout
+ ;;
+ c4x-* | tic4x-*)
+ os=-coff
+ ;;
+ c8051-*)
+ os=-elf
+ ;;
+ hexagon-*)
+ os=-elf
+ ;;
+ tic54x-*)
+ os=-coff
+ ;;
+ tic55x-*)
+ os=-coff
+ ;;
+ tic6x-*)
+ os=-coff
+ ;;
+ # This must come before the *-dec entry.
+ pdp10-*)
+ os=-tops20
+ ;;
+ pdp11-*)
+ os=-none
+ ;;
+ *-dec | vax-*)
+ os=-ultrix4.2
+ ;;
+ m68*-apollo)
+ os=-domain
+ ;;
+ i386-sun)
+ os=-sunos4.0.2
+ ;;
+ m68000-sun)
+ os=-sunos3
+ ;;
+ m68*-cisco)
+ os=-aout
+ ;;
+ mep-*)
+ os=-elf
+ ;;
+ mips*-cisco)
+ os=-elf
+ ;;
+ mips*-*)
+ os=-elf
+ ;;
+ or32-*)
+ os=-coff
+ ;;
+ *-tti) # must be before sparc entry or we get the wrong os.
+ os=-sysv3
+ ;;
+ sparc-* | *-sun)
+ os=-sunos4.1.1
+ ;;
+ *-be)
+ os=-beos
+ ;;
+ *-haiku)
+ os=-haiku
+ ;;
+ *-ibm)
+ os=-aix
+ ;;
+ *-knuth)
+ os=-mmixware
+ ;;
+ *-wec)
+ os=-proelf
+ ;;
+ *-winbond)
+ os=-proelf
+ ;;
+ *-oki)
+ os=-proelf
+ ;;
+ *-hp)
+ os=-hpux
+ ;;
+ *-hitachi)
+ os=-hiux
+ ;;
+ i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
+ os=-sysv
+ ;;
+ *-cbm)
+ os=-amigaos
+ ;;
+ *-dg)
+ os=-dgux
+ ;;
+ *-dolphin)
+ os=-sysv3
+ ;;
+ m68k-ccur)
+ os=-rtu
+ ;;
+ m88k-omron*)
+ os=-luna
+ ;;
+ *-next )
+ os=-nextstep
+ ;;
+ *-sequent)
+ os=-ptx
+ ;;
+ *-crds)
+ os=-unos
+ ;;
+ *-ns)
+ os=-genix
+ ;;
+ i370-*)
+ os=-mvs
+ ;;
+ *-next)
+ os=-nextstep3
+ ;;
+ *-gould)
+ os=-sysv
+ ;;
+ *-highlevel)
+ os=-bsd
+ ;;
+ *-encore)
+ os=-bsd
+ ;;
+ *-sgi)
+ os=-irix
+ ;;
+ *-siemens)
+ os=-sysv4
+ ;;
+ *-masscomp)
+ os=-rtu
+ ;;
+ f30[01]-fujitsu | f700-fujitsu)
+ os=-uxpv
+ ;;
+ *-rom68k)
+ os=-coff
+ ;;
+ *-*bug)
+ os=-coff
+ ;;
+ *-apple)
+ os=-macos
+ ;;
+ *-atari*)
+ os=-mint
+ ;;
+ *)
+ os=-none
+ ;;
+esac
+fi
+
+# Here we handle the case where we know the os, and the CPU type, but not the
+# manufacturer. We pick the logical manufacturer.
+vendor=unknown
+case $basic_machine in
+ *-unknown)
+ case $os in
+ -riscix*)
+ vendor=acorn
+ ;;
+ -sunos*)
+ vendor=sun
+ ;;
+ -cnk*|-aix*)
+ vendor=ibm
+ ;;
+ -beos*)
+ vendor=be
+ ;;
+ -hpux*)
+ vendor=hp
+ ;;
+ -mpeix*)
+ vendor=hp
+ ;;
+ -hiux*)
+ vendor=hitachi
+ ;;
+ -unos*)
+ vendor=crds
+ ;;
+ -dgux*)
+ vendor=dg
+ ;;
+ -luna*)
+ vendor=omron
+ ;;
+ -genix*)
+ vendor=ns
+ ;;
+ -mvs* | -opened*)
+ vendor=ibm
+ ;;
+ -os400*)
+ vendor=ibm
+ ;;
+ -ptx*)
+ vendor=sequent
+ ;;
+ -tpf*)
+ vendor=ibm
+ ;;
+ -vxsim* | -vxworks* | -windiss*)
+ vendor=wrs
+ ;;
+ -aux*)
+ vendor=apple
+ ;;
+ -hms*)
+ vendor=hitachi
+ ;;
+ -mpw* | -macos*)
+ vendor=apple
+ ;;
+ -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+ vendor=atari
+ ;;
+ -vos*)
+ vendor=stratus
+ ;;
+ esac
+ basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
+ ;;
+esac
+
+echo $basic_machine$os
+exit
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/external/bdwgc/libatomic_ops/configure.REMOVED.git-id b/external/bdwgc/libatomic_ops/configure.REMOVED.git-id
new file mode 100644
index 0000000000..a15e41258d
--- /dev/null
+++ b/external/bdwgc/libatomic_ops/configure.REMOVED.git-id
@@ -0,0 +1 @@
+ea1205ac335e34027c7b42f3f4ea27f43588c6fd
\ No newline at end of file
diff --git a/external/bdwgc/libatomic_ops/depcomp b/external/bdwgc/libatomic_ops/depcomp
new file mode 100755
index 0000000000..fc98710e2a
--- /dev/null
+++ b/external/bdwgc/libatomic_ops/depcomp
@@ -0,0 +1,791 @@
+#! /bin/sh
+# depcomp - compile a program generating dependencies as side-effects
+
+scriptversion=2013-05-30.07; # UTC
+
+# Copyright (C) 1999-2014 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# Originally written by Alexandre Oliva .
+
+case $1 in
+ '')
+ echo "$0: No command. Try '$0 --help' for more information." 1>&2
+ exit 1;
+ ;;
+ -h | --h*)
+ cat <<\EOF
+Usage: depcomp [--help] [--version] PROGRAM [ARGS]
+
+Run PROGRAMS ARGS to compile a file, generating dependencies
+as side-effects.
+
+Environment variables:
+ depmode Dependency tracking mode.
+ source Source file read by 'PROGRAMS ARGS'.
+ object Object file output by 'PROGRAMS ARGS'.
+ DEPDIR directory where to store dependencies.
+ depfile Dependency file to output.
+ tmpdepfile Temporary file to use when outputting dependencies.
+ libtool Whether libtool is used (yes/no).
+
+Report bugs to .
+EOF
+ exit $?
+ ;;
+ -v | --v*)
+ echo "depcomp $scriptversion"
+ exit $?
+ ;;
+esac
+
+# Get the directory component of the given path, and save it in the
+# global variables '$dir'. Note that this directory component will
+# be either empty or ending with a '/' character. This is deliberate.
+set_dir_from ()
+{
+ case $1 in
+ */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;;
+ *) dir=;;
+ esac
+}
+
+# Get the suffix-stripped basename of the given path, and save it the
+# global variable '$base'.
+set_base_from ()
+{
+ base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'`
+}
+
+# If no dependency file was actually created by the compiler invocation,
+# we still have to create a dummy depfile, to avoid errors with the
+# Makefile "include basename.Plo" scheme.
+make_dummy_depfile ()
+{
+ echo "#dummy" > "$depfile"
+}
+
+# Factor out some common post-processing of the generated depfile.
+# Requires the auxiliary global variable '$tmpdepfile' to be set.
+aix_post_process_depfile ()
+{
+ # If the compiler actually managed to produce a dependency file,
+ # post-process it.
+ if test -f "$tmpdepfile"; then
+ # Each line is of the form 'foo.o: dependency.h'.
+ # Do two passes, one to just change these to
+ # $object: dependency.h
+ # and one to simply output
+ # dependency.h:
+ # which is needed to avoid the deleted-header problem.
+ { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile"
+ sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile"
+ } > "$depfile"
+ rm -f "$tmpdepfile"
+ else
+ make_dummy_depfile
+ fi
+}
+
+# A tabulation character.
+tab=' '
+# A newline character.
+nl='
+'
+# Character ranges might be problematic outside the C locale.
+# These definitions help.
+upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ
+lower=abcdefghijklmnopqrstuvwxyz
+digits=0123456789
+alpha=${upper}${lower}
+
+if test -z "$depmode" || test -z "$source" || test -z "$object"; then
+ echo "depcomp: Variables source, object and depmode must be set" 1>&2
+ exit 1
+fi
+
+# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
+depfile=${depfile-`echo "$object" |
+ sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
+tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
+
+rm -f "$tmpdepfile"
+
+# Avoid interferences from the environment.
+gccflag= dashmflag=
+
+# Some modes work just like other modes, but use different flags. We
+# parameterize here, but still list the modes in the big case below,
+# to make depend.m4 easier to write. Note that we *cannot* use a case
+# here, because this file can only contain one case statement.
+if test "$depmode" = hp; then
+ # HP compiler uses -M and no extra arg.
+ gccflag=-M
+ depmode=gcc
+fi
+
+if test "$depmode" = dashXmstdout; then
+ # This is just like dashmstdout with a different argument.
+ dashmflag=-xM
+ depmode=dashmstdout
+fi
+
+cygpath_u="cygpath -u -f -"
+if test "$depmode" = msvcmsys; then
+ # This is just like msvisualcpp but w/o cygpath translation.
+ # Just convert the backslash-escaped backslashes to single forward
+ # slashes to satisfy depend.m4
+ cygpath_u='sed s,\\\\,/,g'
+ depmode=msvisualcpp
+fi
+
+if test "$depmode" = msvc7msys; then
+ # This is just like msvc7 but w/o cygpath translation.
+ # Just convert the backslash-escaped backslashes to single forward
+ # slashes to satisfy depend.m4
+ cygpath_u='sed s,\\\\,/,g'
+ depmode=msvc7
+fi
+
+if test "$depmode" = xlc; then
+ # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information.
+ gccflag=-qmakedep=gcc,-MF
+ depmode=gcc
+fi
+
+case "$depmode" in
+gcc3)
+## gcc 3 implements dependency tracking that does exactly what
+## we want. Yay! Note: for some reason libtool 1.4 doesn't like
+## it if -MD -MP comes after the -MF stuff. Hmm.
+## Unfortunately, FreeBSD c89 acceptance of flags depends upon
+## the command line argument order; so add the flags where they
+## appear in depend2.am. Note that the slowdown incurred here
+## affects only configure: in makefiles, %FASTDEP% shortcuts this.
+ for arg
+ do
+ case $arg in
+ -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
+ *) set fnord "$@" "$arg" ;;
+ esac
+ shift # fnord
+ shift # $arg
+ done
+ "$@"
+ stat=$?
+ if test $stat -ne 0; then
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+ mv "$tmpdepfile" "$depfile"
+ ;;
+
+gcc)
+## Note that this doesn't just cater to obsosete pre-3.x GCC compilers.
+## but also to in-use compilers like IMB xlc/xlC and the HP C compiler.
+## (see the conditional assignment to $gccflag above).
+## There are various ways to get dependency output from gcc. Here's
+## why we pick this rather obscure method:
+## - Don't want to use -MD because we'd like the dependencies to end
+## up in a subdir. Having to rename by hand is ugly.
+## (We might end up doing this anyway to support other compilers.)
+## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
+## -MM, not -M (despite what the docs say). Also, it might not be
+## supported by the other compilers which use the 'gcc' depmode.
+## - Using -M directly means running the compiler twice (even worse
+## than renaming).
+ if test -z "$gccflag"; then
+ gccflag=-MD,
+ fi
+ "$@" -Wp,"$gccflag$tmpdepfile"
+ stat=$?
+ if test $stat -ne 0; then
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+ rm -f "$depfile"
+ echo "$object : \\" > "$depfile"
+ # The second -e expression handles DOS-style file names with drive
+ # letters.
+ sed -e 's/^[^:]*: / /' \
+ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
+## This next piece of magic avoids the "deleted header file" problem.
+## The problem is that when a header file which appears in a .P file
+## is deleted, the dependency causes make to die (because there is
+## typically no way to rebuild the header). We avoid this by adding
+## dummy dependencies for each header file. Too bad gcc doesn't do
+## this for us directly.
+## Some versions of gcc put a space before the ':'. On the theory
+## that the space means something, we add a space to the output as
+## well. hp depmode also adds that space, but also prefixes the VPATH
+## to the object. Take care to not repeat it in the output.
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly. Breaking it into two sed invocations is a workaround.
+ tr ' ' "$nl" < "$tmpdepfile" \
+ | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \
+ | sed -e 's/$/ :/' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+hp)
+ # This case exists only to let depend.m4 do its work. It works by
+ # looking at the text of this script. This case will never be run,
+ # since it is checked for above.
+ exit 1
+ ;;
+
+sgi)
+ if test "$libtool" = yes; then
+ "$@" "-Wp,-MDupdate,$tmpdepfile"
+ else
+ "$@" -MDupdate "$tmpdepfile"
+ fi
+ stat=$?
+ if test $stat -ne 0; then
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+ rm -f "$depfile"
+
+ if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
+ echo "$object : \\" > "$depfile"
+ # Clip off the initial element (the dependent). Don't try to be
+ # clever and replace this with sed code, as IRIX sed won't handle
+ # lines with more than a fixed number of characters (4096 in
+ # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
+ # the IRIX cc adds comments like '#:fec' to the end of the
+ # dependency line.
+ tr ' ' "$nl" < "$tmpdepfile" \
+ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \
+ | tr "$nl" ' ' >> "$depfile"
+ echo >> "$depfile"
+ # The second pass generates a dummy entry for each header file.
+ tr ' ' "$nl" < "$tmpdepfile" \
+ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
+ >> "$depfile"
+ else
+ make_dummy_depfile
+ fi
+ rm -f "$tmpdepfile"
+ ;;
+
+xlc)
+ # This case exists only to let depend.m4 do its work. It works by
+ # looking at the text of this script. This case will never be run,
+ # since it is checked for above.
+ exit 1
+ ;;
+
+aix)
+ # The C for AIX Compiler uses -M and outputs the dependencies
+ # in a .u file. In older versions, this file always lives in the
+ # current directory. Also, the AIX compiler puts '$object:' at the
+ # start of each line; $object doesn't have directory information.
+ # Version 6 uses the directory in both cases.
+ set_dir_from "$object"
+ set_base_from "$object"
+ if test "$libtool" = yes; then
+ tmpdepfile1=$dir$base.u
+ tmpdepfile2=$base.u
+ tmpdepfile3=$dir.libs/$base.u
+ "$@" -Wc,-M
+ else
+ tmpdepfile1=$dir$base.u
+ tmpdepfile2=$dir$base.u
+ tmpdepfile3=$dir$base.u
+ "$@" -M
+ fi
+ stat=$?
+ if test $stat -ne 0; then
+ rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+ exit $stat
+ fi
+
+ for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+ do
+ test -f "$tmpdepfile" && break
+ done
+ aix_post_process_depfile
+ ;;
+
+tcc)
+ # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26
+ # FIXME: That version still under development at the moment of writing.
+ # Make that this statement remains true also for stable, released
+ # versions.
+ # It will wrap lines (doesn't matter whether long or short) with a
+ # trailing '\', as in:
+ #
+ # foo.o : \
+ # foo.c \
+ # foo.h \
+ #
+ # It will put a trailing '\' even on the last line, and will use leading
+ # spaces rather than leading tabs (at least since its commit 0394caf7
+ # "Emit spaces for -MD").
+ "$@" -MD -MF "$tmpdepfile"
+ stat=$?
+ if test $stat -ne 0; then
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+ rm -f "$depfile"
+ # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'.
+ # We have to change lines of the first kind to '$object: \'.
+ sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile"
+ # And for each line of the second kind, we have to emit a 'dep.h:'
+ # dummy dependency, to avoid the deleted-header problem.
+ sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+## The order of this option in the case statement is important, since the
+## shell code in configure will try each of these formats in the order
+## listed in this file. A plain '-MD' option would be understood by many
+## compilers, so we must ensure this comes after the gcc and icc options.
+pgcc)
+ # Portland's C compiler understands '-MD'.
+ # Will always output deps to 'file.d' where file is the root name of the
+ # source file under compilation, even if file resides in a subdirectory.
+ # The object file name does not affect the name of the '.d' file.
+ # pgcc 10.2 will output
+ # foo.o: sub/foo.c sub/foo.h
+ # and will wrap long lines using '\' :
+ # foo.o: sub/foo.c ... \
+ # sub/foo.h ... \
+ # ...
+ set_dir_from "$object"
+ # Use the source, not the object, to determine the base name, since
+ # that's sadly what pgcc will do too.
+ set_base_from "$source"
+ tmpdepfile=$base.d
+
+ # For projects that build the same source file twice into different object
+ # files, the pgcc approach of using the *source* file root name can cause
+ # problems in parallel builds. Use a locking strategy to avoid stomping on
+ # the same $tmpdepfile.
+ lockdir=$base.d-lock
+ trap "
+ echo '$0: caught signal, cleaning up...' >&2
+ rmdir '$lockdir'
+ exit 1
+ " 1 2 13 15
+ numtries=100
+ i=$numtries
+ while test $i -gt 0; do
+ # mkdir is a portable test-and-set.
+ if mkdir "$lockdir" 2>/dev/null; then
+ # This process acquired the lock.
+ "$@" -MD
+ stat=$?
+ # Release the lock.
+ rmdir "$lockdir"
+ break
+ else
+ # If the lock is being held by a different process, wait
+ # until the winning process is done or we timeout.
+ while test -d "$lockdir" && test $i -gt 0; do
+ sleep 1
+ i=`expr $i - 1`
+ done
+ fi
+ i=`expr $i - 1`
+ done
+ trap - 1 2 13 15
+ if test $i -le 0; then
+ echo "$0: failed to acquire lock after $numtries attempts" >&2
+ echo "$0: check lockdir '$lockdir'" >&2
+ exit 1
+ fi
+
+ if test $stat -ne 0; then
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+ rm -f "$depfile"
+ # Each line is of the form `foo.o: dependent.h',
+ # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
+ # Do two passes, one to just change these to
+ # `$object: dependent.h' and one to simply `dependent.h:'.
+ sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
+ # Some versions of the HPUX 10.20 sed can't process this invocation
+ # correctly. Breaking it into two sed invocations is a workaround.
+ sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \
+ | sed -e 's/$/ :/' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+hp2)
+ # The "hp" stanza above does not work with aCC (C++) and HP's ia64
+ # compilers, which have integrated preprocessors. The correct option
+ # to use with these is +Maked; it writes dependencies to a file named
+ # 'foo.d', which lands next to the object file, wherever that
+ # happens to be.
+ # Much of this is similar to the tru64 case; see comments there.
+ set_dir_from "$object"
+ set_base_from "$object"
+ if test "$libtool" = yes; then
+ tmpdepfile1=$dir$base.d
+ tmpdepfile2=$dir.libs/$base.d
+ "$@" -Wc,+Maked
+ else
+ tmpdepfile1=$dir$base.d
+ tmpdepfile2=$dir$base.d
+ "$@" +Maked
+ fi
+ stat=$?
+ if test $stat -ne 0; then
+ rm -f "$tmpdepfile1" "$tmpdepfile2"
+ exit $stat
+ fi
+
+ for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
+ do
+ test -f "$tmpdepfile" && break
+ done
+ if test -f "$tmpdepfile"; then
+ sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile"
+ # Add 'dependent.h:' lines.
+ sed -ne '2,${
+ s/^ *//
+ s/ \\*$//
+ s/$/:/
+ p
+ }' "$tmpdepfile" >> "$depfile"
+ else
+ make_dummy_depfile
+ fi
+ rm -f "$tmpdepfile" "$tmpdepfile2"
+ ;;
+
+tru64)
+ # The Tru64 compiler uses -MD to generate dependencies as a side
+ # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'.
+ # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
+ # dependencies in 'foo.d' instead, so we check for that too.
+ # Subdirectories are respected.
+ set_dir_from "$object"
+ set_base_from "$object"
+
+ if test "$libtool" = yes; then
+ # Libtool generates 2 separate objects for the 2 libraries. These
+ # two compilations output dependencies in $dir.libs/$base.o.d and
+ # in $dir$base.o.d. We have to check for both files, because
+ # one of the two compilations can be disabled. We should prefer
+ # $dir$base.o.d over $dir.libs/$base.o.d because the latter is
+ # automatically cleaned when .libs/ is deleted, while ignoring
+ # the former would cause a distcleancheck panic.
+ tmpdepfile1=$dir$base.o.d # libtool 1.5
+ tmpdepfile2=$dir.libs/$base.o.d # Likewise.
+ tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504
+ "$@" -Wc,-MD
+ else
+ tmpdepfile1=$dir$base.d
+ tmpdepfile2=$dir$base.d
+ tmpdepfile3=$dir$base.d
+ "$@" -MD
+ fi
+
+ stat=$?
+ if test $stat -ne 0; then
+ rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+ exit $stat
+ fi
+
+ for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+ do
+ test -f "$tmpdepfile" && break
+ done
+ # Same post-processing that is required for AIX mode.
+ aix_post_process_depfile
+ ;;
+
+msvc7)
+ if test "$libtool" = yes; then
+ showIncludes=-Wc,-showIncludes
+ else
+ showIncludes=-showIncludes
+ fi
+ "$@" $showIncludes > "$tmpdepfile"
+ stat=$?
+ grep -v '^Note: including file: ' "$tmpdepfile"
+ if test $stat -ne 0; then
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+ rm -f "$depfile"
+ echo "$object : \\" > "$depfile"
+ # The first sed program below extracts the file names and escapes
+ # backslashes for cygpath. The second sed program outputs the file
+ # name when reading, but also accumulates all include files in the
+ # hold buffer in order to output them again at the end. This only
+ # works with sed implementations that can handle large buffers.
+ sed < "$tmpdepfile" -n '
+/^Note: including file: *\(.*\)/ {
+ s//\1/
+ s/\\/\\\\/g
+ p
+}' | $cygpath_u | sort -u | sed -n '
+s/ /\\ /g
+s/\(.*\)/'"$tab"'\1 \\/p
+s/.\(.*\) \\/\1:/
+H
+$ {
+ s/.*/'"$tab"'/
+ G
+ p
+}' >> "$depfile"
+ echo >> "$depfile" # make sure the fragment doesn't end with a backslash
+ rm -f "$tmpdepfile"
+ ;;
+
+msvc7msys)
+ # This case exists only to let depend.m4 do its work. It works by
+ # looking at the text of this script. This case will never be run,
+ # since it is checked for above.
+ exit 1
+ ;;
+
+#nosideeffect)
+ # This comment above is used by automake to tell side-effect
+ # dependency tracking mechanisms from slower ones.
+
+dashmstdout)
+ # Important note: in order to support this mode, a compiler *must*
+ # always write the preprocessed file to stdout, regardless of -o.
+ "$@" || exit $?
+
+ # Remove the call to Libtool.
+ if test "$libtool" = yes; then
+ while test "X$1" != 'X--mode=compile'; do
+ shift
+ done
+ shift
+ fi
+
+ # Remove '-o $object'.
+ IFS=" "
+ for arg
+ do
+ case $arg in
+ -o)
+ shift
+ ;;
+ $object)
+ shift
+ ;;
+ *)
+ set fnord "$@" "$arg"
+ shift # fnord
+ shift # $arg
+ ;;
+ esac
+ done
+
+ test -z "$dashmflag" && dashmflag=-M
+ # Require at least two characters before searching for ':'
+ # in the target name. This is to cope with DOS-style filenames:
+ # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise.
+ "$@" $dashmflag |
+ sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile"
+ rm -f "$depfile"
+ cat < "$tmpdepfile" > "$depfile"
+ # Some versions of the HPUX 10.20 sed can't process this sed invocation
+ # correctly. Breaking it into two sed invocations is a workaround.
+ tr ' ' "$nl" < "$tmpdepfile" \
+ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
+ | sed -e 's/$/ :/' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+dashXmstdout)
+ # This case only exists to satisfy depend.m4. It is never actually
+ # run, as this mode is specially recognized in the preamble.
+ exit 1
+ ;;
+
+makedepend)
+ "$@" || exit $?
+ # Remove any Libtool call
+ if test "$libtool" = yes; then
+ while test "X$1" != 'X--mode=compile'; do
+ shift
+ done
+ shift
+ fi
+ # X makedepend
+ shift
+ cleared=no eat=no
+ for arg
+ do
+ case $cleared in
+ no)
+ set ""; shift
+ cleared=yes ;;
+ esac
+ if test $eat = yes; then
+ eat=no
+ continue
+ fi
+ case "$arg" in
+ -D*|-I*)
+ set fnord "$@" "$arg"; shift ;;
+ # Strip any option that makedepend may not understand. Remove
+ # the object too, otherwise makedepend will parse it as a source file.
+ -arch)
+ eat=yes ;;
+ -*|$object)
+ ;;
+ *)
+ set fnord "$@" "$arg"; shift ;;
+ esac
+ done
+ obj_suffix=`echo "$object" | sed 's/^.*\././'`
+ touch "$tmpdepfile"
+ ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
+ rm -f "$depfile"
+ # makedepend may prepend the VPATH from the source file name to the object.
+ # No need to regex-escape $object, excess matching of '.' is harmless.
+ sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile"
+ # Some versions of the HPUX 10.20 sed can't process the last invocation
+ # correctly. Breaking it into two sed invocations is a workaround.
+ sed '1,2d' "$tmpdepfile" \
+ | tr ' ' "$nl" \
+ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
+ | sed -e 's/$/ :/' >> "$depfile"
+ rm -f "$tmpdepfile" "$tmpdepfile".bak
+ ;;
+
+cpp)
+ # Important note: in order to support this mode, a compiler *must*
+ # always write the preprocessed file to stdout.
+ "$@" || exit $?
+
+ # Remove the call to Libtool.
+ if test "$libtool" = yes; then
+ while test "X$1" != 'X--mode=compile'; do
+ shift
+ done
+ shift
+ fi
+
+ # Remove '-o $object'.
+ IFS=" "
+ for arg
+ do
+ case $arg in
+ -o)
+ shift
+ ;;
+ $object)
+ shift
+ ;;
+ *)
+ set fnord "$@" "$arg"
+ shift # fnord
+ shift # $arg
+ ;;
+ esac
+ done
+
+ "$@" -E \
+ | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
+ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
+ | sed '$ s: \\$::' > "$tmpdepfile"
+ rm -f "$depfile"
+ echo "$object : \\" > "$depfile"
+ cat < "$tmpdepfile" >> "$depfile"
+ sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+msvisualcpp)
+ # Important note: in order to support this mode, a compiler *must*
+ # always write the preprocessed file to stdout.
+ "$@" || exit $?
+
+ # Remove the call to Libtool.
+ if test "$libtool" = yes; then
+ while test "X$1" != 'X--mode=compile'; do
+ shift
+ done
+ shift
+ fi
+
+ IFS=" "
+ for arg
+ do
+ case "$arg" in
+ -o)
+ shift
+ ;;
+ $object)
+ shift
+ ;;
+ "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
+ set fnord "$@"
+ shift
+ shift
+ ;;
+ *)
+ set fnord "$@" "$arg"
+ shift
+ shift
+ ;;
+ esac
+ done
+ "$@" -E 2>/dev/null |
+ sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
+ rm -f "$depfile"
+ echo "$object : \\" > "$depfile"
+ sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile"
+ echo "$tab" >> "$depfile"
+ sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+msvcmsys)
+ # This case exists only to let depend.m4 do its work. It works by
+ # looking at the text of this script. This case will never be run,
+ # since it is checked for above.
+ exit 1
+ ;;
+
+none)
+ exec "$@"
+ ;;
+
+*)
+ echo "Unknown depmode $depmode" 1>&2
+ exit 1
+ ;;
+esac
+
+exit 0
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/mk/Makefile.in b/external/bdwgc/libatomic_ops/doc/Makefile.in
similarity index 61%
rename from mk/Makefile.in
rename to external/bdwgc/libatomic_ops/doc/Makefile.in
index 0af1e93e66..7118c0fa6e 100644
--- a/mk/Makefile.in
+++ b/external/bdwgc/libatomic_ops/doc/Makefile.in
@@ -13,6 +13,7 @@
# PARTICULAR PURPOSE.
@SET_MAKE@
+
VPATH = @srcdir@
am__is_gnu_make = { \
if test -z '$(MAKELEVEL)'; then \
@@ -88,25 +89,18 @@ POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
target_triplet = @target@
-subdir = mk
+subdir = doc
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/apple-target.m4 \
- $(top_srcdir)/m4/ax_append_flag.m4 \
- $(top_srcdir)/m4/ax_append_link_flags.m4 \
- $(top_srcdir)/m4/ax_check_compile_flag.m4 \
- $(top_srcdir)/m4/ax_check_link_flag.m4 \
- $(top_srcdir)/m4/ax_require_defined.m4 \
- $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
- $(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
- $(top_srcdir)/m4/lt~obsolete.m4 \
- $(top_srcdir)/m4/mono-output.m4 $(top_srcdir)/m4/nls.m4 \
- $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \
- $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac
+am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
+ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+ $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
-DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
-CONFIG_HEADER = $(top_builddir)/config.h
+DIST_COMMON = $(srcdir)/Makefile.am $(dist_pkgdata_DATA) \
+ $(am__DIST_COMMON)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/src/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
AM_V_P = $(am__v_P_@AM_V@)
@@ -128,161 +122,89 @@ am__can_run_installinfo = \
n|no|NO) false;; \
*) (install-info --version) >/dev/null 2>&1;; \
esac
-am__extra_recursive_targets = test-recursive test-bundle-recursive
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+ test -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && rm -f $$files; }; \
+ }
+am__installdirs = "$(DESTDIR)$(pkgdatadir)"
+DATA = $(dist_pkgdata_DATA)
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
-am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/mkinstalldirs
+am__DIST_COMMON = $(srcdir)/Makefile.in
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
-AOT_BUILD_FLAGS = @AOT_BUILD_FLAGS@
-AOT_RUN_FLAGS = @AOT_RUN_FLAGS@
-API_VER = @API_VER@
AR = @AR@
-AS = @AS@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
-BOEHM_DEFINES = @BOEHM_DEFINES@
-BREAKPOINT = @BREAKPOINT@
-BTLS_ARCH = @BTLS_ARCH@
-BTLS_CFLAGS = @BTLS_CFLAGS@
-BTLS_CMAKE_ARGS = @BTLS_CMAKE_ARGS@
-BTLS_PLATFORM = @BTLS_PLATFORM@
-BTLS_ROOT = @BTLS_ROOT@
-BUILD_EXEEXT = @BUILD_EXEEXT@
CC = @CC@
CCAS = @CCAS@
CCASDEPMODE = @CCASDEPMODE@
CCASFLAGS = @CCASFLAGS@
CCDEPMODE = @CCDEPMODE@
-CC_FOR_BUILD = @CC_FOR_BUILD@
CFLAGS = @CFLAGS@
-CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@
-CMAKE = @CMAKE@
-COREARCH = @COREARCH@
-CORETARGETS = @CORETARGETS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
-CSC = @CSC@
-CXX = @CXX@
-CXXCPP = @CXXCPP@
-CXXDEPMODE = @CXXDEPMODE@
-CXXFLAGS = @CXXFLAGS@
-CXXFLAGS_COMMON = @CXXFLAGS_COMMON@
-CXX_ADD_CFLAGS = @CXX_ADD_CFLAGS@
-CXX_REMOVE_CFLAGS = @CXX_REMOVE_CFLAGS@
CYGPATH_W = @CYGPATH_W@
-DEFAULT_PROFILE = @DEFAULT_PROFILE@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
-DOLT_BASH = @DOLT_BASH@
DSYMUTIL = @DSYMUTIL@
-DTRACE = @DTRACE@
-DTRACEFLAGS = @DTRACEFLAGS@
DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
-EXTERNAL_LLVM_CONFIG = @EXTERNAL_LLVM_CONFIG@
-EXTERNAL_LLVM_CONFIG_WIN32 = @EXTERNAL_LLVM_CONFIG_WIN32@
FGREP = @FGREP@
-GDKX11 = @GDKX11@
-GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
-GLIB_CFLAGS = @GLIB_CFLAGS@
-GMSGFMT = @GMSGFMT@
-GMSGFMT_015 = @GMSGFMT_015@
-GNUC_NORETURN = @GNUC_NORETURN@
-GNUC_PRETTY = @GNUC_PRETTY@
-GNUC_UNUSED = @GNUC_UNUSED@
GREP = @GREP@
-GSIZE = @GSIZE@
-GSIZE_FORMAT = @GSIZE_FORMAT@
-GSSIZE = @GSSIZE@
-GTKX11 = @GTKX11@
-HAVE_ALLOCA_H = @HAVE_ALLOCA_H@
-HAVE_MSGFMT = @HAVE_MSGFMT@
-HAVE_NINJA = @HAVE_NINJA@
-HAVE_UNISTD_H = @HAVE_UNISTD_H@
-HAVE_YASM = @HAVE_YASM@
-HOST_CC = @HOST_CC@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-INTERP_CFLAGS = @INTERP_CFLAGS@
-INTL = @INTL@
-INVARIANT_AOT_OPTIONS = @INVARIANT_AOT_OPTIONS@
-JEMALLOC_AUTOCONF_FLAGS = @JEMALLOC_AUTOCONF_FLAGS@
-JEMALLOC_CFLAGS = @JEMALLOC_CFLAGS@
-JEMALLOC_CPPFLAGS = @JEMALLOC_CPPFLAGS@
-JEMALLOC_LDFLAGS = @JEMALLOC_LDFLAGS@
LD = @LD@
LDFLAGS = @LDFLAGS@
-LIBC = @LIBC@
-LIBGC_CPPFLAGS = @LIBGC_CPPFLAGS@
-LIBGC_LIBS = @LIBGC_LIBS@
-LIBGC_STATIC_LIBS = @LIBGC_STATIC_LIBS@
-LIBMONO_LA = @LIBMONO_LA@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
LIPO = @LIPO@
-LLVM_CODEGEN_LIBS = @LLVM_CODEGEN_LIBS@
LN_S = @LN_S@
-LTCOMPILE = @LTCOMPILE@
-LTCXXCOMPILE = @LTCXXCOMPILE@
LTLIBOBJS = @LTLIBOBJS@
LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
-MONO_CORLIB_VERSION = @MONO_CORLIB_VERSION@
-MONO_CXXLD = @MONO_CXXLD@
-MONO_JEMALLOC_ASSERT = @MONO_JEMALLOC_ASSERT@
-MONO_JEMALLOC_DEFAULT = @MONO_JEMALLOC_DEFAULT@
-MONO_JEMALLOC_ENABLED = @MONO_JEMALLOC_ENABLED@
-MONO_NATIVE_CC = @MONO_NATIVE_CC@
-MONO_NATIVE_CCASFLAGS = @MONO_NATIVE_CCASFLAGS@
-MONO_NATIVE_CFLAGS = @MONO_NATIVE_CFLAGS@
-MONO_NATIVE_COMPAT_CCASFLAGS = @MONO_NATIVE_COMPAT_CCASFLAGS@
-MONO_NATIVE_COMPAT_CFLAGS = @MONO_NATIVE_COMPAT_CFLAGS@
-MONO_NATIVE_COMPAT_CPPFLAGS = @MONO_NATIVE_COMPAT_CPPFLAGS@
-MONO_NATIVE_COMPAT_CXXFLAGS = @MONO_NATIVE_COMPAT_CXXFLAGS@
-MONO_NATIVE_COMPAT_LDFLAGS = @MONO_NATIVE_COMPAT_LDFLAGS@
-MONO_NATIVE_CPPFLAGS = @MONO_NATIVE_CPPFLAGS@
-MONO_NATIVE_CXX = @MONO_NATIVE_CXX@
-MONO_NATIVE_CXXFLAGS = @MONO_NATIVE_CXXFLAGS@
-MONO_NATIVE_LDFLAGS = @MONO_NATIVE_LDFLAGS@
-MONO_NATIVE_LIBADD = @MONO_NATIVE_LIBADD@
-MONO_NATIVE_LIBRARY_NAME = @MONO_NATIVE_LIBRARY_NAME@
-MONO_NATIVE_PLATFORM = @MONO_NATIVE_PLATFORM@
-MONO_NATIVE_PLATFORM_TYPE = @MONO_NATIVE_PLATFORM_TYPE@
-MONO_NATIVE_PLATFORM_TYPE_COMPAT = @MONO_NATIVE_PLATFORM_TYPE_COMPAT@
-MONO_NATIVE_PLATFORM_TYPE_UNIFIED = @MONO_NATIVE_PLATFORM_TYPE_UNIFIED@
-MONO_NATIVE_UNIFIED_CCASFLAGS = @MONO_NATIVE_UNIFIED_CCASFLAGS@
-MONO_NATIVE_UNIFIED_CFLAGS = @MONO_NATIVE_UNIFIED_CFLAGS@
-MONO_NATIVE_UNIFIED_CPPFLAGS = @MONO_NATIVE_UNIFIED_CPPFLAGS@
-MONO_NATIVE_UNIFIED_CXXFLAGS = @MONO_NATIVE_UNIFIED_CXXFLAGS@
-MONO_NATIVE_UNIFIED_LDFLAGS = @MONO_NATIVE_UNIFIED_LDFLAGS@
-MONO_NOINST_SUBDIRS = @MONO_NOINST_SUBDIRS@
-MONO_SUBDIRS = @MONO_SUBDIRS@
-MSGFMT = @MSGFMT@
-MSGFMT_015 = @MSGFMT_015@
-MSGMERGE = @MSGMERGE@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@
-ODBC = @ODBC@
-ORDER = @ORDER@
-OS = @OS@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@
@@ -292,59 +214,27 @@ PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
-PATHSEP = @PATHSEP@
PATH_SEPARATOR = @PATH_SEPARATOR@
-PIDTYPE = @PIDTYPE@
-PKG_CONFIG = @PKG_CONFIG@
-PLATFORM_AOT_PREFIX = @PLATFORM_AOT_PREFIX@
-PLATFORM_AOT_SUFFIX = @PLATFORM_AOT_SUFFIX@
-PYTHON = @PYTHON@
-PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
-PYTHON_PLATFORM = @PYTHON_PLATFORM@
-PYTHON_PREFIX = @PYTHON_PREFIX@
-PYTHON_VERSION = @PYTHON_VERSION@
+PICFLAG = @PICFLAG@
RANLIB = @RANLIB@
-RID = @RID@
-SEARCHSEP = @SEARCHSEP@
SED = @SED@
SET_MAKE = @SET_MAKE@
-SGEN_DEFINES = @SGEN_DEFINES@
-SHARED_CFLAGS = @SHARED_CFLAGS@
SHELL = @SHELL@
-SIZEOF_VOID_P = @SIZEOF_VOID_P@
-SQLITE = @SQLITE@
-SQLITE3 = @SQLITE3@
-STATIC_GCC_LIBS = @STATIC_GCC_LIBS@
-STATIC_ZLIB_PATH = @STATIC_ZLIB_PATH@
STRIP = @STRIP@
-TEST_PROFILE = @TEST_PROFILE@
-USE_NLS = @USE_NLS@
+THREADDLLIBS = @THREADDLLIBS@
VERSION = @VERSION@
-VTUNE_CFLAGS = @VTUNE_CFLAGS@
-VTUNE_LIBS = @VTUNE_LIBS@
-WERROR_CFLAGS = @WERROR_CFLAGS@
-X11 = @X11@
-XATTR_LIB = @XATTR_LIB@
-XGETTEXT = @XGETTEXT@
-XGETTEXT_015 = @XGETTEXT_015@
-XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
-XINERAMA = @XINERAMA@
-XMKMF = @XMKMF@
-ZLIB_CFLAGS = @ZLIB_CFLAGS@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
-ac_ct_CXX = @ac_ct_CXX@
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
-arch_target = @arch_target@
bindir = @bindir@
build = @build@
build_alias = @build_alias@
@@ -357,8 +247,6 @@ datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
-export_ldflags = @export_ldflags@
-extra_runtime_ldflags = @extra_runtime_ldflags@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
@@ -370,39 +258,19 @@ infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
-libgdiplus_install_loc = @libgdiplus_install_loc@
-libgdiplus_loc = @libgdiplus_loc@
-libmono_cflags = @libmono_cflags@
-libmono_ldflags = @libmono_ldflags@
-libsuffix = @libsuffix@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
-mcs_topdir = @mcs_topdir@
-mcs_topdir_from_srcdir = @mcs_topdir_from_srcdir@
mkdir_p = @mkdir_p@
-mono_build_root = @mono_build_root@
-mono_cfg_dir = @mono_cfg_dir@
-mono_msvc_build_bin_dir = @mono_msvc_build_bin_dir@
-mono_msvc_build_dir = @mono_msvc_build_dir@
-mono_msvc_build_lib_dir = @mono_msvc_build_lib_dir@
-mono_runtime = @mono_runtime@
-mono_runtime_wrapper = @mono_runtime_wrapper@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
-pkgpyexecdir = @pkgpyexecdir@
-pkgpythondir = @pkgpythondir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
-pyexecdir = @pyexecdir@
-pythondir = @pythondir@
-reloc_libdir = @reloc_libdir@
runstatedir = @runstatedir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
-subdirs = @subdirs@
sysconfdir = @sysconfdir@
target = @target@
target_alias = @target_alias@
@@ -412,7 +280,12 @@ target_vendor = @target_vendor@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
-EXTRA_DIST = common.mk
+
+# installed documentation
+#
+dist_pkgdata_DATA = LICENSING.txt README.txt README_stack.txt \
+ README_malloc.txt README_win32.txt
+
all: all-am
.SUFFIXES:
@@ -425,9 +298,9 @@ $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__confi
exit 1;; \
esac; \
done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign mk/Makefile'; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign doc/Makefile'; \
$(am__cd) $(top_srcdir) && \
- $(AUTOMAKE) --foreign mk/Makefile
+ $(AUTOMAKE) --foreign doc/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
@@ -451,8 +324,27 @@ mostlyclean-libtool:
clean-libtool:
-rm -rf .libs _libs
-test-local:
-test-bundle-local:
+install-dist_pkgdataDATA: $(dist_pkgdata_DATA)
+ @$(NORMAL_INSTALL)
+ @list='$(dist_pkgdata_DATA)'; test -n "$(pkgdatadir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(pkgdatadir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(pkgdatadir)" || exit 1; \
+ fi; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgdatadir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgdatadir)" || exit $$?; \
+ done
+
+uninstall-dist_pkgdataDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(dist_pkgdata_DATA)'; test -n "$(pkgdatadir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ dir='$(DESTDIR)$(pkgdatadir)'; $(am__uninstall_files_from_dir)
tags TAGS:
ctags CTAGS:
@@ -492,8 +384,11 @@ distdir: $(DISTFILES)
done
check-am: all-am
check: check-am
-all-am: Makefile
+all-am: Makefile $(DATA)
installdirs:
+ for dir in "$(DESTDIR)$(pkgdatadir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
install: install-am
install-exec: install-exec-am
install-data: install-data-am
@@ -544,7 +439,7 @@ info: info-am
info-am:
-install-data-am:
+install-data-am: install-dist_pkgdataDATA
install-dvi: install-dvi-am
@@ -588,30 +483,22 @@ ps: ps-am
ps-am:
-test: test-am
-
-test-am: test-local
-
-test-bundle: test-bundle-am
-
-test-bundle-am: test-bundle-local
-
-uninstall-am:
+uninstall-am: uninstall-dist_pkgdataDATA
.MAKE: install-am install-strip
.PHONY: all all-am check check-am clean clean-generic clean-libtool \
cscopelist-am ctags-am distclean distclean-generic \
distclean-libtool distdir dvi dvi-am html html-am info info-am \
- install install-am install-data install-data-am install-dvi \
- install-dvi-am install-exec install-exec-am install-html \
- install-html-am install-info install-info-am install-man \
- install-pdf install-pdf-am install-ps install-ps-am \
- install-strip installcheck installcheck-am installdirs \
- maintainer-clean maintainer-clean-generic mostlyclean \
- mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
- tags-am test-am test-bundle-am test-bundle-local test-local \
- uninstall uninstall-am
+ install install-am install-data install-data-am \
+ install-dist_pkgdataDATA install-dvi install-dvi-am \
+ install-exec install-exec-am install-html install-html-am \
+ install-info install-info-am install-man install-pdf \
+ install-pdf-am install-ps install-ps-am install-strip \
+ installcheck installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic \
+ mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \
+ uninstall-am uninstall-dist_pkgdataDATA
.PRECIOUS: Makefile
diff --git a/external/bdwgc/libatomic_ops/install-sh b/external/bdwgc/libatomic_ops/install-sh
new file mode 100755
index 0000000000..59990a1049
--- /dev/null
+++ b/external/bdwgc/libatomic_ops/install-sh
@@ -0,0 +1,508 @@
+#!/bin/sh
+# install - install a program, script, or datafile
+
+scriptversion=2014-09-12.12; # UTC
+
+# This originates from X11R5 (mit/util/scripts/install.sh), which was
+# later released in X11R6 (xc/config/util/install.sh) with the
+# following copyright and license.
+#
+# Copyright (C) 1994 X Consortium
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to
+# deal in the Software without restriction, including without limitation the
+# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+# sell copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
+# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+# Except as contained in this notice, the name of the X Consortium shall not
+# be used in advertising or otherwise to promote the sale, use or other deal-
+# ings in this Software without prior written authorization from the X Consor-
+# tium.
+#
+#
+# FSF changes to this file are in the public domain.
+#
+# Calling this script install-sh is preferred over install.sh, to prevent
+# 'make' implicit rules from creating a file called install from it
+# when there is no Makefile.
+#
+# This script is compatible with the BSD install script, but was written
+# from scratch.
+
+tab=' '
+nl='
+'
+IFS=" $tab$nl"
+
+# Set DOITPROG to "echo" to test this script.
+
+doit=${DOITPROG-}
+doit_exec=${doit:-exec}
+
+# Put in absolute file names if you don't have them in your path;
+# or use environment vars.
+
+chgrpprog=${CHGRPPROG-chgrp}
+chmodprog=${CHMODPROG-chmod}
+chownprog=${CHOWNPROG-chown}
+cmpprog=${CMPPROG-cmp}
+cpprog=${CPPROG-cp}
+mkdirprog=${MKDIRPROG-mkdir}
+mvprog=${MVPROG-mv}
+rmprog=${RMPROG-rm}
+stripprog=${STRIPPROG-strip}
+
+posix_mkdir=
+
+# Desired mode of installed file.
+mode=0755
+
+chgrpcmd=
+chmodcmd=$chmodprog
+chowncmd=
+mvcmd=$mvprog
+rmcmd="$rmprog -f"
+stripcmd=
+
+src=
+dst=
+dir_arg=
+dst_arg=
+
+copy_on_change=false
+is_target_a_directory=possibly
+
+usage="\
+Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
+ or: $0 [OPTION]... SRCFILES... DIRECTORY
+ or: $0 [OPTION]... -t DIRECTORY SRCFILES...
+ or: $0 [OPTION]... -d DIRECTORIES...
+
+In the 1st form, copy SRCFILE to DSTFILE.
+In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
+In the 4th, create DIRECTORIES.
+
+Options:
+ --help display this help and exit.
+ --version display version info and exit.
+
+ -c (ignored)
+ -C install only if different (preserve the last data modification time)
+ -d create directories instead of installing files.
+ -g GROUP $chgrpprog installed files to GROUP.
+ -m MODE $chmodprog installed files to MODE.
+ -o USER $chownprog installed files to USER.
+ -s $stripprog installed files.
+ -t DIRECTORY install into DIRECTORY.
+ -T report an error if DSTFILE is a directory.
+
+Environment variables override the default commands:
+ CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
+ RMPROG STRIPPROG
+"
+
+while test $# -ne 0; do
+ case $1 in
+ -c) ;;
+
+ -C) copy_on_change=true;;
+
+ -d) dir_arg=true;;
+
+ -g) chgrpcmd="$chgrpprog $2"
+ shift;;
+
+ --help) echo "$usage"; exit $?;;
+
+ -m) mode=$2
+ case $mode in
+ *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*)
+ echo "$0: invalid mode: $mode" >&2
+ exit 1;;
+ esac
+ shift;;
+
+ -o) chowncmd="$chownprog $2"
+ shift;;
+
+ -s) stripcmd=$stripprog;;
+
+ -t)
+ is_target_a_directory=always
+ dst_arg=$2
+ # Protect names problematic for 'test' and other utilities.
+ case $dst_arg in
+ -* | [=\(\)!]) dst_arg=./$dst_arg;;
+ esac
+ shift;;
+
+ -T) is_target_a_directory=never;;
+
+ --version) echo "$0 $scriptversion"; exit $?;;
+
+ --) shift
+ break;;
+
+ -*) echo "$0: invalid option: $1" >&2
+ exit 1;;
+
+ *) break;;
+ esac
+ shift
+done
+
+# We allow the use of options -d and -T together, by making -d
+# take the precedence; this is for compatibility with GNU install.
+
+if test -n "$dir_arg"; then
+ if test -n "$dst_arg"; then
+ echo "$0: target directory not allowed when installing a directory." >&2
+ exit 1
+ fi
+fi
+
+if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
+ # When -d is used, all remaining arguments are directories to create.
+ # When -t is used, the destination is already specified.
+ # Otherwise, the last argument is the destination. Remove it from $@.
+ for arg
+ do
+ if test -n "$dst_arg"; then
+ # $@ is not empty: it contains at least $arg.
+ set fnord "$@" "$dst_arg"
+ shift # fnord
+ fi
+ shift # arg
+ dst_arg=$arg
+ # Protect names problematic for 'test' and other utilities.
+ case $dst_arg in
+ -* | [=\(\)!]) dst_arg=./$dst_arg;;
+ esac
+ done
+fi
+
+if test $# -eq 0; then
+ if test -z "$dir_arg"; then
+ echo "$0: no input file specified." >&2
+ exit 1
+ fi
+ # It's OK to call 'install-sh -d' without argument.
+ # This can happen when creating conditional directories.
+ exit 0
+fi
+
+if test -z "$dir_arg"; then
+ if test $# -gt 1 || test "$is_target_a_directory" = always; then
+ if test ! -d "$dst_arg"; then
+ echo "$0: $dst_arg: Is not a directory." >&2
+ exit 1
+ fi
+ fi
+fi
+
+if test -z "$dir_arg"; then
+ do_exit='(exit $ret); exit $ret'
+ trap "ret=129; $do_exit" 1
+ trap "ret=130; $do_exit" 2
+ trap "ret=141; $do_exit" 13
+ trap "ret=143; $do_exit" 15
+
+ # Set umask so as not to create temps with too-generous modes.
+ # However, 'strip' requires both read and write access to temps.
+ case $mode in
+ # Optimize common cases.
+ *644) cp_umask=133;;
+ *755) cp_umask=22;;
+
+ *[0-7])
+ if test -z "$stripcmd"; then
+ u_plus_rw=
+ else
+ u_plus_rw='% 200'
+ fi
+ cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
+ *)
+ if test -z "$stripcmd"; then
+ u_plus_rw=
+ else
+ u_plus_rw=,u+rw
+ fi
+ cp_umask=$mode$u_plus_rw;;
+ esac
+fi
+
+for src
+do
+ # Protect names problematic for 'test' and other utilities.
+ case $src in
+ -* | [=\(\)!]) src=./$src;;
+ esac
+
+ if test -n "$dir_arg"; then
+ dst=$src
+ dstdir=$dst
+ test -d "$dstdir"
+ dstdir_status=$?
+ else
+
+ # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
+ # might cause directories to be created, which would be especially bad
+ # if $src (and thus $dsttmp) contains '*'.
+ if test ! -f "$src" && test ! -d "$src"; then
+ echo "$0: $src does not exist." >&2
+ exit 1
+ fi
+
+ if test -z "$dst_arg"; then
+ echo "$0: no destination specified." >&2
+ exit 1
+ fi
+ dst=$dst_arg
+
+ # If destination is a directory, append the input filename; won't work
+ # if double slashes aren't ignored.
+ if test -d "$dst"; then
+ if test "$is_target_a_directory" = never; then
+ echo "$0: $dst_arg: Is a directory" >&2
+ exit 1
+ fi
+ dstdir=$dst
+ dst=$dstdir/`basename "$src"`
+ dstdir_status=0
+ else
+ dstdir=`dirname "$dst"`
+ test -d "$dstdir"
+ dstdir_status=$?
+ fi
+ fi
+
+ obsolete_mkdir_used=false
+
+ if test $dstdir_status != 0; then
+ case $posix_mkdir in
+ '')
+ # Create intermediate dirs using mode 755 as modified by the umask.
+ # This is like FreeBSD 'install' as of 1997-10-28.
+ umask=`umask`
+ case $stripcmd.$umask in
+ # Optimize common cases.
+ *[2367][2367]) mkdir_umask=$umask;;
+ .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
+
+ *[0-7])
+ mkdir_umask=`expr $umask + 22 \
+ - $umask % 100 % 40 + $umask % 20 \
+ - $umask % 10 % 4 + $umask % 2
+ `;;
+ *) mkdir_umask=$umask,go-w;;
+ esac
+
+ # With -d, create the new directory with the user-specified mode.
+ # Otherwise, rely on $mkdir_umask.
+ if test -n "$dir_arg"; then
+ mkdir_mode=-m$mode
+ else
+ mkdir_mode=
+ fi
+
+ posix_mkdir=false
+ case $umask in
+ *[123567][0-7][0-7])
+ # POSIX mkdir -p sets u+wx bits regardless of umask, which
+ # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
+ ;;
+ *)
+ # $RANDOM is not portable (e.g. dash); use it when possible to
+ # lower collision chance
+ tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
+ trap 'ret=$?; rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null; exit $ret' 0
+
+ # As "mkdir -p" follows symlinks and we work in /tmp possibly; so
+ # create the $tmpdir first (and fail if unsuccessful) to make sure
+ # that nobody tries to guess the $tmpdir name.
+ if (umask $mkdir_umask &&
+ $mkdirprog $mkdir_mode "$tmpdir" &&
+ exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1
+ then
+ if test -z "$dir_arg" || {
+ # Check for POSIX incompatibilities with -m.
+ # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
+ # other-writable bit of parent directory when it shouldn't.
+ # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
+ test_tmpdir="$tmpdir/a"
+ ls_ld_tmpdir=`ls -ld "$test_tmpdir"`
+ case $ls_ld_tmpdir in
+ d????-?r-*) different_mode=700;;
+ d????-?--*) different_mode=755;;
+ *) false;;
+ esac &&
+ $mkdirprog -m$different_mode -p -- "$test_tmpdir" && {
+ ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"`
+ test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
+ }
+ }
+ then posix_mkdir=:
+ fi
+ rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir"
+ else
+ # Remove any dirs left behind by ancient mkdir implementations.
+ rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null
+ fi
+ trap '' 0;;
+ esac;;
+ esac
+
+ if
+ $posix_mkdir && (
+ umask $mkdir_umask &&
+ $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
+ )
+ then :
+ else
+
+ # The umask is ridiculous, or mkdir does not conform to POSIX,
+ # or it failed possibly due to a race condition. Create the
+ # directory the slow way, step by step, checking for races as we go.
+
+ case $dstdir in
+ /*) prefix='/';;
+ [-=\(\)!]*) prefix='./';;
+ *) prefix='';;
+ esac
+
+ oIFS=$IFS
+ IFS=/
+ set -f
+ set fnord $dstdir
+ shift
+ set +f
+ IFS=$oIFS
+
+ prefixes=
+
+ for d
+ do
+ test X"$d" = X && continue
+
+ prefix=$prefix$d
+ if test -d "$prefix"; then
+ prefixes=
+ else
+ if $posix_mkdir; then
+ (umask=$mkdir_umask &&
+ $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
+ # Don't fail if two instances are running concurrently.
+ test -d "$prefix" || exit 1
+ else
+ case $prefix in
+ *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
+ *) qprefix=$prefix;;
+ esac
+ prefixes="$prefixes '$qprefix'"
+ fi
+ fi
+ prefix=$prefix/
+ done
+
+ if test -n "$prefixes"; then
+ # Don't fail if two instances are running concurrently.
+ (umask $mkdir_umask &&
+ eval "\$doit_exec \$mkdirprog $prefixes") ||
+ test -d "$dstdir" || exit 1
+ obsolete_mkdir_used=true
+ fi
+ fi
+ fi
+
+ if test -n "$dir_arg"; then
+ { test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
+ { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
+ { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
+ test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
+ else
+
+ # Make a couple of temp file names in the proper directory.
+ dsttmp=$dstdir/_inst.$$_
+ rmtmp=$dstdir/_rm.$$_
+
+ # Trap to clean up those temp files at exit.
+ trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
+
+ # Copy the file name to the temp name.
+ (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
+
+ # and set any options; do chmod last to preserve setuid bits.
+ #
+ # If any of these fail, we abort the whole thing. If we want to
+ # ignore errors from any of these, just make sure not to ignore
+ # errors from the above "$doit $cpprog $src $dsttmp" command.
+ #
+ { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
+ { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
+ { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
+ { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
+
+ # If -C, don't bother to copy if it wouldn't change the file.
+ if $copy_on_change &&
+ old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
+ new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
+ set -f &&
+ set X $old && old=:$2:$4:$5:$6 &&
+ set X $new && new=:$2:$4:$5:$6 &&
+ set +f &&
+ test "$old" = "$new" &&
+ $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
+ then
+ rm -f "$dsttmp"
+ else
+ # Rename the file to the real destination.
+ $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
+
+ # The rename failed, perhaps because mv can't rename something else
+ # to itself, or perhaps because mv is so ancient that it does not
+ # support -f.
+ {
+ # Now remove or move aside any old file at destination location.
+ # We try this two ways since rm can't unlink itself on some
+ # systems and the destination file might be busy for other
+ # reasons. In this case, the final cleanup might fail but the new
+ # file should still install successfully.
+ {
+ test ! -f "$dst" ||
+ $doit $rmcmd -f "$dst" 2>/dev/null ||
+ { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
+ { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
+ } ||
+ { echo "$0: cannot unlink or rename $dst" >&2
+ (exit 1); exit 1
+ }
+ } &&
+
+ # Now rename the file to the real destination.
+ $doit $mvcmd "$dsttmp" "$dst"
+ }
+ fi || exit 1
+
+ trap '' 0
+ fi
+done
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/external/bdwgc/libatomic_ops/ltmain.sh.REMOVED.git-id b/external/bdwgc/libatomic_ops/ltmain.sh.REMOVED.git-id
new file mode 100644
index 0000000000..c78b937b5d
--- /dev/null
+++ b/external/bdwgc/libatomic_ops/ltmain.sh.REMOVED.git-id
@@ -0,0 +1 @@
+147d758abcb48cacb99f268d6b9fecb29205d793
\ No newline at end of file
diff --git a/external/bdwgc/libatomic_ops/m4/libtool.m4.REMOVED.git-id b/external/bdwgc/libatomic_ops/m4/libtool.m4.REMOVED.git-id
new file mode 100644
index 0000000000..f22add863b
--- /dev/null
+++ b/external/bdwgc/libatomic_ops/m4/libtool.m4.REMOVED.git-id
@@ -0,0 +1 @@
+10ab2844c4edd299059ffcf84b9a61328d9ab6ff
\ No newline at end of file
diff --git a/external/bdwgc/libatomic_ops/m4/ltoptions.m4 b/external/bdwgc/libatomic_ops/m4/ltoptions.m4
new file mode 100644
index 0000000000..94b0829766
--- /dev/null
+++ b/external/bdwgc/libatomic_ops/m4/ltoptions.m4
@@ -0,0 +1,437 @@
+# Helper functions for option handling. -*- Autoconf -*-
+#
+# Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software
+# Foundation, Inc.
+# Written by Gary V. Vaughan, 2004
+#
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+
+# serial 8 ltoptions.m4
+
+# This is to help aclocal find these macros, as it can't see m4_define.
+AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
+
+
+# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
+# ------------------------------------------
+m4_define([_LT_MANGLE_OPTION],
+[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
+
+
+# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
+# ---------------------------------------
+# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
+# matching handler defined, dispatch to it. Other OPTION-NAMEs are
+# saved as a flag.
+m4_define([_LT_SET_OPTION],
+[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
+m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
+ _LT_MANGLE_DEFUN([$1], [$2]),
+ [m4_warning([Unknown $1 option '$2'])])[]dnl
+])
+
+
+# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
+# ------------------------------------------------------------
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+m4_define([_LT_IF_OPTION],
+[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
+
+
+# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
+# -------------------------------------------------------
+# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
+# are set.
+m4_define([_LT_UNLESS_OPTIONS],
+[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
+ [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
+ [m4_define([$0_found])])])[]dnl
+m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
+])[]dnl
+])
+
+
+# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
+# ----------------------------------------
+# OPTION-LIST is a space-separated list of Libtool options associated
+# with MACRO-NAME. If any OPTION has a matching handler declared with
+# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
+# the unknown option and exit.
+m4_defun([_LT_SET_OPTIONS],
+[# Set options
+m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
+ [_LT_SET_OPTION([$1], _LT_Option)])
+
+m4_if([$1],[LT_INIT],[
+ dnl
+ dnl Simply set some default values (i.e off) if boolean options were not
+ dnl specified:
+ _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
+ ])
+ _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
+ ])
+ dnl
+ dnl If no reference was made to various pairs of opposing options, then
+ dnl we run the default mode handler for the pair. For example, if neither
+ dnl 'shared' nor 'disable-shared' was passed, we enable building of shared
+ dnl archives by default:
+ _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
+ _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
+ _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
+ _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
+ [_LT_ENABLE_FAST_INSTALL])
+ _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4],
+ [_LT_WITH_AIX_SONAME([aix])])
+ ])
+])# _LT_SET_OPTIONS
+
+
+## --------------------------------- ##
+## Macros to handle LT_INIT options. ##
+## --------------------------------- ##
+
+# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
+# -----------------------------------------
+m4_define([_LT_MANGLE_DEFUN],
+[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
+
+
+# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
+# -----------------------------------------------
+m4_define([LT_OPTION_DEFINE],
+[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
+])# LT_OPTION_DEFINE
+
+
+# dlopen
+# ------
+LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
+])
+
+AU_DEFUN([AC_LIBTOOL_DLOPEN],
+[_LT_SET_OPTION([LT_INIT], [dlopen])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you
+put the 'dlopen' option into LT_INIT's first parameter.])
+])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
+
+
+# win32-dll
+# ---------
+# Declare package support for building win32 dll's.
+LT_OPTION_DEFINE([LT_INIT], [win32-dll],
+[enable_win32_dll=yes
+
+case $host in
+*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
+ AC_CHECK_TOOL(AS, as, false)
+ AC_CHECK_TOOL(DLLTOOL, dlltool, false)
+ AC_CHECK_TOOL(OBJDUMP, objdump, false)
+ ;;
+esac
+
+test -z "$AS" && AS=as
+_LT_DECL([], [AS], [1], [Assembler program])dnl
+
+test -z "$DLLTOOL" && DLLTOOL=dlltool
+_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
+
+test -z "$OBJDUMP" && OBJDUMP=objdump
+_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
+])# win32-dll
+
+AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+_LT_SET_OPTION([LT_INIT], [win32-dll])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you
+put the 'win32-dll' option into LT_INIT's first parameter.])
+])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
+
+
+# _LT_ENABLE_SHARED([DEFAULT])
+# ----------------------------
+# implement the --enable-shared flag, and supports the 'shared' and
+# 'disable-shared' LT_INIT options.
+# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'.
+m4_define([_LT_ENABLE_SHARED],
+[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
+AC_ARG_ENABLE([shared],
+ [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
+ [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
+ [p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_shared=yes ;;
+ no) enable_shared=no ;;
+ *)
+ enable_shared=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
+ for pkg in $enableval; do
+ IFS=$lt_save_ifs
+ if test "X$pkg" = "X$p"; then
+ enable_shared=yes
+ fi
+ done
+ IFS=$lt_save_ifs
+ ;;
+ esac],
+ [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
+
+ _LT_DECL([build_libtool_libs], [enable_shared], [0],
+ [Whether or not to build shared libraries])
+])# _LT_ENABLE_SHARED
+
+LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
+LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
+
+# Old names:
+AC_DEFUN([AC_ENABLE_SHARED],
+[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
+])
+
+AC_DEFUN([AC_DISABLE_SHARED],
+[_LT_SET_OPTION([LT_INIT], [disable-shared])
+])
+
+AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
+AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AM_ENABLE_SHARED], [])
+dnl AC_DEFUN([AM_DISABLE_SHARED], [])
+
+
+
+# _LT_ENABLE_STATIC([DEFAULT])
+# ----------------------------
+# implement the --enable-static flag, and support the 'static' and
+# 'disable-static' LT_INIT options.
+# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'.
+m4_define([_LT_ENABLE_STATIC],
+[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
+AC_ARG_ENABLE([static],
+ [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
+ [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
+ [p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_static=yes ;;
+ no) enable_static=no ;;
+ *)
+ enable_static=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
+ for pkg in $enableval; do
+ IFS=$lt_save_ifs
+ if test "X$pkg" = "X$p"; then
+ enable_static=yes
+ fi
+ done
+ IFS=$lt_save_ifs
+ ;;
+ esac],
+ [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
+
+ _LT_DECL([build_old_libs], [enable_static], [0],
+ [Whether or not to build static libraries])
+])# _LT_ENABLE_STATIC
+
+LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
+LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
+
+# Old names:
+AC_DEFUN([AC_ENABLE_STATIC],
+[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
+])
+
+AC_DEFUN([AC_DISABLE_STATIC],
+[_LT_SET_OPTION([LT_INIT], [disable-static])
+])
+
+AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
+AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AM_ENABLE_STATIC], [])
+dnl AC_DEFUN([AM_DISABLE_STATIC], [])
+
+
+
+# _LT_ENABLE_FAST_INSTALL([DEFAULT])
+# ----------------------------------
+# implement the --enable-fast-install flag, and support the 'fast-install'
+# and 'disable-fast-install' LT_INIT options.
+# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'.
+m4_define([_LT_ENABLE_FAST_INSTALL],
+[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
+AC_ARG_ENABLE([fast-install],
+ [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
+ [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
+ [p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_fast_install=yes ;;
+ no) enable_fast_install=no ;;
+ *)
+ enable_fast_install=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
+ for pkg in $enableval; do
+ IFS=$lt_save_ifs
+ if test "X$pkg" = "X$p"; then
+ enable_fast_install=yes
+ fi
+ done
+ IFS=$lt_save_ifs
+ ;;
+ esac],
+ [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
+
+_LT_DECL([fast_install], [enable_fast_install], [0],
+ [Whether or not to optimize for fast installation])dnl
+])# _LT_ENABLE_FAST_INSTALL
+
+LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
+LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
+
+# Old names:
+AU_DEFUN([AC_ENABLE_FAST_INSTALL],
+[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you put
+the 'fast-install' option into LT_INIT's first parameter.])
+])
+
+AU_DEFUN([AC_DISABLE_FAST_INSTALL],
+[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you put
+the 'disable-fast-install' option into LT_INIT's first parameter.])
+])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
+dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
+
+
+# _LT_WITH_AIX_SONAME([DEFAULT])
+# ----------------------------------
+# implement the --with-aix-soname flag, and support the `aix-soname=aix'
+# and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT
+# is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'.
+m4_define([_LT_WITH_AIX_SONAME],
+[m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl
+shared_archive_member_spec=
+case $host,$enable_shared in
+power*-*-aix[[5-9]]*,yes)
+ AC_MSG_CHECKING([which variant of shared library versioning to provide])
+ AC_ARG_WITH([aix-soname],
+ [AS_HELP_STRING([--with-aix-soname=aix|svr4|both],
+ [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])],
+ [case $withval in
+ aix|svr4|both)
+ ;;
+ *)
+ AC_MSG_ERROR([Unknown argument to --with-aix-soname])
+ ;;
+ esac
+ lt_cv_with_aix_soname=$with_aix_soname],
+ [AC_CACHE_VAL([lt_cv_with_aix_soname],
+ [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT)
+ with_aix_soname=$lt_cv_with_aix_soname])
+ AC_MSG_RESULT([$with_aix_soname])
+ if test aix != "$with_aix_soname"; then
+ # For the AIX way of multilib, we name the shared archive member
+ # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
+ # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File.
+ # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag,
+ # the AIX toolchain works better with OBJECT_MODE set (default 32).
+ if test 64 = "${OBJECT_MODE-32}"; then
+ shared_archive_member_spec=shr_64
+ else
+ shared_archive_member_spec=shr
+ fi
+ fi
+ ;;
+*)
+ with_aix_soname=aix
+ ;;
+esac
+
+_LT_DECL([], [shared_archive_member_spec], [0],
+ [Shared archive member basename, for filename based shared library versioning on AIX])dnl
+])# _LT_WITH_AIX_SONAME
+
+LT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])])
+LT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])])
+LT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])])
+
+
+# _LT_WITH_PIC([MODE])
+# --------------------
+# implement the --with-pic flag, and support the 'pic-only' and 'no-pic'
+# LT_INIT options.
+# MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'.
+m4_define([_LT_WITH_PIC],
+[AC_ARG_WITH([pic],
+ [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
+ [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
+ [lt_p=${PACKAGE-default}
+ case $withval in
+ yes|no) pic_mode=$withval ;;
+ *)
+ pic_mode=default
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
+ for lt_pkg in $withval; do
+ IFS=$lt_save_ifs
+ if test "X$lt_pkg" = "X$lt_p"; then
+ pic_mode=yes
+ fi
+ done
+ IFS=$lt_save_ifs
+ ;;
+ esac],
+ [pic_mode=m4_default([$1], [default])])
+
+_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
+])# _LT_WITH_PIC
+
+LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
+LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
+
+# Old name:
+AU_DEFUN([AC_LIBTOOL_PICMODE],
+[_LT_SET_OPTION([LT_INIT], [pic-only])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you
+put the 'pic-only' option into LT_INIT's first parameter.])
+])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
+
+## ----------------- ##
+## LTDL_INIT Options ##
+## ----------------- ##
+
+m4_define([_LTDL_MODE], [])
+LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
+ [m4_define([_LTDL_MODE], [nonrecursive])])
+LT_OPTION_DEFINE([LTDL_INIT], [recursive],
+ [m4_define([_LTDL_MODE], [recursive])])
+LT_OPTION_DEFINE([LTDL_INIT], [subproject],
+ [m4_define([_LTDL_MODE], [subproject])])
+
+m4_define([_LTDL_TYPE], [])
+LT_OPTION_DEFINE([LTDL_INIT], [installable],
+ [m4_define([_LTDL_TYPE], [installable])])
+LT_OPTION_DEFINE([LTDL_INIT], [convenience],
+ [m4_define([_LTDL_TYPE], [convenience])])
diff --git a/external/bdwgc/libatomic_ops/m4/ltsugar.m4 b/external/bdwgc/libatomic_ops/m4/ltsugar.m4
new file mode 100644
index 0000000000..48bc9344a4
--- /dev/null
+++ b/external/bdwgc/libatomic_ops/m4/ltsugar.m4
@@ -0,0 +1,124 @@
+# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
+#
+# Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software
+# Foundation, Inc.
+# Written by Gary V. Vaughan, 2004
+#
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+
+# serial 6 ltsugar.m4
+
+# This is to help aclocal find these macros, as it can't see m4_define.
+AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
+
+
+# lt_join(SEP, ARG1, [ARG2...])
+# -----------------------------
+# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
+# associated separator.
+# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
+# versions in m4sugar had bugs.
+m4_define([lt_join],
+[m4_if([$#], [1], [],
+ [$#], [2], [[$2]],
+ [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
+m4_define([_lt_join],
+[m4_if([$#$2], [2], [],
+ [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
+
+
+# lt_car(LIST)
+# lt_cdr(LIST)
+# ------------
+# Manipulate m4 lists.
+# These macros are necessary as long as will still need to support
+# Autoconf-2.59, which quotes differently.
+m4_define([lt_car], [[$1]])
+m4_define([lt_cdr],
+[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
+ [$#], 1, [],
+ [m4_dquote(m4_shift($@))])])
+m4_define([lt_unquote], $1)
+
+
+# lt_append(MACRO-NAME, STRING, [SEPARATOR])
+# ------------------------------------------
+# Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'.
+# Note that neither SEPARATOR nor STRING are expanded; they are appended
+# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
+# No SEPARATOR is output if MACRO-NAME was previously undefined (different
+# than defined and empty).
+#
+# This macro is needed until we can rely on Autoconf 2.62, since earlier
+# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
+m4_define([lt_append],
+[m4_define([$1],
+ m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
+
+
+
+# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
+# ----------------------------------------------------------
+# Produce a SEP delimited list of all paired combinations of elements of
+# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list
+# has the form PREFIXmINFIXSUFFIXn.
+# Needed until we can rely on m4_combine added in Autoconf 2.62.
+m4_define([lt_combine],
+[m4_if(m4_eval([$# > 3]), [1],
+ [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
+[[m4_foreach([_Lt_prefix], [$2],
+ [m4_foreach([_Lt_suffix],
+ ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
+ [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
+
+
+# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
+# -----------------------------------------------------------------------
+# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
+# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
+m4_define([lt_if_append_uniq],
+[m4_ifdef([$1],
+ [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
+ [lt_append([$1], [$2], [$3])$4],
+ [$5])],
+ [lt_append([$1], [$2], [$3])$4])])
+
+
+# lt_dict_add(DICT, KEY, VALUE)
+# -----------------------------
+m4_define([lt_dict_add],
+[m4_define([$1($2)], [$3])])
+
+
+# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
+# --------------------------------------------
+m4_define([lt_dict_add_subkey],
+[m4_define([$1($2:$3)], [$4])])
+
+
+# lt_dict_fetch(DICT, KEY, [SUBKEY])
+# ----------------------------------
+m4_define([lt_dict_fetch],
+[m4_ifval([$3],
+ m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
+ m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
+
+
+# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
+# -----------------------------------------------------------------
+m4_define([lt_if_dict_fetch],
+[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
+ [$5],
+ [$6])])
+
+
+# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
+# --------------------------------------------------------------
+m4_define([lt_dict_filter],
+[m4_if([$5], [], [],
+ [lt_join(m4_quote(m4_default([$4], [[, ]])),
+ lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
+ [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
+])
diff --git a/external/bdwgc/libatomic_ops/m4/ltversion.m4 b/external/bdwgc/libatomic_ops/m4/ltversion.m4
new file mode 100644
index 0000000000..fa04b52a3b
--- /dev/null
+++ b/external/bdwgc/libatomic_ops/m4/ltversion.m4
@@ -0,0 +1,23 @@
+# ltversion.m4 -- version numbers -*- Autoconf -*-
+#
+# Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc.
+# Written by Scott James Remnant, 2004
+#
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+
+# @configure_input@
+
+# serial 4179 ltversion.m4
+# This file is part of GNU Libtool
+
+m4_define([LT_PACKAGE_VERSION], [2.4.6])
+m4_define([LT_PACKAGE_REVISION], [2.4.6])
+
+AC_DEFUN([LTVERSION_VERSION],
+[macro_version='2.4.6'
+macro_revision='2.4.6'
+_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
+_LT_DECL(, macro_revision, 0)
+])
diff --git a/external/bdwgc/libatomic_ops/m4/lt~obsolete.m4 b/external/bdwgc/libatomic_ops/m4/lt~obsolete.m4
new file mode 100644
index 0000000000..c6b26f88f6
--- /dev/null
+++ b/external/bdwgc/libatomic_ops/m4/lt~obsolete.m4
@@ -0,0 +1,99 @@
+# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
+#
+# Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software
+# Foundation, Inc.
+# Written by Scott James Remnant, 2004.
+#
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+
+# serial 5 lt~obsolete.m4
+
+# These exist entirely to fool aclocal when bootstrapping libtool.
+#
+# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN),
+# which have later been changed to m4_define as they aren't part of the
+# exported API, or moved to Autoconf or Automake where they belong.
+#
+# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN
+# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
+# using a macro with the same name in our local m4/libtool.m4 it'll
+# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
+# and doesn't know about Autoconf macros at all.)
+#
+# So we provide this file, which has a silly filename so it's always
+# included after everything else. This provides aclocal with the
+# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
+# because those macros already exist, or will be overwritten later.
+# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
+#
+# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
+# Yes, that means every name once taken will need to remain here until
+# we give up compatibility with versions before 1.7, at which point
+# we need to keep only those names which we still refer to.
+
+# This is to help aclocal find these macros, as it can't see m4_define.
+AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
+
+m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
+m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])])
+m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
+m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])])
+m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
+m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])])
+m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])])
+m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
+m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])])
+m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])])
+m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])])
+m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
+m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
+m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
+m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
+m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
+m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])])
+m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
+m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
+m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])])
+m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])])
+m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
+m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
+m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
+m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
+m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
+m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
+m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
+m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])])
+m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])])
+m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])])
+m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
+m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
+m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])])
+m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])])
+m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
+m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
+m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])])
+m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
+m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])])
+m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])])
+m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])])
+m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
+m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
+m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
+m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
+m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
+m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
+m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
+m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
+m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
+m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
+m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])])
+m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
+m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
+m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])])
+m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
+m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
+m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])])
+m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])])
+m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])])
diff --git a/external/bdwgc/libatomic_ops/missing b/external/bdwgc/libatomic_ops/missing
new file mode 100755
index 0000000000..f62bbae306
--- /dev/null
+++ b/external/bdwgc/libatomic_ops/missing
@@ -0,0 +1,215 @@
+#! /bin/sh
+# Common wrapper for a few potentially missing GNU programs.
+
+scriptversion=2013-10-28.13; # UTC
+
+# Copyright (C) 1996-2014 Free Software Foundation, Inc.
+# Originally written by Fran,cois Pinard , 1996.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+if test $# -eq 0; then
+ echo 1>&2 "Try '$0 --help' for more information"
+ exit 1
+fi
+
+case $1 in
+
+ --is-lightweight)
+ # Used by our autoconf macros to check whether the available missing
+ # script is modern enough.
+ exit 0
+ ;;
+
+ --run)
+ # Back-compat with the calling convention used by older automake.
+ shift
+ ;;
+
+ -h|--h|--he|--hel|--help)
+ echo "\
+$0 [OPTION]... PROGRAM [ARGUMENT]...
+
+Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due
+to PROGRAM being missing or too old.
+
+Options:
+ -h, --help display this help and exit
+ -v, --version output version information and exit
+
+Supported PROGRAM values:
+ aclocal autoconf autoheader autom4te automake makeinfo
+ bison yacc flex lex help2man
+
+Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and
+'g' are ignored when checking the name.
+
+Send bug reports to ."
+ exit $?
+ ;;
+
+ -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
+ echo "missing $scriptversion (GNU Automake)"
+ exit $?
+ ;;
+
+ -*)
+ echo 1>&2 "$0: unknown '$1' option"
+ echo 1>&2 "Try '$0 --help' for more information"
+ exit 1
+ ;;
+
+esac
+
+# Run the given program, remember its exit status.
+"$@"; st=$?
+
+# If it succeeded, we are done.
+test $st -eq 0 && exit 0
+
+# Also exit now if we it failed (or wasn't found), and '--version' was
+# passed; such an option is passed most likely to detect whether the
+# program is present and works.
+case $2 in --version|--help) exit $st;; esac
+
+# Exit code 63 means version mismatch. This often happens when the user
+# tries to use an ancient version of a tool on a file that requires a
+# minimum version.
+if test $st -eq 63; then
+ msg="probably too old"
+elif test $st -eq 127; then
+ # Program was missing.
+ msg="missing on your system"
+else
+ # Program was found and executed, but failed. Give up.
+ exit $st
+fi
+
+perl_URL=http://www.perl.org/
+flex_URL=http://flex.sourceforge.net/
+gnu_software_URL=http://www.gnu.org/software
+
+program_details ()
+{
+ case $1 in
+ aclocal|automake)
+ echo "The '$1' program is part of the GNU Automake package:"
+ echo "<$gnu_software_URL/automake>"
+ echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:"
+ echo "<$gnu_software_URL/autoconf>"
+ echo "<$gnu_software_URL/m4/>"
+ echo "<$perl_URL>"
+ ;;
+ autoconf|autom4te|autoheader)
+ echo "The '$1' program is part of the GNU Autoconf package:"
+ echo "<$gnu_software_URL/autoconf/>"
+ echo "It also requires GNU m4 and Perl in order to run:"
+ echo "<$gnu_software_URL/m4/>"
+ echo "<$perl_URL>"
+ ;;
+ esac
+}
+
+give_advice ()
+{
+ # Normalize program name to check for.
+ normalized_program=`echo "$1" | sed '
+ s/^gnu-//; t
+ s/^gnu//; t
+ s/^g//; t'`
+
+ printf '%s\n' "'$1' is $msg."
+
+ configure_deps="'configure.ac' or m4 files included by 'configure.ac'"
+ case $normalized_program in
+ autoconf*)
+ echo "You should only need it if you modified 'configure.ac',"
+ echo "or m4 files included by it."
+ program_details 'autoconf'
+ ;;
+ autoheader*)
+ echo "You should only need it if you modified 'acconfig.h' or"
+ echo "$configure_deps."
+ program_details 'autoheader'
+ ;;
+ automake*)
+ echo "You should only need it if you modified 'Makefile.am' or"
+ echo "$configure_deps."
+ program_details 'automake'
+ ;;
+ aclocal*)
+ echo "You should only need it if you modified 'acinclude.m4' or"
+ echo "$configure_deps."
+ program_details 'aclocal'
+ ;;
+ autom4te*)
+ echo "You might have modified some maintainer files that require"
+ echo "the 'autom4te' program to be rebuilt."
+ program_details 'autom4te'
+ ;;
+ bison*|yacc*)
+ echo "You should only need it if you modified a '.y' file."
+ echo "You may want to install the GNU Bison package:"
+ echo "<$gnu_software_URL/bison/>"
+ ;;
+ lex*|flex*)
+ echo "You should only need it if you modified a '.l' file."
+ echo "You may want to install the Fast Lexical Analyzer package:"
+ echo "<$flex_URL>"
+ ;;
+ help2man*)
+ echo "You should only need it if you modified a dependency" \
+ "of a man page."
+ echo "You may want to install the GNU Help2man package:"
+ echo "<$gnu_software_URL/help2man/>"
+ ;;
+ makeinfo*)
+ echo "You should only need it if you modified a '.texi' file, or"
+ echo "any other file indirectly affecting the aspect of the manual."
+ echo "You might want to install the Texinfo package:"
+ echo "<$gnu_software_URL/texinfo/>"
+ echo "The spurious makeinfo call might also be the consequence of"
+ echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might"
+ echo "want to install GNU make:"
+ echo "<$gnu_software_URL/make/>"
+ ;;
+ *)
+ echo "You might have modified some files without having the proper"
+ echo "tools for further handling them. Check the 'README' file, it"
+ echo "often tells you about the needed prerequisites for installing"
+ echo "this package. You may also peek at any GNU archive site, in"
+ echo "case some other package contains this missing '$1' program."
+ ;;
+ esac
+}
+
+give_advice "$1" | sed -e '1s/^/WARNING: /' \
+ -e '2,$s/^/ /' >&2
+
+# Propagate the correct exit status (expected to be 127 for a program
+# not found, 63 for a program that failed due to version mismatch).
+exit $st
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/external/bdwgc/libatomic_ops/src/Makefile.in b/external/bdwgc/libatomic_ops/src/Makefile.in
new file mode 100644
index 0000000000..25816d9c4c
--- /dev/null
+++ b/external/bdwgc/libatomic_ops/src/Makefile.in
@@ -0,0 +1,999 @@
+# Makefile.in generated by automake 1.15 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2014 Free Software Foundation, Inc.
+
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+
+VPATH = @srcdir@
+am__is_gnu_make = { \
+ if test -z '$(MAKELEVEL)'; then \
+ false; \
+ elif test -n '$(MAKE_HOST)'; then \
+ true; \
+ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+ true; \
+ else \
+ false; \
+ fi; \
+}
+am__make_running_with_option = \
+ case $${target_option-} in \
+ ?) ;; \
+ *) echo "am__make_running_with_option: internal error: invalid" \
+ "target option '$${target_option-}' specified" >&2; \
+ exit 1;; \
+ esac; \
+ has_opt=no; \
+ sane_makeflags=$$MAKEFLAGS; \
+ if $(am__is_gnu_make); then \
+ sane_makeflags=$$MFLAGS; \
+ else \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ bs=\\; \
+ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
+ esac; \
+ fi; \
+ skip_next=no; \
+ strip_trailopt () \
+ { \
+ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+ }; \
+ for flg in $$sane_makeflags; do \
+ test $$skip_next = yes && { skip_next=no; continue; }; \
+ case $$flg in \
+ *=*|--*) continue;; \
+ -*I) strip_trailopt 'I'; skip_next=yes;; \
+ -*I?*) strip_trailopt 'I';; \
+ -*O) strip_trailopt 'O'; skip_next=yes;; \
+ -*O?*) strip_trailopt 'O';; \
+ -*l) strip_trailopt 'l'; skip_next=yes;; \
+ -*l?*) strip_trailopt 'l';; \
+ -[dEDm]) skip_next=yes;; \
+ -[JT]) skip_next=yes;; \
+ esac; \
+ case $$flg in \
+ *$$target_option*) has_opt=yes; break;; \
+ esac; \
+ done; \
+ test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+target_triplet = @target@
+subdir = src
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \
+ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
+ $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
+ $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(include_HEADERS) \
+ $(nobase_private_HEADERS) $(am__DIST_COMMON)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+ test -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && rm -f $$files; }; \
+ }
+am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)" \
+ "$(DESTDIR)$(privatedir)"
+LTLIBRARIES = $(lib_LTLIBRARIES)
+libatomic_ops_la_LIBADD =
+am__libatomic_ops_la_SOURCES_DIST = atomic_ops.c atomic_ops_sysdeps.S
+@NEED_ASM_FALSE@am_libatomic_ops_la_OBJECTS = atomic_ops.lo
+@NEED_ASM_TRUE@am_libatomic_ops_la_OBJECTS = atomic_ops.lo \
+@NEED_ASM_TRUE@ atomic_ops_sysdeps.lo
+libatomic_ops_la_OBJECTS = $(am_libatomic_ops_la_OBJECTS)
+AM_V_lt = $(am__v_lt_@AM_V@)
+am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
+am__v_lt_0 = --silent
+am__v_lt_1 =
+libatomic_ops_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+ $(AM_CFLAGS) $(CFLAGS) $(libatomic_ops_la_LDFLAGS) $(LDFLAGS) \
+ -o $@
+libatomic_ops_gpl_la_LIBADD =
+am_libatomic_ops_gpl_la_OBJECTS = atomic_ops_stack.lo \
+ atomic_ops_malloc.lo
+libatomic_ops_gpl_la_OBJECTS = $(am_libatomic_ops_gpl_la_OBJECTS)
+libatomic_ops_gpl_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+ $(AM_CFLAGS) $(CFLAGS) $(libatomic_ops_gpl_la_LDFLAGS) \
+ $(LDFLAGS) -o $@
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo " GEN " $@;
+am__v_GEN_1 =
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 =
+DEFAULT_INCLUDES =
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+CPPASCOMPILE = $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS)
+LTCPPASCOMPILE = $(LIBTOOL) $(AM_V_lt) $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CCAS) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CCASFLAGS) $(CCASFLAGS)
+AM_V_CPPAS = $(am__v_CPPAS_@AM_V@)
+am__v_CPPAS_ = $(am__v_CPPAS_@AM_DEFAULT_V@)
+am__v_CPPAS_0 = @echo " CPPAS " $@;
+am__v_CPPAS_1 =
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_@AM_V@)
+am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
+am__v_CC_0 = @echo " CC " $@;
+am__v_CC_1 =
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_@AM_V@)
+am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
+am__v_CCLD_0 = @echo " CCLD " $@;
+am__v_CCLD_1 =
+SOURCES = $(libatomic_ops_la_SOURCES) $(libatomic_ops_gpl_la_SOURCES)
+DIST_SOURCES = $(am__libatomic_ops_la_SOURCES_DIST) \
+ $(libatomic_ops_gpl_la_SOURCES)
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+HEADERS = $(include_HEADERS) $(nobase_private_HEADERS)
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \
+ $(LISP)config.h.in
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates. Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+ BEGIN { nonempty = 0; } \
+ { items[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique. This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+ list='$(am__tagged_files)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | $(am__uniquify_input)`
+ETAGS = etags
+CTAGS = ctags
+am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in \
+ $(top_srcdir)/depcomp
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCAS = @CCAS@
+CCASDEPMODE = @CCASDEPMODE@
+CCASFLAGS = @CCASFLAGS@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PICFLAG = @PICFLAG@
+RANLIB = @RANLIB@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+THREADDLLIBS = @THREADDLLIBS@
+VERSION = @VERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+runstatedir = @runstatedir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target = @target@
+target_alias = @target_alias@
+target_cpu = @target_cpu@
+target_os = @target_os@
+target_vendor = @target_vendor@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+AM_CFLAGS = @PICFLAG@
+AM_CPPFLAGS = -I$(top_builddir)/src -I$(top_srcdir)/src
+include_HEADERS = atomic_ops.h atomic_ops_stack.h atomic_ops_malloc.h
+lib_LTLIBRARIES = libatomic_ops.la libatomic_ops_gpl.la
+@NEED_ASM_FALSE@libatomic_ops_la_SOURCES = atomic_ops.c
+@NEED_ASM_TRUE@libatomic_ops_la_SOURCES = atomic_ops.c atomic_ops_sysdeps.S
+libatomic_ops_la_LDFLAGS = -version-info 1:3:0 -no-undefined
+libatomic_ops_gpl_la_SOURCES = atomic_ops_stack.c atomic_ops_malloc.c
+libatomic_ops_gpl_la_LDFLAGS = -version-info 1:3:0 -no-undefined
+EXTRA_DIST = Makefile.msft atomic_ops/sysdeps/README \
+ atomic_ops/generalize-arithm.template \
+ atomic_ops/generalize-small.template \
+ atomic_ops/sysdeps/ao_t_is_int.template \
+ atomic_ops/sysdeps/gcc/generic-arithm.template \
+ atomic_ops/sysdeps/gcc/generic-small.template \
+ atomic_ops/sysdeps/loadstore/acquire_release_volatile.template \
+ atomic_ops/sysdeps/loadstore/atomic_load.template \
+ atomic_ops/sysdeps/loadstore/atomic_store.template \
+ atomic_ops/sysdeps/loadstore/ordered_loads_only.template \
+ atomic_ops/sysdeps/loadstore/ordered_stores_only.template \
+ atomic_ops/sysdeps/sunc/sparc.S
+
+BUILT_SOURCES = atomic_ops/generalize-arithm.h \
+ atomic_ops/generalize-small.h \
+ atomic_ops/sysdeps/ao_t_is_int.h \
+ atomic_ops/sysdeps/gcc/generic-arithm.h \
+ atomic_ops/sysdeps/gcc/generic-small.h \
+ atomic_ops/sysdeps/loadstore/acquire_release_volatile.h \
+ atomic_ops/sysdeps/loadstore/atomic_load.h \
+ atomic_ops/sysdeps/loadstore/atomic_store.h \
+ atomic_ops/sysdeps/loadstore/char_acquire_release_volatile.h \
+ atomic_ops/sysdeps/loadstore/char_atomic_load.h \
+ atomic_ops/sysdeps/loadstore/char_atomic_store.h \
+ atomic_ops/sysdeps/loadstore/int_acquire_release_volatile.h \
+ atomic_ops/sysdeps/loadstore/int_atomic_load.h \
+ atomic_ops/sysdeps/loadstore/int_atomic_store.h \
+ atomic_ops/sysdeps/loadstore/ordered_loads_only.h \
+ atomic_ops/sysdeps/loadstore/ordered_stores_only.h \
+ atomic_ops/sysdeps/loadstore/short_acquire_release_volatile.h \
+ atomic_ops/sysdeps/loadstore/short_atomic_load.h \
+ atomic_ops/sysdeps/loadstore/short_atomic_store.h
+
+
+#Private Headers
+privatedir = ${includedir}/
+nobase_private_HEADERS = atomic_ops/ao_version.h \
+ atomic_ops/generalize.h \
+ $(BUILT_SOURCES) \
+ \
+ atomic_ops/sysdeps/all_acquire_release_volatile.h \
+ atomic_ops/sysdeps/all_aligned_atomic_load_store.h \
+ atomic_ops/sysdeps/all_atomic_load_store.h \
+ atomic_ops/sysdeps/all_atomic_only_load.h \
+ atomic_ops/sysdeps/emul_cas.h \
+ atomic_ops/sysdeps/generic_pthread.h \
+ atomic_ops/sysdeps/ordered.h \
+ atomic_ops/sysdeps/ordered_except_wr.h \
+ atomic_ops/sysdeps/read_ordered.h \
+ atomic_ops/sysdeps/standard_ao_double_t.h \
+ atomic_ops/sysdeps/test_and_set_t_is_ao_t.h \
+ atomic_ops/sysdeps/test_and_set_t_is_char.h \
+ \
+ atomic_ops/sysdeps/armcc/arm_v6.h \
+ \
+ atomic_ops/sysdeps/gcc/aarch64.h \
+ atomic_ops/sysdeps/gcc/alpha.h \
+ atomic_ops/sysdeps/gcc/arm.h \
+ atomic_ops/sysdeps/gcc/avr32.h \
+ atomic_ops/sysdeps/gcc/cris.h \
+ atomic_ops/sysdeps/gcc/generic.h \
+ atomic_ops/sysdeps/gcc/hexagon.h \
+ atomic_ops/sysdeps/gcc/hppa.h \
+ atomic_ops/sysdeps/gcc/ia64.h \
+ atomic_ops/sysdeps/gcc/m68k.h \
+ atomic_ops/sysdeps/gcc/mips.h \
+ atomic_ops/sysdeps/gcc/powerpc.h \
+ atomic_ops/sysdeps/gcc/s390.h \
+ atomic_ops/sysdeps/gcc/sh.h \
+ atomic_ops/sysdeps/gcc/sparc.h \
+ atomic_ops/sysdeps/gcc/x86.h \
+ \
+ atomic_ops/sysdeps/hpc/hppa.h \
+ atomic_ops/sysdeps/hpc/ia64.h \
+ \
+ atomic_ops/sysdeps/ibmc/powerpc.h \
+ \
+ atomic_ops/sysdeps/icc/ia64.h \
+ \
+ atomic_ops/sysdeps/loadstore/double_atomic_load_store.h \
+ \
+ atomic_ops/sysdeps/msftc/arm.h \
+ atomic_ops/sysdeps/msftc/common32_defs.h \
+ atomic_ops/sysdeps/msftc/x86.h \
+ atomic_ops/sysdeps/msftc/x86_64.h \
+ \
+ atomic_ops/sysdeps/sunc/sparc.h \
+ atomic_ops/sysdeps/sunc/x86.h
+
+all: $(BUILT_SOURCES) config.h
+ $(MAKE) $(AM_MAKEFLAGS) all-am
+
+.SUFFIXES:
+.SUFFIXES: .S .c .lo .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign src/Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+config.h: stamp-h1
+ @test -f $@ || rm -f stamp-h1
+ @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1
+
+stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
+ @rm -f stamp-h1
+ cd $(top_builddir) && $(SHELL) ./config.status src/config.h
+$(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+ ($(am__cd) $(top_srcdir) && $(AUTOHEADER))
+ rm -f stamp-h1
+ touch $@
+
+distclean-hdr:
+ -rm -f config.h stamp-h1
+
+install-libLTLIBRARIES: $(lib_LTLIBRARIES)
+ @$(NORMAL_INSTALL)
+ @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
+ list2=; for p in $$list; do \
+ if test -f $$p; then \
+ list2="$$list2 $$p"; \
+ else :; fi; \
+ done; \
+ test -z "$$list2" || { \
+ echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
+ }
+
+uninstall-libLTLIBRARIES:
+ @$(NORMAL_UNINSTALL)
+ @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
+ for p in $$list; do \
+ $(am__strip_dir) \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \
+ done
+
+clean-libLTLIBRARIES:
+ -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
+ @list='$(lib_LTLIBRARIES)'; \
+ locs=`for p in $$list; do echo $$p; done | \
+ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
+ sort -u`; \
+ test -z "$$locs" || { \
+ echo rm -f $${locs}; \
+ rm -f $${locs}; \
+ }
+
+libatomic_ops.la: $(libatomic_ops_la_OBJECTS) $(libatomic_ops_la_DEPENDENCIES) $(EXTRA_libatomic_ops_la_DEPENDENCIES)
+ $(AM_V_CCLD)$(libatomic_ops_la_LINK) -rpath $(libdir) $(libatomic_ops_la_OBJECTS) $(libatomic_ops_la_LIBADD) $(LIBS)
+
+libatomic_ops_gpl.la: $(libatomic_ops_gpl_la_OBJECTS) $(libatomic_ops_gpl_la_DEPENDENCIES) $(EXTRA_libatomic_ops_gpl_la_DEPENDENCIES)
+ $(AM_V_CCLD)$(libatomic_ops_gpl_la_LINK) -rpath $(libdir) $(libatomic_ops_gpl_la_OBJECTS) $(libatomic_ops_gpl_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atomic_ops.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atomic_ops_malloc.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atomic_ops_stack.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atomic_ops_sysdeps.Plo@am__quote@
+
+.S.o:
+@am__fastdepCCAS_TRUE@ $(AM_V_CPPAS)$(CPPASCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCCAS_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS@am__nodep@)$(CPPASCOMPILE) -c -o $@ $<
+
+.S.obj:
+@am__fastdepCCAS_TRUE@ $(AM_V_CPPAS)$(CPPASCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCCAS_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS@am__nodep@)$(CPPASCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.S.lo:
+@am__fastdepCCAS_TRUE@ $(AM_V_CPPAS)$(LTCPPASCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCCAS_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS@am__nodep@)$(LTCPPASCOMPILE) -c -o $@ $<
+
+.c.o:
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
+
+.c.obj:
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+install-includeHEADERS: $(include_HEADERS)
+ @$(NORMAL_INSTALL)
+ @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(includedir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(includedir)" || exit 1; \
+ fi; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \
+ $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \
+ done
+
+uninstall-includeHEADERS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ dir='$(DESTDIR)$(includedir)'; $(am__uninstall_files_from_dir)
+install-nobase_privateHEADERS: $(nobase_private_HEADERS)
+ @$(NORMAL_INSTALL)
+ @list='$(nobase_private_HEADERS)'; test -n "$(privatedir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(privatedir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(privatedir)" || exit 1; \
+ fi; \
+ $(am__nobase_list) | while read dir files; do \
+ xfiles=; for file in $$files; do \
+ if test -f "$$file"; then xfiles="$$xfiles $$file"; \
+ else xfiles="$$xfiles $(srcdir)/$$file"; fi; done; \
+ test -z "$$xfiles" || { \
+ test "x$$dir" = x. || { \
+ echo " $(MKDIR_P) '$(DESTDIR)$(privatedir)/$$dir'"; \
+ $(MKDIR_P) "$(DESTDIR)$(privatedir)/$$dir"; }; \
+ echo " $(INSTALL_HEADER) $$xfiles '$(DESTDIR)$(privatedir)/$$dir'"; \
+ $(INSTALL_HEADER) $$xfiles "$(DESTDIR)$(privatedir)/$$dir" || exit $$?; }; \
+ done
+
+uninstall-nobase_privateHEADERS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(nobase_private_HEADERS)'; test -n "$(privatedir)" || list=; \
+ $(am__nobase_strip_setup); files=`$(am__nobase_strip)`; \
+ dir='$(DESTDIR)$(privatedir)'; $(am__uninstall_files_from_dir)
+
+ID: $(am__tagged_files)
+ $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-am
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ set x; \
+ here=`pwd`; \
+ $(am__define_uniq_tagged_files); \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: ctags-am
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+ $(am__define_uniq_tagged_files); \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-am
+
+cscopelist-am: $(am__tagged_files)
+ list='$(am__tagged_files)'; \
+ case "$(srcdir)" in \
+ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+ *) sdir=$(subdir)/$(srcdir) ;; \
+ esac; \
+ for i in $$list; do \
+ if test -f "$$i"; then \
+ echo "$(subdir)/$$i"; \
+ else \
+ echo "$$sdir/$$i"; \
+ fi; \
+ done >> $(top_builddir)/cscope.files
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) check-am
+all-am: Makefile $(LTLIBRARIES) $(HEADERS) config.h
+installdirs:
+ for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)" "$(DESTDIR)$(privatedir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+ -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+clean: clean-am
+
+clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
+ mostlyclean-am
+
+distclean: distclean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-hdr distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am: install-includeHEADERS install-nobase_privateHEADERS
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-libLTLIBRARIES
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -rf ./$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-includeHEADERS uninstall-libLTLIBRARIES \
+ uninstall-nobase_privateHEADERS
+
+.MAKE: all check install install-am install-strip
+
+.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
+ clean-libLTLIBRARIES clean-libtool cscopelist-am ctags \
+ ctags-am distclean distclean-compile distclean-generic \
+ distclean-hdr distclean-libtool distclean-tags distdir dvi \
+ dvi-am html html-am info info-am install install-am \
+ install-data install-data-am install-dvi install-dvi-am \
+ install-exec install-exec-am install-html install-html-am \
+ install-includeHEADERS install-info install-info-am \
+ install-libLTLIBRARIES install-man \
+ install-nobase_privateHEADERS install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ tags tags-am uninstall uninstall-am uninstall-includeHEADERS \
+ uninstall-libLTLIBRARIES uninstall-nobase_privateHEADERS
+
+.PRECIOUS: Makefile
+
+
+atomic_ops/generalize-small.h: atomic_ops/generalize-small.template
+ sed -e s:XSIZE:char:g -e s:XCTYPE:unsigned/**/char:g $? > $@
+ sed -e s:XSIZE:short:g -e s:XCTYPE:unsigned/**/short:g $? >> $@
+ sed -e s:XSIZE:int:g -e s:XCTYPE:unsigned:g $? >> $@
+ sed -e s:XSIZE_::g -e s:XCTYPE:AO_t:g $? >> $@
+ sed -e s:XSIZE:double:g -e s:XCTYPE:AO_double_t:g $? >> $@
+
+atomic_ops/generalize-arithm.h: atomic_ops/generalize-arithm.template
+ sed -e s:XSIZE:char:g -e s:XCTYPE:unsigned/**/char:g $? > $@
+ sed -e s:XSIZE:short:g -e s:XCTYPE:unsigned/**/short:g $? >> $@
+ sed -e s:XSIZE:int:g -e s:XCTYPE:unsigned:g $? >> $@
+ sed -e s:XSIZE_::g -e s:XCTYPE:AO_t:g $? >> $@
+
+atomic_ops/sysdeps/ao_t_is_int.h: atomic_ops/sysdeps/ao_t_is_int.template
+ sed -e s:_XBAR::g $? > $@
+ sed -e s:XBAR:full:g $? >> $@
+ sed -e s:XBAR:acquire:g $? >> $@
+ sed -e s:XBAR:release:g $? >> $@
+ sed -e s:XBAR:write:g $? >> $@
+ sed -e s:XBAR:read:g $? >> $@
+
+atomic_ops/sysdeps/gcc/generic-arithm.h: \
+ atomic_ops/sysdeps/gcc/generic-arithm.template
+ sed -e s:_XBAR::g -e s:XGCCBAR:RELAXED:g \
+ -e s:XSIZE:char:g -e s:XCTYPE:unsigned/**/char:g $? > $@
+ sed -e s:_XBAR::g -e s:XGCCBAR:RELAXED:g \
+ -e s:XSIZE:short:g -e s:XCTYPE:unsigned/**/short:g $? >> $@
+ sed -e s:_XBAR::g -e s:XGCCBAR:RELAXED:g \
+ -e s:XSIZE:int:g -e s:XCTYPE:unsigned:g $? >> $@
+ sed -e s:_XBAR::g -e s:XGCCBAR:RELAXED:g \
+ -e s:XSIZE_::g -e s:XCTYPE:AO_t:g $? >> $@
+ sed -e s:XBAR:acquire:g -e s:XGCCBAR:ACQUIRE:g \
+ -e s:XSIZE:char:g -e s:XCTYPE:unsigned/**/char:g $? >> $@
+ sed -e s:XBAR:acquire:g -e s:XGCCBAR:ACQUIRE:g \
+ -e s:XSIZE:short:g -e s:XCTYPE:unsigned/**/short:g $? >> $@
+ sed -e s:XBAR:acquire:g -e s:XGCCBAR:ACQUIRE:g \
+ -e s:XSIZE:int:g -e s:XCTYPE:unsigned:g $? >> $@
+ sed -e s:XBAR:acquire:g -e s:XGCCBAR:ACQUIRE:g \
+ -e s:XSIZE_::g -e s:XCTYPE:AO_t:g $? >> $@
+ sed -e s:XBAR:release:g -e s:XGCCBAR:RELEASE:g \
+ -e s:XSIZE:char:g -e s:XCTYPE:unsigned/**/char:g $? >> $@
+ sed -e s:XBAR:release:g -e s:XGCCBAR:RELEASE:g \
+ -e s:XSIZE:short:g -e s:XCTYPE:unsigned/**/short:g $? >> $@
+ sed -e s:XBAR:release:g -e s:XGCCBAR:RELEASE:g \
+ -e s:XSIZE:int:g -e s:XCTYPE:unsigned:g $? >> $@
+ sed -e s:XBAR:release:g -e s:XGCCBAR:RELEASE:g \
+ -e s:XSIZE_::g -e s:XCTYPE:AO_t:g $? >> $@
+ sed -e s:XBAR:full:g -e s:XGCCBAR:SEQ_CST:g \
+ -e s:XSIZE:char:g -e s:XCTYPE:unsigned/**/char:g $? >> $@
+ sed -e s:XBAR:full:g -e s:XGCCBAR:SEQ_CST:g \
+ -e s:XSIZE:short:g -e s:XCTYPE:unsigned/**/short:g $? >> $@
+ sed -e s:XBAR:full:g -e s:XGCCBAR:SEQ_CST:g \
+ -e s:XSIZE:int:g -e s:XCTYPE:unsigned:g $? >> $@
+ sed -e s:XBAR:full:g -e s:XGCCBAR:SEQ_CST:g \
+ -e s:XSIZE_::g -e s:XCTYPE:AO_t:g $? >> $@
+
+atomic_ops/sysdeps/gcc/generic-small.h: \
+ atomic_ops/sysdeps/gcc/generic-small.template
+ sed -e s:XSIZE:char:g -e s:XCTYPE:unsigned/**/char:g $? > $@
+ sed -e s:XSIZE:short:g -e s:XCTYPE:unsigned/**/short:g $? >> $@
+ sed -e s:XSIZE:int:g -e s:XCTYPE:unsigned:g $? >> $@
+ sed -e s:XSIZE_::g -e s:XCTYPE:AO_t:g $? >> $@
+
+atomic_ops/sysdeps/loadstore/ordered_loads_only.h: \
+ atomic_ops/sysdeps/loadstore/ordered_loads_only.template
+ sed -e s:XSIZE:char:g -e s:XCTYPE:unsigned/**/char:g $? > $@
+ sed -e s:XSIZE:short:g -e s:XCTYPE:unsigned/**/short:g $? >> $@
+ sed -e s:XSIZE:int:g -e s:XCTYPE:unsigned:g $? >> $@
+ sed -e s:XSIZE_::g -e s:XCTYPE:AO_t:g $? >> $@
+ sed -e s:XSIZE:double:g -e s:XCTYPE:AO_double_t:g $? >> $@
+
+atomic_ops/sysdeps/loadstore/ordered_stores_only.h: \
+ atomic_ops/sysdeps/loadstore/ordered_stores_only.template
+ sed -e s:XSIZE:char:g -e s:XCTYPE:unsigned/**/char:g $? > $@
+ sed -e s:XSIZE:short:g -e s:XCTYPE:unsigned/**/short:g $? >> $@
+ sed -e s:XSIZE:int:g -e s:XCTYPE:unsigned:g $? >> $@
+ sed -e s:XSIZE_::g -e s:XCTYPE:AO_t:g $? >> $@
+ sed -e s:XSIZE:double:g -e s:XCTYPE:AO_double_t:g $? >> $@
+
+atomic_ops/sysdeps/loadstore/acquire_release_volatile.h: \
+ atomic_ops/sysdeps/loadstore/acquire_release_volatile.template
+ sed -e s:XSIZE_::g -e s:XCTYPE:AO_t:g $? > $@
+
+atomic_ops/sysdeps/loadstore/char_acquire_release_volatile.h: \
+ atomic_ops/sysdeps/loadstore/acquire_release_volatile.template
+ sed -e s:XSIZE:char:g -e s:XCTYPE:unsigned/**/char:g $? > $@
+
+atomic_ops/sysdeps/loadstore/int_acquire_release_volatile.h: \
+ atomic_ops/sysdeps/loadstore/acquire_release_volatile.template
+ sed -e s:XSIZE:int:g -e s:XCTYPE:unsigned:g $? > $@
+
+atomic_ops/sysdeps/loadstore/short_acquire_release_volatile.h: \
+ atomic_ops/sysdeps/loadstore/acquire_release_volatile.template
+ sed -e s:XSIZE:short:g -e s:XCTYPE:unsigned/**/short:g $? > $@
+
+atomic_ops/sysdeps/loadstore/atomic_load.h: \
+ atomic_ops/sysdeps/loadstore/atomic_load.template
+ sed -e s:XSIZE_::g -e s:XCTYPE:AO_t:g $? > $@
+
+atomic_ops/sysdeps/loadstore/char_atomic_load.h: \
+ atomic_ops/sysdeps/loadstore/atomic_load.template
+ sed -e s:XSIZE:char:g -e s:XCTYPE:unsigned/**/char:g $? > $@
+
+atomic_ops/sysdeps/loadstore/int_atomic_load.h: \
+ atomic_ops/sysdeps/loadstore/atomic_load.template
+ sed -e s:XSIZE:int:g -e s:XCTYPE:unsigned:g $? > $@
+
+atomic_ops/sysdeps/loadstore/short_atomic_load.h: \
+ atomic_ops/sysdeps/loadstore/atomic_load.template
+ sed -e s:XSIZE:short:g -e s:XCTYPE:unsigned/**/short:g $? > $@
+
+atomic_ops/sysdeps/loadstore/atomic_store.h: \
+ atomic_ops/sysdeps/loadstore/atomic_store.template
+ sed -e s:XSIZE_::g -e s:XCTYPE:AO_t:g $? > $@
+
+atomic_ops/sysdeps/loadstore/char_atomic_store.h: \
+ atomic_ops/sysdeps/loadstore/atomic_store.template
+ sed -e s:XSIZE:char:g -e s:XCTYPE:unsigned/**/char:g $? > $@
+
+atomic_ops/sysdeps/loadstore/int_atomic_store.h: \
+ atomic_ops/sysdeps/loadstore/atomic_store.template
+ sed -e s:XSIZE:int:g -e s:XCTYPE:unsigned:g $? > $@
+
+atomic_ops/sysdeps/loadstore/short_atomic_store.h: \
+ atomic_ops/sysdeps/loadstore/atomic_store.template
+ sed -e s:XSIZE:short:g -e s:XCTYPE:unsigned/**/short:g $? > $@
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/external/bdwgc/libatomic_ops/src/config.h.in b/external/bdwgc/libatomic_ops/src/config.h.in
new file mode 100644
index 0000000000..aa784def5f
--- /dev/null
+++ b/external/bdwgc/libatomic_ops/src/config.h.in
@@ -0,0 +1,148 @@
+/* src/config.h.in. Generated from configure.ac by autoheader. */
+
+/* Inline assembly avalable (only VC/x86_64) */
+#undef AO_ASM_X64_AVAILABLE
+
+/* Assume Windows Server 2003, Vista or later target (only VC/x86) */
+#undef AO_ASSUME_VISTA
+
+/* Assume hardware compare-and-swap functionality available on target (only
+ VC/x86) */
+#undef AO_ASSUME_WINDOWS98
+
+/* Assume target is not old AMD Opteron chip (only x86_64) */
+#undef AO_CMPXCHG16B_AVAILABLE
+
+/* Force test_and_set to use SWP instruction instead of LDREX/STREX (only arm
+ v6+) */
+#undef AO_FORCE_USE_SWP
+
+/* Force compare_and_swap definition via fetch_compare_and_swap */
+#undef AO_GENERALIZE_ASM_BOOL_CAS
+
+/* No pthreads library available */
+#undef AO_NO_PTHREADS
+
+/* Assume target is not sparc v9+ (only sparc) */
+#undef AO_NO_SPARC_V9
+
+/* Assume ancient MS VS Win32 headers (only VC/arm v6+, VC/x86) */
+#undef AO_OLD_STYLE_INTERLOCKED_COMPARE_EXCHANGE
+
+/* Prefer generalized definitions to direct assembly-based ones */
+#undef AO_PREFER_GENERALIZED
+
+/* Trace AO_malloc/free calls (for debug only) */
+#undef AO_TRACE_MALLOC
+
+/* Assume single-core target (only arm v6+) */
+#undef AO_UNIPROCESSOR
+
+/* Assume Win32 _Interlocked primitives available as intrinsics (only VC/arm)
+ */
+#undef AO_USE_INTERLOCKED_INTRINSICS
+
+/* Use nanosleep() instead of select() (only if atomic operations are
+ emulated) */
+#undef AO_USE_NANOSLEEP
+
+/* Do not block signals in compare_and_swap (only if atomic operations are
+ emulated) */
+#undef AO_USE_NO_SIGNALS
+
+/* Use Pentium 4 'mfence' instruction (only x86) */
+#undef AO_USE_PENTIUM4_INSTRS
+
+/* Emulate atomic operations via slow and async-signal-unsafe pthread locking
+ */
+#undef AO_USE_PTHREAD_DEFS
+
+/* Prefer GCC built-in CAS intrinsics in favor of inline assembly (only
+ gcc/x86, gcc/x86_64) */
+#undef AO_USE_SYNC_CAS_BUILTIN
+
+/* Use Win32 Sleep() instead of select() (only if atomic operations are
+ emulated) */
+#undef AO_USE_WIN32_PTHREADS
+
+/* Emulate double-width CAS via pthread locking in case of no hardware support
+ (only gcc/x86_64, the emulation is unsafe) */
+#undef AO_WEAK_DOUBLE_CAS_EMULATION
+
+/* Define to 1 if you have the header file. */
+#undef HAVE_DLFCN_H
+
+/* Define to 1 if you have the `getpagesize' function. */
+#undef HAVE_GETPAGESIZE
+
+/* Define to 1 if you have the header file. */
+#undef HAVE_INTTYPES_H
+
+/* Define to 1 if you have the header file. */
+#undef HAVE_MEMORY_H
+
+/* Define to 1 if you have a working `mmap' system call. */
+#undef HAVE_MMAP
+
+/* Define to 1 if you have the header file. */
+#undef HAVE_STDINT_H
+
+/* Define to 1 if you have the header file. */
+#undef HAVE_STDLIB_H
+
+/* Define to 1 if you have the header file. */
+#undef HAVE_STRINGS_H
+
+/* Define to 1 if you have the header file. */
+#undef HAVE_STRING_H
+
+/* Define to 1 if you have the header file. */
+#undef HAVE_SYS_PARAM_H
+
+/* Define to 1 if you have the header file. */
+#undef HAVE_SYS_STAT_H
+
+/* Define to 1 if you have the header file. */
+#undef HAVE_SYS_TYPES_H
+
+/* Define to 1 if you have the header file. */
+#undef HAVE_UNISTD_H
+
+/* Define to the sub-directory where libtool stores uninstalled libraries. */
+#undef LT_OBJDIR
+
+/* Define to disable assertion checking. */
+#undef NDEBUG
+
+/* Name of package */
+#undef PACKAGE
+
+/* Define to the address where bug reports for this package should be sent. */
+#undef PACKAGE_BUGREPORT
+
+/* Define to the full name of this package. */
+#undef PACKAGE_NAME
+
+/* Define to the full name and version of this package. */
+#undef PACKAGE_STRING
+
+/* Define to the one symbol short name of this package. */
+#undef PACKAGE_TARNAME
+
+/* Define to the home page for this package. */
+#undef PACKAGE_URL
+
+/* Define to the version of this package. */
+#undef PACKAGE_VERSION
+
+/* Define to 1 if you have the ANSI C header files. */
+#undef STDC_HEADERS
+
+/* Version number of package */
+#undef VERSION
+
+/* Indicates the use of pthreads (NetBSD). */
+#undef _PTHREADS
+
+/* Required define if using POSIX threads. */
+#undef _REENTRANT
diff --git a/external/bdwgc/libtool.REMOVED.git-id b/external/bdwgc/libtool.REMOVED.git-id
index 20fd59fe0b..ed475ea958 100644
--- a/external/bdwgc/libtool.REMOVED.git-id
+++ b/external/bdwgc/libtool.REMOVED.git-id
@@ -1 +1 @@
-c2c3f46f950f38965c2709deeb9dfbc7bf047010
\ No newline at end of file
+e5b664eb14cab4f093a824049a1013bdd1e9dcc3
\ No newline at end of file
diff --git a/external/binary-reference-assemblies/build/monowasm/Makefile b/external/binary-reference-assemblies/build/monowasm/Makefile
index a88c273200..8e608e5d76 100644
--- a/external/binary-reference-assemblies/build/monowasm/Makefile
+++ b/external/binary-reference-assemblies/build/monowasm/Makefile
@@ -5,7 +5,7 @@ CSC ?= csc
CSC_COMMON_ARGS := -nologo -noconfig -optimize -nostdlib -unsafe -deterministic -publicsign -debug- -target:library -nowarn:612,618,809
Q_CSC = $(if $(V),,@echo "CSC [$(PROFILE)] $(1)";)
-ASSEMBLIES := mscorlib System System.Xml System.Numerics System.Core System.Net.Http WebAssembly.Net.Http
+ASSEMBLIES := mscorlib System System.Xml System.Numerics System.Core System.Net.Http WebAssembly.Net.Http WebAssembly.Net.WebSockets
ASSEMBLIES += bare/System
@@ -17,6 +17,7 @@ System_REFS := mscorlib
System.Numerics_REFS := mscorlib
System.Xml_REFS := mscorlib System
WebAssembly.Net.Http_REFS := mscorlib System System.Core System.Net.Http
+WebAssembly.Net.WebSockets_REFS := mscorlib System System.Core
bare/System_REFS := mscorlib
@@ -27,9 +28,14 @@ ECMA_KEY := ../../../../mcs/class/ecma.pub # Public Key Token: b77a5c561
ECMA_KEY_ASSEMBLIES := System.Core System.Net.Http System System.Numerics System.Xml mscorlib bare/System
WebAssembly.Net.Http_KEYFILE := ../../../../mcs/class/Open.snk
+WebAssembly.Net.WebSockets_KEYFILE := ../../../../mcs/class/Open.snk
all: $(addsuffix .dll, $(ASSEMBLIES))
+clean:
+ rm -f *.dll
+ rm -f bare/*.dll
+
define KEYFILE_TEMPLATE
$(1)_KEYFILE := $(2)
endef
diff --git a/external/binary-reference-assemblies/build/monowasm/System.Core.dll.REMOVED.git-id b/external/binary-reference-assemblies/build/monowasm/System.Core.dll.REMOVED.git-id
index 0e03f0b68e..5eaeaf865a 100644
--- a/external/binary-reference-assemblies/build/monowasm/System.Core.dll.REMOVED.git-id
+++ b/external/binary-reference-assemblies/build/monowasm/System.Core.dll.REMOVED.git-id
@@ -1 +1 @@
-704d3e02dbd43691d785ec24bee712fe05eaec9f
\ No newline at end of file
+87607329272bd5f9d6c3bcdcf081c580bea533a6
\ No newline at end of file
diff --git a/external/binary-reference-assemblies/build/monowasm/System.Net.Http.dll b/external/binary-reference-assemblies/build/monowasm/System.Net.Http.dll
index 45009f8e5c..4ec2ccf2f2 100644
Binary files a/external/binary-reference-assemblies/build/monowasm/System.Net.Http.dll and b/external/binary-reference-assemblies/build/monowasm/System.Net.Http.dll differ
diff --git a/external/binary-reference-assemblies/build/monowasm/System.Numerics.dll b/external/binary-reference-assemblies/build/monowasm/System.Numerics.dll
index 11d95ed27e..2530d28565 100644
Binary files a/external/binary-reference-assemblies/build/monowasm/System.Numerics.dll and b/external/binary-reference-assemblies/build/monowasm/System.Numerics.dll differ
diff --git a/external/binary-reference-assemblies/build/monowasm/System.Xml.dll.REMOVED.git-id b/external/binary-reference-assemblies/build/monowasm/System.Xml.dll.REMOVED.git-id
index 6acbcbe69e..5653a153af 100644
--- a/external/binary-reference-assemblies/build/monowasm/System.Xml.dll.REMOVED.git-id
+++ b/external/binary-reference-assemblies/build/monowasm/System.Xml.dll.REMOVED.git-id
@@ -1 +1 @@
-fda0b23237512ee638ff7f71d934b0c6ecc2ca4e
\ No newline at end of file
+61ffe25f02c34386e713572aa0e3814787501a71
\ No newline at end of file
diff --git a/external/binary-reference-assemblies/build/monowasm/System.dll.REMOVED.git-id b/external/binary-reference-assemblies/build/monowasm/System.dll.REMOVED.git-id
index 72414abdb6..60397ab302 100644
--- a/external/binary-reference-assemblies/build/monowasm/System.dll.REMOVED.git-id
+++ b/external/binary-reference-assemblies/build/monowasm/System.dll.REMOVED.git-id
@@ -1 +1 @@
-589327cb425c2811156435a75cd5c0cc003ae1dc
\ No newline at end of file
+89590f9053246ebac25b2e028ed834c4f941bc19
\ No newline at end of file
diff --git a/external/binary-reference-assemblies/build/monowasm/WebAssembly.Net.Http.dll b/external/binary-reference-assemblies/build/monowasm/WebAssembly.Net.Http.dll
index dd8a105d63..91aa20b3c2 100644
Binary files a/external/binary-reference-assemblies/build/monowasm/WebAssembly.Net.Http.dll and b/external/binary-reference-assemblies/build/monowasm/WebAssembly.Net.Http.dll differ
diff --git a/external/binary-reference-assemblies/build/monowasm/WebAssembly.Net.WebSockets.dll b/external/binary-reference-assemblies/build/monowasm/WebAssembly.Net.WebSockets.dll
new file mode 100644
index 0000000000..13e8232048
Binary files /dev/null and b/external/binary-reference-assemblies/build/monowasm/WebAssembly.Net.WebSockets.dll differ
diff --git a/external/binary-reference-assemblies/src/monowasm/System.cs.REMOVED.git-id b/external/binary-reference-assemblies/src/monowasm/System.cs.REMOVED.git-id
index 7692f44a4c..65e644da21 100644
--- a/external/binary-reference-assemblies/src/monowasm/System.cs.REMOVED.git-id
+++ b/external/binary-reference-assemblies/src/monowasm/System.cs.REMOVED.git-id
@@ -1 +1 @@
-c8312281b9f4eec2b32c0586b5c75058f1c83536
\ No newline at end of file
+b5d3c5bdeec60d88a308ce86c492e8fa17d8179e
\ No newline at end of file
diff --git a/external/binary-reference-assemblies/src/monowasm/WebAssembly.Net.WebSockets.cs b/external/binary-reference-assemblies/src/monowasm/WebAssembly.Net.WebSockets.cs
new file mode 100644
index 0000000000..14ccac3e31
--- /dev/null
+++ b/external/binary-reference-assemblies/src/monowasm/WebAssembly.Net.WebSockets.cs
@@ -0,0 +1,48 @@
+[assembly:System.Reflection.AssemblyVersionAttribute("0.2.2.0")]
+[assembly:System.Diagnostics.DebuggableAttribute(System.Diagnostics.DebuggableAttribute.DebuggingModes.Default | System.Diagnostics.DebuggableAttribute.DebuggingModes.DisableOptimizations | System.Diagnostics.DebuggableAttribute.DebuggingModes.EnableEditAndContinue | System.Diagnostics.DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
+[assembly:System.Reflection.AssemblyCompanyAttribute("WebAssembly.Net.WebSockets")]
+[assembly:System.Reflection.AssemblyConfigurationAttribute("Debug")]
+[assembly:System.Reflection.AssemblyFileVersionAttribute("0.2.2.0")]
+[assembly:System.Reflection.AssemblyInformationalVersionAttribute("0.2.2")]
+[assembly:System.Reflection.AssemblyProductAttribute("WebAssembly.Net.WebSockets")]
+[assembly:System.Reflection.AssemblyTitleAttribute("WebAssembly.Net.WebSockets")]
+[assembly:System.Runtime.CompilerServices.CompilationRelaxationsAttribute(8)]
+[assembly:System.Runtime.CompilerServices.RuntimeCompatibilityAttribute(WrapNonExceptionThrows=true)]
+[assembly:System.Runtime.Versioning.TargetFrameworkAttribute(".NETStandard,Version=v2.0", FrameworkDisplayName="")]
+namespace WebAssembly.Net.WebSockets
+{
+ public sealed partial class ClientWebSocket : System.Net.WebSockets.WebSocket
+ {
+ public ClientWebSocket() { }
+ public override System.Nullable CloseStatus { get { throw null; } }
+ public override string CloseStatusDescription { get { throw null; } }
+ public WebAssembly.Net.WebSockets.ClientWebSocket.ClientWebSocketOptions Options { get { throw null; } }
+ public override System.Net.WebSockets.WebSocketState State { get { throw null; } }
+ public override string SubProtocol { get { throw null; } }
+ public override void Abort() { }
+ [System.Diagnostics.DebuggerStepThroughAttribute]
+ public override System.Threading.Tasks.Task CloseAsync(System.Net.WebSockets.WebSocketCloseStatus closeStatus, string statusDescription, System.Threading.CancellationToken cancellationToken) { throw null; }
+ public override System.Threading.Tasks.Task CloseOutputAsync(System.Net.WebSockets.WebSocketCloseStatus closeStatus, string statusDescription, System.Threading.CancellationToken cancellationToken) { throw null; }
+ public System.Threading.Tasks.Task ConnectAsync(System.Uri uri, System.Threading.CancellationToken cancellationToken) { throw null; }
+ public override void Dispose() { }
+ [System.Diagnostics.DebuggerStepThroughAttribute]
+ public override System.Threading.Tasks.Task ReceiveAsync(System.ArraySegment buffer, System.Threading.CancellationToken cancellationToken) { throw null; }
+ [System.Diagnostics.DebuggerStepThroughAttribute]
+ public override System.Threading.Tasks.Task SendAsync(System.ArraySegment buffer, System.Net.WebSockets.WebSocketMessageType messageType, bool endOfMessage, System.Threading.CancellationToken cancellationToken) { throw null; }
+ public sealed partial class ClientWebSocketOptions
+ {
+ internal ClientWebSocketOptions() { }
+ public System.Security.Cryptography.X509Certificates.X509CertificateCollection ClientCertificates { get { throw null; } set { } }
+ public System.Net.CookieContainer Cookies { get { throw null; } set { } }
+ public System.Net.ICredentials Credentials { get { throw null; } set { } }
+ public System.TimeSpan KeepAliveInterval { get { throw null; } set { } }
+ public System.Net.IWebProxy Proxy { get { throw null; } set { } }
+ public System.Net.Security.RemoteCertificateValidationCallback RemoteCertificateValidationCallback { get { throw null; } set { } }
+ public bool UseDefaultCredentials { get { throw null; } set { } }
+ public void AddSubProtocol(string subProtocol) { }
+ public void SetBuffer(int receiveBufferSize, int sendBufferSize) { }
+ public void SetBuffer(int receiveBufferSize, int sendBufferSize, System.ArraySegment buffer) { }
+ public void SetRequestHeader(string headerName, string headerValue) { }
+ }
+ }
+}
diff --git a/external/bockbuild/bockbuild/darwinprofile.py b/external/bockbuild/bockbuild/darwinprofile.py
index 6f156802c3..026a0da7d0 100644
--- a/external/bockbuild/bockbuild/darwinprofile.py
+++ b/external/bockbuild/bockbuild/darwinprofile.py
@@ -28,8 +28,8 @@ def match_stageable_binary(path, filetype):
return 'Mach-O' in filetype and not path.endswith('.a') and not 'dSYM' in path
-def match_symlinks(path, filetype):
- return os.path.islink(path)
+def match_all(path, filetype):
+ return True
def match_real_files(path, filetype):
@@ -248,8 +248,13 @@ class DarwinProfile (UnixProfile):
warn ('Critical: Destaging failed for ''%s''' % path)
raise
+ def nop_harness(path, func):
+ trace('Processing %s' % path)
+ func(path, None)
+
procs = [self.stage_textfiles(harness=destaging_harness, match=match_text),
- self.stage_binaries(harness=destaging_harness, match=match_stageable_binary)]
+ self.stage_binaries(harness=destaging_harness, match=match_stageable_binary),
+ self.validate_symlinks(harness=nop_harness, match=match_all)]
Profile.postprocess(self, procs, directory,
lambda l: l.endswith('.release'))
@@ -278,10 +283,11 @@ class DarwinProfile (UnixProfile):
class validate_symlinks (Profile.FileProcessor):
problem_links = []
- def process(self, path):
- if path.endswith('.release'):
+ def process(self, path, fixup_func):
+ trace(path)
+ if os.path.islink(path) and path.endswith('.release'):
# get rid of these symlinks
- os.remove(path)
+ os.unlink(path)
return
target = os.path.realpath(path)
diff --git a/external/boringssl/THIRD-PARTY-NOTICES.TXT b/external/boringssl/THIRD-PARTY-NOTICES.TXT
new file mode 100644
index 0000000000..069ac8f2ae
--- /dev/null
+++ b/external/boringssl/THIRD-PARTY-NOTICES.TXT
@@ -0,0 +1,20 @@
+Mono uses third-party libraries or other resources that may be
+distributed under licenses different than the .NET Core software.
+
+ Attributions and license notices for test cases originally authored by
+third parties can be found in the respective test directories.
+
+ In the event that we accidentally failed to list a required notice, please
+bring it to our attention. Post an issue or email us:
+
+ dotnet@microsoft.com
+
+ The attached notices are provided for information only.
+
+ License notice for Code Project
+--------------------------------
+
+Title: Thread Local Storage - The C++ Way
+Content: https://www.codeproject.com/Articles/8113/Thread-Local-Storage-The-C-Way
+Reference: https://github.com/mono/boringssl/blob/eec2ca7e76c04ca41ef5bfc875ee3b0374cb7a94/crypto/thread_win.c#L138-L148
+License: https://www.codeproject.com/info/EULA.aspx
diff --git a/external/boringssl/crypto/aes/asm/aesv8-armx.pl b/external/boringssl/crypto/aes/asm/aesv8-armx.pl
index 89e6f874d0..c41175a6f8 100644
--- a/external/boringssl/crypto/aes/asm/aesv8-armx.pl
+++ b/external/boringssl/crypto/aes/asm/aesv8-armx.pl
@@ -51,15 +51,7 @@ $code=<<___;
.text
___
$code.=<<___ if ($flavour =~ /64/);
-#if !defined(__clang__)
.arch armv8-a+crypto
-#elif defined(ANDROID) && defined(__clang__)
-#if __clang_major__ > 3
-.arch armv8-a+crypto
-#else
-.arch armv8-a+crypto,+neon
-#endif
-#endif
___
$code.=".arch armv7-a\n.fpu neon\n.code 32\n" if ($flavour !~ /64/);
#^^^^^^ this is done to simplify adoption by not depending
diff --git a/external/boringssl/crypto/cpu-aarch64-linux.c b/external/boringssl/crypto/cpu-aarch64-linux.c
index 1b0f39552e..93d122370b 100644
--- a/external/boringssl/crypto/cpu-aarch64-linux.c
+++ b/external/boringssl/crypto/cpu-aarch64-linux.c
@@ -25,6 +25,48 @@
extern uint32_t OPENSSL_armcap_P;
+#if defined(__FreeBSD__)
+
+#include
+#include
+#include
+
+// Support for older version of armreg.h
+#ifndef ID_AA64ISAR0_AES_VAL
+#define ID_AA64ISAR0_AES_VAL ID_AA64ISAR0_AES
+#endif
+#ifndef ID_AA64ISAR0_SHA1_VAL
+#define ID_AA64ISAR0_SHA1_VAL ID_AA64ISAR0_SHA1
+#endif
+#ifndef ID_AA64ISAR0_SHA2_VAL
+#define ID_AA64ISAR0_SHA2_VAL ID_AA64ISAR0_SHA2
+#endif
+
+void OPENSSL_cpuid_setup(void) {
+ if (getenv("QEMU_EMULATING") != NULL) {
+ return;
+ }
+
+ uint64_t isar0_val = READ_SPECIALREG(id_aa64isar0_el1);
+
+ OPENSSL_armcap_P |= ARMV7_NEON;
+
+ if (ID_AA64ISAR0_AES_VAL(isar0_val) >= ID_AA64ISAR0_AES_BASE) {
+ OPENSSL_armcap_P |= ARMV8_PMULL;
+ }
+ if (ID_AA64ISAR0_AES_VAL(isar0_val) >= ID_AA64ISAR0_AES_PMULL) {
+ OPENSSL_armcap_P |= ARMV8_PMULL;
+ }
+ if (ID_AA64ISAR0_SHA1_VAL(isar0_val) >= ID_AA64ISAR0_SHA1_BASE) {
+ OPENSSL_armcap_P |= ARMV8_SHA1;
+ }
+ if (ID_AA64ISAR0_SHA2_VAL(isar0_val) >= ID_AA64ISAR0_SHA2_BASE) {
+ OPENSSL_armcap_P |= ARMV8_SHA256;
+ }
+}
+
+#else // linux
+
void OPENSSL_cpuid_setup(void) {
unsigned long hwcap = getauxval(AT_HWCAP);
@@ -58,4 +100,6 @@ void OPENSSL_cpuid_setup(void) {
}
}
+#endif
+
#endif /* OPENSSL_AARCH64 && !OPENSSL_STATIC_ARMCAP */
diff --git a/external/boringssl/crypto/modes/asm/ghashv8-armx.pl b/external/boringssl/crypto/modes/asm/ghashv8-armx.pl
index 7342140561..eabef0cb35 100644
--- a/external/boringssl/crypto/modes/asm/ghashv8-armx.pl
+++ b/external/boringssl/crypto/modes/asm/ghashv8-armx.pl
@@ -59,15 +59,7 @@ $code=<<___;
.text
___
$code.=<<___ if ($flavour =~ /64/);
-#if !defined(__clang__)
.arch armv8-a+crypto
-#elif defined(ANDROID) && defined(__clang__)
-#if __clang_major__ > 3
-.arch armv8-a+crypto
-#else
-.arch armv8-a+crypto,+neon
-#endif
-#endif
___
$code.=".fpu neon\n.code 32\n" if ($flavour !~ /64/);
diff --git a/external/cecil/.github/FUNDING.yml b/external/cecil/.github/FUNDING.yml
new file mode 100644
index 0000000000..2490d79393
--- /dev/null
+++ b/external/cecil/.github/FUNDING.yml
@@ -0,0 +1 @@
+github: jbevain
diff --git a/external/cecil/Directory.Build.props b/external/cecil/Directory.Build.props
index fd9bb8ab08..8c391994ca 100644
--- a/external/cecil/Directory.Build.props
+++ b/external/cecil/Directory.Build.props
@@ -12,10 +12,10 @@
true
- $(net40FrameworkPathOverride)
- /Library/Frameworks/Mono.framework/Versions/Current/lib/mono/4.0-api/
- /usr/lib/mono/4.0-api/
+
+
+
diff --git a/external/cecil/Mono.Cecil.Cil/ILProcessor.cs b/external/cecil/Mono.Cecil.Cil/ILProcessor.cs
index 039d2fc3a0..a3fb8f10a9 100644
--- a/external/cecil/Mono.Cecil.Cil/ILProcessor.cs
+++ b/external/cecil/Mono.Cecil.Cil/ILProcessor.cs
@@ -229,6 +229,16 @@ namespace Mono.Cecil.Cil {
instructions.Insert (index + 1, instruction);
}
+ public void InsertAfter (int index, Instruction instruction)
+ {
+ if (index < 0 || index >= instructions.Count)
+ throw new ArgumentOutOfRangeException ("index");
+ if (instruction == null)
+ throw new ArgumentNullException ("instruction");
+
+ instructions.Insert (index + 1, instruction);
+ }
+
public void Append (Instruction instruction)
{
if (instruction == null)
@@ -248,6 +258,15 @@ namespace Mono.Cecil.Cil {
Remove (target);
}
+ public void Replace (int index, Instruction instruction)
+ {
+ if (instruction == null)
+ throw new ArgumentNullException ("instruction");
+
+ InsertAfter (index, instruction);
+ RemoveAt (index);
+ }
+
public void Remove (Instruction instruction)
{
if (instruction == null)
@@ -256,5 +275,13 @@ namespace Mono.Cecil.Cil {
if (!instructions.Remove (instruction))
throw new ArgumentOutOfRangeException ("instruction");
}
+
+ public void RemoveAt (int index)
+ {
+ if (index < 0 || index >= instructions.Count)
+ throw new ArgumentOutOfRangeException ("index");
+
+ instructions.RemoveAt (index);
+ }
}
}
diff --git a/external/cecil/Mono.Cecil.Cil/MethodBody.cs b/external/cecil/Mono.Cecil.Cil/MethodBody.cs
index eb8baf5b93..579f7f9fda 100644
--- a/external/cecil/Mono.Cecil.Cil/MethodBody.cs
+++ b/external/cecil/Mono.Cecil.Cil/MethodBody.cs
@@ -92,7 +92,7 @@ namespace Mono.Cecil.Cil {
var parameter_type = method.DeclaringType as TypeReference;
if (parameter_type.HasGenericParameters) {
- var instance = new GenericInstanceType (parameter_type);
+ var instance = new GenericInstanceType (parameter_type, parameter_type.GenericParameters.Count);
for (int i = 0; i < parameter_type.GenericParameters.Count; i++)
instance.GenericArguments.Add (parameter_type.GenericParameters [i]);
diff --git a/external/cecil/Mono.Cecil.nuspec b/external/cecil/Mono.Cecil.nuspec
index bd37488c37..4da731c0f1 100644
--- a/external/cecil/Mono.Cecil.nuspec
+++ b/external/cecil/Mono.Cecil.nuspec
@@ -2,7 +2,7 @@
Mono.Cecil
- 0.11.0.0
+ 0.11.1.0
Mono.Cecil
Jb Evain
Jb Evain
diff --git a/external/cecil/Mono.Cecil/AssemblyReader.cs.REMOVED.git-id b/external/cecil/Mono.Cecil/AssemblyReader.cs.REMOVED.git-id
index f85674d750..a539f5dd3b 100644
--- a/external/cecil/Mono.Cecil/AssemblyReader.cs.REMOVED.git-id
+++ b/external/cecil/Mono.Cecil/AssemblyReader.cs.REMOVED.git-id
@@ -1 +1 @@
-1728338c6228125c82803b552e530972592837b2
\ No newline at end of file
+b64846368fef5b8e0e61dc51c6e0b8226ec59ad4
\ No newline at end of file
diff --git a/external/cecil/Mono.Cecil/GenericInstanceMethod.cs b/external/cecil/Mono.Cecil/GenericInstanceMethod.cs
index 00de03a3bd..e86a263d84 100644
--- a/external/cecil/Mono.Cecil/GenericInstanceMethod.cs
+++ b/external/cecil/Mono.Cecil/GenericInstanceMethod.cs
@@ -63,5 +63,11 @@ namespace Mono.Cecil {
: base (method)
{
}
+
+ internal GenericInstanceMethod (MethodReference method, int arity)
+ : this (method)
+ {
+ this.arguments = new Collection (arity);
+ }
}
}
diff --git a/external/cecil/Mono.Cecil/GenericInstanceType.cs b/external/cecil/Mono.Cecil/GenericInstanceType.cs
index 0e683e7134..8885850850 100644
--- a/external/cecil/Mono.Cecil/GenericInstanceType.cs
+++ b/external/cecil/Mono.Cecil/GenericInstanceType.cs
@@ -61,5 +61,11 @@ namespace Mono.Cecil {
base.IsValueType = type.IsValueType;
this.etype = MD.ElementType.GenericInst;
}
+
+ internal GenericInstanceType (TypeReference type, int arity)
+ : this (type)
+ {
+ this.arguments = new Collection (arity);
+ }
}
}
diff --git a/external/cecil/Mono.Cecil/Import.cs b/external/cecil/Mono.Cecil/Import.cs
index 4a6c3e0623..37cf932ae0 100644
--- a/external/cecil/Mono.Cecil/Import.cs
+++ b/external/cecil/Mono.Cecil/Import.cs
@@ -259,8 +259,8 @@ namespace Mono.Cecil {
TypeReference ImportGenericInstance (Type type, ImportGenericContext context)
{
var element_type = ImportType (type.GetGenericTypeDefinition (), context, ImportGenericKind.Definition);
- var instance = new GenericInstanceType (element_type);
var arguments = type.GetGenericArguments ();
+ var instance = new GenericInstanceType (element_type, arguments.Length);
var instance_arguments = instance.GenericArguments;
context.Push (element_type);
@@ -633,9 +633,8 @@ namespace Mono.Cecil {
case ElementType.GenericInst:
var instance = (GenericInstanceType) type;
var element_type = ImportType (instance.ElementType, context);
- var imported_instance = new GenericInstanceType (element_type);
-
var arguments = instance.GenericArguments;
+ var imported_instance = new GenericInstanceType (element_type, arguments.Count);
var imported_arguments = imported_instance.GenericArguments;
for (int i = 0; i < arguments.Count; i++)
diff --git a/external/cecil/Mono.Cecil/TypeParser.cs b/external/cecil/Mono.Cecil/TypeParser.cs
index 07854cd6ed..a4ebd6954c 100644
--- a/external/cecil/Mono.Cecil/TypeParser.cs
+++ b/external/cecil/Mono.Cecil/TypeParser.cs
@@ -296,7 +296,7 @@ namespace Mono.Cecil {
if (generic_arguments.IsNullOrEmpty ())
return type;
- var instance = new GenericInstanceType (type);
+ var instance = new GenericInstanceType (type, generic_arguments.Length);
var instance_arguments = instance.GenericArguments;
for (int i = 0; i < generic_arguments.Length; i++)
diff --git a/external/cecil/Mono.Collections.Generic/Collection.cs b/external/cecil/Mono.Collections.Generic/Collection.cs
index 015d271b47..86c14298de 100644
--- a/external/cecil/Mono.Collections.Generic/Collection.cs
+++ b/external/cecil/Mono.Collections.Generic/Collection.cs
@@ -104,7 +104,9 @@ namespace Mono.Collections.Generic {
if (capacity < 0)
throw new ArgumentOutOfRangeException ();
- items = new T [capacity];
+ items = capacity == 0
+ ? Empty.Array
+ : new T [capacity];
}
public Collection (ICollection items)
diff --git a/external/cecil/ProjectInfo.cs b/external/cecil/ProjectInfo.cs
index 0e24c67a68..5081544960 100644
--- a/external/cecil/ProjectInfo.cs
+++ b/external/cecil/ProjectInfo.cs
@@ -15,6 +15,6 @@ using System.Runtime.InteropServices;
[assembly: ComVisible (false)]
-[assembly: AssemblyVersion ("0.11.0.0")]
-[assembly: AssemblyFileVersion ("0.11.0.0")]
-[assembly: AssemblyInformationalVersion ("0.11.0.0")]
+[assembly: AssemblyVersion ("0.11.1.0")]
+[assembly: AssemblyFileVersion ("0.11.1.0")]
+[assembly: AssemblyInformationalVersion ("0.11.1.0")]
diff --git a/external/cecil/README.md b/external/cecil/README.md
index 7c8707230c..3b95784aad 100644
--- a/external/cecil/README.md
+++ b/external/cecil/README.md
@@ -2,3 +2,4 @@ Cecil
=====
This is a fork of [Cecil](https://github.com/jbevain/cecil) library. Please do any pull requests in the original repository before they are merged into Mono fork.
+
diff --git a/external/cecil/Test/Mono.Cecil.Tests/Extensions.cs b/external/cecil/Test/Mono.Cecil.Tests/Extensions.cs
index ab27e9b028..b51e545aeb 100644
--- a/external/cecil/Test/Mono.Cecil.Tests/Extensions.cs
+++ b/external/cecil/Test/Mono.Cecil.Tests/Extensions.cs
@@ -42,7 +42,7 @@ namespace Mono.Cecil.Tests {
if (self.GenericParameters.Count != arguments.Length)
throw new ArgumentException ();
- var instance = new GenericInstanceType (self);
+ var instance = new GenericInstanceType (self, arguments.Length);
foreach (var argument in arguments)
instance.GenericArguments.Add (argument);
diff --git a/external/cecil/Test/Mono.Cecil.Tests/ILProcessorTests.cs b/external/cecil/Test/Mono.Cecil.Tests/ILProcessorTests.cs
index 3d9d1751b2..f66d78c7f3 100644
--- a/external/cecil/Test/Mono.Cecil.Tests/ILProcessorTests.cs
+++ b/external/cecil/Test/Mono.Cecil.Tests/ILProcessorTests.cs
@@ -53,6 +53,30 @@ namespace Mono.Cecil.Tests {
AssertOpCodeSequence (new [] { OpCodes.Ldloc_0, OpCodes.Ldloc_1, OpCodes.Ldloc_2, OpCodes.Ldloc_3 }, method);
}
+ [Test]
+ public void InsertAfterUsingIndex ()
+ {
+ var method = CreateTestMethod (OpCodes.Ldloc_0, OpCodes.Ldloc_2, OpCodes.Ldloc_3);
+ var il = method.GetILProcessor ();
+
+ il.InsertAfter (
+ 0,
+ il.Create (OpCodes.Ldloc_1));
+
+ AssertOpCodeSequence (new [] { OpCodes.Ldloc_0, OpCodes.Ldloc_1, OpCodes.Ldloc_2, OpCodes.Ldloc_3 }, method);
+ }
+
+ [Test]
+ public void ReplaceUsingIndex ()
+ {
+ var method = CreateTestMethod (OpCodes.Ldloc_0, OpCodes.Ldloc_2, OpCodes.Ldloc_3);
+ var il = method.GetILProcessor ();
+
+ il.Replace (1, il.Create (OpCodes.Nop));
+
+ AssertOpCodeSequence (new [] { OpCodes.Ldloc_0, OpCodes.Nop, OpCodes.Ldloc_3 }, method);
+ }
+
static void AssertOpCodeSequence (OpCode [] expected, MethodBody body)
{
var opcodes = body.Instructions.Select (i => i.OpCode).ToArray ();
diff --git a/external/cecil/rocks/Mono.Cecil.Rocks/TypeReferenceRocks.cs b/external/cecil/rocks/Mono.Cecil.Rocks/TypeReferenceRocks.cs
index c39523641c..1e60951dd9 100644
--- a/external/cecil/rocks/Mono.Cecil.Rocks/TypeReferenceRocks.cs
+++ b/external/cecil/rocks/Mono.Cecil.Rocks/TypeReferenceRocks.cs
@@ -68,7 +68,7 @@ namespace Mono.Cecil.Rocks {
if (self.GenericParameters.Count != arguments.Length)
throw new ArgumentException ();
- var instance = new GenericInstanceType (self);
+ var instance = new GenericInstanceType (self, arguments.Length);
foreach (var argument in arguments)
instance.GenericArguments.Add (argument);
diff --git a/external/corefx/src/Common/src/CoreLib/System/Globalization/CharUnicodeInfo.cs b/external/corefx/src/Common/src/CoreLib/System/Globalization/CharUnicodeInfo.cs
index 0cd8429bbc..52972816a0 100644
--- a/external/corefx/src/Common/src/CoreLib/System/Globalization/CharUnicodeInfo.cs
+++ b/external/corefx/src/Common/src/CoreLib/System/Globalization/CharUnicodeInfo.cs
@@ -1,34 +1,32 @@
+#if !__MonoCS__
+
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-////////////////////////////////////////////////////////////////////////////
-//
-//
-// Purpose: This class implements a set of methods for retrieving
-// character type information. Character type information is
-// independent of culture and region.
-//
-//
-////////////////////////////////////////////////////////////////////////////
-
+using System.Buffers.Binary;
using System.Diagnostics;
+using System.Text;
+#if MONO
+using System.Runtime.CompilerServices;
+#else
+using Internal.Runtime.CompilerServices;
+#endif
namespace System.Globalization
{
+ ///
+ /// This class implements a set of methods for retrieving character type
+ /// information. Character type information is independent of culture
+ /// and region.
+ ///
public static partial class CharUnicodeInfo
{
- //--------------------------------------------------------------------//
- // Internal Information //
- //--------------------------------------------------------------------//
-
- //
- // Native methods to access the Unicode category data tables in charinfo.nlp.
- //
internal const char HIGH_SURROGATE_START = '\ud800';
internal const char HIGH_SURROGATE_END = '\udbff';
internal const char LOW_SURROGATE_START = '\udc00';
internal const char LOW_SURROGATE_END = '\udfff';
+ internal const int HIGH_SURROGATE_RANGE = 0x3FF;
internal const int UNICODE_CATEGORY_OFFSET = 0;
internal const int BIDI_CATEGORY_OFFSET = 1;
@@ -36,61 +34,63 @@ namespace System.Globalization
// The starting codepoint for Unicode plane 1. Plane 1 contains 0x010000 ~ 0x01ffff.
internal const int UNICODE_PLANE01_START = 0x10000;
-
- ////////////////////////////////////////////////////////////////////////
- //
- // Actions:
- // Convert the BMP character or surrogate pointed by index to a UTF32 value.
- // This is similar to Char.ConvertToUTF32, but the difference is that
- // it does not throw exceptions when invalid surrogate characters are passed in.
- //
- // WARNING: since it doesn't throw an exception it CAN return a value
- // in the surrogate range D800-DFFF, which are not legal unicode values.
- //
- ////////////////////////////////////////////////////////////////////////
-
- internal static int InternalConvertToUtf32(String s, int index)
+ ///
+ /// Convert the BMP character or surrogate pointed by index to a UTF32 value.
+ /// This is similar to char.ConvertToUTF32, but the difference is that
+ /// it does not throw exceptions when invalid surrogate characters are passed in.
+ ///
+ /// WARNING: since it doesn't throw an exception it CAN return a value
+ /// in the surrogate range D800-DFFF, which are not legal unicode values.
+ ///
+ internal static int InternalConvertToUtf32(string s, int index)
{
Debug.Assert(s != null, "s != null");
Debug.Assert(index >= 0 && index < s.Length, "index < s.Length");
if (index < s.Length - 1)
{
int temp1 = (int)s[index] - HIGH_SURROGATE_START;
- if (temp1 >= 0 && temp1 <= 0x3ff)
+ if ((uint)temp1 <= HIGH_SURROGATE_RANGE)
{
int temp2 = (int)s[index + 1] - LOW_SURROGATE_START;
- if (temp2 >= 0 && temp2 <= 0x3ff)
+ if ((uint)temp2 <= HIGH_SURROGATE_RANGE)
{
// Convert the surrogate to UTF32 and get the result.
- return ((temp1 * 0x400) + temp2 + UNICODE_PLANE01_START);
+ return (temp1 * 0x400) + temp2 + UNICODE_PLANE01_START;
}
}
}
- return ((int)s[index]);
+ return (int)s[index];
}
- ////////////////////////////////////////////////////////////////////////
- //
- // Convert a character or a surrogate pair starting at index of string s
- // to UTF32 value.
- //
- // Parameters:
- // s The string
- // index The starting index. It can point to a BMP character or
- // a surrogate pair.
- // len The length of the string.
- // charLength [out] If the index points to a BMP char, charLength
- // will be 1. If the index points to a surrogate pair,
- // charLength will be 2.
- //
- // WARNING: since it doesn't throw an exception it CAN return a value
- // in the surrogate range D800-DFFF, which are not legal unicode values.
- //
- // Returns:
- // The UTF32 value
- //
- ////////////////////////////////////////////////////////////////////////
- internal static int InternalConvertToUtf32(String s, int index, out int charLength)
+ internal static int InternalConvertToUtf32(StringBuilder s, int index)
+ {
+ Debug.Assert(s != null, "s != null");
+ Debug.Assert(index >= 0 && index < s.Length, "index < s.Length");
+
+ int c = (int)s[index];
+ if (index < s.Length - 1)
+ {
+ int temp1 = c - HIGH_SURROGATE_START;
+ if ((uint)temp1 <= HIGH_SURROGATE_RANGE)
+ {
+ int temp2 = (int)s[index + 1] - LOW_SURROGATE_START;
+ if ((uint)temp2 <= HIGH_SURROGATE_RANGE)
+ {
+ // Convert the surrogate to UTF32 and get the result.
+ return (temp1 * 0x400) + temp2 + UNICODE_PLANE01_START;
+ }
+ }
+ }
+ return c;
+ }
+
+ ///
+ /// Convert a character or a surrogate pair starting at index of string s
+ /// to UTF32 value.
+ /// WARNING: since it doesn't throw an exception it CAN return a value
+ /// in the surrogate range D800-DFFF, which are not legal unicode values.
+ ///
+ internal static int InternalConvertToUtf32(string s, int index, out int charLength)
{
Debug.Assert(s != null, "s != null");
Debug.Assert(s.Length > 0, "s.Length > 0");
@@ -99,28 +99,232 @@ namespace System.Globalization
if (index < s.Length - 1)
{
int temp1 = (int)s[index] - HIGH_SURROGATE_START;
- if (temp1 >= 0 && temp1 <= 0x3ff)
+ if ((uint)temp1 <= HIGH_SURROGATE_RANGE)
{
int temp2 = (int)s[index + 1] - LOW_SURROGATE_START;
- if (temp2 >= 0 && temp2 <= 0x3ff)
+ if ((uint)temp2 <= HIGH_SURROGATE_RANGE)
{
// Convert the surrogate to UTF32 and get the result.
charLength++;
- return ((temp1 * 0x400) + temp2 + UNICODE_PLANE01_START);
+ return (temp1 * 0x400) + temp2 + UNICODE_PLANE01_START;
}
}
}
- return ((int)s[index]);
+ return (int)s[index];
}
- ////////////////////////////////////////////////////////////////////////
- //
- // IsWhiteSpace
- //
- // Determines if the given character is a white space character.
- //
- ////////////////////////////////////////////////////////////////////////
+ ///
+ /// This is called by the public char and string, index versions
+ /// Note that for ch in the range D800-DFFF we just treat it as any
+ /// other non-numeric character
+ ///
+ internal static double InternalGetNumericValue(int ch)
+ {
+ Debug.Assert(ch >= 0 && ch <= 0x10ffff, "ch is not in valid Unicode range.");
+ // Get the level 2 item from the highest 12 bit (8 - 19) of ch.
+ int index = ch >> 8;
+ if ((uint)index < (uint)NumericLevel1Index.Length)
+ {
+ index = NumericLevel1Index[index];
+ // Get the level 2 offset from the 4 - 7 bit of ch. This provides the base offset of the level 3 table.
+ // Note that & has the lower precedence than addition, so don't forget the parathesis.
+ index = NumericLevel2Index[(index << 4) + ((ch >> 4) & 0x000f)];
+ index = NumericLevel3Index[(index << 4) + (ch & 0x000f)];
+ ref byte value = ref Unsafe.AsRef(in NumericValues[index * 8]);
+ if (BitConverter.IsLittleEndian)
+ {
+ return Unsafe.ReadUnaligned(ref value);
+ }
+
+ return BitConverter.Int64BitsToDouble(BinaryPrimitives.ReverseEndianness(Unsafe.ReadUnaligned(ref value)));
+ }
+ return -1;
+ }
+
+ internal static byte InternalGetDigitValues(int ch, int offset)
+ {
+ Debug.Assert(ch >= 0 && ch <= 0x10ffff, "ch is not in valid Unicode range.");
+ // Get the level 2 item from the highest 12 bit (8 - 19) of ch.
+ int index = ch >> 8;
+ if ((uint)index < (uint)NumericLevel1Index.Length)
+ {
+ index = NumericLevel1Index[index];
+ // Get the level 2 offset from the 4 - 7 bit of ch. This provides the base offset of the level 3 table.
+ // Note that & has the lower precedence than addition, so don't forget the parathesis.
+ index = NumericLevel2Index[(index << 4) + ((ch >> 4) & 0x000f)];
+ index = NumericLevel3Index[(index << 4) + (ch & 0x000f)];
+ return DigitValues[index * 2 + offset];
+ }
+ return 0xff;
+ }
+
+ ///
+ /// Returns the numeric value associated with the character c.
+ /// If the character is a fraction, the return value will not be an
+ /// integer. If the character does not have a numeric value, the return
+ /// value is -1.
+ ///
+ public static double GetNumericValue(char ch)
+ {
+ return InternalGetNumericValue(ch);
+ }
+
+ public static double GetNumericValue(string s, int index)
+ {
+ if (s == null)
+ {
+ throw new ArgumentNullException(nameof(s));
+ }
+ if (index < 0 || index >= s.Length)
+ {
+ throw new ArgumentOutOfRangeException(nameof(index), SR.ArgumentOutOfRange_Index);
+ }
+
+ return InternalGetNumericValue(InternalConvertToUtf32(s, index));
+ }
+
+ public static int GetDecimalDigitValue(char ch)
+ {
+ return (sbyte)InternalGetDigitValues(ch, 0);
+ }
+
+ public static int GetDecimalDigitValue(string s, int index)
+ {
+ if (s == null)
+ {
+ throw new ArgumentNullException(nameof(s));
+ }
+ if (index < 0 || index >= s.Length)
+ {
+ throw new ArgumentOutOfRangeException(nameof(index), SR.ArgumentOutOfRange_Index);
+ }
+
+ return (sbyte)InternalGetDigitValues(InternalConvertToUtf32(s, index), 0);
+ }
+
+ public static int GetDigitValue(char ch)
+ {
+ return (sbyte)InternalGetDigitValues(ch, 1);
+ }
+
+ public static int GetDigitValue(string s, int index)
+ {
+ if (s == null)
+ {
+ throw new ArgumentNullException(nameof(s));
+ }
+ if (index < 0 || index >= s.Length)
+ {
+ throw new ArgumentOutOfRangeException(nameof(index), SR.ArgumentOutOfRange_Index);
+ }
+
+ return (sbyte)InternalGetDigitValues(InternalConvertToUtf32(s, index), 1);
+ }
+
+ public static UnicodeCategory GetUnicodeCategory(char ch)
+ {
+ return GetUnicodeCategory((int)ch);
+ }
+
+ public static UnicodeCategory GetUnicodeCategory(string s, int index)
+ {
+ if (s == null)
+ {
+ throw new ArgumentNullException(nameof(s));
+ }
+ if (((uint)index) >= ((uint)s.Length))
+ {
+ throw new ArgumentOutOfRangeException(nameof(index));
+ }
+
+ return InternalGetUnicodeCategory(s, index);
+ }
+
+ public static UnicodeCategory GetUnicodeCategory(int codePoint)
+ {
+ return (UnicodeCategory)InternalGetCategoryValue(codePoint, UNICODE_CATEGORY_OFFSET);
+ }
+
+ ///
+ /// Returns the Unicode Category property for the character c.
+ /// Note that this API will return values for D800-DF00 surrogate halves.
+ ///
+ internal static byte InternalGetCategoryValue(int ch, int offset)
+ {
+ Debug.Assert(ch >= 0 && ch <= 0x10ffff, "ch is not in valid Unicode range.");
+ // Get the level 2 item from the highest 11 bits of ch.
+ int index = CategoryLevel1Index[ch >> 9];
+ // Get the level 2 WORD offset from the next 5 bits of ch. This provides the base offset of the level 3 table.
+ // Note that & has the lower precedence than addition, so don't forget the parathesis.
+ index = Unsafe.ReadUnaligned(ref Unsafe.AsRef(in CategoryLevel2Index[(index << 6) + ((ch >> 3) & 0b111110)]));
+ if (!BitConverter.IsLittleEndian)
+ {
+ index = BinaryPrimitives.ReverseEndianness((ushort)index);
+ }
+
+ // Get the result from the 0 -3 bit of ch.
+ index = CategoryLevel3Index[(index << 4) + (ch & 0x000f)];
+ return CategoriesValue[index * 2 + offset];
+ }
+
+ ///
+ /// Returns the Unicode Category property for the character c.
+ ///
+ internal static UnicodeCategory InternalGetUnicodeCategory(string value, int index)
+ {
+ Debug.Assert(value != null, "value can not be null");
+ Debug.Assert(index < value.Length, "index < value.Length");
+
+ return GetUnicodeCategory(InternalConvertToUtf32(value, index));
+ }
+
+ internal static BidiCategory GetBidiCategory(string s, int index)
+ {
+ if (s == null)
+ {
+ throw new ArgumentNullException(nameof(s));
+ }
+ if (((uint)index) >= ((uint)s.Length))
+ {
+ throw new ArgumentOutOfRangeException(nameof(index));
+ }
+
+ return (BidiCategory)InternalGetCategoryValue(InternalConvertToUtf32(s, index), BIDI_CATEGORY_OFFSET);
+ }
+
+ internal static BidiCategory GetBidiCategory(StringBuilder s, int index)
+ {
+ Debug.Assert(s != null, "s can not be null");
+ Debug.Assert(index >= 0 && index < s.Length, "invalid index");
+
+ return (BidiCategory)InternalGetCategoryValue(InternalConvertToUtf32(s, index), BIDI_CATEGORY_OFFSET);
+ }
+
+ ///
+ /// Get the Unicode category of the character starting at index. If the character is in BMP, charLength will return 1.
+ /// If the character is a valid surrogate pair, charLength will return 2.
+ ///
+ internal static UnicodeCategory InternalGetUnicodeCategory(string str, int index, out int charLength)
+ {
+ Debug.Assert(str != null, "str can not be null");
+ Debug.Assert(str.Length > 0, "str.Length > 0");
+ Debug.Assert(index >= 0 && index < str.Length, "index >= 0 && index < str.Length");
+
+ return GetUnicodeCategory(InternalConvertToUtf32(str, index, out charLength));
+ }
+
+ internal static bool IsCombiningCategory(UnicodeCategory uc)
+ {
+ Debug.Assert(uc >= 0, "uc >= 0");
+ return
+ uc == UnicodeCategory.NonSpacingMark ||
+ uc == UnicodeCategory.SpacingCombiningMark ||
+ uc == UnicodeCategory.EnclosingMark
+ ;
+ }
+
+#if MONO
internal static bool IsWhiteSpace(String s, int index)
{
Debug.Assert(s != null, "s!=null");
@@ -155,243 +359,7 @@ namespace System.Globalization
return (false);
}
-
-
- //
- // This is called by the public char and string, index versions
- //
- // Note that for ch in the range D800-DFFF we just treat it as any other non-numeric character
- //
- internal static unsafe double InternalGetNumericValue(int ch)
- {
- Debug.Assert(ch >= 0 && ch <= 0x10ffff, "ch is not in valid Unicode range.");
- // Get the level 2 item from the highest 12 bit (8 - 19) of ch.
- ushort index = s_pNumericLevel1Index[ch >> 8];
- // Get the level 2 WORD offset from the 4 - 7 bit of ch. This provides the base offset of the level 3 table.
- // The offset is referred to an float item in m_pNumericFloatData.
- // Note that & has the lower precedence than addition, so don't forget the parathesis.
- index = s_pNumericLevel1Index[index + ((ch >> 4) & 0x000f)];
-
- fixed (ushort* pUshortPtr = &(s_pNumericLevel1Index[index]))
- {
- byte* pBytePtr = (byte*)pUshortPtr;
- fixed (byte* pByteNum = s_pNumericValues)
- {
- double* pDouble = (double*)pByteNum;
- return pDouble[pBytePtr[(ch & 0x000f)]];
- }
- }
- }
-
- internal static unsafe ushort InternalGetDigitValues(int ch)
- {
- Debug.Assert(ch >= 0 && ch <= 0x10ffff, "ch is not in valid Unicode range.");
- // Get the level 2 item from the highest 12 bit (8 - 19) of ch.
- ushort index = s_pNumericLevel1Index[ch >> 8];
- // Get the level 2 WORD offset from the 4 - 7 bit of ch. This provides the base offset of the level 3 table.
- // Note that & has the lower precedence than addition, so don't forget the parathesis.
- index = s_pNumericLevel1Index[index + ((ch >> 4) & 0x000f)];
-
- fixed (ushort* pUshortPtr = &(s_pNumericLevel1Index[index]))
- {
- byte* pBytePtr = (byte*)pUshortPtr;
- return s_pDigitValues[pBytePtr[(ch & 0x000f)]];
- }
- }
-
- ////////////////////////////////////////////////////////////////////////
- //
- //Returns the numeric value associated with the character c. If the character is a fraction,
- // the return value will not be an integer. If the character does not have a numeric value, the return value is -1.
- //
- //Returns:
- // the numeric value for the specified Unicode character. If the character does not have a numeric value, the return value is -1.
- //Arguments:
- // ch a Unicode character
- //Exceptions:
- // ArgumentNullException
- // ArgumentOutOfRangeException
- //
- ////////////////////////////////////////////////////////////////////////
-
-
- public static double GetNumericValue(char ch)
- {
- return (InternalGetNumericValue(ch));
- }
-
-
- public static double GetNumericValue(String s, int index)
- {
- if (s == null)
- {
- throw new ArgumentNullException(nameof(s));
- }
- if (index < 0 || index >= s.Length)
- {
- throw new ArgumentOutOfRangeException(nameof(index), SR.ArgumentOutOfRange_Index);
- }
- return (InternalGetNumericValue(InternalConvertToUtf32(s, index)));
- }
-
- public static int GetDecimalDigitValue(char ch)
- {
- return (sbyte)(InternalGetDigitValues(ch) >> 8);
- }
-
- public static int GetDecimalDigitValue(String s, int index)
- {
- if (s == null)
- {
- throw new ArgumentNullException(nameof(s));
- }
-
- if (index < 0 || index >= s.Length)
- {
- throw new ArgumentOutOfRangeException(nameof(index), SR.ArgumentOutOfRange_Index);
- }
-
- return (sbyte)(InternalGetDigitValues(InternalConvertToUtf32(s, index)) >> 8);
- }
-
- public static int GetDigitValue(char ch)
- {
- return (sbyte)(InternalGetDigitValues(ch) & 0x00FF);
- }
-
- public static int GetDigitValue(String s, int index)
- {
- if (s == null)
- {
- throw new ArgumentNullException(nameof(s));
- }
-
- if (index < 0 || index >= s.Length)
- {
- throw new ArgumentOutOfRangeException(nameof(index), SR.ArgumentOutOfRange_Index);
- }
-
- return (sbyte)(InternalGetDigitValues(InternalConvertToUtf32(s, index)) & 0x00FF);
- }
-
- public static UnicodeCategory GetUnicodeCategory(char ch)
- {
- return (GetUnicodeCategory((int)ch));
- }
-
- public static UnicodeCategory GetUnicodeCategory(String s, int index)
- {
- if (s == null)
- throw new ArgumentNullException(nameof(s));
- if (((uint)index) >= ((uint)s.Length))
- {
- throw new ArgumentOutOfRangeException(nameof(index));
- }
- return InternalGetUnicodeCategory(s, index);
- }
-
- public static UnicodeCategory GetUnicodeCategory(int codePoint)
- {
- return ((UnicodeCategory)InternalGetCategoryValue(codePoint, UNICODE_CATEGORY_OFFSET));
- }
-
-
- ////////////////////////////////////////////////////////////////////////
- //
- //Action: Returns the Unicode Category property for the character c.
- //Returns:
- // an value in UnicodeCategory enum
- //Arguments:
- // ch a Unicode character
- //Exceptions:
- // None
- //
- //Note that this API will return values for D800-DF00 surrogate halves.
- //
- ////////////////////////////////////////////////////////////////////////
-
- internal static unsafe byte InternalGetCategoryValue(int ch, int offset)
- {
- Debug.Assert(ch >= 0 && ch <= 0x10ffff, "ch is not in valid Unicode range.");
- // Get the level 2 item from the highest 12 bit (8 - 19) of ch.
- ushort index = s_pCategoryLevel1Index[ch >> 8];
- // Get the level 2 WORD offset from the 4 - 7 bit of ch. This provides the base offset of the level 3 table.
- // Note that & has the lower precedence than addition, so don't forget the parathesis.
- index = s_pCategoryLevel1Index[index + ((ch >> 4) & 0x000f)];
-
- fixed (ushort* pUshortPtr = &(s_pCategoryLevel1Index[index]))
- {
- byte* pBytePtr = (byte*)pUshortPtr;
- // Get the result from the 0 -3 bit of ch.
- byte valueIndex = pBytePtr[(ch & 0x000f)];
- byte uc = s_pCategoriesValue[valueIndex * 2 + offset];
- //
- // Make sure that OtherNotAssigned is the last category in UnicodeCategory.
- // If that changes, change the following assertion as well.
- //
- //Debug.Assert(uc >= 0 && uc <= UnicodeCategory.OtherNotAssigned, "Table returns incorrect Unicode category");
- return (uc);
- }
- }
-
- ////////////////////////////////////////////////////////////////////////
- //
- //Action: Returns the Unicode Category property for the character c.
- //Returns:
- // an value in UnicodeCategory enum
- //Arguments:
- // value a Unicode String
- // index Index for the specified string.
- //Exceptions:
- // None
- //
- ////////////////////////////////////////////////////////////////////////
-
- internal static UnicodeCategory InternalGetUnicodeCategory(String value, int index)
- {
- Debug.Assert(value != null, "value can not be null");
- Debug.Assert(index < value.Length, "index < value.Length");
-
- return (GetUnicodeCategory(InternalConvertToUtf32(value, index)));
- }
-
- internal static BidiCategory GetBidiCategory(String s, int index)
- {
- if (s == null)
- throw new ArgumentNullException(nameof(s));
-
- if (((uint)index) >= ((uint)s.Length))
- {
- throw new ArgumentOutOfRangeException(nameof(index));
- }
-
- return ((BidiCategory) InternalGetCategoryValue(InternalConvertToUtf32(s, index), BIDI_CATEGORY_OFFSET));
- }
-
- ////////////////////////////////////////////////////////////////////////
- //
- // Get the Unicode category of the character starting at index. If the character is in BMP, charLength will return 1.
- // If the character is a valid surrogate pair, charLength will return 2.
- //
- ////////////////////////////////////////////////////////////////////////
-
- internal static UnicodeCategory InternalGetUnicodeCategory(String str, int index, out int charLength)
- {
- Debug.Assert(str != null, "str can not be null");
- Debug.Assert(str.Length > 0, "str.Length > 0"); ;
- Debug.Assert(index >= 0 && index < str.Length, "index >= 0 && index < str.Length");
-
- return (GetUnicodeCategory(InternalConvertToUtf32(str, index, out charLength)));
- }
-
- internal static bool IsCombiningCategory(UnicodeCategory uc)
- {
- Debug.Assert(uc >= 0, "uc >= 0");
- return (
- uc == UnicodeCategory.NonSpacingMark ||
- uc == UnicodeCategory.SpacingCombiningMark ||
- uc == UnicodeCategory.EnclosingMark
- );
- }
+#endif
}
}
+#endif
\ No newline at end of file
diff --git a/external/corefx/src/Common/src/CoreLib/System/Globalization/CharUnicodeInfoData.cs.REMOVED.git-id b/external/corefx/src/Common/src/CoreLib/System/Globalization/CharUnicodeInfoData.cs.REMOVED.git-id
new file mode 100644
index 0000000000..e3a4258ee4
--- /dev/null
+++ b/external/corefx/src/Common/src/CoreLib/System/Globalization/CharUnicodeInfoData.cs.REMOVED.git-id
@@ -0,0 +1 @@
+4c73d086958f94da084c33cd2530c0a2a819e361
\ No newline at end of file
diff --git a/external/corefx/src/Common/src/CoreLib/System/Globalization/CompareInfo.cs b/external/corefx/src/Common/src/CoreLib/System/Globalization/CompareInfo.cs
index e43abcee3a..02af604f39 100644
--- a/external/corefx/src/Common/src/CoreLib/System/Globalization/CompareInfo.cs
+++ b/external/corefx/src/Common/src/CoreLib/System/Globalization/CompareInfo.cs
@@ -78,10 +78,6 @@ namespace System.Globalization
[OptionalField(VersionAdded = 3)]
private SortVersion m_SortVersion; // Do not rename (binary serialization)
- // _invariantMode is defined for the perf reason as accessing the instance field is faster than access the static property GlobalizationMode.Invariant
- [NonSerialized]
- private readonly bool _invariantMode = GlobalizationMode.Invariant;
-
private int culture; // Do not rename (binary serialization). The fields sole purpose is to support Desktop serialization.
internal CompareInfo(CultureInfo culture)
@@ -340,7 +336,7 @@ namespace System.Globalization
return (1); // non-null > null
}
- if (_invariantMode)
+ if (GlobalizationMode.Invariant)
{
if ((options & CompareOptions.IgnoreCase) != 0)
return CompareOrdinalIgnoreCase(string1, string2);
@@ -387,7 +383,7 @@ namespace System.Globalization
return 1;
}
- if (_invariantMode)
+ if (GlobalizationMode.Invariant)
{
return (options & CompareOptions.IgnoreCase) != 0 ?
CompareOrdinalIgnoreCase(string1, string2.AsSpan()) :
@@ -403,7 +399,7 @@ namespace System.Globalization
if (string1.Length == 0 || string2.Length == 0)
return string1.Length - string2.Length;
- return _invariantMode ?
+ return GlobalizationMode.Invariant ?
string.CompareOrdinal(string1, string2) :
CompareString(string1, string2, CompareOptions.None);
}
@@ -414,7 +410,7 @@ namespace System.Globalization
if (string1.Length == 0 || string2.Length == 0)
return string1.Length - string2.Length;
- return _invariantMode ?
+ return GlobalizationMode.Invariant ?
CompareOrdinalIgnoreCase(string1, string2) :
CompareString(string1, string2, CompareOptions.IgnoreCase);
}
@@ -515,7 +511,7 @@ namespace System.Globalization
return string.CompareOrdinal(span1, span2);
}
- if (_invariantMode)
+ if (GlobalizationMode.Invariant)
{
if ((options & CompareOptions.IgnoreCase) != 0)
return CompareOrdinalIgnoreCase(span1, span2);
@@ -633,7 +629,7 @@ namespace System.Globalization
throw new ArgumentException(SR.Argument_InvalidFlag, nameof(options));
}
- if (_invariantMode)
+ if (GlobalizationMode.Invariant)
{
return source.StartsWith(prefix, (options & CompareOptions.IgnoreCase) != 0 ? StringComparison.OrdinalIgnoreCase : StringComparison.Ordinal);
}
@@ -646,7 +642,7 @@ namespace System.Globalization
Debug.Assert(prefix.Length != 0);
Debug.Assert(source.Length != 0);
Debug.Assert((options & ValidIndexMaskOffFlags) == 0);
- Debug.Assert(!_invariantMode);
+ Debug.Assert(!GlobalizationMode.Invariant);
Debug.Assert((options & (CompareOptions.Ordinal | CompareOptions.OrdinalIgnoreCase)) == 0);
return StartsWith(source, prefix, options);
@@ -698,7 +694,7 @@ namespace System.Globalization
throw new ArgumentException(SR.Argument_InvalidFlag, nameof(options));
}
- if (_invariantMode)
+ if (GlobalizationMode.Invariant)
{
return source.EndsWith(suffix, (options & CompareOptions.IgnoreCase) != 0 ? StringComparison.OrdinalIgnoreCase : StringComparison.Ordinal);
}
@@ -711,7 +707,7 @@ namespace System.Globalization
Debug.Assert(suffix.Length != 0);
Debug.Assert(source.Length != 0);
Debug.Assert((options & ValidIndexMaskOffFlags) == 0);
- Debug.Assert(!_invariantMode);
+ Debug.Assert(!GlobalizationMode.Invariant);
Debug.Assert((options & (CompareOptions.Ordinal | CompareOptions.OrdinalIgnoreCase)) == 0);
return EndsWith(source, suffix, options);
@@ -844,7 +840,7 @@ namespace System.Globalization
if ((options & ValidIndexMaskOffFlags) != 0 && (options != CompareOptions.Ordinal))
throw new ArgumentException(SR.Argument_InvalidFlag, nameof(options));
- if (_invariantMode)
+ if (GlobalizationMode.Invariant)
return IndexOfOrdinal(source, new string(value, 1), startIndex, count, ignoreCase: (options & (CompareOptions.IgnoreCase | CompareOptions.OrdinalIgnoreCase)) != 0);
return IndexOfCore(source, new string(value, 1), startIndex, count, options, null);
@@ -892,7 +888,7 @@ namespace System.Globalization
if ((options & ValidIndexMaskOffFlags) != 0 && (options != CompareOptions.Ordinal))
throw new ArgumentException(SR.Argument_InvalidFlag, nameof(options));
- if (_invariantMode)
+ if (GlobalizationMode.Invariant)
return IndexOfOrdinal(source, value, startIndex, count, ignoreCase: (options & (CompareOptions.IgnoreCase | CompareOptions.OrdinalIgnoreCase)) != 0);
return IndexOfCore(source, value, startIndex, count, options, null);
@@ -900,7 +896,7 @@ namespace System.Globalization
internal int IndexOfOrdinal(ReadOnlySpan source, ReadOnlySpan value, bool ignoreCase)
{
- Debug.Assert(!_invariantMode);
+ Debug.Assert(!GlobalizationMode.Invariant);
Debug.Assert(!source.IsEmpty);
Debug.Assert(!value.IsEmpty);
return IndexOfOrdinalCore(source, value, ignoreCase);
@@ -908,7 +904,7 @@ namespace System.Globalization
internal unsafe int IndexOf(ReadOnlySpan source, ReadOnlySpan value, CompareOptions options)
{
- Debug.Assert(!_invariantMode);
+ Debug.Assert(!GlobalizationMode.Invariant);
Debug.Assert(!source.IsEmpty);
Debug.Assert(!value.IsEmpty);
return IndexOfCore(source, value, options, null);
@@ -948,7 +944,7 @@ namespace System.Globalization
return res;
}
- if (_invariantMode)
+ if (GlobalizationMode.Invariant)
{
int res = IndexOfOrdinal(source, value, startIndex, count, ignoreCase: (options & (CompareOptions.IgnoreCase | CompareOptions.OrdinalIgnoreCase)) != 0);
if (res >= 0)
@@ -963,7 +959,7 @@ namespace System.Globalization
internal int IndexOfOrdinal(string source, string value, int startIndex, int count, bool ignoreCase)
{
- if (_invariantMode)
+ if (GlobalizationMode.Invariant)
{
return InvariantIndexOf(source, value, startIndex, count, ignoreCase);
}
@@ -1098,7 +1094,7 @@ namespace System.Globalization
return source.LastIndexOf(value.ToString(), startIndex, count, StringComparison.OrdinalIgnoreCase);
}
- if (_invariantMode)
+ if (GlobalizationMode.Invariant)
return InvariantLastIndexOf(source, new string(value, 1), startIndex, count, (options & (CompareOptions.IgnoreCase | CompareOptions.OrdinalIgnoreCase)) != 0);
return LastIndexOfCore(source, value.ToString(), startIndex, count, options);
@@ -1149,7 +1145,7 @@ namespace System.Globalization
return LastIndexOfOrdinal(source, value, startIndex, count, ignoreCase: true);
}
- if (_invariantMode)
+ if (GlobalizationMode.Invariant)
return InvariantLastIndexOf(source, value, startIndex, count, (options & (CompareOptions.IgnoreCase | CompareOptions.OrdinalIgnoreCase)) != 0);
return LastIndexOfCore(source, value, startIndex, count, options);
@@ -1157,7 +1153,7 @@ namespace System.Globalization
internal int LastIndexOfOrdinal(string source, string value, int startIndex, int count, bool ignoreCase)
{
- if (_invariantMode)
+ if (GlobalizationMode.Invariant)
{
return InvariantLastIndexOf(source, value, startIndex, count, ignoreCase);
}
@@ -1174,7 +1170,7 @@ namespace System.Globalization
////////////////////////////////////////////////////////////////////////
public virtual SortKey GetSortKey(string source, CompareOptions options)
{
- if (_invariantMode)
+ if (GlobalizationMode.Invariant)
return InvariantCreateSortKey(source, options);
return CreateSortKey(source, options);
@@ -1183,7 +1179,7 @@ namespace System.Globalization
public virtual SortKey GetSortKey(string source)
{
- if (_invariantMode)
+ if (GlobalizationMode.Invariant)
return InvariantCreateSortKey(source, CompareOptions.None);
return CreateSortKey(source, CompareOptions.None);
@@ -1297,7 +1293,7 @@ namespace System.Globalization
throw new ArgumentException(SR.Argument_InvalidFlag, nameof(options));
}
- if (_invariantMode)
+ if (GlobalizationMode.Invariant)
{
return ((options & CompareOptions.IgnoreCase) != 0) ? GetIgnoreCaseHash(source) : source.GetHashCode();
}
@@ -1349,7 +1345,7 @@ namespace System.Globalization
{
if (m_SortVersion == null)
{
- if (_invariantMode)
+ if (GlobalizationMode.Invariant)
{
m_SortVersion = new SortVersion(0, CultureInfo.LOCALE_INVARIANT, new Guid(0, 0, 0, 0, 0, 0, 0,
(byte) (CultureInfo.LOCALE_INVARIANT >> 24),
diff --git a/external/corefx/src/Common/src/System/Globalization/FormatProvider.Number.cs b/external/corefx/src/Common/src/System/Globalization/FormatProvider.Number.cs
index cda92cfcdd..bdf79c6366 100644
--- a/external/corefx/src/Common/src/System/Globalization/FormatProvider.Number.cs
+++ b/external/corefx/src/Common/src/System/Globalization/FormatProvider.Number.cs
@@ -297,17 +297,17 @@ namespace System.Globalization
return (((ch) == 0x20) || ((ch) >= 0x09 && (ch) <= 0x0D));
}
- private static unsafe char* MatchChars(char* p, string str)
+ private static unsafe char* MatchChars(char* p, char* pEnd, string str)
{
fixed (char* stringPointer = str)
{
- return MatchChars(p, stringPointer);
+ return MatchChars(p, pEnd, stringPointer);
}
}
- private static unsafe char* MatchChars(char* p, char* str)
+ private static unsafe char* MatchChars(char* p, char* pEnd, char* str)
{
- Debug.Assert(p != null && str != null);
+ Debug.Assert(p != null && pEnd != null && p <= pEnd && str != null);
if (*str == '\0')
{
@@ -317,8 +317,13 @@ namespace System.Globalization
// We only hurt the failure case
// This fix is for French or Kazakh cultures. Since a user cannot type 0xA0 as a
// space character we use 0x20 space character instead to mean the same.
- while (*p == *str || (*str == '\u00a0' && *p == '\u0020'))
+ while (true)
{
+ char cp = p < pEnd ? *p : '\0';
+ if (cp != *str && !(*str == '\u00a0' && cp == '\u0020'))
+ {
+ break;
+ }
p++;
str++;
if (*str == '\0') return p;
@@ -326,8 +331,12 @@ namespace System.Globalization
return null;
}
- private static unsafe bool ParseNumber(ref char* str, NumberStyles options, ref NumberBuffer number, StringBuilder sb, NumberFormatInfo numfmt, bool parseDecimal)
+ private static unsafe bool ParseNumber(ref char* str, char* strEnd, NumberStyles options, ref NumberBuffer number, StringBuilder sb, NumberFormatInfo numfmt, bool parseDecimal)
{
+ Debug.Assert(str != null);
+ Debug.Assert(strEnd != null);
+ Debug.Assert(str <= strEnd);
+
const int StateSign = 0x0001;
const int StateParens = 0x0002;
const int StateDigits = 0x0004;
@@ -362,7 +371,7 @@ namespace System.Globalization
int maxParseDigits = bigNumber ? int.MaxValue : NumberMaxDigits;
char* p = str;
- char ch = *p;
+ char ch = p < strEnd ? *p : '\0';
char* next;
char* dig = number.digits;
@@ -373,7 +382,7 @@ namespace System.Globalization
// "-Kr 1231.47" is legal but "- 1231.47" is not.
if (!IsWhite(ch) || (options & NumberStyles.AllowLeadingWhite) == 0 || ((state & StateSign) != 0 && ((state & StateCurrency) == 0 && numfmt.NumberNegativePattern != 2)))
{
- if ((((options & NumberStyles.AllowLeadingSign) != 0) && (state & StateSign) == 0) && ((next = MatchChars(p, numfmt.PositiveSign)) != null || ((next = MatchChars(p, numfmt.NegativeSign)) != null && (number.sign = true))))
+ if ((((options & NumberStyles.AllowLeadingSign) != 0) && (state & StateSign) == 0) && ((next = MatchChars(p, strEnd, numfmt.PositiveSign)) != null || ((next = MatchChars(p, strEnd, numfmt.NegativeSign)) != null && (number.sign = true))))
{
state |= StateSign;
p = next - 1;
@@ -383,7 +392,7 @@ namespace System.Globalization
state |= StateSign | StateParens;
number.sign = true;
}
- else if (currSymbol != null && (next = MatchChars(p, currSymbol)) != null)
+ else if (currSymbol != null && (next = MatchChars(p, strEnd, currSymbol)) != null)
{
state |= StateCurrency;
currSymbol = null;
@@ -397,7 +406,7 @@ namespace System.Globalization
break;
}
}
- ch = *++p;
+ ch = ++p < strEnd ? *p : '\0';
}
int digCount = 0;
@@ -437,12 +446,12 @@ namespace System.Globalization
number.scale--;
}
}
- else if (((options & NumberStyles.AllowDecimalPoint) != 0) && ((state & StateDecimal) == 0) && ((next = MatchChars(p, decSep)) != null || ((parsingCurrency) && (state & StateCurrency) == 0) && (next = MatchChars(p, numfmt.NumberDecimalSeparator)) != null))
+ else if (((options & NumberStyles.AllowDecimalPoint) != 0) && ((state & StateDecimal) == 0) && ((next = MatchChars(p, strEnd, decSep)) != null || ((parsingCurrency) && (state & StateCurrency) == 0) && (next = MatchChars(p, strEnd, numfmt.NumberDecimalSeparator)) != null))
{
state |= StateDecimal;
p = next - 1;
}
- else if (((options & NumberStyles.AllowThousands) != 0) && ((state & StateDigits) != 0) && ((state & StateDecimal) == 0) && ((next = MatchChars(p, groupSep)) != null || ((parsingCurrency) && (state & StateCurrency) == 0) && (next = MatchChars(p, numfmt.NumberGroupSeparator)) != null))
+ else if (((options & NumberStyles.AllowThousands) != 0) && ((state & StateDigits) != 0) && ((state & StateDecimal) == 0) && ((next = MatchChars(p, strEnd, groupSep)) != null || ((parsingCurrency) && (state & StateCurrency) == 0) && (next = MatchChars(p, strEnd, numfmt.NumberGroupSeparator)) != null))
{
p = next - 1;
}
@@ -450,7 +459,7 @@ namespace System.Globalization
{
break;
}
- ch = *++p;
+ ch = ++p < strEnd ? *p : '\0';
}
bool negExp = false;
@@ -464,14 +473,14 @@ namespace System.Globalization
if ((ch == 'E' || ch == 'e') && ((options & NumberStyles.AllowExponent) != 0))
{
char* temp = p;
- ch = *++p;
- if ((next = MatchChars(p, numfmt.PositiveSign)) != null)
+ ch = ++p < strEnd ? *p : '\0';
+ if ((next = MatchChars(p, strEnd, numfmt.PositiveSign)) != null)
{
- ch = *(p = next);
+ ch = (p = next) < strEnd ? *p : '\0';
}
- else if ((next = MatchChars(p, numfmt.NegativeSign)) != null)
+ else if ((next = MatchChars(p, strEnd, numfmt.NegativeSign)) != null)
{
- ch = *(p = next);
+ ch = (p = next) < strEnd ? *p : '\0';
negExp = true;
}
if (ch >= '0' && ch <= '9')
@@ -480,13 +489,13 @@ namespace System.Globalization
do
{
exp = exp * 10 + (ch - '0');
- ch = *++p;
+ ch = ++p < strEnd ? *p : '\0';
if (exp > 1000)
{
exp = 9999;
while (ch >= '0' && ch <= '9')
{
- ch = *++p;
+ ch = ++p < strEnd ? *p : '\0';
}
}
} while (ch >= '0' && ch <= '9');
@@ -499,14 +508,14 @@ namespace System.Globalization
else
{
p = temp;
- ch = *p;
+ ch = p < strEnd ? *p : '\0';
}
}
while (true)
{
if (!IsWhite(ch) || (options & NumberStyles.AllowTrailingWhite) == 0)
{
- if (((options & NumberStyles.AllowTrailingSign) != 0 && ((state & StateSign) == 0)) && ((next = MatchChars(p, numfmt.PositiveSign)) != null || (((next = MatchChars(p, numfmt.NegativeSign)) != null) && (number.sign = true))))
+ if (((options & NumberStyles.AllowTrailingSign) != 0 && ((state & StateSign) == 0)) && ((next = MatchChars(p, strEnd, numfmt.PositiveSign)) != null || (((next = MatchChars(p, strEnd, numfmt.NegativeSign)) != null) && (number.sign = true))))
{
state |= StateSign;
p = next - 1;
@@ -515,7 +524,7 @@ namespace System.Globalization
{
state &= ~StateParens;
}
- else if (currSymbol != null && (next = MatchChars(p, currSymbol)) != null)
+ else if (currSymbol != null && (next = MatchChars(p, strEnd, currSymbol)) != null)
{
currSymbol = null;
p = next - 1;
@@ -525,7 +534,7 @@ namespace System.Globalization
break;
}
}
- ch = *++p;
+ ch = ++p < strEnd ? *p : '\0';
}
if ((state & StateParens) == 0)
{
@@ -568,7 +577,7 @@ namespace System.Globalization
fixed (char* stringPointer = &MemoryMarshal.GetReference(str))
{
char* p = stringPointer;
- if (!ParseNumber(ref p, options, ref number, sb, numfmt, parseDecimal)
+ if (!ParseNumber(ref p, p + str.Length, options, ref number, sb, numfmt, parseDecimal)
|| (p - stringPointer < str.Length && !TrailingZeros(str, (int)(p - stringPointer))))
{
return false;
diff --git a/external/corefx/src/System.Collections.NonGeneric/tests/HashtableTests.cs b/external/corefx/src/System.Collections.NonGeneric/tests/HashtableTests.cs
index 13dff03ba3..8c6302a367 100644
--- a/external/corefx/src/System.Collections.NonGeneric/tests/HashtableTests.cs
+++ b/external/corefx/src/System.Collections.NonGeneric/tests/HashtableTests.cs
@@ -234,6 +234,7 @@ namespace System.Collections.Tests
}
[Fact]
+ [SkipOnTargetFramework(TargetFrameworkMonikers.Mono, "Flaky test - OOM")]
public void Ctor_Int_Int_GenerateNewPrime()
{
// The ctor for Hashtable performs the following calculation:
diff --git a/external/corefx/src/System.Net.Http/src/System/Net/Http/Headers/ContentDispositionHeaderValue.cs b/external/corefx/src/System.Net.Http/src/System/Net/Http/Headers/ContentDispositionHeaderValue.cs
index f6e99d800f..065b934db2 100644
--- a/external/corefx/src/System.Net.Http/src/System/Net/Http/Headers/ContentDispositionHeaderValue.cs
+++ b/external/corefx/src/System.Net.Http/src/System/Net/Http/Headers/ContentDispositionHeaderValue.cs
@@ -5,7 +5,6 @@
using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
-using System.IO;
using System.Text;
namespace System.Net.Http.Headers
@@ -425,7 +424,7 @@ namespace System.Net.Http.Headers
}
// Returns input for decoding failures, as the content might not be encoded.
- private string EncodeAndQuoteMime(string input)
+ private static string EncodeAndQuoteMime(string input)
{
string result = input;
bool needsQuotes = false;
@@ -441,7 +440,7 @@ namespace System.Net.Http.Headers
throw new ArgumentException(string.Format(CultureInfo.InvariantCulture,
SR.net_http_headers_invalid_value, input));
}
- else if (RequiresEncoding(result))
+ else if (HeaderUtilities.ContainsNonAscii(result))
{
needsQuotes = true; // Encoded data must always be quoted, the equals signs are invalid in tokens.
result = EncodeMime(result); // =?utf-8?B?asdfasdfaesdf?=
@@ -460,7 +459,7 @@ namespace System.Net.Http.Headers
}
// Returns true if the value starts and ends with a quote.
- private bool IsQuoted(string value)
+ private static bool IsQuoted(string value)
{
Debug.Assert(value != null);
@@ -468,23 +467,8 @@ namespace System.Net.Http.Headers
&& value.EndsWith("\"", StringComparison.Ordinal);
}
- // tspecials are required to be in a quoted string. Only non-ascii needs to be encoded.
- private bool RequiresEncoding(string input)
- {
- Debug.Assert(input != null);
-
- foreach (char c in input)
- {
- if ((int)c > 0x7f)
- {
- return true;
- }
- }
- return false;
- }
-
// Encode using MIME encoding.
- private string EncodeMime(string input)
+ private static string EncodeMime(string input)
{
byte[] buffer = Encoding.UTF8.GetBytes(input);
string encodedName = Convert.ToBase64String(buffer);
@@ -492,7 +476,7 @@ namespace System.Net.Http.Headers
}
// Attempt to decode MIME encoded strings.
- private bool TryDecodeMime(string input, out string output)
+ private static bool TryDecodeMime(string input, out string output)
{
Debug.Assert(input != null);
@@ -535,7 +519,7 @@ namespace System.Net.Http.Headers
// Attempt to decode using RFC 5987 encoding.
// encoding'language'my%20string
- private bool TryDecode5987(string input, out string output)
+ private static bool TryDecode5987(string input, out string output)
{
output = null;
diff --git a/external/corefx/src/System.Net.Http/src/System/Net/Http/Headers/HeaderUtilities.cs b/external/corefx/src/System.Net.Http/src/System/Net/Http/Headers/HeaderUtilities.cs
index 75a8ef8e09..bfb3815d5f 100644
--- a/external/corefx/src/System.Net.Http/src/System/Net/Http/Headers/HeaderUtilities.cs
+++ b/external/corefx/src/System.Net.Http/src/System/Net/Http/Headers/HeaderUtilities.cs
@@ -2,6 +2,7 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
+using System.Buffers;
using System.Collections.Generic;
using System.Diagnostics;
using System.Diagnostics.Contracts;
@@ -66,58 +67,63 @@ namespace System.Net.Http.Headers
}
}
+ internal static bool ContainsNonAscii(string input)
+ {
+ Debug.Assert(input != null);
+
+ foreach (char c in input)
+ {
+ if ((int)c > 0x7f)
+ {
+ return true;
+ }
+ }
+ return false;
+ }
+
// Encode a string using RFC 5987 encoding.
// encoding'lang'PercentEncodedSpecials
internal static string Encode5987(string input)
- {
- string output;
- IsInputEncoded5987(input, out output);
-
- return output;
- }
-
- internal static bool IsInputEncoded5987(string input, out string output)
{
// Encode a string using RFC 5987 encoding.
// encoding'lang'PercentEncodedSpecials
- bool wasEncoded = false;
StringBuilder builder = StringBuilderCache.Acquire();
+ byte[] utf8bytes = ArrayPool.Shared.Rent(Encoding.UTF8.GetMaxByteCount(input.Length));
+ int utf8length = Encoding.UTF8.GetBytes(input, 0, input.Length, utf8bytes, 0);
+
builder.Append("utf-8\'\'");
- foreach (char c in input)
+ for (int i = 0; i < utf8length; i++)
{
+ byte utf8byte = utf8bytes[i];
+
// attr-char = ALPHA / DIGIT / "!" / "#" / "$" / "&" / "+" / "-" / "." / "^" / "_" / "`" / "|" / "~"
// ; token except ( "*" / "'" / "%" )
- if (c > 0x7F) // Encodes as multiple utf-8 bytes
+ if (utf8byte > 0x7F) // Encodes as multiple utf-8 bytes
{
- byte[] bytes = Encoding.UTF8.GetBytes(c.ToString());
- foreach (byte b in bytes)
- {
- AddHexEscaped((char)b, builder);
- wasEncoded = true;
- }
+ AddHexEscaped(utf8byte, builder);
}
- else if (!HttpRuleParser.IsTokenChar(c) || c == '*' || c == '\'' || c == '%')
+ else if (!HttpRuleParser.IsTokenChar((char)utf8byte) || utf8byte == '*' || utf8byte == '\'' || utf8byte == '%')
{
// ASCII - Only one encoded byte.
- AddHexEscaped(c, builder);
- wasEncoded = true;
+ AddHexEscaped(utf8byte, builder);
}
else
{
- builder.Append(c);
+ builder.Append((char)utf8byte);
}
}
- output = StringBuilderCache.GetStringAndRelease(builder);
- return wasEncoded;
+ Array.Clear(utf8bytes, 0, utf8length);
+ ArrayPool.Shared.Return(utf8bytes);
+
+ return StringBuilderCache.GetStringAndRelease(builder);
}
/// Transforms an ASCII character into its hexadecimal representation, adding the characters to a StringBuilder.
- private static void AddHexEscaped(char c, StringBuilder destination)
+ private static void AddHexEscaped(byte c, StringBuilder destination)
{
Debug.Assert(destination != null);
- Debug.Assert(c <= 0xFF);
destination.Append('%');
destination.Append(s_hexUpperChars[(c & 0xf0) >> 4]);
diff --git a/external/corefx/src/System.Net.Http/src/System/Net/Http/HttpContent.cs b/external/corefx/src/System.Net.Http/src/System/Net/Http/HttpContent.cs
index 740347a083..fe424798d4 100644
--- a/external/corefx/src/System.Net.Http/src/System/Net/Http/HttpContent.cs
+++ b/external/corefx/src/System.Net.Http/src/System/Net/Http/HttpContent.cs
@@ -337,10 +337,21 @@ namespace System.Net.Http
return CopyToAsyncCore(new ValueTask(task));
}
}
+#if MONOTOUCH_WATCH
+ catch (Exception e)
+ {
+ if (StreamCopyExceptionNeedsWrapping(e))
+ {
+ return Task.FromException(GetStreamCopyException(e));
+ }
+ throw;
+ }
+#else
catch (Exception e) when (StreamCopyExceptionNeedsWrapping(e))
{
return Task.FromException(GetStreamCopyException(e));
}
+#endif
}
private static async Task CopyToAsyncCore(ValueTask copyTask)
@@ -349,10 +360,21 @@ namespace System.Net.Http
{
await copyTask.ConfigureAwait(false);
}
+#if MONOTOUCH_WATCH
+ catch (Exception e)
+ {
+ if (StreamCopyExceptionNeedsWrapping(e))
+ {
+ throw GetStreamCopyException(e);
+ }
+ throw;
+ }
+#else
catch (Exception e) when (StreamCopyExceptionNeedsWrapping(e))
{
throw GetStreamCopyException(e);
}
+#endif
}
public Task CopyToAsync(Stream stream)
@@ -403,10 +425,21 @@ namespace System.Net.Http
CheckTaskNotNull(task);
return LoadIntoBufferAsyncCore(task, tempBuffer);
}
+#if MONOTOUCH_WATCH
+ catch (Exception e)
+ {
+ if (StreamCopyExceptionNeedsWrapping(e))
+ {
+ return Task.FromException(GetStreamCopyException(e));
+ }
+ throw;
+ }
+#else
catch (Exception e) when (StreamCopyExceptionNeedsWrapping(e))
{
return Task.FromException(GetStreamCopyException(e));
}
+#endif
// other synchronous exceptions from SerializeToStreamAsync/CheckTaskNotNull will propagate
}
diff --git a/external/corefx/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/AuthenticationHelper.Digest.cs b/external/corefx/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/AuthenticationHelper.Digest.cs
index b156134285..b65b240e80 100644
--- a/external/corefx/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/AuthenticationHelper.Digest.cs
+++ b/external/corefx/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/AuthenticationHelper.Digest.cs
@@ -91,9 +91,9 @@ namespace System.Net.Http
}
else
{
- string usernameStar;
- if (HeaderUtilities.IsInputEncoded5987(credential.UserName, out usernameStar))
+ if (HeaderUtilities.ContainsNonAscii(credential.UserName))
{
+ string usernameStar = HeaderUtilities.Encode5987(credential.UserName);
sb.AppendKeyValue(UsernameStar, usernameStar, includeQuotes: false);
}
else
@@ -408,6 +408,9 @@ namespace System.Net.Http
internal static class StringBuilderExtensions
{
+ // Characters that require escaping in quoted string
+ private static readonly char[] SpecialCharacters = new[] { '"', '\\' };
+
public static void AppendKeyValue(this StringBuilder sb, string key, string value, bool includeQuotes = true, bool includeComma = true)
{
sb.Append(key);
@@ -415,13 +418,30 @@ namespace System.Net.Http
if (includeQuotes)
{
sb.Append('"');
- }
-
- sb.Append(value);
- if (includeQuotes)
- {
+ int lastSpecialIndex = 0;
+ int specialIndex;
+ while (true)
+ {
+ specialIndex = value.IndexOfAny(SpecialCharacters, lastSpecialIndex);
+ if (specialIndex >= 0)
+ {
+ sb.Append(value, lastSpecialIndex, specialIndex - lastSpecialIndex);
+ sb.Append('\\');
+ sb.Append(value[specialIndex]);
+ lastSpecialIndex = specialIndex + 1;
+ }
+ else
+ {
+ sb.Append(value, lastSpecialIndex, value.Length - lastSpecialIndex);
+ break;
+ }
+ }
sb.Append('"');
}
+ else
+ {
+ sb.Append(value);
+ }
if (includeComma)
{
diff --git a/external/corefx/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/ChunkedEncodingReadStream.cs b/external/corefx/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/ChunkedEncodingReadStream.cs
index fdf7d48e56..d10a2233dc 100644
--- a/external/corefx/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/ChunkedEncodingReadStream.cs
+++ b/external/corefx/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/ChunkedEncodingReadStream.cs
@@ -115,10 +115,21 @@ namespace System.Net.Http
}
}
}
+#if MONOTOUCH_WATCH
+ catch (Exception exc)
+ {
+ if (CancellationHelper.ShouldWrapInOperationCanceledException(exc, cancellationToken))
+ {
+ throw CancellationHelper.CreateOperationCanceledException(exc, cancellationToken);
+ }
+ throw;
+ }
+#else
catch (Exception exc) when (CancellationHelper.ShouldWrapInOperationCanceledException(exc, cancellationToken))
{
throw CancellationHelper.CreateOperationCanceledException(exc, cancellationToken);
}
+#endif
finally
{
ctr.Dispose();
@@ -161,10 +172,21 @@ namespace System.Net.Http
await _connection.FillAsync().ConfigureAwait(false);
}
}
+#if MONOTOUCH_WATCH
+ catch (Exception exc)
+ {
+ if (CancellationHelper.ShouldWrapInOperationCanceledException(exc, cancellationToken))
+ {
+ throw CancellationHelper.CreateOperationCanceledException(exc, cancellationToken);
+ }
+ throw;
+ }
+#else
catch (Exception exc) when (CancellationHelper.ShouldWrapInOperationCanceledException(exc, cancellationToken))
{
throw CancellationHelper.CreateOperationCanceledException(exc, cancellationToken);
}
+#endif
finally
{
ctr.Dispose();
diff --git a/external/corefx/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/ConnectionCloseReadStream.cs b/external/corefx/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/ConnectionCloseReadStream.cs
index 1506cdf2b8..7471a07ce4 100644
--- a/external/corefx/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/ConnectionCloseReadStream.cs
+++ b/external/corefx/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/ConnectionCloseReadStream.cs
@@ -39,10 +39,21 @@ namespace System.Net.Http
{
bytesRead = await readTask.ConfigureAwait(false);
}
+#if MONOTOUCH_WATCH
+ catch (Exception exc)
+ {
+ if (CancellationHelper.ShouldWrapInOperationCanceledException(exc, cancellationToken))
+ {
+ throw CancellationHelper.CreateOperationCanceledException(exc, cancellationToken);
+ }
+ throw;
+ }
+#else
catch (Exception exc) when (CancellationHelper.ShouldWrapInOperationCanceledException(exc, cancellationToken))
{
throw CancellationHelper.CreateOperationCanceledException(exc, cancellationToken);
}
+#endif
finally
{
ctr.Dispose();
@@ -100,10 +111,21 @@ namespace System.Net.Http
{
await copyTask.ConfigureAwait(false);
}
+#if MONOTOUCH_WATCH
+ catch (Exception exc)
+ {
+ if (CancellationHelper.ShouldWrapInOperationCanceledException(exc, cancellationToken))
+ {
+ throw CancellationHelper.CreateOperationCanceledException(exc, cancellationToken);
+ }
+ throw;
+ }
+#else
catch (Exception exc) when (CancellationHelper.ShouldWrapInOperationCanceledException(exc, cancellationToken))
{
throw CancellationHelper.CreateOperationCanceledException(exc, cancellationToken);
}
+#endif
finally
{
ctr.Dispose();
diff --git a/external/corefx/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/ContentLengthReadStream.cs b/external/corefx/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/ContentLengthReadStream.cs
index cbf51b0424..9c90a419f4 100644
--- a/external/corefx/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/ContentLengthReadStream.cs
+++ b/external/corefx/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/ContentLengthReadStream.cs
@@ -51,10 +51,21 @@ namespace System.Net.Http
{
bytesRead = await readTask.ConfigureAwait(false);
}
+#if MONOTOUCH_WATCH
+ catch (Exception exc)
+ {
+ if (CancellationHelper.ShouldWrapInOperationCanceledException(exc, cancellationToken))
+ {
+ throw CancellationHelper.CreateOperationCanceledException(exc, cancellationToken);
+ }
+ throw;
+ }
+#else
catch (Exception exc) when (CancellationHelper.ShouldWrapInOperationCanceledException(exc, cancellationToken))
{
throw CancellationHelper.CreateOperationCanceledException(exc, cancellationToken);
}
+#endif
finally
{
ctr.Dispose();
@@ -115,10 +126,21 @@ namespace System.Net.Http
{
await copyTask.ConfigureAwait(false);
}
+#if MONOTOUCH_WATCH
+ catch (Exception exc)
+ {
+ if (CancellationHelper.ShouldWrapInOperationCanceledException(exc, cancellationToken))
+ {
+ throw CancellationHelper.CreateOperationCanceledException(exc, cancellationToken);
+ }
+ throw;
+ }
+#else
catch (Exception exc) when (CancellationHelper.ShouldWrapInOperationCanceledException(exc, cancellationToken))
{
throw CancellationHelper.CreateOperationCanceledException(exc, cancellationToken);
}
+#endif
finally
{
ctr.Dispose();
diff --git a/external/corefx/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnection.cs b/external/corefx/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnection.cs
index e7ffaef7bc..6374d98241 100644
--- a/external/corefx/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnection.cs
+++ b/external/corefx/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnection.cs
@@ -158,11 +158,23 @@ namespace System.Net.Http
{
return _socket.Poll(0, SelectMode.SelectRead);
}
+#if MONOTOUCH_WATCH
+ catch (Exception exc)
+ {
+ if (e is SocketException || e is ObjectDisposedException)
+ {
+ // Poll can throw when used on a closed socket.
+ return true;
+ }
+ throw;
+ }
+#else
catch (Exception e) when (e is SocketException || e is ObjectDisposedException)
{
// Poll can throw when used on a closed socket.
return true;
}
+#endif
}
else
{
diff --git a/external/corefx/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPool.cs b/external/corefx/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPool.cs
index 13bcd87f19..c2df0a38e4 100644
--- a/external/corefx/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPool.cs
+++ b/external/corefx/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPool.cs
@@ -295,10 +295,24 @@ namespace System.Net.Http
{
return await SendWithNtConnectionAuthAsync((HttpConnection)connection, request, doRequestAuth, cancellationToken).ConfigureAwait(false);
}
+#if MONOTOUCH_WATCH
+ catch (HttpRequestException e)
+ {
+ if (!isNewConnection && e.InnerException is IOException && connection.CanRetry)
+ {
+ // Eat exception and try again.
+ }
+ else
+ {
+ throw;
+ }
+ }
+#else
catch (HttpRequestException e) when (!isNewConnection && e.InnerException is IOException && connection.CanRetry)
{
// Eat exception and try again.
}
+#endif
finally
{
connection.Release();
diff --git a/external/corefx/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/RawConnectionStream.cs b/external/corefx/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/RawConnectionStream.cs
index 6eba9babd3..b32ae62834 100644
--- a/external/corefx/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/RawConnectionStream.cs
+++ b/external/corefx/src/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/RawConnectionStream.cs
@@ -39,10 +39,21 @@ namespace System.Net.Http
{
bytesRead = await readTask.ConfigureAwait(false);
}
+#if MONOTOUCH_WATCH
+ catch (Exception exc)
+ {
+ if (CancellationHelper.ShouldWrapInOperationCanceledException(exc, cancellationToken))
+ {
+ throw CancellationHelper.CreateOperationCanceledException(exc, cancellationToken);
+ }
+ throw;
+ }
+#else
catch (Exception exc) when (CancellationHelper.ShouldWrapInOperationCanceledException(exc, cancellationToken))
{
throw CancellationHelper.CreateOperationCanceledException(exc, cancellationToken);
}
+#endif
finally
{
ctr.Dispose();
@@ -95,10 +106,21 @@ namespace System.Net.Http
{
await copyTask.ConfigureAwait(false);
}
+#if MONOTOUCH_WATCH
+ catch (Exception exc)
+ {
+ if (CancellationHelper.ShouldWrapInOperationCanceledException(exc, cancellationToken))
+ {
+ throw CancellationHelper.CreateOperationCanceledException(exc, cancellationToken);
+ }
+ throw;
+ }
+#else
catch (Exception exc) when (CancellationHelper.ShouldWrapInOperationCanceledException(exc, cancellationToken))
{
throw CancellationHelper.CreateOperationCanceledException(exc, cancellationToken);
}
+#endif
finally
{
ctr.Dispose();
@@ -168,10 +190,21 @@ namespace System.Net.Http
{
await task.ConfigureAwait(false);
}
+#if MONOTOUCH_WATCH
+ catch (Exception exc)
+ {
+ if (CancellationHelper.ShouldWrapInOperationCanceledException(exc, cancellationToken))
+ {
+ throw CancellationHelper.CreateOperationCanceledException(exc, cancellationToken);
+ }
+ throw;
+ }
+#else
catch (Exception exc) when (CancellationHelper.ShouldWrapInOperationCanceledException(exc, cancellationToken))
{
throw CancellationHelper.CreateOperationCanceledException(exc, cancellationToken);
}
+#endif
finally
{
ctr.Dispose();
diff --git a/external/corefx/src/System.Net.Http/tests/UnitTests/DigestAuthenticationTests.cs b/external/corefx/src/System.Net.Http/tests/UnitTests/DigestAuthenticationTests.cs
index f339ba78e4..45d03712a7 100644
--- a/external/corefx/src/System.Net.Http/tests/UnitTests/DigestAuthenticationTests.cs
+++ b/external/corefx/src/System.Net.Http/tests/UnitTests/DigestAuthenticationTests.cs
@@ -56,5 +56,20 @@ namespace System.Net.Http.Tests
Assert.Equal(expectedResult, parameter != null);
}
+
+ [Theory]
+ [InlineData("test", "username=\"test\"")]
+ [InlineData("test@example.org", "username=\"test@example.org\"")]
+ [InlineData("test\"example.org", "username=\"test\\\"example.org\"")]
+ [InlineData("t\u00E6st", "username*=utf-8''t%C3%A6st")]
+ [InlineData("\uD834\uDD1E", "username*=utf-8''%F0%9D%84%9E")]
+ public async void DigestResponse_UserName_Encoding(string username, string encodedUserName)
+ {
+ NetworkCredential credential = new NetworkCredential(username, "bar");
+ AuthenticationHelper.DigestResponse digestResponse = new AuthenticationHelper.DigestResponse("realm=\"NetCore\", nonce=\"qMRqWgAAAAAQMjIABgAAAFwEiEwAAAAA\"");
+ HttpRequestMessage request = new HttpRequestMessage(HttpMethod.Get, "http://microsoft.com/");
+ string parameter = await AuthenticationHelper.GetDigestTokenForCredential(credential, request, digestResponse).ConfigureAwait(false);
+ Assert.StartsWith(encodedUserName, parameter);
+ }
}
}
diff --git a/external/corefx/src/System.Net.Http/tests/UnitTests/HttpContentTest.cs b/external/corefx/src/System.Net.Http/tests/UnitTests/HttpContentTest.cs
index 59e8bdbada..364864292f 100644
--- a/external/corefx/src/System.Net.Http/tests/UnitTests/HttpContentTest.cs
+++ b/external/corefx/src/System.Net.Http/tests/UnitTests/HttpContentTest.cs
@@ -12,10 +12,10 @@ namespace System.Net.Http.Tests
public class HttpContentTest
{
[Fact]
- public void Dispose_BufferContentThenDisposeContent_BufferedStreamGetsDisposed()
+ public async Task Dispose_BufferContentThenDisposeContent_BufferedStreamGetsDisposed()
{
MockContent content = new MockContent();
- content.LoadIntoBufferAsync().Wait();
+ await content.LoadIntoBufferAsync();
Type type = typeof(HttpContent);
TypeInfo typeInfo = type.GetTypeInfo();
diff --git a/external/corefx/src/System.Runtime.Extensions/tests/System/BitConverter.cs b/external/corefx/src/System.Runtime.Extensions/tests/System/BitConverter.cs
index 55d20da4d1..eb453ad8b1 100644
--- a/external/corefx/src/System.Runtime.Extensions/tests/System/BitConverter.cs
+++ b/external/corefx/src/System.Runtime.Extensions/tests/System/BitConverter.cs
@@ -226,6 +226,7 @@ namespace System.Tests
}
[Fact]
+ [SkipOnTargetFramework(TargetFrameworkMonikers.Mono, "Flaky test - OOM")]
public static void ToString_ByteArrayTooLong_Throws()
{
byte[] arr;
diff --git a/external/corefx/src/System.Runtime.Numerics/tests/BigInteger/parse.netcoreapp.cs b/external/corefx/src/System.Runtime.Numerics/tests/BigInteger/parse.netcoreapp.cs
index 593fc5f8b7..e41f895025 100644
--- a/external/corefx/src/System.Runtime.Numerics/tests/BigInteger/parse.netcoreapp.cs
+++ b/external/corefx/src/System.Runtime.Numerics/tests/BigInteger/parse.netcoreapp.cs
@@ -9,6 +9,24 @@ namespace System.Numerics.Tests
{
public partial class parseTest
{
+ [Theory]
+ [InlineData("123456789", 0, 9, "123456789")]
+ [InlineData("123456789", 0, 1, "1")]
+ [InlineData("123456789", 1, 3, "234")]
+ public void Parse_Subspan_Success(string input, int offset, int length, string expected)
+ {
+ Eval(BigInteger.Parse(input.AsSpan(offset, length)), expected);
+ Assert.True(BigInteger.TryParse(input.AsSpan(offset, length), out BigInteger test));
+ Eval(test, expected);
+ }
+
+ [Fact]
+ public void Parse_EmptySubspan_Fails()
+ {
+ Assert.False(BigInteger.TryParse("12345".AsSpan(0, 0), out BigInteger result));
+ Assert.Equal(0, result);
+ }
+
static partial void VerifyParseSpanToString(string num1, NumberStyles ns, bool failureNotExpected, string expected)
{
if (failureNotExpected)
diff --git a/external/linker/.editorconfig b/external/linker/.editorconfig
index 6bb3c64fa3..848c05f899 100644
--- a/external/linker/.editorconfig
+++ b/external/linker/.editorconfig
@@ -1,5 +1,6 @@
# top-most EditorConfig file
root = true
+end_of_line = "lf"
[*.cs]
indent_style = tab
diff --git a/external/linker/.gitignore b/external/linker/.gitignore
index 37cb12598c..5ad05fe739 100644
--- a/external/linker/.gitignore
+++ b/external/linker/.gitignore
@@ -32,4 +32,4 @@ bin/
.packages
artifacts
-monobuild/TestResults.xml
+test/Mono.Linker.Tests/TestResults.xml
diff --git a/external/linker/Directory.Build.props b/external/linker/Directory.Build.props
index 419c6cb508..86a068481d 100644
--- a/external/linker/Directory.Build.props
+++ b/external/linker/Directory.Build.props
@@ -1,5 +1,5 @@
-
+
false
diff --git a/external/linker/Directory.Build.targets b/external/linker/Directory.Build.targets
index d11d6a1179..e149bf1384 100644
--- a/external/linker/Directory.Build.targets
+++ b/external/linker/Directory.Build.targets
@@ -1,11 +1,5 @@
-
-
-
-
-
-
+
diff --git a/external/linker/build.cmd b/external/linker/build.cmd
new file mode 100644
index 0000000000..e21182c8ad
--- /dev/null
+++ b/external/linker/build.cmd
@@ -0,0 +1,2 @@
+@echo off
+powershell -ExecutionPolicy ByPass -NoProfile -command "& """%~dp0eng\common\Build.ps1""" -projects """%~dp0illink.sln""" -restore -build %*"
diff --git a/external/linker/build.sh b/external/linker/build.sh
new file mode 100755
index 0000000000..228566129d
--- /dev/null
+++ b/external/linker/build.sh
@@ -0,0 +1,16 @@
+#!/usr/bin/env bash
+
+source="${BASH_SOURCE[0]}"
+
+# resolve $SOURCE until the file is no longer a symlink
+while [[ -h $source ]]; do
+ scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
+ source="$(readlink "$source")"
+
+ # if $source was a relative symlink, we need to resolve it relative to the path where the
+ # symlink file was located
+ [[ $source != /* ]] && source="$scriptroot/$source"
+done
+
+scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
+"$scriptroot/eng/common/build.sh" --projects "$scriptroot/illink.sln" --build --restore $@
diff --git a/external/linker/eng/Signing.props b/external/linker/eng/Signing.props
index 0fdcb9e5bc..30bc3c3b7b 100644
--- a/external/linker/eng/Signing.props
+++ b/external/linker/eng/Signing.props
@@ -4,6 +4,5 @@
-
diff --git a/external/linker/eng/Version.Details.xml b/external/linker/eng/Version.Details.xml
index 8bd6f3d7de..b6627d7a0d 100644
--- a/external/linker/eng/Version.Details.xml
+++ b/external/linker/eng/Version.Details.xml
@@ -3,9 +3,9 @@
-
+
https://github.com/dotnet/arcade
- c0b56ff3569e3c7475070486c40543ea4c6f6dc7
+ b0e8d3944155f94f83deea8afe025debe369e69f
diff --git a/external/linker/eng/Versions.props b/external/linker/eng/Versions.props
index 9a2b324958..419ba90a2d 100644
--- a/external/linker/eng/Versions.props
+++ b/external/linker/eng/Versions.props
@@ -5,6 +5,7 @@
prerelease
+ true
5.0.0-alpha1.19413.7
diff --git a/external/linker/eng/azure-pipelines.yml b/external/linker/eng/azure-pipelines.yml
index 0304d82d8e..8051d7b206 100644
--- a/external/linker/eng/azure-pipelines.yml
+++ b/external/linker/eng/azure-pipelines.yml
@@ -11,90 +11,122 @@ variables:
- name: _BuildConfig
value: Release
- name: _BuildArgs
- value: /p:ArcadeBuild=true
+ value:
+- name: _DotNetArtifactsCategory
+ value: .NETCore
- ${{ if eq(variables.officialBuild, 'true') }}:
- name: _BuildArgs
- value: ${{ format('{0} /p:OfficialBuildId=$(Build.BuildNumber)', variables['_BuildArgs']) }}
+ value: ${{ format('{0} /p:OfficialBuildId=$(Build.BuildNumber) /p:Test=false /p:IntegrationTest=false', variables['_BuildArgs']) }}
# Provide HelixApiAccessToken for telemetry
- group: DotNet-HelixApi-Access
-jobs:
-- template: /eng/common/templates/jobs/jobs.yml
- parameters:
+stages:
+- stage: build
+ displayName: Build
+ jobs:
+ - template: /eng/common/templates/jobs/jobs.yml
+ parameters:
- enableTelemetry: true # send helix telemetry
- helixRepo: mono/linker
- enablePublishBuildArtifacts: true # publish build logs to pipeline storage
- # enablePublishTestResults
- enablePublishBuildAssets: true # generate build manifests and publish to BAR in internal builds
- enableMicrobuild: true # only affects internal builds
+ enableTelemetry: true # send helix telemetry
+ helixRepo: mono/linker
+ enablePublishUsingPipelines: true
+ enablePublishBuildArtifacts: true # publish build logs to pipeline storage
+ enablePublishTestResults: true
+ enablePublishBuildAssets: true # generate build manifests and publish to BAR in internal builds
+ enableMicrobuild: true # only affects internal builds
- jobs:
+ jobs:
- - job: Windows_NT
- pool:
- ${{ if eq(variables.officialBuild, 'false') }}:
- name: Hosted VS2017
- ${{ if eq(variables.officialBuild, 'true') }}:
- name: NetCoreInternal-Pool
- queue: BuildPool.Windows.10.Amd64.VS2017
- variables:
- - ${{ if eq(variables.officialBuild, 'false') }}:
- - _SignType: test
- - _PublishArgs: ''
- - ${{ if eq(variables.officialBuild, 'true') }}:
- - group: DotNet-Blob-Feed
- - _TeamName: .NET # required by microbuild install step
- - _SignType: real # used in the arcade templates that install microbuild.
- - _DotNetPublishToBlobFeed: true # used by arcade templates that gather build asset manifests
- - _PublishArgs: /p:DotNetPublishToBlobFeed=$(_DotNetPublishToBlobFeed)
- /p:DotNetPublishBlobFeedUrl=https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json
- /p:DotNetPublishBlobFeedKey=$(dotnetfeed-storage-access-key-1)
- - DotNetSignType: ${{ format('{0}', variables._SignType) }} # DotNetSignType defaults to real if not specified
- steps:
- - checkout: self
- submodules: true
- - script: eng\common\cibuild.cmd -projects $(Build.SourcesDirectory)\illink.sln
- -configuration $(_BuildConfig) $(_BuildArgs) $(_PublishArgs)
- -warnAsError "$false"
- -nodeReuse "$false" # https://github.com/Microsoft/vstest/issues/1503
- env:
- # https://github.com/Microsoft/vstest/issues/1503#issuecomment-410732193
- MSBUILDENSURESTDOUTFORTASKPROCESSES: 1
- ${{ if eq(variables.officialBuild, 'false') }}:
- displayName: Build illink.sln $(_BuildConfig)
- ${{ if eq(variables.officialBuild, 'true') }}:
- displayName: Build and publish illink.sln $(_BuildConfig)
+ - job: Windows_NT
+ pool:
+ ${{ if eq(variables.officialBuild, 'false') }}:
+ name: Hosted VS2017
+ ${{ if eq(variables.officialBuild, 'true') }}:
+ name: NetCoreInternal-Pool
+ queue: BuildPool.Windows.10.Amd64.VS2017
+ variables:
+ - ${{ if eq(variables.officialBuild, 'false') }}:
+ - _SignType: test
+ - _PublishArgs: ''
+ - ${{ if eq(variables.officialBuild, 'true') }}:
+ - group: DotNet-Blob-Feed
+ - _TeamName: .NET # required by microbuild install step
+ - _SignType: real # used in the arcade templates that install microbuild.
+ - _DotNetPublishToBlobFeed: true # used by arcade templates that gather build asset manifests
+ - _PublishArgs: /p:DotNetPublishToBlobFeed=$(_DotNetPublishToBlobFeed)
+ /p:DotNetPublishBlobFeedUrl=https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json
+ /p:DotNetPublishBlobFeedKey=$(dotnetfeed-storage-access-key-1)
+ /p:DotNetArtifactsCategory=$(_DotNetArtifactsCategory)
+ /p:DotNetPublishUsingPipelines=true
+ - DotNetSignType: ${{ format('{0}', variables._SignType) }} # DotNetSignType defaults to real if not specified
+ steps:
+ - checkout: self
+ submodules: true
+ - script: eng\common\cibuild.cmd -projects $(Build.SourcesDirectory)\illink.sln
+ -configuration $(_BuildConfig) $(_BuildArgs) $(_PublishArgs)
+ -integrationTest
+ -warnAsError "$false"
+ -nodeReuse "$false" # https://github.com/Microsoft/vstest/issues/1503
+ env:
+ # https://github.com/Microsoft/vstest/issues/1503#issuecomment-410732193
+ MSBUILDENSURESTDOUTFORTASKPROCESSES: 1
+ ${{ if eq(variables.officialBuild, 'false') }}:
+ displayName: Build illink.sln $(_BuildConfig)
+ ${{ if eq(variables.officialBuild, 'true') }}:
+ displayName: Build and publish illink.sln $(_BuildConfig)
- - job: Linux
+ - ${{ if eq(variables.officialBuild, 'false') }}:
+ - job: Linux
+ condition: eq(variables.officialBuild, 'false')
+ pool:
+ name: Hosted Ubuntu 1604
+ steps:
+ - checkout: self
+ submodules: true
+ - script: eng/common/cibuild.sh --projects $(Build.SourcesDirectory)/illink.sln
+ --configuration $(_BuildConfig) $(_BuildArgs)
+ --integrationTest
+ --warnAsError false
+ --nodeReuse false # https://github.com/Microsoft/vstest/issues/1503
+ env:
+ # https://github.com/Microsoft/vstest/issues/1503#issuecomment-410732193
+ MSBUILDENSURESTDOUTFORTASKPROCESSES: 1
+ displayName: Build illink.sln $(_BuildConfig)
+
+ - ${{ if eq(variables.officialBuild, 'false') }}:
+ - job: macOS
+ pool:
+ name: Hosted MacOS
+ steps:
+ - checkout: self
+ submodules: true
+ - script: eng/common/cibuild.sh --projects $(Build.SourcesDirectory)/illink.sln
+ --configuration $(_BuildConfig) $(_BuildArgs)
+ --integrationTest
+ --warnAsError false
+ --nodeReuse false # https://github.com/Microsoft/vstest/issues/1503
+ env:
+ # https://github.com/Microsoft/vstest/issues/1503#issuecomment-410732193
+ MSBUILDENSURESTDOUTFORTASKPROCESSES: 1
+ displayName: Build illink.sln $(_BuildConfig)
+
+ - ${{ if eq(variables.officialBuild, 'false') }}:
+ - job: Linux_Mono
pool:
name: Hosted Ubuntu 1604
steps:
- checkout: self
submodules: true
- - script: eng/common/cibuild.sh --projects $(Build.SourcesDirectory)/illink.sln
- --configuration $(_BuildConfig) $(_BuildArgs)
- --warnAsError false
- --nodeReuse false # https://github.com/Microsoft/vstest/issues/1503
- env:
- # https://github.com/Microsoft/vstest/issues/1503#issuecomment-410732193
- MSBUILDENSURESTDOUTFORTASKPROCESSES: 1
- displayName: Build illink.sln $(_BuildConfig)
+ - script: |
+ mono --version
+ make -C monobuild CONFIGURATION=$(_BuildConfig)
+ displayName: Build and test
+ - task: PublishTestResults@2
+ inputs:
+ testResultsFormat: 'NUnit'
+ testResultsFiles: 'test/Mono.Linker.Tests/TestResults.xml'
+
+# Post-Build Arcade logic
+- ${{ if eq(variables.officialBuild, 'true') }}:
+ - template: /eng/common/templates/post-build/post-build.yml
- - job: macOS
- pool:
- ${{ if eq(variables.officialBuild, 'false') }}:
- name: Hosted MacOS
- ${{ if eq(variables.officialBuild, 'true') }}:
- name: Hosted Mac Internal
- steps:
- - checkout: self
- submodules: true
- - script: eng/common/cibuild.sh --projects $(Build.SourcesDirectory)/illink.sln
- --configuration $(_BuildConfig) $(_BuildArgs)
- --warnAsError false
- --nodeReuse false # https://github.com/Microsoft/vstest/issues/1503
- env:
- # https://github.com/Microsoft/vstest/issues/1503#issuecomment-410732193
- MSBUILDENSURESTDOUTFORTASKPROCESSES: 1
- displayName: Build illink.sln $(_BuildConfig)
diff --git a/external/linker/eng/common/SetupNugetSources.ps1 b/external/linker/eng/common/SetupNugetSources.ps1
index 6662e4bc1e..a5a1e711d7 100644
--- a/external/linker/eng/common/SetupNugetSources.ps1
+++ b/external/linker/eng/common/SetupNugetSources.ps1
@@ -16,7 +16,7 @@
# condition: eq(variables['Agent.OS'], 'Windows_NT')
# inputs:
# filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.ps1
-# arguments: -ConfigFile ${Env:BUILD_SOURCESDIRECTORY}/NuGet.config -Password $Env:Token
+# arguments: -ConfigFile $(Build.SourcesDirectory)/NuGet.config -Password $Env:Token
# env:
# Token: $(dn-bot-dnceng-artifact-feeds-rw)
@@ -94,41 +94,48 @@ function InsertMaestroPrivateFeedCredentials($Sources, $Creds, $Password) {
}
}
-try {
- if (!(Test-Path $ConfigFile -PathType Leaf)) {
- Write-PipelineTelemetryError -Category 'Build' -Message "Couldn't find the file NuGet config file: $ConfigFile"
+if (!(Test-Path $ConfigFile -PathType Leaf)) {
+ Write-PipelineTelemetryError -Category 'Build' -Message "Eng/common/SetupNugetSources.ps1 returned a non-zero exit code. Couldn't find the NuGet config file: $ConfigFile"
+ ExitWithExitCode 1
+}
+
+if (!$Password) {
+ Write-PipelineTelemetryError -Category 'Build' -Message 'Eng/common/SetupNugetSources.ps1 returned a non-zero exit code. Please supply a valid PAT'
ExitWithExitCode 1
- }
+}
- # Load NuGet.config
- $doc = New-Object System.Xml.XmlDocument
- $filename = (Get-Item $ConfigFile).FullName
- $doc.Load($filename)
+# Load NuGet.config
+$doc = New-Object System.Xml.XmlDocument
+$filename = (Get-Item $ConfigFile).FullName
+$doc.Load($filename)
- # Get reference to or create one if none exist already
- $sources = $doc.DocumentElement.SelectSingleNode("packageSources")
- if ($sources -eq $null) {
- $sources = $doc.CreateElement("packageSources")
- $doc.DocumentElement.AppendChild($sources) | Out-Null
- }
+# Get reference to or create one if none exist already
+$sources = $doc.DocumentElement.SelectSingleNode("packageSources")
+if ($sources -eq $null) {
+ $sources = $doc.CreateElement("packageSources")
+ $doc.DocumentElement.AppendChild($sources) | Out-Null
+}
- # Looks for a node. Create it if none is found.
- $creds = $doc.DocumentElement.SelectSingleNode("packageSourceCredentials")
- if ($creds -eq $null) {
- $creds = $doc.CreateElement("packageSourceCredentials")
- $doc.DocumentElement.AppendChild($creds) | Out-Null
- }
+# Looks for a node. Create it if none is found.
+$creds = $doc.DocumentElement.SelectSingleNode("packageSourceCredentials")
+if ($creds -eq $null) {
+ $creds = $doc.CreateElement("packageSourceCredentials")
+ $doc.DocumentElement.AppendChild($creds) | Out-Null
+}
- # Insert credential nodes for Maestro's private feeds
- InsertMaestroPrivateFeedCredentials -Sources $sources -Creds $creds -Password $Password
+# Insert credential nodes for Maestro's private feeds
+InsertMaestroPrivateFeedCredentials -Sources $sources -Creds $creds -Password $Password
+$dotnet3Source = $sources.SelectSingleNode("add[@key='dotnet3']")
+if ($dotnet3Source -ne $null) {
AddPackageSource -Sources $sources -SourceName "dotnet3-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal/nuget/v2" -Creds $creds -Username "dn-bot" -Password $Password
AddPackageSource -Sources $sources -SourceName "dotnet3-internal-transport" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal-transport/nuget/v2" -Creds $creds -Username "dn-bot" -Password $Password
+}
- $doc.Save($filename)
-}
-catch {
- Write-Host $_.ScriptStackTrace
- Write-PipelineTelemetryError -Category 'InitializeToolset' -Message $_
- ExitWithExitCode 1
+$dotnet31Source = $sources.SelectSingleNode("add[@key='dotnet3.1']")
+if ($dotnet31Source -ne $null) {
+ AddPackageSource -Sources $sources -SourceName "dotnet3.1-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal/nuget/v2" -Creds $creds -Username "dn-bot" -Password $Password
+ AddPackageSource -Sources $sources -SourceName "dotnet3.1-internal-transport" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3.1-internal-transport/nuget/v2" -Creds $creds -Username "dn-bot" -Password $Password
}
+
+$doc.Save($filename)
diff --git a/external/linker/eng/common/SetupNugetSources.sh b/external/linker/eng/common/SetupNugetSources.sh
index 55ad70e366..7d6fef27fe 100644
--- a/external/linker/eng/common/SetupNugetSources.sh
+++ b/external/linker/eng/common/SetupNugetSources.sh
@@ -17,7 +17,7 @@
# displayName: Setup Private Feeds Credentials
# inputs:
# filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.sh
-# arguments: $BUILD_SOURCESDIRECTORY/NuGet.config $Token
+# arguments: $(Build.SourcesDirectory)/NuGet.config $Token
# condition: ne(variables['Agent.OS'], 'Windows_NT')
# env:
# Token: $(dn-bot-dnceng-artifact-feeds-rw)
@@ -42,7 +42,12 @@ scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
. "$scriptroot/tools.sh"
if [ ! -f "$ConfigFile" ]; then
- Write-PipelineTelemetryError -Category 'Build' -Message "Couldn't find the file NuGet config file: $ConfigFile"
+ Write-PipelineTelemetryError -Category 'Build' "Error: Eng/common/SetupNugetSources.sh returned a non-zero exit code. Couldn't find the NuGet config file: $ConfigFile"
+ ExitWithExitCode 1
+fi
+
+if [ -z "$CredToken" ]; then
+ Write-PipelineTelemetryError -category 'Build' "Error: Eng/common/SetupNugetSources.sh returned a non-zero exit code. Please supply a valid PAT"
ExitWithExitCode 1
fi
@@ -52,7 +57,7 @@ if [[ `uname -s` == "Darwin" ]]; then
fi
# Ensure there is a ... section.
-grep -i "" $ConfigFile
+grep -i "" $ConfigFile
if [ "$?" != "0" ]; then
echo "Adding ... section."
ConfigNodeHeader=""
@@ -62,7 +67,7 @@ if [ "$?" != "0" ]; then
fi
# Ensure there is a ... section.
-grep -i "" $ConfigFile
+grep -i "" $ConfigFile
if [ "$?" != "0" ]; then
echo "Adding ... section."
@@ -72,37 +77,64 @@ if [ "$?" != "0" ]; then
sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourcesNodeFooter${NL}$PackageSourceCredentialsTemplate|" NuGet.config
fi
-# Ensure dotnet3-internal and dotnet3-internal-transport is in the packageSources
-grep -i "" $ConfigFile
-if [ "$?" != "0" ]; then
- echo "Adding dotnet3-internal to the packageSources."
+PackageSources=()
- PackageSourcesNodeFooter=" "
- PackageSourceTemplate="${TB} "
+# Ensure dotnet3-internal and dotnet3-internal-transport are in the packageSources if the public dotnet3 feeds are present
+grep -i "" $ConfigFile
+ if [ "$?" != "0" ]; then
+ echo "Adding dotnet3-internal to the packageSources."
+ PackageSourcesNodeFooter=" "
+ PackageSourceTemplate="${TB} "
+
+ sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" $ConfigFile
+ fi
+ PackageSources+=('dotnet3-internal')
+
+ grep -i " "
+
+ sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" $ConfigFile
+ fi
+ PackageSources+=('dotnet3-internal-transport')
fi
-# Ensure dotnet3-internal and dotnet3-internal-transport is in the packageSources
-grep -i "" $ConfigFile
-if [ "$?" != "0" ]; then
- echo "Adding dotnet3-internal-transport to the packageSources."
+# Ensure dotnet3.1-internal and dotnet3.1-internal-transport are in the packageSources if the public dotnet3.1 feeds are present
+grep -i " "
- PackageSourcesNodeFooter=" "
- PackageSourceTemplate="${TB} "
+ sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" $ConfigFile
+ fi
+ PackageSources+=('dotnet3.1-internal')
- sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" NuGet.config
+ grep -i "" $ConfigFile
+ if [ "$?" != "0" ]; then
+ echo "Adding dotnet3.1-internal-transport to the packageSources."
+ PackageSourcesNodeFooter=" "
+ PackageSourceTemplate="${TB} "
+
+ sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" $ConfigFile
+ fi
+ PackageSources+=('dotnet3.1-internal-transport')
fi
# I want things split line by line
PrevIFS=$IFS
IFS=$'\n'
-PackageSources=$(grep -oh '"darc-int-[^"]*"' $ConfigFile | tr -d '"')
+PackageSources+="$IFS"
+PackageSources+=$(grep -oh '"darc-int-[^"]*"' $ConfigFile | tr -d '"')
IFS=$PrevIFS
-PackageSources+=('dotnet3-internal')
-PackageSources+=('dotnet3-internal-transport')
-
for FeedName in ${PackageSources[@]} ; do
# Check if there is no existing credential for this FeedName
grep -i "<$FeedName>" $ConfigFile
@@ -112,6 +144,6 @@ for FeedName in ${PackageSources[@]} ; do
PackageSourceCredentialsNodeFooter=""
NewCredential="${TB}${TB}<$FeedName>${NL} ${NL} ${NL}$FeedName>"
- sed -i.bak "s|$PackageSourceCredentialsNodeFooter|$NewCredential${NL}$PackageSourceCredentialsNodeFooter|" NuGet.config
+ sed -i.bak "s|$PackageSourceCredentialsNodeFooter|$NewCredential${NL}$PackageSourceCredentialsNodeFooter|" $ConfigFile
fi
done
diff --git a/external/linker/eng/common/build.ps1 b/external/linker/eng/common/build.ps1
index 0fd4d9c7f2..88814514d8 100644
--- a/external/linker/eng/common/build.ps1
+++ b/external/linker/eng/common/build.ps1
@@ -62,6 +62,8 @@ function Print-Usage() {
Write-Host "The above arguments can be shortened as much as to be unambiguous (e.g. -co for configuration, -t for test, etc.)."
}
+. $PSScriptRoot\tools.ps1
+
function InitializeCustomToolset {
if (-not $restore) {
return
@@ -113,8 +115,6 @@ function Build {
}
try {
- . $PSScriptRoot\tools.ps1
-
if ($clean) {
if (Test-Path $ArtifactsDir) {
Remove-Item -Recurse -Force $ArtifactsDir
@@ -122,12 +122,7 @@ try {
}
exit 0
}
-
- if ((Test-Path variable:LastExitCode) -And ($LastExitCode -ne 0)) {
- Write-PipelineTelemetryError -Category 'InitializeToolset' -Message 'Eng/common/tools.ps1 returned a non-zero exit code.'
- ExitWithExitCode $LastExitCode
- }
-
+
if ($help -or (($null -ne $properties) -and ($properties.Contains('/help') -or $properties.Contains('/?')))) {
Print-Usage
exit 0
diff --git a/external/linker/eng/common/cross/build-rootfs.sh b/external/linker/eng/common/cross/build-rootfs.sh
index 8d61377a87..a23f895ba1 100755
--- a/external/linker/eng/common/cross/build-rootfs.sh
+++ b/external/linker/eng/common/cross/build-rootfs.sh
@@ -25,8 +25,9 @@ __UbuntuPackages="build-essential"
__AlpinePackages="alpine-base"
__AlpinePackages+=" build-base"
__AlpinePackages+=" linux-headers"
-__AlpinePackages+=" lldb-dev"
-__AlpinePackages+=" llvm-dev"
+__AlpinePackagesEdgeTesting=" lldb-dev"
+__AlpinePackagesEdgeMain=" llvm9-libs"
+__AlpinePackagesEdgeMain+=" python3"
# symlinks fixer
__UbuntuPackages+=" symlinks"
@@ -199,13 +200,23 @@ if [[ "$__LinuxCodeName" == "alpine" ]]; then
tar -xf $__ApkToolsDir/apk-tools-$__ApkToolsVersion-x86_64-linux.tar.gz -C $__ApkToolsDir
mkdir -p $__RootfsDir/usr/bin
cp -v /usr/bin/qemu-$__QEMUArch-static $__RootfsDir/usr/bin
+
$__ApkToolsDir/apk-tools-$__ApkToolsVersion/apk \
-X http://dl-cdn.alpinelinux.org/alpine/v$__AlpineVersion/main \
-X http://dl-cdn.alpinelinux.org/alpine/v$__AlpineVersion/community \
- -X http://dl-cdn.alpinelinux.org/alpine/edge/testing \
- -X http://dl-cdn.alpinelinux.org/alpine/edge/main \
-U --allow-untrusted --root $__RootfsDir --arch $__AlpineArch --initdb \
add $__AlpinePackages
+
+ $__ApkToolsDir/apk-tools-$__ApkToolsVersion/apk \
+ -X http://dl-cdn.alpinelinux.org/alpine/edge/main \
+ -U --allow-untrusted --root $__RootfsDir --arch $__AlpineArch --initdb \
+ add $__AlpinePackagesEdgeMain
+
+ $__ApkToolsDir/apk-tools-$__ApkToolsVersion/apk \
+ -X http://dl-cdn.alpinelinux.org/alpine/edge/testing \
+ -U --allow-untrusted --root $__RootfsDir --arch $__AlpineArch --initdb \
+ add $__AlpinePackagesEdgeTesting
+
rm -r $__ApkToolsDir
elif [[ -n $__LinuxCodeName ]]; then
qemu-debootstrap --arch $__UbuntuArch $__LinuxCodeName $__RootfsDir $__UbuntuRepo
diff --git a/external/linker/eng/common/darc-init.ps1 b/external/linker/eng/common/darc-init.ps1
index fc2190365f..2a30ccfd74 100644
--- a/external/linker/eng/common/darc-init.ps1
+++ b/external/linker/eng/common/darc-init.ps1
@@ -24,13 +24,15 @@ function InstallDarcCli ($darcVersion) {
$darcVersion = $(Invoke-WebRequest -Uri $versionEndpoint -UseBasicParsing).Content
}
- $arcadeServicesSource = 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json'
+ $arcadeServicesSource = 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json'
Write-Host "Installing Darc CLI version $darcVersion..."
Write-Host 'You may need to restart your command window if this is the first dotnet tool you have installed.'
if (-not $toolpath) {
+ Write-Host "'$dotnet' tool install $darcCliPackageName --version $darcVersion --add-source '$arcadeServicesSource' -v $verbosity -g"
& "$dotnet" tool install $darcCliPackageName --version $darcVersion --add-source "$arcadeServicesSource" -v $verbosity -g
}else {
+ Write-Host "'$dotnet' tool install $darcCliPackageName --version $darcVersion --add-source '$arcadeServicesSource' -v $verbosity -g --tool-path '$toolpath'"
& "$dotnet" tool install $darcCliPackageName --version $darcVersion --add-source "$arcadeServicesSource" -v $verbosity --tool-path "$toolpath"
}
}
diff --git a/external/linker/eng/common/enable-cross-org-publishing.ps1 b/external/linker/eng/common/enable-cross-org-publishing.ps1
index efa26621db..da09da4f1f 100644
--- a/external/linker/eng/common/enable-cross-org-publishing.ps1
+++ b/external/linker/eng/common/enable-cross-org-publishing.ps1
@@ -2,7 +2,12 @@ param(
[string] $token
)
+
. $PSScriptRoot\pipeline-logging-functions.ps1
-Write-PipelineSetVariable -Name 'VSS_NUGET_ACCESSTOKEN' -Value $token
-Write-PipelineSetVariable -Name 'VSS_NUGET_URI_PREFIXES' -Value 'https://dnceng.pkgs.visualstudio.com/;https://pkgs.dev.azure.com/dnceng/;https://devdiv.pkgs.visualstudio.com/;https://pkgs.dev.azure.com/devdiv/'
+# Write-PipelineSetVariable will no-op if a variable named $ci is not defined
+# Since this script is only ever called in AzDO builds, just universally set it
+$ci = $true
+
+Write-PipelineSetVariable -Name 'VSS_NUGET_ACCESSTOKEN' -Value $token -IsMultiJobVariable $false
+Write-PipelineSetVariable -Name 'VSS_NUGET_URI_PREFIXES' -Value 'https://dnceng.pkgs.visualstudio.com/;https://pkgs.dev.azure.com/dnceng/;https://devdiv.pkgs.visualstudio.com/;https://pkgs.dev.azure.com/devdiv/' -IsMultiJobVariable $false
diff --git a/external/linker/eng/common/generate-graph-files.ps1 b/external/linker/eng/common/generate-graph-files.ps1
index 7ad26afa69..0728b1a8b5 100644
--- a/external/linker/eng/common/generate-graph-files.ps1
+++ b/external/linker/eng/common/generate-graph-files.ps1
@@ -3,7 +3,7 @@ Param(
[Parameter(Mandatory=$true)][string] $gitHubPat, # GitHub personal access token from https://github.com/settings/tokens (no auth scopes needed)
[Parameter(Mandatory=$true)][string] $azdoPat, # Azure Dev Ops tokens from https://dev.azure.com/dnceng/_details/security/tokens (code read scope needed)
[Parameter(Mandatory=$true)][string] $outputFolder, # Where the graphviz.txt file will be created
- [string] $darcVersion = '1.1.0-beta.19175.6', # darc's version
+ [string] $darcVersion, # darc's version
[string] $graphvizVersion = '2.38', # GraphViz version
[switch] $includeToolset # Whether the graph should include toolset dependencies or not. i.e. arcade, optimization. For more about
# toolset dependencies see https://github.com/dotnet/arcade/blob/master/Documentation/Darc.md#toolset-vs-product-dependencies
diff --git a/external/linker/eng/common/init-tools-native.ps1 b/external/linker/eng/common/init-tools-native.ps1
index f4409f0835..db830c00a6 100644
--- a/external/linker/eng/common/init-tools-native.ps1
+++ b/external/linker/eng/common/init-tools-native.ps1
@@ -113,14 +113,16 @@ try {
}
$toolInstallationFailure = $true
} else {
- Write-PipelineTelemetryError -Category 'NativeToolsBootstrap' -Message $errMsg
+ # We cannot change this to Write-PipelineTelemetryError because of https://github.com/dotnet/arcade/issues/4482
+ Write-Host $errMsg
exit 1
}
}
}
if ((Get-Variable 'toolInstallationFailure' -ErrorAction 'SilentlyContinue') -and $toolInstallationFailure) {
- Write-PipelineTelemetryError -Category 'NativeToolsBootstrap' -Message 'Native tools bootstrap failed'
+ # We cannot change this to Write-PipelineTelemetryError because of https://github.com/dotnet/arcade/issues/4482
+ Write-Host 'Native tools bootstrap failed'
exit 1
}
}
diff --git a/external/linker/eng/common/native/install-tool.ps1 b/external/linker/eng/common/native/install-tool.ps1
index ca180d03ba..f397e1c75d 100644
--- a/external/linker/eng/common/native/install-tool.ps1
+++ b/external/linker/eng/common/native/install-tool.ps1
@@ -105,7 +105,7 @@ try {
Write-Error "There are multiple copies of $ToolName in $($ToolInstallDirectory): `n$(@($ToolFilePath | out-string))"
exit 1
} elseif (@($ToolFilePath).Length -Lt 1) {
- Write-Error "$ToolName was not found in $ToolFilePath."
+ Write-Host "$ToolName was not found in $ToolFilePath."
exit 1
}
diff --git a/external/linker/eng/common/performance/performance-setup.ps1 b/external/linker/eng/common/performance/performance-setup.ps1
index ec41965fc8..e337669929 100644
--- a/external/linker/eng/common/performance/performance-setup.ps1
+++ b/external/linker/eng/common/performance/performance-setup.ps1
@@ -9,12 +9,12 @@ Param(
[string] $Branch=$env:BUILD_SOURCEBRANCH,
[string] $CommitSha=$env:BUILD_SOURCEVERSION,
[string] $BuildNumber=$env:BUILD_BUILDNUMBER,
- [string] $RunCategories="coreclr corefx",
+ [string] $RunCategories="Libraries Runtime",
[string] $Csproj="src\benchmarks\micro\MicroBenchmarks.csproj",
[string] $Kind="micro",
[switch] $Internal,
[switch] $Compare,
- [string] $Configurations="CompilationMode=$CompilationMode"
+ [string] $Configurations="CompilationMode=$CompilationMode RunKind=$Kind"
)
$RunFromPerformanceRepo = ($Repository -eq "dotnet/performance") -or ($Repository -eq "dotnet-performance")
@@ -49,7 +49,8 @@ if ($Internal) {
$HelixSourcePrefix = "official"
}
-$CommonSetupArguments="--frameworks $Framework --queue $Queue --build-number $BuildNumber --build-configs $Configurations"
+# FIX ME: This is a workaround until we get this from the actual pipeline
+$CommonSetupArguments="--channel master --queue $Queue --build-number $BuildNumber --build-configs $Configurations --architecture $Architecture"
$SetupArguments = "--repository https://github.com/$Repository --branch $Branch --get-perf-hash --commit-sha $CommitSha $CommonSetupArguments"
if ($RunFromPerformanceRepo) {
diff --git a/external/linker/eng/common/performance/performance-setup.sh b/external/linker/eng/common/performance/performance-setup.sh
index 2f2092166e..94a04e0fe5 100755
--- a/external/linker/eng/common/performance/performance-setup.sh
+++ b/external/linker/eng/common/performance/performance-setup.sh
@@ -13,9 +13,9 @@ build_number=$BUILD_BUILDNUMBER
internal=false
compare=false
kind="micro"
-run_categories="coreclr corefx"
+run_categories="Libraries Runtime"
csproj="src\benchmarks\micro\MicroBenchmarks.csproj"
-configurations=
+configurations="CompliationMode=$compilation_mode RunKind=$kind"
run_from_perf_repo=false
use_core_run=true
use_baseline_core_run=true
@@ -164,7 +164,7 @@ if [[ "$internal" == true ]]; then
fi
fi
-common_setup_arguments="--frameworks $framework --queue $queue --build-number $build_number --build-configs $configurations"
+common_setup_arguments="--channel master --queue $queue --build-number $build_number --build-configs $configurations --architecture $architecture"
setup_arguments="--repository https://github.com/$repository --branch $branch --get-perf-hash --commit-sha $commit_sha $common_setup_arguments"
if [[ "$run_from_perf_repo" = true ]]; then
diff --git a/external/linker/eng/common/pipeline-logging-functions.ps1 b/external/linker/eng/common/pipeline-logging-functions.ps1
index e065618588..a3e1317ad4 100644
--- a/external/linker/eng/common/pipeline-logging-functions.ps1
+++ b/external/linker/eng/common/pipeline-logging-functions.ps1
@@ -85,7 +85,7 @@ function Write-PipelineTaskError {
[switch]$AsOutput,
[bool]$IsMultiJobVariable=$true)
- if(-Not (Test-Path variable:ci) -Or !$ci) {
+ if((Test-Path variable:ci) -And $ci) {
Write-LoggingCommand -Area 'task' -Event 'setvariable' -Data $Value -Properties @{
'variable' = $Name
'isSecret' = $Secret
@@ -101,7 +101,7 @@ function Write-PipelineTaskError {
[string]$Path,
[switch]$AsOutput)
- if(-Not (Test-Path variable:ci) -Or !$ci) {
+ if((Test-Path variable:ci) -And $ci) {
Write-LoggingCommand -Area 'task' -Event 'prependpath' -Data $Path -AsOutput:$AsOutput
}
}
@@ -237,4 +237,4 @@ function Write-LogIssue {
}
Write-Host $command -ForegroundColor $foregroundColor -BackgroundColor $backgroundColor
-}
\ No newline at end of file
+}
diff --git a/external/linker/eng/common/post-build/promote-build.ps1 b/external/linker/eng/common/post-build/add-build-to-channel.ps1
similarity index 95%
rename from external/linker/eng/common/post-build/promote-build.ps1
rename to external/linker/eng/common/post-build/add-build-to-channel.ps1
index ce45635fbd..de2d957922 100644
--- a/external/linker/eng/common/post-build/promote-build.ps1
+++ b/external/linker/eng/common/post-build/add-build-to-channel.ps1
@@ -17,7 +17,7 @@ try {
ExitWithExitCode 1
}
- # Get info about which channels the build has already been promoted to
+ # Get info about which channel(s) the build has already been promoted to
$buildInfo = Get-MaestroBuild -BuildId $BuildId
if (!$buildInfo) {
diff --git a/external/linker/eng/common/templates/job/execute-sdl.yml b/external/linker/eng/common/templates/job/execute-sdl.yml
index 2973bcaf3a..640f2b04e2 100644
--- a/external/linker/eng/common/templates/job/execute-sdl.yml
+++ b/external/linker/eng/common/templates/job/execute-sdl.yml
@@ -1,4 +1,5 @@
parameters:
+ enable: 'false' # Whether the SDL validation job should execute or not
overrideParameters: '' # Optional: to override values for parameters.
additionalParameters: '' # Optional: parameters that need user specific values eg: '-SourceToolsList @("abc","def") -ArtifactToolsList @("ghi","jkl")'
# There is some sort of bug (has been reported) in Azure DevOps where if this parameter is named
@@ -16,8 +17,15 @@ jobs:
- job: Run_SDL
dependsOn: ${{ parameters.dependsOn }}
displayName: Run SDL tool
+ condition: eq( ${{ parameters.enable }}, 'true')
variables:
- group: DotNet-VSTS-Bot
+ - name: AzDOProjectName
+ value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOProjectName'] ]
+ - name: AzDOPipelineId
+ value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOPipelineId'] ]
+ - name: AzDOBuildId
+ value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOBuildId'] ]
pool:
name: Hosted VS2017
steps:
@@ -28,14 +36,22 @@ jobs:
- task: DownloadBuildArtifacts@0
displayName: Download Build Artifacts
inputs:
- buildType: current
+ buildType: specific
+ buildVersionToDownload: specific
+ project: $(AzDOProjectName)
+ pipeline: $(AzDOPipelineId)
+ buildId: $(AzDOBuildId)
artifactName: ${{ artifactName }}
downloadPath: $(Build.ArtifactStagingDirectory)\artifacts
- ${{ if eq(parameters.artifactNames, '') }}:
- task: DownloadBuildArtifacts@0
displayName: Download Build Artifacts
inputs:
- buildType: current
+ buildType: specific
+ buildVersionToDownload: specific
+ project: $(AzDOProjectName)
+ pipeline: $(AzDOPipelineId)
+ buildId: $(AzDOBuildId)
downloadType: specific files
itemPattern: "**"
downloadPath: $(Build.ArtifactStagingDirectory)\artifacts
diff --git a/external/linker/eng/common/templates/post-build/channels/generic-internal-channel.yml b/external/linker/eng/common/templates/post-build/channels/generic-internal-channel.yml
index 3a8755fbbb..380122901d 100644
--- a/external/linker/eng/common/templates/post-build/channels/generic-internal-channel.yml
+++ b/external/linker/eng/common/templates/post-build/channels/generic-internal-channel.yml
@@ -23,23 +23,32 @@ stages:
- job: publish_symbols
displayName: Symbol Publishing
dependsOn: setupMaestroVars
- condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', ${{ parameters.channelId }} ))
+ condition: or(contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', ${{ parameters.channelId }} )), eq(dependencies.setupMaestroVars.outputs['setReleaseVars.PromoteToMaestroChannelId'], ${{ parameters.channelId }}))
variables:
- group: DotNet-Symbol-Server-Pats
+ - name: AzDOProjectName
+ value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOProjectName'] ]
+ - name: AzDOPipelineId
+ value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOPipelineId'] ]
+ - name: AzDOBuildId
+ value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOBuildId'] ]
pool:
vmImage: 'windows-2019'
steps:
- task: DownloadBuildArtifacts@0
- displayName: Download Blob Artifacts
- inputs:
- artifactName: 'BlobArtifacts'
+ displayName: Download Build Assets
continueOnError: true
-
- - task: DownloadBuildArtifacts@0
- displayName: Download PDB Artifacts
inputs:
- artifactName: 'PDBArtifacts'
- continueOnError: true
+ buildType: specific
+ buildVersionToDownload: specific
+ project: $(AzDOProjectName)
+ pipeline: $(AzDOPipelineId)
+ buildId: $(AzDOBuildId)
+ downloadType: 'specific'
+ itemPattern: |
+ PdbArtifacts/**
+ BlobArtifacts/**
+ downloadPath: '$(Build.ArtifactStagingDirectory)'
# This is necessary whenever we want to publish/restore to an AzDO private feed
# Since sdk-task.ps1 tries to restore packages we need to do this authentication here
@@ -80,28 +89,31 @@ stages:
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.BARBuildId'] ]
- name: IsStableBuild
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.IsStableBuild'] ]
- condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', ${{ parameters.channelId }}))
+ - name: AzDOProjectName
+ value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOProjectName'] ]
+ - name: AzDOPipelineId
+ value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOPipelineId'] ]
+ - name: AzDOBuildId
+ value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOBuildId'] ]
+ condition: or(contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', ${{ parameters.channelId }} )), eq(dependencies.setupMaestroVars.outputs['setReleaseVars.PromoteToMaestroChannelId'], ${{ parameters.channelId }}))
pool:
vmImage: 'windows-2019'
steps:
- task: DownloadBuildArtifacts@0
- displayName: Download Package Artifacts
- inputs:
- buildType: current
- artifactName: PackageArtifacts
+ displayName: Download Build Assets
continueOnError: true
-
- - task: DownloadBuildArtifacts@0
- displayName: Download Blob Artifacts
inputs:
- buildType: current
- artifactName: BlobArtifacts
- continueOnError: true
- - task: DownloadBuildArtifacts@0
- displayName: Download Asset Manifests
- inputs:
- buildType: current
- artifactName: AssetManifests
+ buildType: specific
+ buildVersionToDownload: specific
+ project: $(AzDOProjectName)
+ pipeline: $(AzDOPipelineId)
+ buildId: $(AzDOBuildId)
+ downloadType: 'specific'
+ itemPattern: |
+ PackageArtifacts/**
+ BlobArtifacts/**
+ AssetManifests/**
+ downloadPath: '$(Build.ArtifactStagingDirectory)'
- task: NuGetToolInstaller@1
displayName: 'Install NuGet.exe'
@@ -154,6 +166,6 @@ stages:
StageLabel: '${{ parameters.stageName }}'
JobLabel: 'AssetsPublishing'
- - template: ../../steps/promote-build.yml
+ - template: ../../steps/add-build-to-channel.yml
parameters:
ChannelId: ${{ parameters.channelId }}
diff --git a/external/linker/eng/common/templates/post-build/channels/generic-public-channel.yml b/external/linker/eng/common/templates/post-build/channels/generic-public-channel.yml
index 3f572f8b12..ae8c6349d4 100644
--- a/external/linker/eng/common/templates/post-build/channels/generic-public-channel.yml
+++ b/external/linker/eng/common/templates/post-build/channels/generic-public-channel.yml
@@ -23,23 +23,32 @@ stages:
- job: publish_symbols
displayName: Symbol Publishing
dependsOn: setupMaestroVars
- condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', ${{ parameters.channelId }} ))
+ condition: or(contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', ${{ parameters.channelId }} )), eq(dependencies.setupMaestroVars.outputs['setReleaseVars.PromoteToMaestroChannelId'], ${{ parameters.channelId }}))
variables:
- group: DotNet-Symbol-Server-Pats
+ - name: AzDOProjectName
+ value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOProjectName'] ]
+ - name: AzDOPipelineId
+ value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOPipelineId'] ]
+ - name: AzDOBuildId
+ value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOBuildId'] ]
pool:
vmImage: 'windows-2019'
steps:
- task: DownloadBuildArtifacts@0
- displayName: Download Blob Artifacts
- inputs:
- artifactName: 'BlobArtifacts'
+ displayName: Download Build Assets
continueOnError: true
-
- - task: DownloadBuildArtifacts@0
- displayName: Download PDB Artifacts
inputs:
- artifactName: 'PDBArtifacts'
- continueOnError: true
+ buildType: specific
+ buildVersionToDownload: specific
+ project: $(AzDOProjectName)
+ pipeline: $(AzDOPipelineId)
+ buildId: $(AzDOBuildId)
+ downloadType: 'specific'
+ itemPattern: |
+ PdbArtifacts/**
+ BlobArtifacts/**
+ downloadPath: '$(Build.ArtifactStagingDirectory)'
# This is necessary whenever we want to publish/restore to an AzDO private feed
# Since sdk-task.ps1 tries to restore packages we need to do this authentication here
@@ -79,29 +88,31 @@ stages:
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.BARBuildId'] ]
- name: IsStableBuild
value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.IsStableBuild'] ]
- condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', ${{ parameters.channelId }}))
+ - name: AzDOProjectName
+ value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOProjectName'] ]
+ - name: AzDOPipelineId
+ value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOPipelineId'] ]
+ - name: AzDOBuildId
+ value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOBuildId'] ]
+ condition: or(contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', ${{ parameters.channelId }} )), eq(dependencies.setupMaestroVars.outputs['setReleaseVars.PromoteToMaestroChannelId'], ${{ parameters.channelId }}))
pool:
vmImage: 'windows-2019'
steps:
- task: DownloadBuildArtifacts@0
- displayName: Download Package Artifacts
- inputs:
- buildType: current
- artifactName: PackageArtifacts
+ displayName: Download Build Assets
continueOnError: true
-
- - task: DownloadBuildArtifacts@0
- displayName: Download Blob Artifacts
inputs:
- buildType: current
- artifactName: BlobArtifacts
- continueOnError: true
-
- - task: DownloadBuildArtifacts@0
- displayName: Download Asset Manifests
- inputs:
- buildType: current
- artifactName: AssetManifests
+ buildType: specific
+ buildVersionToDownload: specific
+ project: $(AzDOProjectName)
+ pipeline: $(AzDOPipelineId)
+ buildId: $(AzDOBuildId)
+ downloadType: 'specific'
+ itemPattern: |
+ PackageArtifacts/**
+ BlobArtifacts/**
+ AssetManifests/**
+ downloadPath: '$(Build.ArtifactStagingDirectory)'
- task: NuGetToolInstaller@1
displayName: 'Install NuGet.exe'
@@ -154,6 +165,6 @@ stages:
StageLabel: '${{ parameters.stageName }}'
JobLabel: 'AssetsPublishing'
- - template: ../../steps/promote-build.yml
+ - template: ../../steps/add-build-to-channel.yml
parameters:
ChannelId: ${{ parameters.channelId }}
diff --git a/external/linker/eng/common/templates/post-build/post-build.yml b/external/linker/eng/common/templates/post-build/post-build.yml
index 8a8d84f202..70cb65f50b 100644
--- a/external/linker/eng/common/templates/post-build/post-build.yml
+++ b/external/linker/eng/common/templates/post-build/post-build.yml
@@ -26,97 +26,136 @@ stages:
- stage: Validate
dependsOn: ${{ parameters.validateDependsOn }}
displayName: Validate
+ variables:
+ - template: common-variables.yml
jobs:
- - ${{ if eq(parameters.enableNugetValidation, 'true') }}:
- - job:
- displayName: NuGet Validation
- pool:
- vmImage: 'windows-2019'
- steps:
- - task: DownloadBuildArtifacts@0
- displayName: Download Package Artifacts
- inputs:
- buildType: current
- artifactName: PackageArtifacts
+ - template: setup-maestro-vars.yml
- - task: PowerShell@2
- displayName: Validate
- inputs:
- filePath: $(Build.SourcesDirectory)/eng/common/post-build/nuget-validation.ps1
- arguments: -PackagesPath $(Build.ArtifactStagingDirectory)/PackageArtifacts/
- -ToolDestinationPath $(Agent.BuildDirectory)/Extract/
+ - job:
+ displayName: NuGet Validation
+ dependsOn: setupMaestroVars
+ condition: eq( ${{ parameters.enableNugetValidation }}, 'true')
+ pool:
+ vmImage: 'windows-2019'
+ variables:
+ - name: AzDOProjectName
+ value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOProjectName'] ]
+ - name: AzDOPipelineId
+ value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOPipelineId'] ]
+ - name: AzDOBuildId
+ value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOBuildId'] ]
+ steps:
+ - task: DownloadBuildArtifacts@0
+ displayName: Download Package Artifacts
+ inputs:
+ buildType: specific
+ buildVersionToDownload: specific
+ project: $(AzDOProjectName)
+ pipeline: $(AzDOPipelineId)
+ buildId: $(AzDOBuildId)
+ artifactName: PackageArtifacts
- - ${{ if eq(parameters.enableSigningValidation, 'true') }}:
- - job:
- displayName: Signing Validation
- variables:
- - template: common-variables.yml
- pool:
- vmImage: 'windows-2019'
- steps:
- - task: DownloadBuildArtifacts@0
- displayName: Download Package Artifacts
- inputs:
- buildType: current
- artifactName: PackageArtifacts
+ - task: PowerShell@2
+ displayName: Validate
+ inputs:
+ filePath: $(Build.SourcesDirectory)/eng/common/post-build/nuget-validation.ps1
+ arguments: -PackagesPath $(Build.ArtifactStagingDirectory)/PackageArtifacts/
+ -ToolDestinationPath $(Agent.BuildDirectory)/Extract/
- # This is necessary whenever we want to publish/restore to an AzDO private feed
- # Since sdk-task.ps1 tries to restore packages we need to do this authentication here
- # otherwise it'll complain about accessing a private feed.
- - task: NuGetAuthenticate@0
- displayName: 'Authenticate to AzDO Feeds'
+ - job:
+ displayName: Signing Validation
+ dependsOn: setupMaestroVars
+ condition: eq( ${{ parameters.enableSigningValidation }}, 'true')
+ variables:
+ - template: common-variables.yml
+ - name: AzDOProjectName
+ value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOProjectName'] ]
+ - name: AzDOPipelineId
+ value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOPipelineId'] ]
+ - name: AzDOBuildId
+ value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOBuildId'] ]
+ pool:
+ vmImage: 'windows-2019'
+ steps:
+ - task: DownloadBuildArtifacts@0
+ displayName: Download Package Artifacts
+ inputs:
+ buildType: specific
+ buildVersionToDownload: specific
+ project: $(AzDOProjectName)
+ pipeline: $(AzDOPipelineId)
+ buildId: $(AzDOBuildId)
+ artifactName: PackageArtifacts
- - task: PowerShell@2
- displayName: Enable cross-org publishing
- inputs:
- filePath: eng\common\enable-cross-org-publishing.ps1
- arguments: -token $(dn-bot-dnceng-artifact-feeds-rw)
+ # This is necessary whenever we want to publish/restore to an AzDO private feed
+ # Since sdk-task.ps1 tries to restore packages we need to do this authentication here
+ # otherwise it'll complain about accessing a private feed.
+ - task: NuGetAuthenticate@0
+ displayName: 'Authenticate to AzDO Feeds'
- - task: PowerShell@2
- displayName: Validate
- inputs:
- filePath: eng\common\sdk-task.ps1
- arguments: -task SigningValidation -restore -msbuildEngine dotnet
- /p:PackageBasePath='$(Build.ArtifactStagingDirectory)/PackageArtifacts'
- /p:SignCheckExclusionsFile='$(Build.SourcesDirectory)/eng/SignCheckExclusionsFile.txt'
- ${{ parameters.signingValidationAdditionalParameters }}
+ - task: PowerShell@2
+ displayName: Enable cross-org publishing
+ inputs:
+ filePath: eng\common\enable-cross-org-publishing.ps1
+ arguments: -token $(dn-bot-dnceng-artifact-feeds-rw)
- - template: ../steps/publish-logs.yml
- parameters:
- StageLabel: 'Validation'
- JobLabel: 'Signing'
+ - task: PowerShell@2
+ displayName: Validate
+ inputs:
+ filePath: eng\common\sdk-task.ps1
+ arguments: -task SigningValidation -restore -msbuildEngine dotnet
+ /p:PackageBasePath='$(Build.ArtifactStagingDirectory)/PackageArtifacts'
+ /p:SignCheckExclusionsFile='$(Build.SourcesDirectory)/eng/SignCheckExclusionsFile.txt'
+ ${{ parameters.signingValidationAdditionalParameters }}
- - ${{ if eq(parameters.enableSourceLinkValidation, 'true') }}:
- - job:
- displayName: SourceLink Validation
- variables:
- - template: common-variables.yml
- pool:
- vmImage: 'windows-2019'
- steps:
- - task: DownloadBuildArtifacts@0
- displayName: Download Blob Artifacts
- inputs:
- buildType: current
- artifactName: BlobArtifacts
+ - template: ../steps/publish-logs.yml
+ parameters:
+ StageLabel: 'Validation'
+ JobLabel: 'Signing'
- - task: PowerShell@2
- displayName: Validate
- inputs:
- filePath: $(Build.SourcesDirectory)/eng/common/post-build/sourcelink-validation.ps1
- arguments: -InputPath $(Build.ArtifactStagingDirectory)/BlobArtifacts/
- -ExtractPath $(Agent.BuildDirectory)/Extract/
- -GHRepoName $(Build.Repository.Name)
- -GHCommit $(Build.SourceVersion)
- -SourcelinkCliVersion $(SourceLinkCLIVersion)
- continueOnError: true
+ - job:
+ displayName: SourceLink Validation
+ dependsOn: setupMaestroVars
+ condition: eq( ${{ parameters.enableSourceLinkValidation }}, 'true')
+ variables:
+ - template: common-variables.yml
+ - name: AzDOProjectName
+ value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOProjectName'] ]
+ - name: AzDOPipelineId
+ value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOPipelineId'] ]
+ - name: AzDOBuildId
+ value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.AzDOBuildId'] ]
+ pool:
+ vmImage: 'windows-2019'
+ steps:
+ - task: DownloadBuildArtifacts@0
+ displayName: Download Blob Artifacts
+ inputs:
+ buildType: specific
+ buildVersionToDownload: specific
+ project: $(AzDOProjectName)
+ pipeline: $(AzDOPipelineId)
+ buildId: $(AzDOBuildId)
+ artifactName: BlobArtifacts
- - ${{ if eq(parameters.SDLValidationParameters.enable, 'true') }}:
- - template: /eng/common/templates/job/execute-sdl.yml
- parameters:
- additionalParameters: ${{ parameters.SDLValidationParameters.params }}
- continueOnError: ${{ parameters.SDLValidationParameters.continueOnError }}
- artifactNames: ${{ parameters.SDLValidationParameters.artifactNames }}
+ - task: PowerShell@2
+ displayName: Validate
+ inputs:
+ filePath: $(Build.SourcesDirectory)/eng/common/post-build/sourcelink-validation.ps1
+ arguments: -InputPath $(Build.ArtifactStagingDirectory)/BlobArtifacts/
+ -ExtractPath $(Agent.BuildDirectory)/Extract/
+ -GHRepoName $(Build.Repository.Name)
+ -GHCommit $(Build.SourceVersion)
+ -SourcelinkCliVersion $(SourceLinkCLIVersion)
+ continueOnError: true
+
+ - template: /eng/common/templates/job/execute-sdl.yml
+ parameters:
+ enable: ${{ parameters.SDLValidationParameters.enable }}
+ dependsOn: setupMaestroVars
+ additionalParameters: ${{ parameters.SDLValidationParameters.params }}
+ continueOnError: ${{ parameters.SDLValidationParameters.continueOnError }}
+ artifactNames: ${{ parameters.SDLValidationParameters.artifactNames }}
- template: \eng\common\templates\post-build\channels\generic-public-channel.yml
parameters:
@@ -221,3 +260,29 @@ stages:
transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-experimental/nuget/v3/index.json'
shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-experimental/nuget/v3/index.json'
symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-experimental-symbols/nuget/v3/index.json'
+
+- template: \eng\common\templates\post-build\channels\generic-public-channel.yml
+ parameters:
+ artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
+ dependsOn: ${{ parameters.publishDependsOn }}
+ publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
+ symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
+ stageName: 'Net_Eng_Services_Int_Publish'
+ channelName: '.NET Eng Services - Int'
+ channelId: 678
+ transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json'
+ shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json'
+ symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng-symbols/nuget/v3/index.json'
+
+- template: \eng\common\templates\post-build\channels\generic-public-channel.yml
+ parameters:
+ artifactsPublishingAdditionalParameters: ${{ parameters.artifactsPublishingAdditionalParameters }}
+ dependsOn: ${{ parameters.publishDependsOn }}
+ publishInstallersAndChecksums: ${{ parameters.publishInstallersAndChecksums }}
+ symbolPublishingAdditionalParameters: ${{ parameters.symbolPublishingAdditionalParameters }}
+ stageName: 'Net_Eng_Services_Prod_Publish'
+ channelName: '.NET Eng Services - Prod'
+ channelId: 679
+ transportFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json'
+ shippingFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json'
+ symbolsFeed: 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng-symbols/nuget/v3/index.json'
diff --git a/external/linker/eng/common/templates/post-build/promote-build.yml b/external/linker/eng/common/templates/post-build/promote-build.yml
deleted file mode 100644
index 6b479c3b82..0000000000
--- a/external/linker/eng/common/templates/post-build/promote-build.yml
+++ /dev/null
@@ -1,25 +0,0 @@
-parameters:
- ChannelId: 0
-
-jobs:
-- job:
- displayName: Promote Build
- dependsOn: setupMaestroVars
- condition: contains(dependencies.setupMaestroVars.outputs['setReleaseVars.InitialChannels'], format('[{0}]', ${{ parameters.ChannelId }}))
- variables:
- - name: BARBuildId
- value: $[ dependencies.setupMaestroVars.outputs['setReleaseVars.BARBuildId'] ]
- - name: ChannelId
- value: ${{ parameters.ChannelId }}
- pool:
- vmImage: 'windows-2019'
- steps:
- - task: PowerShell@2
- displayName: Add Build to Channel
- inputs:
- filePath: $(Build.SourcesDirectory)/eng/common/post-build/promote-build.ps1
- arguments: -BuildId $(BARBuildId)
- -ChannelId $(ChannelId)
- -MaestroApiAccessToken $(MaestroApiAccessToken)
- -MaestroApiEndPoint $(MaestroApiEndPoint)
- -MaestroApiVersion $(MaestroApiVersion)
diff --git a/external/linker/eng/common/templates/post-build/setup-maestro-vars.yml b/external/linker/eng/common/templates/post-build/setup-maestro-vars.yml
index 716b53f740..05e611edb6 100644
--- a/external/linker/eng/common/templates/post-build/setup-maestro-vars.yml
+++ b/external/linker/eng/common/templates/post-build/setup-maestro-vars.yml
@@ -1,6 +1,12 @@
jobs:
- job: setupMaestroVars
displayName: Setup Maestro Vars
+ variables:
+ - template: common-variables.yml
+ - name: BuildId
+ value: $[ coalesce(variables.BARBuildId, 0) ]
+ - name: PromoteToChannelId
+ value: $[ coalesce(variables.PromoteToMaestroChannelId, 0) ]
pool:
vmImage: 'windows-2019'
steps:
@@ -8,6 +14,7 @@ jobs:
- task: DownloadBuildArtifacts@0
displayName: Download Release Configs
+ condition: eq(variables.PromoteToChannelId, 0)
inputs:
buildType: current
artifactName: ReleaseConfigs
@@ -19,18 +26,50 @@ jobs:
targetType: inline
script: |
try {
- $Content = Get-Content $(Build.StagingDirectory)/ReleaseConfigs/ReleaseConfigs.txt
+ if ($Env:PromoteToChannelId -eq 0) {
+ $Content = Get-Content $(Build.StagingDirectory)/ReleaseConfigs/ReleaseConfigs.txt
- $BarId = $Content | Select -Index 0
+ $BarId = $Content | Select -Index 0
- $Channels = ""
- $Content | Select -Index 1 | ForEach-Object { $Channels += "$_ ," }
+ $Channels = ""
+ $Content | Select -Index 1 | ForEach-Object { $Channels += "$_ ," }
+
+ $IsStableBuild = $Content | Select -Index 2
- $IsStableBuild = $Content | Select -Index 2
+ $AzureDevOpsProject = $Env:System_TeamProject
+ $AzureDevOpsBuildDefinitionId = $Env:System_DefinitionId
+ $AzureDevOpsBuildId = $Env:Build_BuildId
+ $PromoteToMaestroChannelId = 0
+ }
+ else {
+ $buildApiEndpoint = "${Env:MaestroApiEndPoint}/api/builds/${Env:BARBuildId}?api-version=${Env:MaestroApiVersion}"
+
+ $apiHeaders = New-Object 'System.Collections.Generic.Dictionary[[String],[String]]'
+ $apiHeaders.Add('Accept', 'application/json')
+ $apiHeaders.Add('Authorization',"Bearer ${Env:MAESTRO_API_TOKEN}")
+
+ $buildInfo = try { Invoke-WebRequest -Method Get -Uri $buildApiEndpoint -Headers $apiHeaders | ConvertFrom-Json } catch { Write-Host "Error: $_" }
+
+ $BarId = $Env:BARBuildId
+ $Channels = 'None'
+
+ #TODO: Fix this once this issue is done: https://github.com/dotnet/arcade/issues/3834
+ $IsStableBuild = 'False'
+
+ $AzureDevOpsProject = $buildInfo.azureDevOpsProject
+ $AzureDevOpsBuildDefinitionId = $buildInfo.azureDevOpsBuildDefinitionId
+ $AzureDevOpsBuildId = $buildInfo.azureDevOpsBuildId
+ $PromoteToMaestroChannelId = $Env:PromoteToMaestroChannelId
+ }
Write-Host "##vso[task.setvariable variable=BARBuildId;isOutput=true]$BarId"
Write-Host "##vso[task.setvariable variable=InitialChannels;isOutput=true]$Channels"
Write-Host "##vso[task.setvariable variable=IsStableBuild;isOutput=true]$IsStableBuild"
+
+ Write-Host "##vso[task.setvariable variable=AzDOProjectName;isOutput=true]$AzureDevOpsProject"
+ Write-Host "##vso[task.setvariable variable=AzDOPipelineId;isOutput=true]$AzureDevOpsBuildDefinitionId"
+ Write-Host "##vso[task.setvariable variable=AzDOBuildId;isOutput=true]$AzureDevOpsBuildId"
+ Write-Host "##vso[task.setvariable variable=PromoteToMaestroChannelId;isOutput=true]$PromoteToMaestroChannelId"
}
catch {
Write-Host $_
@@ -38,3 +77,5 @@ jobs:
Write-Host $_.ScriptStackTrace
exit 1
}
+ env:
+ MAESTRO_API_TOKEN: $(MaestroApiAccessToken)
diff --git a/external/linker/eng/common/templates/steps/promote-build.yml b/external/linker/eng/common/templates/steps/add-build-to-channel.yml
similarity index 68%
rename from external/linker/eng/common/templates/steps/promote-build.yml
rename to external/linker/eng/common/templates/steps/add-build-to-channel.yml
index b90404435d..f67a210d62 100644
--- a/external/linker/eng/common/templates/steps/promote-build.yml
+++ b/external/linker/eng/common/templates/steps/add-build-to-channel.yml
@@ -5,9 +5,9 @@ steps:
- task: PowerShell@2
displayName: Add Build to Channel
inputs:
- filePath: $(Build.SourcesDirectory)/eng/common/post-build/promote-build.ps1
+ filePath: $(Build.SourcesDirectory)/eng/common/post-build/add-build-to-channel.ps1
arguments: -BuildId $(BARBuildId)
-ChannelId ${{ parameters.ChannelId }}
-MaestroApiAccessToken $(MaestroApiAccessToken)
-MaestroApiEndPoint $(MaestroApiEndPoint)
- -MaestroApiVersion $(MaestroApiVersion)
+ -MaestroApiVersion $(MaestroApiVersion)
diff --git a/external/linker/eng/common/templates/steps/publish-logs.yml b/external/linker/eng/common/templates/steps/publish-logs.yml
index 8903ba57c0..f91751fe78 100644
--- a/external/linker/eng/common/templates/steps/publish-logs.yml
+++ b/external/linker/eng/common/templates/steps/publish-logs.yml
@@ -18,6 +18,6 @@ steps:
inputs:
PathtoPublish: '$(Build.SourcesDirectory)/PostBuildLogs'
PublishLocation: Container
- ArtifactName: PostBuilLogs
+ ArtifactName: PostBuildLogs
continueOnError: true
condition: always()
diff --git a/external/linker/eng/common/tools.ps1 b/external/linker/eng/common/tools.ps1
index d762c9f044..fef7e5a3fd 100644
--- a/external/linker/eng/common/tools.ps1
+++ b/external/linker/eng/common/tools.ps1
@@ -98,7 +98,10 @@ function Exec-Process([string]$command, [string]$commandArgs) {
}
}
-function InitializeDotNetCli([bool]$install) {
+# createSdkLocationFile parameter enables a file being generated under the toolset directory
+# which writes the sdk's location into. This is only necessary for cmd --> powershell invocations
+# as dot sourcing isn't possible.
+function InitializeDotNetCli([bool]$install, [bool]$createSdkLocationFile) {
if (Test-Path variable:global:_DotNetInstallDir) {
return $global:_DotNetInstallDir
}
@@ -148,6 +151,24 @@ function InitializeDotNetCli([bool]$install) {
$env:DOTNET_INSTALL_DIR = $dotnetRoot
}
+ # Creates a temporary file under the toolset dir.
+ # The following code block is protecting against concurrent access so that this function can
+ # be called in parallel.
+ if ($createSdkLocationFile) {
+ do {
+ $sdkCacheFileTemp = Join-Path $ToolsetDir $([System.IO.Path]::GetRandomFileName())
+ }
+ until (!(Test-Path $sdkCacheFileTemp))
+ Set-Content -Path $sdkCacheFileTemp -Value $dotnetRoot
+
+ try {
+ Rename-Item -Force -Path $sdkCacheFileTemp 'sdk.txt'
+ } catch {
+ # Somebody beat us
+ Remove-Item -Path $sdkCacheFileTemp
+ }
+ }
+
# Add dotnet to PATH. This prevents any bare invocation of dotnet in custom
# build steps from using anything other than what we've downloaded.
# It also ensures that VS msbuild will use the downloaded sdk targets.
@@ -167,7 +188,33 @@ function GetDotNetInstallScript([string] $dotnetRoot) {
if (!(Test-Path $installScript)) {
Create-Directory $dotnetRoot
$ProgressPreference = 'SilentlyContinue' # Don't display the console progress UI - it's a huge perf hit
- Invoke-WebRequest "https://dot.net/$dotnetInstallScriptVersion/dotnet-install.ps1" -OutFile $installScript
+
+ $maxRetries = 5
+ $retries = 1
+
+ $uri = "https://dot.net/$dotnetInstallScriptVersion/dotnet-install.ps1"
+
+ while($true) {
+ try {
+ Write-Host "GET $uri"
+ Invoke-WebRequest $uri -OutFile $installScript
+ break
+ }
+ catch {
+ Write-Host "Failed to download '$uri'"
+ Write-Error $_.Exception.Message -ErrorAction Continue
+ }
+
+ if (++$retries -le $maxRetries) {
+ $delayInSeconds = [math]::Pow(2, $retries) - 1 # Exponential backoff
+ Write-Host "Retrying. Waiting for $delayInSeconds seconds before next attempt ($retries of $maxRetries)."
+ Start-Sleep -Seconds $delayInSeconds
+ }
+ else {
+ throw "Unable to download file in $maxRetries attempts."
+ }
+
+ }
}
return $installScript
@@ -177,12 +224,12 @@ function InstallDotNetSdk([string] $dotnetRoot, [string] $version, [string] $arc
InstallDotNet $dotnetRoot $version $architecture
}
-function InstallDotNet([string] $dotnetRoot,
- [string] $version,
- [string] $architecture = '',
- [string] $runtime = '',
- [bool] $skipNonVersionedFiles = $false,
- [string] $runtimeSourceFeed = '',
+function InstallDotNet([string] $dotnetRoot,
+ [string] $version,
+ [string] $architecture = '',
+ [string] $runtime = '',
+ [bool] $skipNonVersionedFiles = $false,
+ [string] $runtimeSourceFeed = '',
[string] $runtimeSourceFeedKey = '') {
$installScript = GetDotNetInstallScript $dotnetRoot
@@ -216,7 +263,10 @@ function InstallDotNet([string] $dotnetRoot,
}
catch {
Write-PipelineTelemetryError -Category 'InitializeToolset' -Message "Failed to install dotnet runtime '$runtime' from custom location '$runtimeSourceFeed'."
+ ExitWithExitCode 1
}
+ } else {
+ ExitWithExitCode 1
}
}
}
@@ -275,7 +325,10 @@ function InitializeVisualStudioMSBuild([bool]$install, [object]$vsRequirements =
$xcopyMSBuildVersion = "$vsMajorVersion.$($vsMinVersion.Minor).0-alpha"
}
- $vsInstallDir = InitializeXCopyMSBuild $xcopyMSBuildVersion $install
+ $vsInstallDir = $null
+ if ($xcopyMSBuildVersion.Trim() -ine "none") {
+ $vsInstallDir = InitializeXCopyMSBuild $xcopyMSBuildVersion $install
+ }
if ($vsInstallDir -eq $null) {
throw 'Unable to find Visual Studio that has required version and components installed'
}
diff --git a/external/linker/eng/common/tools.sh b/external/linker/eng/common/tools.sh
index f58db5e25d..c26525e52b 100755
--- a/external/linker/eng/common/tools.sh
+++ b/external/linker/eng/common/tools.sh
@@ -41,7 +41,7 @@ fi
# Configures warning treatment in msbuild.
warn_as_error=${warn_as_error:-true}
-# True to attempt using .NET Core already that meets requirements specified in global.json
+# True to attempt using .NET Core already that meets requirements specified in global.json
# installed on the machine instead of downloading one.
use_installed_dotnet_cli=${use_installed_dotnet_cli:-true}
@@ -172,7 +172,7 @@ function InstallDotNetSdk {
function InstallDotNet {
local root=$1
local version=$2
-
+
GetDotNetInstallScript "$root"
local install_script=$_GetDotNetInstallScript
@@ -211,11 +211,35 @@ function InstallDotNet {
Write-PipelineTelemetryError -category 'InitializeToolset' "Failed to install dotnet SDK from custom location '$runtimeSourceFeed' (exit code '$exit_code')."
ExitWithExitCode $exit_code
}
+ else
+ ExitWithExitCode $exit_code
fi
fi
}
}
+function with_retries {
+ local maxRetries=5
+ local retries=1
+ echo "Trying to run '$@' for maximum of $maxRetries attempts."
+ while [[ $((retries++)) -le $maxRetries ]]; do
+ "$@"
+
+ if [[ $? == 0 ]]; then
+ echo "Ran '$@' successfully."
+ return 0
+ fi
+
+ timeout=$((2**$retries-1))
+ echo "Failed to execute '$@'. Waiting $timeout seconds before next attempt ($retries out of $maxRetries)." 1>&2
+ sleep $timeout
+ done
+
+ echo "Failed to execute '$@' for $maxRetries times." 1>&2
+
+ return 1
+}
+
function GetDotNetInstallScript {
local root=$1
local install_script="$root/dotnet-install.sh"
@@ -228,13 +252,13 @@ function GetDotNetInstallScript {
# Use curl if available, otherwise use wget
if command -v curl > /dev/null; then
- curl "$install_script_url" -sSL --retry 10 --create-dirs -o "$install_script" || {
+ with_retries curl "$install_script_url" -isSLv --retry 10 --create-dirs -o "$install_script" || {
local exit_code=$?
Write-PipelineTelemetryError -category 'InitializeToolset' "Failed to acquire dotnet install script (exit code '$exit_code')."
ExitWithExitCode $exit_code
}
- else
- wget -q -O "$install_script" "$install_script_url" || {
+ else
+ with_retries wget -v -O "$install_script" "$install_script_url" || {
local exit_code=$?
Write-PipelineTelemetryError -category 'InitializeToolset' "Failed to acquire dotnet install script (exit code '$exit_code')."
ExitWithExitCode $exit_code
@@ -249,11 +273,11 @@ function InitializeBuildTool {
if [[ -n "${_InitializeBuildTool:-}" ]]; then
return
fi
-
+
InitializeDotNetCli $restore
# return values
- _InitializeBuildTool="$_InitializeDotNetCli/dotnet"
+ _InitializeBuildTool="$_InitializeDotNetCli/dotnet"
_InitializeBuildToolCommand="msbuild"
_InitializeBuildToolFramework="netcoreapp2.1"
}
@@ -317,7 +341,7 @@ function InitializeToolset {
if [[ "$binary_log" == true ]]; then
bl="/bl:$log_dir/ToolsetRestore.binlog"
fi
-
+
echo ' ' > "$proj"
MSBuild-Core "$proj" $bl /t:__WriteToolsetLocation /clp:ErrorsOnly\;NoSummary /p:__ToolsetLocationOutputFile="$toolset_location_file"
diff --git a/external/linker/eng/ilasm.ilproj b/external/linker/eng/ilasm.ilproj
index 0e2dc08169..97db3594b4 100644
--- a/external/linker/eng/ilasm.ilproj
+++ b/external/linker/eng/ilasm.ilproj
@@ -3,9 +3,6 @@
-
-
-
netcoreapp3.0
diff --git a/external/linker/external/Mono.Cecil.overrides b/external/linker/external/Mono.Cecil.overrides
index d49a1bef83..e4819f27ca 100644
--- a/external/linker/external/Mono.Cecil.overrides
+++ b/external/linker/external/Mono.Cecil.overrides
@@ -10,7 +10,7 @@
true
-
+
false
+
+ $(NoWarn);NU5128
-
-
-
+
+
+
+
diff --git a/external/linker/src/ILLink.Tasks/ILLink.Tasks.targets b/external/linker/src/ILLink.Tasks/ILLink.Tasks.targets
index 3a38f07f10..f5024eded8 100644
--- a/external/linker/src/ILLink.Tasks/ILLink.Tasks.targets
+++ b/external/linker/src/ILLink.Tasks/ILLink.Tasks.targets
@@ -2,7 +2,7 @@
<_LinkTaskDirectoryRoot>$(MSBuildThisFileDirectory)../tools/
- <_LinkTaskTFM Condition=" '$(MSBuildRuntimeType)' == 'Core' ">netcoreapp2.0
+ <_LinkTaskTFM Condition=" '$(MSBuildRuntimeType)' == 'Core' ">netcoreapp3.0
<_LinkTaskTFM Condition=" '$(_LinkTaskTFM)' == '' ">net46
<_LinkTaskDirectory>$(_LinkTaskDirectoryRoot)$(_LinkTaskTFM)/
$(_LinkTaskDirectory)ILLink.Tasks.dll
diff --git a/external/linker/src/ILLink.Tasks/LinkTask.cs b/external/linker/src/ILLink.Tasks/LinkTask.cs
index 6c9b15a65a..f176f32d4b 100644
--- a/external/linker/src/ILLink.Tasks/LinkTask.cs
+++ b/external/linker/src/ILLink.Tasks/LinkTask.cs
@@ -111,7 +111,7 @@ namespace ILLink.Tasks
var taskDirectory = Path.GetDirectoryName (Assembly.GetExecutingAssembly ().Location);
// The linker always runs on .NET Core, even when using desktop MSBuild to host ILLink.Tasks.
- _illinkPath = Path.Combine (Path.GetDirectoryName (taskDirectory), "netcoreapp2.0", "illink.dll");
+ _illinkPath = Path.Combine (Path.GetDirectoryName (taskDirectory), "netcoreapp3.0", "illink.dll");
return _illinkPath;
}
set => _illinkPath = value;
diff --git a/external/linker/src/ILLink.Tasks/Sdk/Sdk.props b/external/linker/src/ILLink.Tasks/Sdk/Sdk.props
index 8c9c2cacde..89633629c5 100644
--- a/external/linker/src/ILLink.Tasks/Sdk/Sdk.props
+++ b/external/linker/src/ILLink.Tasks/Sdk/Sdk.props
@@ -13,7 +13,7 @@ Copyright (c) .NET Foundation. All rights reserved.
<_ILLinkTasksDirectoryRoot Condition=" '$(_ILLinkTasksDirectoryRoot)' == '' ">$(MSBuildThisFileDirectory)../tools/
- <_ILLinkTasksTFM Condition=" '$(MSBuildRuntimeType)' == 'Core' ">netcoreapp2.0
+ <_ILLinkTasksTFM Condition=" '$(MSBuildRuntimeType)' == 'Core' ">netcoreapp3.0
<_ILLinkTasksTFM Condition=" '$(_ILLinkTasksTFM)' == '' ">net472
<_ILLinkTasksDirectory>$(_ILLinkTasksDirectoryRoot)$(_ILLinkTasksTFM)/
$(_ILLinkTasksDirectory)ILLink.Tasks.dll
diff --git a/external/linker/src/analyzer/analyzer.csproj b/external/linker/src/analyzer/analyzer.csproj
index 7fd89910fe..1d4852b685 100644
--- a/external/linker/src/analyzer/analyzer.csproj
+++ b/external/linker/src/analyzer/analyzer.csproj
@@ -1,49 +1,37 @@
-
-
+
+
- Debug
- x86
- {4F328B3E-39C1-4E48-8093-F24390C58A5E}
Exe
LinkerAnalyzer
illinkanalyzer
- v4.7
+ Debug;Release
-
- true
- full
- false
- bin\Debug
- DEBUG;
- prompt
- 4
- true
- x86
+
+
+ $(DefineConstants);FEATURE_ILLINK
+ netcoreapp3.0;net471
-
- true
- bin\Release
- prompt
- 4
- true
- x86
+
+
+ net471
+
+
+ true
+ false
+
+
+
+ true
+
+
-
-
- {D68133BD-1E63-496E-9EDE-4FBDBF77B486}
- Mono.Cecil
-
-
-
-
-
-
- Options.cs
-
+
+
+
-
+
\ No newline at end of file
diff --git a/external/linker/src/linker/Linker.Steps/BlacklistStep.cs b/external/linker/src/linker/Linker.Steps/BlacklistStep.cs
index 89b7429dea..f0d2db1667 100644
--- a/external/linker/src/linker/Linker.Steps/BlacklistStep.cs
+++ b/external/linker/src/linker/Linker.Steps/BlacklistStep.cs
@@ -46,11 +46,11 @@ namespace Mono.Linker.Steps {
continue;
try {
- Context.LogMessage ("Processing resource linker descriptor: {0}", name);
+ Context.LogMessage ($"Processing resource linker descriptor: {name}");
AddToPipeline (GetResolveStep (name));
} catch (XmlException ex) {
/* This could happen if some broken XML file is included. */
- Context.LogMessage ("Error processing {0}: {1}", name, ex);
+ Context.LogMessage ($"Error processing {name}: {ex}");
}
}
@@ -62,12 +62,12 @@ namespace Mono.Linker.Steps {
.Where (res => ShouldProcessAssemblyResource (GetAssemblyName (res.Name)))
.Cast ()) {
try {
- Context.LogMessage ("Processing embedded resource linker descriptor: {0}", rsc.Name);
+ Context.LogMessage ($"Processing embedded resource linker descriptor: {rsc.Name}");
AddToPipeline (GetExternalResolveStep (rsc, asm));
} catch (XmlException ex) {
/* This could happen if some broken XML file is embedded. */
- Context.LogMessage ("Error processing {0}: {1}", rsc.Name, ex);
+ Context.LogMessage ($"Error processing {rsc.Name}: {ex}");
}
}
}
@@ -127,14 +127,14 @@ namespace Mono.Linker.Steps {
protected static XPathDocument GetExternalDescriptor (EmbeddedResource resource)
{
using (var sr = new StreamReader (resource.GetResourceStream ())) {
- return new XPathDocument (new StringReader (sr.ReadToEnd ()));
+ return new XPathDocument (sr);
}
}
static XPathDocument GetDescriptor (string descriptor)
{
using (StreamReader sr = new StreamReader (GetResource (descriptor))) {
- return new XPathDocument (new StringReader (sr.ReadToEnd ()));
+ return new XPathDocument (sr);
}
}
diff --git a/external/linker/src/linker/Linker.Steps/BodySubstituterStep.cs b/external/linker/src/linker/Linker.Steps/BodySubstituterStep.cs
new file mode 100644
index 0000000000..f594999863
--- /dev/null
+++ b/external/linker/src/linker/Linker.Steps/BodySubstituterStep.cs
@@ -0,0 +1,310 @@
+using System;
+using System.IO;
+using System.Linq;
+using System.Globalization;
+using System.Xml.XPath;
+using Mono.Cecil;
+
+namespace Mono.Linker.Steps
+{
+ public class BodySubstituterStep : BaseStep
+ {
+ protected override void Process ()
+ {
+ var files = Context.Substitutions;
+ if (files == null)
+ return;
+
+ foreach (var file in files) {
+ try {
+ ReadSubstitutionFile (GetSubstitutions (file));
+ } catch (Exception ex) when (!(ex is XmlResolutionException)) {
+ throw new XmlResolutionException ($"Failed to process XML substitution '{file}'", ex);
+ }
+
+ }
+ }
+
+ static XPathDocument GetSubstitutions (string substitutionsFile)
+ {
+ using (FileStream fs = File.OpenRead (substitutionsFile)) {
+ return GetSubstitutions (fs);
+ }
+ }
+
+ static XPathDocument GetSubstitutions (Stream substitutions)
+ {
+ using (StreamReader sr = new StreamReader (substitutions)) {
+ return new XPathDocument (sr);
+ }
+ }
+
+ void ReadSubstitutionFile (XPathDocument document)
+ {
+ XPathNavigator nav = document.CreateNavigator ();
+
+ // Initial structure check
+ if (!nav.MoveToChild ("linker", ""))
+ return;
+
+ // TODO: Add handling for feature
+
+ ProcessAssemblies (nav.SelectChildren ("assembly", ""));
+ }
+
+ void ProcessAssemblies (XPathNodeIterator iterator)
+ {
+ while (iterator.MoveNext ()) {
+ var name = GetAssemblyName (iterator.Current);
+
+ var cache = Context.Resolver.AssemblyCache;
+
+ if (!cache.TryGetValue (name.Name, out AssemblyDefinition assembly)) {
+ Context.LogMessage (MessageImportance.Low, $"Could not match assembly '{name.FullName}' for substitution");
+ continue;
+ }
+
+ ProcessAssembly (assembly, iterator);
+ }
+ }
+
+ void ProcessAssembly (AssemblyDefinition assembly, XPathNodeIterator iterator)
+ {
+ ProcessTypes (assembly, iterator.Current.SelectChildren ("type", ""));
+ }
+
+ void ProcessTypes (AssemblyDefinition assembly, XPathNodeIterator iterator)
+ {
+ while (iterator.MoveNext ()) {
+ XPathNavigator nav = iterator.Current;
+
+ string fullname = GetAttribute (nav, "fullname");
+
+ TypeDefinition type = assembly.MainModule.GetType (fullname);
+
+ if (type == null) {
+ Context.LogMessage (MessageImportance.Low, $"Could not resolve type '{fullname}' for substitution");
+ continue;
+ }
+
+ ProcessType (type, nav);
+ }
+ }
+
+ void ProcessType (TypeDefinition type, XPathNavigator nav)
+ {
+ if (!nav.HasChildren)
+ return;
+
+ XPathNodeIterator methods = nav.SelectChildren ("method", "");
+ if (methods.Count > 0)
+ ProcessMethods (type, methods);
+
+ var fields = nav.SelectChildren ("field", "");
+ if (fields.Count > 0) {
+ while (fields.MoveNext ())
+ ProcessField (type, fields);
+ }
+ }
+
+ void ProcessMethods (TypeDefinition type, XPathNodeIterator iterator)
+ {
+ while (iterator.MoveNext ())
+ ProcessMethod (type, iterator);
+ }
+
+ void ProcessMethod (TypeDefinition type, XPathNodeIterator iterator)
+ {
+ string signature = GetAttribute (iterator.Current, "signature");
+ if (string.IsNullOrEmpty (signature))
+ return;
+
+ MethodDefinition method = FindMethod (type, signature);
+ if (method == null) {
+ Context.LogMessage (MessageImportance.Normal, $"Could not find method '{signature}' for substitution");
+ return;
+ }
+
+ string action = GetAttribute (iterator.Current, "body");
+ switch (action) {
+ case "remove":
+ Annotations.SetAction (method, MethodAction.ConvertToThrow);
+ return;
+ case "stub":
+ string value = GetAttribute (iterator.Current, "value");
+ if (value != "") {
+ if (!TryConvertValue (value, method.ReturnType, out object res)) {
+ Context.LogMessage (MessageImportance.High, $"Invalid value for '{signature}' stub");
+ return;
+ }
+
+ Annotations.SetMethodStubValue (method, res);
+ }
+
+ Annotations.SetAction (method, MethodAction.ConvertToStub);
+ return;
+ default:
+ Context.LogMessage (MessageImportance.High, $"Unknown body modification '{action}' for '{signature}'");
+ return;
+ }
+ }
+
+ void ProcessField (TypeDefinition type, XPathNodeIterator iterator)
+ {
+ string name = GetAttribute (iterator.Current, "name");
+ if (string.IsNullOrEmpty (name))
+ return;
+
+ var field = type.Fields.FirstOrDefault (f => f.Name == name);
+ if (field == null) {
+ Context.LogMessage (MessageImportance.Normal, $"Could not find field '{name}' for substitution.");
+ return;
+ }
+
+ if (!field.IsStatic || field.IsLiteral) {
+ Context.LogMessage (MessageImportance.Normal, $"Substituted field '{name}' needs to be static field.");
+ return;
+ }
+
+ string value = GetAttribute (iterator.Current, "value");
+ if (string.IsNullOrEmpty (value)) {
+ Context.LogMessage (MessageImportance.High, $"Missing 'value' attribute for field '{field}'.");
+ return;
+ }
+ if (!TryConvertValue (value, field.FieldType, out object res)) {
+ Context.LogMessage (MessageImportance.High, $"Invalid value for '{field}': '{value}'.");
+ return;
+ }
+
+ Annotations.SetFieldValue (field, res);
+
+ string init = GetAttribute (iterator.Current, "initialize");
+ if (init?.ToLowerInvariant () == "true") {
+ Annotations.SetSubstitutedInit (field);
+ }
+ }
+
+ static bool TryConvertValue (string value, TypeReference target, out object result)
+ {
+ switch (target.MetadataType) {
+ case MetadataType.Boolean:
+ if (bool.TryParse (value, out bool bvalue)) {
+ result = bvalue ? 1 : 0;
+ return true;
+ }
+
+ goto case MetadataType.Int32;
+
+ case MetadataType.Byte:
+ if (!byte.TryParse (value, NumberStyles.Integer, CultureInfo.InvariantCulture, out byte byteresult))
+ break;
+
+ result = (int) byteresult;
+ return true;
+
+ case MetadataType.SByte:
+ if (!sbyte.TryParse (value, NumberStyles.Integer, CultureInfo.InvariantCulture, out sbyte sbyteresult))
+ break;
+
+ result = (int) sbyteresult;
+ return true;
+
+ case MetadataType.Int16:
+ if (!short.TryParse (value, NumberStyles.Integer, CultureInfo.InvariantCulture, out short shortresult))
+ break;
+
+ result = (int) shortresult;
+ return true;
+
+ case MetadataType.UInt16:
+ if (!ushort.TryParse (value, NumberStyles.Integer, CultureInfo.InvariantCulture, out ushort ushortresult))
+ break;
+
+ result = (int) ushortresult;
+ return true;
+
+ case MetadataType.Int32:
+ if (!int.TryParse (value, NumberStyles.Integer, CultureInfo.InvariantCulture, out int iresult))
+ break;
+
+ result = iresult;
+ return true;
+
+ case MetadataType.UInt32:
+ if (!uint.TryParse (value, NumberStyles.Integer, CultureInfo.InvariantCulture, out uint uresult))
+ break;
+
+ result = (int)uresult;
+ return true;
+
+ case MetadataType.Double:
+ if (!double.TryParse (value, NumberStyles.Float, CultureInfo.InvariantCulture, out double dresult))
+ break;
+
+ result = dresult;
+ return true;
+
+ case MetadataType.Single:
+ if (!float.TryParse (value, NumberStyles.Float, CultureInfo.InvariantCulture, out float fresult))
+ break;
+
+ result = fresult;
+ return true;
+
+ case MetadataType.Int64:
+ if (!long.TryParse (value, NumberStyles.Integer, CultureInfo.InvariantCulture, out long lresult))
+ break;
+
+ result = lresult;
+ return true;
+
+ case MetadataType.UInt64:
+ if (!ulong.TryParse (value, NumberStyles.Integer, CultureInfo.InvariantCulture, out ulong ulresult))
+ break;
+
+ result = (long)ulresult;
+ return true;
+
+ case MetadataType.Char:
+ if (!char.TryParse (value, out char chresult))
+ break;
+
+ result = (int) chresult;
+ return true;
+
+ case MetadataType.String:
+ if (value is string || value == null) {
+ result = value;
+ return true;
+ }
+
+ break;
+ }
+
+ result = null;
+ return false;
+ }
+
+ static MethodDefinition FindMethod (TypeDefinition type, string signature)
+ {
+ if (!type.HasMethods)
+ return null;
+
+ foreach (MethodDefinition meth in type.Methods)
+ if (signature == ResolveFromXmlStep.GetMethodSignature (meth, includeGenericParameters: true))
+ return meth;
+
+ return null;
+ }
+
+ static AssemblyNameReference GetAssemblyName (XPathNavigator nav)
+ {
+ return AssemblyNameReference.Parse (GetAttribute (nav, "fullname"));
+ }
+
+ static string GetAttribute (XPathNavigator nav, string attribute)
+ {
+ return nav.GetAttribute (attribute, "");
+ }
+ }
+}
diff --git a/external/linker/src/linker/Linker.Steps/CodeRewriterStep.cs b/external/linker/src/linker/Linker.Steps/CodeRewriterStep.cs
index 5a94f7f13a..422edf460c 100644
--- a/external/linker/src/linker/Linker.Steps/CodeRewriterStep.cs
+++ b/external/linker/src/linker/Linker.Steps/CodeRewriterStep.cs
@@ -1,4 +1,5 @@
using System;
+using System.Diagnostics;
using System.Linq;
using Mono.Cecil;
using Mono.Cecil.Cil;
@@ -26,10 +27,65 @@ namespace Mono.Linker.Steps {
ProcessMethod (method);
}
+ if (type.HasFields && Annotations.HasSubstitutedInit (type)) {
+ AddFieldsInitializations (type);
+ }
+
foreach (var nested in type.NestedTypes)
ProcessType (nested);
}
+ void AddFieldsInitializations (TypeDefinition type)
+ {
+ Instruction ret;
+ ILProcessor processor;
+
+ var cctor = type.Methods.FirstOrDefault (MethodDefinitionExtensions.IsStaticConstructor);
+ if (cctor == null) {
+ type.Attributes |= TypeAttributes.BeforeFieldInit;
+
+ var method = new MethodDefinition (".cctor",
+ MethodAttributes.Static | MethodAttributes.Private | MethodAttributes.SpecialName | MethodAttributes.RTSpecialName | MethodAttributes.HideBySig,
+ assembly.MainModule.TypeSystem.Void);
+
+ type.Methods.Add (method);
+
+ processor = method.Body.GetILProcessor ();
+ ret = Instruction.Create (OpCodes.Ret);
+ processor.Append (ret);
+ } else {
+ ret = cctor.Body.Instructions.Last (l => l.OpCode.Code == Code.Ret);
+ var body = cctor.Body;
+ processor = cctor.Body.GetILProcessor ();
+
+ for (int i = 0; i < body.Instructions.Count; ++i) {
+ var instr = body.Instructions [i];
+ if (instr.OpCode.Code != Code.Stsfld)
+ continue;
+
+ var field = (FieldReference)instr.Operand;
+ if (!Annotations.HasSubstitutedInit (field.Resolve ()))
+ continue;
+
+ processor.Replace (instr, Instruction.Create (OpCodes.Pop));
+ }
+ }
+
+ foreach (var field in type.Fields) {
+ if (!Annotations.HasSubstitutedInit (field))
+ continue;
+
+ Context.Annotations.TryGetFieldUserValue (field, out object value);
+
+ var valueInstr = CreateConstantResultInstruction (field.FieldType, value);
+ if (valueInstr == null)
+ throw new NotImplementedException (field.FieldType.ToString ());
+
+ processor.InsertBefore (ret, valueInstr);
+ processor.InsertBefore (ret, Instruction.Create (OpCodes.Stsfld, field));
+ }
+ }
+
void ProcessMethod (MethodDefinition method)
{
switch (Annotations.GetAction (method)) {
@@ -39,9 +95,6 @@ namespace Mono.Linker.Steps {
case MethodAction.ConvertToThrow:
RewriteBodyToLinkedAway (method);
break;
- case MethodAction.ConvertToFalse:
- RewriteBodyToFalse (method);
- break;
}
}
@@ -65,28 +118,28 @@ namespace Mono.Linker.Steps {
method.ClearDebugInformation();
}
- protected virtual void RewriteBodyToFalse (MethodDefinition method)
- {
- if (!method.IsIL)
- throw new NotImplementedException ();
-
- method.Body = CreateReturnFalseBody (method);
-
- method.ClearDebugInformation();
- }
-
MethodBody CreateThrowLinkedAwayBody (MethodDefinition method)
{
var body = new MethodBody (method);
var il = body.GetILProcessor ();
+ MethodReference ctor;
+
+ // Makes the body verifiable
+ if (method.IsConstructor && !method.DeclaringType.IsValueType) {
+ ctor = assembly.MainModule.ImportReference (Context.MarkedKnownMembers.ObjectCtor);
+
+ il.Emit (OpCodes.Ldarg_0);
+ il.Emit (OpCodes.Call, ctor);
+ }
// import the method into the current assembly
- MethodReference ctor = Context.MarkedKnownMembers.NotSupportedExceptionCtorString;
+ ctor = Context.MarkedKnownMembers.NotSupportedExceptionCtorString;
ctor = assembly.MainModule.ImportReference (ctor);
il.Emit (OpCodes.Ldstr, "Linked away");
il.Emit (OpCodes.Newobj, ctor);
il.Emit (OpCodes.Throw);
+
return body;
}
@@ -98,8 +151,11 @@ namespace Mono.Linker.Steps {
throw new NotImplementedException ();
var il = body.GetILProcessor ();
- if (method.IsInstanceConstructor ()) {
+ if (method.IsInstanceConstructor () && !method.DeclaringType.IsValueType) {
var base_ctor = method.DeclaringType.BaseType.GetDefaultInstanceConstructor();
+ if (base_ctor == null)
+ throw new NotSupportedException ($"Cannot replace constructor for '{method.DeclaringType}' when no base default constructor exists");
+
base_ctor = assembly.MainModule.ImportReference (base_ctor);
il.Emit (OpCodes.Ldarg_0);
@@ -109,27 +165,114 @@ namespace Mono.Linker.Steps {
switch (method.ReturnType.MetadataType) {
case MetadataType.Void:
break;
- case MetadataType.Boolean:
- il.Emit (OpCodes.Ldc_I4_0);
- break;
default:
- throw new NotImplementedException (method.ReturnType.FullName);
+ var instruction = CreateConstantResultInstruction (Context, method);
+ if (instruction != null) {
+ il.Append (instruction);
+ } else {
+ StubComplexBody (method, body, il);
+ }
+ break;
}
il.Emit (OpCodes.Ret);
return body;
}
- MethodBody CreateReturnFalseBody (MethodDefinition method)
+ static void StubComplexBody (MethodDefinition method, MethodBody body, ILProcessor il)
{
- if (method.ReturnType.MetadataType != MetadataType.Boolean)
- throw new NotImplementedException ();
+ switch (method.ReturnType.MetadataType) {
+ case MetadataType.MVar:
+ case MetadataType.ValueType:
+ var vd = new VariableDefinition (method.ReturnType);
+ body.Variables.Add (vd);
+ body.InitLocals = true;
- var body = new MethodBody (method);
- var il = body.GetILProcessor ();
- il.Emit (OpCodes.Ldc_I4_0);
- il.Emit (OpCodes.Ret);
- return body;
+ il.Emit (OpCodes.Ldloca_S, vd);
+ il.Emit (OpCodes.Initobj, method.ReturnType);
+ il.Emit (OpCodes.Ldloc_0);
+ return;
+ case MetadataType.Pointer:
+ case MetadataType.IntPtr:
+ case MetadataType.UIntPtr:
+ il.Emit (OpCodes.Ldc_I4_0);
+ il.Emit (OpCodes.Conv_I);
+ return;
+ }
+
+ throw new NotImplementedException (method.FullName);
+ }
+
+ public static Instruction CreateConstantResultInstruction (LinkContext context, MethodDefinition method)
+ {
+ context.Annotations.TryGetMethodStubValue (method, out object value);
+ return CreateConstantResultInstruction (method.ReturnType, value);
+ }
+
+ public static Instruction CreateConstantResultInstruction (TypeReference rtype, object value = null)
+ {
+ switch (rtype.MetadataType) {
+ case MetadataType.ValueType:
+ var definition = rtype.Resolve ();
+ if (definition?.IsEnum == true) {
+ rtype = definition.GetEnumUnderlyingType ();
+ }
+
+ break;
+ case MetadataType.GenericInstance:
+ rtype = rtype.Resolve ();
+ break;
+ }
+
+ switch (rtype.MetadataType) {
+ case MetadataType.Boolean:
+ if (value is int bintValue && bintValue == 1)
+ return Instruction.Create (OpCodes.Ldc_I4_1);
+
+ return Instruction.Create (OpCodes.Ldc_I4_0);
+
+ case MetadataType.String:
+ if (value is string svalue)
+ return Instruction.Create (OpCodes.Ldstr, svalue);
+
+ return Instruction.Create (OpCodes.Ldnull);
+
+ case MetadataType.Object:
+ case MetadataType.Array:
+ case MetadataType.Class:
+ Debug.Assert (value == null);
+ return Instruction.Create (OpCodes.Ldnull);
+
+ case MetadataType.Double:
+ if (value is double dvalue)
+ return Instruction.Create (OpCodes.Ldc_R8, dvalue);
+
+ return Instruction.Create (OpCodes.Ldc_R8, 0.0);
+
+ case MetadataType.Single:
+ if (value is float fvalue)
+ return Instruction.Create (OpCodes.Ldc_R4, fvalue);
+
+ return Instruction.Create (OpCodes.Ldc_R4, 0.0f);
+
+ case MetadataType.Char:
+ case MetadataType.Byte:
+ case MetadataType.SByte:
+ case MetadataType.Int16:
+ case MetadataType.UInt16:
+ case MetadataType.Int32:
+ case MetadataType.UInt32:
+ if (value is int intValue)
+ return Instruction.Create (OpCodes.Ldc_I4, intValue);
+
+ return Instruction.Create (OpCodes.Ldc_I4_0);
+
+ case MetadataType.UInt64:
+ case MetadataType.Int64:
+ return Instruction.Create (OpCodes.Ldc_I8, 0L);
+ }
+
+ return null;
}
}
}
diff --git a/external/linker/src/linker/Linker.Steps/MarkStep.cs b/external/linker/src/linker/Linker.Steps/MarkStep.cs
deleted file mode 100644
index 67418a0949..0000000000
--- a/external/linker/src/linker/Linker.Steps/MarkStep.cs
+++ /dev/null
@@ -1,3229 +0,0 @@
-//
-// MarkStep.cs
-//
-// Author:
-// Jb Evain (jbevain@gmail.com)
-//
-// (C) 2006 Jb Evain
-// (C) 2007 Novell, Inc.
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text.RegularExpressions;
-
-using Mono.Cecil;
-using Mono.Cecil.Cil;
-using Mono.Collections.Generic;
-
-namespace Mono.Linker.Steps {
-
- public partial class MarkStep : IStep {
-
- protected LinkContext _context;
- protected Queue _methods;
- protected List _virtual_methods;
- protected Queue _assemblyLevelAttributes;
- protected Queue _lateMarkedAttributes;
- protected List _typesWithInterfaces;
- protected List _unreachableBodies;
-
- public AnnotationStore Annotations {
- get { return _context.Annotations; }
- }
-
- public Tracer Tracer {
- get { return _context.Tracer; }
- }
-
- private MarkingHelpers MarkingHelpers => _context.MarkingHelpers;
-
- public MarkStep ()
- {
- _methods = new Queue ();
- _virtual_methods = new List ();
- _assemblyLevelAttributes = new Queue ();
- _lateMarkedAttributes = new Queue ();
- _typesWithInterfaces = new List ();
- _unreachableBodies = new List ();
- }
-
- public virtual void Process (LinkContext context)
- {
- _context = context;
-
- Initialize ();
- Process ();
- Complete ();
- }
-
- void Initialize ()
- {
- foreach (AssemblyDefinition assembly in _context.GetAssemblies ())
- InitializeAssembly (assembly);
- }
-
- protected virtual void InitializeAssembly (AssemblyDefinition assembly)
- {
- Tracer.Push (assembly);
- try {
- MarkAssembly (assembly);
-
- foreach (TypeDefinition type in assembly.MainModule.Types)
- InitializeType (type);
- } finally {
- Tracer.Pop ();
- }
- }
-
- void Complete ()
- {
- foreach (var body in _unreachableBodies) {
- Annotations.SetAction (body.Method, MethodAction.ConvertToThrow);
- }
- }
-
- void InitializeType (TypeDefinition type)
- {
- if (type.HasNestedTypes) {
- foreach (var nested in type.NestedTypes)
- InitializeType (nested);
- }
-
- if (!Annotations.IsMarked (type))
- return;
-
- MarkType (type);
-
- if (type.HasFields)
- InitializeFields (type);
- if (type.HasMethods)
- InitializeMethods (type.Methods);
- }
-
- protected bool IsFullyPreserved (TypeDefinition type)
- {
- if (Annotations.TryGetPreserve (type, out TypePreserve preserve) && preserve == TypePreserve.All)
- return true;
-
- switch (Annotations.GetAction (type.Module.Assembly)) {
- case AssemblyAction.Save:
- case AssemblyAction.Copy:
- case AssemblyAction.CopyUsed:
- case AssemblyAction.AddBypassNGen:
- case AssemblyAction.AddBypassNGenUsed:
- return true;
- }
-
- return false;
- }
-
- void InitializeFields (TypeDefinition type)
- {
- foreach (FieldDefinition field in type.Fields)
- if (Annotations.IsMarked (field))
- MarkField (field);
- }
-
- void InitializeMethods (Collection methods)
- {
- foreach (MethodDefinition method in methods)
- if (Annotations.IsMarked (method))
- EnqueueMethod (method);
- }
-
- void Process ()
- {
- if (QueueIsEmpty ())
- throw new InvalidOperationException ("No entry methods");
-
- while (ProcessPrimaryQueue () || ProcessLazyAttributes () || ProcessLateMarkedAttributes ())
-
- // deal with [TypeForwardedTo] pseudo-attributes
- foreach (AssemblyDefinition assembly in _context.GetAssemblies ()) {
- if (!assembly.MainModule.HasExportedTypes)
- continue;
-
- foreach (var exported in assembly.MainModule.ExportedTypes) {
- bool isForwarder = exported.IsForwarder;
- var declaringType = exported.DeclaringType;
- while (!isForwarder && (declaringType != null)) {
- isForwarder = declaringType.IsForwarder;
- declaringType = declaringType.DeclaringType;
- }
-
- if (!isForwarder)
- continue;
- TypeDefinition type = exported.Resolve ();
- if (type == null)
- continue;
- if (!Annotations.IsMarked (type))
- continue;
- Tracer.Push (type);
- try {
- MarkingHelpers.MarkExportedType (exported, assembly.MainModule);
- } finally {
- Tracer.Pop ();
- }
- }
- }
- }
-
- bool ProcessPrimaryQueue ()
- {
- if (QueueIsEmpty ())
- return false;
-
- while (!QueueIsEmpty ()) {
- ProcessQueue ();
- ProcessVirtualMethods ();
- ProcessMarkedTypesWithInterfaces ();
- ProcessPendingBodies ();
- DoAdditionalProcessing ();
- }
-
- return true;
- }
-
- void ProcessQueue ()
- {
- while (!QueueIsEmpty ()) {
- MethodDefinition method = _methods.Dequeue ();
- Tracer.Push (method);
- try {
- ProcessMethod (method);
- } catch (Exception e) {
- throw new MarkException (string.Format ("Error processing method: '{0}' in assembly: '{1}'", method.FullName, method.Module.Name), e, method);
- } finally {
- Tracer.Pop ();
- }
- }
- }
-
- bool QueueIsEmpty ()
- {
- return _methods.Count == 0;
- }
-
- protected virtual void EnqueueMethod (MethodDefinition method)
- {
- _methods.Enqueue (method);
- }
-
- void ProcessVirtualMethods ()
- {
- foreach (MethodDefinition method in _virtual_methods) {
- Tracer.Push (method);
- ProcessVirtualMethod (method);
- Tracer.Pop ();
- }
- }
-
- void ProcessMarkedTypesWithInterfaces ()
- {
- // We may mark an interface type later on. Which means we need to reprocess any time with one or more interface implementations that have not been marked
- // and if an interface type is found to be marked and implementation is not marked, then we need to mark that implementation
-
- // copy the data to avoid modified while enumerating error potential, which can happen under certain conditions.
- var typesWithInterfaces = _typesWithInterfaces.ToArray ();
-
- foreach (var type in typesWithInterfaces) {
- // Exception, types that have not been flagged as instantiated yet. These types may not need their interfaces even if the
- // interface type is marked
- if (!Annotations.IsInstantiated (type))
- continue;
-
- MarkInterfaceImplementations (type);
- }
- }
-
- void ProcessPendingBodies ()
- {
- for (int i = 0; i < _unreachableBodies.Count; i++) {
- var body = _unreachableBodies [i];
- if (Annotations.IsInstantiated (body.Method.DeclaringType)) {
- MarkMethodBody (body);
- _unreachableBodies.RemoveAt (i--);
- }
- }
- }
-
- void ProcessVirtualMethod (MethodDefinition method)
- {
- var overrides = Annotations.GetOverrides (method);
- if (overrides == null)
- return;
-
- foreach (OverrideInformation @override in overrides)
- ProcessOverride (@override);
- }
-
- void ProcessOverride (OverrideInformation overrideInformation)
- {
- var method = overrideInformation.Override;
- var @base = overrideInformation.Base;
- if (!Annotations.IsMarked (method.DeclaringType))
- return;
-
- if (Annotations.IsProcessed (method))
- return;
-
- if (Annotations.IsMarked (method))
- return;
-
- var isInstantiated = Annotations.IsInstantiated (method.DeclaringType);
-
- // We don't need to mark overrides until it is possible that the type could be instantiated
- // Note : The base type is interface check should be removed once we have base type sweeping
- if (IsInterfaceOverrideThatDoesNotNeedMarked (overrideInformation, isInstantiated))
- return;
-
- if (!isInstantiated && !@base.IsAbstract && _context.IsOptimizationEnabled (CodeOptimizations.OverrideRemoval))
- return;
-
- MarkMethod (method);
- ProcessVirtualMethod (method);
- }
-
- bool IsInterfaceOverrideThatDoesNotNeedMarked (OverrideInformation overrideInformation, bool isInstantiated)
- {
- if (!overrideInformation.IsOverrideOfInterfaceMember || isInstantiated)
- return false;
-
- if (overrideInformation.MatchingInterfaceImplementation != null)
- return !Annotations.IsMarked (overrideInformation.MatchingInterfaceImplementation);
-
- var interfaceType = overrideInformation.InterfaceType;
- var overrideDeclaringType = overrideInformation.Override.DeclaringType;
-
- if (!IsInterfaceImplementationMarked (overrideDeclaringType, interfaceType)) {
- var derivedInterfaceTypes = Annotations.GetDerivedInterfacesForInterface (interfaceType);
-
- // There are no derived interface types that could be marked, it's safe to skip marking this override
- if (derivedInterfaceTypes == null)
- return true;
-
- // If none of the other interfaces on the type that implement the interface from the @base type are marked, then it's safe to skip
- // marking this override
- if (!derivedInterfaceTypes.Any (d => IsInterfaceImplementationMarked (overrideDeclaringType, d)))
- return true;
- }
-
- return false;
- }
-
- bool IsInterfaceImplementationMarked (TypeDefinition type, TypeDefinition interfaceType)
- {
- return type.HasInterface (@interfaceType, out InterfaceImplementation implementation) && Annotations.IsMarked (implementation);
- }
-
- void MarkMarshalSpec (IMarshalInfoProvider spec)
- {
- if (!spec.HasMarshalInfo)
- return;
-
- var marshaler = spec.MarshalInfo as CustomMarshalInfo;
- if (marshaler == null)
- return;
-
- MarkType (marshaler.ManagedType);
- }
-
- void MarkCustomAttributes (ICustomAttributeProvider provider)
- {
- if (!provider.HasCustomAttributes)
- return;
-
- Tracer.Push (provider);
- try {
- foreach (CustomAttribute ca in provider.CustomAttributes) {
- if (IsUserDependencyMarker (ca.AttributeType) && provider is MemberReference mr) {
- MarkUserDependency (mr, ca);
-
- if (_context.KeepDependencyAttributes) {
- MarkCustomAttribute (ca);
- continue;
- }
-
- if (Annotations.GetAction (mr.DeclaringType.Module.Assembly) == AssemblyAction.Link)
- continue;
- }
-
- if (_context.KeepUsedAttributeTypesOnly) {
- _lateMarkedAttributes.Enqueue (new AttributeProviderPair (ca, provider));
- continue;
- }
-
- if (!ShouldMarkCustomAttribute (ca, provider))
- continue;
-
- MarkCustomAttribute (ca);
- MarkSpecialCustomAttributeDependencies (ca);
- }
- } finally {
- Tracer.Pop ();
- }
- }
-
- protected virtual bool IsUserDependencyMarker (TypeReference type)
- {
- return PreserveDependencyLookupStep.IsPreserveDependencyAttribute (type);
- }
-
- protected virtual void MarkUserDependency (MemberReference context, CustomAttribute ca)
- {
- if (ca.HasProperties && ca.Properties [0].Name == "Condition") {
- var condition = ca.Properties [0].Argument.Value as string;
- switch (condition) {
- case "":
- case null:
- break;
- case "DEBUG":
- if (!_context.KeepMembersForDebugger)
- return;
-
- break;
- default:
- // Don't have yet a way to match the general condition so everything is excluded
- return;
- }
- }
-
- AssemblyDefinition assembly;
- var args = ca.ConstructorArguments;
- if (args.Count >= 3 && args [2].Value is string assemblyName) {
- if (!_context.Resolver.AssemblyCache.TryGetValue (assemblyName, out assembly)) {
- _context.Logger.LogMessage (MessageImportance.Low, $"Could not resolve '{assemblyName}' assembly dependency");
- return;
- }
- } else {
- assembly = null;
- }
-
- TypeDefinition td = null;
- if (args.Count >= 2 && args [1].Value is string typeName) {
- td = FindType (assembly ?? context.Module.Assembly, typeName);
-
- if (td == null) {
- _context.Logger.LogMessage (MessageImportance.Low, $"Could not resolve '{typeName}' type dependency");
- return;
- }
- } else {
- td = context.DeclaringType.Resolve ();
- }
-
- string member = null;
- string[] signature = null;
- if (args.Count >= 1 && args [0].Value is string memberSignature) {
- memberSignature = memberSignature.Replace (" ", "");
- var sign_start = memberSignature.IndexOf ('(');
- var sign_end = memberSignature.LastIndexOf (')');
- if (sign_start > 0 && sign_end > sign_start) {
- var parameters = memberSignature.Substring (sign_start + 1, sign_end - sign_start - 1);
- signature = string.IsNullOrEmpty (parameters) ? Array.Empty () : parameters.Split (',');
- member = memberSignature.Substring (0, sign_start);
- } else {
- member = memberSignature;
- }
- }
-
- if (MarkDependencyMethod (td, member, signature))
- return;
-
- if (MarkDependencyField (td, member))
- return;
-
- _context.Logger.LogMessage (MessageImportance.High, $"Could not resolve dependency member '{member}' declared in type '{td.FullName}'");
- }
-
- static TypeDefinition FindType (AssemblyDefinition assembly, string fullName)
- {
- fullName = fullName.ToCecilName ();
-
- var type = assembly.MainModule.GetType (fullName);
- return type?.Resolve ();
- }
-
- bool MarkDependencyMethod (TypeDefinition type, string name, string[] signature)
- {
- bool marked = false;
- int arity;
-
- int arity_marker = name.IndexOf ('`');
- if (arity_marker < 1 || !int.TryParse (name.Substring (arity_marker + 1), out arity)) {
- arity = 0;
- } else {
- name = name.Substring (0, arity_marker);
- }
-
- foreach (var m in type.Methods) {
- if (m.Name != name)
- continue;
-
- if (m.GenericParameters.Count != arity)
- continue;
-
- if (signature == null) {
- MarkIndirectlyCalledMethod (m);
- marked = true;
- continue;
- }
-
- var mp = m.Parameters;
- if (mp.Count != signature.Length)
- continue;
-
- int i = 0;
- for (; i < signature.Length; ++i) {
- if (mp [i].ParameterType.FullName != signature [i].Trim ().ToCecilName ()) {
- i = -1;
- break;
- }
- }
-
- if (i < 0)
- continue;
-
- MarkIndirectlyCalledMethod (m);
- marked = true;
- }
-
- return marked;
- }
-
- bool MarkDependencyField (TypeDefinition type, string name)
- {
- foreach (var f in type.Fields) {
- if (f.Name == name) {
- MarkField (f);
- return true;
- }
- }
-
- return false;
- }
-
- void LazyMarkCustomAttributes (ICustomAttributeProvider provider, AssemblyDefinition assembly)
- {
- if (!provider.HasCustomAttributes)
- return;
-
- foreach (CustomAttribute ca in provider.CustomAttributes)
- _assemblyLevelAttributes.Enqueue (new AttributeProviderPair (ca, assembly));
- }
-
- protected virtual void MarkCustomAttribute (CustomAttribute ca)
- {
- Tracer.Push ((object)ca.AttributeType ?? (object)ca);
- try {
- Annotations.Mark (ca);
- MarkMethod (ca.Constructor);
-
- MarkCustomAttributeArguments (ca);
-
- TypeReference constructor_type = ca.Constructor.DeclaringType;
- TypeDefinition type = constructor_type.Resolve ();
-
- if (type == null) {
- HandleUnresolvedType (constructor_type);
- return;
- }
-
- MarkCustomAttributeProperties (ca, type);
- MarkCustomAttributeFields (ca, type);
- } finally {
- Tracer.Pop ();
- }
- }
-
- protected virtual bool ShouldMarkCustomAttribute (CustomAttribute ca, ICustomAttributeProvider provider)
- {
- var attr_type = ca.AttributeType;
-
- if (_context.KeepUsedAttributeTypesOnly) {
- switch (attr_type.FullName) {
- // [ThreadStatic] and [ContextStatic] are required by the runtime
- case "System.ThreadStaticAttribute":
- case "System.ContextStaticAttribute":
- return true;
- // Attributes related to `fixed` keyword used to declare fixed length arrays
- case "System.Runtime.CompilerServices.FixedBufferAttribute":
- return true;
- case "System.Runtime.InteropServices.InterfaceTypeAttribute":
- case "System.Runtime.InteropServices.GuidAttribute":
- return true;
- }
-
- if (!Annotations.IsMarked (attr_type.Resolve ()))
- return false;
- }
-
- return true;
- }
-
- protected virtual bool ShouldMarkTypeStaticConstructor (TypeDefinition type)
- {
- if (Annotations.HasPreservedStaticCtor (type))
- return false;
-
- if (type.IsBeforeFieldInit && _context.IsOptimizationEnabled (CodeOptimizations.BeforeFieldInit))
- return false;
-
- return true;
- }
-
- protected void MarkStaticConstructor (TypeDefinition type)
- {
- if (MarkMethodIf (type.Methods, IsNonEmptyStaticConstructor) != null)
- Annotations.SetPreservedStaticCtor (type);
- }
-
- protected virtual bool ShouldMarkTopLevelCustomAttribute (AttributeProviderPair app, MethodDefinition resolvedConstructor)
- {
- var ca = app.Attribute;
-
- if (!ShouldMarkCustomAttribute (app.Attribute, app.Provider))
- return false;
-
- // If an attribute's module has not been marked after processing all types in all assemblies and the attribute itself has not been marked,
- // then surely nothing is using this attribute and there is no need to mark it
- if (!Annotations.IsMarked (resolvedConstructor.Module) && !Annotations.IsMarked (ca.AttributeType))
- return false;
-
- if (ca.Constructor.DeclaringType.Namespace == "System.Diagnostics") {
- string attributeName = ca.Constructor.DeclaringType.Name;
- if (attributeName == "DebuggerDisplayAttribute" || attributeName == "DebuggerTypeProxyAttribute") {
- var displayTargetType = GetDebuggerAttributeTargetType (app.Attribute, (AssemblyDefinition) app.Provider);
- if (displayTargetType == null || !Annotations.IsMarked (displayTargetType))
- return false;
- }
- }
-
- return true;
- }
-
- protected void MarkSecurityDeclarations (ISecurityDeclarationProvider provider)
- {
- // most security declarations are removed (if linked) but user code might still have some
- // and if the attributes references types then they need to be marked too
- if ((provider == null) || !provider.HasSecurityDeclarations)
- return;
-
- foreach (var sd in provider.SecurityDeclarations)
- MarkSecurityDeclaration (sd);
- }
-
- protected virtual void MarkSecurityDeclaration (SecurityDeclaration sd)
- {
- if (!sd.HasSecurityAttributes)
- return;
-
- foreach (var sa in sd.SecurityAttributes)
- MarkSecurityAttribute (sa);
- }
-
- protected virtual void MarkSecurityAttribute (SecurityAttribute sa)
- {
- TypeReference security_type = sa.AttributeType;
- TypeDefinition type = security_type.Resolve ();
- if (type == null) {
- HandleUnresolvedType (security_type);
- return;
- }
-
- MarkType (security_type);
- MarkSecurityAttributeProperties (sa, type);
- MarkSecurityAttributeFields (sa, type);
- }
-
- protected void MarkSecurityAttributeProperties (SecurityAttribute sa, TypeDefinition attribute)
- {
- if (!sa.HasProperties)
- return;
-
- foreach (var named_argument in sa.Properties)
- MarkCustomAttributeProperty (named_argument, attribute);
- }
-
- protected void MarkSecurityAttributeFields (SecurityAttribute sa, TypeDefinition attribute)
- {
- if (!sa.HasFields)
- return;
-
- foreach (var named_argument in sa.Fields)
- MarkCustomAttributeField (named_argument, attribute);
- }
-
- protected void MarkCustomAttributeProperties (CustomAttribute ca, TypeDefinition attribute)
- {
- if (!ca.HasProperties)
- return;
-
- foreach (var named_argument in ca.Properties)
- MarkCustomAttributeProperty (named_argument, attribute);
- }
-
- protected void MarkCustomAttributeProperty (CustomAttributeNamedArgument namedArgument, TypeDefinition attribute)
- {
- PropertyDefinition property = GetProperty (attribute, namedArgument.Name);
- Tracer.Push (property);
- if (property != null)
- MarkMethod (property.SetMethod);
-
- MarkCustomAttributeArgument (namedArgument.Argument);
- Tracer.Pop ();
- }
-
- PropertyDefinition GetProperty (TypeDefinition type, string propertyname)
- {
- while (type != null) {
- PropertyDefinition property = type.Properties.FirstOrDefault (p => p.Name == propertyname);
- if (property != null)
- return property;
-
- type = type.BaseType != null ? ResolveTypeDefinition (type.BaseType) : null;
- }
-
- return null;
- }
-
- protected void MarkCustomAttributeFields (CustomAttribute ca, TypeDefinition attribute)
- {
- if (!ca.HasFields)
- return;
-
- foreach (var named_argument in ca.Fields)
- MarkCustomAttributeField (named_argument, attribute);
- }
-
- protected void MarkCustomAttributeField (CustomAttributeNamedArgument namedArgument, TypeDefinition attribute)
- {
- FieldDefinition field = GetField (attribute, namedArgument.Name);
- if (field != null)
- MarkField (field);
-
- MarkCustomAttributeArgument (namedArgument.Argument);
- }
-
- FieldDefinition GetField (TypeDefinition type, string fieldname)
- {
- while (type != null) {
- FieldDefinition field = type.Fields.FirstOrDefault (f => f.Name == fieldname);
- if (field != null)
- return field;
-
- type = type.BaseType != null ? ResolveTypeDefinition (type.BaseType) : null;
- }
-
- return null;
- }
-
- MethodDefinition GetMethodWithNoParameters (TypeDefinition type, string methodname)
- {
- while (type != null) {
- MethodDefinition method = type.Methods.FirstOrDefault (m => m.Name == methodname && !m.HasParameters);
- if (method != null)
- return method;
-
- type = type.BaseType != null ? ResolveTypeDefinition (type.BaseType) : null;
- }
-
- return null;
- }
-
- void MarkCustomAttributeArguments (CustomAttribute ca)
- {
- if (!ca.HasConstructorArguments)
- return;
-
- foreach (var argument in ca.ConstructorArguments)
- MarkCustomAttributeArgument (argument);
- }
-
- void MarkCustomAttributeArgument (CustomAttributeArgument argument)
- {
- var at = argument.Type;
-
- if (at.IsArray) {
- var et = at.GetElementType ();
-
- MarkType (et);
- if (argument.Value == null)
- return;
-
- foreach (var caa in (CustomAttributeArgument [])argument.Value)
- MarkCustomAttributeArgument (caa);
-
- return;
- }
-
- if (at.Namespace == "System") {
- switch (at.Name) {
- case "Type":
- MarkType (argument.Type);
- MarkType ((TypeReference)argument.Value);
- return;
-
- case "Object":
- var boxed_value = (CustomAttributeArgument)argument.Value;
- MarkType (boxed_value.Type);
- MarkCustomAttributeArgument (boxed_value);
- return;
- }
- }
- }
-
- protected bool CheckProcessed (IMetadataTokenProvider provider)
- {
- if (Annotations.IsProcessed (provider))
- return true;
-
- Annotations.Processed (provider);
- return false;
- }
-
- protected void MarkAssembly (AssemblyDefinition assembly)
- {
- if (CheckProcessed (assembly))
- return;
-
- ProcessModule (assembly);
-
- MarkAssemblyCustomAttributes (assembly);
-
- MarkSecurityDeclarations (assembly);
-
- foreach (ModuleDefinition module in assembly.Modules)
- LazyMarkCustomAttributes (module, assembly);
- }
-
- void ProcessModule (AssemblyDefinition assembly)
- {
- // Pre-mark if there is any methods as they need to be executed
- // at assembly load time
- foreach (TypeDefinition type in assembly.MainModule.Types)
- {
- if (type.Name == "" && type.HasMethods)
- {
- MarkType (type);
- break;
- }
- }
- }
-
- bool ProcessLazyAttributes ()
- {
- if (Annotations.HasMarkedAnyIndirectlyCalledMethods () && MarkDisablePrivateReflectionAttribute ())
- return true;
-
- var startingQueueCount = _assemblyLevelAttributes.Count;
- if (startingQueueCount == 0)
- return false;
-
- var skippedItems = new List ();
- var markOccurred = false;
-
- while (_assemblyLevelAttributes.Count != 0) {
- var assemblyLevelAttribute = _assemblyLevelAttributes.Dequeue ();
- var customAttribute = assemblyLevelAttribute.Attribute;
-
- var resolved = customAttribute.Constructor.Resolve ();
- if (resolved == null) {
- HandleUnresolvedMethod (customAttribute.Constructor);
- continue;
- }
-
- if (!ShouldMarkTopLevelCustomAttribute (assemblyLevelAttribute, resolved)) {
- skippedItems.Add (assemblyLevelAttribute);
- continue;
- }
-
- string attributeFullName = customAttribute.Constructor.DeclaringType.FullName;
- switch (attributeFullName) {
- case "System.Diagnostics.DebuggerDisplayAttribute":
- MarkTypeWithDebuggerDisplayAttribute (GetDebuggerAttributeTargetType (assemblyLevelAttribute.Attribute, (AssemblyDefinition) assemblyLevelAttribute.Provider), customAttribute);
- break;
- case "System.Diagnostics.DebuggerTypeProxyAttribute":
- MarkTypeWithDebuggerTypeProxyAttribute (GetDebuggerAttributeTargetType (assemblyLevelAttribute.Attribute, (AssemblyDefinition) assemblyLevelAttribute.Provider), customAttribute);
- break;
- }
-
- markOccurred = true;
- MarkCustomAttribute (customAttribute);
- }
-
- // requeue the items we skipped in case we need to make another pass
- foreach (var item in skippedItems)
- _assemblyLevelAttributes.Enqueue (item);
-
- return markOccurred;
- }
-
- bool ProcessLateMarkedAttributes ()
- {
- var startingQueueCount = _lateMarkedAttributes.Count;
- if (startingQueueCount == 0)
- return false;
-
- var skippedItems = new List ();
- var markOccurred = false;
-
- while (_lateMarkedAttributes.Count != 0) {
- var attributeProviderPair = _lateMarkedAttributes.Dequeue ();
- var customAttribute = attributeProviderPair.Attribute;
-
- var resolved = customAttribute.Constructor.Resolve ();
- if (resolved == null) {
- HandleUnresolvedMethod (customAttribute.Constructor);
- continue;
- }
-
- if (!ShouldMarkCustomAttribute (customAttribute, attributeProviderPair.Provider)) {
- skippedItems.Add (attributeProviderPair);
- continue;
- }
-
- markOccurred = true;
- MarkCustomAttribute (customAttribute);
- MarkSpecialCustomAttributeDependencies (customAttribute);
- }
-
- // requeue the items we skipped in case we need to make another pass
- foreach (var item in skippedItems)
- _lateMarkedAttributes.Enqueue (item);
-
- return markOccurred;
- }
-
- protected void MarkField (FieldReference reference)
- {
- if (reference.DeclaringType is GenericInstanceType)
- MarkType (reference.DeclaringType);
-
- FieldDefinition field = ResolveFieldDefinition (reference);
-
- if (field == null) {
- HandleUnresolvedField (reference);
- return;
- }
-
- MarkField (field);
- }
-
- void MarkField (FieldDefinition field)
- {
- if (CheckProcessed (field))
- return;
-
- MarkType (field.DeclaringType);
- MarkType (field.FieldType);
- MarkCustomAttributes (field);
- MarkMarshalSpec (field);
- DoAdditionalFieldProcessing (field);
-
- var parent = field.DeclaringType;
- if (!Annotations.HasPreservedStaticCtor (parent))
- MarkStaticConstructor (parent);
-
- Annotations.Mark (field);
- }
-
- protected virtual bool IgnoreScope (IMetadataScope scope)
- {
- AssemblyDefinition assembly = ResolveAssembly (scope);
- return Annotations.GetAction (assembly) != AssemblyAction.Link;
- }
-
- static FieldDefinition ResolveFieldDefinition (FieldReference field)
- {
- if (field is FieldDefinition fd)
- return fd;
-
- return field.Resolve ();
- }
-
- void MarkScope (IMetadataScope scope)
- {
- var provider = scope as IMetadataTokenProvider;
- if (provider == null)
- return;
-
- Annotations.Mark (provider);
- }
-
- protected virtual void MarkSerializable (TypeDefinition type)
- {
- MarkDefaultConstructor (type);
- MarkMethodsIf (type.Methods, IsSpecialSerializationConstructor);
- }
-
- protected virtual TypeDefinition MarkType (TypeReference reference)
- {
- if (reference == null)
- return null;
-
- reference = GetOriginalType (reference);
-
- if (reference is FunctionPointerType)
- return null;
-
- if (reference is GenericParameter)
- return null;
-
-// if (IgnoreScope (reference.Scope))
-// return null;
-
- TypeDefinition type = ResolveTypeDefinition (reference);
-
- if (type == null) {
- HandleUnresolvedType (reference);
- return null;
- }
-
- if (CheckProcessed (type))
- return null;
-
- Tracer.Push (type);
-
- MarkScope (type.Scope);
- MarkType (type.BaseType);
- MarkType (type.DeclaringType);
- MarkCustomAttributes (type);
- MarkSecurityDeclarations (type);
-
- if (IsMulticastDelegate (type)) {
- MarkMulticastDelegate (type);
- }
-
- if (IsSerializable (type))
- MarkSerializable (type);
-
- if (!_context.IsFeatureExcluded ("etw") && BCL.EventTracingForWindows.IsEventSourceImplementation (type, _context)) {
- MarkEventSourceProviders (type);
- }
-
- MarkTypeSpecialCustomAttributes (type);
-
- MarkGenericParameterProvider (type);
-
- // keep fields for value-types and for classes with LayoutKind.Sequential or Explicit
- if (type.IsValueType || !type.IsAutoLayout)
- MarkFields (type, type.IsEnum);
-
- // There are a number of markings we can defer until later when we know it's possible a reference type could be instantiated
- // For example, if no instance of a type exist, then we don't need to mark the interfaces on that type
- // However, for some other types there is no benefit to deferring
- if (type.IsInterface) {
- // There's no benefit to deferring processing of an interface type until we know a type implementing that interface is marked
- MarkRequirementsForInstantiatedTypes (type);
- } else if (type.IsValueType) {
- // Note : Technically interfaces could be removed from value types in some of the same cases as reference types, however, it's harder to know when
- // a value type instance could exist. You'd have to track initobj and maybe locals types. Going to punt for now.
- MarkRequirementsForInstantiatedTypes (type);
- } else if (IsFullyPreserved (type)) {
- // Here for a couple reasons:
- // * Edge case to cover a scenario where a type has preserve all, implements interfaces, but does not have any instance ctors.
- // Normally TypePreserve.All would cause an instance ctor to be marked and that would in turn lead to MarkInterfaceImplementations being called
- // Without an instance ctor, MarkInterfaceImplementations is not called and then TypePreserve.All isn't truly respected.
- // * If an assembly has the action Copy and had ResolveFromAssemblyStep ran for the assembly, then InitializeType will have led us here
- // When the entire assembly is preserved, then all interfaces, base, etc will be preserved on the type, so we need to make sure
- // all of these types are marked. For example, if an interface implementation is of a type in another assembly that is linked,
- // and there are no other usages of that interface type, then we need to make sure the interface type is still marked because
- // this type is going to retain the interface implementation
- MarkRequirementsForInstantiatedTypes (type);
- } else if (AlwaysMarkTypeAsInstantiated (type)) {
- MarkRequirementsForInstantiatedTypes (type);
- }
-
- if (type.HasInterfaces)
- _typesWithInterfaces.Add (type);
-
- if (type.HasMethods) {
- MarkMethodsIf (type.Methods, IsVirtualNeededByTypeDueToPreservedScope);
- if (ShouldMarkTypeStaticConstructor (type))
- MarkStaticConstructor (type);
-
- MarkMethodsIf (type.Methods, HasSerializationAttribute);
- }
-
- DoAdditionalTypeProcessing (type);
-
- Tracer.Pop ();
-
- Annotations.Mark (type);
-
- ApplyPreserveInfo (type);
-
- return type;
- }
-
- // Allow subclassers to mark additional things in the main processing loop
- protected virtual void DoAdditionalProcessing ()
- {
- }
-
- // Allow subclassers to mark additional things
- protected virtual void DoAdditionalTypeProcessing (TypeDefinition type)
- {
- }
-
- // Allow subclassers to mark additional things
- protected virtual void DoAdditionalFieldProcessing (FieldDefinition field)
- {
- }
-
- // Allow subclassers to mark additional things
- protected virtual void DoAdditionalPropertyProcessing (PropertyDefinition property)
- {
- }
-
- // Allow subclassers to mark additional things
- protected virtual void DoAdditionalEventProcessing (EventDefinition evt)
- {
- }
-
- // Allow subclassers to mark additional things
- protected virtual void DoAdditionalInstantiatedTypeProcessing (TypeDefinition type)
- {
- }
-
- void MarkAssemblyCustomAttributes (AssemblyDefinition assembly)
- {
- if (!assembly.HasCustomAttributes)
- return;
-
- foreach (CustomAttribute attribute in assembly.CustomAttributes)
- _assemblyLevelAttributes.Enqueue (new AttributeProviderPair (attribute, assembly));
- }
-
- TypeDefinition GetDebuggerAttributeTargetType (CustomAttribute ca, AssemblyDefinition asm)
- {
- TypeReference targetTypeReference = null;
- foreach (var property in ca.Properties) {
- if (property.Name == "Target") {
- targetTypeReference = (TypeReference) property.Argument.Value;
- break;
- }
-
- if (property.Name == "TargetTypeName") {
- if (TypeNameParser.TryParseTypeAssemblyQualifiedName ((string) property.Argument.Value, out string typeName, out string assemblyName)) {
- if (string.IsNullOrEmpty (assemblyName))
- targetTypeReference = asm.MainModule.GetType (typeName);
- else
- targetTypeReference = _context.GetAssemblies ().FirstOrDefault (a => a.Name.Name == assemblyName)?.MainModule.GetType (typeName);
- }
- break;
- }
- }
-
- if (targetTypeReference != null)
- return ResolveTypeDefinition (targetTypeReference);
-
- return null;
- }
-
- void MarkTypeSpecialCustomAttributes (TypeDefinition type)
- {
- if (!type.HasCustomAttributes)
- return;
-
- foreach (CustomAttribute attribute in type.CustomAttributes) {
- var attrType = attribute.Constructor.DeclaringType;
- switch (attrType.Name) {
- case "XmlSchemaProviderAttribute" when attrType.Namespace == "System.Xml.Serialization":
- MarkXmlSchemaProvider (type, attribute);
- break;
- case "DebuggerDisplayAttribute" when attrType.Namespace == "System.Diagnostics":
- MarkTypeWithDebuggerDisplayAttribute (type, attribute);
- break;
- case "DebuggerTypeProxyAttribute" when attrType.Namespace == "System.Diagnostics":
- MarkTypeWithDebuggerTypeProxyAttribute (type, attribute);
- break;
- case "EventDataAttribute" when attrType.Namespace == "System.Diagnostics.Tracing":
- MarkMethodsIf (type.Methods, IsPublicInstancePropertyMethod);
- break;
- case "TypeDescriptionProviderAttribute" when attrType.Namespace == "System.ComponentModel":
- MarkTypeConverterLikeDependency (attribute, l => l.IsDefaultConstructor ());
- break;
- }
- }
- }
-
- //
- // Used for known framework attributes which can be applied to any element
- //
- bool MarkSpecialCustomAttributeDependencies (CustomAttribute ca)
- {
- var dt = ca.Constructor.DeclaringType;
- if (dt.Name == "TypeConverterAttribute" && dt.Namespace == "System.ComponentModel") {
- MarkTypeConverterLikeDependency (ca, l =>
- l.IsDefaultConstructor () ||
- l.Parameters.Count == 1 && l.Parameters [0].ParameterType.IsTypeOf ("System", "Type"));
- return true;
- }
-
- return false;
- }
-
- void MarkMethodSpecialCustomAttributes (MethodDefinition method)
- {
- if (!method.HasCustomAttributes)
- return;
-
- foreach (CustomAttribute attribute in method.CustomAttributes) {
- switch (attribute.Constructor.DeclaringType.FullName) {
- case "System.Web.Services.Protocols.SoapHeaderAttribute":
- MarkSoapHeader (method, attribute);
- break;
- }
- }
- }
-
- void MarkXmlSchemaProvider (TypeDefinition type, CustomAttribute attribute)
- {
- string method_name;
- if (!TryGetStringArgument (attribute, out method_name))
- return;
-
- MarkNamedMethod (type, method_name);
- }
-
- protected virtual void MarkTypeConverterLikeDependency (CustomAttribute attribute, Func predicate)
- {
- var args = attribute.ConstructorArguments;
- if (args.Count < 1)
- return;
-
- TypeDefinition tdef = null;
- switch (attribute.ConstructorArguments [0].Value) {
- case string s:
- tdef = ResolveFullyQualifiedTypeName (s);
- break;
- case TypeReference type:
- tdef = type.Resolve ();
- break;
- }
-
- if (tdef == null)
- return;
-
- MarkMethodsIf (tdef.Methods, predicate);
- }
-
- void MarkTypeWithDebuggerDisplayAttribute (TypeDefinition type, CustomAttribute attribute)
- {
- if (_context.KeepMembersForDebugger) {
-
- string displayString = (string) attribute.ConstructorArguments[0].Value;
-
- Regex regex = new Regex ("{[^{}]+}", RegexOptions.Compiled);
-
- foreach (Match match in regex.Matches (displayString)) {
- // Remove '{' and '}'
- string realMatch = match.Value.Substring (1, match.Value.Length - 2);
-
- // Remove ",nq" suffix if present
- // (it asks the expression evaluator to remove the quotes when displaying the final value)
- if (Regex.IsMatch(realMatch, @".+,\s*nq")) {
- realMatch = realMatch.Substring (0, realMatch.LastIndexOf (','));
- }
-
- if (realMatch.EndsWith ("()")) {
- string methodName = realMatch.Substring (0, realMatch.Length - 2);
- MethodDefinition method = GetMethodWithNoParameters (type, methodName);
- if (method != null) {
- MarkMethod (method);
- continue;
- }
- } else {
- FieldDefinition field = GetField (type, realMatch);
- if (field != null) {
- MarkField (field);
- continue;
- }
-
- PropertyDefinition property = GetProperty (type, realMatch);
- if (property != null) {
- if (property.GetMethod != null) {
- MarkMethod (property.GetMethod);
- }
- if (property.SetMethod != null) {
- MarkMethod (property.SetMethod);
- }
- continue;
- }
- }
-
- while (type != null) {
- MarkMethods (type);
- MarkFields (type, includeStatic: true);
- type = type.BaseType != null ? ResolveTypeDefinition (type.BaseType) : null;
- }
- return;
- }
- }
- }
-
- void MarkTypeWithDebuggerTypeProxyAttribute (TypeDefinition type, CustomAttribute attribute)
- {
- if (_context.KeepMembersForDebugger) {
- object constructorArgument = attribute.ConstructorArguments[0].Value;
- TypeReference proxyTypeReference = constructorArgument as TypeReference;
- if (proxyTypeReference == null) {
- string proxyTypeReferenceString = constructorArgument as string;
- if (proxyTypeReferenceString != null) {
- proxyTypeReference = type.Module.GetType (proxyTypeReferenceString, runtimeName: true);
- }
- }
-
- if (proxyTypeReference == null) {
- return;
- }
-
- MarkType (proxyTypeReference);
-
- TypeDefinition proxyType = ResolveTypeDefinition (proxyTypeReference);
- if (proxyType != null) {
- MarkMethods (proxyType);
- MarkFields (proxyType, includeStatic: true);
- }
- }
- }
-
- static bool TryGetStringArgument (CustomAttribute attribute, out string argument)
- {
- argument = null;
-
- if (attribute.ConstructorArguments.Count < 1)
- return false;
-
- argument = attribute.ConstructorArguments [0].Value as string;
-
- return argument != null;
- }
-
- protected int MarkNamedMethod (TypeDefinition type, string method_name)
- {
- if (!type.HasMethods)
- return 0;
-
- int count = 0;
- foreach (MethodDefinition method in type.Methods) {
- if (method.Name != method_name)
- continue;
-
- MarkMethod (method);
- count++;
- }
-
- return count;
- }
-
- void MarkSoapHeader (MethodDefinition method, CustomAttribute attribute)
- {
- string member_name;
- if (!TryGetStringArgument (attribute, out member_name))
- return;
-
- MarkNamedField (method.DeclaringType, member_name);
- MarkNamedProperty (method.DeclaringType, member_name);
- }
-
- void MarkNamedField (TypeDefinition type, string field_name)
- {
- if (!type.HasFields)
- return;
-
- foreach (FieldDefinition field in type.Fields) {
- if (field.Name != field_name)
- continue;
-
- MarkField (field);
- }
- }
-
- void MarkNamedProperty (TypeDefinition type, string property_name)
- {
- if (!type.HasProperties)
- return;
-
- foreach (PropertyDefinition property in type.Properties) {
- if (property.Name != property_name)
- continue;
-
- Tracer.Push (property);
- MarkMethod (property.GetMethod);
- MarkMethod (property.SetMethod);
- Tracer.Pop ();
- }
- }
-
- void MarkInterfaceImplementations (TypeDefinition type)
- {
- if (!type.HasInterfaces)
- return;
-
- foreach (var iface in type.Interfaces) {
- // Only mark interface implementations of interface types that have been marked.
- // This enables stripping of interfaces that are never used
- var resolvedInterfaceType = iface.InterfaceType.Resolve ();
- if (resolvedInterfaceType == null) {
- HandleUnresolvedType (iface.InterfaceType);
- continue;
- }
-
- if (ShouldMarkInterfaceImplementation (type, iface, resolvedInterfaceType))
- MarkInterfaceImplementation (iface);
- }
- }
-
- void MarkGenericParameterProvider (IGenericParameterProvider provider)
- {
- if (!provider.HasGenericParameters)
- return;
-
- foreach (GenericParameter parameter in provider.GenericParameters)
- MarkGenericParameter (parameter);
- }
-
- void MarkGenericParameter (GenericParameter parameter)
- {
- MarkCustomAttributes (parameter);
- if (!parameter.HasConstraints)
- return;
-
- foreach (var constraint in parameter.Constraints) {
- MarkCustomAttributes (constraint);
- MarkType (constraint.ConstraintType);
- }
- }
-
- bool IsVirtualNeededByTypeDueToPreservedScope (MethodDefinition method)
- {
- if (!method.IsVirtual)
- return false;
-
- var base_list = Annotations.GetBaseMethods (method);
- if (base_list == null)
- return false;
-
- foreach (MethodDefinition @base in base_list) {
- // Just because the type is marked does not mean we need interface methods.
- // if the type is never instantiated, interfaces will be removed
- if (@base.DeclaringType.IsInterface)
- continue;
-
- // If the type is marked, we need to keep overrides of abstract members defined in assemblies
- // that are copied. However, if the base method is virtual, then we don't need to keep the override
- // until the type could be instantiated
- if (!@base.IsAbstract)
- continue;
-
- if (IgnoreScope (@base.DeclaringType.Scope))
- return true;
-
- if (IsVirtualNeededByTypeDueToPreservedScope (@base))
- return true;
- }
-
- return false;
- }
-
- bool IsVirtualNeededByInstantiatedTypeDueToPreservedScope (MethodDefinition method)
- {
- if (!method.IsVirtual)
- return false;
-
- var base_list = Annotations.GetBaseMethods (method);
- if (base_list == null)
- return false;
-
- foreach (MethodDefinition @base in base_list) {
- if (IgnoreScope (@base.DeclaringType.Scope))
- return true;
-
- if (IsVirtualNeededByTypeDueToPreservedScope (@base))
- return true;
- }
-
- return false;
- }
-
- static bool IsSpecialSerializationConstructor (MethodDefinition method)
- {
- if (!method.IsInstanceConstructor ())
- return false;
-
- var parameters = method.Parameters;
- if (parameters.Count != 2)
- return false;
-
- return parameters [0].ParameterType.Name == "SerializationInfo" &&
- parameters [1].ParameterType.Name == "StreamingContext";
- }
-
- protected void MarkMethodsIf (Collection methods, Func predicate)
- {
- foreach (MethodDefinition method in methods)
- if (predicate (method))
- MarkMethod (method);
- }
-
- protected MethodDefinition MarkMethodIf (Collection methods, Func predicate)
- {
- foreach (MethodDefinition method in methods) {
- if (predicate (method)) {
- return MarkMethod (method);
- }
- }
-
- return null;
- }
-
- protected bool MarkDefaultConstructor (TypeDefinition type)
- {
- if (type?.HasMethods != true)
- return false;
-
- return MarkMethodIf (type.Methods, MethodDefinitionExtensions.IsDefaultConstructor) != null;
- }
-
- static bool IsNonEmptyStaticConstructor (MethodDefinition method)
- {
- if (!method.IsStaticConstructor ())
- return false;
-
- if (!method.HasBody || !method.IsIL)
- return true;
-
- if (method.Body.CodeSize != 1)
- return true;
-
- return method.Body.Instructions [0].OpCode.Code != Code.Ret;
- }
-
- static bool HasSerializationAttribute (MethodDefinition method)
- {
- if (!method.HasCustomAttributes)
- return false;
- foreach (var ca in method.CustomAttributes) {
- var cat = ca.AttributeType;
- if (cat.Namespace != "System.Runtime.Serialization")
- continue;
- switch (cat.Name) {
- case "OnDeserializedAttribute":
- case "OnDeserializingAttribute":
- case "OnSerializedAttribute":
- case "OnSerializingAttribute":
- return true;
- }
- }
- return false;
- }
-
- static bool IsSerializable (TypeDefinition td)
- {
- return (td.Attributes & TypeAttributes.Serializable) != 0;
- }
-
- static bool IsMulticastDelegate (TypeDefinition td)
- {
- return td.BaseType != null && td.BaseType.FullName == "System.MulticastDelegate";
- }
-
- protected virtual bool AlwaysMarkTypeAsInstantiated (TypeDefinition td)
- {
- switch (td.Name) {
- // These types are created from native code which means we are unable to track when they are instantiated
- // Since these are such foundational types, let's take the easy route and just always assume an instance of one of these
- // could exist
- case "Delegate":
- case "MulticastDelegate":
- case "ValueType":
- case "Enum":
- return td.Namespace == "System";
- }
-
- return false;
- }
-
- void MarkEventSourceProviders (TypeDefinition td)
- {
- foreach (var nestedType in td.NestedTypes) {
- if (BCL.EventTracingForWindows.IsProviderName (nestedType.Name))
- MarkStaticFields (nestedType);
- }
- }
-
- protected virtual void MarkMulticastDelegate (TypeDefinition type)
- {
- MarkMethodCollection (type.Methods);
- }
-
- protected static TypeDefinition ResolveTypeDefinition (TypeReference type)
- {
- TypeDefinition td = type as TypeDefinition;
- if (td == null)
- td = type.Resolve ();
-
- return td;
- }
-
- TypeDefinition ResolveFullyQualifiedTypeName (string name)
- {
- if (!TypeNameParser.TryParseTypeAssemblyQualifiedName (name, out string typeName, out string assemblyName))
- return null;
-
- foreach (var assemblyDefinition in _context.GetAssemblies ()) {
- if (assemblyName != null && assemblyDefinition.Name.Name != assemblyName)
- continue;
-
- var foundType = assemblyDefinition.MainModule.GetType (typeName);
- if (foundType == null)
- continue;
-
- return foundType;
- }
-
- return null;
- }
-
- protected TypeReference GetOriginalType (TypeReference type)
- {
- while (type is TypeSpecification) {
- GenericInstanceType git = type as GenericInstanceType;
- if (git != null)
- MarkGenericArguments (git);
-
- var mod = type as IModifierType;
- if (mod != null)
- MarkModifierType (mod);
-
- var fnptr = type as FunctionPointerType;
- if (fnptr != null) {
- MarkParameters (fnptr);
- MarkType (fnptr.ReturnType);
- break; // FunctionPointerType is the original type
- }
- else {
- type = ((TypeSpecification) type).ElementType;
- }
- }
-
- return type;
- }
-
- void MarkParameters (FunctionPointerType fnptr)
- {
- if (!fnptr.HasParameters)
- return;
-
- for (int i = 0; i < fnptr.Parameters.Count; i++)
- {
- MarkType (fnptr.Parameters[i].ParameterType);
- }
- }
-
- void MarkModifierType (IModifierType mod)
- {
- MarkType (mod.ModifierType);
- }
-
- void MarkGenericArguments (IGenericInstance instance)
- {
- foreach (TypeReference argument in instance.GenericArguments)
- MarkType (argument);
-
- MarkGenericArgumentConstructors (instance);
- }
-
- void MarkGenericArgumentConstructors (IGenericInstance instance)
- {
- var arguments = instance.GenericArguments;
-
- var generic_element = GetGenericProviderFromInstance (instance);
- if (generic_element == null)
- return;
-
- var parameters = generic_element.GenericParameters;
-
- if (arguments.Count != parameters.Count)
- return;
-
- for (int i = 0; i < arguments.Count; i++) {
- var argument = arguments [i];
- var parameter = parameters [i];
-
- if (!parameter.HasDefaultConstructorConstraint)
- continue;
-
- var argument_definition = ResolveTypeDefinition (argument);
- MarkDefaultConstructor (argument_definition);
- }
- }
-
- IGenericParameterProvider GetGenericProviderFromInstance (IGenericInstance instance)
- {
- var method = instance as GenericInstanceMethod;
- if (method != null)
- return ResolveMethodDefinition (method.ElementMethod);
-
- var type = instance as GenericInstanceType;
- if (type != null)
- return ResolveTypeDefinition (type.ElementType);
-
- return null;
- }
-
- void ApplyPreserveInfo (TypeDefinition type)
- {
- ApplyPreserveMethods (type);
-
- if (!Annotations.TryGetPreserve (type, out TypePreserve preserve))
- return;
-
- switch (preserve) {
- case TypePreserve.All:
- MarkFields (type, true);
- MarkMethods (type);
- break;
- case TypePreserve.Fields:
- if (!MarkFields (type, true, true))
- _context.LogMessage ($"Type {type.FullName} has no fields to preserve");
- break;
- case TypePreserve.Methods:
- if (!MarkMethods (type))
- _context.LogMessage ($"Type {type.FullName} has no methods to preserve");
- break;
- }
- }
-
- void ApplyPreserveMethods (TypeDefinition type)
- {
- var list = Annotations.GetPreservedMethods (type);
- if (list == null)
- return;
-
- MarkMethodCollection (list);
- }
-
- void ApplyPreserveMethods (MethodDefinition method)
- {
- var list = Annotations.GetPreservedMethods (method);
- if (list == null)
- return;
-
- MarkMethodCollection (list);
- }
-
- protected bool MarkFields (TypeDefinition type, bool includeStatic, bool markBackingFieldsOnlyIfPropertyMarked = false)
- {
- if (!type.HasFields)
- return false;
-
- foreach (FieldDefinition field in type.Fields) {
- if (!includeStatic && field.IsStatic)
- continue;
-
- if (markBackingFieldsOnlyIfPropertyMarked && field.Name.EndsWith (">k__BackingField", StringComparison.Ordinal)) {
- // We can't reliably construct the expected property name from the backing field name for all compilers
- // because csc shortens the name of the backing field in some cases
- // For example:
- // Field Name = .Bar>k__BackingField
- // Property Name = IFoo.Bar
- //
- // instead we will search the properties and find the one that makes use of the current backing field
- var propertyDefinition = SearchPropertiesForMatchingFieldDefinition (field);
- if (propertyDefinition != null && !Annotations.IsMarked (propertyDefinition))
- continue;
- }
- MarkField (field);
- }
-
- return true;
- }
-
- static PropertyDefinition SearchPropertiesForMatchingFieldDefinition (FieldDefinition field)
- {
- foreach (var property in field.DeclaringType.Properties) {
- var instr = property.GetMethod?.Body?.Instructions;
- if (instr == null)
- continue;
-
- foreach (var ins in instr) {
- if (ins?.Operand == field)
- return property;
- }
- }
-
- return null;
- }
-
- protected void MarkStaticFields (TypeDefinition type)
- {
- if (!type.HasFields)
- return;
-
- foreach (FieldDefinition field in type.Fields) {
- if (field.IsStatic)
- MarkField (field);
- }
- }
-
- protected virtual bool MarkMethods (TypeDefinition type)
- {
- if (!type.HasMethods)
- return false;
-
- MarkMethodCollection (type.Methods);
- return true;
- }
-
- void MarkMethodCollection (IList methods)
- {
- foreach (MethodDefinition method in methods)
- MarkMethod (method);
- }
-
- protected void MarkIndirectlyCalledMethod (MethodDefinition method)
- {
- MarkMethod (method);
- Annotations.MarkIndirectlyCalledMethod (method);
- }
-
- protected virtual MethodDefinition MarkMethod (MethodReference reference)
- {
- reference = GetOriginalMethod (reference);
-
- if (reference.DeclaringType is ArrayType)
- return null;
-
- Tracer.Push (reference);
- if (reference.DeclaringType is GenericInstanceType)
- MarkType (reference.DeclaringType);
-
-// if (IgnoreScope (reference.DeclaringType.Scope))
-// return;
-
- MethodDefinition method = ResolveMethodDefinition (reference);
-
- try {
- if (method == null) {
- HandleUnresolvedMethod (reference);
- return null;
- }
-
- if (Annotations.GetAction (method) == MethodAction.Nothing)
- Annotations.SetAction (method, MethodAction.Parse);
-
- EnqueueMethod (method);
- } finally {
- Tracer.Pop ();
- }
- Tracer.AddDependency (method);
-
- return method;
- }
-
- AssemblyDefinition ResolveAssembly (IMetadataScope scope)
- {
- AssemblyDefinition assembly = _context.Resolve (scope);
- MarkAssembly (assembly);
- return assembly;
- }
-
- protected MethodReference GetOriginalMethod (MethodReference method)
- {
- while (method is MethodSpecification) {
- GenericInstanceMethod gim = method as GenericInstanceMethod;
- if (gim != null)
- MarkGenericArguments (gim);
-
- method = ((MethodSpecification) method).ElementMethod;
- }
-
- return method;
- }
-
- static MethodDefinition ResolveMethodDefinition (MethodReference method)
- {
- if (method is MethodDefinition md)
- return md;
-
- return method.Resolve ();
- }
-
- protected virtual void ProcessMethod (MethodDefinition method)
- {
- if (CheckProcessed (method))
- return;
-
- Tracer.Push (method);
- MarkType (method.DeclaringType);
- MarkCustomAttributes (method);
- MarkSecurityDeclarations (method);
-
- MarkGenericParameterProvider (method);
-
- if (ShouldMarkAsInstancePossible (method))
- MarkRequirementsForInstantiatedTypes (method.DeclaringType);
-
- if (method.IsConstructor) {
- if (!Annotations.ProcessSatelliteAssemblies && KnownMembers.IsSatelliteAssemblyMarker (method))
- Annotations.ProcessSatelliteAssemblies = true;
- } else if (IsPropertyMethod (method))
- MarkProperty (GetProperty (method));
- else if (IsEventMethod (method))
- MarkEvent (GetEvent (method));
-
- if (method.HasParameters) {
- foreach (ParameterDefinition pd in method.Parameters) {
- MarkType (pd.ParameterType);
- MarkCustomAttributes (pd);
- MarkMarshalSpec (pd);
- }
- }
-
- if (method.HasOverrides) {
- foreach (MethodReference ov in method.Overrides) {
- MarkMethod (ov);
- MarkExplicitInterfaceImplementation (method, ov);
- }
- }
-
- MarkMethodSpecialCustomAttributes (method);
-
- if (method.IsVirtual)
- _virtual_methods.Add (method);
-
- MarkNewCodeDependencies (method);
-
- MarkBaseMethods (method);
-
- MarkType (method.ReturnType);
- MarkCustomAttributes (method.MethodReturnType);
- MarkMarshalSpec (method.MethodReturnType);
-
- if (method.IsPInvokeImpl || method.IsInternalCall) {
- ProcessInteropMethod (method);
- }
-
- if (ShouldParseMethodBody (method))
- MarkMethodBody (method.Body);
-
- DoAdditionalMethodProcessing (method);
-
- Annotations.Mark (method);
-
- ApplyPreserveMethods (method);
- Tracer.Pop ();
- }
-
- // Allow subclassers to mark additional things when marking a method
- protected virtual void DoAdditionalMethodProcessing (MethodDefinition method)
- {
- }
-
- protected virtual bool ShouldMarkAsInstancePossible (MethodDefinition method)
- {
- // We don't need to mark it multiple times
- if (Annotations.IsInstantiated (method.DeclaringType))
- return false;
-
- if (method.IsInstanceConstructor ())
- return true;
-
- if (method.DeclaringType.IsInterface)
- return true;
-
- return false;
- }
-
- protected virtual void MarkRequirementsForInstantiatedTypes (TypeDefinition type)
- {
- if (Annotations.IsInstantiated (type))
- return;
-
- Annotations.MarkInstantiated (type);
-
- MarkInterfaceImplementations (type);
-
- foreach (var method in GetRequiredMethodsForInstantiatedType (type))
- MarkMethod (method);
-
- DoAdditionalInstantiatedTypeProcessing (type);
- }
-
- ///
- /// Collect methods that must be marked once a type is determined to be instantiated.
- ///
- /// This method is virtual in order to give derived mark steps an opportunity to modify the collection of methods that are needed
- ///
- ///
- ///
- protected virtual IEnumerable GetRequiredMethodsForInstantiatedType (TypeDefinition type)
- {
- foreach (var method in type.Methods) {
- if (method.IsFinalizer () || IsVirtualNeededByInstantiatedTypeDueToPreservedScope (method))
- yield return method;
- }
- }
-
- void MarkExplicitInterfaceImplementation (MethodDefinition method, MethodReference ov)
- {
- var resolvedOverride = ov.Resolve ();
-
- if (resolvedOverride == null) {
- HandleUnresolvedMethod (ov);
- return;
- }
-
- if (resolvedOverride.DeclaringType.IsInterface) {
- foreach (var ifaceImpl in method.DeclaringType.Interfaces) {
- var resolvedInterfaceType = ifaceImpl.InterfaceType.Resolve ();
- if (resolvedInterfaceType == null) {
- HandleUnresolvedType (ifaceImpl.InterfaceType);
- continue;
- }
-
- if (resolvedInterfaceType == resolvedOverride.DeclaringType) {
- MarkInterfaceImplementation (ifaceImpl);
- return;
- }
- }
- }
- }
-
- void MarkNewCodeDependencies (MethodDefinition method)
- {
- switch (Annotations.GetAction (method)) {
- case MethodAction.ConvertToStub:
- if (!method.IsInstanceConstructor ())
- return;
-
- var baseType = ResolveTypeDefinition (method.DeclaringType.BaseType);
- if (!MarkDefaultConstructor (baseType))
- throw new NotSupportedException ($"Cannot stub constructor on '{method.DeclaringType}' when base type does not have default constructor");
-
- break;
-
- case MethodAction.ConvertToThrow:
- MarkAndCacheConvertToThrowExceptionCtor ();
- break;
- }
- }
-
- protected virtual void MarkAndCacheConvertToThrowExceptionCtor ()
- {
- if (_context.MarkedKnownMembers.NotSupportedExceptionCtorString != null)
- return;
-
- var nse = BCL.FindPredefinedType ("System", "NotSupportedException", _context);
- if (nse == null)
- throw new NotSupportedException ("Missing predefined 'System.NotSupportedException' type");
-
- MarkType (nse);
-
- var nseCtor = MarkMethodIf (nse.Methods, KnownMembers.IsNotSupportedExceptionCtorString);
- if (nseCtor == null)
- throw new MarkException ($"Could not find constructor on '{nse.FullName}'");
-
- _context.MarkedKnownMembers.NotSupportedExceptionCtorString = nseCtor;
- }
-
- bool MarkDisablePrivateReflectionAttribute ()
- {
- if (_context.MarkedKnownMembers.DisablePrivateReflectionAttributeCtor != null)
- return false;
-
- var nse = BCL.FindPredefinedType ("System.Runtime.CompilerServices", "DisablePrivateReflectionAttribute", _context);
- if (nse == null)
- throw new NotSupportedException ("Missing predefined 'System.Runtime.CompilerServices.DisablePrivateReflectionAttribute' type");
-
- MarkType (nse);
-
- var ctor = MarkMethodIf (nse.Methods, MethodDefinitionExtensions.IsDefaultConstructor);
- if (ctor == null)
- throw new MarkException ($"Could not find constructor on '{nse.FullName}'");
-
- _context.MarkedKnownMembers.DisablePrivateReflectionAttributeCtor = ctor;
- return true;
- }
-
- void MarkBaseMethods (MethodDefinition method)
- {
- var base_methods = Annotations.GetBaseMethods (method);
- if (base_methods == null)
- return;
-
- foreach (MethodDefinition base_method in base_methods) {
- if (base_method.DeclaringType.IsInterface && !method.DeclaringType.IsInterface)
- continue;
-
- MarkMethod (base_method);
- MarkBaseMethods (base_method);
- }
- }
-
- void ProcessInteropMethod(MethodDefinition method)
- {
- TypeDefinition returnTypeDefinition = ResolveTypeDefinition (method.ReturnType);
- const bool includeStaticFields = false;
- if (returnTypeDefinition != null && !returnTypeDefinition.IsImport) {
- MarkDefaultConstructor (returnTypeDefinition);
- MarkFields (returnTypeDefinition, includeStaticFields);
- }
-
- if (method.HasThis && !method.DeclaringType.IsImport) {
- MarkFields (method.DeclaringType, includeStaticFields);
- }
-
- foreach (ParameterDefinition pd in method.Parameters) {
- TypeReference paramTypeReference = pd.ParameterType;
- if (paramTypeReference is TypeSpecification) {
- paramTypeReference = (paramTypeReference as TypeSpecification).ElementType;
- }
- TypeDefinition paramTypeDefinition = ResolveTypeDefinition (paramTypeReference);
- if (paramTypeDefinition != null && !paramTypeDefinition.IsImport) {
- MarkFields (paramTypeDefinition, includeStaticFields);
- if (pd.ParameterType.IsByReference) {
- MarkDefaultConstructor (paramTypeDefinition);
- }
- }
- }
- }
-
- protected virtual bool ShouldParseMethodBody (MethodDefinition method)
- {
- if (!method.HasBody)
- return false;
-
- switch (Annotations.GetAction (method)) {
- case MethodAction.ForceParse:
- return true;
- case MethodAction.Parse:
- AssemblyDefinition assembly = ResolveAssembly (method.DeclaringType.Scope);
- switch (Annotations.GetAction (assembly)) {
- case AssemblyAction.Link:
- case AssemblyAction.Copy:
- case AssemblyAction.CopyUsed:
- case AssemblyAction.AddBypassNGen:
- case AssemblyAction.AddBypassNGenUsed:
- return true;
- default:
- return false;
- }
- default:
- return false;
- }
- }
-
- static internal bool IsPropertyMethod (MethodDefinition md)
- {
- return (md.SemanticsAttributes & MethodSemanticsAttributes.Getter) != 0 ||
- (md.SemanticsAttributes & MethodSemanticsAttributes.Setter) != 0;
- }
-
- static internal bool IsPublicInstancePropertyMethod (MethodDefinition md)
- {
- return md.IsPublic && !md.IsStatic && IsPropertyMethod (md);
- }
-
- static bool IsEventMethod (MethodDefinition md)
- {
- return (md.SemanticsAttributes & MethodSemanticsAttributes.AddOn) != 0 ||
- (md.SemanticsAttributes & MethodSemanticsAttributes.Fire) != 0 ||
- (md.SemanticsAttributes & MethodSemanticsAttributes.RemoveOn) != 0;
- }
-
- static internal PropertyDefinition GetProperty (MethodDefinition md)
- {
- TypeDefinition declaringType = md.DeclaringType;
- foreach (PropertyDefinition prop in declaringType.Properties)
- if (prop.GetMethod == md || prop.SetMethod == md)
- return prop;
-
- return null;
- }
-
- static EventDefinition GetEvent (MethodDefinition md)
- {
- TypeDefinition declaringType = md.DeclaringType;
- foreach (EventDefinition evt in declaringType.Events)
- if (evt.AddMethod == md || evt.InvokeMethod == md || evt.RemoveMethod == md)
- return evt;
-
- return null;
- }
-
- protected void MarkProperty (PropertyDefinition prop)
- {
- MarkCustomAttributes (prop);
- DoAdditionalPropertyProcessing (prop);
- }
-
- protected virtual void MarkEvent (EventDefinition evt)
- {
- MarkCustomAttributes (evt);
- MarkMethodIfNotNull (evt.AddMethod);
- MarkMethodIfNotNull (evt.InvokeMethod);
- MarkMethodIfNotNull (evt.RemoveMethod);
- DoAdditionalEventProcessing (evt);
- }
-
- void MarkMethodIfNotNull (MethodReference method)
- {
- if (method == null)
- return;
-
- MarkMethod (method);
- }
-
- protected virtual void MarkMethodBody (MethodBody body)
- {
- if (_context.IsOptimizationEnabled (CodeOptimizations.UnreachableBodies) && IsUnreachableBody (body)) {
- MarkAndCacheConvertToThrowExceptionCtor ();
- _unreachableBodies.Add (body);
- return;
- }
-
- foreach (VariableDefinition var in body.Variables)
- MarkType (var.VariableType);
-
- foreach (ExceptionHandler eh in body.ExceptionHandlers)
- if (eh.HandlerType == ExceptionHandlerType.Catch)
- MarkType (eh.CatchType);
-
- foreach (Instruction instruction in body.Instructions)
- MarkInstruction (instruction);
-
- MarkInterfacesNeededByBodyStack (body);
-
- MarkReflectionLikeDependencies (body);
-
- PostMarkMethodBody (body);
- }
-
- bool IsUnreachableBody (MethodBody body)
- {
- return !body.Method.IsStatic
- && !Annotations.IsInstantiated (body.Method.DeclaringType)
- && MethodBodyScanner.IsWorthConvertingToThrow (body);
- }
-
-
- partial void PostMarkMethodBody (MethodBody body);
-
- void MarkInterfacesNeededByBodyStack (MethodBody body)
- {
- // If a type could be on the stack in the body and an interface it implements could be on the stack on the body
- // then we need to mark that interface implementation. When this occurs it is not safe to remove the interface implementation from the type
- // even if the type is never instantiated
- var implementations = MethodBodyScanner.GetReferencedInterfaces (_context.Annotations, body);
- if (implementations == null)
- return;
-
- foreach (var implementation in implementations)
- MarkInterfaceImplementation (implementation);
- }
-
- protected virtual void MarkInstruction (Instruction instruction)
- {
- switch (instruction.OpCode.OperandType) {
- case OperandType.InlineField:
- MarkField ((FieldReference) instruction.Operand);
- break;
- case OperandType.InlineMethod:
- MarkMethod ((MethodReference) instruction.Operand);
- break;
- case OperandType.InlineTok:
- object token = instruction.Operand;
- if (token is TypeReference)
- MarkType ((TypeReference) token);
- else if (token is MethodReference)
- MarkMethod ((MethodReference) token);
- else
- MarkField ((FieldReference) token);
- break;
- case OperandType.InlineType:
- MarkType ((TypeReference) instruction.Operand);
- break;
- default:
- break;
- }
- }
-
- protected virtual void HandleUnresolvedType (TypeReference reference)
- {
- if (!_context.IgnoreUnresolved) {
- throw new ResolutionException (reference);
- }
- }
-
- protected virtual void HandleUnresolvedMethod (MethodReference reference)
- {
- if (!_context.IgnoreUnresolved) {
- throw new ResolutionException (reference);
- }
- }
-
- protected virtual void HandleUnresolvedField (FieldReference reference)
- {
- if (!_context.IgnoreUnresolved) {
- throw new ResolutionException (reference);
- }
- }
-
- protected virtual bool ShouldMarkInterfaceImplementation (TypeDefinition type, InterfaceImplementation iface, TypeDefinition resolvedInterfaceType)
- {
- if (Annotations.IsMarked (iface))
- return false;
-
- if (Annotations.IsMarked (resolvedInterfaceType))
- return true;
-
- if (!_context.IsOptimizationEnabled (CodeOptimizations.UnusedInterfaces))
- return true;
-
- // It's hard to know if a com or windows runtime interface will be needed from managed code alone,
- // so as a precaution we will mark these interfaces once the type is instantiated
- if (resolvedInterfaceType.IsImport || resolvedInterfaceType.IsWindowsRuntime)
- return true;
-
- return IsFullyPreserved (type);
- }
-
- protected virtual void MarkInterfaceImplementation (InterfaceImplementation iface)
- {
- MarkCustomAttributes (iface);
- MarkType (iface.InterfaceType);
- Annotations.Mark (iface);
- }
-
- bool HasManuallyTrackedDependency (MethodBody methodBody)
- {
- return PreserveDependencyLookupStep.HasPreserveDependencyAttribute (methodBody.Method);
- }
-
- //
- // Extension point for reflection logic handling customization
- //
- protected virtual bool ProcessReflectionDependency (MethodBody body, Instruction instruction)
- {
- return false;
- }
-
- //
- // Tries to mark additional dependencies used in reflection like calls (e.g. typeof (MyClass).GetField ("fname"))
- //
- protected virtual void MarkReflectionLikeDependencies (MethodBody body)
- {
- if (HasManuallyTrackedDependency (body))
- return;
-
- var methodCalling = body.Method;
- var instructions = body.Instructions;
-
- //
- // Starting at 1 because all patterns require at least 1 instruction backward lookup
- //
- for (var i = 1; i < instructions.Count; i++) {
- var instruction = instructions [i];
-
- if (instruction.OpCode != OpCodes.Call && instruction.OpCode != OpCodes.Callvirt)
- continue;
-
- if (ProcessReflectionDependency (body, instruction))
- continue;
-
- var methodCalled = instruction.Operand as MethodReference;
- if (methodCalled == null)
- continue;
-
- var methodCalledDefinition = methodCalled.Resolve ();
- if (methodCalledDefinition == null)
- continue;
-
- var methodCalledType = methodCalled.DeclaringType;
-
- int first_arg_instr, second_arg_instr;
- Instruction first_arg;
-
- switch (methodCalledType.Name) {
- //
- // System.Type
- //
- case "Type" when methodCalledType.Namespace == "System":
-
- // Some of the overloads are implemented by calling another overload of the same name.
- // These "internal" calls are not interesting to analyze, the outermost call is the one
- // which needs to be analyzed. The assumption is that all overloads have the same semantics.
- // (for example that all overload of GetConstructor if used require the specified type to have a .ctor).
- if (methodCalling.DeclaringType == methodCalling.DeclaringType && methodCalling.Name == methodCalled.Name)
- break;
-
- switch (methodCalled.Name) {
- //
- // GetConstructor (Type [])
- // GetConstructor (BindingFlags, Binder, Type [], ParameterModifier [])
- // GetConstructor (BindingFlags, Binder, CallingConventions, Type [], ParameterModifier [])
- //
- case "GetConstructor":
- if (!methodCalledDefinition.IsStatic)
- ProcessSystemTypeGetMemberLikeCall (System.Reflection.MemberTypes.Constructor, methodCalledDefinition, i - 1);
-
- break;
-
- //
- // GetMethod (string)
- // GetMethod (string, BindingFlags)
- // GetMethod (string, Type[])
- // GetMethod (string, Type[], ParameterModifier[])
- // GetMethod (string, BindingFlags, Binder, Type[], ParameterModifier[])
- // GetMethod (string, BindingFlags, Binder, CallingConventions, Type[], ParameterModifier[])
- //
- // TODO: .NET Core extensions
- // GetMethod (string, int, Type[])
- // GetMethod (string, int, Type[], ParameterModifier[]?)
- // GetMethod (string, int, BindingFlags, Binder?, Type[], ParameterModifier[]?)
- // GetMethod (string, int, BindingFlags, Binder?, CallingConventions, Type[], ParameterModifier[]?)
- //
- case "GetMethod":
- if (!methodCalledDefinition.IsStatic)
- ProcessSystemTypeGetMemberLikeCall (System.Reflection.MemberTypes.Method, methodCalledDefinition, i - 1);
-
- break;
-
- //
- // GetField (string)
- // GetField (string, BindingFlags)
- //
- case "GetField":
- if (!methodCalledDefinition.IsStatic)
- ProcessSystemTypeGetMemberLikeCall (System.Reflection.MemberTypes.Field, methodCalledDefinition, i - 1);
-
- break;
-
- //
- // GetEvent (string)
- // GetEvent (string, BindingFlags)
- //
- case "GetEvent":
- if (!methodCalledDefinition.IsStatic)
- ProcessSystemTypeGetMemberLikeCall (System.Reflection.MemberTypes.Event, methodCalledDefinition, i - 1);
-
- break;
-
- //
- // GetProperty (string)
- // GetProperty (string, BindingFlags)
- // GetProperty (string, Type)
- // GetProperty (string, Type[])
- // GetProperty (string, Type, Type[])
- // GetProperty (string, Type, Type[], ParameterModifier[])
- // GetProperty (string, BindingFlags, Binder, Type, Type[], ParameterModifier[])
- //
- case "GetProperty":
- if (!methodCalledDefinition.IsStatic)
- ProcessSystemTypeGetMemberLikeCall (System.Reflection.MemberTypes.Property, methodCalledDefinition, i - 1);
-
- break;
-
- //
- // GetType (string)
- // GetType (string, Boolean)
- // GetType (string, Boolean, Boolean)
- // GetType (string, Func, Func)
- // GetType (string, Func, Func, Boolean)
- // GetType (string, Func, Func, Boolean, Boolean)
- //
- case "GetType":
- if (!methodCalledDefinition.IsStatic)
- continue;
-
- first_arg_instr = GetInstructionAtStackDepth (instructions, i - 1, methodCalledDefinition.Parameters.Count);
- if (first_arg_instr < 0) {
- _context.LogMessage (MessageImportance.Low, $"Reflection call '{methodCalled.FullName}' inside '{body.Method.FullName}' couldn't be decomposed");
- continue;
- }
-
- //
- // The next value must be string constant (we don't handle anything else)
- //
- first_arg = instructions [first_arg_instr];
- if (first_arg.OpCode != OpCodes.Ldstr) {
- _context.LogMessage (MessageImportance.Low, $"Reflection call '{methodCalled.FullName}' inside '{body.Method.FullName}' was detected with argument which cannot be analyzed");
- continue;
- }
-
- TypeDefinition foundType = ResolveFullyQualifiedTypeName ((string)first_arg.Operand);
- if (foundType == null)
- continue;
-
- _context.Tracer.Push ($"Reflection-{foundType}");
- try {
- MarkType (foundType);
- } finally {
- _context.Tracer.Pop ();
- }
-
- break;
- }
-
- break;
-
- //
- // System.Linq.Expressions.Expression
- //
- case "Expression" when methodCalledType.Namespace == "System.Linq.Expressions":
- Instruction second_argument;
- TypeDefinition declaringType;
-
- if (!methodCalledDefinition.IsStatic)
- break;
-
- switch (methodCalled.Name) {
-
- //
- // static Call (Type, String, Type[], Expression[])
- //
- case "Call":
- first_arg_instr = GetInstructionAtStackDepth (instructions, i - 1, 4);
- if (first_arg_instr < 0) {
- _context.LogMessage (MessageImportance.Low, $"Expression call '{methodCalled.FullName}' inside '{body.Method.FullName}' couldn't be decomposed");
- continue;
- }
-
- first_arg = instructions [first_arg_instr];
- if (first_arg.OpCode == OpCodes.Ldtoken)
- first_arg_instr++;
-
- declaringType = FindReflectionTypeForLookup (instructions, first_arg_instr);
- if (declaringType == null) {
- _context.LogMessage (MessageImportance.Low, $"Expression call '{methodCalled.FullName}' inside '{body.Method.FullName}' was detected with 1st argument which cannot be analyzed");
- continue;
- }
-
- second_arg_instr = GetInstructionAtStackDepth (instructions, i - 1, 3);
- second_argument = instructions [second_arg_instr];
- if (second_argument.OpCode != OpCodes.Ldstr) {
- _context.LogMessage (MessageImportance.Low, $"Expression call '{methodCalled.FullName}' inside '{body.Method.FullName}' was detected with 2nd argument which cannot be analyzed");
- continue;
- }
-
- var name = (string)second_argument.Operand;
-
- MarkMethodsFromReflectionCall (declaringType, name, null, BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic);
-
- break;
-
- //
- // static Field (Expression, Type, String)
- // static Property(Expression, Type, String)
- //
- case "Property":
- case "Field":
-
- second_arg_instr = GetInstructionAtStackDepth (instructions, i - 1, 2);
- if (second_arg_instr < 0) {
- _context.LogMessage (MessageImportance.Low, $"Expression call '{methodCalled.FullName}' inside '{body.Method.FullName}' couldn't be decomposed");
- continue;
- }
-
- var second_arg = instructions [second_arg_instr];
- if (second_arg.OpCode == OpCodes.Ldtoken)
- second_arg_instr++;
-
- declaringType = FindReflectionTypeForLookup (instructions, second_arg_instr);
- if (declaringType == null) {
- _context.LogMessage (MessageImportance.Low, $"Expression call '{methodCalled.FullName}' inside '{body.Method.FullName}' was detected with 2nd argument which cannot be analyzed");
- continue;
- }
-
- var third_arg_inst = GetInstructionAtStackDepth (instructions, i - 1, 1);
- var third_argument = instructions [third_arg_inst];
- if (third_argument.OpCode != OpCodes.Ldstr) {
- _context.LogMessage (MessageImportance.Low, $"Expression call '{methodCalled.FullName}' inside '{body.Method.FullName}' was detected with the 3rd argument which cannot be analyzed");
- continue;
- }
-
- name = (string)third_argument.Operand;
-
- //
- // The first argument can be any expression but we are looking only for simple null
- // which we can convert to static only field lookup
- //
- first_arg_instr = GetInstructionAtStackDepth (instructions, i - 1, 3);
- bool staticOnly = false;
-
- if (first_arg_instr >= 0) {
- first_arg = instructions [first_arg_instr];
- if (first_arg.OpCode == OpCodes.Ldnull)
- staticOnly = true;
- }
-
- if (methodCalled.Name [0] == 'P')
- MarkPropertiesFromReflectionCall (declaringType, name, staticOnly);
- else
- MarkFieldsFromReflectionCall (declaringType, name, staticOnly);
-
- break;
-
- //
- // static New (Type)
- //
- case "New":
- first_arg_instr = GetInstructionAtStackDepth (instructions, i - 1, 1);
- if (first_arg_instr < 0) {
- _context.LogMessage (MessageImportance.Low, $"Expression call '{methodCalled.FullName}' inside '{body.Method.FullName}' couldn't be decomposed");
- continue;
- }
-
- first_arg = instructions [first_arg_instr];
- if (first_arg.OpCode == OpCodes.Ldtoken)
- first_arg_instr++;
-
- declaringType = FindReflectionTypeForLookup (instructions, first_arg_instr);
- if (declaringType == null) {
- _context.LogMessage (MessageImportance.Low, $"Expression call '{methodCalled.FullName}' inside '{body.Method.FullName}' was detected with 1st argument which cannot be analyzed");
- continue;
- }
-
- MarkMethodsFromReflectionCall (declaringType, ".ctor", 0, BindingFlags.Instance, parametersCount: 0);
- break;
- }
-
- break;
-
- //
- // System.Reflection.RuntimeReflectionExtensions
- //
- case "RuntimeReflectionExtensions" when methodCalledType.Namespace == "System.Reflection":
- switch (methodCalled.Name) {
- //
- // static GetRuntimeField (this Type type, string name)
- //
- case "GetRuntimeField":
- ProcessSystemTypeGetMemberLikeCall (System.Reflection.MemberTypes.Field, methodCalledDefinition, i - 1, thisExtension: true);
- break;
-
- //
- // static GetRuntimeMethod (this Type type, string name, Type[] parameters)
- //
- case "GetRuntimeMethod":
- ProcessSystemTypeGetMemberLikeCall (System.Reflection.MemberTypes.Method, methodCalledDefinition, i - 1, thisExtension: true);
- break;
-
- //
- // static GetRuntimeProperty (this Type type, string name)
- //
- case "GetRuntimeProperty":
- ProcessSystemTypeGetMemberLikeCall (System.Reflection.MemberTypes.Property, methodCalledDefinition, i - 1, thisExtension: true);
- break;
-
- //
- // static GetRuntimeEvent (this Type type, string name)
- //
- case "GetRuntimeEvent":
- ProcessSystemTypeGetMemberLikeCall (System.Reflection.MemberTypes.Event, methodCalledDefinition, i - 1, thisExtension: true);
- break;
- }
-
- break;
-
- //
- // System.AppDomain
- //
- case "AppDomain" when methodCalledType.Namespace == "System":
- //
- // CreateInstance (string assemblyName, string typeName)
- // CreateInstance (string assemblyName, string typeName, bool ignoreCase, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder? binder, object? []? args, System.Globalization.CultureInfo? culture, object? []? activationAttributes)
- // CreateInstance (string assemblyName, string typeName, object? []? activationAttributes)
- //
- // CreateInstanceAndUnwrap (string assemblyName, string typeName)
- // CreateInstanceAndUnwrap (string assemblyName, string typeName, bool ignoreCase, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder? binder, object? []? args, System.Globalization.CultureInfo? culture, object? []? activationAttributes)
- // CreateInstanceAndUnwrap (string assemblyName, string typeName, object? []? activationAttributes)
- //
- // CreateInstanceFrom (string assemblyFile, string typeName)
- // CreateInstanceFrom (string assemblyFile, string typeName, bool ignoreCase, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder? binder, object? []? args, System.Globalization.CultureInfo? culture, object? []? activationAttributes)
- // CreateInstanceFrom (string assemblyFile, string typeName, object? []? activationAttributes)
- //
- // CreateInstanceFromAndUnwrap (string assemblyFile, string typeName)
- // CreateInstanceFromAndUnwrap (string assemblyFile, string typeName, bool ignoreCase, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder? binder, object? []? args, System.Globalization.CultureInfo? culture, object? []? activationAttributes)
- // CreateInstanceFromAndUnwrap (string assemblyFile, string typeName, object? []? activationAttributes)
- //
- switch (methodCalled.Name) {
- case "CreateInstance":
- case "CreateInstanceAndUnwrap":
- case "CreateInstanceFrom":
- case "CreateInstanceFromAndUnwrap":
- ProcessActivatorCallWithStrings (methodCalledDefinition, i - 1, methodCalled.Parameters.Count < 4);
- break;
- }
-
- break;
-
- //
- // System.Reflection.Assembly
- //
- case "Assembly" when methodCalledType.Namespace == "System.Reflection":
- //
- // CreateInstance (string typeName)
- // CreateInstance (string typeName, bool ignoreCase)
- // CreateInstance (string typeName, bool ignoreCase, BindingFlags bindingAttr, Binder? binder, object []? args, CultureInfo? culture, object []? activationAttributes)
- //
- if (methodCalled.Name == "CreateInstance") {
- //
- // TODO: This could be supported for `this` only calls
- //
- _context.LogMessage (MessageImportance.Low, $"Activator call '{methodCalled.FullName}' inside '{body.Method.FullName}' is not yet supported");
- break;
- }
-
- break;
-
- //
- // System.Activator
- //
- case "Activator" when methodCalledType.Namespace == "System":
- if (!methodCalledDefinition.IsStatic)
- break;
-
- switch (methodCalled.Name) {
- //
- // static CreateInstance (string assemblyName, string typeName)
- // static CreateInstance (string assemblyName, string typeName, bool ignoreCase, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder? binder, object?[]? args, System.Globalization.CultureInfo? culture, object?[]? activationAttributes)
- // static CreateInstance (string assemblyName, string typeName, object?[]? activationAttributes)
- //
- // static CreateInstance (System.Type type)
- // static CreateInstance (System.Type type, bool nonPublic)
- // static CreateInstance (System.Type type, params object?[]? args)
- // static CreateInstance (System.Type type, object?[]? args, object?[]? activationAttributes)
- // static CreateInstance (System.Type type, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder? binder, object?[]? args, System.Globalization.CultureInfo? culture)
- // static CreateInstance (System.Type type, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder? binder, object?[]? args, System.Globalization.CultureInfo? culture, object?[]? activationAttributes) { throw null; }
- //
- case "CreateInstance":
- var parameters = methodCalled.Parameters;
- if (parameters.Count < 1)
- continue;
-
- if (parameters [0].ParameterType.MetadataType == MetadataType.String) {
- ProcessActivatorCallWithStrings (methodCalledDefinition, i - 1, parameters.Count < 4);
- continue;
- }
-
- first_arg_instr = GetInstructionAtStackDepth (instructions, i - 1, methodCalledDefinition.Parameters.Count);
- if (first_arg_instr < 0) {
- _context.LogMessage (MessageImportance.Low, $"Activator call '{methodCalled.FullName}' inside '{body.Method.FullName}' couldn't be decomposed");
- continue;
- }
-
- if (parameters [0].ParameterType.IsTypeOf ("System", "Type")) {
- declaringType = FindReflectionTypeForLookup (instructions, first_arg_instr + 1);
- if (declaringType == null) {
- _context.LogMessage (MessageImportance.Low, $"Activator call '{methodCalled.FullName}' inside '{body.Method.FullName}' was detected with 1st argument expression which cannot be analyzed");
- continue;
- }
-
- BindingFlags bindingFlags = BindingFlags.Instance;
- int? parametersCount = null;
-
- if (methodCalledDefinition.Parameters.Count == 1) {
- parametersCount = 0;
- } else {
- second_arg_instr = GetInstructionAtStackDepth (instructions, i - 1, methodCalledDefinition.Parameters.Count - 1);
- second_argument = instructions [second_arg_instr];
- switch (second_argument.OpCode.Code) {
- case Code.Ldc_I4_0 when parameters [1].ParameterType.MetadataType == MetadataType.Boolean:
- parametersCount = 0;
- bindingFlags |= BindingFlags.Public;
- break;
- case Code.Ldc_I4_1 when parameters [1].ParameterType.MetadataType == MetadataType.Boolean:
- parametersCount = 0;
- break;
- case Code.Ldc_I4_S when parameters [1].ParameterType.IsTypeOf ("System.Reflection", "BindingFlags"):
- bindingFlags = (BindingFlags)(sbyte)second_argument.Operand;
- break;
- }
- }
-
- MarkMethodsFromReflectionCall (declaringType, ".ctor", 0, bindingFlags, parametersCount);
- continue;
- }
-
- break;
- //
- // static T CreateInstance ()
- //
- case "CreateInstance`1":
- // Not sure it's worth implementing as we cannot expant T and simple cases can be rewritten
- _context.LogMessage (MessageImportance.Low, $"Activator call '{methodCalled.FullName}' inside '{body.Method.FullName}' is not supported");
- break;
-
- //
- // static CreateInstanceFrom (string assemblyFile, string typeName)
- // static CreateInstanceFrom (string assemblyFile, string typeName, bool ignoreCase, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder? binder, object? []? args, System.Globalization.CultureInfo? culture, object? []? activationAttributes)
- // static CreateInstanceFrom (string assemblyFile, string typeName, object? []? activationAttributes)
- //
- case "CreateInstanceFrom":
- ProcessActivatorCallWithStrings (methodCalledDefinition, i - 1, methodCalled.Parameters.Count < 4);
- break;
- }
-
- break;
- }
- }
-
- //
- // Handles static method calls in form of Create (string assemblyFile, string typeName, ......)
- //
- void ProcessActivatorCallWithStrings (MethodDefinition methodCalledDefinition, int startIndex, bool defaultCtorOnly)
- {
- var parameters = methodCalledDefinition.Parameters;
- if (parameters.Count < 2)
- return;
-
- if (parameters [0].ParameterType.MetadataType != MetadataType.String && parameters [1].ParameterType.MetadataType != MetadataType.String) {
- _context.LogMessage (MessageImportance.Low, $"Activator call '{methodCalledDefinition.FullName}' inside '{body.Method.FullName}' is not supported");
- return;
- }
-
- var first_arg_instr = GetInstructionAtStackDepth (instructions, startIndex, methodCalledDefinition.Parameters.Count);
- if (first_arg_instr < 0) {
- _context.LogMessage (MessageImportance.Low, $"Activator call '{methodCalledDefinition.FullName}' inside '{body.Method.FullName}' couldn't be decomposed");
- return;
- }
-
- var first_arg = instructions [first_arg_instr];
- if (first_arg.OpCode != OpCodes.Ldstr) {
- _context.LogMessage (MessageImportance.Low, $"Activator call '{methodCalledDefinition.FullName}' inside '{body.Method.FullName}' was detected with the 1st argument which cannot be analyzed");
- return;
- }
-
- var second_arg_instr = GetInstructionAtStackDepth (instructions, startIndex, methodCalledDefinition.Parameters.Count - 1);
- if (second_arg_instr < 0) {
- _context.LogMessage (MessageImportance.Low, $"Activator call '{methodCalledDefinition.FullName}' inside '{body.Method.FullName}' couldn't be decomposed");
- return;
- }
-
- var second_arg = instructions [second_arg_instr];
- if (second_arg.OpCode != OpCodes.Ldstr) {
- _context.LogMessage (MessageImportance.Low, $"Activator call '{methodCalledDefinition.FullName}' inside '{body.Method.FullName}' was detected with the 2nd argument which cannot be analyzed");
- return;
- }
-
- string assembly_name = (string)first_arg.Operand;
- if (!_context.Resolver.AssemblyCache.TryGetValue (assembly_name, out var assembly)) {
- _context.Logger.LogMessage (MessageImportance.Low, $"Activator call '{methodCalledDefinition.FullName}' inside '{body.Method.FullName}' references assembly '{assembly_name}' which could not be found");
- return;
- }
-
- string type_name = (string)second_arg.Operand;
- var declaringType = FindType (assembly, type_name);
-
- if (declaringType == null) {
- _context.Logger.LogMessage (MessageImportance.Low, $"Activator call '{methodCalledDefinition.FullName}' inside '{body.Method.FullName}' references type '{type_name}' which could not be found");
- return;
- }
-
- MarkMethodsFromReflectionCall (declaringType, ".ctor", 0, null, defaultCtorOnly ? 0 : (int?) null);
- }
-
- //
- // Handles instance methods called over typeof (Foo) with string name as the first argument
- //
- void ProcessSystemTypeGetMemberLikeCall (System.Reflection.MemberTypes memberTypes, MethodDefinition methodCalledDefinition, int startIndex, bool thisExtension = false)
- {
- int first_instance_arg = methodCalledDefinition.Parameters.Count;
- if (thisExtension)
- --first_instance_arg;
-
- var first_arg_instr = GetInstructionAtStackDepth (instructions, startIndex, first_instance_arg);
- if (first_arg_instr < 0) {
- _context.LogMessage (MessageImportance.Low, $"Reflection call '{methodCalledDefinition.FullName}' inside '{body.Method.FullName}' couldn't be decomposed");
- return;
- }
-
- var first_arg = instructions [first_arg_instr];
- BindingFlags? bindingFlags = default;
- string name = default;
-
- if (memberTypes == System.Reflection.MemberTypes.Constructor) {
- if (first_arg.OpCode == OpCodes.Ldc_I4_S && methodCalledDefinition.Parameters.Count > 0 && methodCalledDefinition.Parameters [0].ParameterType.IsTypeOf ("System.Reflection", "BindingFlags")) {
- bindingFlags = (BindingFlags)(sbyte)first_arg.Operand;
- }
- } else {
- //
- // The next value must be string constant (we don't handle anything else)
- //
- if (first_arg.OpCode != OpCodes.Ldstr) {
- _context.LogMessage (MessageImportance.Low, $"Reflection call '{methodCalledDefinition.FullName}' inside '{body.Method.FullName}' was detected with argument which cannot be analyzed");
- return;
- }
-
- name = (string)first_arg.Operand;
-
- var pos_arg = instructions [first_arg_instr + 1];
- if (pos_arg.OpCode == OpCodes.Ldc_I4_S && methodCalledDefinition.Parameters.Count > 1 && methodCalledDefinition.Parameters [1].ParameterType.IsTypeOf ("System.Reflection", "BindingFlags")) {
- bindingFlags = (BindingFlags)(sbyte)pos_arg.Operand;
- }
- }
-
- var declaringType = FindReflectionTypeForLookup (instructions, first_arg_instr - 1);
- if (declaringType == null) {
- _context.LogMessage (MessageImportance.Low, $"Reflection call '{methodCalledDefinition.FullName}' inside '{body.Method.FullName}' does not use detectable instance type extraction");
- return;
- }
-
- switch (memberTypes) {
- case System.Reflection.MemberTypes.Constructor:
- MarkMethodsFromReflectionCall (declaringType, ".ctor", 0, bindingFlags);
- break;
- case System.Reflection.MemberTypes.Method:
- MarkMethodsFromReflectionCall (declaringType, name, 0, bindingFlags);
- break;
- case System.Reflection.MemberTypes.Field:
- MarkFieldsFromReflectionCall (declaringType, name);
- break;
- case System.Reflection.MemberTypes.Property:
- MarkPropertiesFromReflectionCall (declaringType, name);
- break;
- case System.Reflection.MemberTypes.Event:
- MarkEventsFromReflectionCall (declaringType, name);
- break;
- }
- }
- }
-
- static int GetInstructionAtStackDepth (Collection instructions, int startIndex, int stackSizeToBacktrace)
- {
- for (int i = startIndex; i >= 0; --i) {
- var instruction = instructions [i];
-
- switch (instruction.OpCode.StackBehaviourPop) {
- case StackBehaviour.Pop0:
- break;
- case StackBehaviour.Pop1:
- case StackBehaviour.Popi:
- case StackBehaviour.Popref:
- stackSizeToBacktrace++;
- break;
- case StackBehaviour.Pop1_pop1:
- case StackBehaviour.Popi_pop1:
- case StackBehaviour.Popi_popi:
- case StackBehaviour.Popi_popi8:
- case StackBehaviour.Popi_popr4:
- case StackBehaviour.Popi_popr8:
- case StackBehaviour.Popref_pop1:
- case StackBehaviour.Popref_popi:
- stackSizeToBacktrace += 2;
- break;
- case StackBehaviour.Popref_popi_popi:
- case StackBehaviour.Popref_popi_popi8:
- case StackBehaviour.Popref_popi_popr4:
- case StackBehaviour.Popref_popi_popr8:
- case StackBehaviour.Popref_popi_popref:
- stackSizeToBacktrace += 3;
- break;
- case StackBehaviour.Varpop:
- switch (instruction.OpCode.Code) {
- case Code.Call:
- case Code.Calli:
- case Code.Callvirt:
- if (instruction.Operand is MethodReference mr) {
- stackSizeToBacktrace += mr.Parameters.Count;
- if (mr.Resolve ()?.IsStatic == false)
- stackSizeToBacktrace++;
- }
-
- break;
- case Code.Newobj:
- if (instruction.Operand is MethodReference ctor) {
- stackSizeToBacktrace += ctor.Parameters.Count;
- }
- break;
- case Code.Ret:
- // TODO: Need method return type for correct stack size but this path should not be hit yet
- break;
- default:
- return -3;
- }
- break;
- }
-
- switch (instruction.OpCode.StackBehaviourPush) {
- case StackBehaviour.Push0:
- break;
- case StackBehaviour.Push1:
- case StackBehaviour.Pushi:
- case StackBehaviour.Pushi8:
- case StackBehaviour.Pushr4:
- case StackBehaviour.Pushr8:
- case StackBehaviour.Pushref:
- stackSizeToBacktrace--;
- break;
- case StackBehaviour.Push1_push1:
- stackSizeToBacktrace -= 2;
- break;
- case StackBehaviour.Varpush:
- //
- // Only call, calli, callvirt will hit this
- //
- if (instruction.Operand is MethodReference mr && mr.ReturnType.MetadataType != MetadataType.Void) {
- stackSizeToBacktrace--;
- }
- break;
- }
-
- if (stackSizeToBacktrace == 0)
- return i;
-
- if (stackSizeToBacktrace < 0)
- return -1;
- }
-
- return -2;
- }
-
- static TypeDefinition FindReflectionTypeForLookup (Collection instructions, int startIndex)
- {
- while (startIndex >= 1) {
- int storeIndex = -1;
- var instruction = instructions [startIndex];
- switch (instruction.OpCode.Code) {
- //
- // Pattern #1
- //
- // typeof (Foo).ReflectionCall ()
- //
- case Code.Call:
- var mr = instruction.Operand as MethodReference;
- if (mr == null || mr.Name != "GetTypeFromHandle")
- return null;
-
- var ldtoken = instructions [startIndex - 1];
-
- if (ldtoken.OpCode != OpCodes.Ldtoken)
- return null;
-
- return (ldtoken.Operand as TypeReference).Resolve ();
-
- //
- // Patern #2
- //
- // var temp = typeof (Foo);
- // temp.ReflectionCall ()
- //
- case Code.Ldloc_0:
- storeIndex = GetIndexOfInstruction (instructions, OpCodes.Stloc_0, startIndex - 1);
- startIndex = storeIndex - 1;
- break;
- case Code.Ldloc_1:
- storeIndex = GetIndexOfInstruction (instructions, OpCodes.Stloc_1, startIndex - 1);
- startIndex = storeIndex - 1;
- break;
- case Code.Ldloc_2:
- storeIndex = GetIndexOfInstruction (instructions, OpCodes.Stloc_2, startIndex - 1);
- startIndex = storeIndex - 1;
- break;
- case Code.Ldloc_3:
- storeIndex = GetIndexOfInstruction (instructions, OpCodes.Stloc_3, startIndex - 1);
- startIndex = storeIndex - 1;
- break;
- case Code.Ldloc_S:
- storeIndex = GetIndexOfInstruction (instructions, OpCodes.Stloc_S, startIndex - 1, l => (VariableReference)l.Operand == (VariableReference)instruction.Operand);
- startIndex = storeIndex - 1;
- break;
- case Code.Ldloc:
- storeIndex = GetIndexOfInstruction (instructions, OpCodes.Stloc, startIndex - 1, l => (VariableReference)l.Operand == (VariableReference)instruction.Operand);
- startIndex = storeIndex - 1;
- break;
-
- case Code.Nop:
- startIndex--;
- break;
-
- default:
- return null;
- }
- }
-
- return null;
- }
-
- static int GetIndexOfInstruction (Collection instructions, OpCode opcode, int startIndex, Predicate comparer = null)
- {
- while (startIndex >= 0) {
- var instr = instructions [startIndex];
- if (instr.OpCode == opcode && (comparer == null || comparer (instr)))
- return startIndex;
-
- startIndex--;
- }
-
- return -1;
- }
-
- //
- // arity == null for name match regardless of arity
- //
- void MarkMethodsFromReflectionCall (TypeDefinition declaringType, string name, int? arity, BindingFlags? bindingFlags, int? parametersCount = null)
- {
- foreach (var method in declaringType.Methods) {
- var mname = method.Name;
-
- // Either exact match or generic method with any arity when unspecified
- if (mname != name && !(arity == null && mname.StartsWith (name, StringComparison.Ordinal) && mname.Length > name.Length + 2 && mname [name.Length + 1] == '`')) {
- continue;
- }
-
- if ((bindingFlags & (BindingFlags.Instance | BindingFlags.Static)) == BindingFlags.Static && !method.IsStatic)
- continue;
-
- if ((bindingFlags & (BindingFlags.Instance | BindingFlags.Static)) == BindingFlags.Instance && method.IsStatic)
- continue;
-
- if ((bindingFlags & (BindingFlags.Public | BindingFlags.NonPublic)) == BindingFlags.Public && !method.IsPublic)
- continue;
-
- if ((bindingFlags & (BindingFlags.Public | BindingFlags.NonPublic)) == BindingFlags.NonPublic && method.IsPublic)
- continue;
-
- if (parametersCount != null && parametersCount != method.Parameters.Count)
- continue;
-
- Tracer.Push ($"Reflection-{method}");
- try {
- MarkIndirectlyCalledMethod (method);
- } finally {
- Tracer.Pop ();
- }
- }
- }
-
- void MarkPropertiesFromReflectionCall (TypeDefinition declaringType, string name, bool staticOnly = false)
- {
- foreach (var property in declaringType.Properties) {
- if (property.Name != name)
- continue;
-
- Tracer.Push ($"Reflection-{property}");
- try {
- bool markedAny = false;
-
- // It is not easy to reliably detect in the IL code whether the getter or setter (or both) are used.
- // Be conservative and mark everything for the property.
- var getter = property.GetMethod;
- if (getter != null && (!staticOnly || staticOnly && getter.IsStatic)) {
- MarkIndirectlyCalledMethod (getter);
- markedAny = true;
- }
-
- var setter = property.SetMethod;
- if (setter != null && (!staticOnly || staticOnly && setter.IsStatic)) {
- MarkIndirectlyCalledMethod (setter);
- markedAny = true;
- }
-
- if (markedAny)
- MarkProperty (property);
-
- } finally {
- Tracer.Pop ();
- }
- }
- }
-
- void MarkFieldsFromReflectionCall (TypeDefinition declaringType, string name, bool staticOnly = false)
- {
- foreach (var field in declaringType.Fields) {
- if (field.Name != name)
- continue;
-
- if (staticOnly && !field.IsStatic)
- continue;
-
- Tracer.Push ($"Reflection-{field}");
- try {
- MarkField (field);
- } finally {
- Tracer.Pop ();
- }
-
- break;
- }
- }
-
- void MarkEventsFromReflectionCall (TypeDefinition declaringType, string name)
- {
- foreach (var eventInfo in declaringType.Events) {
- if (eventInfo.Name != name)
- continue;
-
- Tracer.Push ($"Reflection-{eventInfo}");
- try {
- MarkEvent (eventInfo);
- } finally {
- Tracer.Pop ();
- }
- }
- }
-
- protected class AttributeProviderPair {
- public AttributeProviderPair (CustomAttribute attribute, ICustomAttributeProvider provider)
- {
- Attribute = attribute;
- Provider = provider;
- }
-
- public CustomAttribute Attribute { get; private set; }
- public ICustomAttributeProvider Provider { get; private set; }
- }
- }
-
- // Make our own copy of the BindingFlags enum, so that we don't depend on System.Reflection.
- [Flags]
- enum BindingFlags
- {
- Default = 0,
- IgnoreCase = 1,
- DeclaredOnly = 2,
- Instance = 4,
- Static = 8,
- Public = 16,
- NonPublic = 32,
- FlattenHierarchy = 64,
- InvokeMethod = 256,
- CreateInstance = 512,
- GetField = 1024,
- SetField = 2048,
- GetProperty = 4096,
- SetProperty = 8192,
- PutDispProperty = 16384,
- PutRefDispProperty = 32768,
- ExactBinding = 65536,
- SuppressChangeType = 131072,
- OptionalParamBinding = 262144,
- IgnoreReturn = 16777216
- }
-}
diff --git a/external/linker/src/linker/Linker.Steps/MarkStep.cs.REMOVED.git-id b/external/linker/src/linker/Linker.Steps/MarkStep.cs.REMOVED.git-id
new file mode 100644
index 0000000000..71537e9077
--- /dev/null
+++ b/external/linker/src/linker/Linker.Steps/MarkStep.cs.REMOVED.git-id
@@ -0,0 +1 @@
+55bd31187c808a0374d8d10665a723aa621c5bab
\ No newline at end of file
diff --git a/external/linker/src/linker/Linker.Steps/RemoveFeaturesStep.cs b/external/linker/src/linker/Linker.Steps/RemoveFeaturesStep.cs
index 1962f38bc7..d5967a9d56 100644
--- a/external/linker/src/linker/Linker.Steps/RemoveFeaturesStep.cs
+++ b/external/linker/src/linker/Linker.Steps/RemoveFeaturesStep.cs
@@ -259,7 +259,7 @@ namespace Mono.Linker.Steps
{
if (method.Name == "get_UseManagedCollation")
{
- annotations.SetAction(method, MethodAction.ConvertToFalse);
+ annotations.SetAction(method, MethodAction.ConvertToStub);
break;
}
}
diff --git a/external/linker/src/linker/Linker.Steps/RemoveUnreachableBlocksStep.cs b/external/linker/src/linker/Linker.Steps/RemoveUnreachableBlocksStep.cs
new file mode 100644
index 0000000000..23eaec6a96
--- /dev/null
+++ b/external/linker/src/linker/Linker.Steps/RemoveUnreachableBlocksStep.cs
@@ -0,0 +1,1295 @@
+using System;
+using System.Diagnostics;
+using System.Linq;
+using System.Collections;
+using Mono.Cecil;
+using Mono.Cecil.Cil;
+using Mono.Collections.Generic;
+using System.Collections.Generic;
+
+namespace Mono.Linker.Steps
+{
+ //
+ // This steps evaluates simple properties or methods for constant expressions and
+ // then uses this information to remove unreachable conditional blocks. It does
+ // not do any inlining-like code changes.
+ //
+ public class RemoveUnreachableBlocksStep : BaseStep
+ {
+ Dictionary constExprMethods;
+ MethodDefinition IntPtrSize, UIntPtrSize;
+
+ protected override void Process ()
+ {
+ var assemblies = Context.Annotations.GetAssemblies ().ToArray ();
+
+ constExprMethods = new Dictionary ();
+ foreach (var assembly in assemblies) {
+ FindConstantExpressionsMethods (assembly.MainModule.Types);
+ }
+
+ if (constExprMethods.Count == 0)
+ return;
+
+ int constExprMethodsCount;
+ do {
+ //
+ // Body rewriting can produce more methods with constant expression
+ //
+ constExprMethodsCount = constExprMethods.Count;
+
+ foreach (var assembly in assemblies) {
+ if (Annotations.GetAction (assembly) != AssemblyAction.Link)
+ continue;
+
+ RewriteBodies (assembly.MainModule.Types);
+ }
+ } while (constExprMethodsCount < constExprMethods.Count);
+ }
+
+ void FindConstantExpressionsMethods (Collection types)
+ {
+ foreach (var type in types) {
+ if (type.IsInterface)
+ continue;
+
+ if (!type.HasMethods)
+ continue;
+
+ foreach (var method in type.Methods) {
+ if (!method.HasBody)
+ continue;
+
+ if (method.ReturnType.MetadataType == MetadataType.Void)
+ continue;
+
+ switch (Annotations.GetAction (method)) {
+ case MethodAction.ConvertToThrow:
+ continue;
+ case MethodAction.ConvertToStub:
+ var instruction = CodeRewriterStep.CreateConstantResultInstruction (Context, method);
+ if (instruction != null)
+ constExprMethods [method] = instruction;
+
+ continue;
+ }
+
+ if (method.IsIntrinsic ())
+ continue;
+
+ if (constExprMethods.ContainsKey (method))
+ continue;
+
+ if (!Context.IsOptimizationEnabled (CodeOptimizations.IPConstantPropagation))
+ continue;
+
+ var analyzer = new ConstantExpressionMethodAnalyzer (method);
+ if (analyzer.Analyze ()) {
+ constExprMethods [method] = analyzer.Result;
+ }
+ }
+
+ if (type.HasNestedTypes)
+ FindConstantExpressionsMethods (type.NestedTypes);
+ }
+ }
+
+ void RewriteBodies (Collection types)
+ {
+ foreach (var type in types) {
+ if (type.IsInterface)
+ continue;
+
+ if (!type.HasMethods)
+ continue;
+
+ foreach (var method in type.Methods) {
+ if (!method.HasBody)
+ continue;
+
+ //
+ // Block methods which rewrite does not support
+ //
+ switch (method.ReturnType.MetadataType) {
+ case MetadataType.ByReference:
+ case MetadataType.FunctionPointer:
+ continue;
+ }
+
+ RewriteBody (method);
+ }
+
+ if (type.HasNestedTypes)
+ RewriteBodies (type.NestedTypes);
+ }
+ }
+
+ void RewriteBody (MethodDefinition method)
+ {
+ var reducer = new BodyReducer (method.Body, Context);
+
+ //
+ // Temporary inlines any calls which return contant expression
+ //
+ if (!TryInlineBodyDependencies (ref reducer))
+ return;
+
+ //
+ // This is the main step which evaluates if inlined calls can
+ // produce folded branches. When it finds them the unreachable
+ // branch is replaced with nops.
+ //
+ if (!reducer.RewriteBody ())
+ return;
+
+ Context.LogMessage (MessageImportance.Low, $"Reduced '{reducer.InstructionsReplaced}' instructions in conditional branches for [{method.DeclaringType.Module.Assembly.Name}] method {method.FullName}");
+
+ if (method.ReturnType.MetadataType == MetadataType.Void)
+ return;
+
+ //
+ // Re-run the analyzer in case body change rewrote it to constant expression
+ //
+ var analyzer = new ConstantExpressionMethodAnalyzer (method, reducer.FoldedInstructions);
+ if (analyzer.Analyze ()) {
+ constExprMethods [method] = analyzer.Result;
+ }
+ }
+
+ bool TryInlineBodyDependencies (ref BodyReducer reducer)
+ {
+ bool changed = false;
+ var instructions = reducer.Body.Instructions;
+ Instruction targetResult;
+
+ for (int i = 0; i < instructions.Count; ++i) {
+ var instr = instructions [i];
+ switch (instr.OpCode.Code) {
+
+ case Code.Call:
+ var target = (MethodReference)instr.Operand;
+ var md = target.Resolve ();
+ if (md == null)
+ break;
+
+ if (!md.IsStatic)
+ break;
+
+ if (!constExprMethods.TryGetValue (md, out targetResult))
+ break;
+
+ if (md.HasParameters)
+ break;
+
+ reducer.Rewrite (i, targetResult);
+ changed = true;
+ break;
+
+ case Code.Ldsfld:
+ var ftarget = (FieldReference)instr.Operand;
+ var field = ftarget.Resolve ();
+ if (field == null)
+ break;
+
+ if (Context.Annotations.TryGetFieldUserValue (field, out object value)) {
+ targetResult = CodeRewriterStep.CreateConstantResultInstruction (field.FieldType, value);
+ if (targetResult == null)
+ break;
+ reducer.Rewrite (i, targetResult);
+ changed = true;
+ }
+ break;
+
+ case Code.Sizeof:
+ //
+ // sizeof (IntPtr) and sizeof (UIntPtr) are just aliases for IntPtr.Size and UIntPtr.Size
+ // which are simple static properties commonly overwritten. Instead of forcing C# code style
+ // we handle both via static Size property
+ //
+ MethodDefinition sizeOfImpl = null;
+
+ var operand = (TypeReference) instr.Operand;
+ if (operand.MetadataType == MetadataType.UIntPtr) {
+ sizeOfImpl = UIntPtrSize ?? (UIntPtrSize = FindSizeMethod (operand.Resolve ()));
+ }
+
+ if (operand.MetadataType == MetadataType.IntPtr) {
+ sizeOfImpl = IntPtrSize ?? (IntPtrSize = FindSizeMethod (operand.Resolve ()));
+ }
+
+ if (sizeOfImpl != null && constExprMethods.TryGetValue (sizeOfImpl, out targetResult)) {
+ reducer.Rewrite (i, targetResult);
+ changed = true;
+ }
+
+ break;
+ }
+ }
+
+ return changed;
+ }
+
+ static MethodDefinition FindSizeMethod (TypeDefinition type)
+ {
+ if (type == null)
+ return null;
+
+ return type.Methods.First (l => !l.HasParameters && l.IsStatic && l.Name == "get_Size");
+ }
+
+ struct BodyReducer
+ {
+ readonly LinkContext context;
+ Dictionary mapping;
+
+ //
+ // Sorted list of body instruction indexes which were
+ // replaced pass-through nop
+ //
+ List conditionInstrsToRemove;
+
+ public BodyReducer (MethodBody body, LinkContext context)
+ {
+ Body = body;
+ this.context = context;
+
+ FoldedInstructions = null;
+ mapping = null;
+ conditionInstrsToRemove = null;
+ InstructionsReplaced = 0;
+ }
+
+ public MethodBody Body { get; }
+
+ public int InstructionsReplaced { get; set; }
+
+ public Collection FoldedInstructions { get; private set; }
+
+ public void Rewrite (int index, Instruction newInstruction)
+ {
+ if (FoldedInstructions == null) {
+ FoldedInstructions = new Collection (Body.Instructions);
+ mapping = new Dictionary ();
+ }
+
+ // Tracks mapping for replaced instructions for easier
+ // branch targets resolution later
+ mapping [Body.Instructions [index]] = index;
+
+ FoldedInstructions [index] = newInstruction;
+ }
+
+ void RewriteConditionToNop (int index)
+ {
+ if (conditionInstrsToRemove == null)
+ conditionInstrsToRemove = new List ();
+
+ conditionInstrsToRemove.Add (index);
+ RewriteToNop (index);
+ }
+
+ void RewriteToNop (int index)
+ {
+ Rewrite (index, Instruction.Create (OpCodes.Nop));
+ }
+
+ public bool RewriteBody ()
+ {
+ if (FoldedInstructions == null)
+ return false;
+
+ if (!RemoveConditions ())
+ return false;
+
+ var reachableInstrs = GetReachableInstructionsMap (out var unreachableEH);
+ if (reachableInstrs == null)
+ return false;
+
+ var bodySweeper = new BodySweeper (Body, reachableInstrs, unreachableEH, context);
+ if (!bodySweeper.Initialize ()) {
+ context.LogMessage (MessageImportance.Low, $"Unreachable IL reduction is not supported for method '{Body.Method.FullName}'");
+ return false;
+ }
+
+ bodySweeper.Process (conditionInstrsToRemove);
+ InstructionsReplaced = bodySweeper.InstructionsReplaced;
+
+ return InstructionsReplaced > 0;
+ }
+
+ bool RemoveConditions ()
+ {
+ bool changed = false;
+ object left, right;
+
+ //
+ // Finds any branchable instruction and checks if the operand or operands
+ // can be evaluated as constant result.
+ //
+ // The logic does not remove any instructions but replaces them with nops for
+ // easier processing later (makes the mapping straigh-forward).
+ //
+ for (int i = 0; i < FoldedInstructions.Count; ++i) {
+ var instr = FoldedInstructions [i];
+ var opcode = instr.OpCode;
+
+ if (opcode.FlowControl == FlowControl.Cond_Branch) {
+ if (opcode.StackBehaviourPop == StackBehaviour.Pop1_pop1) {
+ if (!GetOperandsConstantValues (i, out left, out right))
+ continue;
+
+ if (left is int lint && right is int rint) {
+ RewriteToNop (i - 2);
+ RewriteToNop (i - 1);
+
+ if (IsComparisonAlwaysTrue (opcode, lint, rint)) {
+ Rewrite (i, Instruction.Create (OpCodes.Br, (Instruction)instr.Operand));
+ } else {
+ RewriteConditionToNop (i);
+ }
+
+ changed = true;
+ continue;
+ }
+
+ continue;
+ }
+
+ if (opcode.StackBehaviourPop == StackBehaviour.Popi) {
+ if (i > 0 && GetConstantValue (FoldedInstructions [i - 1], out var operand)) {
+ if (operand is int opint) {
+ RewriteToNop (i - 1);
+
+ if (IsConstantBranch (opcode, opint)) {
+ Rewrite (i, Instruction.Create (OpCodes.Br, (Instruction)instr.Operand));
+ } else {
+ RewriteConditionToNop (i);
+ }
+
+ changed = true;
+ continue;
+ }
+
+ if (operand is null && (opcode.Code == Code.Brfalse || opcode.Code == Code.Brfalse_S)) {
+ RewriteToNop (i - 1);
+ Rewrite (i, Instruction.Create (OpCodes.Br, (Instruction)instr.Operand));
+ changed = true;
+ continue;
+ }
+ }
+
+ // Common pattern generated by C# compiler in debug mode
+ if (i > 3 && GetConstantValue (FoldedInstructions [i - 3], out operand) && operand is int opint2 && IsPairedStlocLdloc (FoldedInstructions [i - 2], FoldedInstructions [i - 1])) {
+ RewriteToNop (i - 3);
+ RewriteToNop (i - 2);
+ RewriteToNop (i - 1);
+
+ if (IsConstantBranch (opcode, opint2)) {
+ Rewrite (i, Instruction.Create (OpCodes.Br, (Instruction)instr.Operand));
+ } else {
+ RewriteConditionToNop (i);
+ }
+
+ changed = true;
+ continue;
+ }
+
+ continue;
+ }
+
+ throw new NotImplementedException ();
+ }
+
+ // Mode special for csc in debug mode
+ switch (instr.OpCode.Code) {
+ case Code.Ceq:
+ case Code.Clt:
+ case Code.Cgt:
+ if (!GetOperandsConstantValues (i, out left, out right))
+ continue;
+
+ if (left is int lint && right is int rint) {
+ RewriteToNop (i - 2);
+ RewriteToNop (i - 1);
+
+ if (IsComparisonAlwaysTrue (instr.OpCode, lint, rint)) {
+ Rewrite (i, Instruction.Create (OpCodes.Ldc_I4_1));
+ } else {
+ Rewrite (i, Instruction.Create (OpCodes.Ldc_I4_0));
+ }
+
+ changed = true;
+ }
+
+ break;
+
+ case Code.Cgt_Un:
+ if (!GetOperandsConstantValues (i, out left, out right))
+ continue;
+
+ if (left == null && right == null) {
+ Rewrite (i, Instruction.Create (OpCodes.Ldc_I4_0));
+ }
+
+ changed = true;
+ break;
+ }
+ }
+
+ return changed;
+ }
+
+ BitArray GetReachableInstructionsMap (out List unreachableHandlers)
+ {
+ unreachableHandlers = null;
+ var reachable = new BitArray (FoldedInstructions.Count);
+
+ Stack condBranches = null;
+ bool exceptionHandlersChecked = !Body.HasExceptionHandlers;
+ Instruction target;
+ int i = 0;
+ while (true) {
+ while (i < FoldedInstructions.Count) {
+ if (reachable [i])
+ break;
+
+ reachable [i] = true;
+ var instr = FoldedInstructions [i++];
+
+ switch (instr.OpCode.FlowControl) {
+ case FlowControl.Branch:
+ target = (Instruction)instr.Operand;
+ i = GetInstructionIndex (target);
+ continue;
+
+ case FlowControl.Cond_Branch:
+ if (condBranches == null)
+ condBranches = new Stack ();
+
+ switch (instr.Operand) {
+ case Instruction starget:
+ condBranches.Push (GetInstructionIndex (starget));
+ continue;
+ case Instruction[] mtargets:
+ foreach (var t in mtargets)
+ condBranches.Push (GetInstructionIndex (t));
+ continue;
+ default:
+ throw new NotImplementedException ();
+ }
+
+ case FlowControl.Next:
+ case FlowControl.Call:
+ case FlowControl.Meta:
+ continue;
+
+ case FlowControl.Return:
+ case FlowControl.Throw:
+ break;
+
+ default:
+ throw new NotImplementedException ();
+ }
+
+ break;
+ }
+
+ if (condBranches?.Count > 0) {
+ i = condBranches.Pop ();
+ continue;
+ }
+
+ if (!exceptionHandlersChecked) {
+ exceptionHandlersChecked = true;
+
+ var instrs = Body.Instructions;
+ foreach (var handler in Body.ExceptionHandlers) {
+ int start = instrs.IndexOf (handler.TryStart);
+ int end = instrs.IndexOf (handler.TryEnd) - 1;
+
+ if (!HasAnyBitSet (reachable, start, end)) {
+ if (unreachableHandlers == null)
+ unreachableHandlers = new List ();
+
+ unreachableHandlers.Add (handler);
+ continue;
+ }
+
+ if (condBranches == null)
+ condBranches = new Stack ();
+
+ condBranches.Push (GetInstructionIndex (handler.HandlerStart));
+ }
+
+ if (condBranches?.Count > 0) {
+ i = condBranches.Pop ();
+ continue;
+ }
+ }
+
+ return reachable;
+ }
+ }
+
+ static bool HasAnyBitSet (BitArray bitArray, int startIndex, int endIndex)
+ {
+ for (int i = startIndex; i <= endIndex; ++i) {
+ if (bitArray [i])
+ return true;
+ }
+
+ return false;
+ }
+
+ //
+ // Returns index of instruction in folded instruction body
+ //
+ int GetInstructionIndex (Instruction instruction)
+ {
+ int idx;
+ if (mapping.TryGetValue (instruction, out idx))
+ return idx;
+
+ idx = FoldedInstructions.IndexOf (instruction);
+ Debug.Assert (idx >= 0);
+ return idx;
+ }
+
+ bool GetOperandsConstantValues (int index, out object left, out object right)
+ {
+ left = default;
+ right = default;
+
+ if (index < 2)
+ return false;
+
+ return GetConstantValue (FoldedInstructions [index - 2], out left) &&
+ GetConstantValue (FoldedInstructions [index - 1], out right);
+ }
+
+ static bool GetConstantValue (Instruction instruction, out object value)
+ {
+ switch (instruction.OpCode.Code) {
+ case Code.Ldc_I4_0:
+ value = 0;
+ return true;
+ case Code.Ldc_I4_1:
+ value = 1;
+ return true;
+ case Code.Ldc_I4_2:
+ value = 2;
+ return true;
+ case Code.Ldc_I4_3:
+ value = 3;
+ return true;
+ case Code.Ldc_I4_4:
+ value = 4;
+ return true;
+ case Code.Ldc_I4_5:
+ value = 5;
+ return true;
+ case Code.Ldc_I4_6:
+ value = 6;
+ return true;
+ case Code.Ldc_I4_7:
+ value = 7;
+ return true;
+ case Code.Ldc_I4_8:
+ value = 8;
+ return true;
+ case Code.Ldc_I4_M1:
+ value = -1;
+ return true;
+ case Code.Ldc_I4:
+ value = (int)instruction.Operand;
+ return true;
+ case Code.Ldc_I4_S:
+ value = (int)(sbyte)instruction.Operand;
+ return true;
+ case Code.Ldc_I8:
+ value = (long)instruction.Operand;
+ return true;
+ case Code.Ldnull:
+ value = null;
+ return true;
+ default:
+ value = null;
+ return false;
+ }
+ }
+
+ static bool IsPairedStlocLdloc (Instruction first, Instruction second)
+ {
+ switch (first.OpCode.Code) {
+ case Code.Stloc_0:
+ return second.OpCode.Code == Code.Ldloc_0;
+ case Code.Stloc_1:
+ return second.OpCode.Code == Code.Ldloc_1;
+ case Code.Stloc_2:
+ return second.OpCode.Code == Code.Ldloc_2;
+ case Code.Stloc_3:
+ return second.OpCode.Code == Code.Ldloc_3;
+ case Code.Stloc_S:
+ case Code.Stloc:
+ if (second.OpCode.Code == Code.Ldloc_S || second.OpCode.Code == Code.Ldloc)
+ return ((VariableDefinition)first.Operand).Index == ((VariableDefinition)second.Operand).Index;
+
+ break;
+ }
+
+ return false;
+ }
+
+ static bool IsComparisonAlwaysTrue (OpCode opCode, int left, int right)
+ {
+ switch (opCode.Code) {
+ case Code.Beq:
+ case Code.Beq_S:
+ case Code.Ceq:
+ return left == right;
+ case Code.Bne_Un:
+ case Code.Bne_Un_S:
+ return left != right;
+ case Code.Bge:
+ case Code.Bge_S:
+ case Code.Bge_Un:
+ case Code.Bge_Un_S:
+ return left >= right;
+ case Code.Bgt:
+ case Code.Bgt_S:
+ case Code.Bgt_Un:
+ case Code.Bgt_Un_S:
+ case Code.Cgt:
+ return left > right;
+ case Code.Ble:
+ case Code.Ble_S:
+ case Code.Ble_Un:
+ case Code.Ble_Un_S:
+ return left <= right;
+ case Code.Blt:
+ case Code.Blt_S:
+ case Code.Blt_Un:
+ case Code.Blt_Un_S:
+ case Code.Clt:
+ return left < right;
+ }
+
+ throw new NotImplementedException (opCode.ToString ());
+ }
+
+ static bool IsConstantBranch (OpCode opCode, int operand)
+ {
+ switch (opCode.Code) {
+ case Code.Brfalse:
+ case Code.Brfalse_S:
+ return operand == 0;
+ case Code.Brtrue:
+ case Code.Brtrue_S:
+ return operand != 0;
+ }
+
+ throw new NotImplementedException (opCode.ToString ());
+ }
+ }
+
+ struct BodySweeper
+ {
+ readonly MethodBody body;
+ readonly BitArray reachable;
+ readonly List unreachableExceptionHandlers;
+ readonly LinkContext context;
+ ILProcessor ilprocessor;
+ List returnInits;
+
+ public BodySweeper (MethodBody body, BitArray reachable, List unreachableEH, LinkContext context)
+ {
+ this.body = body;
+ this.reachable = reachable;
+ this.unreachableExceptionHandlers = unreachableEH;
+ this.context = context;
+
+ InstructionsReplaced = 0;
+ ilprocessor = null;
+ returnInits = null;
+ }
+
+ public int InstructionsReplaced { get; set; }
+
+ public bool Initialize ()
+ {
+ var instrs = body.Instructions;
+
+ if (body.HasExceptionHandlers) {
+ foreach (var handler in body.ExceptionHandlers) {
+ if (unreachableExceptionHandlers?.Contains (handler) == true)
+ continue;
+
+ // Cecil TryEnd is off by 1 instruction
+ var handlerEnd = handler.TryEnd.Previous;
+
+ switch (handlerEnd.OpCode.Code) {
+ case Code.Leave:
+ case Code.Leave_S:
+ //
+ // Keep original leave to correctly mark handler exit
+ //
+ int index = instrs.IndexOf (handlerEnd);
+ reachable [index] = true;
+ break;
+ default:
+ Debug.Fail ("Exception handler without leave instruction");
+ return false;
+ }
+ }
+ }
+
+ //
+ // Makes the unreachable code at the end of method valid/verifiable
+ //
+ if (body.Method.ReturnType.MetadataType != MetadataType.Void && instrs.Count > 1) {
+ var retExprIndex = instrs.Count - 2;
+
+ if (!reachable [retExprIndex]) {
+ if (returnInits == null)
+ returnInits = new List ();
+
+ returnInits.Add (retExprIndex);
+ }
+ }
+
+ //
+ // Reusing same reachable map to force skipping processing for instructions
+ // which will remain same
+ //
+ for (int i = 0; i < instrs.Count; ++i) {
+ if (reachable [i])
+ continue;
+
+ var instr = instrs [i];
+ switch (instr.OpCode.Code) {
+ case Code.Nop:
+ reachable [i] = true;
+ continue;
+
+ case Code.Ret:
+ if (i == instrs.Count - 1)
+ reachable [i] = true;
+
+ break;
+ }
+ }
+
+ ilprocessor = body.GetILProcessor ();
+ return true;
+ }
+
+ public void Process (List conditionInstrsToRemove)
+ {
+ List removedVariablesReferences = null;
+ Dictionary injectingInstructions = null;
+
+ //
+ // Initial pass which replaces unreachable instructions with nops or
+ // ret/leave to keep the body verifiable
+ //
+ var instrs = body.Instructions;
+ for (int i = 0; i < instrs.Count; ++i) {
+ if (reachable [i])
+ continue;
+
+ var instr = instrs [i];
+
+ Instruction newInstr;
+ if (returnInits?.Contains (i) == true) {
+ newInstr = GetReturnInitialization (out var initInstructions);
+
+ //
+ // Any new instruction injection needs to be postponed until reachableMap
+ // is fully processed to simplify the logic and avoid any re-indexing
+ //
+ if (initInstructions != null) {
+ if (injectingInstructions == null)
+ injectingInstructions = new Dictionary ();
+ injectingInstructions.Add (newInstr, initInstructions);
+ }
+ } else if (i == instrs.Count - 1) {
+ newInstr = Instruction.Create (OpCodes.Ret);
+ } else {
+ newInstr = Instruction.Create (OpCodes.Nop);
+ }
+
+ ilprocessor.Replace (i, newInstr);
+ InstructionsReplaced++;
+
+ VariableDefinition variable = GetVariableReference (instr);
+ if (variable != null) {
+ if (removedVariablesReferences == null)
+ removedVariablesReferences = new List ();
+ if (!removedVariablesReferences.Contains (variable))
+ removedVariablesReferences.Add (variable);
+ }
+ }
+
+ CleanExceptionHandlers ();
+
+ //
+ // Process list of conditional jump which should be removed. They cannot be
+ // replaced with nops as they alter the stack
+ //
+ if (conditionInstrsToRemove != null) {
+ int bodyExpansion = 0;
+
+ foreach (int instrIndex in conditionInstrsToRemove) {
+ var index = instrIndex + bodyExpansion;
+ var instr = instrs [index];
+
+ switch (instr.OpCode.StackBehaviourPop) {
+ case StackBehaviour.Pop1_pop1:
+
+ InstructionsReplaced += 2;
+
+ //
+ // One of the operands is most likely constant and could just be removed instead of additional pop
+ //
+ if (index > 0 && IsSideEffectFreeLoad (instrs [index - 1])) {
+ ilprocessor.Replace (index - 1, Instruction.Create (OpCodes.Pop));
+ ilprocessor.Replace (index, Instruction.Create (OpCodes.Nop));
+ } else {
+ var pop = Instruction.Create (OpCodes.Pop);
+ ilprocessor.Replace (index, pop);
+ ilprocessor.InsertAfter (pop, Instruction.Create (OpCodes.Pop));
+
+ //
+ // conditionInstrsToRemove is always sorted and instead of
+ // increasing remaining indexes we introduce index delta value
+ //
+ bodyExpansion++;
+ }
+ break;
+ case StackBehaviour.Popi:
+ ilprocessor.Replace (index, Instruction.Create (OpCodes.Pop));
+ InstructionsReplaced++;
+ break;
+ }
+ }
+ }
+
+ //
+ // To this point the original and modified bodies had exactly same number of
+ // instructions
+ //
+ if (injectingInstructions != null) {
+ foreach (var key in injectingInstructions) {
+ int index = instrs.IndexOf (key.Key);
+ Debug.Assert (index >= 0);
+
+ var newInstrs = key.Value;
+ index--;
+
+ // TODO: Simplify when Cecil has better API
+ if (IsNopRange (instrs, index, newInstrs.Length)) {
+ int counter = 0;
+ for (int i = index - newInstrs.Length + 1; i <= index; i++) {
+ ilprocessor.Replace (i, newInstrs [counter++]);
+ }
+ } else {
+ // FIXME: This could break short range jumps. We could fix
+ // that during final il optimization step once we have it
+ for (int i = newInstrs.Length; i != 0; i--) {
+ ilprocessor.InsertAfter (index, newInstrs [i - 1]);
+ }
+ }
+ }
+ }
+
+ //
+ // Replacing instructions with nops can make local variables unused. Process them
+ // as the last step to reduce more type dependencies
+ //
+ if (removedVariablesReferences != null) {
+ CleanRemovedVariables (removedVariablesReferences);
+ }
+ }
+
+ Instruction GetReturnInitialization (out Instruction[] initInstructions)
+ {
+ var cinstr = CodeRewriterStep.CreateConstantResultInstruction (body.Method.ReturnType);
+ if (cinstr != null) {
+ initInstructions = null;
+ return cinstr;
+ }
+
+ var rtype = body.Method.ReturnType;
+
+ switch (rtype.MetadataType) {
+ case MetadataType.MVar:
+ case MetadataType.ValueType:
+ var vd = new VariableDefinition (rtype);
+ body.Variables.Add (vd);
+ body.InitLocals = true;
+
+ initInstructions = new [] {
+ Instruction.Create (OpCodes.Ldloca_S, vd),
+ Instruction.Create (OpCodes.Initobj, rtype)
+ };
+
+ return CreateVariableLoadingInstruction (vd);
+ case MetadataType.Pointer:
+ case MetadataType.IntPtr:
+ case MetadataType.UIntPtr:
+ initInstructions = new [] {
+ Instruction.Create (OpCodes.Ldc_I4_0)
+ };
+
+ return Instruction.Create (OpCodes.Conv_I);
+ }
+
+ throw new NotImplementedException ($"Initialization of return value in method '{body.Method.FullName}'");
+ }
+
+ void CleanRemovedVariables (List variables)
+ {
+ foreach (var instr in body.Instructions) {
+ VariableDefinition variable = GetVariableReference (instr);
+ if (variable == null)
+ continue;
+
+ if (!variables.Remove (variable))
+ continue;
+
+ if (variables.Count == 0)
+ return;
+ }
+
+ variables.Sort ((a, b) => b.Index.CompareTo (a.Index));
+ var body_variables = body.Variables;
+
+ foreach (var variable in variables) {
+ var index = body_variables.IndexOf (variable);
+
+ //
+ // Remove variable only if it's the last one. Instead of
+ // re-indexing all variables we mark change it to object,
+ // which is enough to drop the dependency
+ //
+ if (index == body_variables.Count - 1) {
+ body_variables.RemoveAt (index);
+ } else {
+ var objectType = BCL.FindPredefinedType ("System", "Object", context);
+ if (objectType == null)
+ throw new NotSupportedException ("Missing predefined 'System.Object' type");
+
+ body_variables [index].VariableType = objectType;
+ }
+ }
+ }
+
+ void CleanExceptionHandlers ()
+ {
+ if (unreachableExceptionHandlers == null)
+ return;
+
+ foreach (var eh in unreachableExceptionHandlers)
+ body.ExceptionHandlers.Remove (eh);
+ }
+
+ static Instruction CreateVariableLoadingInstruction (VariableDefinition variable)
+ {
+ switch (variable.Index) {
+ case 0:
+ return Instruction.Create (OpCodes.Ldloc_0);
+ case 1:
+ return Instruction.Create (OpCodes.Ldloc_1);
+ case 2:
+ return Instruction.Create (OpCodes.Ldloc_2);
+ case 3:
+ return Instruction.Create (OpCodes.Ldloc_3);
+ default:
+ return variable.Index < 256 ?
+ Instruction.Create (OpCodes.Ldloc_S, variable) :
+ Instruction.Create (OpCodes.Ldloc, variable);
+ }
+ }
+
+ VariableDefinition GetVariableReference (Instruction instruction)
+ {
+ switch (instruction.OpCode.Code) {
+ case Code.Stloc_0:
+ case Code.Ldloc_0:
+ return body.Variables [0];
+ case Code.Stloc_1:
+ case Code.Ldloc_1:
+ return body.Variables [1];
+ case Code.Stloc_2:
+ case Code.Ldloc_2:
+ return body.Variables [2];
+ case Code.Stloc_3:
+ case Code.Ldloc_3:
+ return body.Variables [3];
+ }
+
+ if (instruction.Operand is VariableReference vr)
+ return vr.Resolve ();
+
+ return null;
+ }
+
+ static bool IsNopRange (Collection collection, int startIndex, int count)
+ {
+ if (startIndex - count < 0)
+ return false;
+
+ while (count-- > 0) {
+ if (collection [startIndex--].OpCode != OpCodes.Nop)
+ return false;
+ }
+
+ return true;
+ }
+
+ static bool IsSideEffectFreeLoad (Instruction instr)
+ {
+ switch (instr.OpCode.Code) {
+ case Code.Ldarg:
+ case Code.Ldloc:
+ case Code.Ldloc_0:
+ case Code.Ldloc_1:
+ case Code.Ldloc_2:
+ case Code.Ldloc_3:
+ case Code.Ldloc_S:
+ case Code.Ldc_I4_0:
+ case Code.Ldc_I4_1:
+ case Code.Ldc_I4_2:
+ case Code.Ldc_I4_3:
+ case Code.Ldc_I4_4:
+ case Code.Ldc_I4_5:
+ case Code.Ldc_I4_6:
+ case Code.Ldc_I4_7:
+ case Code.Ldc_I4_8:
+ case Code.Ldc_I4:
+ case Code.Ldc_I4_S:
+ case Code.Ldc_I4_M1:
+ case Code.Ldc_I8:
+ case Code.Ldc_R4:
+ case Code.Ldc_R8:
+ case Code.Ldnull:
+ case Code.Ldstr:
+ return true;
+ }
+
+ return false;
+ }
+ }
+
+ struct ConstantExpressionMethodAnalyzer
+ {
+ readonly MethodDefinition method;
+ readonly Collection instructions;
+
+ Stack stack_instr;
+ Dictionary locals;
+
+ public ConstantExpressionMethodAnalyzer (MethodDefinition method)
+ {
+ this.method = method;
+ instructions = method.Body.Instructions;
+ stack_instr = null;
+ locals = null;
+ Result = null;
+ }
+
+ public ConstantExpressionMethodAnalyzer (MethodDefinition method, Collection instructions)
+ {
+ this.method = method;
+ this.instructions = instructions;
+ stack_instr = null;
+ locals = null;
+ Result = null;
+ }
+
+ public Instruction Result { get; private set; }
+
+ public bool Analyze ()
+ {
+ var body = method.Body;
+ if (body.HasExceptionHandlers)
+ return false;
+
+ VariableReference vr;
+ Instruction jmpTarget = null;
+ Instruction linstr;
+
+ foreach (var instr in instructions) {
+ if (jmpTarget != null) {
+ if (instr != jmpTarget)
+ continue;
+
+ jmpTarget = null;
+ }
+
+ switch (instr.OpCode.Code) {
+ case Code.Nop:
+ continue;
+ case Code.Pop:
+ stack_instr.Pop ();
+ continue;
+
+ case Code.Br_S:
+ case Code.Br:
+ jmpTarget = (Instruction)instr.Operand;
+ continue;
+
+ case Code.Ldc_I4:
+ case Code.Ldc_I4_S:
+ case Code.Ldc_I4_0:
+ case Code.Ldc_I4_1:
+ case Code.Ldc_I4_2:
+ case Code.Ldc_I4_3:
+ case Code.Ldc_I4_4:
+ case Code.Ldc_I4_5:
+ case Code.Ldc_I4_6:
+ case Code.Ldc_I4_7:
+ case Code.Ldc_I4_8:
+ case Code.Ldc_I4_M1:
+ case Code.Ldc_I8:
+ case Code.Ldnull:
+ case Code.Ldstr:
+ case Code.Ldtoken:
+ PushOnStack (instr);
+ continue;
+
+ case Code.Ldloc_0:
+ linstr = GetLocalsValue (0, body);
+ if (linstr == null)
+ return false;
+
+ PushOnStack (linstr);
+ continue;
+ case Code.Ldloc_1:
+ linstr = GetLocalsValue (1, body);
+ if (linstr == null)
+ return false;
+
+ PushOnStack (linstr);
+ continue;
+ case Code.Ldloc_2:
+ linstr = GetLocalsValue (2, body);
+ if (linstr == null)
+ return false;
+
+ PushOnStack (linstr);
+ continue;
+ case Code.Ldloc_3:
+ linstr = GetLocalsValue (3, body);
+ if (linstr == null)
+ return false;
+
+ PushOnStack (linstr);
+ continue;
+ case Code.Ldloc:
+ case Code.Ldloc_S:
+ vr = (VariableReference)instr.Operand;
+ linstr = GetLocalsValue (vr.Index, body);
+ if (linstr == null)
+ return false;
+
+ PushOnStack (linstr);
+ continue;
+ case Code.Stloc_0:
+ StoreToLocals (0);
+ continue;
+ case Code.Stloc_1:
+ StoreToLocals (1);
+ continue;
+ case Code.Stloc_2:
+ StoreToLocals (2);
+ continue;
+ case Code.Stloc_3:
+ StoreToLocals (3);
+ continue;
+ case Code.Stloc_S:
+ case Code.Stloc:
+ vr = (VariableReference)instr.Operand;
+ StoreToLocals (vr.Index);
+ continue;
+
+ // TODO: handle simple conversions
+ //case Code.Conv_I:
+
+ case Code.Ret:
+ if (ConvertStackToResult ())
+ return true;
+
+ break;
+ }
+
+ return false;
+ }
+
+ return false;
+ }
+
+ bool ConvertStackToResult ()
+ {
+ if (stack_instr == null)
+ return false;
+
+ if (stack_instr.Count != 1)
+ return false;
+
+ var instr = stack_instr.Pop ();
+
+ switch (instr.OpCode.Code) {
+ case Code.Ldc_I4_0:
+ case Code.Ldc_I4_1:
+ case Code.Ldc_I4_2:
+ case Code.Ldc_I4_3:
+ case Code.Ldc_I4_4:
+ case Code.Ldc_I4_5:
+ case Code.Ldc_I4_6:
+ case Code.Ldc_I4_7:
+ case Code.Ldc_I4_8:
+ case Code.Ldc_I4:
+ case Code.Ldc_I4_S:
+ case Code.Ldc_I4_M1:
+ case Code.Ldc_I8:
+ case Code.Ldnull:
+ case Code.Ldstr:
+ Result = instr;
+ return true;
+ }
+
+ return false;
+ }
+
+ Instruction GetLocalsValue (int index, MethodBody body)
+ {
+ var instr = locals? [index];
+ if (instr != null)
+ return instr;
+
+ if (!body.InitLocals)
+ return null;
+
+ // local variables don't need to be explicitly initialized
+ return CodeRewriterStep.CreateConstantResultInstruction (body.Variables [index].VariableType);
+ }
+
+ void PushOnStack (Instruction instruction)
+ {
+ if (stack_instr == null)
+ stack_instr = new Stack ();
+
+ stack_instr.Push (instruction);
+ }
+
+ void StoreToLocals (int index)
+ {
+ if (locals == null)
+ locals = new Dictionary ();
+
+ locals [index] = stack_instr.Pop ();
+ }
+ }
+ }
+}
diff --git a/external/linker/src/linker/Linker.Steps/ResolveFromAssemblyStep.cs b/external/linker/src/linker/Linker.Steps/ResolveFromAssemblyStep.cs
index a6db52b127..f8a350a08e 100644
--- a/external/linker/src/linker/Linker.Steps/ResolveFromAssemblyStep.cs
+++ b/external/linker/src/linker/Linker.Steps/ResolveFromAssemblyStep.cs
@@ -63,8 +63,13 @@ namespace Mono.Linker.Steps
if (_assembly != null)
Context.Resolver.CacheAssembly (_assembly);
- AssemblyDefinition assembly = _assembly ?? Context.Resolve (_file);
+ var ignoreUnresolved = Context.Resolver.IgnoreUnresolved;
+ if (_rootVisibility == RootVisibility.PublicAndFamily) {
+ Context.Resolver.IgnoreUnresolved = false;
+ }
+ AssemblyDefinition assembly = _assembly ?? Context.Resolve (_file);
+ Context.Resolver.IgnoreUnresolved = ignoreUnresolved;
if (_rootVisibility != RootVisibility.Any && HasInternalsVisibleTo (assembly)) {
_rootVisibility = RootVisibility.PublicAndFamilyAndAssembly;
}
diff --git a/external/linker/src/linker/Linker.Steps/ResolveFromXmlStep.cs b/external/linker/src/linker/Linker.Steps/ResolveFromXmlStep.cs
index 83c72205d4..bb4febed88 100644
--- a/external/linker/src/linker/Linker.Steps/ResolveFromXmlStep.cs
+++ b/external/linker/src/linker/Linker.Steps/ResolveFromXmlStep.cs
@@ -462,18 +462,23 @@ namespace Mono.Linker.Steps {
{
if (type.HasMethods)
foreach (MethodDefinition meth in type.Methods)
- if (signature == GetMethodSignature (meth))
+ if (signature == GetMethodSignature (meth, false))
return meth;
return null;
}
- static string GetMethodSignature (MethodDefinition meth)
+ public static string GetMethodSignature (MethodDefinition meth, bool includeGenericParameters)
{
StringBuilder sb = new StringBuilder ();
sb.Append (meth.ReturnType.FullName);
sb.Append (" ");
sb.Append (meth.Name);
+ if (includeGenericParameters && meth.HasGenericParameters) {
+ sb.Append ("`");
+ sb.Append (meth.GenericParameters.Count);
+ }
+
sb.Append ("(");
if (meth.HasParameters) {
for (int i = 0; i < meth.Parameters.Count; i++) {
diff --git a/external/linker/src/linker/Linker/Annotations.cs b/external/linker/src/linker/Linker/Annotations.cs
index 8530ab04f8..627d8121ea 100644
--- a/external/linker/src/linker/Linker/Annotations.cs
+++ b/external/linker/src/linker/Linker/Annotations.cs
@@ -39,6 +39,10 @@ namespace Mono.Linker {
protected readonly Dictionary assembly_actions = new Dictionary ();
protected readonly Dictionary method_actions = new Dictionary ();
+ protected readonly Dictionary method_stub_values = new Dictionary ();
+ protected readonly Dictionary field_values = new Dictionary ();
+ protected readonly HashSet field_init = new HashSet ();
+ protected readonly HashSet fieldType_init = new HashSet ();
protected readonly HashSet marked = new HashSet ();
protected readonly HashSet processed = new HashSet ();
protected readonly Dictionary preserved_types = new Dictionary ();
@@ -71,14 +75,13 @@ namespace Mono.Linker {
[Obsolete ("Use Tracer in LinkContext directly")]
public void PrepareDependenciesDump ()
{
- Tracer.Start ();
+ Tracer.AddRecorder (new XmlDependencyRecorder (context));
}
[Obsolete ("Use Tracer in LinkContext directly")]
public void PrepareDependenciesDump (string filename)
{
- Tracer.DependenciesFileName = filename;
- Tracer.Start ();
+ Tracer.AddRecorder (new XmlDependencyRecorder (context, filename));
}
public ICollection GetAssemblies ()
@@ -119,6 +122,36 @@ namespace Mono.Linker {
method_actions [method] = action;
}
+ public void SetMethodStubValue (MethodDefinition method, object value)
+ {
+ method_stub_values [method] = value;
+ }
+
+ public void SetFieldValue (FieldDefinition field, object value)
+ {
+ field_values [field] = value;
+ }
+
+ public void SetSubstitutedInit (FieldDefinition field)
+ {
+ field_init.Add (field);
+ }
+
+ public bool HasSubstitutedInit (FieldDefinition field)
+ {
+ return field_init.Contains (field);
+ }
+
+ public void SetSubstitutedInit (TypeDefinition type)
+ {
+ fieldType_init.Add (type);
+ }
+
+ public bool HasSubstitutedInit (TypeDefinition type)
+ {
+ return fieldType_init.Contains (type);
+ }
+
public void Mark (IMetadataTokenProvider provider)
{
marked.Add (provider);
@@ -233,6 +266,16 @@ namespace Mono.Linker {
return preserved_types.TryGetValue (type, out preserve);
}
+ public bool TryGetMethodStubValue (MethodDefinition method, out object value)
+ {
+ return method_stub_values.TryGetValue (method, out value);
+ }
+
+ public bool TryGetFieldUserValue (FieldDefinition field, out object value)
+ {
+ return field_values.TryGetValue (field, out value);
+ }
+
public HashSet GetResourcesToRemove (AssemblyDefinition assembly)
{
HashSet resources;
diff --git a/external/linker/src/linker/Linker/BCL.cs b/external/linker/src/linker/Linker/BCL.cs
index 1bc1683da6..b4f62ce88b 100644
--- a/external/linker/src/linker/Linker/BCL.cs
+++ b/external/linker/src/linker/Linker/BCL.cs
@@ -60,22 +60,27 @@ namespace Mono.Linker
return true;
}
+ static readonly string[] corlibNames = new [] {
+ "mscorlib",
+ "System.Runtime",
+ "System.Private.CoreLib",
+ "netstandard"
+ };
+
public static TypeDefinition FindPredefinedType (string ns, string name, LinkContext context)
{
var cache = context.Resolver.AssemblyCache;
- AssemblyDefinition corlib;
- TypeDefinition type = null;
- if (cache.TryGetValue ("mscorlib", out corlib)) {
- type = corlib.MainModule.GetType (ns, name);
+ foreach (var corlibName in corlibNames) {
+ if (!cache.TryGetValue (corlibName, out AssemblyDefinition corlib))
+ continue;
+
+ TypeDefinition type = corlib.MainModule.GetType (ns, name);
// The assembly could be a facade with type forwarders, in which case we don't find the type in this assembly.
if (type != null)
return type;
}
- if (cache.TryGetValue ("System.Private.CoreLib", out corlib))
- return corlib.MainModule.GetType (ns, name);
-
return null;
}
}
diff --git a/external/linker/src/linker/Linker/Driver.cs b/external/linker/src/linker/Linker/Driver.cs
index 8990ee5831..abfd2665f7 100644
--- a/external/linker/src/linker/Linker/Driver.cs
+++ b/external/linker/src/linker/Linker/Driver.cs
@@ -29,7 +29,6 @@
using System;
using System.IO;
using System.Collections.Generic;
-using System.Linq;
using System.Text;
using System.Xml.XPath;
@@ -40,9 +39,11 @@ namespace Mono.Linker {
public partial class Driver {
#if FEATURE_ILLINK
+ const string resolvers = "-a|-r|-x";
static readonly string _linker = "IL Linker";
#else
- static readonly string _linker = "Mono CIL Linker";
+ const string resolvers = "-a|-i|-r|-x";
+ static readonly string _linker = "Mono IL Linker";
#endif
public static int Main (string [] args)
@@ -52,13 +53,19 @@ namespace Mono.Linker {
public static int Execute (string[] args, ILogger customLogger = null)
{
- if (args.Length == 0)
- Usage ("No parameters specified");
+ if (args.Length == 0) {
+ Console.Error.WriteLine ("No parameters specified");
+ return 1;
+ }
+
+ if (!ProcessResponseFile (args, out var arguments))
+ return 1;
try {
- Driver driver = new Driver (args);
- driver.Run (customLogger);
+ Driver driver = new Driver (arguments);
+ if (!driver.Run (customLogger))
+ return 1;
} catch {
Console.Error.WriteLine ("Fatal error in {0}", _linker);
@@ -68,17 +75,17 @@ namespace Mono.Linker {
return 0;
}
- Queue _queue;
+ readonly Queue arguments;
bool _needAddBypassNGenStep;
- public Driver (string [] args)
+ public Driver (Queue arguments)
{
- _queue = ProcessResponseFile (args);
+ this.arguments = arguments;
}
- Queue ProcessResponseFile (string [] args)
+ public static bool ProcessResponseFile (string[] args, out Queue result)
{
- var result = new Queue ();
+ result = new Queue ();
foreach (string arg in args) {
if (arg.StartsWith ("@")) {
try {
@@ -86,13 +93,15 @@ namespace Mono.Linker {
IEnumerable responseFileLines = File.ReadLines (responseFileName);
ParseResponseFileLines (responseFileLines, result);
} catch (Exception e) {
- Usage ("Cannot read response file with exception " + e.Message);
+ Console.Error.WriteLine ("Cannot read response file due to '{0}'", e.Message);
+ return false;
}
} else {
result.Enqueue (arg);
}
}
- return result;
+
+ return true;
}
public static void ParseResponseFileLines (IEnumerable responseFileLines, Queue result)
@@ -141,54 +150,64 @@ namespace Mono.Linker {
}
}
- bool HaveMoreTokens ()
+ static void ErrorUnrecognizedOption (string optionName)
{
- return _queue.Count > 0;
+ Console.WriteLine ($"Unrecognized command-line option: '{optionName}'");
}
- public void Run (ILogger customLogger = null)
+ static void ErrorMissingArgument (string optionName)
+ {
+ Console.WriteLine ($"Missing argument for '{optionName}' option");
+ }
+
+ public bool Run (ILogger customLogger = null)
{
Pipeline p = GetStandardPipeline ();
using (LinkContext context = GetDefaultContext (p)) {
if (customLogger != null)
context.Logger = customLogger;
+#if !FEATURE_ILLINK
I18nAssemblies assemblies = I18nAssemblies.All;
+#endif
var custom_steps = new List ();
var excluded_features = new HashSet (StringComparer.Ordinal);
var disabled_optimizations = new HashSet (StringComparer.Ordinal);
var enabled_optimizations = new HashSet (StringComparer.Ordinal);
bool dumpDependencies = false;
+ string dependenciesFileName = null;
bool ignoreDescriptors = false;
bool removeCAS = true;
+ bool new_mvid_used = false;
+ bool deterministic_used = false;
bool resolver = false;
- while (HaveMoreTokens ()) {
- string token = GetParam ();
- if (token.Length < 2)
- Usage ("Option is too short");
-
- if (!(token [0] == '-' || token [1] == '/'))
- Usage ("Expecting an option, got instead: " + token);
+ while (arguments.Count > 0) {
+ string token = arguments.Dequeue ();
+ if (token.Length < 2) {
+ ErrorUnrecognizedOption (token);
+ return false;
+ }
+ //
+ // Handling of --value like options
+ //
if (token [0] == '-' && token [1] == '-') {
-
- if (token.Length < 3)
- Usage ("Option is too short");
-
switch (token) {
case "--skip-unresolved":
- bool ignoreUnresolved = bool.Parse (GetParam ());
- context.IgnoreUnresolved = ignoreUnresolved;
- context.Resolver.IgnoreUnresolved = ignoreUnresolved;
+ if (!GetBoolParam (token, l => context.IgnoreUnresolved = context.Resolver.IgnoreUnresolved = l))
+ return false;
+
continue;
-
+
case "--verbose":
context.LogMessages = true;
continue;
case "--dependencies-file":
- context.Tracer.DependenciesFileName = GetParam ();
+ if (!GetStringParam (token, l => dependenciesFileName = l))
+ return false;
+
continue;
case "--dump-dependencies":
@@ -196,203 +215,280 @@ namespace Mono.Linker {
continue;
case "--reduced-tracing":
- context.EnableReducedTracing = bool.Parse (GetParam ());
+ if (!GetBoolParam (token, l => context.EnableReducedTracing = l))
+ return false;
+
continue;
case "--used-attrs-only":
- context.KeepUsedAttributeTypesOnly = bool.Parse (GetParam ());
+ if (!GetBoolParam (token, l => context.KeepUsedAttributeTypesOnly = l))
+ return false;
+
continue;
case "--strip-security":
- removeCAS = bool.Parse (GetParam ());
+ if (!GetBoolParam (token, l => removeCAS = l))
+ return false;
+
continue;
case "--strip-resources":
- context.StripResources = bool.Parse (GetParam ());
+ if (!GetBoolParam (token, l => context.StripResources = l))
+ return false;
+
+ continue;
+
+ case "--substitutions":
+ if (arguments.Count < 1) {
+ ErrorMissingArgument (token);
+ return false;
+ }
+
+ if (!GetStringParam (token, l => context.AddSubstitutionFile (l)))
+ return false;
+
continue;
case "--exclude-feature":
- var name = GetParam ();
- foreach (var feature in name.Split (',')) {
- if (!excluded_features.Contains (feature))
- excluded_features.Add (feature);
+ if (arguments.Count < 1) {
+ ErrorMissingArgument (token);
+ return false;
}
+
+ if (!GetStringParam (token, l => {
+ foreach (var feature in l.Split (',')) {
+ if (!excluded_features.Contains (feature))
+ excluded_features.Add (feature);
+ }
+ }))
+ return false;
+
continue;
case "--explicit-reflection":
- context.AddReflectionAnnotations = true;
+ if (!GetBoolParam (token, l => context.AddReflectionAnnotations = l))
+ return false;
+
continue;
case "--custom-step":
- custom_steps.Add (GetParam ());
+ if (!GetStringParam (token, l => custom_steps.Add (l)))
+ return false;
+
continue;
case "--keep-facades":
- context.KeepTypeForwarderOnlyAssemblies = bool.Parse (GetParam ());
+ if (!GetBoolParam (token, l => context.KeepTypeForwarderOnlyAssemblies = l))
+ return false;
+
continue;
case "--keep-dep-attributes":
- context.KeepDependencyAttributes = bool.Parse (GetParam ());
+ if (!GetBoolParam (token, l => context.KeepDependencyAttributes = l))
+ return false;
+
continue;
case "--ignore-descriptors":
- ignoreDescriptors = bool.Parse (GetParam ());
+ if (!GetBoolParam (token, l => ignoreDescriptors = l))
+ return false;
+
continue;
case "--disable-opt":
- var opt = GetParam ().ToLower ();
- if (!disabled_optimizations.Contains (opt))
- disabled_optimizations.Add (opt);
+ if (!GetStringParam (token, l => {
+ var opt = l.ToLowerInvariant ();
+ if (!disabled_optimizations.Contains (opt))
+ disabled_optimizations.Add (opt);
+ }))
+ return false;
continue;
case "--enable-opt":
- opt = GetParam ().ToLower ();
- if (!enabled_optimizations.Contains (opt))
- enabled_optimizations.Add (opt);
+ if (!GetStringParam (token, l => {
+ var opt = l.ToLowerInvariant ();
+ if (!enabled_optimizations.Contains (opt))
+ enabled_optimizations.Add (opt);
+ }))
+ return false;
continue;
case "--new-mvid":
- if (!bool.Parse (GetParam()))
- p.RemoveStep (typeof (RegenerateGuidStep));
+ //
+ // This is not same as --deterministic which calculates MVID
+ // from stable assembly content. This option creates a new random
+ // mvid or uses mvid of the source assembly.
+ //
+ if (!GetBoolParam (token, l => {
+ if (!l)
+ p.RemoveStep (typeof (RegenerateGuidStep));
+ }))
+ return false;
+
+ new_mvid_used = true;
continue;
case "--deterministic":
- context.DeterministicOutput = true;
- p.RemoveStep (typeof (RegenerateGuidStep));
+ if (!GetBoolParam (token, l => context.DeterministicOutput = l))
+ return false;
+
+ deterministic_used = true;
continue;
case "--output-assemblylist":
- context.AssemblyListFile = GetParam ();
+ if (!GetStringParam (token, l => context.AssemblyListFile = l))
+ return false;
+
+ continue;
+
+ case "--version":
+ Version ();
+ return true;
+
+ case "--about":
+ About ();
+ return true;
+ }
+ }
+
+ if (token [0] == '-' || token [1] == '/') {
+
+ switch (token.Substring (1)) {
+ case "d":
+ if (!GetStringParam (token, l => {
+ DirectoryInfo info = new DirectoryInfo (l);
+ context.Resolver.AddSearchDirectory (info.FullName);
+ }))
+ return false;
+
+ continue;
+ case "o":
+ case "out":
+ if (!GetStringParam (token, l => context.OutputDirectory = l))
+ return false;
+
+ continue;
+ case "c":
+ if (!GetStringParam (token, l => context.CoreAction = ParseAssemblyAction (l)))
+ return false;
+
+ continue;
+ case "u":
+ if (!GetStringParam (token, l => context.UserAction = ParseAssemblyAction (l)))
+ return false;
+
+ continue;
+ case "p":
+ if (arguments.Count < 2) {
+ ErrorMissingArgument (token);
+ return false;
+ }
+
+ AssemblyAction action = ParseAssemblyAction (arguments.Dequeue ());
+ context.Actions [arguments.Dequeue ()] = action;
+ continue;
+ case "t":
+ context.KeepTypeForwarderOnlyAssemblies = true;
+ continue;
+ case "x":
+ if (!GetStringParam (token, l => {
+ foreach (string file in GetFiles (l))
+ p.PrependStep (new ResolveFromXmlStep (new XPathDocument (file)));
+
+ }))
+ return false;
+
+ resolver = true;
+ continue;
+ case "r":
+ case "a":
+ if (!GetStringParam (token, l => {
+
+ var rootVisibility = (token [1] == 'r')
+ ? ResolveFromAssemblyStep.RootVisibility.PublicAndFamily
+ : ResolveFromAssemblyStep.RootVisibility.Any;
+ foreach (string file in GetFiles (l))
+ p.PrependStep (new ResolveFromAssemblyStep (file, rootVisibility));
+ }))
+ return false;
+
+ resolver = true;
+ continue;
+#if !FEATURE_ILLINK
+ case "i":
+ if (!GetStringParam (token, l => {
+ foreach (string file in GetFiles (l))
+ p.PrependStep (new ResolveFromXApiStep (new XPathDocument (file)));
+ }))
+ return false;
+
+ resolver = true;
+ continue;
+ case "l":
+ if (!GetStringParam (token, l => assemblies = ParseI18n (l)))
+ return false;
+
+ continue;
+#endif
+ case "m":
+ if (arguments.Count < 2) {
+ ErrorMissingArgument (token);
+ return false;
+ }
+
+ context.SetParameter (arguments.Dequeue (), arguments.Dequeue ());
+ continue;
+ case "b":
+ if (!GetBoolParam (token, l => context.LinkSymbols = l))
+ return false;
+
+ continue;
+ case "g":
+ if (!GetBoolParam (token, l => context.DeterministicOutput = !l))
+ return false;
+
+ continue;
+ case "z":
+ if (!GetBoolParam (token, l => ignoreDescriptors = !l))
+ return false;
+
+ continue;
+ case "v":
+ if (!GetBoolParam (token, l => context.KeepMembersForDebugger = l))
+ return false;
+
+ continue;
+ case "?":
+ case "help":
+ Usage ();
+ return true;
+
+ case "reference":
+ if (!GetStringParam (token, l => context.Resolver.AddReferenceAssembly (l)))
+ return false;
+
continue;
}
-
- switch (token [2]) {
- case 'v':
- Version ();
- break;
- case 'a':
- About ();
- break;
- default:
- Usage (null);
- break;
- }
}
- // Ensure this does not conflict with '-r' below.
- if (token == "-reference") {
- context.Resolver.AddReferenceAssembly (GetParam ());
- continue;
- }
-
- switch (token [1]) {
- case 'd':
- DirectoryInfo info = new DirectoryInfo (GetParam ());
- context.Resolver.AddSearchDirectory (info.FullName);
- break;
- case 'o':
- context.OutputDirectory = GetParam ();
- break;
- case 'c':
- context.CoreAction = ParseAssemblyAction (GetParam ());
- break;
- case 'u':
- context.UserAction = ParseAssemblyAction (GetParam ());
- break;
- case 'p':
- AssemblyAction action = ParseAssemblyAction (GetParam ());
- context.Actions [GetParam ()] = action;
- break;
- case 't':
- context.KeepTypeForwarderOnlyAssemblies = true;
- break;
- case 'x':
- foreach (string file in GetFiles (GetParam ()))
- p.PrependStep (new ResolveFromXmlStep (new XPathDocument (file)));
- resolver = true;
- break;
- case 'r':
- case 'a':
- var rootVisibility = (token [1] == 'r')
- ? ResolveFromAssemblyStep.RootVisibility.PublicAndFamily
- : ResolveFromAssemblyStep.RootVisibility.Any;
- foreach (string file in GetFiles (GetParam ()))
- p.PrependStep (new ResolveFromAssemblyStep (file, rootVisibility));
- resolver = true;
- break;
- case 'i':
- foreach (string file in GetFiles (GetParam ()))
- p.PrependStep (new ResolveFromXApiStep (new XPathDocument (file)));
- resolver = true;
- break;
- case 'l':
- assemblies = ParseI18n (GetParam ());
- break;
- case 'm':
- context.SetParameter (GetParam (), GetParam ());
- break;
- case 'b':
- context.LinkSymbols = bool.Parse (GetParam ());
- break;
- case 'g':
- if (!bool.Parse (GetParam ()))
- p.RemoveStep (typeof (RegenerateGuidStep));
- break;
- case 'z':
- ignoreDescriptors = !bool.Parse (GetParam ());
- break;
- case 'v':
- context.KeepMembersForDebugger = bool.Parse (GetParam ());
- break;
- default:
- Usage ("Unknown option: `" + token [1] + "'");
- break;
- }
+ ErrorUnrecognizedOption (token);
+ return false;
}
- if (!resolver)
- Usage ("No resolver was created (use -x, -a or -i)");
+ if (!resolver) {
+ Console.WriteLine ($"No files to link were specified. Use one of '{resolvers}' options");
+ return false;
+ }
+
+ if (new_mvid_used && deterministic_used) {
+ Console.WriteLine ($"Options '--new-mvid' and '--deterministic' cannot be used at the same time");
+ return false;
+ }
- if (ignoreDescriptors)
- p.RemoveStep (typeof (BlacklistStep));
-
if (dumpDependencies)
- context.Tracer.Start ();
-
- foreach (string custom_step in custom_steps)
- AddCustomStep (p, custom_step);
-
- if (context.AddReflectionAnnotations)
- p.AddStepAfter (typeof (MarkStep), new ReflectionBlockedStep ());
-
- p.AddStepAfter (typeof (LoadReferencesStep), new LoadI18nAssemblies (assemblies));
-
- if (_needAddBypassNGenStep) {
- p.AddStepAfter (typeof (SweepStep), new AddBypassNGenStep ());
- }
-
- if (assemblies != I18nAssemblies.None) {
- p.AddStepAfter (typeof (PreserveDependencyLookupStep), new PreserveCalendarsStep (assemblies));
- }
-
- if (removeCAS)
- p.AddStepBefore (typeof (MarkStep), new RemoveSecurityStep ());
-
- if (excluded_features.Count > 0) {
-
- p.AddStepBefore (typeof (MarkStep), new RemoveFeaturesStep () {
- FeatureCOM = excluded_features.Contains ("com"),
- FeatureETW = excluded_features.Contains ("etw"),
- FeatureSRE = excluded_features.Contains ("sre"),
- FeatureGlobalization = excluded_features.Contains ("globalization")
- });
-
- var excluded = new string [excluded_features.Count];
- excluded_features.CopyTo (excluded);
- context.ExcludedFeatures = excluded;
- }
+ context.Tracer.AddRecorder (new XmlDependencyRecorder (context, dependenciesFileName));
if (disabled_optimizations.Count > 0) {
foreach (var item in disabled_optimizations) {
@@ -409,6 +505,9 @@ namespace Mono.Linker {
case "unusedinterfaces":
context.DisabledOptimizations |= CodeOptimizations.UnusedInterfaces;
break;
+ case "ipconstprop":
+ context.DisabledOptimizations |= CodeOptimizations.IPConstantPropagation;
+ break;
}
}
}
@@ -422,53 +521,152 @@ namespace Mono.Linker {
case "clearinitlocals":
context.DisabledOptimizations &= ~CodeOptimizations.ClearInitLocals;
break;
+ case "ipconstprop":
+ context.DisabledOptimizations &= ~CodeOptimizations.IPConstantPropagation;
+ break;
}
}
}
+ //
+ // Modify the default pipeline
+ //
+ if (ignoreDescriptors)
+ p.RemoveStep (typeof (BlacklistStep));
+
+ if (context.DeterministicOutput)
+ p.RemoveStep (typeof (RegenerateGuidStep));
+
+ if (context.AddReflectionAnnotations)
+ p.AddStepAfter (typeof (MarkStep), new ReflectionBlockedStep ());
+
+#if !FEATURE_ILLINK
+ p.AddStepAfter (typeof (LoadReferencesStep), new LoadI18nAssemblies (assemblies));
+
+ if (assemblies != I18nAssemblies.None) {
+ p.AddStepAfter (typeof (PreserveDependencyLookupStep), new PreserveCalendarsStep (assemblies));
+ }
+#endif
+
+ if (_needAddBypassNGenStep) {
+ p.AddStepAfter (typeof (SweepStep), new AddBypassNGenStep ());
+ }
+
+ p.AddStepBefore (typeof (MarkStep), new BodySubstituterStep ());
+
+ if (removeCAS)
+ p.AddStepBefore (typeof (MarkStep), new RemoveSecurityStep ());
+
+ if (excluded_features.Count > 0) {
+ p.AddStepBefore (typeof (MarkStep), new RemoveFeaturesStep () {
+ FeatureCOM = excluded_features.Contains ("com"),
+ FeatureETW = excluded_features.Contains ("etw"),
+ FeatureSRE = excluded_features.Contains ("sre"),
+ FeatureGlobalization = excluded_features.Contains ("globalization")
+ });
+
+ var excluded = new string [excluded_features.Count];
+ excluded_features.CopyTo (excluded);
+ context.ExcludedFeatures = excluded;
+ }
+
+ p.AddStepBefore (typeof (MarkStep), new RemoveUnreachableBlocksStep ());
+
if (context.IsOptimizationEnabled (CodeOptimizations.ClearInitLocals))
p.AddStepBefore (typeof (OutputStep), new ClearInitLocalsStep ());
+
+ //
+ // Pipeline setup with all steps enabled
+ //
+ // LoadReferencesStep
+ // BlacklistStep [optional]
+ // PreserveDependencyLookupStep
+ // TypeMapStep
+ // BodySubstituterStep [optional]
+ // RemoveSecurityStep [optional]
+ // RemoveFeaturesStep [optional]
+ // RemoveUnreachableBlocksStep [optional]
+ // MarkStep
+ // ReflectionBlockedStep [optional]
+ // SweepStep
+ // AddBypassNGenStep [optional]
+ // CodeRewriterStep
+ // CleanStep
+ // RegenerateGuidStep [optional]
+ // ClearInitLocalsStep [optional]
+ // OutputStep
+ //
+
+ foreach (string custom_step in custom_steps) {
+ if (!AddCustomStep (p, custom_step))
+ return false;
+ }
+
PreProcessPipeline (p);
try {
p.Process (context);
+ } finally {
+ context.Tracer.Finish ();
}
- finally {
- if (dumpDependencies)
- context.Tracer.Finish ();
- }
+
+ return true;
}
}
partial void PreProcessPipeline (Pipeline pipeline);
- protected static void AddCustomStep (Pipeline pipeline, string arg)
+ protected static bool AddCustomStep (Pipeline pipeline, string arg)
{
int pos = arg.IndexOf (":");
if (pos == -1) {
- pipeline.AppendStep (ResolveStep (arg));
- return;
+ var step = ResolveStep (arg);
+ if (step == null)
+ return false;
+
+ pipeline.AppendStep (step);
+ return true;
}
- string [] parts = arg.Split (':');
- if (parts.Length != 2)
- Usage ("Step is specified as TYPE:STEP");
+ string[] parts = arg.Split (':');
+ if (parts.Length != 2) {
+ Console.WriteLine ($"Invalid value '{arg}' specified for '--custom-step' option");
+ return false;
+ }
- if (parts [0].IndexOf (",") > -1)
- pipeline.AddStepBefore (FindStep (pipeline, parts [1]), ResolveStep (parts [0]));
- else if (parts [1].IndexOf (",") > -1)
- pipeline.AddStepAfter (FindStep (pipeline, parts [0]), ResolveStep (parts [1]));
+ if (!parts[0].StartsWith ("-") && !parts [0].StartsWith ("+")) {
+ Console.WriteLine ($"Expected '+' or '-' to control new step insertion");
+ return false;
+ }
+
+ bool before = parts [0][0] == '-';
+ string name = parts [0].Substring (1);
+
+ IStep target = FindStep (pipeline, name);
+ if (target == null) {
+ Console.WriteLine ($"Pipeline step '{name}' could not be found");
+ return false;
+ }
+
+ IStep newStep = ResolveStep (parts [1]);
+ if (newStep == null)
+ return false;
+
+ if (before)
+ pipeline.AddStepBefore (target, newStep);
else
- Usage ("No comma separator in TYPE or STEP");
+ pipeline.AddStepAfter (target, newStep);
+
+ return true;
}
- static Type FindStep (Pipeline pipeline, string name)
+ static IStep FindStep (Pipeline pipeline, string name)
{
foreach (IStep step in pipeline.GetSteps ()) {
Type t = step.GetType ();
if (t.Name == name)
- return t;
+ return step;
}
return null;
@@ -477,10 +675,16 @@ namespace Mono.Linker {
static IStep ResolveStep (string type)
{
Type step = Type.GetType (type, false);
- if (step == null)
- Usage (String.Format ("Step type '{0}' not found.", type));
- if (!typeof (IStep).IsAssignableFrom (step))
- Usage (String.Format ("Step type '{0}' does not implement IStep interface.", type));
+ if (step == null) {
+ Console.WriteLine ($"Custom step '{type}' could not be found");
+ return null;
+ }
+
+ if (!typeof (IStep).IsAssignableFrom (step)) {
+ Console.WriteLine ($"Custom step '{type}' is incompatible with this linker version");
+ return null;
+ }
+
return (IStep) Activator.CreateInstance (step);
}
@@ -504,6 +708,7 @@ namespace Mono.Linker {
return lines.ToArray ();
}
+#if !FEATURE_ILLINK
protected static I18nAssemblies ParseI18n (string str)
{
I18nAssemblies assemblies = I18nAssemblies.None;
@@ -513,7 +718,7 @@ namespace Mono.Linker {
return assemblies;
}
-
+#endif
AssemblyAction ParseAssemblyAction (string s)
{
@@ -527,49 +732,87 @@ namespace Mono.Linker {
return assemblyAction;
}
- string GetParam ()
+ bool GetBoolParam (string token, Action action)
{
- if (_queue.Count == 0)
- Usage ("Expecting a parameter");
+ if (arguments.Count == 0) {
+ action (true);
+ return true;
+ }
- return _queue.Dequeue ();
+ var arg = arguments.Peek ();
+ if (bool.TryParse (arg.ToLowerInvariant (), out bool value)) {
+ arguments.Dequeue ();
+ action (value);
+ return true;
+ }
+
+ if (arg.StartsWith ("-") || arg.StartsWith ("/")) {
+ action (true);
+ return true;
+ }
+
+ Console.WriteLine ($"Invalid argument for '{token}' option");
+ return false;
}
- static LinkContext GetDefaultContext (Pipeline pipeline)
+ bool GetStringParam (string token, Action action)
{
- LinkContext context = new LinkContext (pipeline);
- context.CoreAction = AssemblyAction.Skip;
- context.UserAction = AssemblyAction.Link;
- context.OutputDirectory = "output";
- context.StripResources = true;
+ if (arguments.Count < 1) {
+ ErrorMissingArgument (token);
+ return false;
+ }
+
+ var arg = arguments.Dequeue ();
+ if (!string.IsNullOrEmpty (arg)) {
+ action (arg);
+ return true;
+ }
+
+ ErrorMissingArgument (token);
+ return false;
+ }
+
+
+ protected virtual LinkContext GetDefaultContext (Pipeline pipeline)
+ {
+ LinkContext context = new LinkContext (pipeline) {
+ CoreAction = AssemblyAction.Skip,
+ UserAction = AssemblyAction.Link,
+ OutputDirectory = "output",
+ StripResources = true
+ };
return context;
}
- static void Usage (string msg)
+ static void Usage ()
{
Console.WriteLine (_linker);
- if (msg != null)
- Console.WriteLine ("Error: " + msg);
+
#if FEATURE_ILLINK
- Console.WriteLine ("illink [options] -a|-i|-r|-x file");
+ Console.WriteLine ($"illink [options] {resolvers} file");
#else
- Console.WriteLine ("monolinker [options] -a|-i|-r|-x file");
+ Console.WriteLine ($"monolinker [options] {resolvers} file");
#endif
Console.WriteLine (" -a Link from a list of assemblies");
+#if !FEATURE_ILLINK
Console.WriteLine (" -i Link from an mono-api-info descriptor");
+#endif
Console.WriteLine (" -r Link from a list of assemblies using roots visible outside of the assembly");
Console.WriteLine (" -x Link from XML descriptor");
Console.WriteLine (" -d Specify additional directories to search in for references");
Console.WriteLine (" -reference Specify additional assemblies to use as references");
Console.WriteLine (" -b Update debug symbols for each linked module. Defaults to false");
Console.WriteLine (" -v Keep members and types used by debugger. Defaults to false");
+#if !FEATURE_ILLINK
Console.WriteLine (" -l , List of i18n assemblies to copy to the output directory. Defaults to 'all'");
Console.WriteLine (" Valid names are 'none', 'all', 'cjk', 'mideast', 'other', 'rare', 'west'");
+#endif
Console.WriteLine (" -out Specify the output directory. Defaults to 'output'");
Console.WriteLine (" --about About the {0}", _linker);
Console.WriteLine (" --verbose Log messages indicating progress and warnings");
Console.WriteLine (" --version Print the version number of the {0}", _linker);
+ Console.WriteLine (" -help Lists all linker options");
Console.WriteLine (" @ Read response file for more options");
Console.WriteLine ();
@@ -586,10 +829,21 @@ namespace Mono.Linker {
Console.WriteLine ();
Console.WriteLine ("Advanced");
- Console.WriteLine (" --custom-step Add a custom step to the pipeline");
+ Console.WriteLine (" --custom-step Add a custom step to the existing pipeline");
+ Console.WriteLine (" Step can use one of following configurations");
+ Console.WriteLine (" : Add user defined type as last step to the pipeline");
+ Console.WriteLine (" +: Inserts step before existing ");
+ Console.WriteLine (" -: Add step after existing step");
+ Console.WriteLine (" --ignore-descriptors Skips reading embedded descriptors (short -z). Defaults to false");
+ Console.WriteLine (" --keep-facades Keep assemblies with type-forwarders (short -t). Defaults to false");
+ Console.WriteLine (" --skip-unresolved Ignore unresolved types, methods, and assemblies. Defaults to false");
+
+ Console.WriteLine ();
+ Console.WriteLine ("Linking");
Console.WriteLine (" --deterministic Produce a deterministic output for linked assemblies");
Console.WriteLine (" --disable-opt Disable one of the default optimizations");
Console.WriteLine (" beforefieldinit: Unused static fields are removed if there is no static ctor");
+ Console.WriteLine (" ipconstprop: Interprocedural constant propagation on return values");
Console.WriteLine (" overrideremoval: Overrides of virtual methods on types that are never instantiated are removed");
Console.WriteLine (" unreachablebodies: Instance methods that are marked but not executed are converted to throws");
Console.WriteLine (" unusedinterfaces: Removes interface types from declaration when not used");
@@ -598,18 +852,18 @@ namespace Mono.Linker {
Console.WriteLine (" --exclude-feature Any code which has a feature in linked assemblies will be removed");
Console.WriteLine (" com: Support for COM Interop");
Console.WriteLine (" etw: Event Tracing for Windows");
+#if !FEATURE_ILLINK
Console.WriteLine (" remoting: .NET Remoting dependencies");
+#endif
Console.WriteLine (" sre: System.Reflection.Emit namespace");
Console.WriteLine (" globalization: Globalization data and globalization behavior");
- Console.WriteLine (" --ignore-descriptors Skips reading embedded descriptors (short -z). Defaults to false");
- Console.WriteLine (" --keep-facades Keep assemblies with type-forwarders (short -t). Defaults to false");
+ Console.WriteLine (" --explicit-reflection Adds to members never used through reflection DisablePrivateReflection attribute. Defaults to false");
Console.WriteLine (" --keep-dep-attributes Keep attributes used for manual dependency tracking. Defaults to false");
Console.WriteLine (" --new-mvid Generate a new guid for each linked assembly (short -g). Defaults to true");
- Console.WriteLine (" --skip-unresolved Ignore unresolved types, methods, and assemblies. Defaults to false");
Console.WriteLine (" --strip-resources Remove XML descriptor resources for linked assemblies. Defaults to true");
Console.WriteLine (" --strip-security Remove metadata and code related to Code Access Security. Defaults to true");
- Console.WriteLine (" --used-attrs-only Any attribute is removed if the attribute type is not used. Defaults to false");
- Console.WriteLine (" --explicit-reflection Adds to members never used through reflection DisablePrivateReflection attribute. Defaults to false");
+ Console.WriteLine (" --substitutions Configuration file with field or methods substitution rules");
+ Console.WriteLine (" --used-attrs-only Attribute usage is removed if the attribute type is not used. Defaults to false");
Console.WriteLine ();
Console.WriteLine ("Analyzer");
@@ -617,8 +871,6 @@ namespace Mono.Linker {
Console.WriteLine (" --dump-dependencies Dump dependencies for the linker analyzer tool");
Console.WriteLine (" --reduced-tracing Reduces dependency output related to assemblies that will not be modified");
Console.WriteLine ("");
-
- Environment.Exit (1);
}
static void Version ()
@@ -626,16 +878,12 @@ namespace Mono.Linker {
Console.WriteLine ("{0} Version {1}",
_linker,
System.Reflection.Assembly.GetExecutingAssembly ().GetName ().Version);
-
- Environment.Exit(1);
}
static void About ()
{
Console.WriteLine ("For more information, visit the project Web site");
Console.WriteLine (" http://www.mono-project.com/");
-
- Environment.Exit(1);
}
static Pipeline GetStandardPipeline ()
diff --git a/external/linker/src/linker/Linker/IDependencyRecorder.cs b/external/linker/src/linker/Linker/IDependencyRecorder.cs
new file mode 100644
index 0000000000..de4e4616e9
--- /dev/null
+++ b/external/linker/src/linker/Linker/IDependencyRecorder.cs
@@ -0,0 +1,44 @@
+//
+// IDependencyRecorder.cs
+//
+// Copyright (C) 2017 Microsoft Corporation (http://www.microsoft.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+namespace Mono.Linker
+{
+ ///
+ /// Abstraction exposed by the linker (mostly MarkStep, but not only) - it will call this interface
+ /// every time it finds a dependency between two parts of the dependency graph.
+ ///
+ public interface IDependencyRecorder
+ {
+ ///
+ /// Reports a dependency detected by the linker.
+ ///
+ /// The source of the dependency (for example the caller method).
+ /// The target of the dependency (for example the callee method).
+ /// true if the target is also marked by the MarkStep.
+ /// The source and target are typically Cecil metadata objects (MethodDefinition, TypeDefinition, ...)
+ /// but they can also be the linker steps or really any other object.
+ void RecordDependency (object source, object target, bool marked);
+ }
+}
diff --git a/external/linker/src/linker/Linker/IReflectionPatternRecorder.cs b/external/linker/src/linker/Linker/IReflectionPatternRecorder.cs
new file mode 100644
index 0000000000..b3aae2b2ea
--- /dev/null
+++ b/external/linker/src/linker/Linker/IReflectionPatternRecorder.cs
@@ -0,0 +1,62 @@
+//
+// IReflectionPatternRecorder.cs
+//
+// Copyright (C) 2017 Microsoft Corporation (http://www.microsoft.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using Mono.Cecil;
+
+namespace Mono.Linker
+{
+ ///
+ /// Interface which is called every time the linker inspects a pattern of code involving reflection to determine a more complex
+ /// dependency.
+ ///
+ ///
+ /// The rules are such that if a given callsite of a "reflectionMethod" gets examined
+ /// linker will always report it one way or another:
+ /// - it will either call RecognizedReflectionAccessPattern method when it can figure out exactly the dependency.
+ /// - or it will call UnrecognizedReflectionAccessPattern with an optional message describing why it could not recognize
+ /// the pattern.
+ ///
+ public interface IReflectionPatternRecorder
+ {
+ ///
+ /// Called when the linker recognized a reflection access pattern (and thus was able to correctly apply marking to the accessed item).
+ ///
+ /// The method which contains the reflection access pattern.
+ /// The reflection method which is at the heart of the access pattern.
+ /// The item accessed through reflection. This can be one of:
+ /// TypeDefinition, MethodDefinition, PropertyDefinition, FieldDefinition, EventDefinition.
+ void RecognizedReflectionAccessPattern (MethodDefinition sourceMethod, MethodDefinition reflectionMethod, IMemberDefinition accessedItem);
+
+ ///
+ /// Called when the linker detected a reflection access but was not able to recognize the entire pattern.
+ ///
+ /// The method which contains the reflection access code.
+ /// The reflection method which is at the heart of the access code.
+ /// Humanly readable message describing what failed during the pattern recognition.
+ /// This effectively means that there's a potential hole in the linker marking - some items which are accessed only through
+ /// reflection may not be marked correctly and thus may fail at runtime.
+ void UnrecognizedReflectionAccessPattern (MethodDefinition sourceMethod, MethodDefinition reflectionMethod, string message);
+ }
+}
diff --git a/external/linker/src/linker/Linker/KnownMembers.cs b/external/linker/src/linker/Linker/KnownMembers.cs
index f1e204bb05..02dcf6469a 100644
--- a/external/linker/src/linker/Linker/KnownMembers.cs
+++ b/external/linker/src/linker/Linker/KnownMembers.cs
@@ -6,6 +6,7 @@ namespace Mono.Linker
{
public MethodDefinition NotSupportedExceptionCtorString { get; set; }
public MethodDefinition DisablePrivateReflectionAttributeCtor { get; set; }
+ public MethodDefinition ObjectCtor { get; set; }
public static bool IsNotSupportedExceptionCtorString (MethodDefinition method)
{
diff --git a/external/linker/src/linker/Linker/LinkContext.cs b/external/linker/src/linker/Linker/LinkContext.cs
index 2801c96573..8d596844f7 100644
--- a/external/linker/src/linker/Linker/LinkContext.cs
+++ b/external/linker/src/linker/Linker/LinkContext.cs
@@ -117,6 +117,8 @@ namespace Mono.Linker {
public bool StripResources { get; set; }
+ public List Substitutions { get; private set; }
+
public System.Collections.IDictionary Actions {
get { return _actions; }
}
@@ -141,7 +143,7 @@ namespace Mono.Linker {
public bool LogMessages { get; set; }
- public ILogger Logger { get; set; } = new ConsoleLogger ();
+ public ILogger Logger { private get; set; } = new ConsoleLogger ();
public MarkingHelpers MarkingHelpers { get; private set; }
@@ -149,7 +151,9 @@ namespace Mono.Linker {
public Tracer Tracer { get; private set; }
- public string[] ExcludedFeatures { get; set; }
+ public IReflectionPatternRecorder ReflectionPatternRecorder { get; set; }
+
+ public string [] ExcludedFeatures { get; set; }
public CodeOptimizations DisabledOptimizations { get; set; }
@@ -187,12 +191,28 @@ namespace Mono.Linker {
_annotations = factory.CreateAnnotationStore (this);
MarkingHelpers = factory.CreateMarkingHelpers (this);
Tracer = factory.CreateTracer (this);
+ ReflectionPatternRecorder = new LoggingReflectionPatternRecorder (this);
MarkedKnownMembers = new KnownMembers ();
StripResources = true;
// See https://github.com/mono/linker/issues/612
DisabledOptimizations |= CodeOptimizations.UnreachableBodies;
DisabledOptimizations |= CodeOptimizations.ClearInitLocals;
+ DisabledOptimizations |= CodeOptimizations.IPConstantPropagation;
+ }
+
+ public void AddSubstitutionFile (string file)
+ {
+ if (Substitutions == null) {
+ Substitutions = new List ();
+ Substitutions.Add (file);
+ return;
+ }
+
+ if (Substitutions.Contains (file))
+ return;
+
+ Substitutions.Add (file);
}
public TypeDefinition GetType (string fullName)
@@ -399,15 +419,15 @@ namespace Mono.Linker {
return (DisabledOptimizations & optimization) == 0;
}
- public void LogMessage (string message, params object[] values)
+ public void LogMessage (string message)
{
- LogMessage (MessageImportance.Normal, message, values);
+ LogMessage (MessageImportance.Normal, message);
}
- public void LogMessage (MessageImportance importance, string message, params object [] values)
+ public void LogMessage (MessageImportance importance, string message)
{
if (LogMessages && Logger != null)
- Logger.LogMessage (importance, message, values);
+ Logger.LogMessage (importance, "{0}", message);
}
}
@@ -438,5 +458,10 @@ namespace Mono.Linker {
/// Option to remove .interfaceimpl for interface types that are not used
///
UnusedInterfaces = 1 << 4,
+
+ ///
+ /// Option to do interprocedural constant propagation on return values
+ ///
+ IPConstantPropagation = 1 << 5
}
}
diff --git a/mcs/class/System.Windows.Forms/System.Windows.Forms.RTF/CharsetFlags.cs b/external/linker/src/linker/Linker/LoggingReflectionPatternRecorder.cs
similarity index 57%
rename from mcs/class/System.Windows.Forms/System.Windows.Forms.RTF/CharsetFlags.cs
rename to external/linker/src/linker/Linker/LoggingReflectionPatternRecorder.cs
index 7cfcb8c653..f9c0d89e93 100644
--- a/mcs/class/System.Windows.Forms/System.Windows.Forms.RTF/CharsetFlags.cs
+++ b/external/linker/src/linker/Linker/LoggingReflectionPatternRecorder.cs
@@ -1,3 +1,8 @@
+//
+// LoggingReflectionPatternRecorder.cs
+//
+// Copyright (C) 2017 Microsoft Corporation (http://www.microsoft.com)
+//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
@@ -5,10 +10,10 @@
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
-//
+//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
-//
+//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
@@ -17,25 +22,28 @@
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-// Copyright (c) 2005 Novell, Inc. (http://www.novell.com)
-//
-// Authors:
-// Peter Bartok (pbartok@novell.com)
-//
-//
-// COMPLETE
+using Mono.Cecil;
-namespace System.Windows.Forms.RTF {
- [Flags]
-#if RTF_LIB
- public
-#else
- internal
-#endif
- enum CharsetFlags {
- None = 0x00,
- Read = 0x01,
- Switch = 0x02
+namespace Mono.Linker
+{
+ class LoggingReflectionPatternRecorder : IReflectionPatternRecorder
+ {
+ private readonly LinkContext _context;
+
+ public LoggingReflectionPatternRecorder (LinkContext context)
+ {
+ _context = context;
+ }
+
+ public void RecognizedReflectionAccessPattern (MethodDefinition sourceMethod, MethodDefinition reflectionMethod, IMemberDefinition accessedItem)
+ {
+ // Do nothing - there's no logging for successfully recognized patterns
+ }
+
+ public void UnrecognizedReflectionAccessPattern (MethodDefinition sourceMethod, MethodDefinition reflectionMethod, string message)
+ {
+ _context.LogMessage (MessageImportance.Low, message);
+ }
}
}
diff --git a/external/linker/src/linker/Linker/MethodAction.cs b/external/linker/src/linker/Linker/MethodAction.cs
index babe6d2c8a..a3550e7839 100644
--- a/external/linker/src/linker/Linker/MethodAction.cs
+++ b/external/linker/src/linker/Linker/MethodAction.cs
@@ -34,6 +34,5 @@ namespace Mono.Linker {
ForceParse,
ConvertToStub,
ConvertToThrow,
- ConvertToFalse
}
}
diff --git a/external/linker/src/linker/Linker/MethodDefinitionExtensions.cs b/external/linker/src/linker/Linker/MethodDefinitionExtensions.cs
index 078ce01366..b2b0667278 100644
--- a/external/linker/src/linker/Linker/MethodDefinitionExtensions.cs
+++ b/external/linker/src/linker/Linker/MethodDefinitionExtensions.cs
@@ -14,6 +14,58 @@ namespace Mono.Linker
return method.IsConstructor && !method.IsStatic;
}
+ public static bool IsIntrinsic (this MethodDefinition method)
+ {
+ if (!method.HasCustomAttributes)
+ return false;
+
+ foreach (var ca in method.CustomAttributes) {
+ var caType = ca.AttributeType;
+ if (caType.Name == "IntrinsicAttribute" && caType.Namespace == "System.Runtime.CompilerServices")
+ return true;
+ }
+
+ return false;
+ }
+
+ public static bool IsPropertyMethod (this MethodDefinition md)
+ {
+ return (md.SemanticsAttributes & MethodSemanticsAttributes.Getter) != 0 ||
+ (md.SemanticsAttributes & MethodSemanticsAttributes.Setter) != 0;
+ }
+
+ public static bool IsPublicInstancePropertyMethod (this MethodDefinition md)
+ {
+ return md.IsPublic && !md.IsStatic && IsPropertyMethod (md);
+ }
+
+ public static bool IsEventMethod (this MethodDefinition md)
+ {
+ return (md.SemanticsAttributes & MethodSemanticsAttributes.AddOn) != 0 ||
+ (md.SemanticsAttributes & MethodSemanticsAttributes.Fire) != 0 ||
+ (md.SemanticsAttributes & MethodSemanticsAttributes.RemoveOn) != 0;
+ }
+
+ public static PropertyDefinition GetProperty (this MethodDefinition md)
+ {
+ TypeDefinition declaringType = md.DeclaringType;
+ foreach (PropertyDefinition prop in declaringType.Properties)
+ if (prop.GetMethod == md || prop.SetMethod == md)
+ return prop;
+
+ return null;
+ }
+
+ public static EventDefinition GetEvent (this MethodDefinition md)
+ {
+ TypeDefinition declaringType = md.DeclaringType;
+ foreach (EventDefinition evt in declaringType.Events)
+ if (evt.AddMethod == md || evt.InvokeMethod == md || evt.RemoveMethod == md)
+ return evt;
+
+ return null;
+ }
+
public static bool IsStaticConstructor (this MethodDefinition method)
{
return method.IsConstructor && method.IsStatic;
diff --git a/external/linker/src/linker/Linker/Tracer.cs b/external/linker/src/linker/Linker/Tracer.cs
index 35f43b8ea9..1a6b7109fe 100644
--- a/external/linker/src/linker/Linker/Tracer.cs
+++ b/external/linker/src/linker/Linker/Tracer.cs
@@ -26,74 +26,49 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
+using System;
using System.Collections.Generic;
-using System.IO;
-using System.IO.Compression;
-using System.Xml;
-using Mono.Cecil;
-using Mono.Linker.Steps;
namespace Mono.Linker
{
- public class Tracer {
- public const string DefaultDependenciesFileName = "linker-dependencies.xml.gz";
-
- public string DependenciesFileName { get; set; } = DefaultDependenciesFileName;
-
+ public class Tracer
+ {
protected readonly LinkContext context;
Stack dependency_stack;
- System.Xml.XmlWriter writer;
- Stream stream;
+ List recorders;
- public Tracer (LinkContext context) => this.context = context;
-
- public void Start ()
+ public Tracer (LinkContext context)
{
+ this.context = context;
dependency_stack = new Stack ();
- System.Xml.XmlWriterSettings settings = new System.Xml.XmlWriterSettings {
- Indent = true,
- IndentChars = "\t"
- };
-
- if (string.IsNullOrEmpty (Path.GetDirectoryName (DependenciesFileName)) && !string.IsNullOrEmpty (context.OutputDirectory)) {
- DependenciesFileName = Path.Combine (context.OutputDirectory, DependenciesFileName);
- Directory.CreateDirectory (context.OutputDirectory);
- }
-
- var depsFile = File.OpenWrite (DependenciesFileName);
-
- if (Path.GetExtension (DependenciesFileName) == ".xml")
- stream = depsFile;
- else
- stream = new GZipStream (depsFile, CompressionMode.Compress);
-
- writer = System.Xml.XmlWriter.Create (stream, settings);
- writer.WriteStartDocument ();
- writer.WriteStartElement ("dependencies");
- writer.WriteStartAttribute ("version");
- writer.WriteString ("1.2");
- writer.WriteEndAttribute ();
}
public void Finish ()
{
- if (writer == null)
- return;
-
- writer.WriteEndElement ();
- writer.WriteEndDocument ();
- writer.Flush ();
- writer.Dispose ();
- stream.Dispose ();
- writer = null;
- stream = null;
dependency_stack = null;
+ if (recorders != null) {
+ foreach (var recorder in recorders) {
+ if (recorder is IDisposable disposableRecorder)
+ disposableRecorder.Dispose ();
+ }
+ }
+
+ recorders = null;
+ }
+
+ public void AddRecorder (IDependencyRecorder recorder)
+ {
+ if (recorders == null) {
+ recorders = new List ();
+ }
+
+ recorders.Add (recorder);
}
public void Push (object o, bool addDependency = true)
{
- if (writer == null)
+ if (!IsRecordingEnabled ())
return;
if (addDependency && dependency_stack.Count > 0)
@@ -104,149 +79,37 @@ namespace Mono.Linker
public void Pop ()
{
- if (writer == null)
+ if (!IsRecordingEnabled ())
return;
dependency_stack.Pop ();
}
- static bool IsAssemblyBound (TypeDefinition td)
+ bool IsRecordingEnabled ()
{
- do {
- if (td.IsNestedPrivate || td.IsNestedAssembly || td.IsNestedFamilyAndAssembly)
- return true;
-
- td = td.DeclaringType;
- } while (td != null);
-
- return false;
- }
-
- string TokenString (object o)
- {
- if (o == null)
- return "N:null";
-
- if (o is TypeReference t) {
- bool addAssembly = true;
- var td = t as TypeDefinition ?? t.Resolve ();
-
- if (td != null) {
- addAssembly = td.IsNotPublic || IsAssemblyBound (td);
- t = td;
- }
-
- var addition = addAssembly ? $":{t.Module}" : "";
-
- return $"{(o as IMetadataTokenProvider).MetadataToken.TokenType}:{o}{addition}";
- }
-
- if (o is IMetadataTokenProvider)
- return (o as IMetadataTokenProvider).MetadataToken.TokenType + ":" + o;
-
- return "Other:" + o;
+ return recorders != null;
}
public void AddDirectDependency (object b, object e)
{
- if (writer == null)
- return;
-
- writer.WriteStartElement ("edge");
- writer.WriteAttributeString ("b", TokenString (b));
- writer.WriteAttributeString ("e", TokenString (e));
- writer.WriteEndElement ();
+ ReportDependency (b, e, false);
}
public void AddDependency (object o, bool marked = false)
{
- if (writer == null)
+ if (!IsRecordingEnabled ())
return;
- KeyValuePair pair = new KeyValuePair (dependency_stack.Count > 0 ? dependency_stack.Peek () : null, o);
-
- if (!ShouldRecord (pair.Key) && !ShouldRecord (pair.Value))
- return;
-
- // This is a hack to work around a quirk of MarkStep that results in outputting ~6k edges even with the above ShouldRecord checks.
- // What happens is that due to the method queueing in MarkStep, the dependency chain is broken in many cases. And in these cases
- // we end up adding an edge for MarkStep ->
- // This isn't particularly useful information since it's incomplete, but it's especially not useful in ReducedTracing mode when there is one of these for
- // every class library method that was queued.
- if (context.EnableReducedTracing && pair.Key is MarkStep && !ShouldRecord (pair.Value))
- return;
-
- // This is another hack to prevent useless information from being logged. With the introduction of interface sweeping there are a lot of edges such as
- // `e="InterfaceImpl:Mono.Cecil.InterfaceImplementation"` which are useless information. Ideally we would format the interface implementation into a meaningful format
- // however I don't think that is worth the effort at the moment.
- if (pair.Value is InterfaceImplementation)
- return;
-
- if (pair.Key != pair.Value) {
- writer.WriteStartElement ("edge");
- if (marked)
- writer.WriteAttributeString ("mark", "1");
- writer.WriteAttributeString ("b", TokenString (pair.Key));
- writer.WriteAttributeString ("e", TokenString (pair.Value));
- writer.WriteEndElement ();
- }
+ ReportDependency (dependency_stack.Count > 0 ? dependency_stack.Peek () : null, o, marked);
}
- bool WillAssemblyBeModified (AssemblyDefinition assembly)
+ private void ReportDependency (object source, object target, bool marked)
{
- switch (context.Annotations.GetAction (assembly)) {
- case AssemblyAction.Link:
- case AssemblyAction.AddBypassNGen:
- case AssemblyAction.AddBypassNGenUsed:
- return true;
- default:
- return false;
+ if (IsRecordingEnabled ()) {
+ foreach (IDependencyRecorder recorder in recorders) {
+ recorder.RecordDependency (source, target, marked);
+ }
}
}
-
- bool ShouldRecord (object o)
- {
- if (!context.EnableReducedTracing)
- return true;
-
- if (o is TypeDefinition t)
- return WillAssemblyBeModified (t.Module.Assembly);
-
- if (o is IMemberDefinition m)
- return WillAssemblyBeModified (m.DeclaringType.Module.Assembly);
-
- if (o is TypeReference typeRef) {
- var resolved = typeRef.Resolve ();
-
- // Err on the side of caution if we can't resolve
- if (resolved == null)
- return true;
-
- return WillAssemblyBeModified (resolved.Module.Assembly);
- }
-
- if (o is MemberReference mRef) {
- var resolved = mRef.Resolve ();
-
- // Err on the side of caution if we can't resolve
- if (resolved == null)
- return true;
-
- return WillAssemblyBeModified (resolved.DeclaringType.Module.Assembly);
- }
-
- if (o is ModuleDefinition module)
- return WillAssemblyBeModified (module.Assembly);
-
- if (o is AssemblyDefinition assembly)
- return WillAssemblyBeModified (assembly);
-
- if (o is ParameterDefinition parameter) {
- if (parameter.Method is MethodDefinition parameterMethodDefinition)
- return WillAssemblyBeModified (parameterMethodDefinition.DeclaringType.Module.Assembly);
- }
-
- return true;
- }
}
}
diff --git a/external/linker/src/linker/Linker/TypeDefinitionExtensions.cs b/external/linker/src/linker/Linker/TypeDefinitionExtensions.cs
index f94e340c3e..1e06def6eb 100644
--- a/external/linker/src/linker/Linker/TypeDefinitionExtensions.cs
+++ b/external/linker/src/linker/Linker/TypeDefinitionExtensions.cs
@@ -1,3 +1,5 @@
+
+using System;
using Mono.Cecil;
namespace Mono.Linker {
@@ -17,5 +19,26 @@ namespace Mono.Linker {
return false;
}
+
+ public static TypeReference GetEnumUnderlyingType (this TypeDefinition enumType)
+ {
+ foreach (var field in enumType.Fields) {
+ if (!field.IsStatic && field.Name == "value__") {
+ return field.FieldType;
+ }
+ }
+
+ throw new MissingFieldException ($"Enum type '{enumType.FullName}' is missing 'value__' field");
+ }
+
+ public static bool IsMulticastDelegate (this TypeDefinition td)
+ {
+ return td.BaseType?.Name == "MulticastDelegate" && td.BaseType.Namespace == "System";
+ }
+
+ public static bool IsSerializable (this TypeDefinition td)
+ {
+ return (td.Attributes & TypeAttributes.Serializable) != 0;
+ }
}
}
\ No newline at end of file
diff --git a/external/linker/src/linker/Linker/XmlDependencyRecorder.cs b/external/linker/src/linker/Linker/XmlDependencyRecorder.cs
new file mode 100644
index 0000000000..637b94c2aa
--- /dev/null
+++ b/external/linker/src/linker/Linker/XmlDependencyRecorder.cs
@@ -0,0 +1,215 @@
+//
+// Tracer.cs
+//
+// Copyright (C) 2017 Microsoft Corporation (http://www.microsoft.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using Mono.Cecil;
+using Mono.Linker.Steps;
+using System;
+using System.IO;
+using System.IO.Compression;
+using System.Xml;
+
+namespace Mono.Linker
+{
+ ///
+ /// Class which implements IDependencyRecorder and writes the dependencies into an XML file.
+ ///
+ public class XmlDependencyRecorder : IDependencyRecorder, IDisposable
+ {
+ public const string DefaultDependenciesFileName = "linker-dependencies.xml.gz";
+
+ private readonly LinkContext context;
+ private XmlWriter writer;
+ private Stream stream;
+
+ public XmlDependencyRecorder (LinkContext context, string fileName = null)
+ {
+ this.context = context;
+
+ XmlWriterSettings settings = new XmlWriterSettings {
+ Indent = true,
+ IndentChars = "\t"
+ };
+
+ if (fileName == null)
+ fileName = DefaultDependenciesFileName;
+
+ if (string.IsNullOrEmpty (Path.GetDirectoryName (fileName)) && !string.IsNullOrEmpty (context.OutputDirectory)) {
+ fileName = Path.Combine (context.OutputDirectory, fileName);
+ Directory.CreateDirectory (context.OutputDirectory);
+ }
+
+ var depsFile = File.OpenWrite (fileName);
+
+ if (Path.GetExtension (fileName) == ".xml")
+ stream = depsFile;
+ else
+ stream = new GZipStream (depsFile, CompressionMode.Compress);
+
+ writer = XmlWriter.Create (stream, settings);
+ writer.WriteStartDocument ();
+ writer.WriteStartElement ("dependencies");
+ writer.WriteStartAttribute ("version");
+ writer.WriteString ("1.2");
+ writer.WriteEndAttribute ();
+ }
+
+ public void Dispose ()
+ {
+ if (writer == null)
+ return;
+
+ writer.WriteEndElement ();
+ writer.WriteEndDocument ();
+ writer.Flush ();
+ writer.Dispose ();
+ stream.Dispose ();
+ writer = null;
+ stream = null;
+ }
+
+ public void RecordDependency (object source, object target, bool marked)
+ {
+ if (!ShouldRecord (source) && !ShouldRecord (target))
+ return;
+
+ // This is a hack to work around a quirk of MarkStep that results in outputting ~6k edges even with the above ShouldRecord checks.
+ // What happens is that due to the method queueing in MarkStep, the dependency chain is broken in many cases. And in these cases
+ // we end up adding an edge for MarkStep ->
+ // This isn't particularly useful information since it's incomplete, but it's especially not useful in ReducedTracing mode when there is one of these for
+ // every class library method that was queued.
+ if (context.EnableReducedTracing && source is MarkStep && !ShouldRecord (target))
+ return;
+
+ // This is another hack to prevent useless information from being logged. With the introduction of interface sweeping there are a lot of edges such as
+ // `e="InterfaceImpl:Mono.Cecil.InterfaceImplementation"` which are useless information. Ideally we would format the interface implementation into a meaningful format
+ // however I don't think that is worth the effort at the moment.
+ if (target is InterfaceImplementation)
+ return;
+
+ if (source != target) {
+ writer.WriteStartElement ("edge");
+ if (marked)
+ writer.WriteAttributeString ("mark", "1");
+ writer.WriteAttributeString ("b", TokenString (source));
+ writer.WriteAttributeString ("e", TokenString (target));
+ writer.WriteEndElement ();
+ }
+ }
+
+ static bool IsAssemblyBound (TypeDefinition td)
+ {
+ do {
+ if (td.IsNestedPrivate || td.IsNestedAssembly || td.IsNestedFamilyAndAssembly)
+ return true;
+
+ td = td.DeclaringType;
+ } while (td != null);
+
+ return false;
+ }
+
+ string TokenString (object o)
+ {
+ if (o == null)
+ return "N:null";
+
+ if (o is TypeReference t) {
+ bool addAssembly = true;
+ var td = t as TypeDefinition ?? t.Resolve ();
+
+ if (td != null) {
+ addAssembly = td.IsNotPublic || IsAssemblyBound (td);
+ t = td;
+ }
+
+ var addition = addAssembly ? $":{t.Module}" : "";
+
+ return $"{(o as IMetadataTokenProvider).MetadataToken.TokenType}:{o}{addition}";
+ }
+
+ if (o is IMetadataTokenProvider)
+ return (o as IMetadataTokenProvider).MetadataToken.TokenType + ":" + o;
+
+ return "Other:" + o;
+ }
+
+ bool WillAssemblyBeModified (AssemblyDefinition assembly)
+ {
+ switch (context.Annotations.GetAction (assembly)) {
+ case AssemblyAction.Link:
+ case AssemblyAction.AddBypassNGen:
+ case AssemblyAction.AddBypassNGenUsed:
+ return true;
+ default:
+ return false;
+ }
+ }
+
+ bool ShouldRecord (object o)
+ {
+ if (!context.EnableReducedTracing)
+ return true;
+
+ if (o is TypeDefinition t)
+ return WillAssemblyBeModified (t.Module.Assembly);
+
+ if (o is IMemberDefinition m)
+ return WillAssemblyBeModified (m.DeclaringType.Module.Assembly);
+
+ if (o is TypeReference typeRef) {
+ var resolved = typeRef.Resolve ();
+
+ // Err on the side of caution if we can't resolve
+ if (resolved == null)
+ return true;
+
+ return WillAssemblyBeModified (resolved.Module.Assembly);
+ }
+
+ if (o is MemberReference mRef) {
+ var resolved = mRef.Resolve ();
+
+ // Err on the side of caution if we can't resolve
+ if (resolved == null)
+ return true;
+
+ return WillAssemblyBeModified (resolved.DeclaringType.Module.Assembly);
+ }
+
+ if (o is ModuleDefinition module)
+ return WillAssemblyBeModified (module.Assembly);
+
+ if (o is AssemblyDefinition assembly)
+ return WillAssemblyBeModified (assembly);
+
+ if (o is ParameterDefinition parameter) {
+ if (parameter.Method is MethodDefinition parameterMethodDefinition)
+ return WillAssemblyBeModified (parameterMethodDefinition.DeclaringType.Module.Assembly);
+ }
+
+ return true;
+ }
+ }
+}
diff --git a/external/linker/src/linker/Mono.Linker.csproj b/external/linker/src/linker/Mono.Linker.csproj
index d6db018db9..1ca9a4023d 100644
--- a/external/linker/src/linker/Mono.Linker.csproj
+++ b/external/linker/src/linker/Mono.Linker.csproj
@@ -3,49 +3,61 @@
Exe
Mono
- (C) 2006, Jb Evain
0.2.0.0
- Debug;Release;illink_Debug;illink_Release
+ Debug;Release
+ latest
-
+
illink
IL Linker
$(DefineConstants);FEATURE_ILLINK
-
- netcoreapp2.0
- netcoreapp2.0
+ netcoreapp3.0;net471
-
+
monolinker
Mono.Linker
Mono CIL Linker
+ (C) 2006, Jb Evain
net471
-
+
+ $(DefineConstants);DEBUG
true
false
-
+
true
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
-
+
diff --git a/external/nunit-lite/NUnitLite-1.0.0/src/framework/Internal/Commands/FlakyTestRetriesCommand.cs b/external/nunit-lite/NUnitLite-1.0.0/src/framework/Internal/Commands/FlakyTestRetriesCommand.cs
index 33eb5cc897..c2c3d33ac6 100644
--- a/external/nunit-lite/NUnitLite-1.0.0/src/framework/Internal/Commands/FlakyTestRetriesCommand.cs
+++ b/external/nunit-lite/NUnitLite-1.0.0/src/framework/Internal/Commands/FlakyTestRetriesCommand.cs
@@ -74,7 +74,8 @@ namespace NUnit.Framework.Internal.Commands
if (retries == 0 ||
context.CurrentResult.ResultState.Status == TestStatus.Passed ||
- context.CurrentResult.ResultState.Status == TestStatus.Skipped)
+ context.CurrentResult.ResultState.Status == TestStatus.Skipped ||
+ context.CurrentResult.ResultState.Status == TestStatus.Inconclusive)
return context.CurrentResult;
// skip retries after a certain number to avoid retrying mass failures
diff --git a/m4/mono-output.m4 b/m4/mono-output.m4
index 6aaf8e9cf2..c328bac2c5 100644
--- a/m4/mono-output.m4
+++ b/m4/mono-output.m4
@@ -14,7 +14,6 @@ AC_DEFUN([AC_MONO_OUTPUT], [
AC_OUTPUT([
Makefile
llvm/Makefile
- mk/Makefile
mono/Makefile
mono/btls/Makefile
mono/native/Makefile
diff --git a/man/mono.1 b/man/mono.1
index d7dc065487..e5f879e58f 100644
--- a/man/mono.1
+++ b/man/mono.1
@@ -860,9 +860,11 @@ Instruct the runtime on the number of times that the method specified
by --compile (or all the methods if --compile-all is used) to be
compiled. This is used for testing the code generator performance.
.TP
-\fB--stats\fR
+\fB--stats=[method]\fR
Displays information about the work done by the runtime during the
-execution of an application.
+execution of an application. If a method (namespace.name:methodname)
+is specified, it will display that information when the method is
+first run in addition to the end of program execution.
.TP
\fB--wapi=hps|semdel\fR
Perform maintenance of the process shared data.
diff --git a/mcs/build/common/Consts.cs b/mcs/build/common/Consts.cs
index 9feed5294a..fd64b926fa 100644
--- a/mcs/build/common/Consts.cs
+++ b/mcs/build/common/Consts.cs
@@ -30,7 +30,7 @@
static partial class Consts
{
- public const string MonoCorlibVersion = "97b07b51-46d8-4084-b48e-77aa5c192654";
+ public const string MonoCorlibVersion = "1A5E0066-58DC-428A-B21C-0AD6CDAE2789";
}
#if !NETCORE
@@ -41,7 +41,7 @@ static partial class Consts
// Use these assembly version constants to make code more maintainable.
//
- public const string MonoVersion = "6.10.0.105";
+ public const string MonoVersion = "6.12.0.86";
public const string MonoCompany = "Mono development team";
public const string MonoProduct = "Mono Common Language Infrastructure";
public const string MonoCopyright = "(c) Various Mono authors";
diff --git a/mcs/build/config-default.make b/mcs/build/config-default.make
index 11b1b35456..da3ede120a 100644
--- a/mcs/build/config-default.make
+++ b/mcs/build/config-default.make
@@ -19,8 +19,7 @@ endif
TEST_HARNESS = $(topdir)/class/lib/$(PROFILE_DIRECTORY)/$(PARENT_PROFILE)nunit-lite-console.exe
PLATFORM_DEBUG_FLAGS = /debug:portable
-# Workaround for https://bugzilla.xamarin.com/show_bug.cgi?id=59967
-MCS_FLAGS = /features:peverify-compat /langversion:latest
+MCS_FLAGS = /langversion:latest
LIBRARY_FLAGS =
ifndef CFLAGS
CFLAGS = -g -O2
diff --git a/mcs/class/Mono.CompilerServices.SymbolWriter/SymbolWriterImpl.cs b/mcs/class/Mono.CompilerServices.SymbolWriter/SymbolWriterImpl.cs
index 0b25cd7cf5..930a262187 100644
--- a/mcs/class/Mono.CompilerServices.SymbolWriter/SymbolWriterImpl.cs
+++ b/mcs/class/Mono.CompilerServices.SymbolWriter/SymbolWriterImpl.cs
@@ -52,8 +52,6 @@ namespace Mono.CompilerServices.SymbolWriter
#if !CECIL && !MOBILE
ModuleBuilder mb;
- delegate Guid GetGuidFunc (ModuleBuilder mb);
- GetGuidFunc get_guid_func;
public SymbolWriterImpl (ModuleBuilder mb)
{
@@ -62,16 +60,7 @@ namespace Mono.CompilerServices.SymbolWriter
public void Close ()
{
- MethodInfo mi = typeof (ModuleBuilder).GetMethod (
- "Mono_GetGuid",
- BindingFlags.Static | BindingFlags.NonPublic);
- if (mi == null)
- return;
-
- get_guid_func = (GetGuidFunc) System.Delegate.CreateDelegate (
- typeof (GetGuidFunc), mi);
-
- msw.WriteSymbolFile (get_guid_func (mb));
+ msw.WriteSymbolFile (mb.ModuleVersionId);
}
#else
Guid guid;
diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs
index 3e2cf5f33a..de8604c29c 100644
--- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs
+++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/Connection.cs
@@ -409,6 +409,9 @@ namespace Mono.Debugger.Soft
public ErrorCode ErrorCode {
get; set;
}
+ public string ErrorMessage {
+ get; set;
+ }
}
/*
@@ -436,7 +439,7 @@ namespace Mono.Debugger.Soft
* with newer runtimes, and vice versa.
*/
internal const int MAJOR_VERSION = 2;
- internal const int MINOR_VERSION = 54;
+ internal const int MINOR_VERSION = 57;
enum WPSuspendPolicy {
NONE = 0,
@@ -792,10 +795,12 @@ namespace Mono.Debugger.Soft
// For reply packets
offset = 0;
- ReadInt (); // length
+ var len = ReadInt (); // length
ReadInt (); // id
ReadByte (); // flags
ErrorCode = ReadShort ();
+ if (ErrorCode == (int)Mono.Debugger.Soft.ErrorCode.INVALID_ARGUMENT && connection.Version.AtLeast (2, 56) && len > offset)
+ ErrorMsg = ReadString ();
}
public CommandSet CommandSet {
@@ -810,6 +815,10 @@ namespace Mono.Debugger.Soft
get; set;
}
+ public string ErrorMsg {
+ get; internal set;
+ }
+
public int Offset {
get {
return offset;
@@ -1792,7 +1801,7 @@ namespace Mono.Debugger.Soft
LogPacket (packetId, encoded_packet, reply, command_set, command, watch);
if (r.ErrorCode != 0) {
if (ErrorHandler != null)
- ErrorHandler (this, new ErrorHandlerEventArgs () { ErrorCode = (ErrorCode)r.ErrorCode });
+ ErrorHandler (this, new ErrorHandlerEventArgs () { ErrorCode = (ErrorCode)r.ErrorCode, ErrorMessage = r.ErrorMsg});
throw new NotImplementedException ("No error handler set.");
} else {
return r;
diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/EventRequest.cs b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/EventRequest.cs
index 69f35f4c0a..4c9a536838 100644
--- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/EventRequest.cs
+++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/EventRequest.cs
@@ -34,6 +34,11 @@ namespace Mono.Debugger.Soft
}
}
+ public int GetId()
+ {
+ return id;
+ }
+
public EventType EventType {
get {
return etype;
diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/PointerValue.cs b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/PointerValue.cs
index 2cf9dfa418..d407b417b5 100644
--- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/PointerValue.cs
+++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/PointerValue.cs
@@ -51,10 +51,19 @@ namespace Mono.Debugger.Soft
// Since protocol version 2.46
public Value Value {
get {
+ ValueImpl value;
if (Address == 0)
return null;
-
- return vm.DecodeValue (vm.conn.Pointer_GetValue (Address, Type));
+ try {
+ value = vm.conn.Pointer_GetValue (Address, Type);
+ }
+ catch (CommandException ex) {
+ if (ex.ErrorCode == ErrorCode.INVALID_ARGUMENT)
+ throw new ArgumentException ("Invalid pointer address.");
+ else
+ throw;
+ }
+ return vm.DecodeValue (value);
}
}
diff --git a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/VirtualMachine.cs b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/VirtualMachine.cs
index c9026a0268..f85e807201 100644
--- a/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/VirtualMachine.cs
+++ b/mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft/VirtualMachine.cs
@@ -371,7 +371,7 @@ namespace Mono.Debugger.Soft
case ErrorCode.NO_SEQ_POINT_AT_IL_OFFSET:
throw new ArgumentException ("Cannot set breakpoint on the specified IL offset.");
default:
- throw new CommandException (args.ErrorCode);
+ throw new CommandException (args.ErrorCode, args.ErrorMessage);
}
}
@@ -657,7 +657,9 @@ namespace Mono.Debugger.Soft
internal EventRequest GetRequest (int id) {
lock (requests_lock) {
- return requests [id];
+ EventRequest obj;
+ requests.TryGetValue (id, out obj);
+ return obj;
}
}
@@ -885,13 +887,18 @@ namespace Mono.Debugger.Soft
public class CommandException : Exception {
- internal CommandException (ErrorCode error_code) : base ("Debuggee returned error code " + error_code + ".") {
+ internal CommandException (ErrorCode error_code, string error_message) : base ("Debuggee returned error code " + error_code + (error_message == null || error_message.Length == 0 ? "." : " - " + error_message + ".")) {
ErrorCode = error_code;
+ ErrorMessage = error_message;
}
public ErrorCode ErrorCode {
get; set;
}
+
+ public string ErrorMessage {
+ get; internal set;
+ }
}
public class VMNotSuspendedException : InvalidOperationException
diff --git a/mcs/class/Mono.Debugger.Soft/Test/dtest-app.cs b/mcs/class/Mono.Debugger.Soft/Test/dtest-app.cs
index 945ea48c38..2f77ac510c 100644
--- a/mcs/class/Mono.Debugger.Soft/Test/dtest-app.cs
+++ b/mcs/class/Mono.Debugger.Soft/Test/dtest-app.cs
@@ -609,6 +609,15 @@ public class Tests : TestsBase, ITest2
fixed_size_array();
test_new_exception_filter();
test_async_debug_generics();
+ if (args.Length >0 && args [0] == "pointer_arguments2") {
+ pointers2 ();
+ return 0;
+ }
+ if (args.Length >0 && args [0] == "ss_multi_thread") {
+ ss_multi_thread ();
+ return 0;
+ }
+ test_invalid_argument_assembly_get_type ();
return 3;
}
@@ -637,6 +646,10 @@ public class Tests : TestsBase, ITest2
LocalReflectClass.RunMe ();
}
+ public static void test_invalid_argument_assembly_get_type () {
+
+ }
+
public static void breakpoints () {
/* Call these early so it is JITted by the time a breakpoint is placed on it */
bp3 ();
@@ -857,6 +870,24 @@ public class Tests : TestsBase, ITest2
n.Buffer2 = new char4('a', 'b', 'c', 'd');
}
+ [MethodImplAttribute (MethodImplOptions.NoInlining)]
+ public static void ss_multi_thread () {
+ for (int i = 0; i < 5; i++)
+ {
+ var t = new Thread(mt_ss);
+ t.Name = "Thread_" + i;
+ t.Start();
+ }
+ }
+
+ [MethodImplAttribute (MethodImplOptions.NoInlining)]
+ static void mt_ss()
+ {
+ int a = 12;
+ int b = 13;
+ int c = 13;
+ }
+
[MethodImplAttribute (MethodImplOptions.NoInlining)]
public static void test_new_exception_filter () {
test_new_exception_filter1();
@@ -2232,6 +2263,17 @@ public class Tests : TestsBase, ITest2
rtMethod.Invoke(rtObject, new object[] { });
}
+ public static unsafe void pointer_arguments2 (int* a) {
+ *a = 0;
+ }
+
+ [MethodImplAttribute (MethodImplOptions.NoInlining)]
+ public static unsafe void pointers2 () {
+ int[] a = new [] {1,2,3};
+ fixed (int* pa = a)
+ pointer_arguments2 (pa);
+ }
+
[MethodImplAttribute (MethodImplOptions.NoInlining)]
public static void new_thread_hybrid_exception() {
try
diff --git a/mcs/class/Mono.Debugger.Soft/Test/dtest.cs.REMOVED.git-id b/mcs/class/Mono.Debugger.Soft/Test/dtest.cs.REMOVED.git-id
index b47ee17548..21af07b7b2 100644
--- a/mcs/class/Mono.Debugger.Soft/Test/dtest.cs.REMOVED.git-id
+++ b/mcs/class/Mono.Debugger.Soft/Test/dtest.cs.REMOVED.git-id
@@ -1 +1 @@
-c385aeecb4b21151e7780126a63be6607f140237
\ No newline at end of file
+8c953f6fe3d5737ec602dd307992ac2919c00ccc
\ No newline at end of file
diff --git a/mcs/class/Mono.Posix/Mono.Unix/UnixEncoding.cs b/mcs/class/Mono.Posix/Mono.Unix/UnixEncoding.cs
index d869b1b90c..26529629fe 100644
--- a/mcs/class/Mono.Posix/Mono.Unix/UnixEncoding.cs
+++ b/mcs/class/Mono.Posix/Mono.Unix/UnixEncoding.cs
@@ -311,8 +311,8 @@ public class UnixEncoding : Encoding
public unsafe override int GetBytes(char* chars, int charCount, byte* bytes, int byteCount)
{
- if (bytes == null || chars == null)
- throw new ArgumentNullException (bytes == null ? "bytes" : "chars");
+ if ((bytes == null && byteCount != 0) || (chars == null && charCount != 0))
+ throw new ArgumentNullException ((bytes == null && byteCount != 0) ? "bytes" : "chars");
if (charCount < 0 || byteCount < 0)
throw new ArgumentOutOfRangeException (charCount < 0 ? "charCount" : "byteCount");
diff --git a/mcs/class/Mono.Posix/Test/Mono.Unix/UnixEncodingTest.cs b/mcs/class/Mono.Posix/Test/Mono.Unix/UnixEncodingTest.cs
index 2f0747294d..042c8dacf4 100644
--- a/mcs/class/Mono.Posix/Test/Mono.Unix/UnixEncodingTest.cs
+++ b/mcs/class/Mono.Posix/Test/Mono.Unix/UnixEncodingTest.cs
@@ -995,6 +995,23 @@ namespace MonoTests.Mono.Unix {
);
}
+ [Test]
+ public void TestEmptyString ()
+ {
+ byte[] data = new byte [] {};
+ Encoding enc = new UnixEncoding ();
+
+ string s = enc.GetString (data);
+ Assert.AreEqual (s, "", "#1");
+ char[] chars = enc.GetChars (data);
+ Assert.AreEqual (chars.Length, 0, "#2");
+
+ byte[] b1 = enc.GetBytes ("");
+ Assert.AreEqual (b1.Length, 0, "#3");
+ byte[] b2 = enc.GetBytes (new char[] {});
+ Assert.AreEqual (b2.Length, 0, "#3");
+ }
+
private void Compare (string prefix, string start, byte[] end)
{
byte[] bytes = unix.GetBytes (start);
diff --git a/mcs/class/System.Web.Services/Documentation/en/System.Web.Services.Discovery/ContractReference.xml b/mcs/class/System.Web.Services/Documentation/en/System.Web.Services.Discovery/ContractReference.xml
index 085775ad20..6723880da0 100644
--- a/mcs/class/System.Web.Services/Documentation/en/System.Web.Services.Discovery/ContractReference.xml
+++ b/mcs/class/System.Web.Services/Documentation/en/System.Web.Services.Discovery/ContractReference.xml
@@ -21,7 +21,7 @@
- XML Web services discovery involves discovering the available Web Services given an URL. The URL usually points to a discovery document, which typically has a.disco file name extension. Within a discovery document are references to information about the existance of XML Web services. These references can refer to service descriptions, XML Schema Definition language (XSD) schemas or other discovery documents. This class represents a reference to a Service Description.
+ XML Web services discovery involves discovering the available Web Services given an URL. The URL usually points to a discovery document, which typically has a.disco file name extension. Within a discovery document are references to information about the existence of XML Web services. These references can refer to service descriptions, XML Schema Definition language (XSD) schemas or other discovery documents. This class represents a reference to a Service Description.
Within a discovery document, a reference to a Service Description is contained within a contractRef XML element. The contractRef XML element has two attributes: ref and docRef. The contractRef element must have an XML namespace matching the constant, whereas the ref and docRef attributes are placed in the and properties.
diff --git a/mcs/class/System.Web.Services/Documentation/en/System.Web.Services.Discovery/DiscoveryDocument.xml b/mcs/class/System.Web.Services/Documentation/en/System.Web.Services.Discovery/DiscoveryDocument.xml
index b76e04d18c..c216e91af8 100644
--- a/mcs/class/System.Web.Services/Documentation/en/System.Web.Services.Discovery/DiscoveryDocument.xml
+++ b/mcs/class/System.Web.Services/Documentation/en/System.Web.Services.Discovery/DiscoveryDocument.xml
@@ -21,7 +21,7 @@
- XML Web services discovery involves discovering the available XML Web services, given an URL. The URL typically points to a discovery document, which usually has a.disco file name extension. The discovery document, which is an XML document, contains references to information about the existance of XML Web services, such as a service description, XML Schema Definition (XSD) language schema, or another discovery document. This class represents the contents of the discovery document; where the property contains a list of the references contained within the discovery document.
+ XML Web services discovery involves discovering the available XML Web services, given an URL. The URL typically points to a discovery document, which usually has a.disco file name extension. The discovery document, which is an XML document, contains references to information about the existence of XML Web services, such as a service description, XML Schema Definition (XSD) language schema, or another discovery document. This class represents the contents of the discovery document; where the property contains a list of the references contained within the discovery document.
diff --git a/mcs/class/System.Web.Services/Documentation/en/System.Web.Services.Discovery/DiscoveryDocumentReference.xml b/mcs/class/System.Web.Services/Documentation/en/System.Web.Services.Discovery/DiscoveryDocumentReference.xml
index c756e7a029..425c3cc40c 100644
--- a/mcs/class/System.Web.Services/Documentation/en/System.Web.Services.Discovery/DiscoveryDocumentReference.xml
+++ b/mcs/class/System.Web.Services/Documentation/en/System.Web.Services.Discovery/DiscoveryDocumentReference.xml
@@ -21,7 +21,7 @@
- XML Web services discovery involves discovering the available XML Web services given an URL. The URL typically points to a discovery document, which usually has a.disco file name extension. The discovery document contains references to information about the existance of XML Web services, such as Service Descriptions, XML Schema Definition language (XSD) schemas, or other discovery documents. This class represents a reference to a discovery document.
+ XML Web services discovery involves discovering the available XML Web services given an URL. The URL typically points to a discovery document, which usually has a.disco file name extension. The discovery document contains references to information about the existence of XML Web services, such as Service Descriptions, XML Schema Definition language (XSD) schemas, or other discovery documents. This class represents a reference to a discovery document.
diff --git a/mcs/class/System.Web.Services/Documentation/en/System.Web.Services.Discovery/SchemaReference.xml b/mcs/class/System.Web.Services/Documentation/en/System.Web.Services.Discovery/SchemaReference.xml
index 2207fba340..35da42d8a2 100644
--- a/mcs/class/System.Web.Services/Documentation/en/System.Web.Services.Discovery/SchemaReference.xml
+++ b/mcs/class/System.Web.Services/Documentation/en/System.Web.Services.Discovery/SchemaReference.xml
@@ -21,7 +21,7 @@
- XML Web services discovery involves discovering the available XML Web services given, a URL. A The URL typically points to a discovery document, which usually has a.disco file name extension. The discovery document contains references to information about the existance of XML Web services. These references can refer to service descriptions, XSD schemas, or other discovery documents. This class represents a reference to an XSD schema.
+ XML Web services discovery involves discovering the available XML Web services given, a URL. A The URL typically points to a discovery document, which usually has a.disco file name extension. The discovery document contains references to information about the existence of XML Web services. These references can refer to service descriptions, XSD schemas, or other discovery documents. This class represents a reference to an XSD schema.
Within a discovery document, a reference to an XSD schema is contained within a schemaRef XML element. The schemaRef XML element has an XML namespace and a ref attribute. The value of the XML namespace must match the constant. The value of the ref attribute is placed in the property.
diff --git a/mcs/class/System.Windows.Forms/System.Windows.Forms.RTF/Charcode.cs b/mcs/class/System.Windows.Forms/System.Windows.Forms.RTF/Charcode.cs
deleted file mode 100644
index fc9ca63b12..0000000000
--- a/mcs/class/System.Windows.Forms/System.Windows.Forms.RTF/Charcode.cs
+++ /dev/null
@@ -1,413 +0,0 @@
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-// Copyright (c) 2005 Novell, Inc. (http://www.novell.com)
-//
-// Authors:
-// Peter Bartok (pbartok@novell.com)
-//
-//
-
-// COMPLETE
-
-using System.Collections;
-
-namespace System.Windows.Forms.RTF {
- internal class Charcode {
- #region Local Variables
- private StandardCharCode[] codes;
- private Hashtable reverse;
- private int size;
- #endregion // Local Variables
-
- #region Cached Values
- static Charcode ansi_generic;
- #endregion
-
- #region Public Constructors
- public Charcode() : this(256) {
- }
-
- private Charcode(int size) {
- this.size = size;
- this.codes = new StandardCharCode[size];
- this.reverse = new Hashtable(size);
-
- // No need to reinitialize array to its default value
- //for (int i = 0; i < size; i++) {
- // codes[i] = StandardCharCode.nothing;
- //}
- }
- #endregion // Public Constructors
-
- #region Public Instance Properties
- public int this[StandardCharCode c] {
- get {
- object obj;
-
- obj = reverse[c];
- if (obj != null) {
- return (int)obj;
- }
- for (int i = 0; i < size; i++) {
- if (codes[i] == c) {
- return i;
- }
- }
-
- return -1;
- }
- }
-
- public StandardCharCode this[int c] {
- get {
- if (c < 0 || c >= size) {
- return StandardCharCode.nothing;
- }
-
- return codes[c];
- }
-
- private set {
- if (c < 0 || c >= size) {
- return;
- }
-
- codes[c] = value;
- reverse[value] = c;
- }
- }
- #endregion // Public Instance Properties
-
- #region Public Instance Methods
- #endregion // Public Instance Methods
-
- #region Public Static Methods
- public static Charcode AnsiGeneric {
- get {
- if (ansi_generic != null)
- return ansi_generic;
-
- ansi_generic = new Charcode(256);
-
- ansi_generic[0x06] = StandardCharCode.formula;
- ansi_generic[0x1e] = StandardCharCode.nobrkhyphen;
- ansi_generic[0x1f] = StandardCharCode.opthyphen;
- ansi_generic[' '] = StandardCharCode.space;
- ansi_generic['!'] = StandardCharCode.exclam;
- ansi_generic['"'] = StandardCharCode.quotedbl;
- ansi_generic['#'] = StandardCharCode.numbersign;
- ansi_generic['$'] = StandardCharCode.dollar;
- ansi_generic['%'] = StandardCharCode.percent;
- ansi_generic['&'] = StandardCharCode.ampersand;
- ansi_generic['\\'] = StandardCharCode.quoteright;
- ansi_generic['('] = StandardCharCode.parenleft;
- ansi_generic[')'] = StandardCharCode.parenright;
- ansi_generic['*'] = StandardCharCode.asterisk;
- ansi_generic['+'] = StandardCharCode.plus;
- ansi_generic[','] = StandardCharCode.comma;
- ansi_generic['-'] = StandardCharCode.hyphen;
- ansi_generic['.'] = StandardCharCode.period;
- ansi_generic['/'] = StandardCharCode.slash;
- ansi_generic['0'] = StandardCharCode.zero;
- ansi_generic['1'] = StandardCharCode.one;
- ansi_generic['2'] = StandardCharCode.two;
- ansi_generic['3'] = StandardCharCode.three;
- ansi_generic['4'] = StandardCharCode.four;
- ansi_generic['5'] = StandardCharCode.five;
- ansi_generic['6'] = StandardCharCode.six;
- ansi_generic['7'] = StandardCharCode.seven;
- ansi_generic['8'] = StandardCharCode.eight;
- ansi_generic['9'] = StandardCharCode.nine;
- ansi_generic[':'] = StandardCharCode.colon;
- ansi_generic[';'] = StandardCharCode.semicolon;
- ansi_generic['<'] = StandardCharCode.less;
- ansi_generic['='] = StandardCharCode.equal;
- ansi_generic['>'] = StandardCharCode.greater;
- ansi_generic['?'] = StandardCharCode.question;
- ansi_generic['@'] = StandardCharCode.at;
- ansi_generic['A'] = StandardCharCode.A;
- ansi_generic['B'] = StandardCharCode.B;
- ansi_generic['C'] = StandardCharCode.C;
- ansi_generic['D'] = StandardCharCode.D;
- ansi_generic['E'] = StandardCharCode.E;
- ansi_generic['F'] = StandardCharCode.F;
- ansi_generic['G'] = StandardCharCode.G;
- ansi_generic['H'] = StandardCharCode.H;
- ansi_generic['I'] = StandardCharCode.I;
- ansi_generic['J'] = StandardCharCode.J;
- ansi_generic['K'] = StandardCharCode.K;
- ansi_generic['L'] = StandardCharCode.L;
- ansi_generic['M'] = StandardCharCode.M;
- ansi_generic['N'] = StandardCharCode.N;
- ansi_generic['O'] = StandardCharCode.O;
- ansi_generic['P'] = StandardCharCode.P;
- ansi_generic['Q'] = StandardCharCode.Q;
- ansi_generic['R'] = StandardCharCode.R;
- ansi_generic['S'] = StandardCharCode.S;
- ansi_generic['T'] = StandardCharCode.T;
- ansi_generic['U'] = StandardCharCode.U;
- ansi_generic['V'] = StandardCharCode.V;
- ansi_generic['W'] = StandardCharCode.W;
- ansi_generic['X'] = StandardCharCode.X;
- ansi_generic['Y'] = StandardCharCode.Y;
- ansi_generic['Z'] = StandardCharCode.Z;
- ansi_generic['['] = StandardCharCode.bracketleft;
- ansi_generic['\\'] = StandardCharCode.backslash;
- ansi_generic[']'] = StandardCharCode.bracketright;
- ansi_generic['^'] = StandardCharCode.asciicircum;
- ansi_generic['_'] = StandardCharCode.underscore;
- ansi_generic['`'] = StandardCharCode.quoteleft;
- ansi_generic['a'] = StandardCharCode.a;
- ansi_generic['b'] = StandardCharCode.b;
- ansi_generic['c'] = StandardCharCode.c;
- ansi_generic['d'] = StandardCharCode.d;
- ansi_generic['e'] = StandardCharCode.e;
- ansi_generic['f'] = StandardCharCode.f;
- ansi_generic['g'] = StandardCharCode.g;
- ansi_generic['h'] = StandardCharCode.h;
- ansi_generic['i'] = StandardCharCode.i;
- ansi_generic['j'] = StandardCharCode.j;
- ansi_generic['k'] = StandardCharCode.k;
- ansi_generic['l'] = StandardCharCode.l;
- ansi_generic['m'] = StandardCharCode.m;
- ansi_generic['n'] = StandardCharCode.n;
- ansi_generic['o'] = StandardCharCode.o;
- ansi_generic['p'] = StandardCharCode.p;
- ansi_generic['q'] = StandardCharCode.q;
- ansi_generic['r'] = StandardCharCode.r;
- ansi_generic['s'] = StandardCharCode.s;
- ansi_generic['t'] = StandardCharCode.t;
- ansi_generic['u'] = StandardCharCode.u;
- ansi_generic['v'] = StandardCharCode.v;
- ansi_generic['w'] = StandardCharCode.w;
- ansi_generic['x'] = StandardCharCode.x;
- ansi_generic['y'] = StandardCharCode.y;
- ansi_generic['z'] = StandardCharCode.z;
- ansi_generic['{'] = StandardCharCode.braceleft;
- ansi_generic['|'] = StandardCharCode.bar;
- ansi_generic['}'] = StandardCharCode.braceright;
- ansi_generic['~'] = StandardCharCode.asciitilde;
- ansi_generic[0xa0] = StandardCharCode.nobrkspace;
- ansi_generic[0xa1] = StandardCharCode.exclamdown;
- ansi_generic[0xa2] = StandardCharCode.cent;
- ansi_generic[0xa3] = StandardCharCode.sterling;
- ansi_generic[0xa4] = StandardCharCode.currency;
- ansi_generic[0xa5] = StandardCharCode.yen;
- ansi_generic[0xa6] = StandardCharCode.brokenbar;
- ansi_generic[0xa7] = StandardCharCode.section;
- ansi_generic[0xa8] = StandardCharCode.dieresis;
- ansi_generic[0xa9] = StandardCharCode.copyright;
- ansi_generic[0xaa] = StandardCharCode.ordfeminine;
- ansi_generic[0xab] = StandardCharCode.guillemotleft;
- ansi_generic[0xac] = StandardCharCode.logicalnot;
- ansi_generic[0xad] = StandardCharCode.opthyphen;
- ansi_generic[0xae] = StandardCharCode.registered;
- ansi_generic[0xaf] = StandardCharCode.macron;
- ansi_generic[0xb0] = StandardCharCode.degree;
- ansi_generic[0xb1] = StandardCharCode.plusminus;
- ansi_generic[0xb2] = StandardCharCode.twosuperior;
- ansi_generic[0xb3] = StandardCharCode.threesuperior;
- ansi_generic[0xb4] = StandardCharCode.acute;
- ansi_generic[0xb5] = StandardCharCode.mu;
- ansi_generic[0xb6] = StandardCharCode.paragraph;
- ansi_generic[0xb7] = StandardCharCode.periodcentered;
- ansi_generic[0xb8] = StandardCharCode.cedilla;
- ansi_generic[0xb9] = StandardCharCode.onesuperior;
- ansi_generic[0xba] = StandardCharCode.ordmasculine;
- ansi_generic[0xbb] = StandardCharCode.guillemotright;
- ansi_generic[0xbc] = StandardCharCode.onequarter;
- ansi_generic[0xbd] = StandardCharCode.onehalf;
- ansi_generic[0xbe] = StandardCharCode.threequarters;
- ansi_generic[0xbf] = StandardCharCode.questiondown;
- ansi_generic[0xc0] = StandardCharCode.Agrave;
- ansi_generic[0xc1] = StandardCharCode.Aacute;
- ansi_generic[0xc2] = StandardCharCode.Acircumflex;
- ansi_generic[0xc3] = StandardCharCode.Atilde;
- ansi_generic[0xc4] = StandardCharCode.Adieresis;
- ansi_generic[0xc5] = StandardCharCode.Aring;
- ansi_generic[0xc6] = StandardCharCode.AE;
- ansi_generic[0xc7] = StandardCharCode.Ccedilla;
- ansi_generic[0xc8] = StandardCharCode.Egrave;
- ansi_generic[0xc9] = StandardCharCode.Eacute;
- ansi_generic[0xca] = StandardCharCode.Ecircumflex;
- ansi_generic[0xcb] = StandardCharCode.Edieresis;
- ansi_generic[0xcc] = StandardCharCode.Igrave;
- ansi_generic[0xcd] = StandardCharCode.Iacute;
- ansi_generic[0xce] = StandardCharCode.Icircumflex;
- ansi_generic[0xcf] = StandardCharCode.Idieresis;
- ansi_generic[0xd0] = StandardCharCode.Eth;
- ansi_generic[0xd1] = StandardCharCode.Ntilde;
- ansi_generic[0xd2] = StandardCharCode.Ograve;
- ansi_generic[0xd3] = StandardCharCode.Oacute;
- ansi_generic[0xd4] = StandardCharCode.Ocircumflex;
- ansi_generic[0xd5] = StandardCharCode.Otilde;
- ansi_generic[0xd6] = StandardCharCode.Odieresis;
- ansi_generic[0xd7] = StandardCharCode.multiply;
- ansi_generic[0xd8] = StandardCharCode.Oslash;
- ansi_generic[0xd9] = StandardCharCode.Ugrave;
- ansi_generic[0xda] = StandardCharCode.Uacute;
- ansi_generic[0xdb] = StandardCharCode.Ucircumflex;
- ansi_generic[0xdc] = StandardCharCode.Udieresis;
- ansi_generic[0xdd] = StandardCharCode.Yacute;
- ansi_generic[0xde] = StandardCharCode.Thorn;
- ansi_generic[0xdf] = StandardCharCode.germandbls;
- ansi_generic[0xe0] = StandardCharCode.agrave;
- ansi_generic[0xe1] = StandardCharCode.aacute;
- ansi_generic[0xe2] = StandardCharCode.acircumflex;
- ansi_generic[0xe3] = StandardCharCode.atilde;
- ansi_generic[0xe4] = StandardCharCode.adieresis;
- ansi_generic[0xe5] = StandardCharCode.aring;
- ansi_generic[0xe6] = StandardCharCode.ae;
- ansi_generic[0xe7] = StandardCharCode.ccedilla;
- ansi_generic[0xe8] = StandardCharCode.egrave;
- ansi_generic[0xe9] = StandardCharCode.eacute;
- ansi_generic[0xea] = StandardCharCode.ecircumflex;
- ansi_generic[0xeb] = StandardCharCode.edieresis;
- ansi_generic[0xec] = StandardCharCode.igrave;
- ansi_generic[0xed] = StandardCharCode.iacute;
- ansi_generic[0xee] = StandardCharCode.icircumflex;
- ansi_generic[0xef] = StandardCharCode.idieresis;
- ansi_generic[0xf0] = StandardCharCode.eth;
- ansi_generic[0xf1] = StandardCharCode.ntilde;
- ansi_generic[0xf2] = StandardCharCode.ograve;
- ansi_generic[0xf3] = StandardCharCode.oacute;
- ansi_generic[0xf4] = StandardCharCode.ocircumflex;
- ansi_generic[0xf5] = StandardCharCode.otilde;
- ansi_generic[0xf6] = StandardCharCode.odieresis;
- ansi_generic[0xf7] = StandardCharCode.divide;
- ansi_generic[0xf8] = StandardCharCode.oslash;
- ansi_generic[0xf9] = StandardCharCode.ugrave;
- ansi_generic[0xfa] = StandardCharCode.uacute;
- ansi_generic[0xfb] = StandardCharCode.ucircumflex;
- ansi_generic[0xfc] = StandardCharCode.udieresis;
- ansi_generic[0xfd] = StandardCharCode.yacute;
- ansi_generic[0xfe] = StandardCharCode.thorn;
- ansi_generic[0xff] = StandardCharCode.ydieresis;
-
- return ansi_generic;
- }
- }
-
- public static Charcode AnsiSymbol {
- get {
- Charcode code = new Charcode(256);
-
- code[0x06] = StandardCharCode.formula;
- code[0x1e] = StandardCharCode.nobrkhyphen;
- code[0x1f] = StandardCharCode.opthyphen;
- code[' '] = StandardCharCode.space;
- code['!'] = StandardCharCode.exclam;
- code['"'] = StandardCharCode.universal;
- code['#'] = StandardCharCode.mathnumbersign;
- code['$'] = StandardCharCode.existential;
- code['%'] = StandardCharCode.percent;
- code['&'] = StandardCharCode.ampersand;
- code['\\'] = StandardCharCode.suchthat;
- code['('] = StandardCharCode.parenleft;
- code[')'] = StandardCharCode.parenright;
- code['*'] = StandardCharCode.mathasterisk;
- code['+'] = StandardCharCode.mathplus;
- code[','] = StandardCharCode.comma;
- code['-'] = StandardCharCode.mathminus;
- code['.'] = StandardCharCode.period;
- code['/'] = StandardCharCode.slash;
- code['0'] = StandardCharCode.zero;
- code['1'] = StandardCharCode.one;
- code['2'] = StandardCharCode.two;
- code['3'] = StandardCharCode.three;
- code['4'] = StandardCharCode.four;
- code['5'] = StandardCharCode.five;
- code['6'] = StandardCharCode.six;
- code['7'] = StandardCharCode.seven;
- code['8'] = StandardCharCode.eight;
- code['9'] = StandardCharCode.nine;
- code[':'] = StandardCharCode.colon;
- code[';'] = StandardCharCode.semicolon;
- code['<'] = StandardCharCode.less;
- code['='] = StandardCharCode.mathequal;
- code['>'] = StandardCharCode.greater;
- code['?'] = StandardCharCode.question;
- code['@'] = StandardCharCode.congruent;
- code['A'] = StandardCharCode.Alpha;
- code['B'] = StandardCharCode.Beta;
- code['C'] = StandardCharCode.Chi;
- code['D'] = StandardCharCode.Delta;
- code['E'] = StandardCharCode.Epsilon;
- code['F'] = StandardCharCode.Phi;
- code['G'] = StandardCharCode.Gamma;
- code['H'] = StandardCharCode.Eta;
- code['I'] = StandardCharCode.Iota;
- code['K'] = StandardCharCode.Kappa;
- code['L'] = StandardCharCode.Lambda;
- code['M'] = StandardCharCode.Mu;
- code['N'] = StandardCharCode.Nu;
- code['O'] = StandardCharCode.Omicron;
- code['P'] = StandardCharCode.Pi;
- code['Q'] = StandardCharCode.Theta;
- code['R'] = StandardCharCode.Rho;
- code['S'] = StandardCharCode.Sigma;
- code['T'] = StandardCharCode.Tau;
- code['U'] = StandardCharCode.Upsilon;
- code['V'] = StandardCharCode.varsigma;
- code['W'] = StandardCharCode.Omega;
- code['X'] = StandardCharCode.Xi;
- code['Y'] = StandardCharCode.Psi;
- code['Z'] = StandardCharCode.Zeta;
- code['['] = StandardCharCode.bracketleft;
- code['\\'] = StandardCharCode.backslash;
- code[']'] = StandardCharCode.bracketright;
- code['^'] = StandardCharCode.asciicircum;
- code['_'] = StandardCharCode.underscore;
- code['`'] = StandardCharCode.quoteleft;
- code['a'] = StandardCharCode.alpha;
- code['b'] = StandardCharCode.beta;
- code['c'] = StandardCharCode.chi;
- code['d'] = StandardCharCode.delta;
- code['e'] = StandardCharCode.epsilon;
- code['f'] = StandardCharCode.phi;
- code['g'] = StandardCharCode.gamma;
- code['h'] = StandardCharCode.eta;
- code['i'] = StandardCharCode.iota;
- code['k'] = StandardCharCode.kappa;
- code['l'] = StandardCharCode.lambda;
- code['m'] = StandardCharCode.mu;
- code['n'] = StandardCharCode.nu;
- code['o'] = StandardCharCode.omicron;
- code['p'] = StandardCharCode.pi;
- code['q'] = StandardCharCode.theta;
- code['r'] = StandardCharCode.rho;
- code['s'] = StandardCharCode.sigma;
- code['t'] = StandardCharCode.tau;
- code['u'] = StandardCharCode.upsilon;
- code['w'] = StandardCharCode.omega;
- code['x'] = StandardCharCode.xi;
- code['y'] = StandardCharCode.psi;
- code['z'] = StandardCharCode.zeta;
- code['{'] = StandardCharCode.braceleft;
- code['|'] = StandardCharCode.bar;
- code['}'] = StandardCharCode.braceright;
- code['~'] = StandardCharCode.mathtilde;
-
- return code;
- }
- }
- #endregion // Public Static Methods
- }
-}
diff --git a/mcs/class/System.Windows.Forms/System.Windows.Forms.RTF/Charset.cs b/mcs/class/System.Windows.Forms/System.Windows.Forms.RTF/Charset.cs
deleted file mode 100644
index cba5781959..0000000000
--- a/mcs/class/System.Windows.Forms/System.Windows.Forms.RTF/Charset.cs
+++ /dev/null
@@ -1,157 +0,0 @@
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-// Copyright (c) 2005 Novell, Inc. (http://www.novell.com)
-//
-// Authors:
-// Peter Bartok (pbartok@novell.com)
-//
-//
-
-using System;
-
-// COMPLETE
-
-namespace System.Windows.Forms.RTF {
-
-#if RTF_LIB
- public
-#else
- internal
-#endif
- class Charset {
- #region Local Variables
- private CharsetType id;
- private CharsetFlags flags;
- private Charcode code;
- private string file;
- #endregion // Local Variables
-
- #region Public Constructors
- public Charset() {
- flags = CharsetFlags.Read | CharsetFlags.Switch;
- id = CharsetType.General;
- file = string.Empty;
- this.ReadMap();
- }
- #endregion // Public Constructors
-
- #region Public Instance Properties
- public Charcode Code {
- get {
- return code;
- }
-
- set {
- code = value;
- }
- }
-
- public CharsetFlags Flags {
- get {
- return flags;
- }
-
- set {
- flags = value;
- }
- }
-
- public CharsetType ID {
- get {
- return id;
- }
-
- set {
- switch(value) {
- case CharsetType.Symbol: {
- id = CharsetType.Symbol;
- return;
- }
-
- default:
- case CharsetType.General: {
- id = CharsetType.General;
- return;
- }
- }
- }
- }
-
- public string File {
- get {
- return file;
- }
-
- set {
- if (file != value) {
- file = value;
- }
- }
- }
-
- public StandardCharCode this[int c] {
- get {
- return code[c];
- }
- }
-
- #endregion // Public Instance Properties
-
- #region Public Instance Methods
- public bool ReadMap() {
- switch (id) {
- case CharsetType.General: {
- if (file == string.Empty) {
- code = Charcode.AnsiGeneric;
- return true;
- }
- // FIXME - implement reading charmap from file...
- return true;
- }
-
- case CharsetType.Symbol: {
- if (file == string.Empty) {
- code = Charcode.AnsiSymbol;
- return true;
- }
-
- // FIXME - implement reading charmap from file...
- return true;
- }
-
- default: {
- return false;
- }
- }
- }
-
- public char StdCharCode(string name) {
- // FIXME - finish this
- return ' ';
-
- }
-
- public string StdCharName(char code) {
- // FIXME - finish this
- return String.Empty;
- }
- #endregion // Public Instance Methods
- }
-}
diff --git a/mcs/class/System.Windows.Forms/System.Windows.Forms.RTF/CharsetToCodepage.cs b/mcs/class/System.Windows.Forms/System.Windows.Forms.RTF/CharsetToCodepage.cs
new file mode 100644
index 0000000000..783c635100
--- /dev/null
+++ b/mcs/class/System.Windows.Forms/System.Windows.Forms.RTF/CharsetToCodepage.cs
@@ -0,0 +1,79 @@
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+// Copyright (c) 2020 Karl Scowen
+//
+// Authors:
+// Karl Scowen
+//
+//
+
+
+namespace System.Windows.Forms.RTF {
+ internal static class CharsetToCodepage {
+ public static int Translate(CharsetType charset)
+ {
+ switch (charset) {
+ case CharsetType.General:
+ case CharsetType.Arabic_Traditional:
+ case CharsetType.Arabic_user:
+ case CharsetType.Hebrew_user:
+ case CharsetType.Mac: // Technically wrong, because "mac" should actually be quite a few with their own code pages...
+ default:
+ return System.Text.Encoding.Default.CodePage;
+ case CharsetType.ANSI:
+ return 1252;
+ case CharsetType.Symbol:
+ return 42;
+ case CharsetType.Shift_Jis:
+ return 932;
+ case CharsetType.Hangul:
+ return 949;
+ case CharsetType.Johab:
+ return 1361;
+ case CharsetType.GB2312:
+ return 936;
+ case CharsetType.Big5:
+ return 950;
+ case CharsetType.Greek:
+ return 1253;
+ case CharsetType.Turkish:
+ return 1254;
+ case CharsetType.Vietnamese:
+ return 1258;
+ case CharsetType.Hebrew:
+ return 1255;
+ case CharsetType.Arabic:
+ return 1256;
+ case CharsetType.Baltic:
+ return 1257;
+ case CharsetType.Russian:
+ return 1251;
+ case CharsetType.Thai:
+ return 874;
+ case CharsetType.Eastern_European:
+ return 1250;
+ case CharsetType.PC_437:
+ return 437;
+ case CharsetType.OEM:
+ return 850;
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/mcs/class/System.Windows.Forms/System.Windows.Forms.RTF/CharsetType.cs b/mcs/class/System.Windows.Forms/System.Windows.Forms.RTF/CharsetType.cs
index a934dc8286..4dbb3d9489 100644
--- a/mcs/class/System.Windows.Forms/System.Windows.Forms.RTF/CharsetType.cs
+++ b/mcs/class/System.Windows.Forms/System.Windows.Forms.RTF/CharsetType.cs
@@ -21,6 +21,7 @@
//
// Authors:
// Peter Bartok (pbartok@novell.com)
+// Karl Scowen (contact@scowencomputers.co.nz)
//
//
@@ -33,8 +34,29 @@ namespace System.Windows.Forms.RTF {
#else
internal
#endif
- enum CharsetType {
- General = 0,
- Symbol = 1,
+ enum CharsetType : byte {
+ ANSI = 0,
+ General = 1,
+ Symbol = 2,
+ Mac = 77,
+ Shift_Jis = 128,
+ Hangul = 129,
+ Johab = 130,
+ GB2312 = 134,
+ Big5 = 136,
+ Greek = 161,
+ Turkish = 162,
+ Vietnamese = 163,
+ Hebrew = 177,
+ Arabic = 178,
+ Arabic_Traditional = 179,
+ Arabic_user = 180,
+ Hebrew_user = 181,
+ Baltic = 186,
+ Russian = 204,
+ Thai = 222,
+ Eastern_European = 238,
+ PC_437 = 254,
+ OEM = 255
}
}
diff --git a/mcs/class/System.Windows.Forms/System.Windows.Forms.RTF/KeysInit.cs b/mcs/class/System.Windows.Forms/System.Windows.Forms.RTF/KeysInit.cs
index 72188e6daa..5ff3ff426c 100644
--- a/mcs/class/System.Windows.Forms/System.Windows.Forms.RTF/KeysInit.cs
+++ b/mcs/class/System.Windows.Forms/System.Windows.Forms.RTF/KeysInit.cs
@@ -366,10 +366,12 @@ namespace System.Windows.Forms.RTF {
new KeyStruct(Major.StyleAttr, Minor.Next, "snext"),
new KeyStruct(Major.PictAttr, Minor.MacQD, "macpict"),
new KeyStruct(Major.PictAttr, Minor.PMMetafile, "pmmetafile"),
+ new KeyStruct(Major.PictAttr, Minor.EnhancedMetafile, "emfblip"),
new KeyStruct(Major.PictAttr, Minor.WinMetafile, "wmetafile"),
new KeyStruct(Major.PictAttr, Minor.DevIndBitmap, "dibitmap"),
new KeyStruct(Major.PictAttr, Minor.WinBitmap, "wbitmap"),
new KeyStruct(Major.PictAttr, Minor.PngBlip, "pngblip"),
+ new KeyStruct(Major.PictAttr, Minor.JpegBlip, "jpgblip"),
new KeyStruct(Major.PictAttr, Minor.PixelBits, "wbmbitspixel"),
new KeyStruct(Major.PictAttr, Minor.BitmapPlanes, "wbmplanes"),
new KeyStruct(Major.PictAttr, Minor.BitmapWid, "wbmwidthbytes"),
@@ -393,6 +395,7 @@ namespace System.Windows.Forms.RTF {
new KeyStruct(Major.NeXTGrAttr, Minor.NeXTGHeight, "height"),
new KeyStruct(Major.Destination, Minor.OptDest, "*"),
new KeyStruct(Major.Destination, Minor.FontTbl, "fonttbl"),
+ new KeyStruct(Major.Destination, Minor.FontName, "fname"),
new KeyStruct(Major.Destination, Minor.FontAltName, "falt"),
new KeyStruct(Major.Destination, Minor.EmbeddedFont, "fonteb"),
new KeyStruct(Major.Destination, Minor.FontFile, "fontfile"),
diff --git a/mcs/class/System.Windows.Forms/System.Windows.Forms.RTF/Minor.cs b/mcs/class/System.Windows.Forms/System.Windows.Forms.RTF/Minor.cs
index 8b0f1bc6f8..4033f5bbf2 100644
--- a/mcs/class/System.Windows.Forms/System.Windows.Forms.RTF/Minor.cs
+++ b/mcs/class/System.Windows.Forms/System.Windows.Forms.RTF/Minor.cs
@@ -41,6 +41,7 @@ namespace System.Windows.Forms.RTF {
// Major.Destinan
FontTbl,
+ FontName,
FontAltName,
EmbeddedFont,
FontFile,
@@ -520,10 +521,12 @@ namespace System.Windows.Forms.RTF {
// Major.PictAttr
MacQD,
PMMetafile,
+ EnhancedMetafile,
WinMetafile,
DevIndBitmap,
WinBitmap,
PngBlip,
+ JpegBlip,
PixelBits,
BitmapPlanes,
BitmapWid,
diff --git a/mcs/class/System.Windows.Forms/System.Windows.Forms.RTF/Picture.cs b/mcs/class/System.Windows.Forms/System.Windows.Forms.RTF/Picture.cs
index 244bcd9adf..35845b20af 100644
--- a/mcs/class/System.Windows.Forms/System.Windows.Forms.RTF/Picture.cs
+++ b/mcs/class/System.Windows.Forms/System.Windows.Forms.RTF/Picture.cs
@@ -66,7 +66,7 @@ namespace System.Windows.Forms.RTF {
public float Width {
get {
float w = width;
- if (w == -1) {
+ if (w < 0) {
if (image == null)
image = ToImage ();
w = image.Width;
@@ -79,7 +79,7 @@ namespace System.Windows.Forms.RTF {
public float Height {
get {
float h = height;
- if (h == -1) {
+ if (h < 0) {
if (image == null)
image = ToImage ();
h = image.Height;
@@ -113,7 +113,9 @@ namespace System.Windows.Forms.RTF {
return false;
switch (image_type) {
case Minor.PngBlip:
+ case Minor.JpegBlip:
case Minor.WinMetafile:
+ case Minor.EnhancedMetafile:
break;
default:
return false;
@@ -126,15 +128,7 @@ namespace System.Windows.Forms.RTF {
{
if (image == null)
image = ToImage ();
-
- float height = this.height;
- float width = this.width;
-
- if (height == -1)
- height = image.Height;
- if (width == -1)
- width = image.Width;
- dc.DrawImage (image, x, y, width, height);
+ dc.DrawImage (image, x, y, Width, Height);
}
public Image ToImage ()
diff --git a/mcs/class/System.Windows.Forms/System.Windows.Forms.RTF/RTF.cs b/mcs/class/System.Windows.Forms/System.Windows.Forms.RTF/RTF.cs
index 3b02df81ff..469c379ed2 100644
--- a/mcs/class/System.Windows.Forms/System.Windows.Forms.RTF/RTF.cs
+++ b/mcs/class/System.Windows.Forms/System.Windows.Forms.RTF/RTF.cs
@@ -21,6 +21,7 @@
//
// Authors:
// Peter Bartok (pbartok@novell.com)
+// Karl Scowen
//
// COMPLETE
@@ -60,10 +61,6 @@ namespace System.Windows.Forms.RTF {
private char prev_char;
private bool bump_line;
-
- private Font font_list;
-
- private Charset cur_charset;
private Stack charset_stack;
private Style styles;
@@ -101,10 +98,7 @@ namespace System.Windows.Forms.RTF {
line_pos = 0;
prev_char = unchecked((char)-1);
bump_line = false;
- font_list = null;
- charset_stack = null;
-
- cur_charset = new Charset();
+ charset_stack = new Stack();
destination_callbacks = new DestinationCallback();
class_callbacks = new ClassCallback();
@@ -369,49 +363,52 @@ SkipCRLF:
GetToken2();
if (this.rtf_class == TokenClass.Text) {
- this.minor = (Minor)this.cur_charset[(int)this.major];
- if (encoding == null) {
+ if (encoding == null)
encoding = Encoding.GetEncoding (encoding_code_page);
- }
encoded_text = new String (encoding.GetChars (new byte [] { (byte) this.major }));
- }
-
- if (this.cur_charset.Flags == CharsetFlags.None) {
- return this.rtf_class;
- }
-
- if (CheckCMM (TokenClass.Control, Major.Unicode, Minor.UnicodeAnsiCodepage)) {
+ } else if (CheckCMM (TokenClass.Control, Major.Unicode, Minor.UnicodeAnsiCodepage)) {
encoding_code_page = param;
// fallback to the default one in case we have an invalid value
if (encoding_code_page < 0 || encoding_code_page > 65535)
encoding_code_page = DefaultEncodingCodePage;
- }
- if (((this.cur_charset.Flags & CharsetFlags.Read) != 0) && CheckCM(TokenClass.Control, Major.CharSet)) {
- this.cur_charset.ReadMap();
- } else if (((this.cur_charset.Flags & CharsetFlags.Switch) != 0) && CheckCMM(TokenClass.Control, Major.CharAttr, Minor.FontNum)) {
+ encoding = null;
+ } else if (CheckCMM(TokenClass.Control, Major.CharAttr, Minor.FontNum)) {
Font fp;
- fp = Font.GetFont(this.font_list, this.param);
+ fp = Font.GetFont(this.fonts, this.param);
if (fp != null) {
- if (fp.Name.StartsWith("Symbol")) {
- this.cur_charset.ID = CharsetType.Symbol;
+ if (fp.Codepage != 0) {
+ if (fp.Codepage != encoding_code_page) {
+ encoding_code_page = fp.Codepage;
+ encoding = null;
+ }
} else {
- this.cur_charset.ID = CharsetType.General;
+ var cp = CharsetToCodepage.Translate (fp.Charset);
+ if (cp != 0 && cp != encoding_code_page) {
+ encoding_code_page = cp;
+ encoding = null;
+ }
+ }
+ }
+ } else if (this.rtf_class == TokenClass.Group) {
+ switch(this.major) {
+ case Major.BeginGroup: {
+ charset_stack.Push(encoding_code_page);
+ break;
}
- } else if (((this.cur_charset.Flags & CharsetFlags.Switch) != 0) && (this.rtf_class == TokenClass.Group)) {
- switch(this.major) {
- case Major.BeginGroup: {
- this.charset_stack.Push(this.cur_charset);
- break;
- }
- case Major.EndGroup: {
- this.cur_charset = (Charset)this.charset_stack.Pop();
- break;
+ case Major.EndGroup: {
+ if (charset_stack.Count > 0) {
+ encoding_code_page = (int)this.charset_stack.Pop();
+ } else {
+ encoding_code_page = DefaultEncodingCodePage;
}
+ if (encoding != null && encoding.CodePage != encoding_code_page)
+ encoding = null;
+ break;
}
}
}
@@ -677,7 +674,10 @@ SkipCRLF:
font = new Font(rtf);
- while ((rtf.rtf_class != TokenClass.EOF) && (!rtf.CheckCM(TokenClass.Text, (Major)';')) && (!rtf.CheckCM(TokenClass.Group, Major.EndGroup))) {
+ int depth = 0;
+ string untaggedName = null;
+
+ while ((rtf.rtf_class != TokenClass.EOF) && (!rtf.CheckCM(TokenClass.Text, (Major)';')) && depth >= 0) {
if (rtf.rtf_class == TokenClass.Control) {
switch(rtf.major) {
case Major.FontFamily: {
@@ -734,6 +734,26 @@ SkipCRLF:
break;
}
+ case Major.Destination: {
+ switch (rtf.minor) {
+ case Minor.FontName:
+ untaggedName = ReadFontName (rtf);
+ break;
+
+ case Minor.FontAltName:
+ font.AltName = ReadFontName (rtf);
+ break;
+
+ default: {
+ #if RTF_DEBUG
+ Console.WriteLine ("Got unhandled Control.Destination.Minor: " + rtf.minor);
+ #endif
+ break;
+ }
+ }
+ break;
+ }
+
default: {
#if RTF_DEBUG
Console.WriteLine("ReadFontTbl: Unknown Control token " + rtf.major);
@@ -742,22 +762,12 @@ SkipCRLF:
}
}
} else if (rtf.CheckCM(TokenClass.Group, Major.BeginGroup)) {
- rtf.SkipGroup();
- } else if (rtf.rtf_class == TokenClass.Text) {
- StringBuilder sb;
-
- sb = new StringBuilder();
-
- while ((rtf.rtf_class != TokenClass.EOF) && (!rtf.CheckCM(TokenClass.Text, (Major)';')) && (!rtf.CheckCM(TokenClass.Group, Major.EndGroup)) && (!rtf.CheckCM(TokenClass.Group, Major.BeginGroup))) {
- sb.Append((char)rtf.major);
- rtf.GetToken();
- }
-
- if (rtf.CheckCM(TokenClass.Group, Major.EndGroup)) {
- rtf.UngetToken();
- }
-
- font.Name = sb.ToString();
+ depth++;
+ } else if (rtf.CheckCM(TokenClass.Group, Major.EndGroup)) {
+ depth--;
+ } else if (rtf.rtf_class == TokenClass.Text)
+ {
+ font.Name = ReadFontName (rtf);
continue;
#if RTF_DEBUG
} else {
@@ -768,6 +778,9 @@ SkipCRLF:
rtf.GetToken();
}
+ if (untaggedName != null)
+ font.Name = untaggedName;
+
if (old == 0) {
rtf.GetToken();
@@ -788,6 +801,26 @@ SkipCRLF:
rtf.RouteToken();
}
+ private static String ReadFontName(RTF rtf)
+ {
+ StringBuilder sb = new StringBuilder ();
+
+ while (rtf.rtf_class != TokenClass.EOF && rtf.rtf_class != TokenClass.Text)
+ rtf.GetToken ();
+
+ while ((rtf.rtf_class != TokenClass.EOF) && (!rtf.CheckCM (TokenClass.Text, (Major)';')) && (!rtf.CheckCM(TokenClass.Group, Major.EndGroup)) &&
+ (!rtf.CheckCM (TokenClass.Group, Major.BeginGroup))) {
+ sb.Append ((char)rtf.major);
+ rtf.GetToken ();
+ }
+
+ if (rtf.CheckCM (TokenClass.Group, Major.EndGroup)) {
+ rtf.UngetToken();
+ }
+
+ return sb.ToString ();
+ }
+
private void ReadColorTbl(RTF rtf) {
Color color;
int num;
@@ -943,20 +976,25 @@ SkipCRLF:
private void ReadPictGroup(RTF rtf)
{
bool read_image_data = false;
-
+ int groupDepth = 0;
Picture picture = new Picture ();
while (true) {
rtf.GetToken ();
+ if (rtf.CheckCM (TokenClass.Group, Major.BeginGroup))
+ groupDepth++;
+
if (rtf.CheckCM (TokenClass.Group, Major.EndGroup))
+ groupDepth--;
+
+ if (groupDepth < 0)
break;
switch (minor) {
case Minor.PngBlip:
- picture.ImageType = minor;
- read_image_data = true;
- break;
+ case Minor.JpegBlip:
case Minor.WinMetafile:
+ case Minor.EnhancedMetafile:
picture.ImageType = minor;
read_image_data = true;
continue;
@@ -1047,10 +1085,33 @@ SkipCRLF:
}
}
- private void ReadObjGroup(RTF rtf) {
- rtf.SkipGroup();
- rtf.RouteToken();
+ private void ReadObjGroup (RTF rtf)
+ {
+ int level;
+
+ level = 1;
+
+ while (GetToken () != TokenClass.EOF && this.minor != Minor.ObjResult) {
+ if (rtf_class == TokenClass.Group) {
+ if (this.major == Major.BeginGroup) {
+ level++;
+ } else if (this.major == Major.EndGroup) {
+ level--;
+ if (level < 1) {
+ break;
+ }
+ }
+ }
+ }
+
+ if (level >= 1) {
+ GetToken ();
+
+ if (rtf_class == TokenClass.Group)
+ GetToken ();
+ rtf.RouteToken ();
+ }
}
#endregion // Default Delegates
}
-}
+ }
diff --git a/mcs/class/System.Windows.Forms/System.Windows.Forms.RTF/StandardCharCode.cs b/mcs/class/System.Windows.Forms/System.Windows.Forms.RTF/StandardCharCode.cs
deleted file mode 100644
index 906735ba18..0000000000
--- a/mcs/class/System.Windows.Forms/System.Windows.Forms.RTF/StandardCharCode.cs
+++ /dev/null
@@ -1,392 +0,0 @@
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-// Copyright (c) 2005 Novell, Inc. (http://www.novell.com)
-//
-// Authors:
-// Peter Bartok (pbartok@novell.com)
-//
-//
-
-// COMPLETE
-
-namespace System.Windows.Forms.RTF {
-
-#if RTF_LIB
- public
-#else
- internal
-#endif
- enum StandardCharCode {
- nothing = 0,
- space = 1,
- exclam = 2,
- quotedbl = 3,
- numbersign = 4,
- dollar = 5,
- percent = 6,
- ampersand = 7,
- quoteright = 8,
- parenleft = 9,
- parenright = 10,
- asterisk = 11,
- plus = 12,
- comma = 13,
- hyphen = 14,
- period = 15,
- slash = 16,
- zero = 17,
- one = 18,
- two = 19,
- three = 20,
- four = 21,
- five = 22,
- six = 23,
- seven = 24,
- eight = 25,
- nine = 26,
- colon = 27,
- semicolon = 28,
- less = 29,
- equal = 30,
- greater = 31,
- question = 32,
- at = 33,
- A = 34,
- B = 35,
- C = 36,
- D = 37,
- E = 38,
- F = 39,
- G = 40,
- H = 41,
- I = 42,
- J = 43,
- K = 44,
- L = 45,
- M = 46,
- N = 47,
- O = 48,
- P = 49,
- Q = 50,
- R = 51,
- S = 52,
- T = 53,
- U = 54,
- V = 55,
- W = 56,
- X = 57,
- Y = 58,
- Z = 59,
- bracketleft = 60,
- backslash = 61,
- bracketright = 62,
- asciicircum = 63,
- underscore = 64,
- quoteleft = 65,
- a = 66,
- b = 67,
- c = 68,
- d = 69,
- e = 70,
- f = 71,
- g = 72,
- h = 73,
- i = 74,
- j = 75,
- k = 76,
- l = 77,
- m = 78,
- n = 79,
- o = 80,
- p = 81,
- q = 82,
- r = 83,
- s = 84,
- t = 85,
- u = 86,
- v = 87,
- w = 88,
- x = 89,
- y = 90,
- z = 91,
- braceleft = 92,
- bar = 93,
- braceright = 94,
- asciitilde = 95,
- exclamdown = 96,
- cent = 97,
- sterling = 98,
- fraction = 99,
- yen = 100,
- florin = 101,
- section = 102,
- currency = 103,
- quotedblleft = 104,
- guillemotleft = 105,
- guilsinglleft = 106,
- guilsinglright = 107,
- fi = 108,
- fl = 109,
- endash = 110,
- dagger = 111,
- daggerdbl = 112,
- periodcentered = 113,
- paragraph = 114,
- bullet = 115,
- quotesinglbase = 116,
- quotedblbase = 117,
- quotedblright = 118,
- guillemotright = 119,
- ellipsis = 120,
- perthousand = 121,
- questiondown = 122,
- grave = 123,
- acute = 124,
- circumflex = 125,
- tilde = 126,
- macron = 127,
- breve = 128,
- dotaccent = 129,
- dieresis = 130,
- ring = 131,
- cedilla = 132,
- hungarumlaut = 133,
- ogonek = 134,
- caron = 135,
- emdash = 136,
- AE = 137,
- ordfeminine = 138,
- Lslash = 139,
- Oslash = 140,
- OE = 141,
- ordmasculine = 142,
- ae = 143,
- dotlessi = 144,
- lslash = 145,
- oslash = 146,
- oe = 147,
- germandbls = 148,
- Aacute = 149,
- Acircumflex = 150,
- Adieresis = 151,
- Agrave = 152,
- Aring = 153,
- Atilde = 154,
- Ccedilla = 155,
- Eacute = 156,
- Ecircumflex = 157,
- Edieresis = 158,
- Egrave = 159,
- Eth = 160,
- Iacute = 161,
- Icircumflex = 162,
- Idieresis = 163,
- Igrave = 164,
- Ntilde = 165,
- Oacute = 166,
- Ocircumflex = 167,
- Odieresis = 168,
- Ograve = 169,
- Otilde = 170,
- Scaron = 171,
- Thorn = 172,
- Uacute = 173,
- Ucircumflex = 174,
- Udieresis = 175,
- Ugrave = 176,
- Yacute = 177,
- Ydieresis = 178,
- aacute = 179,
- acircumflex = 180,
- adieresis = 181,
- agrave = 182,
- aring = 183,
- atilde = 184,
- brokenbar = 185,
- ccedilla = 186,
- copyright = 187,
- degree = 188,
- divide = 189,
- eacute = 190,
- ecircumflex = 191,
- edieresis = 192,
- egrave = 193,
- eth = 194,
- iacute = 195,
- icircumflex = 196,
- idieresis = 197,
- igrave = 198,
- logicalnot = 199,
- minus = 200,
- multiply = 201,
- ntilde = 202,
- oacute = 203,
- ocircumflex = 204,
- odieresis = 205,
- ograve = 206,
- onehalf = 207,
- onequarter = 208,
- onesuperior = 209,
- otilde = 210,
- plusminus = 211,
- registered = 212,
- thorn = 213,
- threequarters = 214,
- threesuperior = 215,
- trademark = 216,
- twosuperior = 217,
- uacute = 218,
- ucircumflex = 219,
- udieresis = 220,
- ugrave = 221,
- yacute = 222,
- ydieresis = 223,
- Alpha = 224,
- Beta = 225,
- Chi = 226,
- Delta = 227,
- Epsilon = 228,
- Phi = 229,
- Gamma = 230,
- Eta = 231,
- Iota = 232,
- Kappa = 233,
- Lambda = 234,
- Mu = 235,
- Nu = 236,
- Omicron = 237,
- Pi = 238,
- Theta = 239,
- Rho = 240,
- Sigma = 241,
- Tau = 242,
- Upsilon = 243,
- varUpsilon = 244,
- Omega = 245,
- Xi = 246,
- Psi = 247,
- Zeta = 248,
- alpha = 249,
- beta = 250,
- chi = 251,
- delta = 252,
- epsilon = 253,
- phi = 254,
- varphi = 255,
- gamma = 256,
- eta = 257,
- iota = 258,
- kappa = 259,
- lambda = 260,
- mu = 261,
- nu = 262,
- omicron = 263,
- pi = 264,
- varpi = 265,
- theta = 266,
- vartheta = 267,
- rho = 268,
- sigma = 269,
- varsigma = 270,
- tau = 271,
- upsilon = 272,
- omega = 273,
- xi = 274,
- psi = 275,
- zeta = 276,
- nobrkspace = 277,
- nobrkhyphen = 278,
- lessequal = 279,
- greaterequal = 280,
- infinity = 281,
- integral = 282,
- notequal = 283,
- radical = 284,
- radicalex = 285,
- approxequal = 286,
- apple = 287,
- partialdiff = 288,
- opthyphen = 289,
- formula = 290,
- lozenge = 291,
- universal = 292,
- existential = 293,
- suchthat = 294,
- congruent = 295,
- therefore = 296,
- perpendicular = 297,
- minute = 298,
- club = 299,
- diamond = 300,
- heart = 301,
- spade = 302,
- arrowboth = 303,
- arrowleft = 304,
- arrowup = 305,
- arrowright = 306,
- arrowdown = 307,
- second = 308,
- proportional = 309,
- equivalence = 310,
- arrowvertex = 311,
- arrowhorizex = 312,
- carriagereturn = 313,
- aleph = 314,
- Ifraktur = 315,
- Rfraktur = 316,
- weierstrass = 317,
- circlemultiply = 318,
- circleplus = 319,
- emptyset = 320,
- intersection = 321,
- union = 322,
- propersuperset = 323,
- reflexsuperset = 324,
- notsubset = 325,
- propersubset = 326,
- reflexsubset = 327,
- element = 328,
- notelement = 329,
- angle = 330,
- gradient = 331,
- product = 332,
- logicaland = 333,
- logicalor = 334,
- arrowdblboth = 335,
- arrowdblleft = 336,
- arrowdblup = 337,
- arrowdblright = 338,
- arrowdbldown = 339,
- angleleft = 340,
- registersans = 341,
- copyrightsans = 342,
- trademarksans = 343,
- angleright = 344,
- mathplus = 345,
- mathminus = 346,
- mathasterisk = 347,
- mathnumbersign = 348,
- dotmath = 349,
- mathequal = 350,
- mathtilde = 351,
-
- MaxChar = 352
- }
-}
diff --git a/mcs/class/System.Windows.Forms/System.Windows.Forms.RTF/StandardCharName.cs b/mcs/class/System.Windows.Forms/System.Windows.Forms.RTF/StandardCharName.cs
deleted file mode 100644
index 0190b798cf..0000000000
--- a/mcs/class/System.Windows.Forms/System.Windows.Forms.RTF/StandardCharName.cs
+++ /dev/null
@@ -1,411 +0,0 @@
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-// Copyright (c) 2005 Novell, Inc. (http://www.novell.com)
-//
-// Authors:
-// Peter Bartok (pbartok@novell.com)
-//
-//
-
-// COMPLETE
-
-namespace System.Windows.Forms.RTF {
-
-#if RTF_LIB
- public
-#else
- internal
-#endif
- class StandardCharName {
- public static string[] Names = {
- "nothing",
- "space",
- "exclam",
- "quotedbl",
- "numbersign",
- "dollar",
- "percent",
- "ampersand",
- "quoteright",
- "parenleft",
- "parenright",
- "asterisk",
- "plus",
- "comma",
- "hyphen",
- "period",
- "slash",
- "zero",
- "one",
- "two",
- "three",
- "four",
- "five",
- "six",
- "seven",
- "eight",
- "nine",
- "colon",
- "semicolon",
- "less",
- "equal",
- "greater",
- "question",
- "at",
- "A",
- "B",
- "C",
- "D",
- "E",
- "F",
- "G",
- "H",
- "I",
- "J",
- "K",
- "L",
- "M",
- "N",
- "O",
- "P",
- "Q",
- "R",
- "S",
- "T",
- "U",
- "V",
- "W",
- "X",
- "Y",
- "Z",
- "bracketleft",
- "backslash",
- "bracketright",
- "asciicircum",
- "underscore",
- "quoteleft",
- "a",
- "b",
- "c",
- "d",
- "e",
- "f",
- "g",
- "h",
- "i",
- "j",
- "k",
- "l",
- "m",
- "n",
- "o",
- "p",
- "q",
- "r",
- "s",
- "t",
- "u",
- "v",
- "w",
- "x",
- "y",
- "z",
- "braceleft",
- "bar",
- "braceright",
- "asciitilde",
- "exclamdown",
- "cent",
- "sterling",
- "fraction",
- "yen",
- "florin",
- "section",
- "currency",
- "quotedblleft",
- "guillemotleft",
- "guilsinglleft",
- "guilsinglright",
- "fi",
- "fl",
- "endash",
- "dagger",
- "daggerdbl",
- "periodcentered",
- "paragraph",
- "bullet",
- "quotesinglbase",
- "quotedblbase",
- "quotedblright",
- "guillemotright",
- "ellipsis",
- "perthousand",
- "questiondown",
- "grave",
- "acute",
- "circumflex",
- "tilde",
- "macron",
- "breve",
- "dotaccent",
- "dieresis",
- "ring",
- "cedilla",
- "hungarumlaut",
- "ogonek",
- "caron",
- "emdash",
- "AE",
- "ordfeminine",
- "Lslash",
- "Oslash",
- "OE",
- "ordmasculine",
- "ae",
- "dotlessi",
- "lslash",
- "oslash",
- "oe",
- "germandbls",
- "Aacute",
- "Acircumflex",
- "Adieresis",
- "Agrave",
- "Aring",
- "Atilde",
- "Ccedilla",
- "Eacute",
- "Ecircumflex",
- "Edieresis",
- "Egrave",
- "Eth",
- "Iacute",
- "Icircumflex",
- "Idieresis",
- "Igrave",
- "Ntilde",
- "Oacute",
- "Ocircumflex",
- "Odieresis",
- "Ograve",
- "Otilde",
- "Scaron",
- "Thorn",
- "Uacute",
- "Ucircumflex",
- "Udieresis",
- "Ugrave",
- "Yacute",
- "Ydieresis",
- "aacute",
- "acircumflex",
- "adieresis",
- "agrave",
- "aring",
- "atilde",
- "brokenbar",
- "ccedilla",
- "copyright",
- "degree",
- "divide",
- "eacute",
- "ecircumflex",
- "edieresis",
- "egrave",
- "eth",
- "iacute",
- "icircumflex",
- "idieresis",
- "igrave",
- "logicalnot",
- "minus",
- "multiply",
- "ntilde",
- "oacute",
- "ocircumflex",
- "odieresis",
- "ograve",
- "onehalf",
- "onequarter",
- "onesuperior",
- "otilde",
- "plusminus",
- "registered",
- "thorn",
- "threequarters",
- "threesuperior",
- "trademark",
- "twosuperior",
- "uacute",
- "ucircumflex",
- "udieresis",
- "ugrave",
- "yacute",
- "ydieresis",
- "Alpha",
- "Beta",
- "Chi",
- "Delta",
- "Epsilon",
- "Phi",
- "Gamma",
- "Eta",
- "Iota",
- "Kappa",
- "Lambda",
- "Mu",
- "Nu",
- "Omicron",
- "Pi",
- "Theta",
- "Rho",
- "Sigma",
- "Tau",
- "Upsilon",
- "varUpsilon",
- "Omega",
- "Xi",
- "Psi",
- "Zeta",
- "alpha",
- "beta",
- "chi",
- "delta",
- "epsilon",
- "phi",
- "varphi",
- "gamma",
- "eta",
- "iota",
- "kappa",
- "lambda",
- "mu",
- "nu",
- "omicron",
- "pi",
- "varpi",
- "theta",
- "vartheta",
- "rho",
- "sigma",
- "varsigma",
- "tau",
- "upsilon",
- "omega",
- "xi",
- "psi",
- "zeta",
- "nobrkspace",
- "nobrkhyphen",
- "lessequal",
- "greaterequal",
- "infinity",
- "integral",
- "notequal",
- "radical",
- "radicalex",
- "approxequal",
- "apple",
- "partialdiff",
- "opthyphen",
- "formula",
- "lozenge",
- "universal",
- "existential",
- "suchthat",
- "congruent",
- "therefore",
- "perpendicular",
- "minute",
- "club",
- "diamond",
- "heart",
- "spade",
- "arrowboth",
- "arrowleft",
- "arrowup",
- "arrowright",
- "arrowdown",
- "second",
- "proportional",
- "equivalence",
- "arrowvertex",
- "arrowhorizex",
- "carriagereturn",
- "aleph",
- "Ifraktur",
- "Rfraktur",
- "weierstrass",
- "circlemultiply",
- "circleplus",
- "emptyset",
- "intersection",
- "union",
- "propersuperset",
- "reflexsuperset",
- "notsubset",
- "propersubset",
- "reflexsubset",
- "element",
- "notelement",
- "angle",
- "gradient",
- "product",
- "logicaland",
- "logicalor",
- "arrowdblboth",
- "arrowdblleft",
- "arrowdblup",
- "arrowdblright",
- "arrowdbldown",
- "angleleft",
- "registersans",
- "copyrightsans",
- "trademarksans",
- "angleright",
- "mathplus",
- "mathminus",
- "mathasterisk",
- "mathnumbersign",
- "dotmath",
- "mathequal",
- "mathtilde"
- };
-
- /// Lookup name by ID
- public static string Name(int index) {
- if ((index < 0) || (index >= Names.Length)) {
- return string.Empty;
- }
-
- return Names[index];
- }
-
- /// Lookup ID by name (e.g. mathtilde)
- public static int ID(string name) {
- for (int i=0; i < Names.Length; i++) {
- if (name.Equals(Names[i])) {
- return i;
- }
- }
- return 0;
- }
- }
-}
diff --git a/mcs/class/System.Windows.Forms/System.Windows.Forms.RTF/TextMap.cs b/mcs/class/System.Windows.Forms/System.Windows.Forms.RTF/TextMap.cs
deleted file mode 100644
index f4474b9262..0000000000
--- a/mcs/class/System.Windows.Forms/System.Windows.Forms.RTF/TextMap.cs
+++ /dev/null
@@ -1,440 +0,0 @@
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-// Copyright (c) 2005 Novell, Inc. (http://www.novell.com)
-//
-// Authors:
-// Peter Bartok (pbartok@novell.com)
-//
-//
-
-// This map is for convencience only, any app can create/use it's own
-// StdCharCode -> table
-
-using System.Collections;
-
-namespace System.Windows.Forms.RTF {
-
-#if RTF_LIB
- public
-#else
- internal
-#endif
- class TextMap {
- #region Local Variables
- private string[] table;
- #endregion // Local Variables
-
- #region Public Constructors
- public TextMap() {
- table = new string[(int)StandardCharCode.MaxChar];
-
- for (int i = 0; i < (int)StandardCharCode.MaxChar; i++) {
- table[i] = string.Empty;
- }
- }
- #endregion // Public Constructors
-
- #region Public Instance Properties
- internal string this[StandardCharCode c] { // FIXME - this should be public, if the whole namespace was public (ie standalone RTF parser)
- get {
- return table[(int)c];
- }
-
- set {
- table[(int)c] = value;
- }
- }
-
- public string[] Table {
- get {
- return table;
- }
- }
- #endregion // Public Instance Properties
-
- #region Public Static Methods
- public static void SetupStandardTable(string[] table)
- {
- /*
- table[(int)StandardCharCode.space] = " ";
- table[(int)StandardCharCode.exclam] = "!";
- table[(int)StandardCharCode.quotedbl] = "\"";
- table[(int)StandardCharCode.numbersign] = "#";
- table[(int)StandardCharCode.dollar] = "$";
- table[(int)StandardCharCode.percent] = "%";
- table[(int)StandardCharCode.ampersand] = "&";
- table[(int)StandardCharCode.quoteright] = "'";
- table[(int)StandardCharCode.parenleft] = "(";
- table[(int)StandardCharCode.parenright] = ")";
- table[(int)StandardCharCode.asterisk] = "*";
- table[(int)StandardCharCode.plus] = "+";
- table[(int)StandardCharCode.comma] = ",";
- table[(int)StandardCharCode.hyphen] = "-";
- table[(int)StandardCharCode.period] = ".";
- table[(int)StandardCharCode.slash] = "/";
- table[(int)StandardCharCode.zero] = "0";
- table[(int)StandardCharCode.one] = "1";
- table[(int)StandardCharCode.two] = "2";
- table[(int)StandardCharCode.three] = "3";
- table[(int)StandardCharCode.four] = "4";
- table[(int)StandardCharCode.five] = "5";
- table[(int)StandardCharCode.six] = "6";
- table[(int)StandardCharCode.seven] = "7";
- table[(int)StandardCharCode.eight] = "8";
- table[(int)StandardCharCode.nine] = "9";
- table[(int)StandardCharCode.colon] = ":";
- table[(int)StandardCharCode.semicolon] = ";";
- table[(int)StandardCharCode.less] = "<";
- table[(int)StandardCharCode.equal] = "=";
- table[(int)StandardCharCode.greater] = ">";
- table[(int)StandardCharCode.question] = "?";
- table[(int)StandardCharCode.at] = "@";
- table[(int)StandardCharCode.A] = "A";
- table[(int)StandardCharCode.B] = "B";
- table[(int)StandardCharCode.C] = "C";
- table[(int)StandardCharCode.D] = "D";
- table[(int)StandardCharCode.E] = "E";
- table[(int)StandardCharCode.F] = "F";
- table[(int)StandardCharCode.G] = "G";
- table[(int)StandardCharCode.H] = "H";
- table[(int)StandardCharCode.I] = "I";
- table[(int)StandardCharCode.J] = "J";
- table[(int)StandardCharCode.K] = "K";
- table[(int)StandardCharCode.L] = "L";
- table[(int)StandardCharCode.M] = "M";
- table[(int)StandardCharCode.N] = "N";
- table[(int)StandardCharCode.O] = "O";
- table[(int)StandardCharCode.P] = "P";
- table[(int)StandardCharCode.Q] = "Q";
- table[(int)StandardCharCode.R] = "R";
- table[(int)StandardCharCode.S] = "S";
- table[(int)StandardCharCode.T] = "T";
- table[(int)StandardCharCode.U] = "U";
- table[(int)StandardCharCode.V] = "V";
- table[(int)StandardCharCode.W] = "W";
- table[(int)StandardCharCode.X] = "X";
- table[(int)StandardCharCode.Y] = "Y";
- table[(int)StandardCharCode.Z] = "Z";
- table[(int)StandardCharCode.bracketleft] = "[";
- table[(int)StandardCharCode.backslash] = "\\";
- table[(int)StandardCharCode.bracketright] = "]";
- table[(int)StandardCharCode.asciicircum] = "^";
- table[(int)StandardCharCode.underscore] = "_";
- table[(int)StandardCharCode.quoteleft] = "`";
- table[(int)StandardCharCode.a] = "a";
- table[(int)StandardCharCode.b] = "b";
- table[(int)StandardCharCode.c] = "c";
- table[(int)StandardCharCode.d] = "d";
- table[(int)StandardCharCode.e] = "e";
- table[(int)StandardCharCode.f] = "f";
- table[(int)StandardCharCode.g] = "g";
- table[(int)StandardCharCode.h] = "h";
- table[(int)StandardCharCode.i] = "i";
- table[(int)StandardCharCode.j] = "j";
- table[(int)StandardCharCode.k] = "k";
- table[(int)StandardCharCode.l] = "l";
- table[(int)StandardCharCode.m] = "m";
- table[(int)StandardCharCode.n] = "n";
- table[(int)StandardCharCode.o] = "o";
- table[(int)StandardCharCode.p] = "p";
- table[(int)StandardCharCode.q] = "q";
- table[(int)StandardCharCode.r] = "r";
- table[(int)StandardCharCode.s] = "s";
- table[(int)StandardCharCode.t] = "t";
- table[(int)StandardCharCode.u] = "u";
- table[(int)StandardCharCode.v] = "v";
- table[(int)StandardCharCode.w] = "w";
- table[(int)StandardCharCode.x] = "x";
- table[(int)StandardCharCode.y] = "y";
- table[(int)StandardCharCode.z] = "z";
- table[(int)StandardCharCode.braceleft] = "{";
- table[(int)StandardCharCode.bar] = "|";
- table[(int)StandardCharCode.braceright] = "}";
- table[(int)StandardCharCode.asciitilde] = "~";
- table[(int)StandardCharCode.AE] = "AE";
- table[(int)StandardCharCode.OE] = "OE";
- table[(int)StandardCharCode.acute] = "'";
- table[(int)StandardCharCode.ae] = "ae";
- table[(int)StandardCharCode.angleleft] = "<";
- table[(int)StandardCharCode.angleright] = ">";
- table[(int)StandardCharCode.arrowboth] = "<->";
- table[(int)StandardCharCode.arrowdblboth] = "<=>";
- table[(int)StandardCharCode.arrowdblleft] = "<=";
- table[(int)StandardCharCode.arrowdblright] = "=>";
- table[(int)StandardCharCode.arrowleft] = "<-";
- table[(int)StandardCharCode.arrowright] = "->";
- table[(int)StandardCharCode.bullet] = "o";
- table[(int)StandardCharCode.cent] = "cent";
- table[(int)StandardCharCode.circumflex] = "^";
- table[(int)StandardCharCode.copyright] = "(c)";
- table[(int)StandardCharCode.copyrightsans] = "(c)";
- table[(int)StandardCharCode.degree] = "deg.";
- table[(int)StandardCharCode.divide] = "/";
- table[(int)StandardCharCode.dotlessi] = "i";
- table[(int)StandardCharCode.ellipsis] = "...";
- table[(int)StandardCharCode.emdash] = "--";
- table[(int)StandardCharCode.endash] = "-";
- table[(int)StandardCharCode.fi] = "fi";
- table[(int)StandardCharCode.fl] = "fl";
- table[(int)StandardCharCode.fraction] = "/";
- table[(int)StandardCharCode.germandbls] = "ss";
- table[(int)StandardCharCode.grave] = "`";
- table[(int)StandardCharCode.greaterequal] = ">=";
- table[(int)StandardCharCode.guillemotleft] = "<<";
- table[(int)StandardCharCode.guillemotright] = ">>";
- table[(int)StandardCharCode.guilsinglleft] = "<";
- table[(int)StandardCharCode.guilsinglright] = ">";
- table[(int)StandardCharCode.lessequal] = "<=";
- table[(int)StandardCharCode.logicalnot] = "~";
- table[(int)StandardCharCode.mathasterisk] = "*";
- table[(int)StandardCharCode.mathequal] = "=";
- table[(int)StandardCharCode.mathminus] = "-";
- table[(int)StandardCharCode.mathnumbersign] = "#";
- table[(int)StandardCharCode.mathplus] = "+";
- table[(int)StandardCharCode.mathtilde] = "~";
- table[(int)StandardCharCode.minus] = "-";
- table[(int)StandardCharCode.mu] = "u";
- table[(int)StandardCharCode.multiply] = "x";
- table[(int)StandardCharCode.nobrkhyphen] = "-";
- table[(int)StandardCharCode.nobrkspace] = "";
- table[(int)StandardCharCode.notequal] = "!=";
- table[(int)StandardCharCode.oe] = "oe";
- table[(int)StandardCharCode.onehalf] = "1/2";
- table[(int)StandardCharCode.onequarter] = "1/4";
- table[(int)StandardCharCode.periodcentered] = ".";
- table[(int)StandardCharCode.plusminus] = "+/-";
- table[(int)StandardCharCode.quotedblbase] = ",,";
- table[(int)StandardCharCode.quotedblleft] = "\"";
- table[(int)StandardCharCode.quotedblright] = "\"";
- table[(int)StandardCharCode.quotesinglbase] = ",";
- table[(int)StandardCharCode.registered] = "reg.";
- table[(int)StandardCharCode.registersans] = "reg.";
- table[(int)StandardCharCode.threequarters] = "3/4";
- table[(int)StandardCharCode.tilde] = "~";
- table[(int)StandardCharCode.trademark] = "(TM)";
- table[(int)StandardCharCode.trademarksans] = "(TM)";
-
- table[(int)StandardCharCode.aacute] = "\xE0";
- table[(int)StandardCharCode.questiondown] = "\xBF";
-
- table[(int)StandardCharCode.udieresis] = "\xFC";
- table[(int)StandardCharCode.Udieresis] = "\xDC";
- table[(int)StandardCharCode.odieresis] = "\xF6";
- table[(int)StandardCharCode.Odieresis] = "\xD6";
- */
-
- table [(int) StandardCharCode.formula] = "\x6";
- table [(int) StandardCharCode.nobrkhyphen] = "\x1e";
- table [(int) StandardCharCode.opthyphen] = "\x1f";
- table [(int) StandardCharCode.space] = " ";
- table [(int) StandardCharCode.exclam] = "!";
- table [(int) StandardCharCode.quotedbl] = "\"";
- table [(int) StandardCharCode.numbersign] = "#";
- table [(int) StandardCharCode.dollar] = "$";
- table [(int) StandardCharCode.percent] = "%";
- table [(int) StandardCharCode.ampersand] = "&";
- table [(int) StandardCharCode.parenleft] = "(";
- table [(int) StandardCharCode.parenright] = ")";
- table [(int) StandardCharCode.asterisk] = "*";
- table [(int) StandardCharCode.plus] = "+";
- table [(int) StandardCharCode.comma] = ",";
- table [(int) StandardCharCode.hyphen] = "-";
- table [(int) StandardCharCode.period] = ".";
- table [(int) StandardCharCode.slash] = "/";
- table [(int) StandardCharCode.zero] = "0";
- table [(int) StandardCharCode.one] = "1";
- table [(int) StandardCharCode.two] = "2";
- table [(int) StandardCharCode.three] = "3";
- table [(int) StandardCharCode.four] = "4";
- table [(int) StandardCharCode.five] = "5";
- table [(int) StandardCharCode.six] = "6";
- table [(int) StandardCharCode.seven] = "7";
- table [(int) StandardCharCode.eight] = "8";
- table [(int) StandardCharCode.nine] = "9";
- table [(int) StandardCharCode.colon] = ":";
- table [(int) StandardCharCode.semicolon] = ";";
- table [(int) StandardCharCode.less] = "<";
- table [(int) StandardCharCode.equal] = "=";
- table [(int) StandardCharCode.greater] = ">";
- table [(int) StandardCharCode.question] = "?";
- table [(int) StandardCharCode.at] = "@";
- table [(int) StandardCharCode.A] = "A";
- table [(int) StandardCharCode.B] = "B";
- table [(int) StandardCharCode.C] = "C";
- table [(int) StandardCharCode.D] = "D";
- table [(int) StandardCharCode.E] = "E";
- table [(int) StandardCharCode.F] = "F";
- table [(int) StandardCharCode.G] = "G";
- table [(int) StandardCharCode.H] = "H";
- table [(int) StandardCharCode.I] = "I";
- table [(int) StandardCharCode.J] = "J";
- table [(int) StandardCharCode.K] = "K";
- table [(int) StandardCharCode.L] = "L";
- table [(int) StandardCharCode.M] = "M";
- table [(int) StandardCharCode.N] = "N";
- table [(int) StandardCharCode.O] = "O";
- table [(int) StandardCharCode.P] = "P";
- table [(int) StandardCharCode.Q] = "Q";
- table [(int) StandardCharCode.R] = "R";
- table [(int) StandardCharCode.S] = "S";
- table [(int) StandardCharCode.T] = "T";
- table [(int) StandardCharCode.U] = "U";
- table [(int) StandardCharCode.V] = "V";
- table [(int) StandardCharCode.W] = "W";
- table [(int) StandardCharCode.X] = "X";
- table [(int) StandardCharCode.Y] = "Y";
- table [(int) StandardCharCode.Z] = "Z";
- table [(int) StandardCharCode.bracketleft] = "[";
- table [(int) StandardCharCode.backslash] = "\\";
- table [(int) StandardCharCode.bracketright] = "]";
- table [(int) StandardCharCode.asciicircum] = "^";
- table [(int) StandardCharCode.underscore] = "_";
- table [(int) StandardCharCode.quoteleft] = "`";
- table [(int) StandardCharCode.a] = "a";
- table [(int) StandardCharCode.b] = "b";
- table [(int) StandardCharCode.c] = "c";
- table [(int) StandardCharCode.d] = "d";
- table [(int) StandardCharCode.e] = "e";
- table [(int) StandardCharCode.f] = "f";
- table [(int) StandardCharCode.g] = "g";
- table [(int) StandardCharCode.h] = "h";
- table [(int) StandardCharCode.i] = "i";
- table [(int) StandardCharCode.j] = "j";
- table [(int) StandardCharCode.k] = "k";
- table [(int) StandardCharCode.l] = "l";
- table [(int) StandardCharCode.m] = "m";
- table [(int) StandardCharCode.n] = "n";
- table [(int) StandardCharCode.o] = "o";
- table [(int) StandardCharCode.p] = "p";
- table [(int) StandardCharCode.q] = "q";
- table [(int) StandardCharCode.r] = "r";
- table [(int) StandardCharCode.s] = "s";
- table [(int) StandardCharCode.t] = "t";
- table [(int) StandardCharCode.u] = "u";
- table [(int) StandardCharCode.v] = "v";
- table [(int) StandardCharCode.w] = "w";
- table [(int) StandardCharCode.x] = "x";
- table [(int) StandardCharCode.y] = "y";
- table [(int) StandardCharCode.z] = "z";
- table [(int) StandardCharCode.braceleft] = "{";
- table [(int) StandardCharCode.bar] = "|";
- table [(int) StandardCharCode.braceright] = "}";
- table [(int) StandardCharCode.asciitilde] = "~";
- table [(int) StandardCharCode.nobrkspace] = "\xa0";
- table [(int) StandardCharCode.exclamdown] = "\xa1";
- table [(int) StandardCharCode.cent] = "\xa2";
- table [(int) StandardCharCode.sterling] = "\xa3";
- table [(int) StandardCharCode.currency] = "\xa4";
- table [(int) StandardCharCode.yen] = "\xa5";
- table [(int) StandardCharCode.brokenbar] = "\xa6";
- table [(int) StandardCharCode.section] = "\xa7";
- table [(int) StandardCharCode.dieresis] = "\xa8";
- table [(int) StandardCharCode.copyright] = "\xa9";
- table [(int) StandardCharCode.ordfeminine] = "\xaa";
- table [(int) StandardCharCode.guillemotleft] = "\xab";
- table [(int) StandardCharCode.logicalnot] = "\xac";
- table [(int) StandardCharCode.opthyphen] = "\xad";
- table [(int) StandardCharCode.registered] = "\xae";
- table [(int) StandardCharCode.macron] = "\xaf";
- table [(int) StandardCharCode.degree] = "\xb0";
- table [(int) StandardCharCode.plusminus] = "\xb1";
- table [(int) StandardCharCode.twosuperior] = "\xb2";
- table [(int) StandardCharCode.threesuperior] = "\xb3";
- table [(int) StandardCharCode.acute] = "\xb4";
- table [(int) StandardCharCode.mu] = "\xb5";
- table [(int) StandardCharCode.paragraph] = "\xb6";
- table [(int) StandardCharCode.periodcentered] = "\xb7";
- table [(int) StandardCharCode.cedilla] = "\xb8";
- table [(int) StandardCharCode.onesuperior] = "\xb9";
- table [(int) StandardCharCode.ordmasculine] = "\xba";
- table [(int) StandardCharCode.guillemotright] = "\xbb";
- table [(int) StandardCharCode.onequarter] = "\xbc";
- table [(int) StandardCharCode.onehalf] = "\xbd";
- table [(int) StandardCharCode.threequarters] = "\xbe";
- table [(int) StandardCharCode.questiondown] = "\xbf";
- table [(int) StandardCharCode.Agrave] = "\xc0";
- table [(int) StandardCharCode.Aacute] = "\xc1";
- table [(int) StandardCharCode.Acircumflex] = "\xc2";
- table [(int) StandardCharCode.Atilde] = "\xc3";
- table [(int) StandardCharCode.Adieresis] = "\xc4";
- table [(int) StandardCharCode.Aring] = "\xc5";
- table [(int) StandardCharCode.AE] = "\xc6";
- table [(int) StandardCharCode.Ccedilla] = "\xc7";
- table [(int) StandardCharCode.Egrave] = "\xc8";
- table [(int) StandardCharCode.Eacute] = "\xc9";
- table [(int) StandardCharCode.Ecircumflex] = "\xca";
- table [(int) StandardCharCode.Edieresis] = "\xcb";
- table [(int) StandardCharCode.Igrave] = "\xcc";
- table [(int) StandardCharCode.Iacute] = "\xcd";
- table [(int) StandardCharCode.Icircumflex] = "\xce";
- table [(int) StandardCharCode.Idieresis] = "\xcf";
- table [(int) StandardCharCode.Eth] = "\xd0";
- table [(int) StandardCharCode.Ntilde] = "\xd1";
- table [(int) StandardCharCode.Ograve] = "\xd2";
- table [(int) StandardCharCode.Oacute] = "\xd3";
- table [(int) StandardCharCode.Ocircumflex] = "\xd4";
- table [(int) StandardCharCode.Otilde] = "\xd5";
- table [(int) StandardCharCode.Odieresis] = "\xd6";
- table [(int) StandardCharCode.multiply] = "\xd7";
- table [(int) StandardCharCode.Oslash] = "\xd8";
- table [(int) StandardCharCode.Ugrave] = "\xd9";
- table [(int) StandardCharCode.Uacute] = "\xda";
- table [(int) StandardCharCode.Ucircumflex] = "\xdb";
- table [(int) StandardCharCode.Udieresis] = "\xdc";
- table [(int) StandardCharCode.Yacute] = "\xdd";
- table [(int) StandardCharCode.Thorn] = "\xde";
- table [(int) StandardCharCode.germandbls] = "\xdf";
- table [(int) StandardCharCode.agrave] = "\xe0";
- table [(int) StandardCharCode.aacute] = "\xe1";
- table [(int) StandardCharCode.acircumflex] = "\xe2";
- table [(int) StandardCharCode.atilde] = "\xe3";
- table [(int) StandardCharCode.adieresis] = "\xe4";
- table [(int) StandardCharCode.aring] = "\xe5";
- table [(int) StandardCharCode.ae] = "\xe6";
- table [(int) StandardCharCode.ccedilla] = "\xe7";
- table [(int) StandardCharCode.egrave] = "\xe8";
- table [(int) StandardCharCode.eacute] = "\xe9";
- table [(int) StandardCharCode.ecircumflex] = "\xea";
- table [(int) StandardCharCode.edieresis] = "\xeb";
- table [(int) StandardCharCode.igrave] = "\xec";
- table [(int) StandardCharCode.iacute] = "\xed";
- table [(int) StandardCharCode.icircumflex] = "\xee";
- table [(int) StandardCharCode.idieresis] = "\xef";
- table [(int) StandardCharCode.eth] = "\xf0";
- table [(int) StandardCharCode.ntilde] = "\xf1";
- table [(int) StandardCharCode.ograve] = "\xf2";
- table [(int) StandardCharCode.oacute] = "\xf3";
- table [(int) StandardCharCode.ocircumflex] = "\xf4";
- table [(int) StandardCharCode.otilde] = "\xf5";
- table [(int) StandardCharCode.odieresis] = "\xf6";
- table [(int) StandardCharCode.divide] = "\xf7";
- table [(int) StandardCharCode.oslash] = "\xf8";
- table [(int) StandardCharCode.ugrave] = "\xf9";
- table [(int) StandardCharCode.uacute] = "\xfa";
- table [(int) StandardCharCode.ucircumflex] = "\xfb";
- table [(int) StandardCharCode.udieresis] = "\xfc";
- table [(int) StandardCharCode.yacute] = "\xfd";
- table [(int) StandardCharCode.thorn] = "\xfe";
- table [(int) StandardCharCode.ydieresis] = "\xff";
-
- }
- #endregion // Public Static Methods
- }
-}
diff --git a/mcs/class/System.Windows.Forms/System.Windows.Forms.Theming/Default/LabelPainter.cs b/mcs/class/System.Windows.Forms/System.Windows.Forms.Theming/Default/LabelPainter.cs
index 221a09c260..ca35cf6e97 100644
--- a/mcs/class/System.Windows.Forms/System.Windows.Forms.Theming/Default/LabelPainter.cs
+++ b/mcs/class/System.Windows.Forms/System.Windows.Forms.Theming/Default/LabelPainter.cs
@@ -40,6 +40,8 @@ namespace System.Windows.Forms.Theming.Default
label.DrawImage (dc, label.Image, rect, label.ImageAlign);
+ rect.Height = Math.Max(rect.Height, label.Font.Height);
+
if (label.Enabled) {
dc.DrawString (label.Text, label.Font,
ThemeEngine.Current.ResPool.GetSolidBrush (label.ForeColor),
diff --git a/mcs/class/System.Windows.Forms/System.Windows.Forms.dll.sources b/mcs/class/System.Windows.Forms/System.Windows.Forms.dll.sources
index 0655e69127..235dd61bed 100644
--- a/mcs/class/System.Windows.Forms/System.Windows.Forms.dll.sources
+++ b/mcs/class/System.Windows.Forms/System.Windows.Forms.dll.sources
@@ -29,9 +29,7 @@ System.Windows.Forms.Design/WindowsFormsComponentEditor.cs
System.Windows.Forms.Internal/Accessor.cs
System.Windows.Forms.Internal/DebugHelper.cs
System.Windows.Forms.PropertyGridInternal/PropertiesTab.cs
-System.Windows.Forms.RTF/Charcode.cs
-System.Windows.Forms.RTF/Charset.cs
-System.Windows.Forms.RTF/CharsetFlags.cs
+System.Windows.Forms.RTF/CharsetToCodepage.cs
System.Windows.Forms.RTF/CharsetType.cs
System.Windows.Forms.RTF/ClassDelegate.cs
System.Windows.Forms.RTF/Color.cs
@@ -44,12 +42,9 @@ System.Windows.Forms.RTF/Minor.cs
System.Windows.Forms.RTF/Picture.cs
System.Windows.Forms.RTF/RTF.cs
System.Windows.Forms.RTF/RTFException.cs
-System.Windows.Forms.RTF/StandardCharCode.cs
-System.Windows.Forms.RTF/StandardCharName.cs
System.Windows.Forms.RTF/Style.cs
System.Windows.Forms.RTF/StyleElement.cs
System.Windows.Forms.RTF/StyleType.cs
-System.Windows.Forms.RTF/TextMap.cs
System.Windows.Forms.RTF/TokenClass.cs
System.Windows.Forms.Theming/Default/LabelPainter.cs
System.Windows.Forms.Theming/Default/LinkLabelPainter.cs
@@ -657,6 +652,7 @@ System.Windows.Forms/TableLayoutRowStyleCollection.cs
System.Windows.Forms/TableLayoutSettings.cs
System.Windows.Forms/TableLayoutStyle.cs
System.Windows.Forms/TableLayoutStyleCollection.cs
+System.Windows.Forms/TabStops.cs
System.Windows.Forms/TextBox.cs
System.Windows.Forms/TextBoxBase.cs
System.Windows.Forms/TextBoxRenderer.cs
diff --git a/mcs/class/System.Windows.Forms/System.Windows.Forms/Button.cs b/mcs/class/System.Windows.Forms/System.Windows.Forms/Button.cs
index 829c55012f..fee7fb5d79 100644
--- a/mcs/class/System.Windows.Forms/System.Windows.Forms/Button.cs
+++ b/mcs/class/System.Windows.Forms/System.Windows.Forms/Button.cs
@@ -92,14 +92,16 @@ namespace System.Windows.Forms {
#region Protected Methods
protected override void OnClick (EventArgs e)
{
- if (dialog_result != DialogResult.None) {
- Form p = FindForm ();
-
- if (p != null)
+ Form p = FindForm ();
+ if (p != null) {
+ p.dialog_result_changed = false; // manages the case where the DialogResult of the form is overriden in the button click event.
+ base.OnClick (e);
+ if (dialog_result != DialogResult.None && !p.dialog_result_changed) {
p.DialogResult = dialog_result;
+ }
+ } else {
+ base.OnClick (e);
}
-
- base.OnClick (e);
}
protected override void OnFontChanged (EventArgs e)
diff --git a/mcs/class/System.Windows.Forms/System.Windows.Forms/ComboBox.cs b/mcs/class/System.Windows.Forms/System.Windows.Forms/ComboBox.cs
index e807b71190..4d0b4010a4 100644
--- a/mcs/class/System.Windows.Forms/System.Windows.Forms/ComboBox.cs
+++ b/mcs/class/System.Windows.Forms/System.Windows.Forms/ComboBox.cs
@@ -1695,7 +1695,7 @@ namespace System.Windows.Forms
}
}
- void SetSelectedIndex (int value, bool supressAutoScroll)
+ void SetSelectedIndex (int value, bool supressAutoScroll, bool triggerEvents = true)
{
if (selected_index == value)
return;
@@ -1718,9 +1718,11 @@ namespace System.Windows.Forms
if (listbox_ctrl != null)
listbox_ctrl.HighlightedIndex = value;
- OnSelectedValueChanged (EventArgs.Empty);
- OnSelectedIndexChanged (EventArgs.Empty);
- OnSelectedItemChanged (EventArgs.Empty);
+ if (triggerEvents) {
+ OnSelectedValueChanged (EventArgs.Empty);
+ OnSelectedIndexChanged (EventArgs.Empty);
+ OnSelectedItemChanged (EventArgs.Empty);
+ }
}
// If no item is currently selected, and an item is found matching the text
@@ -2134,9 +2136,7 @@ namespace System.Windows.Forms
throw new ArgumentOutOfRangeException ("index");
if (index < owner.SelectedIndex)
- --owner.SelectedIndex;
- else if (index == owner.SelectedIndex)
- owner.SelectedIndex = -1;
+ owner.SetSelectedIndex (owner.SelectedIndex - 1, false, false);
object removed = object_items [index];
diff --git a/mcs/class/System.Windows.Forms/System.Windows.Forms/ContextMenuStrip.cs b/mcs/class/System.Windows.Forms/System.Windows.Forms/ContextMenuStrip.cs
index 1df14883d0..c95804739f 100644
--- a/mcs/class/System.Windows.Forms/System.Windows.Forms/ContextMenuStrip.cs
+++ b/mcs/class/System.Windows.Forms/System.Windows.Forms/ContextMenuStrip.cs
@@ -35,27 +35,23 @@ namespace System.Windows.Forms
[DefaultEvent ("Opening")]
public class ContextMenuStrip : ToolStripDropDownMenu
{
- Control source_control;
- internal Control container;
+ internal Control AssociatedControl;
#region Public Construtors
public ContextMenuStrip () : base ()
{
- source_control = null;
}
- public ContextMenuStrip (IContainer container) : base ()
+ public ContextMenuStrip (IContainer container) : this ()
{
- source_control = null;
+ // TODO: handle `container` argument
}
#endregion
#region Public Properties
[Browsable (false)]
[DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
- public Control SourceControl {
- get { return this.source_control; }
- }
+ public Control SourceControl { get; protected set; }
#endregion
#region Protected Methods
@@ -70,11 +66,12 @@ namespace System.Windows.Forms
if (visible)
XplatUI.SetTopmost (this.Handle, true);
}
- #endregion
- internal void SetSourceControl (Control source_control)
+ protected override void SetOwnerControl (Control control)
{
- container = this.source_control = source_control;
+ base.SetOwnerControl (control);
+ SourceControl = control;
}
+ #endregion
}
}
diff --git a/mcs/class/System.Windows.Forms/System.Windows.Forms/Control.cs.REMOVED.git-id b/mcs/class/System.Windows.Forms/System.Windows.Forms/Control.cs.REMOVED.git-id
index e3a7d37212..cfb83b8c0c 100644
--- a/mcs/class/System.Windows.Forms/System.Windows.Forms/Control.cs.REMOVED.git-id
+++ b/mcs/class/System.Windows.Forms/System.Windows.Forms/Control.cs.REMOVED.git-id
@@ -1 +1 @@
-c92b7a7aae3d0a8d64af67e50cff065c9d7f8009
\ No newline at end of file
+53f489d751ba00e713cb24672c38fc36bc72e602
\ No newline at end of file
diff --git a/mcs/class/System.Windows.Forms/System.Windows.Forms/ControlPaint.cs b/mcs/class/System.Windows.Forms/System.Windows.Forms/ControlPaint.cs
index 4004c1ec8e..5a933f1dc1 100644
--- a/mcs/class/System.Windows.Forms/System.Windows.Forms/ControlPaint.cs
+++ b/mcs/class/System.Windows.Forms/System.Windows.Forms/ControlPaint.cs
@@ -370,11 +370,11 @@ namespace System.Windows.Forms {
ThemeEngine.Current.CPDrawContainerGrabHandle (graphics, bounds);
}
- public static void DrawFocusRectangle( Graphics graphics, Rectangle rectangle) {
+ public static void DrawFocusRectangle(Graphics graphics, Rectangle rectangle) {
DrawFocusRectangle(graphics, rectangle, SystemColors.Control, SystemColors.ControlText);
}
- public static void DrawFocusRectangle( Graphics graphics, Rectangle rectangle, Color foreColor, Color backColor) {
+ public static void DrawFocusRectangle(Graphics graphics, Rectangle rectangle, Color foreColor, Color backColor) {
ThemeEngine.Current.CPDrawFocusRectangle (graphics, rectangle, foreColor, backColor);
}
diff --git a/mcs/class/System.Windows.Forms/System.Windows.Forms/DataGridViewImageCell.cs b/mcs/class/System.Windows.Forms/System.Windows.Forms/DataGridViewImageCell.cs
index 9e7daa64ee..1c4dc0b7a7 100644
--- a/mcs/class/System.Windows.Forms/System.Windows.Forms/DataGridViewImageCell.cs
+++ b/mcs/class/System.Windows.Forms/System.Windows.Forms/DataGridViewImageCell.cs
@@ -108,6 +108,7 @@ namespace System.Windows.Forms {
cell.defaultNewRowValue = this.defaultNewRowValue;
cell.description = this.description;
cell.valueIsIcon = this.valueIsIcon;
+ cell.imageLayout = this.imageLayout;
return cell;
}
diff --git a/mcs/class/System.Windows.Forms/System.Windows.Forms/DataGridViewLinkCell.cs b/mcs/class/System.Windows.Forms/System.Windows.Forms/DataGridViewLinkCell.cs
index 5ad5379557..904ab9ca7f 100644
--- a/mcs/class/System.Windows.Forms/System.Windows.Forms/DataGridViewLinkCell.cs
+++ b/mcs/class/System.Windows.Forms/System.Windows.Forms/DataGridViewLinkCell.cs
@@ -56,6 +56,7 @@ namespace System.Windows.Forms
clone.linkBehavior = this.linkBehavior;
clone.visited_link_color = this.visited_link_color;
clone.trackVisitedState = this.trackVisitedState;
+ clone.useColumnTextForLinkValue = this.useColumnTextForLinkValue;
return clone;
}
diff --git a/mcs/class/System.Windows.Forms/System.Windows.Forms/DataGridViewLinkColumn.cs b/mcs/class/System.Windows.Forms/System.Windows.Forms/DataGridViewLinkColumn.cs
index d5ef3cdd21..2f98878ed9 100644
--- a/mcs/class/System.Windows.Forms/System.Windows.Forms/DataGridViewLinkColumn.cs
+++ b/mcs/class/System.Windows.Forms/System.Windows.Forms/DataGridViewLinkColumn.cs
@@ -77,7 +77,8 @@ namespace System.Windows.Forms
throw new InvalidOperationException ("CellTemplate is null when getting this property.");
template.ActiveLinkColor = value;
-
+ if (DataGridView == null)
+ return;
foreach (DataGridViewRow row in DataGridView.Rows) {
DataGridViewLinkCell cell = row.Cells[Index] as DataGridViewLinkCell;
if (cell != null)
@@ -113,6 +114,8 @@ namespace System.Windows.Forms
throw new InvalidOperationException ("CellTemplate is null when getting this property.");
template.LinkBehavior = value;
+ if (DataGridView == null)
+ return;
foreach (DataGridViewRow row in DataGridView.Rows)
{
DataGridViewLinkCell cell = row.Cells[Index] as DataGridViewLinkCell;
@@ -137,6 +140,8 @@ namespace System.Windows.Forms
if (template == null)
throw new InvalidOperationException ("CellTemplate is null when getting this property.");
template.LinkColor = value;
+ if (DataGridView == null)
+ return;
foreach (DataGridViewRow row in DataGridView.Rows)
{
DataGridViewLinkCell cell = row.Cells[Index] as DataGridViewLinkCell;
@@ -150,20 +155,20 @@ namespace System.Windows.Forms
[DefaultValue ((string) null)]
public string Text {
get {
- DataGridViewLinkCell template = CellTemplate as DataGridViewLinkCell;
- if (template == null)
- throw new InvalidOperationException ("CellTemplate is null when getting this property.");
return text;
}
set {
if (this.Text == value)
return;
- DataGridViewLinkCell template = CellTemplate as DataGridViewLinkCell;
- if (template == null)
- throw new InvalidOperationException ("CellTemplate is null when getting this property.");
- //TODO : sets the Text property of every cell in the column
- //TODO only if UseColumnTextForLinkValue is true
text = value;
+ if (DataGridView == null)
+ return;
+ foreach (DataGridViewRow row in DataGridView.Rows)
+ {
+ DataGridViewLinkCell cell = row.Cells[Index] as DataGridViewLinkCell;
+ if (cell != null && cell.UseColumnTextForLinkValue)
+ cell.Value = value;
+ }
DataGridView.InvalidateColumn (Index);
}
}
@@ -184,6 +189,8 @@ namespace System.Windows.Forms
if (template == null)
throw new InvalidOperationException ("CellTemplate is null when getting this property.");
template.TrackVisitedState = value;
+ if (DataGridView == null)
+ return;
foreach (DataGridViewRow row in DataGridView.Rows)
{
DataGridViewLinkCell cell = row.Cells[Index] as DataGridViewLinkCell;
@@ -210,6 +217,8 @@ namespace System.Windows.Forms
if (template == null)
throw new InvalidOperationException ("CellTemplate is null when getting this property.");
template.UseColumnTextForLinkValue = value;
+ if (DataGridView == null)
+ return;
foreach (DataGridViewRow row in DataGridView.Rows)
{
DataGridViewLinkCell cell = row.Cells[Index] as DataGridViewLinkCell;
@@ -235,6 +244,8 @@ namespace System.Windows.Forms
if (template == null)
throw new InvalidOperationException ("CellTemplate is null when getting this property.");
template.VisitedLinkColor = value;
+ if (DataGridView == null)
+ return;
foreach (DataGridViewRow row in DataGridView.Rows)
{
DataGridViewLinkCell cell = row.Cells[Index] as DataGridViewLinkCell;
diff --git a/mcs/class/System.Windows.Forms/System.Windows.Forms/Form.cs b/mcs/class/System.Windows.Forms/System.Windows.Forms/Form.cs
index 329736ffb8..fcd9541602 100644
--- a/mcs/class/System.Windows.Forms/System.Windows.Forms/Form.cs
+++ b/mcs/class/System.Windows.Forms/System.Windows.Forms/Form.cs
@@ -102,6 +102,7 @@ namespace System.Windows.Forms {
private bool autoscale_base_size_set;
internal ArrayList disabled_by_showdialog = new ArrayList();
internal static ArrayList modal_dialogs = new ArrayList();
+ internal bool dialog_result_changed;
#endregion // Local Variables
#region Private & Internal Methods
@@ -200,7 +201,11 @@ namespace System.Windows.Forms {
internal override void UpdateWindowText ()
{
+ var old_clientsize = ClientSize;
+
if (!IsHandleCreated) {
+ if (is_clientsize_set)
+ ClientSize = old_clientsize;
return;
}
@@ -212,6 +217,9 @@ namespace System.Windows.Forms {
}
XplatUI.Text (Handle, Text.Replace (Environment.NewLine, string.Empty));
+
+ if (ClientSize != old_clientsize)
+ ClientSize = old_clientsize;
}
internal void SelectActiveControl ()
@@ -235,7 +243,7 @@ namespace System.Windows.Forms {
this.is_visible = visible;
} else {
- Select (ActiveControl);
+ SendControlFocus (ActiveControl);
}
}
@@ -595,7 +603,7 @@ namespace System.Windows.Forms {
set {
if (control_box != value) {
control_box = value;
- UpdateStyles();
+ UpdateFormStyles();
}
}
}
@@ -637,6 +645,7 @@ namespace System.Windows.Forms {
typeof (DialogResult));
dialog_result = value;
+ dialog_result_changed = true;
if (dialog_result != DialogResult.None && is_modal)
RaiseCloseEvents (false, false); // .Net doesn't send WM_CLOSE here.
}
@@ -660,15 +669,10 @@ namespace System.Windows.Forms {
window_manager.UpdateBorderStyle (value);
}
- Size current_client_size = ClientSize;
- UpdateStyles();
+ UpdateFormStyles();
- if (this.IsHandleCreated) {
- this.Size = InternalSizeFromClientSize (current_client_size);
+ if (this.IsHandleCreated)
XplatUI.InvalidateNC (this.Handle);
- } else if (is_clientsize_set) {
- this.Size = InternalSizeFromClientSize (current_client_size);
- }
}
}
@@ -1097,6 +1101,8 @@ namespace System.Windows.Forms {
XplatUI.SetOwner(this.window.Handle, IntPtr.Zero);
}
}
+ // UIA Framework: Raises internal event
+ OnUIAOwnerChanged ();
}
}
}
@@ -1120,7 +1126,7 @@ namespace System.Windows.Forms {
set {
if (this.show_icon != value ) {
this.show_icon = value;
- UpdateStyles ();
+ UpdateFormStyles ();
if (IsHandleCreated) {
XplatUI.SetIcon (this.Handle, value == true ? this.Icon : null);
@@ -2193,7 +2199,7 @@ namespace System.Windows.Forms {
if (keyData == Keys.Enter) {
IntPtr window = XplatUI.GetFocus ();
Control c = Control.FromHandle (window);
- if (c is Button && c.FindForm () == this) {
+ if (c is Button && c.Visible && c.Enabled && c.FindForm () == this) {
((Button)c).PerformClick ();
return true;
}
@@ -2890,6 +2896,13 @@ namespace System.Windows.Forms {
is_loaded = true;
}
+ private void UpdateFormStyles() {
+ var old_clientsize = ClientSize;
+ UpdateStyles();
+ if ((!IsHandleCreated && is_clientsize_set) || ClientSize != old_clientsize)
+ ClientSize = old_clientsize;
+ }
+
private void UpdateMinMax()
{
var min_size = AutoSize ? new Size (Math.Max (minimum_auto_size.Width, minimum_size.Width), Math.Max (minimum_auto_size.Height, minimum_size.Height)) : minimum_size;
@@ -3200,6 +3213,7 @@ namespace System.Windows.Forms {
static object UIAMenuChangedEvent = new object ();
static object UIATopMostChangedEvent = new object ();
static object UIAWindowStateChangedEvent = new object ();
+ static object UIAOwnerChangedEvent = new object ();
internal event EventHandler UIAMenuChanged {
add { Events.AddHandler (UIAMenuChangedEvent, value); }
@@ -3216,6 +3230,11 @@ namespace System.Windows.Forms {
remove { Events.RemoveHandler (UIAWindowStateChangedEvent, value); }
}
+ internal event EventHandler UIAOwnerChanged {
+ add { Events.AddHandler (UIAOwnerChangedEvent, value); }
+ remove { Events.RemoveHandler (UIAOwnerChangedEvent, value); }
+ }
+
internal void OnUIAMenuChanged (EventArgs e)
{
EventHandler eh = (EventHandler) Events [UIAMenuChangedEvent];
@@ -3236,6 +3255,13 @@ namespace System.Windows.Forms {
if (eh != null)
eh (this, EventArgs.Empty);
}
+
+ internal void OnUIAOwnerChanged ()
+ {
+ EventHandler eh = (EventHandler) Events [UIAOwnerChangedEvent];
+ if (eh != null)
+ eh (this, EventArgs.Empty);
+ }
#endregion // UIA Framework Events
#endregion // Events
}
diff --git a/mcs/class/System.Windows.Forms/System.Windows.Forms/GroupBox.cs b/mcs/class/System.Windows.Forms/System.Windows.Forms/GroupBox.cs
index c047a77ebf..02bbd3ca9e 100644
--- a/mcs/class/System.Windows.Forms/System.Windows.Forms/GroupBox.cs
+++ b/mcs/class/System.Windows.Forms/System.Windows.Forms/GroupBox.cs
@@ -307,28 +307,12 @@ namespace System.Windows.Forms
#region Internal Methods
internal override Size GetPreferredSizeCore (Size proposedSize)
{
- Size retsize = new Size (Padding.Left, Padding.Top);
-
- foreach (Control child in Controls) {
- if (child.Dock == DockStyle.Fill) {
- if (child.Bounds.Right > retsize.Width)
- retsize.Width = child.Bounds.Right;
- } else if (child.Dock != DockStyle.Top && child.Dock != DockStyle.Bottom && (child.Bounds.Right + child.Margin.Right) > retsize.Width)
- retsize.Width = child.Bounds.Right + child.Margin.Right;
-
- if (child.Dock == DockStyle.Fill) {
- if (child.Bounds.Bottom > retsize.Height)
- retsize.Height = child.Bounds.Bottom;
- } else if (child.Dock != DockStyle.Left && child.Dock != DockStyle.Right && (child.Bounds.Bottom + child.Margin.Bottom) > retsize.Height)
- retsize.Height = child.Bounds.Bottom + child.Margin.Bottom;
- }
-
- retsize.Width += Padding.Right;
- retsize.Height += Padding.Bottom;
-
- retsize.Height += this.Font.Height;
-
- return retsize;
+ // (Copied from Panel)
+ // Translating 0, 0 from ClientSize to actual Size tells us how much space
+ // is required for the borders.
+ Size borderSize = SizeFromClientSize(Size.Empty);
+ Size totalPadding = borderSize + Padding.Size;
+ return LayoutEngine.GetPreferredSize(this, proposedSize - totalPadding) + totalPadding;
}
#endregion
diff --git a/mcs/class/System.Windows.Forms/System.Windows.Forms/Line.cs b/mcs/class/System.Windows.Forms/System.Windows.Forms/Line.cs
index d169d9adfd..f7f063a8b7 100644
--- a/mcs/class/System.Windows.Forms/System.Windows.Forms/Line.cs
+++ b/mcs/class/System.Windows.Forms/System.Windows.Forms/Line.cs
@@ -21,6 +21,7 @@
//
// Authors:
// Peter Bartok pbartok@novell.com
+// Karl Scowen
//
//
@@ -44,14 +45,20 @@ namespace System.Windows.Forms
internal int line_no; // Line number
internal LineTag tags; // Tags describing the text
internal int offset; // Baseline can be on the X or Y axis depending if we are in multiline mode or not
- internal int height; // Height of the line (height of tallest tag)
- internal int ascent; // Ascent of the line (ascent of the tallest tag)
+ internal int height; // Total height of the line, including TotalParagraphSpacing and LineSpacing
+ private int textHeight; // Height of the line without spacing.
+ internal int ascent; // Ascent of the line (highest distance above the baseline, including character offset)
internal HorizontalAlignment alignment; // Alignment of the line
internal int align_shift; // Pixel shift caused by the alignment
- internal int indent; // Left indent for the first line
- internal int hanging_indent; // Hanging indent (left indent for all but the first line)
- internal int right_indent; // Right indent for all lines
+ internal float indent; // Left indent for the first line
+ internal float hanging_indent; // Hanging indent (difference between first line indent and other lines)
+ internal float right_indent; // Right indent for all lines
internal LineEnding ending;
+ internal float spacing_before;
+ internal float spacing_after;
+ internal float line_spacing;
+ internal bool line_spacing_multiple;
+ internal TabStopCollection tab_stops; // Custom tabstops for this paragraph.
// Stuff that's important for the tree
internal Line parent; // Our parent line
@@ -86,10 +93,11 @@ namespace System.Windows.Forms
text = new StringBuilder (Text, space);
line_no = LineNo;
this.ending = ending;
+ tab_stops = new TabStopCollection();
widths = new float[space + 1];
-
+
tags = new LineTag(this, 1);
tags.Font = font;
tags.Color = color;
@@ -103,6 +111,7 @@ namespace System.Windows.Forms
line_no = LineNo;
this.ending = ending;
alignment = align;
+ tab_stops = new TabStopCollection();
widths = new float[space + 1];
@@ -112,6 +121,38 @@ namespace System.Windows.Forms
tags.Color = color;
}
+ internal Line (Document document, int LineNo, string Text, HorizontalAlignment align, Font font, Color color,
+ Color back_color, TextPositioning text_position, float char_offset, float left_indent, float hanging_indent,
+ float right_indent, float spacing_before, float spacing_after, float line_spacing, bool line_spacing_multiple,
+ TabStopCollection tab_stops, bool visible, LineEnding ending) : this(document, ending)
+ {
+ space = Text.Length > DEFAULT_TEXT_LEN ? Text.Length+1 : DEFAULT_TEXT_LEN;
+
+ text = new StringBuilder (Text, space);
+ line_no = LineNo;
+ this.ending = ending;
+ alignment = align;
+ indent = left_indent;
+ HangingIndent = hanging_indent;
+ this.right_indent = right_indent;
+ this.spacing_before = spacing_before;
+ this.spacing_after = spacing_after;
+ this.tab_stops = tab_stops;
+ this.line_spacing = line_spacing;
+ this.line_spacing_multiple = line_spacing_multiple;
+
+ widths = new float[space + 1];
+
+
+ tags = new LineTag(this, 1);
+ tags.Font = font;
+ tags.Color = color;
+ tags.BackColor = back_color;
+ tags.TextPosition = text_position;
+ tags.CharOffset = char_offset;
+ tags.Visible = visible;
+ }
+
internal Line (Document document, int LineNo, string Text, LineTag tag, LineEnding ending) : this(document, ending)
{
space = Text.Length > DEFAULT_TEXT_LEN ? Text.Length+1 : DEFAULT_TEXT_LEN;
@@ -137,10 +178,10 @@ namespace System.Windows.Forms
}
}
- internal int HangingIndent {
+ internal float HangingIndent {
get { return hanging_indent; }
set {
- hanging_indent = value;
+ this.hanging_indent = value;
recalc = true;
}
}
@@ -151,7 +192,63 @@ namespace System.Windows.Forms
set { height = value; }
}
- internal int Indent {
+ internal int TextHeight {
+ get {
+ return textHeight;
+ }
+ }
+
+ internal TabStopCollection TabStops {
+ get { return tab_stops; }
+ set { tab_stops = value; }
+ }
+
+ internal float TotalParagraphSpacing {
+ get {
+ return SpacingBefore + SpacingAfter;
+ }
+ }
+
+ internal float LineSpacing {
+ get {
+ if (textHeight == 0) {
+ throw new InvalidOperationException("Can't get LineSpacing when the line height isn't calculated!");
+ }
+ if (line_spacing < 0) {
+ return -line_spacing;
+ } else if (line_spacing_multiple) {
+ return line_spacing * textHeight * 6f / document.Dpi;
+ } else {
+ return Math.Max(line_spacing, textHeight);
+ }
+ }
+ }
+
+ internal float SpacingBefore {
+ get {
+ bool has_spacing = true;
+ if (line_no > 1) {
+ Line previous_line = document.GetLine(line_no - 1);
+ if (previous_line != null && (previous_line.ending == LineEnding.Wrap || previous_line.ending == LineEnding.None))
+ has_spacing = false;
+ }
+ if (has_spacing)
+ return spacing_before;
+ else
+ return 0;
+ }
+ }
+
+ internal float SpacingAfter {
+ get {
+ if (ending == LineEnding.Wrap)
+ return 0;
+ else
+ return spacing_after;
+ }
+ }
+
+ internal float Indent {
get { return indent; }
set {
indent = value;
@@ -164,7 +261,7 @@ namespace System.Windows.Forms
set { line_no = value; }
}
- internal int RightIndent {
+ internal float RightIndent {
get { return right_indent; }
set {
right_indent = value;
@@ -254,7 +351,7 @@ namespace System.Windows.Forms
return;
// Find the first tag that we are deleting from
- tag = FindTag (pos + 1);
+ tag = FindTag (pos);
// Remove the characters from the line
text.Remove (pos, count);
@@ -271,10 +368,10 @@ namespace System.Windows.Forms
left = count;
left -= tag.Start + tag.Length - pos - 1;
- tag = tag.Next;
// Update the start of each tag
- while ((tag != null) && (left > 0)) {
+ while ((tag.Next != null) && (left > 0)) {
+ tag = tag.Next;
// Cache tag.Length as is will be indireclty modified
// by changes to tag.Start
int tag_length = tag.Length;
@@ -284,7 +381,6 @@ namespace System.Windows.Forms
left = 0;
} else {
left -= tag_length;
- tag = tag.Next;
}
}
@@ -295,15 +391,7 @@ namespace System.Windows.Forms
streamline = true;
}
- // Delete empty orphaned tags at the end
LineTag walk = tag;
- while (walk != null && walk.Next != null && walk.Next.Length == 0) {
- LineTag t = walk;
- walk.Next = walk.Next.Next;
- if (walk.Next != null)
- walk.Next.Previous = t;
- walk = walk.Next;
- }
// Adjust the start point of any tags following
if (tag != null) {
@@ -314,6 +402,15 @@ namespace System.Windows.Forms
}
}
+ // Delete empty orphaned tags at the end. Do this after adjusting their starts, otherwise we might delete tags that acutally do have content.
+ while (walk != null && walk.Next != null && walk.Next.Length == 0) {
+ LineTag t = walk;
+ walk.Next = walk.Next.Next;
+ if (walk.Next != null)
+ walk.Next.Previous = t;
+ walk = walk.Next;
+ }
+
recalc = true;
if (streamline)
@@ -361,7 +458,7 @@ namespace System.Windows.Forms
pos = text.Length - 1;
while (tag != null) {
- if (((tag.Start - 1) <= pos) && (pos <= (tag.Start + tag.Length - 1)))
+ if (((tag.Start - 1) <= pos) && (pos < (tag.Start + tag.Length - 1)))
return LineTag.GetFinalTag (tag);
tag = tag.Next;
@@ -434,6 +531,33 @@ namespace System.Windows.Forms
// Insert the text into the StringBuilder
text.Insert (pos, s);
+ // Check that tag is still in use in the line. If not, then we choose the last tag at that position.
+ LineTag t = tags;
+ while (t != null) {
+ if (((t.Start - 1) <= pos) && (pos < (t.End - 1) || (pos == t.End - 1 && t.Length == 0))) {
+ // found the location
+ bool foundTag = false;
+ while (pos < (t.Start + t.Length - 1)) {
+ if (t == tag) {
+ foundTag = true;
+ break;
+ }
+ if (t.Next == null)
+ break;
+ t = t.Next;
+ }
+ if (!foundTag) {
+ if (pos < (t.Start + t.Length - 1)) {
+ tag = t.Previous;
+ } else {
+ tag = t;
+ }
+ }
+ break;
+ }
+ t = t.Next;
+ }
+
// Update the start position of every tag after this one
tag = tag.Next;
@@ -454,56 +578,95 @@ namespace System.Windows.Forms
/// returns true if lineheight changed
///
internal bool RecalculateLine (Graphics g, Document doc)
- {
- return RecalculateLine (g, doc, kerning_fonts.ContainsKey (tags.Font.GetHashCode ()));
- }
-
- private bool RecalculateLine (Graphics g, Document doc, bool handleKerning)
{
LineTag tag;
int pos;
int len;
+ Font currentFont;
+ int currentFontStart;
SizeF size;
float w;
int prev_offset;
bool retval;
bool wrapped;
+ bool first_in_para;
Line line;
int wrap_pos;
+ int prev_wrap_pos;
int prev_height;
int prev_ascent;
- float add_width;
+ float prev_spacing_before;
+ int max_above_baseline;
+ int max_below_baseline;
+ int total_ascent;
+ int total_descent;
+ TabStop lastTab;
+ int lastTabPos;
+ char c;
+ bool handleKerning;
+ float right_indent;
pos = 0;
len = this.text.Length;
+ currentFont = tags.FontToDisplay;
+ currentFontStart = 0;
tag = this.tags;
prev_offset = this.offset; // For drawing optimization calculations
prev_height = this.height;
prev_ascent = this.ascent;
+ prev_spacing_before = this.SpacingBefore;
+ max_above_baseline = 0;
+ max_below_baseline = 0;
+ total_ascent = 0;
+ total_descent = 0;
+ lastTab = null;
+ lastTabPos = 0;
this.height = 0; // Reset line height
this.ascent = 0; // Reset the ascent for the line
tag.Shift = 0; // Reset shift (which should be stored as pixels, not as points)
+ right_indent = Math.Max(this.right_indent, 0); // Ignore any negative right indent.
- if (ending == LineEnding.Wrap)
- widths[0] = document.left_margin + hanging_indent;
+ if (line_no > 0) {
+ line = doc.GetLine (LineNo - 1);
+ first_in_para = line != null && line.ending != LineEnding.Wrap;
+ } else {
+ first_in_para = true;
+ }
+
+ if (first_in_para)
+ widths [0] = indent;
else
- widths[0] = document.left_margin + indent;
+ widths [0] = indent + hanging_indent;
+
+ if (widths [0] < 0)
+ widths [0] = 0; // Don't allow a negative indent to take the line to a negative position.
+
+ widths [0] += document.left_margin;
this.recalc = false;
retval = false;
wrapped = false;
wrap_pos = 0;
- add_width = 0;
+ prev_wrap_pos = 0;
+
+ handleKerning = kerning_fonts.ContainsKey (currentFont.GetHashCode ());
while (pos < len) {
-
while (tag.Length == 0) { // We should always have tags after a tag.length==0 unless len==0
//tag.Ascent = 0;
- tag.Shift = (tag.Line.ascent - tag.Ascent) / 72;
+ tag.Shift = (tag.Line.ascent - tag.Ascent); // / 72;
tag = tag.Next;
+ if (tag.Length != 0 && tag.FontToDisplay != currentFont) {
+ CheckKerning (g, currentFont, currentFontStart, pos - currentFontStart);
+ currentFont = tag.FontToDisplay;
+ currentFontStart = pos;
+ handleKerning = kerning_fonts.ContainsKey (currentFont.GetHashCode ());
+ }
}
+ c = text [pos];
+
// kerning is a problem. The original code in this method assumed that the
// width of a string equals the sum of the widths of its characters. This is
// not true when kerning takes place during the display process. Since it's
@@ -520,44 +683,103 @@ namespace System.Windows.Forms
// MeasureText doesn't measure trailing spaces, so we do the best we can for those
// in the else branch.
// It doesn't measure /t characters either, we need to add it manually with add_width.
- size = TextBoxTextRenderer.MeasureText (g, text.ToString (0, pos + 1), tag.Font);
- newWidth = widths[0] + size.Width + add_width;
+ size = TextBoxTextRenderer.MeasureText (g, text.ToString (currentFontStart, pos + 1 - currentFontStart), currentFont);
+ newWidth = widths [currentFontStart] + size.Width;
}
- else
- {
+ else if (c != '\t') {
size = tag.SizeOfPosition (g, pos);
w = size.Width;
newWidth = widths[pos] + w;
- if (text[pos] == '\t') add_width += w;
+ } else {
+ CheckKerning (g, currentFont, currentFontStart, pos - currentFontStart);
+ currentFontStart = pos + 1; // Don't try handling the tab along with kerned text.
+
+ if (lastTab != null) {
+ ProcessLastTab (lastTab, lastTabPos, pos);
+ lastTab = null;
+ }
+
+ float l = widths [pos];
+ w = -1;
+ for (int i = 0; i < tab_stops.Count; i++) {
+ if (tab_stops [i].Position > l) {
+ lastTab = tab_stops [i];
+ lastTabPos = pos;
+ w = lastTab.GetInitialWidth (this, pos);
+ break;
+ }
+ }
+
+ if (w < 0) {
+ w = tag.SizeOfPosition (g, pos).Width;
+ }
+
+ newWidth = widths [pos] + w;
}
- if (Char.IsWhiteSpace (text[pos]))
- wrap_pos = pos + 1;
+ if (doc.Wrap) {
+ // FIXME: Technically there are multiple no-break spaces, not just the main one.
+ if ((Char.IsWhiteSpace (c) && c != '\u00A0') || c == '-' || c == '\u2013' || c == '\u2014') {
+ // Primarily break on dashes or whitespace other than a no-break space.
+ prev_wrap_pos = wrap_pos;
+ if (c == '\t') {
+ wrap_pos = pos; // Wrap before tabs for some reason.
+ } else {
+ wrap_pos = pos + 1;
+ }
+ }
- if (doc.wrap) {
- if ((wrap_pos > 0) && (wrap_pos != len) && (newWidth + 5) > (doc.viewport_width - this.right_indent)) {
- // Make sure to set the last width of the line before wrapping
- widths[pos + 1] = newWidth;
+ if (newWidth > (doc.viewport_width - this.right_indent)) {
+ LineTag split_tag = null;
+ if (wrap_pos > 0) {
+ // Make sure to set the last width of the line before wrapping
+ widths [pos + 1] = newWidth;
- pos = wrap_pos;
- len = text.Length;
- doc.Split (this, tag, pos);
- ending = LineEnding.Wrap;
- len = this.text.Length;
+ if (Char.IsWhiteSpace (c)) {
+ if (wrap_pos > pos) {
+ while (wrap_pos < text.Length && Char.IsWhiteSpace (text [wrap_pos]) && text [wrap_pos] != '\t') {
+ wrap_pos++;
+ }
+ pos++;
+ wrapped = true;
+ // don't try pulling more into this line, but keep looping to deal with the rest of the widths and tags
+ }
+ } else {
+ if (wrap_pos > pos && pos > 0) {
+ // We're at a dash (otherwise we'd be above), but don't have room to fit it in.
+ // Wrap at the previous wrap point if possible.
+ wrap_pos = prev_wrap_pos > 0 ? prev_wrap_pos : pos;
+ }
+ split_tag = tag;
+ pos = wrap_pos;
+ }
+ } else if (pos > 0) {
+ // No suitable wrap position was found so break right in the middle of a word
- retval = true;
- wrapped = true;
- } else if (pos > 1 && newWidth > (doc.viewport_width - this.right_indent)) {
- // No suitable wrap position was found so break right in the middle of a word
+ // Make sure to set the last width of the line before wrapping
+ widths [pos + 1] = newWidth;
- // Make sure to set the last width of the line before wrapping
- widths[pos + 1] = newWidth;
+ split_tag = tag;
+ } // Else don't wrap -- pos == 0, so we'd infinite loop adding blank lines before this.
- doc.Split (this, tag, pos);
- ending = LineEnding.Wrap;
- len = this.text.Length;
- retval = true;
- wrapped = true;
+ if (split_tag != null) {
+ if (lastTab != null) {
+ ProcessLastTab (lastTab, lastTabPos, pos);
+ lastTab = null;
+ }
+
+ while (pos < split_tag.Start)
+ split_tag = split_tag.Previous;
+ // We have to pass Split the correct tag, and that can change if pos
+ // is set somewhere before the tag change (e.g. by wrap_pos).
+
+ doc.Split (this, split_tag, pos);
+ ending = LineEnding.Wrap;
+ len = this.text.Length;
+
+ retval = true;
+ wrapped = true;
+ }
}
}
@@ -569,12 +791,23 @@ namespace System.Windows.Forms
if (pos == len) {
line = doc.GetLine (this.line_no + 1);
- if ((line != null) && (ending == LineEnding.Wrap || ending == LineEnding.None)) {
- // Pull the two lines together
- doc.Combine (this.line_no, this.line_no + 1);
- len = this.text.Length;
- retval = true;
- }
+ do {
+ if ((line != null) && (ending == LineEnding.Wrap || ending == LineEnding.None) &&
+ (widths[pos] < (doc.viewport_width - this.right_indent) || line.text.Length == 0)) {
+ // Pull the two lines together
+ // Only do this if the line isn't already full, or the next line is empty.
+ var h = this.height; // Back up h, because Combine sets it to zero.
+ doc.Combine (this, line);
+ this.height = h; // And restore it. There's no point starting at the start again.
+ // Document.Combine() called Line.Streamline(), so it is possible tag points a tag that got removed.
+ tag = FindTag (pos - 1); // So make sure we've got the correct tag.
+ len = this.text.Length;
+ line = doc.GetLine (this.line_no + 1);
+ retval = true;
+ }
+ } while ((ending == LineEnding.Wrap || ending == LineEnding.None) && line != null && line.text.Length == 0);
+ // If the next line is empty, do it again (if possible).
+ // The amount of room on this line doesn't matter when there's no text being added...
}
}
@@ -582,54 +815,63 @@ namespace System.Windows.Forms
// We just found the end of our current tag
tag.Height = tag.MaxHeight ();
- // Check if we're the tallest on the line (so far)
- if (tag.Height > this.height)
- this.height = tag.Height; // Yep; make sure the line knows
+ /* line.ascent is the highest point above the baseline.
+ * total_ascent will equal the maximum distance of the tag above the baseline.
+ * total_descent is needed to calculate the line height.
+ * tag.Shift does not include tag.CharOffset, because Shift puts the tag
+ * on the baseline, while CharOffset moves the baseline.
+ * However, we move the normal baseline when CharOffset is trying to push
+ * stuff off the top.
+ */
+ total_ascent = tag.Ascent + (int)tag.CharOffset;
+ total_descent = tag.Descent - (int)tag.CharOffset; // gets bigger as CharOffset gets smaller
+ if (total_ascent > max_above_baseline) {
+ int moveBy = total_ascent - max_above_baseline;
+ max_above_baseline = total_ascent;
- if (tag.Ascent > this.ascent) {
- LineTag t;
-
- // We have a tag that has a taller ascent than the line;
- t = tags;
+ LineTag t = tags;
while (t != null && t != tag) {
- t.Shift = (tag.Ascent - t.Ascent) / 72;
+ t.Shift += moveBy;
t = t.Next;
}
- // Save on our line
- this.ascent = tag.Ascent;
+ tag.Shift = (int)tag.CharOffset;
+ this.ascent = max_above_baseline;
} else {
- tag.Shift = (this.ascent - tag.Ascent) / 72;
+ tag.Shift = (this.ascent - tag.Ascent);
}
+ if (total_descent > max_below_baseline)
+ max_below_baseline = total_descent;
+
+ if (this.height < max_above_baseline + max_below_baseline + tag.Height - tag.Ascent - tag.Descent)
+ this.height = max_above_baseline + max_below_baseline + tag.Height - tag.Ascent - tag.Descent;
+
tag = tag.Next;
if (tag != null) {
+ if (tag.Length != 0 && tag.FontToDisplay != currentFont) {
+ CheckKerning (g, currentFont, currentFontStart, pos - currentFontStart);
+ currentFont = tag.FontToDisplay;
+ currentFontStart = pos;
+ handleKerning = kerning_fonts.ContainsKey (currentFont.GetHashCode ());
+ }
tag.Shift = 0;
- wrap_pos = pos;
+ // We can't just wrap on tag boundaries -- e.g. if the first letter of the word has a different colour / font.
}
}
}
- var fullText = text.ToString();
- if (!handleKerning && fullText.Length > 1 && !wrapped)
- {
- // Check whether kerning takes place for this string and font.
- var realSize = TextBoxTextRenderer.MeasureText(g, fullText, tags.Font);
- float realWidth = realSize.Width + widths[0];
- // MeasureText ignores trailing whitespace, so we will too at this point.
- int length = fullText.TrimEnd().Length;
- float sumWidth = widths[length];
- if (realWidth != sumWidth)
- {
- kerning_fonts.Add(tags.Font.GetHashCode (), true);
- // Using a slightly incorrect width this time around isn't that bad. All that happens
- // is that the cursor is a pixel or two off until the next character is typed. It's
- // the accumulation of pixel after pixel that causes display problems.
- }
+ if (pos != currentFontStart) {
+ CheckKerning (g, currentFont, currentFontStart, pos - currentFontStart);
}
- while (tag != null) {
- tag.Shift = (tag.Line.ascent - tag.Ascent) / 72;
+ if (lastTab != null) {
+ ProcessLastTab (lastTab, lastTabPos, pos);
+ lastTab = null;
+ }
+
+ while (tag != null) {
+ tag.Shift = (tag.Line.ascent - tag.Ascent); // / 72;
tag = tag.Next;
}
@@ -639,12 +881,49 @@ namespace System.Windows.Forms
tags.Shift = 0;
}
- if (prev_offset != offset || prev_height != this.height || prev_ascent != this.ascent)
+ this.textHeight = this.height;
+ this.height = (int)(this.LineSpacing + this.TotalParagraphSpacing);
+
+ if (prev_offset != offset || prev_height != this.height || prev_ascent != this.ascent ||
+ Math.Abs (prev_spacing_before - this.SpacingBefore) > document.Dpi / 1440f)
retval = true;
return retval;
}
+ private void ProcessLastTab (TabStop tab, int tab_pos, int pos)
+ {
+ float prevTabRight = widths[tab_pos + 1];
+ float tabRight = tab.CalculateRight (this, tab_pos);
+ float change = tabRight - prevTabRight;
+
+ for (int i = tab_pos + 1; i <= pos; i++) {
+ widths[i] += change;
+ }
+ }
+
+ private void CheckKerning (Graphics g, Font font, int start, int length)
+ {
+ if (length > 1) {
+ if (!kerning_fonts.ContainsKey (font.GetHashCode ())) {
+ // Check whether kerning takes place for this string and font.
+ var partText = text.ToString(start, length);
+ var realSize = TextBoxTextRenderer.MeasureText(g, partText, font);
+ float realWidth = realSize.Width + widths[start + 1];
+ // MeasureText ignores trailing whitespace, so we will too at this point.
+ int textLength = partText.TrimEnd().Length;
+ float sumWidth = widths[textLength + start + 1];
+ if (realWidth != sumWidth)
+ {
+ kerning_fonts.Add(font.GetHashCode (), true);
+ // Using a slightly incorrect width this time around isn't that bad. All that happens
+ // is that the cursor is a pixel or two off until the next character is typed. It's
+ // the accumulation of pixel after pixel that causes display problems.
+ }
+ }
+ }
+ }
+
///
/// Recalculate a single line using the same char for every character in the line
///
@@ -667,13 +946,14 @@ namespace System.Windows.Forms
w = TextBoxTextRenderer.MeasureText (g, doc.password_char, tags.Font).Width;
- if (this.height != (int)tag.Font.Height)
+ if (this.textHeight != (int)tag.Font.Height)
ret = true;
else
ret = false;
- this.height = (int)tag.Font.Height;
- tag.Height = this.height;
+ this.textHeight = (int)tag.Font.Height;
+ tag.Height = this.textHeight;
+ this.height = (int)(this.textHeight + this.LineSpacing + this.TotalParagraphSpacing);
this.ascent = tag.Ascent;
@@ -684,7 +964,42 @@ namespace System.Windows.Forms
return ret;
}
-
+
+ internal void CalculateAlignment ()
+ {
+ var alignmentWidth = document.ViewPortWidth - document.left_margin - document.right_margin;
+ var alignmentLineWidth = GetAlignmentLineWidth ();
+
+ switch (alignment) {
+ case HorizontalAlignment.Left:
+ align_shift = 0;
+ break;
+ case HorizontalAlignment.Center:
+ align_shift = (alignmentWidth - alignmentLineWidth) / 2;
+ break;
+ case HorizontalAlignment.Right:
+ align_shift = alignmentWidth - alignmentLineWidth;
+ break;
+ }
+
+ align_shift = Math.Max (align_shift, 0); // Don't allow negative shifts.
+ }
+
+ private int GetAlignmentLineWidth ()
+ {
+ int last = text.Length - 1;
+ if (last < 0)
+ return 0;
+
+ char c = text [last];
+ while (last > 0 && Char.IsWhiteSpace (c) && c != '\t' && c != '\u00A0') {
+ c = text [--last];
+ }
+ // widths[0] has both the left margin and the left indents.
+ // Remove the margin (it is part of the viewport) and add the right indents (part of the line width, for alignment purposes).
+ return (int)(widths [last + 1] - document.left_margin + Math.Max (right_indent, 0));
+ }
+
internal void Streamline (int lines)
{
LineTag current;
@@ -711,7 +1026,7 @@ namespace System.Windows.Forms
return;
while (next != null) {
- // Take out 0 length tags unless it's the last tag in the document
+ // Take out 0 length tags unless it's the last tag in the document.
if (current.IsTextTag && next.Length == 0 && next.IsTextTag) {
if ((next.Next != null) || (line_no != lines)) {
current.Next = next.Next;
diff --git a/mcs/class/System.Windows.Forms/System.Windows.Forms/LineTag.cs b/mcs/class/System.Windows.Forms/System.Windows.Forms/LineTag.cs
index a551e813de..38e5bb58dd 100644
--- a/mcs/class/System.Windows.Forms/System.Windows.Forms/LineTag.cs
+++ b/mcs/class/System.Windows.Forms/System.Windows.Forms/LineTag.cs
@@ -21,6 +21,7 @@
//
// Authors:
// Peter Bartok pbartok@novell.com
+// Karl Scowen
//
//
@@ -44,6 +45,10 @@ namespace System.Windows.Forms
private string link_text; // The full link text e.g. this might be
// word-wrapped to "w" but this would be
// "www.example.com"
+ private bool visible;
+ private TextPositioning text_position; // Normal / superscript / subscript
+ private Font small_font; // Cached font for superscript / subscript
+ private float char_offset; // Shift the text baseline up or down
// Payload; text
private int start; // start, in chars; index into Line.text
@@ -53,7 +58,8 @@ namespace System.Windows.Forms
private int height; // Height in pixels of the text this tag describes
private int ascent; // Ascent of the font for this tag
private int descent; // Descent of the font for this tag
- private int shift; // Shift down for this tag, to stay on baseline
+ private int shift; // Shift down for this tag, to stay on baseline.
+ // Measured from top of line to top of tag.
// Administrative
private Line line; // The line we're on
@@ -69,6 +75,7 @@ namespace System.Windows.Forms
link_font = null;
is_link = false;
link_text = null;
+ visible = true;
}
#endregion // Constructors
@@ -113,6 +120,16 @@ namespace System.Windows.Forms
return link_font;
}
+ if (TextPosition != TextPositioning.Normal) {
+ if (small_font == null)
+ small_font = new Font (font.FontFamily, font.Size * 0.583F, font.Style);
+
+ if (IsLink)
+ return new Font (small_font, font.Style | FontStyle.Underline);
+ else
+ return small_font;
+ }
+
return font;
}
}
@@ -122,20 +139,43 @@ namespace System.Windows.Forms
set {
if (font != value) {
link_font = null;
+ small_font = null;
font = value;
height = Font.Height;
XplatUI.GetFontMetrics (Hwnd.GraphicsContext, Font, out ascent, out descent);
+ float scale_factor = font.GetHeight () / font.FontFamily.GetLineSpacing (font.Style);
+ ascent = (int) Math.Ceiling (ascent * scale_factor);
+ descent = (int) Math.Ceiling (descent * scale_factor);
line.recalc = true;
}
}
}
+ public TextPositioning TextPosition {
+ get { return text_position; }
+ set { text_position = value; }
+ }
+
+ public float CharOffset {
+ get { return char_offset; }
+ set { char_offset = value; }
+ }
+
public int Height {
get { return height; }
set { height = value; }
}
+ public int DrawnHeight {
+ get {
+ if (text_position != TextPositioning.Normal)
+ return (int) (height * 0.583F);
+
+ return height;
+ }
+ }
+
public virtual bool IsTextTag {
get { return true; }
}
@@ -186,7 +226,7 @@ namespace System.Windows.Forms
throw new Exception("New tag makes an insane tag");
}
#endif
- start = value;
+ start = value;
}
}
@@ -206,9 +246,14 @@ namespace System.Windows.Forms
}
}
+ public bool Visible {
+ get { return visible; }
+ set { visible = value; }
+ }
+
public float Width {
get {
- if (Length == 0)
+ if (Length == 0 || !visible)
return 0;
return line.widths [start + Length - 1] - (start != 0 ? line.widths [start - 1] : 0);
}
@@ -222,6 +267,15 @@ namespace System.Windows.Forms
}
}
+ public int OffsetY {
+ get {
+ if (text_position == TextPositioning.Subscript)
+ return (int) (height * 0.45F);
+
+ return 0;
+ }
+ }
+
public bool IsLink {
get { return is_link; }
set { is_link = value; }
@@ -253,8 +307,8 @@ namespace System.Windows.Forms
new_tag = new LineTag(line, pos);
new_tag.CopyFormattingFrom (this);
- new_tag.next = this.next;
- this.next = new_tag;
+ new_tag.Next = this.next;
+ this.Next = new_tag;
new_tag.previous = this;
if (new_tag.next != null)
@@ -269,7 +323,7 @@ namespace System.Windows.Forms
if (!this.Equals (other))
return false;
- this.next = other.next;
+ this.Next = other.next;
if (this.next != null)
this.next.previous = this;
@@ -282,6 +336,9 @@ namespace System.Windows.Forms
Font = other.font;
color = other.color;
back_color = other.back_color;
+ TextPosition = other.text_position;
+ CharOffset = other.CharOffset;
+ Visible = other.Visible;
}
public void Delete ()
@@ -312,6 +369,8 @@ namespace System.Windows.Forms
public virtual void Draw (Graphics dc, Color color, float x, float y, int start, int end)
{
+ if (text_position == TextPositioning.Subscript)
+ y += OffsetY;
TextBoxTextRenderer.DrawText (dc, line.text.ToString (start, end).Replace ("\r", string.Empty), FontToDisplay, color, x, y, false);
}
@@ -328,6 +387,14 @@ namespace System.Windows.Forms
public virtual void Draw (Graphics dc, Color color, float xoff, float y, int drawStart, int drawEnd,
string text, out Rectangle measuredText, bool measureText)
{
+ if (!visible) {
+ measuredText = new Rectangle ();
+ return;
+ }
+
+ if (text_position == TextPositioning.Subscript)
+ y += OffsetY;
+
if (measureText) {
int xstart = (int)line.widths [drawStart] + (int)xoff;
int xend = (int)line.widths [drawEnd] - (int)line.widths [drawStart];
@@ -342,7 +409,7 @@ namespace System.Windows.Forms
while (drawStart < drawEnd) {
int tab_index = text.IndexOf ("\t", drawStart);
- if (tab_index == -1)
+ if (tab_index == -1 || tab_index > drawEnd)
tab_index = drawEnd;
TextBoxTextRenderer.DrawText (dc, text.Substring (drawStart, tab_index - drawStart).Replace ("\r", string.Empty), FontToDisplay, color, xoff + line.widths [drawStart], y, false);
@@ -380,7 +447,16 @@ namespace System.Windows.Forms
if (this.LinkText != other.LinkText)
return false;
- if (this.font.Equals (other.font) && this.color.Equals (other.color))
+ if (this.TextPosition != other.TextPosition)
+ return false;
+
+ if (this.CharOffset != other.CharOffset)
+ return false;
+
+ if (this.Visible != other.Visible)
+ return false;
+
+ if (this.font.Equals (other.font) && this.color.Equals (other.color) && this.back_color.Equals (other.back_color))
return true;
return false;
@@ -409,11 +485,17 @@ namespace System.Windows.Forms
return null;
}
+ public static bool FormatText (Line line, int formatStart, int length, Font font, Color color, Color backColor, FormatSpecified specified)
+ {
+ return FormatText (line, formatStart, length, font, color, backColor, TextPositioning.Normal, 0, true, specified);
+ }
+
/// Applies 'font' and 'brush' to characters starting at 'start' for 'length' chars;
/// Removes any previous tags overlapping the same area;
/// returns true if lineheight has changed
/// 1-based character position on line
- public static bool FormatText (Line line, int formatStart, int length, Font font, Color color, Color backColor, FormatSpecified specified)
+ public static bool FormatText (Line line, int formatStart, int length, Font font, Color color, Color backColor,
+ TextPositioning text_position, float char_offset, bool visible, FormatSpecified specified)
{
LineTag tag;
LineTag start_tag;
@@ -422,7 +504,7 @@ namespace System.Windows.Forms
bool retval = false; // Assume line-height doesn't change
// Too simple?
- if (((FormatSpecified.Font & specified) == FormatSpecified.Font) && font.Height != line.height)
+ if (((FormatSpecified.Font & specified) == FormatSpecified.Font) && font.Height != line.TextHeight)
retval = true;
line.recalc = true; // This forces recalculation of the line in RecalculateDocument
@@ -436,7 +518,7 @@ namespace System.Windows.Forms
// Common special case
if ((formatStart == 1) && (length == tag.Length)) {
- SetFormat (tag, font, color, backColor, specified);
+ SetFormat (tag, font, color, backColor, text_position, char_offset, visible, specified);
return retval;
}
@@ -444,7 +526,7 @@ namespace System.Windows.Forms
// we only need one new tag
if (formatStart == 1 && length == 0) {
line.tags.Break (1);
- SetFormat (line.tags, font, color, backColor, specified);
+ SetFormat (line.tags, font, color, backColor, text_position, char_offset, visible, specified);
return retval;
}
@@ -455,7 +537,7 @@ namespace System.Windows.Forms
// Find Tag will return tag 0 at position 3, but we should just
// use the empty tag after..
if (start_tag.End == formatStart && length == 0 && start_tag.Next != null && start_tag.Next.Length == 0) {
- SetFormat (start_tag.Next, font, color, backColor, specified);
+ SetFormat (start_tag.Next, font, color, backColor, text_position, char_offset, visible, specified);
return retval;
}
@@ -463,13 +545,22 @@ namespace System.Windows.Forms
while (start_tag.End == formatStart && start_tag.Next != null)
start_tag = start_tag.Next;
- tag = start_tag.Break (formatStart);
+ if (start_tag.Start == formatStart && start_tag.Length == length) {
+ SetFormat (start_tag, font, color, backColor, text_position, char_offset, visible, specified);
+ return retval;
+ }
+
+ // Break the tag if needed -- we don't need to break for the start if we're starting at its start.
+ if (start_tag.Start != formatStart)
+ tag = start_tag.Break (formatStart);
+ else
+ tag = start_tag;
// empty selection style at end of line - its the only situation
// where the rest of the tag would be empty, since we moved to the
// begining of next non empty tag
if (tag.Length == 0) {
- SetFormat (tag, font, color, backColor, specified);
+ SetFormat (tag, font, color, backColor, text_position, char_offset, visible, specified);
return retval;
}
@@ -477,25 +568,27 @@ namespace System.Windows.Forms
// after our new (now) empty one..
if (length == 0) {
tag.Break (formatStart);
- SetFormat (tag, font, color, backColor, specified);
+ SetFormat (tag, font, color, backColor, text_position, char_offset, visible, specified);
return retval;
}
+ bool atEnd = false;
while (tag != null && tag.End <= end) {
- SetFormat (tag, font, color, backColor, specified);
+ SetFormat (tag, font, color, backColor, text_position, char_offset, visible, specified);
+ atEnd |= tag.End == end;
tag = tag.next;
}
// did the last tag conveniently fit?
- if (tag != null && tag.End == end)
+ if (atEnd || (tag != null && tag.End == end))
return retval;
- /// Now do the last tag
+ // Now do the last tag
end_tag = FindTag (line, end-1);
if (end_tag != null) {
end_tag.Break (end);
- SetFormat (end_tag, font, color, backColor, specified);
+ SetFormat (end_tag, font, color, backColor, text_position, char_offset, visible, specified);
}
return retval;
@@ -509,6 +602,7 @@ namespace System.Windows.Forms
int low = start;
int high = low + Length;
int length_no_ending = line.TextLengthWithoutEnding ();
+ float char_mid;
if (Length == 0)
return low-1;
@@ -517,7 +611,8 @@ namespace System.Windows.Forms
return 0;
if (x < line.widths [low]) {
- if (low == 1 && x > (line.widths [1] / 2))
+ char_mid = (line.widths [1] + line.widths [0]) / 2;
+ if (low == 1 && x >= char_mid)
return low;
return low - 1;
}
@@ -535,9 +630,9 @@ namespace System.Windows.Forms
high = mid;
}
- float char_width = line.widths[high] - line.widths[low];
+ char_mid = (line.widths [high] + line.widths [low]) / 2;
- if ((x - line.widths[low]) >= (char_width / 2))
+ if (x >= char_mid)
return high;
else
return low;
@@ -568,6 +663,12 @@ namespace System.Windows.Forms
}
private static void SetFormat (LineTag tag, Font font, Color color, Color back_color, FormatSpecified specified)
+ {
+ SetFormat (tag, font, color, back_color, TextPositioning.Normal, 0, true, specified);
+ }
+
+ private static void SetFormat (LineTag tag, Font font, Color color, Color back_color, TextPositioning text_position,
+ float char_offset, bool visible, FormatSpecified specified)
{
if ((FormatSpecified.Font & specified) == FormatSpecified.Font) {
tag.Font = font;
@@ -577,28 +678,52 @@ namespace System.Windows.Forms
if ((FormatSpecified.BackColor & specified) == FormatSpecified.BackColor) {
tag.back_color = back_color;
}
+ if ((FormatSpecified.TextPosition & specified) == FormatSpecified.TextPosition)
+ tag.TextPosition = text_position;
+ if ((FormatSpecified.CharOffset & specified) == FormatSpecified.CharOffset)
+ tag.CharOffset = char_offset;
+ if ((FormatSpecified.Visibility & specified) == FormatSpecified.Visibility)
+ tag.Visible = visible;
// Console.WriteLine ("setting format: {0} {1} new color {2}", color.Color, specified, tag.color.Color);
}
public virtual SizeF SizeOfPosition (Graphics dc, int pos)
{
- if (pos >= line.TextLengthWithoutEnding () && line.document.multiline)
+ if ((pos >= line.TextLengthWithoutEnding () && line.document.multiline) || !visible)
return SizeF.Empty;
string text = line.text.ToString (pos, 1);
- switch ((int) text [0]) {
+ switch ((int)text [0]) {
case '\t':
if (!line.document.multiline)
goto case 10;
- SizeF res = TextBoxTextRenderer.MeasureText (dc, " ", font);
- res.Width *= 8.0F;
+ SizeF res = TextBoxTextRenderer.MeasureText (dc, " ", FontToDisplay); // This way we get the height, not that it is ever used...
+ float left = line.widths [pos];
+ float right = -1;
+ TabStopCollection stops = line.tab_stops;
+ float tabPos;
+ for (int i = 0; i < stops.Count; i++) {
+ tabPos = stops [i].Position;
+ if (tabPos >= left) {
+ if (tabPos <= line.document.viewport_width - line.RightIndent)
+ break; // Can't use tabs that are past the end of the line.
+
+ right = stops [i].CalculateRight (line, pos);
+ break;
+ }
+ }
+ if (right < 0) {
+ float maxWidth = dc.DpiX / 2; // tab stops are 1/2"
+ right = (float)(Math.Floor (left / maxWidth) + 1) * maxWidth;
+ }
+ res.Width = right - left;
return res;
case 10:
case 13:
- return TextBoxTextRenderer.MeasureText (dc, "\u000D", font);
+ return TextBoxTextRenderer.MeasureText (dc, "\u000D", FontToDisplay);
}
-
- return TextBoxTextRenderer.MeasureText (dc, text, font);
+
+ return TextBoxTextRenderer.MeasureText (dc, text, FontToDisplay);
}
public virtual string Text ()
diff --git a/mcs/class/System.Windows.Forms/System.Windows.Forms/ListBox.cs b/mcs/class/System.Windows.Forms/System.Windows.Forms/ListBox.cs
index fbc74eed38..b513cf9091 100644
--- a/mcs/class/System.Windows.Forms/System.Windows.Forms/ListBox.cs
+++ b/mcs/class/System.Windows.Forms/System.Windows.Forms/ListBox.cs
@@ -1614,7 +1614,7 @@ namespace System.Windows.Forms
private bool KeySearch (Keys key)
{
char c = (char) key;
- if (!Char.IsLetterOrDigit (c))
+ if (!Char.IsLetterOrDigit (c) || SelectionMode == SelectionMode.None)
return false;
int idx = FindString (c.ToString (), SelectedIndex);
diff --git a/mcs/class/System.Windows.Forms/System.Windows.Forms/RadioButton.cs b/mcs/class/System.Windows.Forms/System.Windows.Forms/RadioButton.cs
index 4290a1e262..89fb9d1a32 100644
--- a/mcs/class/System.Windows.Forms/System.Windows.Forms/RadioButton.cs
+++ b/mcs/class/System.Windows.Forms/System.Windows.Forms/RadioButton.cs
@@ -326,8 +326,6 @@ namespace System.Windows.Forms {
if (!Checked) {
Checked = true;
}
- } else {
- Checked = !Checked;
}
base.OnClick (e);
diff --git a/mcs/class/System.Windows.Forms/System.Windows.Forms/RichTextBox.cs b/mcs/class/System.Windows.Forms/System.Windows.Forms/RichTextBox.cs
index 9073f2c10c..1b5f9513a2 100644
--- a/mcs/class/System.Windows.Forms/System.Windows.Forms/RichTextBox.cs
+++ b/mcs/class/System.Windows.Forms/System.Windows.Forms/RichTextBox.cs
@@ -21,6 +21,7 @@
//
// Authors:
// Peter Bartok
+// Karl Scowen
//
//
@@ -28,6 +29,7 @@
using System;
using System.Collections;
+using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Drawing.Imaging;
@@ -55,7 +57,9 @@ namespace System.Windows.Forms {
// properties so we can revert
private Stack rtf_section_stack;
- private RTF.TextMap rtf_text_map;
+ bool fire_contents_resized;
+ Size existing_contents_size;
+
private int rtf_skip_count;
private int rtf_cursor_x;
private int rtf_cursor_y;
@@ -64,7 +68,7 @@ namespace System.Windows.Forms {
private bool enable_auto_drag_drop;
private RichTextBoxLanguageOptions language_option;
private bool rich_text_shortcuts_enabled;
- private Color selection_back_color;
+
#endregion // Local Variables
#region Public Constructors
@@ -85,15 +89,17 @@ namespace System.Windows.Forms {
rtf_style = new RtfSectionStyle ();
rtf_section_stack = null;
+ fire_contents_resized = true;
+
scrollbars = RichTextBoxScrollBars.Both;
alignment = HorizontalAlignment.Left;
+ document.SizeChanged += new EventHandler (ContentSizeChanged);
LostFocus += new EventHandler(RichTextBox_LostFocus);
GotFocus += new EventHandler(RichTextBox_GotFocus);
BackColor = ThemeEngine.Current.ColorWindow;
backcolor_set = false;
language_option = RichTextBoxLanguageOptions.AutoFontSizeAdjust;
rich_text_shortcuts_enabled = true;
- selection_back_color = DefaultBackColor;
ForeColor = ThemeEngine.Current.ColorWindowText;
base.HScrolled += new EventHandler(RichTextBox_HScrolled);
@@ -133,6 +139,29 @@ namespace System.Windows.Forms {
private void RichTextBox_GotFocus(object sender, EventArgs e) {
Invalidate();
}
+
+ private void ContentSizeChanged (object sender, Document.SizeChangedEventArgs e)
+ {
+ ContentSizeChanged ();
+ }
+
+ private void ContentSizeChanged ()
+ {
+ if (fire_contents_resized && (existing_contents_size.IsEmpty ||
+ existing_contents_size.Height != document.Height || existing_contents_size.Width != document.Width)) {
+ int width;
+ int height = document.Height + document.top_margin * 2 + Height - ClientRectangle.Height;
+
+ if (Multiline) {
+ width = Width; // yes, this is the insanity that is the traditional .Net implementation...
+ } else {
+ width = document.Width + document.left_margin + document.right_margin + Width - ClientRectangle.Width;
+ }
+
+ ContentsResizedEventArgs args = new ContentsResizedEventArgs (new Rectangle (Left, Top, width, height));
+ OnContentsResized (args);
+ }
+ }
#endregion // Private & Internal Methods
#region Public Instance Properties
@@ -324,14 +353,25 @@ namespace System.Windows.Forms {
set {
MemoryStream data;
+ fire_contents_resized = false;
+ existing_contents_size = new Size (document.Width, document.Height);
+
document.Empty();
data = new MemoryStream(Encoding.ASCII.GetBytes(value), false);
InsertRTFFromStream(data, 0, 1);
+ Line line = document.GetLine (1);
+ document.SetSelection (line, 0);
+ document.PositionCaret (line, 0);
+
data.Close();
Invalidate();
+
+ fire_contents_resized = true;
+ ContentSizeChanged ();
+ existing_contents_size = Size.Empty;
}
}
@@ -371,6 +411,9 @@ namespace System.Windows.Forms {
Line line;
LineTag tag;
+ fire_contents_resized = false;
+ existing_contents_size = new Size (document.Width, document.Height);
+ document.SuspendRecalc ();
if (document.selection_visible) {
document.ReplaceSelection("", false);
}
@@ -393,14 +436,19 @@ namespace System.Windows.Forms {
int nl_length = document.LineEndingLength (XplatUI.RunningOnUnix ? LineEnding.Rich : LineEnding.Hard);
document.CharIndexToLineTag(sel_start + chars + (y - document.selection_start.line.line_no) * nl_length,
out line, out tag, out sel_start);
- if (sel_start >= line.text.Length)
- sel_start = line.text.Length -1;
+ if (sel_start > line.text.Length)
+ sel_start = line.text.Length; //zero-based, but we want to go after the last character rather than before.
document.SetSelection(line, sel_start);
document.PositionCaret(line, sel_start);
+ document.ResumeRecalc(true);
document.DisplayCaret();
ScrollToCaret();
OnTextChanged(EventArgs.Empty);
+
+ fire_contents_resized = true;
+ ContentSizeChanged();
+ existing_contents_size = Size.Empty;
}
}
@@ -473,12 +521,56 @@ namespace System.Windows.Forms {
}
}
- [MonoTODO ("Stub, does nothing")]
[Browsable (false)]
[DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
public Color SelectionBackColor {
- get { return selection_back_color; }
- set { selection_back_color = value; }
+ get {
+ Color back_colour;
+ LineTag start;
+ LineTag end;
+ LineTag tag;
+
+ start = document.selection_start.line.FindTag (document.selection_start.pos);
+
+ if (SelectionLength > 0) {
+ end = document.selection_start.line.FindTag (document.selection_end.pos - 1);
+ } else {
+ end = start;
+ }
+
+ back_colour = start.BackColor;
+
+ tag = start;
+ while (tag != null) {
+ if (back_colour != tag.BackColor)
+ return Color.Empty;
+
+ if (tag == end)
+ break;
+
+ tag = document.NextTag (tag);
+ }
+
+ return back_colour;
+ }
+ set {
+ int sel_start;
+ int sel_end;
+
+ sel_start = document.LineTagToCharIndex (document.selection_start.line, document.selection_start.pos);
+ sel_end = document.LineTagToCharIndex (document.selection_end.line, document.selection_end.pos);
+
+ document.FormatText (document.selection_start.line, document.selection_start.pos + 1,
+ document.selection_end.line, document.selection_end.pos + 1, null,
+ Color.Empty, value, FormatSpecified.BackColor);
+
+ document.CharIndexToLineTag (sel_start, out document.selection_start.line, out document.selection_start.tag, out document.selection_start.pos);
+ document.CharIndexToLineTag (sel_end, out document.selection_end.line, out document.selection_end.tag, out document.selection_end.pos);
+
+ document.UpdateView (document.selection_start.line, 0);
+ //Re-Align the caret in case its changed size or position
+ Document.AlignCaret (false);
+ }
}
[Browsable(false)]
@@ -497,13 +589,54 @@ namespace System.Windows.Forms {
[Browsable(false)]
[DefaultValue(0)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
- [MonoTODO ("Stub, does nothing")]
public int SelectionCharOffset {
get {
- return 0;
+ float char_offset;
+ LineTag start;
+ LineTag end;
+ LineTag tag;
+
+ start = document.selection_start.line.FindTag (document.selection_start.pos);
+
+ if (SelectionLength > 0) {
+ end = document.selection_start.line.FindTag (document.selection_end.pos - 1);
+ } else {
+ end = start;
+ }
+
+ char_offset = start.CharOffset;
+
+ tag = start;
+ while (tag != null) {
+ if (Math.Abs(char_offset - tag.CharOffset) > 0.01)
+ return 0;
+
+ if (tag == end)
+ break;
+
+ tag = document.NextTag (tag);
+ }
+
+ return (int)char_offset;
}
set {
+ int sel_start;
+ int sel_end;
+
+ sel_start = document.LineTagToCharIndex (document.selection_start.line, document.selection_start.pos);
+ sel_end = document.LineTagToCharIndex (document.selection_end.line, document.selection_end.pos);
+
+ document.FormatText (document.selection_start.line, document.selection_start.pos + 1,
+ document.selection_end.line, document.selection_end.pos + 1, null,
+ Color.Empty, Color.Empty, TextPositioning.Normal, value, true, FormatSpecified.CharOffset);
+
+ document.CharIndexToLineTag (sel_start, out document.selection_start.line, out document.selection_start.tag, out document.selection_start.pos);
+ document.CharIndexToLineTag (sel_end, out document.selection_end.line, out document.selection_end.tag, out document.selection_end.pos);
+
+ document.UpdateView (document.selection_start.line, 0);
+ //Re-Align the caret in case its changed size or position -- probably not necessary
+ Document.AlignCaret (false);
}
}
@@ -516,11 +649,11 @@ namespace System.Windows.Forms {
LineTag end;
LineTag tag;
- if (selection_length > 0) {
- start = document.selection_start.line.FindTag (document.selection_start.pos + 1);
- end = document.selection_start.line.FindTag (document.selection_end.pos);
+ start = document.selection_start.line.FindTag (document.selection_start.pos);
+
+ if (SelectionLength > 0) {
+ end = document.selection_start.line.FindTag (document.selection_end.pos - 1);
} else {
- start = document.selection_start.line.FindTag (document.selection_start.pos);
end = start;
}
@@ -575,17 +708,16 @@ namespace System.Windows.Forms {
LineTag end;
LineTag tag;
- if (selection_length > 0) {
- start = document.selection_start.line.FindTag (document.selection_start.pos + 1);
- end = document.selection_start.line.FindTag (document.selection_end.pos);
+ start = document.selection_start.line.FindTag (document.selection_start.pos);
+ if (SelectionLength > 0) {
+ end = document.selection_start.line.FindTag (document.selection_end.pos - 1);
} else {
- start = document.selection_start.line.FindTag (document.selection_start.pos);
end = start;
}
font = start.Font;
- if (selection_length > 1) {
+ if (SelectionLength > 1) {
tag = start;
while (tag != null) {
@@ -626,26 +758,106 @@ namespace System.Windows.Forms {
[Browsable(false)]
[DefaultValue(0)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
- [MonoTODO ("Stub, does nothing")]
public int SelectionHangingIndent {
get {
- return 0;
+ int indent;
+ Line start;
+ Line end;
+ Line line;
+
+ start = document.ParagraphStart (document.selection_start.line);
+ indent = (int)start.hanging_indent;
+
+ end = document.ParagraphEnd (document.selection_end.line);
+
+ line = start;
+
+ while (true) {
+ if ((int)line.hanging_indent != indent) {
+ return 0;
+ }
+
+ if (line == end) {
+ break;
+ }
+ line = document.GetLine (line.line_no + 1);
+ }
+
+ return indent;
}
set {
+ Line start;
+ Line end;
+ Line line;
+
+ start = document.ParagraphStart (document.selection_start.line);
+ end = document.ParagraphEnd (document.selection_end.line);
+
+ line = start;
+
+ while (true) {
+ line.HangingIndent = value;
+
+ if (line == end) {
+ break;
+ }
+ line = document.GetLine (line.line_no + 1);
+ }
+ this.CalculateDocument ();
}
}
[Browsable(false)]
[DefaultValue(0)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
- [MonoTODO ("Stub, does nothing")]
public int SelectionIndent {
get {
- return 0;
+ int indent;
+ Line start;
+ Line end;
+ Line line;
+
+ start = document.ParagraphStart (document.selection_start.line);
+ indent = (int)start.indent;
+
+ end = document.ParagraphEnd (document.selection_end.line);
+
+ line = start;
+
+ while (true) {
+ if ((int)line.indent != indent) {
+ return 0;
+ }
+
+ if (line == end) {
+ break;
+ }
+ line = document.GetLine (line.line_no + 1);
+ }
+
+ return indent;
}
set {
+ Line start;
+ Line end;
+ Line line;
+
+ start = document.ParagraphStart (document.selection_start.line);
+ end = document.ParagraphEnd (document.selection_end.line);
+
+ line = start;
+
+ while (true) {
+ line.Indent = value;
+
+ if (line == end) {
+ break;
+ }
+ line = document.GetLine (line.line_no + 1);
+ }
+ this.CalculateDocument ();
}
}
@@ -677,25 +889,105 @@ namespace System.Windows.Forms {
[Browsable(false)]
[DefaultValue(0)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
- [MonoTODO ("Stub, does nothing")]
public int SelectionRightIndent {
get {
- return 0;
+ int indent;
+ Line start;
+ Line end;
+ Line line;
+
+ start = document.ParagraphStart (document.selection_start.line);
+ indent = (int)start.right_indent;
+
+ end = document.ParagraphEnd (document.selection_end.line);
+
+ line = start;
+
+ while (true) {
+ if ((int)line.right_indent != indent) {
+ return 0;
+ }
+
+ if (line == end) {
+ break;
+ }
+ line = document.GetLine (line.line_no + 1);
+ }
+
+ return indent;
}
set {
+ Line start;
+ Line end;
+ Line line;
+
+ start = document.ParagraphStart (document.selection_start.line);
+ end = document.ParagraphEnd (document.selection_end.line);
+
+ line = start;
+
+ while (true) {
+ line.RightIndent = value;
+
+ if (line == end) {
+ break;
+ }
+ line = document.GetLine (line.line_no + 1);
+ }
+ this.CalculateDocument ();
}
}
[Browsable(false)]
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
- [MonoTODO ("Stub, does nothing")]
public int[] SelectionTabs {
get {
- return new int[0];
+ TabStopCollection tabs;
+ Line start;
+ Line end;
+ Line line;
+
+ start = document.ParagraphStart (document.selection_start.line);
+ tabs = start.TabStops;
+
+ end = document.ParagraphEnd (document.selection_end.line);
+
+ line = start;
+
+ while (true) {
+ if (!line.TabStops.Equals (tabs))
+ return new int[0];
+
+ if (line == end)
+ break;
+ line = document.GetLine (line.line_no + 1);
+ }
+
+ return tabs.ToPosArray ();
}
set {
+ Line start;
+ Line end;
+ Line line;
+
+ start = document.ParagraphStart (document.selection_start.line);
+ end = document.ParagraphEnd (document.selection_end.line);
+
+ line = start;
+
+ while (true) {
+ line.TabStops.Clear ();
+ foreach (int val in value)
+ line.TabStops.Add (new LeftTabStop (val));
+
+ if (line == end) {
+ break;
+ }
+ line = document.GetLine (line.line_no + 1);
+ }
+ this.CalculateDocument ();
}
}
@@ -1308,26 +1600,47 @@ namespace System.Windows.Forms {
private class RtfSectionStyle : ICloneable {
internal Color rtf_color;
+ internal Color rtf_back_color;
internal RTF.Font rtf_rtffont;
- internal int rtf_rtffont_size;
+ internal float rtf_rtffont_size;
internal FontStyle rtf_rtfstyle;
- internal HorizontalAlignment rtf_rtfalign;
- internal int rtf_par_line_left_indent;
+ internal HorizontalAlignment rtf_par_align;
+ internal float rtf_par_line_left_indent;
+ internal float rtf_par_first_line_indent;
+ internal float rtf_par_line_right_indent;
internal bool rtf_visible;
internal int rtf_skip_width;
+ internal float rtf_par_spacing_after;
+ internal float rtf_par_spacing_before;
+ internal float rtf_par_line_spacing;
+ internal bool rtf_par_line_spacing_multiple;
+ internal TextPositioning rtf_text_position;
+ internal float rtf_char_offset;
+ internal TabStop rtf_par_next_tab_stop = null;
+ internal TabStopCollection rtf_par_tab_stops = new TabStopCollection ();
public object Clone ()
{
RtfSectionStyle new_style = new RtfSectionStyle ();
new_style.rtf_color = rtf_color;
+ new_style.rtf_back_color = rtf_back_color;
new_style.rtf_par_line_left_indent = rtf_par_line_left_indent;
- new_style.rtf_rtfalign = rtf_rtfalign;
+ new_style.rtf_par_first_line_indent = rtf_par_first_line_indent;
+ new_style.rtf_par_line_right_indent = rtf_par_line_right_indent;
+ new_style.rtf_par_align = rtf_par_align;
new_style.rtf_rtffont = rtf_rtffont;
new_style.rtf_rtffont_size = rtf_rtffont_size;
new_style.rtf_rtfstyle = rtf_rtfstyle;
new_style.rtf_visible = rtf_visible;
new_style.rtf_skip_width = rtf_skip_width;
+ new_style.rtf_par_spacing_after = rtf_par_spacing_after;
+ new_style.rtf_par_spacing_before = rtf_par_spacing_before;
+ new_style.rtf_par_line_spacing = rtf_par_line_spacing;
+ new_style.rtf_par_line_spacing_multiple = rtf_par_line_spacing_multiple;
+ new_style.rtf_text_position = rtf_text_position;
+ new_style.rtf_char_offset = rtf_char_offset;
+ new_style.rtf_par_tab_stops = rtf_par_tab_stops.Clone ();
return new_style;
}
@@ -1385,11 +1698,9 @@ namespace System.Windows.Forms {
case RTF.Major.PictAttr:
if (rtf.Picture != null && rtf.Picture.IsValid ()) {
+ FlushText (rtf, false, true);
Line line = document.GetLine (rtf_cursor_y);
- document.InsertPicture (line, 0, rtf.Picture);
- rtf_cursor_x++;
-
- FlushText (rtf, true);
+ document.InsertPicture (line, rtf_cursor_x++, rtf.Picture);
rtf.Picture = null;
}
break;
@@ -1399,14 +1710,31 @@ namespace System.Windows.Forms {
case RTF.Minor.ForeColor: {
System.Windows.Forms.RTF.Color color;
- color = System.Windows.Forms.RTF.Color.GetColor(rtf, rtf.Param);
-
+ color = System.Windows.Forms.RTF.Color.GetColor (rtf, rtf.Param);
+
if (color != null) {
- FlushText(rtf, false);
+ FlushText (rtf, false);
if (color.Red == -1 && color.Green == -1 && color.Blue == -1) {
this.rtf_style.rtf_color = ForeColor;
} else {
- this.rtf_style.rtf_color = Color.FromArgb(color.Red, color.Green, color.Blue);
+ this.rtf_style.rtf_color = Color.FromArgb (color.Red, color.Green, color.Blue);
+ }
+ FlushText (rtf, false);
+ }
+ break;
+ }
+
+ case RTF.Minor.BackColor: {
+ System.Windows.Forms.RTF.Color color;
+
+ color = System.Windows.Forms.RTF.Color.GetColor(rtf, rtf.Param);
+
+ if (color != null) {
+ FlushText(rtf, false);
+ if (color.Red == -1 && color.Green == -1 && color.Blue == -1) {
+ this.rtf_style.rtf_back_color = BackColor;
+ } else {
+ this.rtf_style.rtf_back_color = Color.FromArgb(color.Red, color.Green, color.Blue);
}
FlushText (rtf, false);
}
@@ -1415,7 +1743,7 @@ namespace System.Windows.Forms {
case RTF.Minor.FontSize: {
FlushText(rtf, false);
- this.rtf_style.rtf_rtffont_size = rtf.Param / 2;
+ this.rtf_style.rtf_rtffont_size = rtf.Param / 2f;
break;
}
@@ -1478,7 +1806,7 @@ namespace System.Windows.Forms {
case RTF.Minor.Invisible: {
FlushText (rtf, false);
- rtf_style.rtf_visible = false;
+ rtf_style.rtf_visible = (rtf.Param != RTF.RTF.NoParam);
break;
}
@@ -1487,6 +1815,36 @@ namespace System.Windows.Forms {
rtf_style.rtf_rtfstyle &= ~FontStyle.Underline;
break;
}
+
+ case RTF.Minor.SuperScrShrink: {
+ FlushText (rtf, false);
+ rtf_style.rtf_text_position = TextPositioning.Superscript;
+ break;
+ }
+
+ case RTF.Minor.SubScrShrink: {
+ FlushText (rtf, false);
+ rtf_style.rtf_text_position = TextPositioning.Subscript;
+ break;
+ }
+
+ case RTF.Minor.NoSuperSub: {
+ FlushText (rtf, false);
+ rtf_style.rtf_text_position = TextPositioning.Normal;
+ break;
+ }
+
+ case RTF.Minor.SuperScript: {
+ FlushText (rtf, false);
+ rtf_style.rtf_char_offset = ((float) rtf.Param / 144.0F) * document.Dpi;
+ break;
+ }
+
+ case RTF.Minor.SubScript: {
+ FlushText (rtf, false);
+ rtf_style.rtf_char_offset = -((float) rtf.Param / 144.0F) * document.Dpi;
+ break;
+ }
}
break;
}
@@ -1497,32 +1855,90 @@ namespace System.Windows.Forms {
case RTF.Minor.ParDef:
FlushText (rtf, false);
rtf_style.rtf_par_line_left_indent = 0;
- rtf_style.rtf_rtfalign = HorizontalAlignment.Left;
+ rtf_style.rtf_par_first_line_indent = 0;
+ rtf_style.rtf_par_line_right_indent = 0;
+ rtf_style.rtf_par_spacing_after = 0;
+ rtf_style.rtf_par_spacing_before = 0;
+ rtf_style.rtf_par_line_spacing = 0;
+ rtf_style.rtf_par_line_spacing_multiple = false;
+ rtf_style.rtf_par_align = HorizontalAlignment.Left;
+ rtf_style.rtf_par_next_tab_stop = null;
+ rtf_style.rtf_par_tab_stops.Clear ();
+ break;
+
+ case RTF.Minor.TabLeft:
+ rtf_style.rtf_par_next_tab_stop = new LeftTabStop ();
+ break;
+
+ case RTF.Minor.TabCenter:
+ rtf_style.rtf_par_next_tab_stop = new CentredTabStop ();
+ break;
+
+ case RTF.Minor.TabRight:
+ rtf_style.rtf_par_next_tab_stop = new RightTabStop ();
+ break;
+
+ case RTF.Minor.TabDecimal:
+ rtf_style.rtf_par_next_tab_stop = new DecimalTabStop ();
+ break;
+
+ case RTF.Minor.TabPos:
+ float tabPos = ((float)rtf.Param / 1440.0F) * document.Dpi;
+ if (rtf_style.rtf_par_next_tab_stop != null) {
+ rtf_style.rtf_par_next_tab_stop.Position = tabPos;
+ rtf_style.rtf_par_tab_stops.Add (rtf_style.rtf_par_next_tab_stop);
+ rtf_style.rtf_par_next_tab_stop = null;
+ } else {
+ rtf_style.rtf_par_tab_stops.Add (new LeftTabStop (tabPos));
+ }
break;
case RTF.Minor.LeftIndent:
- using (Graphics g = CreateGraphics ())
- rtf_style.rtf_par_line_left_indent = (int) (((float) rtf.Param / 1440.0F) * g.DpiX + 0.5F);
+ rtf_style.rtf_par_line_left_indent = ((float) rtf.Param / 1440.0F) * document.Dpi;
+ break;
+
+ case RTF.Minor.FirstIndent:
+ rtf_style.rtf_par_first_line_indent = ((float) rtf.Param / 1440.0F) * document.Dpi;
+ break;
+
+ case RTF.Minor.RightIndent:
+ rtf_style.rtf_par_line_right_indent = ((float) rtf.Param / 1440.0F) * document.Dpi;
break;
case RTF.Minor.QuadCenter:
FlushText (rtf, false);
- rtf_style.rtf_rtfalign = HorizontalAlignment.Center;
+ rtf_style.rtf_par_align = HorizontalAlignment.Center;
break;
case RTF.Minor.QuadJust:
FlushText (rtf, false);
- rtf_style.rtf_rtfalign = HorizontalAlignment.Center;
+ rtf_style.rtf_par_align = HorizontalAlignment.Left;
break;
case RTF.Minor.QuadLeft:
FlushText (rtf, false);
- rtf_style.rtf_rtfalign = HorizontalAlignment.Left;
+ rtf_style.rtf_par_align = HorizontalAlignment.Left;
break;
case RTF.Minor.QuadRight:
FlushText (rtf, false);
- rtf_style.rtf_rtfalign = HorizontalAlignment.Right;
+ rtf_style.rtf_par_align = HorizontalAlignment.Right;
+ break;
+
+ case RTF.Minor.SpaceAfter:
+ rtf_style.rtf_par_spacing_after = ((float) rtf.Param / 1440.0F) * document.Dpi;
+ break;
+
+ case RTF.Minor.SpaceBefore:
+ rtf_style.rtf_par_spacing_before = ((float) rtf.Param / 1440.0F) * document.Dpi;
+ break;
+
+ case RTF.Minor.SpaceBetween:
+ rtf_style.rtf_par_line_spacing = ((float) rtf.Param / 1440.0F) * document.Dpi;
+ break;
+
+ case RTF.Minor.SpaceMultiply:
+ rtf_style.rtf_par_line_spacing_multiple = (rtf.Param == 1);
break;
}
break;
@@ -1543,7 +1959,8 @@ namespace System.Windows.Forms {
case RTF.Minor.Row:
case RTF.Minor.Line:
case RTF.Minor.Par: {
- FlushText(rtf, true);
+ if (Multiline)
+ FlushText (rtf, true);
break;
}
@@ -1575,8 +1992,8 @@ namespace System.Windows.Forms {
break;
}
- case RTF.Minor.WidowCtrl:
- break;
+ case RTF.Minor.WidowCtrl:
+ break;
case RTF.Minor.EmDash: {
rtf_line.Append ("\u2014");
@@ -1587,7 +2004,7 @@ namespace System.Windows.Forms {
rtf_line.Append ("\u2013");
break;
}
-/*
+
case RTF.Minor.LQuote: {
Console.Write("\u2018");
break;
@@ -1607,7 +2024,7 @@ namespace System.Windows.Forms {
Console.Write("\u201D");
break;
}
-*/
+
default: {
// Console.WriteLine ("skipped special char: {0}", rtf.Minor);
// rtf.SkipGroup();
@@ -1640,16 +2057,21 @@ namespace System.Windows.Forms {
}
*/
- if (rtf_style.rtf_visible)
- rtf_line.Append (str);
+ rtf_line.Append (str);
}
private void FlushText(RTF.RTF rtf, bool newline) {
+ FlushText (rtf, newline, false);
+ }
+
+ private void FlushText(RTF.RTF rtf, bool newline, bool force) {
int length;
+ float hanging_indent;
+ float left_indent;
Font font;
length = rtf_line.Length;
- if (!newline && (length == 0)) {
+ if (!newline && (length == 0) && !force) {
return;
}
@@ -1659,7 +2081,12 @@ namespace System.Windows.Forms {
}
font = new Font (rtf_style.rtf_rtffont.Name, rtf_style.rtf_rtffont_size, rtf_style.rtf_rtfstyle);
+ if (font.Name != rtf_style.rtf_rtffont.Name && !string.IsNullOrEmpty (rtf_style.rtf_rtffont.AltName))
+ font = new Font (rtf_style.rtf_rtffont.AltName, rtf_style.rtf_rtffont_size, rtf_style.rtf_rtfstyle);
+ hanging_indent = -rtf_style.rtf_par_first_line_indent;
+ left_indent = rtf_style.rtf_par_line_left_indent - hanging_indent;
+
if (rtf_style.rtf_color == Color.Empty) {
System.Windows.Forms.RTF.Color color;
@@ -1682,30 +2109,40 @@ namespace System.Windows.Forms {
if (newline && rtf_line.ToString ().EndsWith (Environment.NewLine) == false)
rtf_line.Append (Environment.NewLine);
- document.Add (rtf_cursor_y, rtf_line.ToString (), rtf_style.rtf_rtfalign, font, rtf_style.rtf_color,
- newline ? LineEnding.Rich : LineEnding.Wrap);
- if (rtf_style.rtf_par_line_left_indent != 0) {
- Line line = document.GetLine (rtf_cursor_y);
- line.indent = rtf_style.rtf_par_line_left_indent;
- }
+ document.Add (rtf_cursor_y, rtf_line.ToString (), rtf_style.rtf_par_align, font, rtf_style.rtf_color,
+ rtf_style.rtf_back_color, rtf_style.rtf_text_position, rtf_style.rtf_char_offset, left_indent, hanging_indent,
+ rtf_style.rtf_par_line_right_indent, rtf_style.rtf_par_spacing_before, rtf_style.rtf_par_spacing_after,
+ rtf_style.rtf_par_line_spacing, rtf_style.rtf_par_line_spacing_multiple,
+ rtf_style.rtf_par_tab_stops.Clone() , rtf_style.rtf_visible,
+ newline ? LineEnding.Rich : LineEnding.None);
} else {
- Line line;
+ Line line = document.GetLine (rtf_cursor_y);
+
+ if (newline) {
+ if (rtf_cursor_x < line.text.Length)
+ document.Split(line, rtf_cursor_x);
+ line.ending = LineEnding.Rich;
+ }
+
+ line.indent = left_indent;
+ line.HangingIndent = hanging_indent;
+ line.right_indent = rtf_style.rtf_par_line_right_indent;
+ line.spacing_after = rtf_style.rtf_par_spacing_after;
+ line.spacing_before = rtf_style.rtf_par_spacing_before;
+ line.line_spacing = rtf_style.rtf_par_line_spacing;
+ line.line_spacing_multiple = rtf_style.rtf_par_line_spacing_multiple;
+ line.alignment = rtf_style.rtf_par_align;
- line = document.GetLine (rtf_cursor_y);
- line.indent = rtf_style.rtf_par_line_left_indent;
if (rtf_line.Length > 0) {
document.InsertString (line, rtf_cursor_x, rtf_line.ToString ());
document.FormatText (line, rtf_cursor_x + 1, line, rtf_cursor_x + 1 + length,
- font, rtf_style.rtf_color, Color.Empty,
- FormatSpecified.Font | FormatSpecified.Color);
+ font, rtf_style.rtf_color, rtf_style.rtf_back_color, rtf_style.rtf_text_position, rtf_style.rtf_char_offset,
+ rtf_style.rtf_visible, FormatSpecified.Font | FormatSpecified.Color | FormatSpecified.BackColor |
+ FormatSpecified.TextPosition | FormatSpecified.CharOffset | FormatSpecified.Visibility);
}
- if (newline) {
- line = document.GetLine (rtf_cursor_y);
- line.ending = LineEnding.Rich;
- if (line.Text.EndsWith (Environment.NewLine) == false)
- line.Text += Environment.NewLine;
- }
+ if (newline && line.Text.EndsWith (Environment.NewLine) == false)
+ line.Text += Environment.NewLine;
reuse_line = false; // sanity assignment - in this case we have already re-used one line.
}
@@ -1740,9 +2177,20 @@ namespace System.Windows.Forms {
rtf_skip_count = 0;
rtf_line = new StringBuilder();
rtf_style.rtf_color = Color.Empty;
+ rtf_style.rtf_back_color = Color.Empty;
rtf_style.rtf_rtffont_size = (int)this.Font.Size;
- rtf_style.rtf_rtfalign = HorizontalAlignment.Left;
+ rtf_style.rtf_par_align = HorizontalAlignment.Left;
rtf_style.rtf_rtfstyle = FontStyle.Regular;
+ rtf_style.rtf_text_position = TextPositioning.Normal;
+ rtf_style.rtf_par_spacing_after = 0;
+ rtf_style.rtf_par_spacing_before = 0;
+ rtf_style.rtf_par_line_spacing = 0;
+ rtf_style.rtf_par_line_spacing_multiple = false;
+ rtf_style.rtf_par_line_left_indent = 0;
+ rtf_style.rtf_par_first_line_indent = 0;
+ rtf_style.rtf_par_line_right_indent = 0;
+ rtf_style.rtf_par_tab_stops.Clear ();
+ rtf_style.rtf_char_offset = 0;
rtf_style.rtf_rtffont = null;
rtf_style.rtf_visible = true;
rtf_style.rtf_skip_width = 1;
@@ -1751,15 +2199,18 @@ namespace System.Windows.Forms {
rtf_chars = 0;
rtf.DefaultFont(this.Font.Name);
- rtf_text_map = new RTF.TextMap();
- RTF.TextMap.SetupStandardTable(rtf_text_map.Table);
-
document.SuspendRecalc ();
try {
rtf.Read(); // That's it
FlushText(rtf, false);
+ if (document.Lines > 1) {
+ Line last_line = document.GetLine (document.Lines);
+ if (last_line.text.Length == 0) {
+ document.Delete (last_line);
+ }
+ }
}
@@ -1780,10 +2231,11 @@ namespace System.Windows.Forms {
rtf_section_stack.Clear();
if (IsHandleCreated) {
+ CalculateScrollBars ();
using (var graphics = CreateGraphics())
document.RecalculateDocument(graphics, cursor_y, document.Lines, false);
document.ResumeRecalc (true);
- document.Invalidate (document.GetLine(cursor_y), 0, document.GetLine(document.Lines), -1);
+ document.InvalidateLinesAfter(document.GetLine(cursor_y));
} else {
document.ResumeRecalc (false);
}
@@ -1822,7 +2274,7 @@ namespace System.Windows.Forms {
rtf.Append(String.Format("\\f{0}", font_index)); // Font table entry
}
- if ((prev_font == null) || (prev_font.Size != font.Size)) {
+ if ((prev_font == null) || (Math.Abs (prev_font.Size - font.Size) > 0.01)) {
rtf.Append(String.Format("\\fs{0}", (int)(font.Size * 2))); // Font size
}
@@ -1873,19 +2325,20 @@ namespace System.Windows.Forms {
int start = rtf.Length;
int count = text.Length;
- // First emit simple unicode chars as escaped
- EmitEscapedUnicode (rtf, text);
-
// This method emits user text *only*, so it's safe to escape any reserved rtf chars
// Escape '\' first, since it is used later to escape the other chars
if (text.IndexOfAny (ReservedRTFChars) > -1) {
- rtf.Replace ("\\", "\\\\", start, count);
- rtf.Replace ("{", "\\{", start, count);
- rtf.Replace ("}", "\\}", start, count);
+ StringBuilder sb = new StringBuilder(text); // Would it be better to just use text = text.Replace for this?
+ sb.Replace ("\\", "\\\\");
+ sb.Replace ("{", "\\{");
+ sb.Replace ("}", "\\}");
+ text = sb.ToString ();
}
+
+ // Then actually emit the text, and also escape any Unicode
+ EmitEscapedUnicode (rtf, text);
}
- // The chars to be escaped use "\'" + its hexadecimal value.
private void EmitEscapedUnicode (StringBuilder sb, string text)
{
int pos;
@@ -1894,9 +2347,10 @@ namespace System.Windows.Forms {
while ((pos = IndexOfNonAscii (text, start)) > -1) {
sb.Append (text, start, pos - start);
- int n = (int)text [pos];
- sb.Append ("\\'");
- sb.Append (n.ToString ("X"));
+ short n = (short)text [pos];
+ sb.Append ("\\u");
+ sb.Append (n.ToString ());
+ sb.Append ("?");
start = pos + 1;
}
@@ -1918,24 +2372,182 @@ namespace System.Windows.Forms {
return -1;
}
+ static char[] GetHexChars (byte[] bytes, int length)
+ {
+ if (length > bytes.Length)
+ throw new ArgumentOutOfRangeException ("length");
+
+ var chars = new char [length * 2];
+ int n;
+ for (int i = 0; i < length; i++) {
+ n = bytes [i] >> 4;
+ chars [i * 2] = (char)('A' - 10 + n + (((n - 10) >> 31) & ('0' - 55)));
+ n = bytes [i] & 0x0F;
+ chars [i * 2 + 1] = (char)('A' - 10 + n + (((n - 10) >> 31) & ('0' - 55)));
+ }
+ return chars;
+ }
+
+ void EmitRtfPicture (PictureTag picture, StringBuilder sb)
+ {
+ if (!picture.picture.IsValid ()) {
+ return;
+ }
+
+ int width = (int)((float)picture.picture.Width / document.Dpi * 1440f);
+ int height = (int)((float)picture.picture.Height / document.Dpi * 1440f);
+ string type = "";
+ switch (picture.picture.ImageType) {
+ case RTF.Minor.WinMetafile:
+ type = "wmetafile1"; // The number should actually vary, but I don't see how it is used here at all.
+ break;
+ case RTF.Minor.EnhancedMetafile:
+ type = "emfblip";
+ break;
+ case RTF.Minor.PngBlip:
+ type = "pngblip";
+ break;
+ case RTF.Minor.JpegBlip:
+ type = "jpegblip";
+ break;
+ }
+ sb.AppendFormat ("{{\\pict\\{0}\\picwgoal{1}\\pichgoal{2} ", type, width, height);
+
+ var data = picture.picture.Data;
+ data.Position = 0;
+ if (sb.Capacity - sb.Length < data.Length) {
+ sb.Capacity += (int)data.Length * 2;
+ }
+ var buffer = new byte [39];
+ int length;
+ while ((length = data.Read (buffer, 0, buffer.Length)) > 0) {
+ sb.AppendLine ().Append (GetHexChars (buffer, length));
+ }
+ sb.Append ("}");
+ }
+
+ void EmitTabStops (StringBuilder sb, TabStopCollection tabs)
+ {
+ foreach (var tab in tabs) {
+ if (tab is DecimalTabStop) {
+ sb.Append ("\\tqdec");
+ } else if (tab is CentredTabStop) {
+ sb.Append ("\\tqc");
+ } else if (tab is RightTabStop) {
+ sb.Append ("\\tqr");
+ }
+ sb.Append ("\\tx");
+ sb.Append (Int (tab.Position / document.Dpi * 1440f));
+ }
+ }
+
+ void EmitPard (StringBuilder sb, ArrayList fonts, Line line, LineTag tag, TabStopCollection tabs, float ppt)
+ {
+ var first_line_indent = -line.HangingIndent;
+ var left_indent = line.Indent - first_line_indent;
+ var right_indent = line.RightIndent;
+
+ sb.Append ("\\pard");
+ // Reset to default paragraph properties
+ switch (line.alignment) {
+ case HorizontalAlignment.Left:
+ sb.Append ("\\ql");
+ break;
+ case HorizontalAlignment.Center:
+ sb.Append ("\\qc");
+ break;
+ case HorizontalAlignment.Right:
+ sb.Append ("\\qr");
+ break;
+ }
+ if (Math.Abs (line.spacing_after) > ppt) {
+ sb.Append ("\\sa");
+ sb.Append (Int (line.spacing_after / ppt));
+ }
+ if (Math.Abs (line.spacing_before) > ppt) {
+ sb.Append ("\\sb");
+ sb.Append (Int (line.spacing_before / ppt));
+ }
+ if (Math.Abs (line.line_spacing) > ppt) {
+ sb.Append ("\\sl");
+ sb.Append (Int (line.line_spacing / ppt));
+ sb.Append ("\\slmult");
+ sb.Append (line.line_spacing_multiple ? "1" : "0");
+ }
+ if (Math.Abs (left_indent) > ppt) {
+ sb.Append ("\\li");
+ sb.Append (Int (left_indent / ppt));
+ }
+ if (Math.Abs (first_line_indent) > ppt) {
+ sb.Append ("\\fi");
+ sb.Append (Int (first_line_indent / ppt));
+ }
+ if (Math.Abs (right_indent) > ppt) {
+ sb.Append ("\\ri");
+ sb.Append (Int (right_indent / ppt));
+ }
+ if (tabs.Count > 0) {
+ EmitTabStops (sb, tabs);
+ }
+ }
+
+ static void LoadParaSettings (Line line, out HorizontalAlignment line_alignment, out float spacing_after, out float spacing_before, out float line_spacing,
+ out bool line_spacing_multiple, out float left_indent, out float prev_left_indent, out float first_line_indent,
+ out float prev_first_line_indent, out float right_indent, out TabStopCollection tabs)
+ {
+ spacing_after = line.spacing_after;
+ spacing_before = line.spacing_before;
+ line_spacing = line.line_spacing;
+ line_spacing_multiple = line.line_spacing_multiple;
+ line_alignment = line.alignment;
+ first_line_indent = -line.HangingIndent;
+ left_indent = line.Indent - first_line_indent;
+ prev_first_line_indent = first_line_indent;
+ prev_left_indent = left_indent;
+ right_indent = line.RightIndent;
+ tabs = line.TabStops;
+ }
+
// start_pos and end_pos are 0-based
private StringBuilder GenerateRTF(Line start_line, int start_pos, Line end_line, int end_pos) {
StringBuilder sb;
ArrayList fonts;
ArrayList colors;
Color color;
+ Color back_color;
Font font;
Line line;
LineTag tag;
+ TextPositioning text_position;
+ HorizontalAlignment line_alignment;
+ float spacing_after;
+ float spacing_before;
+ float line_spacing;
+ bool line_spacing_multiple;
+ float left_indent;
+ float prev_left_indent;
+ float first_line_indent;
+ float prev_first_line_indent;
+ float right_indent;
+ TabStopCollection tabs;
+ TabStopCollection tabDiff;
+ bool emit_defaults;
+ float char_offset;
+ bool visible;
int pos;
int line_no;
int line_len;
- int i;
+ int i, j;
int length;
+ float ppt; // pixels per twip
+
+ ppt = document.Dpi / 1440f; // 1 twip = 1/20 point, 1 point = 1/72 inch, thus 1440 twips = 1 inch.
+ emit_defaults = false;
sb = new StringBuilder();
fonts = new ArrayList(10);
colors = new ArrayList(10);
+ tabDiff = new TabStopCollection ();
// Two runs, first we parse to determine tables;
// and unlike most of our processing here we work on tags
@@ -1949,6 +2561,7 @@ namespace System.Windows.Forms {
tag = LineTag.FindTag(start_line, pos);
font = tag.Font;
color = tag.Color;
+ back_color = Color.Empty;
fonts.Add(font.Name);
colors.Add(color);
@@ -1972,11 +2585,18 @@ namespace System.Windows.Forms {
if (tag.Color != color) {
color = tag.Color;
- if (!colors.Contains(color)) {
+ if (color != Color.Empty && !colors.Contains (color)) {
colors.Add(color);
}
}
+ if (tag.BackColor != back_color) {
+ back_color = tag.BackColor;
+ if (back_color != Color.Empty && !colors.Contains (back_color)) {
+ colors.Add (back_color);
+ }
+ }
+
pos = tag.Start + tag.Length - 1;
tag = tag.Next;
}
@@ -2008,7 +2628,7 @@ namespace System.Windows.Forms {
// Emit the color table (if needed)
if ((colors.Count > 1) || ((((Color)colors[0]).R != this.ForeColor.R) || (((Color)colors[0]).G != this.ForeColor.G) || (((Color)colors[0]).B != this.ForeColor.B))) {
- sb.Append("{\\colortbl "); // Header and NO! default color
+ sb.Append("{\\colortbl;"); // Header and default color (default is needed)
for (i = 0; i < colors.Count; i++) {
sb.Append(String.Format("\\red{0}", ((Color)colors[i]).R));
sb.Append(String.Format("\\green{0}", ((Color)colors[i]).G));
@@ -2020,17 +2640,24 @@ namespace System.Windows.Forms {
}
sb.Append("{\\*\\generator Mono RichTextBox;}");
- // Emit initial paragraph settings
- tag = LineTag.FindTag(start_line, start_pos);
- sb.Append("\\pard"); // Reset to default paragraph properties
- EmitRTFFontProperties(sb, -1, fonts.IndexOf(tag.Font.Name), null, tag.Font); // Font properties
- sb.Append(" "); // Space separator
+ tag = LineTag.FindTag (start_line, start_pos);
font = tag.Font;
- color = (Color)colors[0];
+ color = Color.Empty;
+ back_color = Color.Empty;
+ text_position = TextPositioning.Normal;
+ char_offset = 0;
+ visible = true;
line = start_line;
line_no = start_line.line_no;
pos = start_pos;
+ LoadParaSettings (line, out line_alignment, out spacing_after, out spacing_before, out line_spacing,
+ out line_spacing_multiple, out left_indent, out prev_left_indent, out first_line_indent,
+ out prev_first_line_indent, out right_indent, out tabs);
+
+ EmitPard (sb, fonts, line, tag, tabs, ppt);
+ EmitRTFFontProperties (sb, -1, fonts.IndexOf (tag.Font.Name), null, tag.Font); // Font properties
+ sb.Append(" "); // Space separator
while (line_no <= end_line.line_no) {
line = document.GetLine(line_no);
@@ -2042,7 +2669,110 @@ namespace System.Windows.Forms {
line_len = end_pos;
}
- while (pos < line_len) {
+ i = 0;
+ j = 0;
+ tabDiff.Clear ();
+ emit_defaults = line.TabStops.Count < tabs.Count; // If there are less tabs on the new line, we've got to start over.
+ while (!emit_defaults && i < tabs.Count && j < line.TabStops.Count) {
+ if (tabs [i].Equals (line.TabStops [j])) {
+ i++;
+ j++;
+ } else if (tabs [i].Position - ppt > line.TabStops [j].Position) {
+ // The current tabstop is after the new line's one, so we need to add one in between.
+ tabDiff.Add (line.TabStops [j]);
+ j++;
+ } else {
+ // Either the tabs are at the same position and are of different types, or this line is missing at least one.
+ // This in turn means we must start the line with a \pard, and re-emit all other paragraph properties.
+ emit_defaults = true;
+ }
+ }
+ if (i < tabs.Count) // We didn't reach the end of the existing tabstops, so the rest have to be removed.
+ emit_defaults = true;
+ while (!emit_defaults && j < line.TabStops.Count) { // Any new ones have to be added on the end too.
+ tabDiff.Add (line.TabStops[j]);
+ j++;
+ }
+ tabs = line.TabStops;
+
+ if (!emit_defaults) {
+ length = sb.Length;
+ if (line.Alignment != line_alignment) {
+ line_alignment = line.Alignment;
+ switch (line_alignment) {
+ case HorizontalAlignment.Left:
+ sb.Append("\\ql");
+ break;
+ case HorizontalAlignment.Center:
+ sb.Append("\\qc");
+ break;
+ case HorizontalAlignment.Right:
+ sb.Append("\\qr");
+ break;
+ }
+ }
+
+ if (Math.Abs(line.spacing_after - spacing_after) > ppt) {
+ spacing_after = line.spacing_after;
+ sb.Append("\\sa");
+ sb.Append(Int(spacing_after / ppt));
+ }
+
+ if (Math.Abs(line.spacing_before - spacing_before) > ppt) {
+ spacing_before = line.spacing_before;
+ sb.Append("\\sb");
+ sb.Append(Int(spacing_before / ppt));
+ }
+
+ if (Math.Abs(line.line_spacing - line_spacing) > ppt) {
+ line_spacing = line.line_spacing;
+ sb.Append("\\sl");
+ sb.Append(Int(line.line_spacing / ppt));
+ }
+
+ if (line.line_spacing_multiple != line_spacing_multiple) {
+ line_spacing_multiple = line.line_spacing_multiple;
+ sb.Append("\\slmult");
+ sb.Append(line.line_spacing_multiple ? "1" : "0");
+ }
+
+ first_line_indent = -line.HangingIndent;
+ left_indent = line.Indent - first_line_indent;
+
+ if (Math.Abs(prev_left_indent - left_indent) > ppt) {
+ prev_left_indent = left_indent;
+ sb.Append("\\li");
+ sb.Append(Int(left_indent / ppt));
+ }
+
+ if (Math.Abs(prev_first_line_indent - first_line_indent) > ppt) {
+ prev_first_line_indent = first_line_indent;
+ sb.Append("\\fi");
+ sb.Append(Int(first_line_indent / ppt));
+ }
+
+ if (Math.Abs(line.right_indent - right_indent) > ppt) {
+ right_indent = line.right_indent;
+ sb.Append("\\ri");
+ sb.Append(Int(right_indent / ppt));
+ }
+
+ if (tabDiff.Count > 0) {
+ EmitTabStops(sb, tabDiff);
+ }
+
+ if (length != sb.Length) {
+ sb.Append(" ");
+ }
+ } else {
+ EmitPard (sb, fonts, line, tag, tabs, ppt);
+ sb.Append(" ");
+ LoadParaSettings (line, out line_alignment, out spacing_after, out spacing_before, out line_spacing,
+ out line_spacing_multiple, out left_indent, out prev_left_indent, out first_line_indent,
+ out prev_first_line_indent, out right_indent, out tabs);
+ }
+
+ while (pos < line_len && tag != null) {
length = sb.Length;
if (tag.Font != font) {
@@ -2052,14 +2782,65 @@ namespace System.Windows.Forms {
if (tag.Color != color) {
color = tag.Color;
- sb.Append(String.Format("\\cf{0}", colors.IndexOf(color)));
+ if (color != Color.Empty)
+ sb.Append(String.Format("\\cf{0}", colors.IndexOf(color) + 1));
+ else
+ sb.Append("\\cf0");
}
+
+ if (tag.BackColor != back_color) {
+ back_color = tag.BackColor;
+ if (back_color != Color.Empty)
+ sb.Append(String.Format("\\cb{0}", colors.IndexOf(back_color) + 1));
+ else
+ sb.Append("\\cb0");
+ }
+
+ if (tag.TextPosition != text_position) {
+ if (text_position != TextPositioning.Normal && tag.TextPosition != TextPositioning.Normal)
+ sb.Append("\\nosupersub");
+ // Technically it is possible to have subscripts in superscript and vise versa. But that's not what we've got.
+ text_position = tag.TextPosition;
+ switch (tag.TextPosition) {
+ case TextPositioning.Normal:
+ sb.Append("\\nosupersub");
+ break;
+ case TextPositioning.Subscript:
+ sb.Append("\\sub");
+ break;
+ case TextPositioning.Superscript:
+ sb.Append("\\super");
+ break;
+ }
+ }
+
+ if (tag.CharOffset != char_offset) {
+ char_offset = tag.CharOffset;
+ if (char_offset >= 0) {
+ sb.Append("\\up");
+ sb.Append(Int((char_offset / document.Dpi) * 144));
+ } else {
+ sb.Append("\\dn");
+ sb.Append(-Int((char_offset / document.Dpi) * 144));
+ }
+ }
+
+ if (tag.Visible != visible) {
+ visible = tag.Visible;
+ if (visible)
+ sb.Append("\\v0");
+ else
+ sb.Append("\\v");
+ }
+
if (length != sb.Length) {
sb.Append(" "); // Emit space to separate keywords from text
}
// Emit the string itself
- if (line_no != end_line.line_no) {
+ if (tag is PictureTag) {
+ EmitRtfPicture((PictureTag)tag, sb);
+ } else if (line_no != end_line.line_no) {
EmitRTFText(sb, tag.Line.text.ToString(pos, tag.Start + tag.Length - pos - 1));
} else {
if (end_pos < (tag.Start + tag.Length - 1)) {
@@ -2071,11 +2852,16 @@ namespace System.Windows.Forms {
}
pos = tag.Start + tag.Length - 1;
- tag = tag.Next;
+ do {
+ tag = tag.Next;
+ } while (tag != null && tag.IsTextTag && tag.Length == 0);
}
if (pos >= line.text.Length) {
if (line.ending != LineEnding.Wrap) {
- sb.Append("\\par");
+ // pos is incremented by the tag length, so it can be after where we want to finish.
+ // If we're on the last line we don't want to output \par when we're stopping before the end of the line.
+ if (!(line_no == end_line.line_no && pos > end_pos))
+ sb.Append("\\par");
sb.Append(Environment.NewLine);
}
}
@@ -2088,6 +2874,11 @@ namespace System.Windows.Forms {
return sb;
}
+
+ int Int (float f)
+ {
+ return (int)(f + 0.5f);
+ }
#endregion // Private Methods
}
}
diff --git a/mcs/class/System.Windows.Forms/System.Windows.Forms/TabStops.cs b/mcs/class/System.Windows.Forms/System.Windows.Forms/TabStops.cs
new file mode 100644
index 0000000000..6226024cdc
--- /dev/null
+++ b/mcs/class/System.Windows.Forms/System.Windows.Forms/TabStops.cs
@@ -0,0 +1,258 @@
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+// Copyright (c) 2015 Karl Scowen
+//
+// Authors:
+// Karl Scowen
+//
+//
+
+using System;
+using System.Collections.Generic;
+
+namespace System.Windows.Forms {
+ abstract class TabStop : IComparable {
+ float _pos = -1;
+
+ internal float Position {
+ get {
+ return _pos;
+ }
+
+ set {
+ if (_pos >= 0)
+ throw new InvalidOperationException ("Can't change Position once it has been set!");
+
+ _pos = value;
+ }
+ }
+
+ internal virtual float GetInitialWidth (Line line, int pos)
+ {
+ return 0;
+ }
+
+ internal abstract float CalculateRight (Line line, int pos);
+
+ public override bool Equals (object obj)
+ {
+ return obj.GetType () == this.GetType () && Math.Abs (((TabStop)obj).Position - Position) < 0.01;
+ }
+
+ public override int GetHashCode ()
+ {
+ return this.GetType ().GetHashCode () ^ Position.GetHashCode ();
+ }
+
+ public override string ToString ()
+ {
+ return string.Format ("[{0}: Position {1}]", this.GetType().Name, Position);
+ }
+
+ #region IComparable implementation
+ public int CompareTo (TabStop other)
+ {
+ return Position.CompareTo (other.Position);
+ }
+
+ #endregion
+ }
+
+ class LeftTabStop : TabStop {
+ internal LeftTabStop ()
+ {
+ }
+ internal LeftTabStop (float position)
+ {
+ Position = position;
+ }
+
+ internal override float GetInitialWidth (Line line, int pos)
+ {
+ return Position - line.widths[pos];
+ }
+
+ internal override float CalculateRight (Line line, int pos)
+ {
+ return Position;
+ }
+ }
+
+ class CentredTabStop : TabStop {
+ internal override float CalculateRight (Line line, int pos)
+ {
+ int endIndex = line.Text.IndexOfAny (new [] {'\t', '\n', '\r'}, pos + 1); // pos is this tab's index, so look after that.
+ if (endIndex < 0)
+ endIndex = line.text.Length;
+ float textWidth = line.widths [endIndex] - line.widths [pos + 1]; // We use the position after this tabstop, hence pos + 1.
+ return Math.Max (Position - textWidth / 2f, line.widths [pos]); // We want the width until the start of the text, which is before Position, but we can't go below zero.
+ }
+ }
+
+ internal class RightTabStop : TabStop {
+ internal override float CalculateRight (Line line, int pos)
+ {
+ int endIndex = line.Text.IndexOfAny (new [] {'\t', '\n', '\r'}, pos + 1); // pos is this tab's index, so look after that.
+ return calcWidth (line, pos, endIndex);
+ }
+
+ protected float calcWidth (Line line, int pos, int endIndex)
+ {
+ if (endIndex < 0)
+ endIndex = line.text.Length;
+ float textWidth = line.widths [endIndex] - line.widths [pos + 1]; // We use the position after this tabstop, hence pos + 1.
+ return Math.Max (Position - textWidth, line.widths [pos]);
+ }
+ }
+
+ internal class DecimalTabStop : RightTabStop {
+ internal override float CalculateRight (Line line, int pos)
+ {
+ // This is simply a right-align tabstop that regards the decimal as the end.
+ int endIndex = line.Text.IndexOfAny (new [] {'\t', '\n', '\r', '.'}, pos + 1); // pos is this tab's index, so look after that.
+ return calcWidth (line, pos, endIndex);
+ }
+ }
+
+ internal class TabStopCollection : IList {
+ SortedList tabs = new SortedList ();
+
+ public TabStopCollection Clone ()
+ {
+ var n = new TabStopCollection ();
+ foreach (var tab in tabs.Keys) {
+ n.tabs.Add (tab, null);
+ }
+ return n;
+ }
+
+ public int IndexOf (TabStop tab)
+ {
+ return tabs.IndexOfKey (tab);
+ }
+
+ public void Insert (int index, TabStop item)
+ {
+ throw new NotSupportedException ("Not relevant to sorted data!");
+ }
+
+ public void RemoveAt (int index)
+ {
+ tabs.RemoveAt (index);
+ }
+
+ public TabStop this [int index] {
+ get {
+ return tabs.Keys [index];
+ }
+ set {
+ throw new NotSupportedException ("Not relevant to sorted data!");
+ }
+ }
+
+ #region ICollection implementation
+ public void Add (TabStop tab)
+ {
+ tabs.Add (tab, null);
+ }
+
+ public void Clear ()
+ {
+ tabs.Clear ();
+ }
+
+ public bool Contains (TabStop tab)
+ {
+ return tabs.ContainsKey (tab);
+ }
+
+ public void CopyTo (TabStop[] array, int arrayIndex)
+ {
+ tabs.Keys.CopyTo (array, arrayIndex);
+ }
+
+ public TabStop[] ToArray ()
+ {
+ var arr = new TabStop [Count];
+ CopyTo (arr, 0);
+ return arr;
+ }
+
+ public int[] ToPosArray ()
+ {
+ var arr = new int [Count];
+ for (int i = 0; i < Count; i++) {
+ arr [i] = (int)this [i].Position;
+ }
+ return arr;
+ }
+
+ public bool Remove (TabStop tab)
+ {
+ return tabs.Remove (tab);
+ }
+
+ public int Count {
+ get {
+ return tabs.Count;
+ }
+ }
+
+ bool ICollection.IsReadOnly {
+ get {
+ return false;
+ }
+ }
+ #endregion
+
+ #region IEnumerable implementation
+ public IEnumerator GetEnumerator ()
+ {
+ return tabs.Keys.GetEnumerator ();
+ }
+ #endregion
+
+ #region IEnumerable implementation
+ System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator ()
+ {
+ return GetEnumerator ();
+ }
+ #endregion
+
+ public override bool Equals (object obj)
+ {
+ var other = obj as TabStopCollection;
+ if (other == null || other.Count != this.Count)
+ return false;
+
+ for (int i = 0; i < Count; i++) {
+ if (!tabs.Keys [i].Equals (other.tabs.Keys [i]))
+ return false;
+ }
+ return true;
+ }
+
+ public override int GetHashCode ()
+ {
+ // I don't like warnings, but I honestly don't care about the hash code.
+ return base.GetHashCode ();
+ }
+ }
+}
\ No newline at end of file
diff --git a/mcs/class/System.Windows.Forms/System.Windows.Forms/TableLayoutSettings.cs b/mcs/class/System.Windows.Forms/System.Windows.Forms/TableLayoutSettings.cs
index 9ff8e33e47..1eba622e6b 100644
--- a/mcs/class/System.Windows.Forms/System.Windows.Forms/TableLayoutSettings.cs
+++ b/mcs/class/System.Windows.Forms/System.Windows.Forms/TableLayoutSettings.cs
@@ -284,8 +284,8 @@ namespace System.Windows.Forms
{
if (control == null)
throw new ArgumentNullException ();
- if (value < -1)
- throw new ArgumentException ();
+ if (value < 1)
+ throw new ArgumentOutOfRangeException ();
column_spans[control] = value;
@@ -310,8 +310,8 @@ namespace System.Windows.Forms
{
if (control == null)
throw new ArgumentNullException ();
- if (value < -1)
- throw new ArgumentException ();
+ if (value < 1)
+ throw new ArgumentOutOfRangeException ();
row_spans[control] = value;
diff --git a/mcs/class/System.Windows.Forms/System.Windows.Forms/TextBoxBase.cs b/mcs/class/System.Windows.Forms/System.Windows.Forms/TextBoxBase.cs
index bda0cff694..b4440143b7 100644
--- a/mcs/class/System.Windows.Forms/System.Windows.Forms/TextBoxBase.cs
+++ b/mcs/class/System.Windows.Forms/System.Windows.Forms/TextBoxBase.cs
@@ -21,6 +21,7 @@
//
// Authors:
// Peter Bartok pbartok@novell.com
+// Karl Scowen
//
//
@@ -116,8 +117,7 @@ namespace System.Windows.Forms
current_link = null;
show_caret_w_selection = (this is TextBox);
document = new Document(this);
- document.WidthChanged += new EventHandler(document_WidthChanged);
- document.HeightChanged += new EventHandler(document_HeightChanged);
+ document.SizeChanged += new EventHandler (document_SizeChanged);
//document.CaretMoved += new EventHandler(CaretMoved);
document.Wrap = false;
click_last = DateTime.Now;
@@ -296,8 +296,7 @@ namespace System.Windows.Forms
if (value == actual_border_style)
return;
- if (actual_border_style != BorderStyle.Fixed3D || value != BorderStyle.Fixed3D)
- Invalidate ();
+ Invalidate ();
actual_border_style = value;
document.UpdateMargins ();
@@ -617,7 +616,10 @@ namespace System.Windows.Forms
Line line = null;
for (int i = 1; i <= document.Lines; i++) {
line = document.GetLine (i);
- sb.Append(line.text.ToString ());
+ if (i == document.Lines)
+ sb.Append(line.TextWithoutEnding ());
+ else
+ sb.Append(line.text.ToString ());
}
return sb.ToString();
@@ -1821,6 +1823,7 @@ namespace System.Windows.Forms
}
document.PositionCaret(e.X + document.ViewPortX, e.Y + document.ViewPortY);
+ document.DisplayCaret ();
if (dbliclick) {
switch (click_mode) {
@@ -2042,22 +2045,24 @@ namespace System.Windows.Forms
Invalidate();
}
- internal void CalculateScrollBars ()
+ internal bool CalculateScrollBars ()
{
- // FIXME - need separate calculations for center and right alignment
+ var old_canvas_width = canvas_width;
+
SizeControls ();
- if (document.Width >= document.ViewPortWidth) {
+ if (document.Width > document.ViewPortWidth) {
hscroll.SetValues (0, Math.Max (1, document.Width), -1,
document.ViewPortWidth < 0 ? 0 : document.ViewPortWidth);
if (document.multiline)
hscroll.Enabled = true;
} else {
hscroll.Enabled = false;
+ hscroll.Value = hscroll.Minimum;
hscroll.Maximum = document.ViewPortWidth;
}
- if (document.Height >= document.ViewPortHeight) {
+ if (document.Height > document.ViewPortHeight) {
vscroll.SetValues (0, Math.Max (1, document.Height), -1,
document.ViewPortHeight < 0 ? 0 : document.ViewPortHeight);
if (document.multiline)
@@ -2108,16 +2113,16 @@ namespace System.Windows.Forms
PositionControls ();
SizeControls (); //Update sizings now we've decided whats visible
+
+ return (canvas_width != old_canvas_width);
}
- private void document_WidthChanged (object sender, EventArgs e)
+ private void document_SizeChanged (object sender, Document.SizeChangedEventArgs e)
{
- CalculateScrollBars();
- }
-
- private void document_HeightChanged (object sender, EventArgs e)
- {
- CalculateScrollBars();
+ var canvas_width_changed = CalculateScrollBars ();
+ if (e.HeightChanged && canvas_width_changed)
+ CalculateDocument (); // Viewport has changed due to the document change, update the document.
+ // TODO: technically the opposite situation could happen too, where a document width change causes a change in canvas height.
}
private void ScrollLinks (int xChange, int yChange)
@@ -2310,40 +2315,41 @@ namespace System.Windows.Forms
// If the caret moves to the left outside the visible area, we jump the document into view, not just one
// character, but 1/3 of the width of the document
// If the caret moves to the right outside the visible area, we scroll just enough to keep the caret visible
+ // For comparison, in Windows 8.1 / .Net 4:
+ // Multiline: as above, but 1/4
+ // Single line: either direction with the cursors jumps 1/4
+ // Both are irrespective of alignment.
// Handle horizontal scrolling
- if (document.CaretLine.alignment == HorizontalAlignment.Left) {
- // Check if we moved out of view to the left
- if (pos.X < (document.ViewPortX)) {
- do {
- if ((hscroll.Value - document.ViewPortWidth / 3) >= hscroll.Minimum) {
- hscroll.SafeValueSet (hscroll.Value - document.ViewPortWidth / 3);
- } else {
- hscroll.Value = hscroll.Minimum;
- }
- } while (hscroll.Value > pos.X);
- }
-
- // Check if we moved out of view to the right
- if ((pos.X >= (document.ViewPortWidth + document.ViewPortX)) && (hscroll.Value != hscroll.Maximum)) {
- if ((pos.X - document.ViewPortWidth + 1) <= hscroll.Maximum) {
- if (pos.X - document.ViewPortWidth >= 0) {
- hscroll.SafeValueSet (pos.X - document.ViewPortWidth + 1);
- } else {
- hscroll.Value = 0;
- }
+ // Check if we moved out of view to the left
+ if (pos.X < (document.ViewPortX)) {
+ do {
+ var newVal = hscroll.Value - document.ViewPortWidth / 3 - 1; // - 1 so that we're guaranteed to move, even if document.ViewPortWidth is < 3.
+ if (newVal >= hscroll.Minimum) {
+ hscroll.SafeValueSet (newVal);
} else {
- hscroll.Value = hscroll.Maximum;
+ hscroll.Value = hscroll.Minimum;
}
- }
- } else if (document.CaretLine.alignment == HorizontalAlignment.Right) {
-// hscroll.Value = pos.X;
+ } while (hscroll.Value > pos.X);
+ }
-// if ((pos.X > (this.canvas_width + document.ViewPortX)) && (hscroll.Enabled && (hscroll.Value != hscroll.Maximum))) {
-// hscroll.Value = hscroll.Maximum;
-// }
- } else {
- // FIXME - implement center cursor alignment
+ // Check if we moved out of view to the right
+ if ((pos.X >= (document.ViewPortWidth + document.ViewPortX)) && (hscroll.Value != hscroll.Maximum)) {
+ int newVal;
+ if (Multiline) {
+ newVal = pos.X - document.ViewPortWidth + 1;
+ } else {
+ newVal = pos.X - document.ViewPortWidth * 2 / 3 + 1;
+ }
+ if (newVal <= hscroll.Maximum - document.ViewPortWidth + 1) {
+ if (newVal >= 0) {
+ hscroll.SafeValueSet (newVal);
+ } else {
+ hscroll.Value = 0;
+ }
+ } else {
+ hscroll.Value = hscroll.Maximum - document.ViewPortWidth + 1;
+ }
}
if (Text.Length > 0)
@@ -2353,7 +2359,10 @@ namespace System.Windows.Forms
return;
// Handle vertical scrolling
- height = document.CaretLine.Height + 1;
+ height = document.CaretLine.Height;
+
+ if (document.CaretLine.line_no < document.Lines)
+ height += 1; // Add a bit of room on the bottom if there are more lines - but don't scroll past the bottom when ther aren't.
if (pos.Y < document.ViewPortY)
vscroll.SafeValueSet (pos.Y);
diff --git a/mcs/class/System.Windows.Forms/System.Windows.Forms/TextControl.cs.REMOVED.git-id b/mcs/class/System.Windows.Forms/System.Windows.Forms/TextControl.cs.REMOVED.git-id
index abc6834f93..fbdeb41a45 100644
--- a/mcs/class/System.Windows.Forms/System.Windows.Forms/TextControl.cs.REMOVED.git-id
+++ b/mcs/class/System.Windows.Forms/System.Windows.Forms/TextControl.cs.REMOVED.git-id
@@ -1 +1 @@
-24859dbf3fb500cd8b45e0af3aeca79ebb6a1f29
\ No newline at end of file
+cf65c990cbf84419525f3ec10d349d46314cf7f2
\ No newline at end of file
diff --git a/mcs/class/System.Windows.Forms/System.Windows.Forms/ToolStripDropDown.cs b/mcs/class/System.Windows.Forms/System.Windows.Forms/ToolStripDropDown.cs
index 33eb3c50b9..2bf3249537 100644
--- a/mcs/class/System.Windows.Forms/System.Windows.Forms/ToolStripDropDown.cs
+++ b/mcs/class/System.Windows.Forms/System.Windows.Forms/ToolStripDropDown.cs
@@ -383,26 +383,36 @@ namespace System.Windows.Forms
[EditorBrowsable (EditorBrowsableState.Never)]
public new void Show ()
{
- Show (Location, DefaultDropDownDirection);
+ Show (Location);
+ }
+
+ public void Show (int x, int y)
+ {
+ Show (new Point (x, y));
}
public void Show (Point screenLocation)
{
+ SetOwnerControl (null);
Show (screenLocation, DefaultDropDownDirection);
}
-
+
+ public void Show (Control control, int x, int y)
+ {
+ Show (control, new Point (x, y));
+ }
+
public void Show (Control control, Point position)
+ {
+ Show (control, position, DefaultDropDownDirection);
+ }
+
+ public void Show (Control control, Point position, ToolStripDropDownDirection direction)
{
if (control == null)
throw new ArgumentNullException ("control");
-
- XplatUI.SetOwner (Handle, control.Handle);
- Show (control.PointToScreen (position), DefaultDropDownDirection);
- }
-
- public void Show (int x, int y)
- {
- Show (new Point (x, y), DefaultDropDownDirection);
+ SetOwnerControl (control);
+ Show (control.PointToScreen (position), direction);
}
public void Show (Point position, ToolStripDropDownDirection direction)
@@ -522,26 +532,17 @@ namespace System.Windows.Forms
this.OnOpened (EventArgs.Empty);
}
-
- public void Show (Control control, int x, int y)
- {
- if (control == null)
- throw new ArgumentNullException ("control");
- Show (control, new Point (x, y));
- }
-
- public void Show (Control control, Point position, ToolStripDropDownDirection direction)
- {
- if (control == null)
- throw new ArgumentNullException ("control");
-
- XplatUI.SetOwner (Handle, control.Handle);
- Show (control.PointToScreen (position), direction);
- }
#endregion
#region Protected Methods
+
+ protected virtual void SetOwnerControl (Control ownerControl)
+ {
+ var ownerControlHandle = (ownerControl == null) ? IntPtr.Zero : ownerControl.Handle;
+ XplatUI.SetOwner (Handle, ownerControlHandle);
+ }
+
protected override AccessibleObject CreateAccessibilityInstance ()
{
return new ToolStripDropDownAccessibleObject (this);
diff --git a/mcs/class/System.Windows.Forms/System.Windows.Forms/ToolStripMenuItem.cs b/mcs/class/System.Windows.Forms/System.Windows.Forms/ToolStripMenuItem.cs
index 4df3397908..7a60ac82f2 100644
--- a/mcs/class/System.Windows.Forms/System.Windows.Forms/ToolStripMenuItem.cs
+++ b/mcs/class/System.Windows.Forms/System.Windows.Forms/ToolStripMenuItem.cs
@@ -419,10 +419,8 @@ namespace System.Windows.Forms
if (item.Owner == null)
return null;
- if (item.Owner is ContextMenuStrip) {
- Control container = ((ContextMenuStrip)item.Owner).container;
- return container == null ? null : container.TopLevelControl;
- }
+ if (item.Owner is ContextMenuStrip ownerContextMenuStrip)
+ return ownerContextMenuStrip.SourceControl?.TopLevelControl;
// MainMenuStrip
return item.Owner.TopLevelControl;
diff --git a/mcs/class/System.Windows.Forms/System.Windows.Forms/TreeView.cs b/mcs/class/System.Windows.Forms/System.Windows.Forms/TreeView.cs
index 74d77f5f80..a66f82ccc3 100644
--- a/mcs/class/System.Windows.Forms/System.Windows.Forms/TreeView.cs
+++ b/mcs/class/System.Windows.Forms/System.Windows.Forms/TreeView.cs
@@ -1419,7 +1419,7 @@ namespace System.Windows.Forms {
private void Draw (Rectangle clip, Graphics dc)
{
- dc.FillRectangle (ThemeEngine.Current.ResPool.GetSolidBrush (BackColor), clip);
+ dc.FillRectangle (BackColorBrush, clip);
if (dash == null)
CreateDashPen ();
@@ -1670,7 +1670,6 @@ namespace System.Windows.Forms {
{
if (!full_row_select || show_lines)
DrawSelectionAndFocus(node, dc, node.Bounds);
-
Font font = node.NodeFont;
if (node.NodeFont == null)
@@ -1691,7 +1690,7 @@ namespace System.Windows.Forms {
int middle = y + (ActualItemHeight / 2);
if (full_row_select && !show_lines) {
- Rectangle r = new Rectangle (1, y, ViewportRectangle.Width - 2, ActualItemHeight);
+ var r = new Rectangle (1, y, ViewportRectangle.Width - 2, ActualItemHeight);
DrawSelectionAndFocus (node, dc, r);
}
@@ -1716,26 +1715,25 @@ namespace System.Windows.Forms {
}
if (draw_mode != TreeViewDrawMode.Normal) {
- dc.FillRectangle (Brushes.White, node.Bounds);
- TreeNodeStates tree_node_state = TreeNodeStates.Default;;
+ dc.FillRectangle (BackColorBrush, node.Bounds);
+
+ var tree_node_state = TreeNodeStates.Default;;
if (node.IsSelected)
tree_node_state = TreeNodeStates.Selected;
if (node.Checked)
tree_node_state |= TreeNodeStates.Checked;
if (node == focused_node)
tree_node_state |= TreeNodeStates.Focused;
- Rectangle node_bounds = node.Bounds;
- if (draw_mode == TreeViewDrawMode.OwnerDrawText) {
- node_bounds.X += 3;
- node_bounds.Y += 1;
- } else {
+
+ var node_bounds = node.Bounds;
+ if (draw_mode != TreeViewDrawMode.OwnerDrawText) {
node_bounds.X = 0;
node_bounds.Width = Width;
}
- DrawTreeNodeEventArgs e = new DrawTreeNodeEventArgs (dc, node, node_bounds, tree_node_state);
+ var e = new DrawTreeNodeEventArgs (dc, node, node_bounds, tree_node_state);
- OnDrawNode (e);
+ OnDrawNode (e);
if (!e.DrawDefault)
return;
}
diff --git a/mcs/class/System.Windows.Forms/System.Windows.Forms/X11Keyboard.cs b/mcs/class/System.Windows.Forms/System.Windows.Forms/X11Keyboard.cs
index 74ab0cffad..d2de95a510 100644
--- a/mcs/class/System.Windows.Forms/System.Windows.Forms/X11Keyboard.cs
+++ b/mcs/class/System.Windows.Forms/System.Windows.Forms/X11Keyboard.cs
@@ -416,6 +416,11 @@ namespace System.Windows.Forms {
return 0;
}
+ if (vkey == 0) {
+ buffer = String.Empty;
+ return 0;
+ }
+
XEvent e = new XEvent ();
e.AnyEvent.type = XEventName.KeyPress;
e.KeyEvent.display = display;
@@ -440,6 +445,15 @@ namespace System.Windows.Forms {
e.KeyEvent.state |= AltGrMask;
+ if ((vkey >= (int) VirtualKeys.VK_NUMPAD0) && (vkey <= (int) VirtualKeys.VK_NUMPAD9))
+ e.KeyEvent.keycode = XKeysymToKeycode (display, vkey - (int) VirtualKeys.VK_NUMPAD0 + (int) KeypadKeys.XK_KP_0);
+
+ if (vkey == (int) VirtualKeys.VK_DECIMAL)
+ e.KeyEvent.keycode = XKeysymToKeycode (display, (int) KeypadKeys.XK_KP_Decimal);
+
+ if (vkey == (int) VirtualKeys.VK_SEPARATOR)
+ e.KeyEvent.keycode = XKeysymToKeycode(display, (int) KeypadKeys.XK_KP_Separator);
+
for (int keyc = min_keycode; (keyc <= max_keycode) && (e.KeyEvent.keycode == 0); keyc++) {
// find keycode that could have generated this vkey
if ((keyc2vkey [keyc] & 0xFF) == vkey) {
@@ -452,15 +466,6 @@ namespace System.Windows.Forms {
}
}
- if ((vkey >= (int) VirtualKeys.VK_NUMPAD0) && (vkey <= (int) VirtualKeys.VK_NUMPAD9))
- e.KeyEvent.keycode = XKeysymToKeycode (display, vkey - (int) VirtualKeys.VK_NUMPAD0 + (int) KeypadKeys.XK_KP_0);
-
- if (vkey == (int) VirtualKeys.VK_DECIMAL)
- e.KeyEvent.keycode = XKeysymToKeycode (display, (int) KeypadKeys.XK_KP_Decimal);
-
- if (vkey == (int) VirtualKeys.VK_SEPARATOR)
- e.KeyEvent.keycode = XKeysymToKeycode(display, (int) KeypadKeys.XK_KP_Separator);
-
if (e.KeyEvent.keycode == 0 && vkey != (int) VirtualKeys.VK_NONAME) {
// And I couldn't find the keycode so i returned the vkey and was like whatever
Console.Error.WriteLine ("unknown virtual key {0:X}", vkey);
@@ -1213,7 +1218,7 @@ namespace System.Windows.Forms {
if (xic != IntPtr.Zero && have_Xutf8LookupString && xevent.type == XEventName.KeyPress) {
do {
try {
- res = Xutf8LookupString (xic, ref xevent, lookup_byte_buffer, 100, out keysym_res, out status);
+ res = Xutf8LookupString (xic, ref xevent, lookup_byte_buffer, lookup_byte_buffer.Length, out keysym_res, out status);
} catch (EntryPointNotFoundException) {
have_Xutf8LookupString = false;
@@ -1231,8 +1236,10 @@ namespace System.Windows.Forms {
return s.Length;
} else {
IntPtr statusPtr = IntPtr.Zero;
+ res = XLookupString (ref xevent, lookup_byte_buffer, len, out keysym_res, out statusPtr);
lookup_buffer.Length = 0;
- res = XLookupString (ref xevent, lookup_buffer, len, out keysym_res, out statusPtr);
+ string s = Encoding.ASCII.GetString (lookup_byte_buffer, 0, res);
+ lookup_buffer.Append (s);
keysym = (XKeySym) keysym_res.ToInt32 ();
return res;
}
@@ -1298,7 +1305,7 @@ namespace System.Windows.Forms {
private static extern bool XSetLocaleModifiers (string mods);
[DllImport ("libX11")]
- internal extern static int XLookupString(ref XEvent xevent, StringBuilder buffer, int num_bytes, out IntPtr keysym, out IntPtr status);
+ internal extern static int XLookupString(ref XEvent xevent, byte [] buffer, int num_bytes, out IntPtr keysym, out IntPtr status);
[DllImport ("libX11")]
internal extern static int Xutf8LookupString(IntPtr xic, ref XEvent xevent, byte [] buffer, int num_bytes, out IntPtr keysym, out XLookupStatus status);
diff --git a/mcs/class/System.Windows.Forms/System.Windows.Forms/X11Structs.cs b/mcs/class/System.Windows.Forms/System.Windows.Forms/X11Structs.cs
index cfac29e9be..42eb4f89fd 100644
--- a/mcs/class/System.Windows.Forms/System.Windows.Forms/X11Structs.cs
+++ b/mcs/class/System.Windows.Forms/System.Windows.Forms/X11Structs.cs
@@ -1696,6 +1696,16 @@ namespace System.Windows.Forms {
public short Y;
}
+ [StructLayout (LayoutKind.Sequential)]
+ [Serializable]
+ internal struct XRectangle
+ {
+ public short X;
+ public short Y;
+ public ushort Width;
+ public ushort Height;
+ }
+
[StructLayout (LayoutKind.Sequential)]
[Serializable]
internal class XIMCallback
@@ -1818,4 +1828,25 @@ namespace System.Windows.Forms {
public short width;
public short height;
}
+
+ internal enum XShapeOperation {
+ ShapeSet,
+ ShapeUnion,
+ ShapeIntersect,
+ ShapeSubtract,
+ ShapeInvert
+ }
+
+ internal enum XShapeKind {
+ ShapeBounding,
+ ShapeClip,
+ //ShapeInput // Not usable without more imports
+ }
+
+ internal enum XOrdering {
+ Unsorted,
+ YSorted,
+ YXSorted,
+ YXBanded
+ }
}
diff --git a/mcs/class/System.Windows.Forms/System.Windows.Forms/XplatUIX11.cs.REMOVED.git-id b/mcs/class/System.Windows.Forms/System.Windows.Forms/XplatUIX11.cs.REMOVED.git-id
index b3021b7143..c9b679f00a 100644
--- a/mcs/class/System.Windows.Forms/System.Windows.Forms/XplatUIX11.cs.REMOVED.git-id
+++ b/mcs/class/System.Windows.Forms/System.Windows.Forms/XplatUIX11.cs.REMOVED.git-id
@@ -1 +1 @@
-cde5f7ae773f572f136e3d20f48827e6cf964100
\ No newline at end of file
+2a5355160824edaa6cfd0e82930b4e1519809a8c
\ No newline at end of file
diff --git a/mcs/class/System.Windows.Forms/System.Windows.Forms_test.dll.sources b/mcs/class/System.Windows.Forms/System.Windows.Forms_test.dll.sources
index a4045f284e..c9eb689855 100644
--- a/mcs/class/System.Windows.Forms/System.Windows.Forms_test.dll.sources
+++ b/mcs/class/System.Windows.Forms/System.Windows.Forms_test.dll.sources
@@ -26,6 +26,7 @@ System.Windows.Forms/Common.cs
System.Windows.Forms/CommonDialogsTest.cs
System.Windows.Forms/ContainerControlTest.cs
System.Windows.Forms/ContextMenuTest.cs
+System.Windows.Forms/ContextMenuStripTest.cs
System.Windows.Forms/ControlBindingsCollectionTest.cs
System.Windows.Forms/ControlBindingsConverterTest.cs
System.Windows.Forms/ControlCollectionTest.cs
diff --git a/mcs/class/System.Windows.Forms/Test/System.Windows.Forms/ComboBoxTest.cs b/mcs/class/System.Windows.Forms/Test/System.Windows.Forms/ComboBoxTest.cs
index 530e5717de..252068a95c 100644
--- a/mcs/class/System.Windows.Forms/Test/System.Windows.Forms/ComboBoxTest.cs
+++ b/mcs/class/System.Windows.Forms/Test/System.Windows.Forms/ComboBoxTest.cs
@@ -732,6 +732,22 @@ namespace MonoTests.System.Windows.Forms
Assert.IsTrue (cmbbox.ItemHeight > 0, "#21");
}
+ [Test]
+ public void RemoveAt_SelectedIndex ()
+ {
+ ComboBox cmbbox = new ComboBox ();
+ cmbbox.Items.AddRange (new object[] {"1", "2", "3"});
+ cmbbox.SelectedIndex = 0;
+ cmbbox.Items.RemoveAt (0);
+ Assert.AreEqual (0, cmbbox.SelectedIndex, "#A1");
+
+ cmbbox.Items.Clear ();
+ cmbbox.Items.AddRange (new object[] {"1", "2", "3"});
+ cmbbox.SelectedIndex = 2;
+ cmbbox.Items.RemoveAt (0);
+ Assert.AreEqual (1, cmbbox.SelectedIndex, "#A2");
+ }
+
//
// Exceptions
//
diff --git a/mcs/class/System.Windows.Forms/Test/System.Windows.Forms/ContextMenuStripTest.cs b/mcs/class/System.Windows.Forms/Test/System.Windows.Forms/ContextMenuStripTest.cs
new file mode 100644
index 0000000000..f5f62d6d33
--- /dev/null
+++ b/mcs/class/System.Windows.Forms/Test/System.Windows.Forms/ContextMenuStripTest.cs
@@ -0,0 +1,166 @@
+//
+// ContextMenuTestStrip.cs: Test cases for ContextMenuStrip
+//
+// Author:
+// Nikita Voronchev (nikita.voronchev@ru.axxonsoft.com)
+//
+// (C) 2020 AxxonSoft (https://www.axxonsoft.com/)
+//
+
+using System;
+using System.Drawing;
+using System.Windows.Forms;
+using NUnit.Framework;
+
+namespace MonoTests.System.Windows.Forms
+{
+ // TODO:
+ // -- Tests around `OwnerItem`.
+
+ [TestFixture]
+ public class ContextMenuStripTest : TestHelper
+ {
+ static TestExtendedForm form;
+ static Label explicitMenuSrcLabel;
+ static TestExtendedLabel testExtendedLabel;
+ static ContextMenuStrip contextMenuStrip;
+
+ static readonly Lazy[] testCaseExplicitMenuSources = new Lazy[] {
+ new Lazy(() => null),
+ new Lazy(() => explicitMenuSrcLabel)
+ }; // Involve `Lazy` to use `TestCaseSource` attribute.
+
+ static readonly Lazy[] testCaseAssociatedControls = new Lazy[] {
+ new Lazy(() => form),
+ new Lazy(() => testExtendedLabel)
+ }; // Involve `Lazy` to use `TestCaseSource` attribute.
+
+ [SetUp]
+ public void SetUp()
+ {
+ form = new TestExtendedForm ();
+ explicitMenuSrcLabel = new Label ();
+ testExtendedLabel = new TestExtendedLabel ();
+ contextMenuStrip = new ContextMenuStrip ();
+
+ form.ShowInTaskbar = false;
+ form.Controls.Add (explicitMenuSrcLabel);
+ form.Controls.Add (testExtendedLabel);
+ }
+
+ [TearDown]
+ public void TearDown()
+ {
+ contextMenuStrip.Close ();
+ form.Controls.Clear ();
+
+ contextMenuStrip.Dispose ();
+ testExtendedLabel.Dispose ();
+ explicitMenuSrcLabel.Dispose ();
+ form.Dispose ();
+ }
+
+ [Test, TestCaseSource ("testCaseExplicitMenuSources")]
+ public void DirectShowTest01 (Lazy explicitMenuSrc)
+ {
+ AssingOwner (explicitMenuSrc.Value);
+ contextMenuStrip.Show ();
+ Assert.IsNull (contextMenuStrip.SourceControl, "SourceControl");
+ }
+
+ [Test, TestCaseSource ("testCaseExplicitMenuSources")]
+ public void DirectShowTest02 (Lazy explicitMenuSrc)
+ {
+ AssingOwner (explicitMenuSrc.Value);
+ contextMenuStrip.Show (form, Point.Empty);
+ Assert.AreEqual (form, contextMenuStrip.SourceControl, "SourceControl");
+ }
+
+ [Test, TestCaseSource ("testCaseExplicitMenuSources")]
+ public void DirectShowTest03 (Lazy explicitMenuSrc)
+ {
+ AssingOwner (explicitMenuSrc.Value);
+ contextMenuStrip.Show (explicitMenuSrcLabel, Point.Empty);
+ Assert.AreEqual (explicitMenuSrcLabel, contextMenuStrip.SourceControl, "SourceControl");
+ }
+
+ [Test, TestCaseSource ("testCaseExplicitMenuSources")]
+ public void DirectShowTest04 (Lazy explicitMenuSrc)
+ {
+ AssingOwner (explicitMenuSrc.Value);
+ contextMenuStrip.Show (testExtendedLabel, Point.Empty);
+ Assert.AreEqual (testExtendedLabel, contextMenuStrip.SourceControl, "SourceControl");
+ }
+
+ [Test, TestCaseSource ("testCaseExplicitMenuSources")]
+ public void DirectShowTest05 (Lazy explicitMenuSrc)
+ {
+ AssingOwner (explicitMenuSrc.Value);
+ contextMenuStrip.Show (form, Point.Empty);
+ contextMenuStrip.Close ();
+ contextMenuStrip.Show ();
+ Assert.IsNull (contextMenuStrip.SourceControl, "SourceControl");
+ }
+
+ [Test, TestCaseSource("testCaseAssociatedControls")]
+ public void ContextShowTest (Lazy associatedControl)
+ {
+ bool menuHasBeenOpened = false;
+ contextMenuStrip.Opened += (sender, args) => { menuHasBeenOpened = true; };
+
+ var assCtrl = associatedControl.Value;
+ assCtrl.ContextMenuStrip = contextMenuStrip;
+
+ Assert.IsFalse (menuHasBeenOpened, "menuHasBeenOpened");
+ assCtrl.EmulateWmContextMenu ();
+ Assert.IsTrue (menuHasBeenOpened, "menuHasBeenOpened");
+ Assert.AreEqual (assCtrl, contextMenuStrip.SourceControl, "SourceControl");
+
+ }
+
+ #region Helpers
+
+ private void AssingOwner (Control explicitMenuSrc)
+ {
+ if (explicitMenuSrc != null)
+ explicitMenuSrc.ContextMenuStrip = contextMenuStrip;
+ }
+
+ public interface ITestExtendedControl
+ {
+ void EmulateWmContextMenu ();
+ ContextMenuStrip ContextMenuStrip { set; }
+ }
+
+ class TestExtendedForm : Form, ITestExtendedControl
+ {
+ public void EmulateWmContextMenu ()
+ {
+ var m = TestExtendedControlHelper.MakeWmContextMenu ();
+ WndProc (ref m);
+ }
+ }
+
+ class TestExtendedLabel : Label, ITestExtendedControl
+ {
+ public void EmulateWmContextMenu ()
+ {
+ var m = TestExtendedControlHelper.MakeWmContextMenu ();
+ WndProc (ref m);
+ }
+ }
+
+ static class TestExtendedControlHelper
+ {
+ public static Message MakeWmContextMenu ()
+ {
+ return new Message () {
+ Msg = (int)Msg.WM_CONTEXTMENU,
+ LParam = IntPtr.Zero
+ };
+ }
+ }
+
+ #endregion // end of Helpers
+ }
+}
diff --git a/mcs/class/System/Assembly/AssemblyInfo.cs b/mcs/class/System/Assembly/AssemblyInfo.cs
index bfe1e6a7b9..15e072796c 100644
--- a/mcs/class/System/Assembly/AssemblyInfo.cs
+++ b/mcs/class/System/Assembly/AssemblyInfo.cs
@@ -90,6 +90,10 @@ using System.Runtime.InteropServices;
[assembly: InternalsVisibleTo ("Mono.Android, PublicKey=0024000004800000940000000602000000240000525341310004000011000000438ac2a5acfbf16cbd2b2b47a62762f273df9cb2795ceccdf77d10bf508e69e7a362ea7a45455bbf3ac955e1f2e2814f144e5d817efc4c6502cc012df310783348304e3ae38573c6d658c234025821fda87a0be8a0d504df564e2c93b2b878925f42503e9d54dfef9f9586d9e6f38a305769587b1de01f6c0410328b2c9733db")]
#endif
+#if WASM
+[assembly: InternalsVisibleTo ("WebAssembly.Net.WebSockets, PublicKey=00240000048000009400000006020000002400005253413100040000010001004b86c4cb78549b34bab61a3b1800e23bfeb5b3ec390074041536a7e3cbd97f5f04cf0f857155a8928eaa29ebfd11cfbbad3ba70efea7bda3226c6a8d370a4cd303f714486b6ebc225985a638471e6ef571cc92a4613c00b8fa65d61ccee0cbe5f36330c9a01f4183559f1bef24cc2917c6d913e3a541333a1d05d9bed22b38cb")]
+#endif
+
[assembly: TypeForwardedTo (typeof (System.Collections.Generic.Stack<>))]
[assembly: TypeForwardedTo (typeof (System.Collections.Generic.Queue<>))]
[assembly: TypeForwardedTo (typeof (System.IO.Enumeration.FileSystemName))]
diff --git a/mcs/class/System/Makefile b/mcs/class/System/Makefile
index f3252e4cc3..ed30dfc6fc 100644
--- a/mcs/class/System/Makefile
+++ b/mcs/class/System/Makefile
@@ -116,6 +116,10 @@ API_BIN_REFS += System.Configuration
LIB_MCS_FLAGS += -d:CONFIGURATION_DEP
endif
+ifeq (wasm,$(PROFILE))
+API_BIN_REFS += WebAssembly.Net.WebSockets
+endif
+
EXTRA_DISTFILES = \
Test/test-config-file \
Test/System.Security.Cryptography.X509Certificates/pkits/Makefile \
diff --git a/mcs/class/System/System.Net.NetworkInformation/AixIPInterfaceProperties.cs b/mcs/class/System/System.Net.NetworkInformation/AixIPInterfaceProperties.cs
index 15a15b241a..d5f0e30d01 100644
--- a/mcs/class/System/System.Net.NetworkInformation/AixIPInterfaceProperties.cs
+++ b/mcs/class/System/System.Net.NetworkInformation/AixIPInterfaceProperties.cs
@@ -54,13 +54,13 @@ namespace System.Net.NetworkInformation {
}
[MethodImplAttribute(MethodImplOptions.InternalCall)]
- private extern static bool ParseRouteInfo_internal(string iface, out string[] gw_addr_list);
+ private extern static bool ParseRouteInfo_icall (string iface, out string[] gw_addr_list);
public override GatewayIPAddressInformationCollection GatewayAddresses {
get {
var gateways = new IPAddressCollection ();
string[] gw_addrlist;
- if (!ParseRouteInfo_internal (this.iface.Name.ToString(), out gw_addrlist))
+ if (!ParseRouteInfo_icall (this.iface.Name.ToString(), out gw_addrlist))
return new GatewayIPAddressInformationCollection ();
for(int i=0; i (asyncResult);
+ }
+
+ public override IAsyncResult BeginWrite (byte[] buffer, int offset, int count, AsyncCallback callback, object state)
+ {
+ return TaskToApm.Begin (Impl.WriteAsync (buffer, offset, count), callback, state);
+ }
+
+ public override void EndWrite (IAsyncResult asyncResult)
+ {
+ TaskToApm.End (asyncResult);
+ }
+
#else // !SECURITY_DEP
const string EXCEPTION_MESSAGE = "System.Net.Security.SslStream is not supported on the current platform.";
diff --git a/mcs/class/System/System.Net.Sockets/SafeSocketHandle.cs b/mcs/class/System/System.Net.Sockets/SafeSocketHandle.cs
index 25da5dcbba..6c77621bb3 100644
--- a/mcs/class/System/System.Net.Sockets/SafeSocketHandle.cs
+++ b/mcs/class/System/System.Net.Sockets/SafeSocketHandle.cs
@@ -44,10 +44,10 @@ namespace System.Net.Sockets {
{
int error = 0;
- Socket.Blocking_internal (handle, false, out error);
+ Socket.Blocking_icall (handle, false, out error);
#if FULL_AOT_DESKTOP
/* It's only for platforms that do not have working syscall abort mechanism, like WatchOS and TvOS */
- Socket.Shutdown_internal (handle, SocketShutdown.Both, out error);
+ Socket.Shutdown_icall (handle, SocketShutdown.Both, out error);
#endif
if (blocking_threads != null) {
@@ -93,7 +93,7 @@ namespace System.Net.Sockets {
}
}
- Socket.Close_internal (handle, out error);
+ Socket.Close_icall (handle, out error);
return error == 0;
}
diff --git a/mcs/class/System/System.Net.Sockets/Socket.cs b/mcs/class/System/System.Net.Sockets/Socket.cs
index b52f42dc96..f55cf33653 100644
--- a/mcs/class/System/System.Net.Sockets/Socket.cs
+++ b/mcs/class/System/System.Net.Sockets/Socket.cs
@@ -56,7 +56,7 @@ namespace System.Net.Sockets
const string TIMEOUT_EXCEPTION_MSG = "A connection attempt failed because the connected party did not properly respond" +
"after a period of time, or established connection failed because connected host has failed to respond";
- /* true if we called Close_internal */
+ /* true if we called Close_icall */
bool is_closed;
bool is_listening;
@@ -163,7 +163,7 @@ namespace System.Net.Sockets
/* Creates a new system socket, returning the handle */
[MethodImplAttribute(MethodImplOptions.InternalCall)]
- extern IntPtr Socket_internal (AddressFamily family, SocketType type, ProtocolType proto, out int error);
+ extern static IntPtr Socket_icall (AddressFamily family, SocketType type, ProtocolType proto, out int error);
#endregion
@@ -188,7 +188,7 @@ namespace System.Net.Sockets
bool release = false;
try {
safeHandle.DangerousAddRef (ref release);
- return Available_internal (safeHandle.DangerousGetHandle (), out error);
+ return Available_icall (safeHandle.DangerousGetHandle (), out error);
} finally {
if (release)
safeHandle.DangerousRelease ();
@@ -197,7 +197,7 @@ namespace System.Net.Sockets
/* Returns the amount of data waiting to be read on socket */
[MethodImplAttribute(MethodImplOptions.InternalCall)]
- extern static int Available_internal (IntPtr socket, out int error);
+ extern static int Available_icall (IntPtr socket, out int error);
// FIXME: import from referencesource
public bool EnableBroadcast {
@@ -296,7 +296,7 @@ namespace System.Net.Sockets
bool release = false;
try {
safeHandle.DangerousAddRef (ref release);
- return LocalEndPoint_internal (safeHandle.DangerousGetHandle (), family, out error);
+ return LocalEndPoint_icall (safeHandle.DangerousGetHandle (), family, out error);
} finally {
if (release)
safeHandle.DangerousRelease ();
@@ -305,7 +305,7 @@ namespace System.Net.Sockets
/* Returns the local endpoint details in addr and port */
[MethodImplAttribute(MethodImplOptions.InternalCall)]
- extern static SocketAddress LocalEndPoint_internal (IntPtr socket, int family, out int error);
+ extern static SocketAddress LocalEndPoint_icall (IntPtr socket, int family, out int error);
public bool Blocking {
get { return is_blocking; }
@@ -327,7 +327,7 @@ namespace System.Net.Sockets
bool release = false;
try {
safeHandle.DangerousAddRef (ref release);
- Blocking_internal (safeHandle.DangerousGetHandle (), block, out error);
+ Blocking_icall (safeHandle.DangerousGetHandle (), block, out error);
} finally {
if (release)
safeHandle.DangerousRelease ();
@@ -335,7 +335,7 @@ namespace System.Net.Sockets
}
[MethodImplAttribute(MethodImplOptions.InternalCall)]
- internal extern static void Blocking_internal(IntPtr socket, bool block, out int error);
+ internal extern static void Blocking_icall (IntPtr socket, bool block, out int error);
public bool Connected {
get { return is_connected; }
@@ -382,7 +382,7 @@ namespace System.Net.Sockets
bool release = false;
try {
safeHandle.DangerousAddRef (ref release);
- return RemoteEndPoint_internal (safeHandle.DangerousGetHandle (), family, out error);
+ return RemoteEndPoint_icall (safeHandle.DangerousGetHandle (), family, out error);
} finally {
if (release)
safeHandle.DangerousRelease ();
@@ -391,7 +391,7 @@ namespace System.Net.Sockets
/* Returns the remote endpoint details in addr and port */
[MethodImplAttribute(MethodImplOptions.InternalCall)]
- extern static SocketAddress RemoteEndPoint_internal (IntPtr socket, int family, out int error);
+ extern static SocketAddress RemoteEndPoint_icall (IntPtr socket, int family, out int error);
internal SafeHandle SafeHandle
{
@@ -419,7 +419,7 @@ namespace System.Net.Sockets
Socket [] sockets = list.ToArray ();
int error;
- Select_internal (ref sockets, microSeconds, out error);
+ Select_icall (ref sockets, microSeconds, out error);
if (error != 0)
throw new SocketException (error);
@@ -480,7 +480,7 @@ namespace System.Net.Sockets
}
[MethodImplAttribute(MethodImplOptions.InternalCall)]
- extern static void Select_internal (ref Socket [] sockets, int microSeconds, out int error);
+ extern static void Select_icall (ref Socket [] sockets, int microSeconds, out int error);
#endregion
@@ -514,7 +514,7 @@ namespace System.Net.Sockets
bool release = false;
try {
safeHandle.DangerousAddRef (ref release);
- return Poll_internal (safeHandle.DangerousGetHandle (), mode, timeout, out error);
+ return Poll_icall (safeHandle.DangerousGetHandle (), mode, timeout, out error);
} finally {
if (release)
safeHandle.DangerousRelease ();
@@ -522,7 +522,7 @@ namespace System.Net.Sockets
}
[MethodImplAttribute(MethodImplOptions.InternalCall)]
- extern static bool Poll_internal (IntPtr socket, SelectMode mode, int timeout, out int error);
+ extern static bool Poll_icall (IntPtr socket, SelectMode mode, int timeout, out int error);
#endregion
@@ -750,7 +750,7 @@ namespace System.Net.Sockets
{
try {
safeHandle.RegisterForBlockingSyscall ();
- var ret = Accept_internal (safeHandle.DangerousGetHandle (), out error, blocking);
+ var ret = Accept_icall (safeHandle.DangerousGetHandle (), out error, blocking);
return new SafeSocketHandle (ret, true);
} finally {
safeHandle.UnRegisterForBlockingSyscall ();
@@ -759,7 +759,7 @@ namespace System.Net.Sockets
/* Creates a new system socket, returning the handle */
[MethodImplAttribute(MethodImplOptions.InternalCall)]
- extern static IntPtr Accept_internal (IntPtr sock, out int error, bool blocking);
+ extern static IntPtr Accept_icall (IntPtr sock, out int error, bool blocking);
#endregion
@@ -797,7 +797,7 @@ namespace System.Net.Sockets
bool release = false;
try {
safeHandle.DangerousAddRef (ref release);
- Bind_internal (safeHandle.DangerousGetHandle (), sa, out error);
+ Bind_icall (safeHandle.DangerousGetHandle (), sa, out error);
} finally {
if (release)
safeHandle.DangerousRelease ();
@@ -806,7 +806,7 @@ namespace System.Net.Sockets
// Creates a new system socket, returning the handle
[MethodImplAttribute(MethodImplOptions.InternalCall)]
- private extern static void Bind_internal(IntPtr sock, SocketAddress sa, out int error);
+ private extern static void Bind_icall (IntPtr sock, SocketAddress sa, out int error);
#endregion
@@ -833,7 +833,7 @@ namespace System.Net.Sockets
bool release = false;
try {
safeHandle.DangerousAddRef (ref release);
- Listen_internal (safeHandle.DangerousGetHandle (), backlog, out error);
+ Listen_icall (safeHandle.DangerousGetHandle (), backlog, out error);
} finally {
if (release)
safeHandle.DangerousRelease ();
@@ -841,7 +841,7 @@ namespace System.Net.Sockets
}
[MethodImplAttribute(MethodImplOptions.InternalCall)]
- extern static void Listen_internal (IntPtr sock, int backlog, out int error);
+ extern static void Listen_icall (IntPtr sock, int backlog, out int error);
#endregion
@@ -1124,7 +1124,7 @@ namespace System.Net.Sockets
// an error. Better to just close the socket and move on.
sockares.socket.connect_in_progress = false;
sockares.socket.m_Handle.Dispose ();
- sockares.socket.m_Handle = new SafeSocketHandle (sockares.socket.Socket_internal (sockares.socket.addressFamily, sockares.socket.socketType, sockares.socket.protocolType, out error), true);
+ sockares.socket.m_Handle = new SafeSocketHandle (Socket_icall (sockares.socket.addressFamily, sockares.socket.socketType, sockares.socket.protocolType, out error), true);
if (error != 0) {
sockares.Complete (new SocketException (error), true);
return false;
@@ -1218,7 +1218,7 @@ namespace System.Net.Sockets
{
try {
safeHandle.RegisterForBlockingSyscall ();
- Connect_internal (safeHandle.DangerousGetHandle (), sa, out error, blocking);
+ Connect_icall (safeHandle.DangerousGetHandle (), sa, out error, blocking);
} finally {
safeHandle.UnRegisterForBlockingSyscall ();
}
@@ -1226,7 +1226,7 @@ namespace System.Net.Sockets
/* Connects to the remote address */
[MethodImplAttribute(MethodImplOptions.InternalCall)]
- extern static void Connect_internal(IntPtr sock, SocketAddress sa, out int error, bool blocking);
+ extern static void Connect_icall (IntPtr sock, SocketAddress sa, out int error, bool blocking);
/* Returns :
* - false when it is ok to use RemoteEndPoint
@@ -1363,7 +1363,7 @@ namespace System.Net.Sockets
bool release = false;
try {
safeHandle.DangerousAddRef (ref release);
- Disconnect_internal (safeHandle.DangerousGetHandle (), reuse, out error);
+ Disconnect_icall (safeHandle.DangerousGetHandle (), reuse, out error);
} finally {
if (release)
safeHandle.DangerousRelease ();
@@ -1371,7 +1371,7 @@ namespace System.Net.Sockets
}
[MethodImplAttribute(MethodImplOptions.InternalCall)]
- extern static void Disconnect_internal (IntPtr sock, bool reuse, out int error);
+ extern static void Disconnect_icall (IntPtr sock, bool reuse, out int error);
#endregion
@@ -1644,27 +1644,27 @@ namespace System.Net.Sockets
{
try {
safeHandle.RegisterForBlockingSyscall ();
- return Receive_internal (safeHandle.DangerousGetHandle (), bufarray, count, flags, out error, blocking);
+ return Receive_array_icall (safeHandle.DangerousGetHandle (), bufarray, count, flags, out error, blocking);
} finally {
safeHandle.UnRegisterForBlockingSyscall ();
}
}
[MethodImplAttribute (MethodImplOptions.InternalCall)]
- extern static unsafe int Receive_internal (IntPtr sock, WSABUF* bufarray, int count, SocketFlags flags, out int error, bool blocking);
+ extern static unsafe int Receive_array_icall (IntPtr sock, WSABUF* bufarray, int count, SocketFlags flags, out int error, bool blocking);
static unsafe int Receive_internal (SafeSocketHandle safeHandle, byte* buffer, int count, SocketFlags flags, out int error, bool blocking)
{
try {
safeHandle.RegisterForBlockingSyscall ();
- return Receive_internal (safeHandle.DangerousGetHandle (), buffer, count, flags, out error, blocking);
+ return Receive_icall (safeHandle.DangerousGetHandle (), buffer, count, flags, out error, blocking);
} finally {
safeHandle.UnRegisterForBlockingSyscall ();
}
}
[MethodImplAttribute(MethodImplOptions.InternalCall)]
- extern static unsafe int Receive_internal(IntPtr sock, byte* buffer, int count, SocketFlags flags, out int error, bool blocking);
+ extern static unsafe int Receive_icall (IntPtr sock, byte* buffer, int count, SocketFlags flags, out int error, bool blocking);
#endregion
@@ -1884,14 +1884,14 @@ namespace System.Net.Sockets
{
try {
safeHandle.RegisterForBlockingSyscall ();
- return ReceiveFrom_internal (safeHandle.DangerousGetHandle (), buffer, count, flags, ref sockaddr, out error, blocking);
+ return ReceiveFrom_icall (safeHandle.DangerousGetHandle (), buffer, count, flags, ref sockaddr, out error, blocking);
} finally {
safeHandle.UnRegisterForBlockingSyscall ();
}
}
[MethodImplAttribute(MethodImplOptions.InternalCall)]
- extern static unsafe int ReceiveFrom_internal(IntPtr sock, byte* buffer, int count, SocketFlags flags, ref SocketAddress sockaddr, out int error, bool blocking);
+ extern static unsafe int ReceiveFrom_icall (IntPtr sock, byte* buffer, int count, SocketFlags flags, ref SocketAddress sockaddr, out int error, bool blocking);
#endregion
@@ -2209,27 +2209,27 @@ namespace System.Net.Sockets
{
try {
safeHandle.RegisterForBlockingSyscall ();
- return Send_internal (safeHandle.DangerousGetHandle (), bufarray, count, flags, out error, blocking);
+ return Send_array_icall (safeHandle.DangerousGetHandle (), bufarray, count, flags, out error, blocking);
} finally {
safeHandle.UnRegisterForBlockingSyscall ();
}
}
[MethodImplAttribute (MethodImplOptions.InternalCall)]
- extern static unsafe int Send_internal (IntPtr sock, WSABUF* bufarray, int count, SocketFlags flags, out int error, bool blocking);
+ extern static unsafe int Send_array_icall (IntPtr sock, WSABUF* bufarray, int count, SocketFlags flags, out int error, bool blocking);
static unsafe int Send_internal (SafeSocketHandle safeHandle, byte* buffer, int count, SocketFlags flags, out int error, bool blocking)
{
try {
safeHandle.RegisterForBlockingSyscall ();
- return Send_internal (safeHandle.DangerousGetHandle (), buffer, count, flags, out error, blocking);
+ return Send_icall (safeHandle.DangerousGetHandle (), buffer, count, flags, out error, blocking);
} finally {
safeHandle.UnRegisterForBlockingSyscall ();
}
}
[MethodImplAttribute(MethodImplOptions.InternalCall)]
- extern static unsafe int Send_internal(IntPtr sock, byte* buffer, int count, SocketFlags flags, out int error, bool blocking);
+ extern static unsafe int Send_icall (IntPtr sock, byte* buffer, int count, SocketFlags flags, out int error, bool blocking);
#endregion
@@ -2399,14 +2399,14 @@ namespace System.Net.Sockets
{
try {
safeHandle.RegisterForBlockingSyscall ();
- return SendTo_internal (safeHandle.DangerousGetHandle (), buffer, count, flags, sa, out error, blocking);
+ return SendTo_icall (safeHandle.DangerousGetHandle (), buffer, count, flags, sa, out error, blocking);
} finally {
safeHandle.UnRegisterForBlockingSyscall ();
}
}
[MethodImplAttribute(MethodImplOptions.InternalCall)]
- extern static unsafe int SendTo_internal (IntPtr sock, byte* buffer, int count, SocketFlags flags, SocketAddress sa, out int error, bool blocking);
+ extern static unsafe int SendTo_icall (IntPtr sock, byte* buffer, int count, SocketFlags flags, SocketAddress sa, out int error, bool blocking);
#endregion
@@ -2462,14 +2462,14 @@ namespace System.Net.Sockets
{
try {
safeHandle.RegisterForBlockingSyscall ();
- return SendFile_internal (safeHandle.DangerousGetHandle (), filename, pre_buffer, post_buffer, flags, out error, blocking);
+ return SendFile_icall (safeHandle.DangerousGetHandle (), filename, pre_buffer, post_buffer, flags, out error, blocking);
} finally {
safeHandle.UnRegisterForBlockingSyscall ();
}
}
[MethodImplAttribute(MethodImplOptions.InternalCall)]
- extern static bool SendFile_internal (IntPtr sock, string filename, byte [] pre_buffer, byte [] post_buffer, TransmitFileOptions flags, out int error, bool blocking);
+ extern static bool SendFile_icall (IntPtr sock, string filename, byte [] pre_buffer, byte [] post_buffer, TransmitFileOptions flags, out int error, bool blocking);
delegate void SendFileHandler (string fileName, byte [] preBuffer, byte [] postBuffer, TransmitFileOptions flags);
@@ -2527,7 +2527,7 @@ namespace System.Net.Sockets
#region DuplicateAndClose
[MethodImplAttribute(MethodImplOptions.InternalCall)]
- static extern bool Duplicate_internal(IntPtr handle, int targetProcessId, out IntPtr duplicateHandle, out MonoIOError error);
+ static extern bool Duplicate_icall (IntPtr handle, int targetProcessId, out IntPtr duplicateHandle, out MonoIOError error);
[MonoLimitation ("We do not support passing sockets across processes, we merely allow this API to pass the socket across AppDomains")]
public SocketInformation DuplicateAndClose (int targetProcessId)
@@ -2540,7 +2540,7 @@ namespace System.Net.Sockets
(useOverlappedIO ? SocketInformationOptions.UseOnlyOverlappedIO : 0);
IntPtr duplicateHandle;
- if (!Duplicate_internal (Handle, targetProcessId, out duplicateHandle, out MonoIOError error))
+ if (!Duplicate_icall (Handle, targetProcessId, out duplicateHandle, out MonoIOError error))
throw MonoIO.GetException (error);
si.ProtocolInformation = Mono.DataConverter.Pack ("iiiil", (int)addressFamily, (int)socketType, (int)protocolType, is_bound ? 1 : 0, (long)duplicateHandle);
@@ -2607,7 +2607,7 @@ namespace System.Net.Sockets
bool release = false;
try {
safeHandle.DangerousAddRef (ref release);
- GetSocketOption_arr_internal (safeHandle.DangerousGetHandle (), level, name, ref byte_val, out error);
+ GetSocketOption_arr_icall (safeHandle.DangerousGetHandle (), level, name, ref byte_val, out error);
} finally {
if (release)
safeHandle.DangerousRelease ();
@@ -2615,14 +2615,14 @@ namespace System.Net.Sockets
}
[MethodImplAttribute(MethodImplOptions.InternalCall)]
- extern static void GetSocketOption_arr_internal(IntPtr socket, SocketOptionLevel level, SocketOptionName name, ref byte[] byte_val, out int error);
+ extern static void GetSocketOption_arr_icall (IntPtr socket, SocketOptionLevel level, SocketOptionName name, ref byte[] byte_val, out int error);
static void GetSocketOption_obj_internal (SafeSocketHandle safeHandle, SocketOptionLevel level, SocketOptionName name, out object obj_val, out int error)
{
bool release = false;
try {
safeHandle.DangerousAddRef (ref release);
- GetSocketOption_obj_internal (safeHandle.DangerousGetHandle (), level, name, out obj_val, out error);
+ GetSocketOption_obj_icall (safeHandle.DangerousGetHandle (), level, name, out obj_val, out error);
} finally {
if (release)
safeHandle.DangerousRelease ();
@@ -2630,7 +2630,7 @@ namespace System.Net.Sockets
}
[MethodImplAttribute(MethodImplOptions.InternalCall)]
- extern static void GetSocketOption_obj_internal(IntPtr socket, SocketOptionLevel level, SocketOptionName name, out object obj_val, out int error);
+ extern static void GetSocketOption_obj_icall (IntPtr socket, SocketOptionLevel level, SocketOptionName name, out object obj_val, out int error);
#endregion
@@ -2716,7 +2716,7 @@ namespace System.Net.Sockets
bool release = false;
try {
safeHandle.DangerousAddRef (ref release);
- SetSocketOption_internal (safeHandle.DangerousGetHandle (), level, name, obj_val, byte_val, int_val, out error);
+ SetSocketOption_icall (safeHandle.DangerousGetHandle (), level, name, obj_val, byte_val, int_val, out error);
} finally {
if (release)
safeHandle.DangerousRelease ();
@@ -2724,7 +2724,7 @@ namespace System.Net.Sockets
}
[MethodImplAttribute(MethodImplOptions.InternalCall)]
- extern static void SetSocketOption_internal (IntPtr socket, SocketOptionLevel level, SocketOptionName name, object obj_val, byte [] byte_val, int int_val, out int error);
+ extern static void SetSocketOption_icall (IntPtr socket, SocketOptionLevel level, SocketOptionName name, object obj_val, byte [] byte_val, int int_val, out int error);
#endregion
@@ -2751,7 +2751,7 @@ namespace System.Net.Sockets
bool release = false;
try {
safeHandle.DangerousAddRef (ref release);
- return IOControl_internal (safeHandle.DangerousGetHandle (), ioctl_code, input, output, out error);
+ return IOControl_icall (safeHandle.DangerousGetHandle (), ioctl_code, input, output, out error);
} finally {
if (release)
safeHandle.DangerousRelease ();
@@ -2762,7 +2762,7 @@ namespace System.Net.Sockets
* and Winsock are FIONREAD, FIONBIO and SIOCATMARK. Anything else will depend on the system
* except SIO_KEEPALIVE_VALS which is properly handled on both windows and linux. */
[MethodImplAttribute(MethodImplOptions.InternalCall)]
- extern static int IOControl_internal (IntPtr sock, int ioctl_code, byte [] input, byte [] output, out int error);
+ extern static int IOControl_icall (IntPtr sock, int ioctl_code, byte [] input, byte [] output, out int error);
#endregion
@@ -2781,7 +2781,7 @@ namespace System.Net.Sockets
}
[MethodImplAttribute(MethodImplOptions.InternalCall)]
- internal extern static void Close_internal (IntPtr socket, out int error);
+ internal extern static void Close_icall (IntPtr socket, out int error);
#endregion
@@ -2818,7 +2818,7 @@ namespace System.Net.Sockets
bool release = false;
try {
safeHandle.DangerousAddRef (ref release);
- Shutdown_internal (safeHandle.DangerousGetHandle (), how, out error);
+ Shutdown_icall (safeHandle.DangerousGetHandle (), how, out error);
} finally {
if (release)
safeHandle.DangerousRelease ();
@@ -2826,7 +2826,7 @@ namespace System.Net.Sockets
}
[MethodImplAttribute (MethodImplOptions.InternalCall)]
- internal extern static void Shutdown_internal (IntPtr socket, SocketShutdown how, out int error);
+ internal extern static void Shutdown_icall (IntPtr socket, SocketShutdown how, out int error);
#endregion
@@ -2859,7 +2859,7 @@ namespace System.Net.Sockets
/* We don't want to receive any more data */
int error;
- Shutdown_internal (handle, SocketShutdown.Receive, out error);
+ Shutdown_icall (handle, SocketShutdown.Receive, out error);
if (error != 0)
return;
@@ -2868,14 +2868,14 @@ namespace System.Net.Sockets
int ms = linger_timeout % 1000;
if (ms > 0) {
/* If the other end closes, this will return 'true' with 'Available' == 0 */
- Poll_internal (handle, SelectMode.SelectRead, ms * 1000, out error);
+ Poll_icall (handle, SelectMode.SelectRead, ms * 1000, out error);
if (error != 0)
return;
}
if (seconds > 0) {
LingerOption linger = new LingerOption (true, seconds);
- SetSocketOption_internal (handle, SocketOptionLevel.Socket, SocketOptionName.Linger, linger, null, 0, out error);
+ SetSocketOption_icall (handle, SocketOptionLevel.Socket, SocketOptionName.Linger, linger, null, 0, out error);
/* Not needed, we're closing upon return */
//if (error != 0)
// return;
diff --git a/mcs/class/System/System.Net.WebSockets/WebSocketHandle.wasm.cs b/mcs/class/System/System.Net.WebSockets/WebSocketHandle.wasm.cs
new file mode 100644
index 0000000000..5219654c97
--- /dev/null
+++ b/mcs/class/System/System.Net.WebSockets/WebSocketHandle.wasm.cs
@@ -0,0 +1,108 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.IO;
+using System.Net.Security;
+using System.Net.Sockets;
+using System.Runtime.ExceptionServices;
+using System.Security.Cryptography;
+using System.Security.Cryptography.X509Certificates;
+using System.Text;
+using System.Threading;
+using System.Threading.Tasks;
+
+namespace System.Net.WebSockets
+{
+ internal sealed class WebSocketHandle
+ {
+ private WebSocketState _state = WebSocketState.Connecting;
+ private WebAssembly.Net.WebSockets.ClientWebSocket _webSocket;
+
+ public static WebSocketHandle Create() => new WebSocketHandle();
+
+ public static bool IsValid(WebSocketHandle handle) => handle != null;
+
+ public WebSocketCloseStatus? CloseStatus => _webSocket?.CloseStatus;
+
+ public string CloseStatusDescription => _webSocket?.CloseStatusDescription;
+
+ public WebSocketState State => _webSocket?.State ?? _state;
+
+ public string SubProtocol => _webSocket?.SubProtocol;
+
+ public static void CheckPlatformSupport() { /* nop */ }
+
+ public void Dispose()
+ {
+ _state = WebSocketState.Closed;
+ _webSocket?.Dispose();
+ }
+
+ public void Abort()
+ {
+ _webSocket?.Abort();
+ }
+
+ public Task SendAsync(ArraySegment buffer, WebSocketMessageType messageType, bool endOfMessage, CancellationToken cancellationToken) =>
+ _webSocket.SendAsync(buffer, messageType, endOfMessage, cancellationToken);
+
+ public ValueTask SendAsync(ReadOnlyMemory