Merge pull request #334 from compnerd/reserved-asm

use reserved spelling for inline assembly
diff --git a/Makefile.am b/Makefile.am
deleted file mode 100644
index f1be029..0000000
--- a/Makefile.am
+++ /dev/null
@@ -1,29 +0,0 @@
-#
-#
-#
-
-ACLOCAL_AMFLAGS = -I m4
-
-if BUILD_TESTS
-  MAYBE_TESTS = tests
-endif
-
-SUBDIRS=						\
-	dispatch					\
-	man							\
-	os							\
-	private						\
-	src							\
-	$(MAYBE_TESTS)
-
-EXTRA_DIST=					\
-	README.md				\
-	LICENSE					\
-	PATCHES					\
-	autogen.sh				\
-	config/config.h			\
-	libdispatch.xcodeproj	\
-	resolver				\
-	tools					\
-	xcodeconfig				\
-	xcodescripts
diff --git a/autogen.sh b/autogen.sh
deleted file mode 100755
index 3ebda42..0000000
--- a/autogen.sh
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-autoreconf -fvi
diff --git a/cmake/modules/DispatchCompilerWarnings.cmake b/cmake/modules/DispatchCompilerWarnings.cmake
index d5069c2..fa3b2b5 100644
--- a/cmake/modules/DispatchCompilerWarnings.cmake
+++ b/cmake/modules/DispatchCompilerWarnings.cmake
@@ -8,43 +8,39 @@
     add_compile_options(-Werror)
     add_compile_options(-Wall)
     add_compile_options(-Wextra)
-    add_compile_options(-Wmissing-prototypes)
-    add_compile_options(-Wdocumentation)
-    add_compile_options(-Wunreachable-code)
-    add_compile_options(-Wshadow)
-    add_compile_options(-Wconversion)
-    add_compile_options(-Wconstant-conversion)
-    add_compile_options(-Wint-conversion)
-    add_compile_options(-Wbool-conversion)
-    add_compile_options(-Wenum-conversion)
-    add_compile_options(-Wassign-enum)
-    add_compile_options(-Wshorten-64-to-32)
-    add_compile_options(-Wnewline-eof)
-    add_compile_options(-Wdeprecated-declarations)
-    add_compile_options(-Wsign-conversion)
-    add_compile_options(-Winfinite-recursion)
+
     add_compile_options(-Warray-bounds-pointer-arithmetic)
+    add_compile_options(-Wassign-enum)
     add_compile_options(-Watomic-properties)
     add_compile_options(-Wcomma)
     add_compile_options(-Wconditional-uninitialized)
+    add_compile_options(-Wconversion)
     add_compile_options(-Wcovered-switch-default)
     add_compile_options(-Wdate-time)
     add_compile_options(-Wdeprecated)
+    add_compile_options(-Wdocumentation)
     add_compile_options(-Wdouble-promotion)
     add_compile_options(-Wduplicate-enum)
     add_compile_options(-Wexpansion-to-defined)
     add_compile_options(-Wfloat-equal)
     add_compile_options(-Widiomatic-parentheses)
+    add_compile_options(-Winfinite-recursion)
+    add_compile_options(-Wmissing-prototypes)
+    add_compile_options(-Wnewline-eof)
     add_compile_options(-Wnullable-to-nonnull-conversion)
     add_compile_options(-Wobjc-interface-ivars)
     add_compile_options(-Wover-aligned)
     add_compile_options(-Wpacked)
     add_compile_options(-Wpointer-arith)
     add_compile_options(-Wselector)
+    add_compile_options(-Wshadow)
+    add_compile_options(-Wshorten-64-to-32)
+    add_compile_options(-Wsign-conversion)
     add_compile_options(-Wstatic-in-inline)
     add_compile_options(-Wsuper-class-method-mismatch)
     add_compile_options(-Wswitch-enum)
     add_compile_options(-Wunguarded-availability)
+    add_compile_options(-Wunreachable-code)
     add_compile_options(-Wunused)
 
     add_compile_options(-Wno-unknown-warning-option)
diff --git a/config/config.h b/config/config.h
deleted file mode 100644
index 91d7cfe..0000000
--- a/config/config.h
+++ /dev/null
@@ -1,265 +0,0 @@
-/* config/config.h.  Generated from config.h.in by configure.  */
-/* config/config.h.in.  Generated from configure.ac by autoheader.  */
-
-/* Define to 1 if you have the declaration of `CLOCK_MONOTONIC', and to 0 if
-   you don't. */
-#define HAVE_DECL_CLOCK_MONOTONIC 0
-
-/* Define to 1 if you have the declaration of `CLOCK_REALTIME', and to 0 if
-   you don't. */
-#define CLOCK_REALTIME 0
-
-/* Define to 1 if you have the declaration of `CLOCK_UPTIME', and to 0 if you
-   don't. */
-#define HAVE_DECL_CLOCK_UPTIME 0
-
-/* Define to 1 if you have the declaration of `HAVE_DECL_CLOCK_UPTIME_FAST',
-    and to 0 if you don't. */
-#define HAVE_DECL_CLOCK_UPTIME_FAST 0
-
-/* Define to 1 if you have the declaration of `FD_COPY', and to 0 if you
-   don't. */
-#define HAVE_DECL_FD_COPY 1
-
-/* Define to 1 if you have the declaration of `NOTE_LOWAT', and to 0 if you
-   don't. */
-#define HAVE_DECL_NOTE_LOWAT 1
-
-/* Define to 1 if you have the declaration of `NOTE_NONE', and to 0 if you
-   don't. */
-#define HAVE_DECL_NOTE_NONE 1
-
-/* Define to 1 if you have the declaration of `NOTE_REAP', and to 0 if you
-   don't. */
-#define HAVE_DECL_NOTE_REAP 1
-
-/* Define to 1 if you have the declaration of `NOTE_REVOKE', and to 0 if you
-   don't. */
-#define HAVE_DECL_NOTE_REVOKE 1
-
-/* Define to 1 if you have the declaration of `NOTE_SIGNAL', and to 0 if you
-   don't. */
-#define HAVE_DECL_NOTE_SIGNAL 1
-
-/* Define to 1 if you have the declaration of `POSIX_SPAWN_START_SUSPENDED',
-   and to 0 if you don't. */
-#define HAVE_DECL_POSIX_SPAWN_START_SUSPENDED 1
-
-/* Define to 1 if you have the declaration of `program_invocation_short_name',
-   and to 0 if you don't. */
-#define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME 0
-
-/* Define to 1 if you have the declaration of `SIGEMT', and to 0 if you don't.
-   */
-#define HAVE_DECL_SIGEMT 1
-
-/* Define to 1 if you have the declaration of `VQ_UPDATE', and to 0 if you
-   don't. */
-#define HAVE_DECL_VQ_UPDATE 1
-
-/* Define to 1 if you have the declaration of `VQ_VERYLOWDISK', and to 0 if
-   you don't. */
-#define HAVE_DECL_VQ_VERYLOWDISK 1
-
-/* Define to 1 if you have the declaration of `VQ_QUOTA', and to 0 if
- you don't. */
-#define HAVE_DECL_VQ_QUOTA 1
-
-/* Define to 1 if you have the declaration of `VQ_NEARLOWDISK', and to 0 if
-   you don't. */
-#define HAVE_DECL_VQ_NEARLOWDISK 1
-
-/* Define to 1 if you have the declaration of `VQ_DESIRED_DISK', and to 0 if
- you don't. */
-#define HAVE_DECL_VQ_DESIRED_DISK 1
-
-/* Define to 1 if you have the <dlfcn.h> header file. */
-#define HAVE_DLFCN_H 1
-
-/* Define to 1 if you have the <fcntl.h> header file. */
-#define HAVE_FCNTL_H 1
-
-/* Define to 1 if you have the `getprogname' function. */
-#define HAVE_GETPROGNAME 1
-
-/* Define to 1 if you have the <inttypes.h> header file. */
-#define HAVE_INTTYPES_H 1
-
-/* Define if Apple leaks program is present */
-#define HAVE_LEAKS 1
-
-/* Define to 1 if you have the <libkern/OSAtomic.h> header file. */
-#define HAVE_LIBKERN_OSATOMIC_H 1
-
-/* Define to 1 if you have the <libkern/OSCrossEndian.h> header file. */
-#define HAVE_LIBKERN_OSCROSSENDIAN_H 1
-
-/* Define to 1 if you have the <libproc_internal.h> header file. */
-#define HAVE_LIBPROC_INTERNAL_H 1
-
-/* Define if mach is present */
-#define HAVE_MACH 1
-
-/* Define to 1 if you have the `mach_absolute_time' function. */
-#define HAVE_MACH_ABSOLUTE_TIME 1
-
-/* Define to 1 if you have the `mach_approximate_time' function. */
-#define HAVE_MACH_APPROXIMATE_TIME 1
-
-/* Define to 1 if you have the `mach_port_construct' function. */
-#define HAVE_MACH_PORT_CONSTRUCT 1
-
-/* Define to 1 if you have the `malloc_create_zone' function. */
-#define HAVE_MALLOC_CREATE_ZONE 1
-
-/* Define to 1 if you have the <malloc/malloc.h> header file. */
-#define HAVE_MALLOC_MALLOC_H 1
-
-/* Define to 1 if you have the <memory.h> header file. */
-#define HAVE_MEMORY_H 1
-
-/* Define if __builtin_trap marked noreturn */
-#define HAVE_NORETURN_BUILTIN_TRAP 1
-
-/* Define if you have the Objective-C runtime */
-#define HAVE_OBJC 1
-
-/* Define to 1 if you have the `pthread_key_init_np' function. */
-#define HAVE_PTHREAD_KEY_INIT_NP 1
-
-/* Define to 1 if you have the <pthread_machdep.h> header file. */
-#define HAVE_PTHREAD_MACHDEP_H 1
-
-/* Define to 1 if you have the `pthread_main_np' function. */
-#define HAVE_PTHREAD_MAIN_NP 1
-
-/* Define to 1 if you have the <pthread_np.h> header file. */
-/* #undef HAVE_PTHREAD_NP_H */
-
-/* Define to 1 if you have the <pthread/qos.h> header file. */
-#define HAVE_PTHREAD_QOS_H 1
-
-/* Define if pthread work queues are present */
-#define HAVE_PTHREAD_WORKQUEUES 1
-
-/* Define to 1 if you have the <pthread_workqueue.h> header file. */
-#define HAVE_PTHREAD_WORKQUEUE_H 1
-
-/* Define to 1 if you have the <pthread/workqueue_private.h> header file. */
-#define HAVE_PTHREAD_WORKQUEUE_PRIVATE_H 1
-
-/* Define to 1 if you have the `pthread_workqueue_setdispatch_np' function. */
-#define HAVE_PTHREAD_WORKQUEUE_SETDISPATCH_NP 1
-
-/* Define to 1 if you have the <stdint.h> header file. */
-#define HAVE_STDINT_H 1
-
-/* Define to 1 if you have the <stdlib.h> header file. */
-#define HAVE_STDLIB_H 1
-
-/* Define to 1 if you have the <strings.h> header file. */
-#define HAVE_STRINGS_H 1
-
-/* Define to 1 if you have the <string.h> header file. */
-#define HAVE_STRING_H 1
-
-/* Define to 1 if you have the `sysconf' function. */
-#define HAVE_SYSCONF 1
-
-/* Define to 1 if you have the <sys/cdefs.h> header file. */
-#define HAVE_SYS_CDEFS_H 1
-
-/* Define to 1 if you have the <sys/guarded.h> header file. */
-#define HAVE_SYS_GUARDED_H 1
-
-/* Define to 1 if you have the <sys/stat.h> header file. */
-#define HAVE_SYS_STAT_H 1
-
-/* Define to 1 if you have the <sys/types.h> header file. */
-#define HAVE_SYS_TYPES_H 1
-
-/* Define to 1 if you have the <TargetConditionals.h> header file. */
-#define HAVE_TARGETCONDITIONALS_H 1
-
-/* Define to 1 if you have the <unistd.h> header file. */
-#define HAVE_UNISTD_H 1
-
-/* Define to 1 if you have the `_pthread_workqueue_init' function. */
-#define HAVE__PTHREAD_WORKQUEUE_INIT 1
-
-/* Define to the sub-directory where libtool stores uninstalled libraries. */
-#define LT_OBJDIR ".libs/"
-
-/* Name of package */
-#define PACKAGE "libdispatch"
-
-/* Define to the address where bug reports for this package should be sent. */
-#define PACKAGE_BUGREPORT "libdispatch@macosforge.org"
-
-/* Define to the full name of this package. */
-#define PACKAGE_NAME "libdispatch"
-
-/* Define to the full name and version of this package. */
-#define PACKAGE_STRING "libdispatch 1.3"
-
-/* Define to the one symbol short name of this package. */
-#define PACKAGE_TARNAME "libdispatch"
-
-/* Define to the home page for this package. */
-#define PACKAGE_URL "http://libdispatch.macosforge.org"
-
-/* Define to the version of this package. */
-#define PACKAGE_VERSION "1.3"
-
-/* Define to 1 if you have the ANSI C header files. */
-#define STDC_HEADERS 1
-
-/* Define to use non-portable pthread TSD optimizations for Mac OS X) */
-#define USE_APPLE_TSD_OPTIMIZATIONS 1
-
-/* Define to tag libdispatch_init as a constructor */
-/* #undef USE_LIBDISPATCH_INIT_CONSTRUCTOR */
-
-/* Define to use Mach semaphores */
-#define USE_MACH_SEM 1
-
-/* Define to use POSIX semaphores */
-/* #undef USE_POSIX_SEM */
-
-/* Enable extensions on AIX 3, Interix.  */
-#ifndef _ALL_SOURCE
-# define _ALL_SOURCE 1
-#endif
-/* Enable GNU extensions on systems that have them.  */
-#ifndef _GNU_SOURCE
-# define _GNU_SOURCE 1
-#endif
-/* Enable threading extensions on Solaris.  */
-#ifndef _POSIX_PTHREAD_SEMANTICS
-# define _POSIX_PTHREAD_SEMANTICS 1
-#endif
-/* Enable extensions on HP NonStop.  */
-#ifndef _TANDEM_SOURCE
-# define _TANDEM_SOURCE 1
-#endif
-/* Enable general extensions on Solaris.  */
-#ifndef __EXTENSIONS__
-# define __EXTENSIONS__ 1
-#endif
-
-
-/* Version number of package */
-#define VERSION "1.3"
-
-/* Define to 1 if on MINIX. */
-/* #undef _MINIX */
-
-/* Define to 2 if the system does not provide POSIX.1 features except with
-   this defined. */
-/* #undef _POSIX_1_SOURCE */
-
-/* Define to 1 if you need to in order for `stat' and other things to work. */
-/* #undef _POSIX_SOURCE */
-
-/* Define if using Darwin $NOCANCEL */
-#define __DARWIN_NON_CANCELABLE 1
diff --git a/configure.ac b/configure.ac
deleted file mode 100644
index 4d7437d..0000000
--- a/configure.ac
+++ /dev/null
@@ -1,526 +0,0 @@
-#
-# When this file changes, rerun autogen.sh.
-#
-
-AC_PREREQ(2.69)
-AC_INIT([libdispatch], [1.3], [https://bugs.swift.org], [libdispatch], [https://github.com/apple/swift-corelibs-libdispatch])
-AC_REVISION([$$])
-AC_CONFIG_AUX_DIR(config)
-AC_CONFIG_HEADER([config/config_ac.h])
-AC_CONFIG_MACRO_DIR([m4])
-ac_clean_files=a.out.dSYM
-AM_MAINTAINER_MODE
-
-AC_CANONICAL_BUILD
-AC_CANONICAL_HOST
-AC_CANONICAL_TARGET
-
-#
-# Command line argument to specify build variant (default to release).
-# Impacts default value of CFLAGS et al. so must come before AC_PROG_CC
-#
-AC_ARG_WITH([build-variant],
-  [AS_HELP_STRING([--with-build-variant=release|debug|releaseassert|releasedebuginfo], [Specify build variant [default=release]])],
-  [dispatch_build_variant=${withval}],
-  [dispatch_build_variant=release]
-)
-AS_CASE([$dispatch_build_variant],
-  [debug], [
-    default_compiler_flags="-g -O0"
-    dispatch_enable_asserts=true
-    dispatch_enable_optimization=false
-  ],
-  [release], [
-    default_compiler_flags="-O2"
-    dispatch_enable_asserts=false
-    dispatch_enable_optimization=true
-  ],
-  [releaseassert], [
-    default_compiler_flags="-O2"
-    dispatch_enable_asserts=true
-    dispatch_enable_optimization=true
-  ],
-  [releasedebuginfo], [
-    default_compiler_flags="-g -O2"
-    dispatch_enable_asserts=false
-    dispatch_enable_optimization=true
-  ],
-  [AC_MSG_ERROR("invalid build-variant $dispatch_build_variant")]
-)
-AM_CONDITIONAL(DISPATCH_ENABLE_ASSERTS, $dispatch_enable_asserts)
-AM_CONDITIONAL(DISPATCH_ENABLE_OPTIMIZATION, $dispatch_enable_optimization)
-
-: ${CFLAGS=$default_compiler_flags}
-: ${CXXFLAGS=$default_compiler_flags}
-: ${OBJCFLAGS=$default_compiler_flags}
-: ${OBJCXXFLAGS=$default_compiler_flags}
-
-AC_PROG_CC([clang gcc cc])
-AC_PROG_CXX([clang++ g++ c++])
-AC_PROG_OBJC([clang gcc cc])
-AC_PROG_OBJCXX([clang++ g++ c++])
-
-#
-# Android cross-compilation support
-#
-AC_ARG_WITH([android-ndk],
-  [AS_HELP_STRING([--with-android-ndk],
-    [Android NDK location])], [
-  android_ndk=${withval}
-])
-AC_ARG_WITH([android-ndk-gcc-version],
-  [AS_HELP_STRING([--with-android-ndk-gcc-version],
-    [Android NDK GCC version [defaults=4.9]])],
-  [android_ndk_gcc_version=${withval}], [android_ndk_gcc_version=4.9])
-AC_ARG_WITH([android-api-level],
-  [AS_HELP_STRING([--with-android-api-level],
-    [Android API level to link with])], [
-  android_api_level=${withval}
-])
-AC_ARG_ENABLE([android],
-  [AS_HELP_STRING([--enable-android],
-    [Compile for Android])], [
-  android=true
-
-  # Override values until there's real support for multiple Android platforms
-  host=armv7-none-linux-androideabi
-  host_alias=arm-linux-androideabi
-  host_cpu=armv7
-  host_os=linux-androideabi
-  host_vendor=unknown
-  arch=arm
-
-  sysroot=${android_ndk}/platforms/android-${android_api_level}/arch-${arch}
-  toolchain=${android_ndk}/toolchains/${host_alias}-${android_ndk_gcc_version}/prebuilt/linux-${build_cpu}
-
-  CFLAGS="$CFLAGS -target ${host_alias} --sysroot=${sysroot} -B${toolchain}/${host_alias}/bin"
-  CXXFLAGS="$CXXFLAGS -target ${host_alias} --sysroot=${sysroot} -B${toolchain}/${host_alias}/bin"
-  SWIFTC_FLAGS="-target ${host} -sdk ${sysroot} -L${toolchain}/lib/gcc/${host_alias}/${android_ndk_gcc_version}.x"
-  LIBS="$LIBS -L${toolchain}/lib/gcc/${host_alias}/${android_ndk_gcc_version}.x"
-  LDFLAGS="$LDFLAGS -Wc,'-target','${host_alias}','-B${toolchain}/${host_alias}/bin'"
-
-  # FIXME: empty CFLAGS and CXXFLAGS are assumed for this to work.
-  # FIXME: there should be a more elegant way to do this
-  ac_configure_args=`echo $ac_configure_args | sed -e "s/ 'CFLAGS='//" -e "s/ 'CXXFLAGS='//"`
-  # CFLAGS, CXXFLAGS and LIBS needs to be passed to libkqueue and libpwq
-  ac_configure_args="$ac_configure_args --enable-bionic-libc 'CFLAGS=$CFLAGS' 'CXXFLAGS=$CXXFLAGS' 'LIBS=$LIBS'"
-], [android=false])
-AM_CONDITIONAL(ANDROID, $android)
-
-#
-# On Mac OS X, some required header files come from other source packages;
-# allow specifying where those are.
-#
-AC_ARG_WITH([apple-libpthread-source],
-  [AS_HELP_STRING([--with-apple-libpthread-source],
-    [Specify path to Apple libpthread source])], [
-  apple_libpthread_source_path=${withval}
-  CPPFLAGS="$CPPFLAGS -isystem $apple_libpthread_source_path"
-])
-
-AC_ARG_WITH([apple-libplatform-source],
-  [AS_HELP_STRING([--with-apple-libplatform-source],
-    [Specify path to Apple libplatform source])], [
-  apple_libplatform_source_include_path=${withval}/include
-  CPPFLAGS="$CPPFLAGS -isystem $apple_libplatform_source_include_path"
-])
-
-AC_ARG_WITH([apple-xnu-source],
-  [AS_HELP_STRING([--with-apple-xnu-source],
-    [Specify path to Apple XNU source])], [
-  apple_xnu_source_libsyscall_path=${withval}/libsyscall
-  apple_xnu_source_libproc_path=${withval}/libsyscall/wrappers/libproc
-  apple_xnu_source_libkern_path=${withval}/libkern
-  apple_xnu_source_bsd_path=${withval}/bsd
-  apple_xnu_source_osfmk_path=${withval}/osfmk
-  CPPFLAGS="$CPPFLAGS -idirafter $apple_xnu_source_libkern_path -isystem $apple_xnu_source_bsd_path -isystem $apple_xnu_source_libsyscall_path -isystem $apple_xnu_source_libproc_path "
-])
-
-AC_CACHE_CHECK([for System.framework/PrivateHeaders], dispatch_cv_system_privateheaders,
-  [AS_IF([test -d /System/Library/Frameworks/System.framework/PrivateHeaders],
-    [dispatch_cv_system_privateheaders=yes], [dispatch_cv_system_privateheaders=no])]
-)
-AS_IF([test "x$dispatch_cv_system_privateheaders" != "xno"],
-  [CPPFLAGS="$CPPFLAGS -isystem /System/Library/Frameworks/System.framework/PrivateHeaders"]
-)
-
-#
-# On Mac OS X, libdispatch_init is automatically invoked during libSystem
-# process initialization.  On other systems, it is tagged as a library
-# constructor to be run by automatically by the runtime linker.
-#
-AC_ARG_ENABLE([libdispatch-init-constructor],
-  [AS_HELP_STRING([--disable-libdispatch-init-constructor],
-    [Disable libdispatch_init as a constructor])],,
-  [AS_IF([test -f /usr/lib/system/libdispatch.dylib],
-    [enable_libdispatch_init_constructor=no])]
-)
-AS_IF([test "x$enable_libdispatch_init_constructor" != "xno"],
-  [AC_DEFINE(USE_LIBDISPATCH_INIT_CONSTRUCTOR, 1,
-    [Define to tag libdispatch_init as a constructor])]
-)
-
-#
-# On Mac OS X libdispatch can use the non-portable direct pthread TSD functions
-#
-AC_ARG_ENABLE([apple-tsd-optimizations],
-  [AS_HELP_STRING([--enable-apple-tsd-optimizations],
-    [Use non-portable pthread TSD optimizations for Mac OS X.])]
-)
-AS_IF([test "x$enable_apple_tsd_optimizations" = "xyes"],
-  [AC_DEFINE(USE_APPLE_TSD_OPTIMIZATIONS, 1,
-    [Define to use non-portable pthread TSD optimizations for Mac OS X)])]
-)
-
-#
-# Enable building Swift overlay support into libdispatch
-#
-AC_ARG_WITH([swift-toolchain],
-  [AS_HELP_STRING([--with-swift-toolchain], [Specify path to Swift toolchain])],
-  [swift_toolchain_path=${withval}
-   AC_DEFINE(HAVE_SWIFT, 1, [Define if building for Swift])
-   SWIFTC="$swift_toolchain_path/bin/swiftc"
-   case $target_os in
-      *android*)
-	    os_string="android"
-	    ;;
-      linux*)
-	    os_string="linux"
-	    case $target_cpu in
-		    armv7l*)
-			target_cpu="armv7"
-			;;
-		    armv6l*)
-			target_cpu="armv6"
-			;;
-			*)
-            esac
-	    ;;
-	  *)
-        os_string=$target_os
-		;;
-	esac
-   SWIFT_LIBDIR="$swift_toolchain_path/lib/swift/$os_string/$target_cpu"
-   have_swift=true],
-  [have_swift=false]
-)
-AM_CONDITIONAL(HAVE_SWIFT, $have_swift)
-AC_SUBST([SWIFTC])
-AC_SUBST([SWIFTC_FLAGS])
-AC_SUBST([SWIFT_LIBDIR])
-AC_SUBST([OS_STRING], ["$os_string"])
-
-#
-# Enable use of gold linker when building the Swift overlay
-# to avoid a symbol relocation issue.
-# Ultimately the request to use gold should be passed in as an arg
-#
-AC_CHECK_PROG(use_gold_linker, ld.gold, true, false)
-AM_CONDITIONAL(USE_GOLD_LINKER, $use_gold_linker)
-
-#
-# Enable an extended test suite that includes
-# tests that are too unreliable to be enabled by
-# default in the Swift CI environment, but are still
-# useful for libdispatch developers to be able to run.
-#
-AC_ARG_ENABLE([extended-test-suite],
-  [AS_HELP_STRING([--enable-extended-test-suite],
-    [Include additional test cases that may fail intermittently])]
-)
-AM_CONDITIONAL(EXTENDED_TEST_SUITE, test "x$enable_extended_test_suite" = "xyes")
-
-#
-# Enable __thread based TSD on platforms where it is efficient
-# Allow override based on command line argument to configure
-#
-AC_ARG_ENABLE([thread-local-storage],
-  [AS_HELP_STRING([--enable-thread-local-storage],
-    [Enable usage of thread local storage via __thread])],,
-  [case $target_os in
-      linux*)
-        enable_thread_local_storage=yes
-	    ;;
-      *)
-        enable_thread_local_storage=no
-   esac]
-)
-AS_IF([test "x$enable_thread_local_storage" = "xyes"],
-  [AC_DEFINE(DISPATCH_USE_THREAD_LOCAL_STORAGE, 1,
-    [Enable usage of thread local storage via __thread])]
-)
-
-AC_USE_SYSTEM_EXTENSIONS
-AM_INIT_AUTOMAKE([foreign no-dependencies subdir-objects])
-LT_INIT([disable-static])
-
-AC_PROG_INSTALL
-AC_PATH_PROGS(MIG, mig)
-AC_PATH_PROG(DTRACE, dtrace)
-AS_IF([test "x$DTRACE" != "x"], [use_dtrace=true],[
-  use_dtrace=false
-  CPPFLAGS="$CPPFLAGS -DDISPATCH_USE_DTRACE=0"
-])
-AM_CONDITIONAL(USE_DTRACE, $use_dtrace)
-AC_PATH_PROG(LEAKS, leaks)
-AS_IF([test "x$LEAKS" != "x"],
-  [AC_DEFINE(HAVE_LEAKS, 1, [Define if Apple leaks program is present])
-   have_leaks=true],
-  [have_leaks=false]
-)
-AM_CONDITIONAL(HAVE_LEAKS, $have_leaks)
-
-DISPATCH_C_ATOMIC_BUILTINS
-
-case $dispatch_cv_atomic in
-  yes) ;;
-  -march*) MARCH_FLAGS="$dispatch_cv_atomic"
-         AC_SUBST([MARCH_FLAGS]) ;;
-  *) AC_MSG_ERROR([No gcc builtin atomic operations available]) ;;
-esac
-
-#
-# Find libraries we will need
-#
-AC_SEARCH_LIBS(clock_gettime, rt)
-AC_SEARCH_LIBS(pthread_create, pthread)
-
-AC_CHECK_FUNCS([strlcpy getprogname], [],
-  [PKG_CHECK_MODULES(BSD_OVERLAY, libbsd-overlay,[
-    AC_DEFINE(HAVE_STRLCPY, 1, [])
-    AC_DEFINE(HAVE_GETPROGNAME, 1, [])
-  ])], [#include <string.h>]
-)
-
-#
-# Checks for header files.
-#
-AC_HEADER_STDC
-AC_CHECK_HEADERS([TargetConditionals.h pthread_np.h malloc/malloc.h libkern/OSCrossEndian.h libkern/OSAtomic.h sys/guarded.h fcntl.h])
-
-# hack for pthread/private headers
-AS_IF([test -n "$apple_libpthread_source_path" -a -n "$apple_xnu_source_osfmk_path"], [
-  saveCPPFLAGS="$CPPFLAGS"
-  CPPFLAGS="$CPPFLAGS -I."
-  ln -fsh "$apple_libpthread_source_path"/private/tsd_private.h pthread_machdep.h
-  ln -fsh "$apple_libpthread_source_path"/private pthread
-  ln -fsh "$apple_xnu_source_osfmk_path" System
-  mkdir -p mach && ln -fsh "$apple_xnu_source_osfmk_path"/mach/coalition.h mach
-])
-AC_CHECK_HEADERS([pthread_machdep.h pthread/qos.h])
-
-# pthread_workqueues.
-# We can either use libdispatch's internal_workqueue or pthread_workqueue.
-# If not specifically configured, default to internal_workqueues on
-# Linux and pthread_workqueue on all other platforms.
-# On any platform, if pthread_workqueue is not available, fall back
-# to using internal_workqueue.
-AC_ARG_ENABLE([internal-libpwq],
-  [AS_HELP_STRING([--enable-internal-libpwq],
-    [Use libdispatch's own implementation of pthread workqueues.])],,
-  [case $target_os in
-      linux*)
-        enable_internal_libpwq=yes
-	    ;;
-      *)
-        enable_internal_libpwq=no
-   esac]
-)
-AS_IF([test "x$enable_internal_libpwq" = "xyes"],
-  [AC_DEFINE(DISPATCH_USE_INTERNAL_WORKQUEUE, 1, [Use libdispatch's own implementation of pthread workqueues])
-   have_pthread_workqueues=false,
-   dispatch_use_internal_workqueue=true],
-  [AC_CHECK_HEADERS([pthread/workqueue_private.h pthread_workqueue.h],
-     [AC_DEFINE(HAVE_PTHREAD_WORKQUEUES, 1, [Define if pthread work queues are present])
-      have_pthread_workqueues=true,
-	  dispatch_use_internal_workqueue=false],
-     [have_pthread_workqueues=false,
-	  dispatch_use_internal_workqueue=true]
-  )]
-)
-AM_CONDITIONAL(DISPATCH_USE_INTERNAL_WORKQUEUE, $dispatch_use_internal_workqueue)
-AM_CONDITIONAL(HAVE_PTHREAD_WORKQUEUES, $have_pthread_workqueues)
-
-AC_CHECK_HEADERS([libproc_internal.h], [], [], [#include <mach/mach.h>])
-AC_CHECK_FUNCS([pthread_workqueue_setdispatch_np _pthread_workqueue_init])
-AS_IF([test -n "$apple_libpthread_source_path" -a -n "$apple_xnu_source_osfmk_path"], [
-  rm -f pthread_machdep.h pthread System mach/coalition.h
-  CPPFLAGS="$saveCPPFLAGS"
-  AC_CONFIG_COMMANDS([src/pthread_machdep.h],
-    [ln -fsh "$apple_libpthread_source_path"/private/tsd_private.h src/pthread_machdep.h],
-    [apple_libpthread_source_path="$apple_libpthread_source_path"])
-  AC_CONFIG_COMMANDS([src/pthread],
-    [ln -fsh "$apple_libpthread_source_path"/private src/pthread],
-    [apple_libpthread_source_path="$apple_libpthread_source_path"])
-  AC_CONFIG_COMMANDS([src/System],
-    [ln -fsh "$apple_xnu_source_osfmk_path" src/System],
-    [apple_xnu_source_osfmk_path="$apple_xnu_source_osfmk_path"])
-  AC_CONFIG_COMMANDS([src/mach/coalition.h],
-    [ln -fsh "$apple_xnu_source_osfmk_path"/mach/coalition.h src/mach],
-    [apple_xnu_source_osfmk_path="$apple_xnu_source_osfmk_path"])
-])
-# hack for xnu/bsd/sys/event.h EVFILT_SOCK declaration
-AS_IF([test -n "$apple_xnu_source_bsd_path"], [
-  CPPFLAGS="$CPPFLAGS -DPRIVATE=1"
-])
-
-#
-# Check for CoreFoundation, Foundation and objc
-#
-AC_CHECK_HEADER([CoreFoundation/CoreFoundation.h],
-  [have_corefoundation=true], [have_corefoundation=false]
-)
-AM_CONDITIONAL(HAVE_COREFOUNDATION, $have_corefoundation)
-
-AC_LANG_PUSH([Objective C])
-AC_CHECK_HEADER([Foundation/Foundation.h],
-  [have_foundation=true], [have_foundation=false]
-)
-AM_CONDITIONAL(HAVE_FOUNDATION, $have_foundation)
-AC_CHECK_HEADER([objc/NSObject.h], [
-  AC_DEFINE(HAVE_OBJC, 1, [Define if you have the Objective-C runtime])
-  have_objc=true], [have_objc=false]
-)
-AM_CONDITIONAL(USE_OBJC, $have_objc)
-AC_LANG_POP([Objective C])
-
-#
-# We use the availability of mach.h to decide whether to compile in all sorts
-# of Machisms, including using Mach ports as event sources, etc.
-#
-AC_CHECK_HEADER([mach/mach.h], [
-  AC_DEFINE(HAVE_MACH, 1, [Define if mach is present])
-  AC_DEFINE(__DARWIN_NON_CANCELABLE, 1, [Define if using Darwin $NOCANCEL])
-  have_mach=true], [have_mach=false]
-)
-AM_CONDITIONAL(USE_MIG, $have_mach)
-AC_CHECK_FUNCS([mach_port_construct])
-
-#
-# Find functions and declarations we care about.
-#
-AC_CHECK_DECLS([CLOCK_UPTIME, CLOCK_MONOTONIC, CLOCK_REALTIME, CLOCK_UPTIME_FAST, CLOCK_MONOTONIC_COARSE], [], [],
-  [[#include <time.h>]])
-AC_CHECK_DECLS([NOTE_NONE, NOTE_REAP, NOTE_REVOKE, NOTE_SIGNAL, NOTE_LOWAT], [], [],
-  [[#include <sys/event.h>]])
-AC_CHECK_DECLS([FD_COPY], [], [], [[#include <sys/select.h>]])
-AC_CHECK_DECLS([SIGEMT], [], [], [[#include <signal.h>]])
-AC_CHECK_DECLS([VQ_UPDATE, VQ_VERYLOWDISK, VQ_QUOTA, VQ_NEARLOWDISK, VQ_DESIRED_DISK], [], [], [[#include <sys/mount.h>]])
-AC_CHECK_DECLS([program_invocation_short_name], [], [], [[#include <errno.h>]])
-AC_CHECK_FUNCS([pthread_key_init_np pthread_main_np mach_absolute_time mach_approximate_time malloc_create_zone sysconf])
-
-AC_CHECK_DECLS([POSIX_SPAWN_START_SUSPENDED],
-  [have_posix_spawn_start_suspended=true], [have_posix_spawn_start_suspended=false],
-  [[#include <sys/spawn.h>]]
-)
-AM_CONDITIONAL(HAVE_POSIX_SPAWN_START_SUSPENDED, $have_posix_spawn_start_suspended)
-
-AC_CHECK_FUNC([sem_init],
-  [have_sem_init=true], [have_sem_init=false]
-)
-
-AC_CHECK_HEADER([linux/futex.h], [
-  AC_DEFINE(HAVE_FUTEX, 1, [Define if linux/futex.h is present])
-  have_futex=true], [have_futex=false]
-)
-
-#
-# We support both Mach semaphores and POSIX semaphores; if the former are
-# available, prefer them.
-#
-AC_MSG_CHECKING([what semaphore type to use]);
-AS_IF([test "x$have_mach" = "xtrue"],
-  [AC_DEFINE(USE_MACH_SEM, 1, [Define to use Mach semaphores])
-    AC_MSG_RESULT([Mach semaphores])],
-  [test "x$have_sem_init" = "xtrue"],
-  [AC_DEFINE(USE_POSIX_SEM, 1, [Define to use POSIX semaphores])
-    AC_MSG_RESULT([POSIX semaphores])],
-  [AC_MSG_ERROR([no supported semaphore type])]
-)
-
-AC_CHECK_HEADERS([sys/cdefs.h], [], [],
-  [#ifdef HAVE_SYS_CDEFS_H
-   #include <sys/cdefs.h>
-   #endif])
-
-DISPATCH_C_BLOCKS
-
-AC_CACHE_CHECK([for -fvisibility=hidden], [dispatch_cv_cc_visibility_hidden], [
-  saveCFLAGS="$CFLAGS"
-  CFLAGS="$CFLAGS -fvisibility=hidden"
-  AC_LINK_IFELSE([AC_LANG_PROGRAM([
-    extern __attribute__ ((visibility ("default"))) int foo; int foo;], [foo = 0;])],
-    [dispatch_cv_cc_visibility_hidden="yes"], [dispatch_cv_cc_visibility_hidden="no"])
-  CFLAGS="$saveCFLAGS"
-])
-AS_IF([test "x$dispatch_cv_cc_visibility_hidden" != "xno"], [
-    VISIBILITY_FLAGS="-fvisibility=hidden"
-])
-AC_SUBST([VISIBILITY_FLAGS])
-
-AC_CACHE_CHECK([for -momit-leaf-frame-pointer], [dispatch_cv_cc_omit_leaf_fp], [
-  saveCFLAGS="$CFLAGS"
-  CFLAGS="$CFLAGS -momit-leaf-frame-pointer"
-  AC_LINK_IFELSE([AC_LANG_PROGRAM([
-    extern int foo(void); int foo(void) {return 1;}], [foo();])],
-    [dispatch_cv_cc_omit_leaf_fp="yes"], [dispatch_cv_cc_omit_leaf_fp="no"])
-  CFLAGS="$saveCFLAGS"
-])
-AS_IF([test "x$dispatch_cv_cc_omit_leaf_fp" != "xno"], [
-  OMIT_LEAF_FP_FLAGS="-momit-leaf-frame-pointer"
-])
-AC_SUBST([OMIT_LEAF_FP_FLAGS])
-
-AS_IF([test "x$have_mach" = "xtrue"], [
-  AC_CACHE_CHECK([for darwin linker], [dispatch_cv_ld_darwin], [
-    saveLDFLAGS="$LDFLAGS"
-    LDFLAGS="$LDFLAGS -dynamiclib -compatibility_version 1.2.3 -current_version 4.5.6 -dead_strip"
-    AC_LINK_IFELSE([AC_LANG_PROGRAM([
-      extern int foo; int foo;], [foo = 0;])],
-      [dispatch_cv_ld_darwin="yes"], [dispatch_cv_ld_darwin="no"])
-    LDFLAGS="$saveLDFLAGS"
-  ])
-])
-AM_CONDITIONAL(HAVE_DARWIN_LD, [test "x$dispatch_cv_ld_darwin" == "xyes"])
-
-#
-# symlink platform-specific module.modulemap files
-#
-AS_CASE([$target_os],
-  [darwin*], [ dispatch_module_map_os=darwin ],
-  [ dispatch_module_map_os=generic ]
-)
-AC_CONFIG_COMMANDS([modulemaps], [
-      ln -fs $dispatch_module_map_os/module.modulemap $ac_top_srcdir/dispatch/module.modulemap
-      ln -fs $dispatch_module_map_os/module.modulemap $ac_top_srcdir/private/module.modulemap
-  ],
-  [dispatch_module_map_os="$dispatch_module_map_os"]
-)
-
-#
-# Temporary: some versions of clang do not mark __builtin_trap() as
-# __attribute__((__noreturn__)).  Detect and add if required.
-#
-AC_COMPILE_IFELSE(
-  [AC_LANG_PROGRAM([void __attribute__((__noreturn__)) temp(void) { __builtin_trap(); }], [])],
-  [AC_DEFINE(HAVE_NORETURN_BUILTIN_TRAP, 1, [Define if __builtin_trap marked noreturn])]
-)
-
-#
-# Add option to avoid building tests
-#
-AC_ARG_ENABLE([build-tests],
-  [AS_HELP_STRING([--disable-build-tests], [Disable tests compilation])])
-AM_CONDITIONAL(BUILD_TESTS, [test "x$enable_build_tests" != "xno"])
-
-#
-# Generate Makefiles.
-#
-AC_CONFIG_FILES([Makefile dispatch/Makefile man/Makefile os/Makefile private/Makefile src/Makefile tests/Makefile])
-
-#
-# Generate testsuite links
-#
-AC_CONFIG_LINKS([tests/dispatch:$ac_top_srcdir/private tests/leaks-wrapper:tests/leaks-wrapper.sh])
-
-AC_OUTPUT
diff --git a/dispatch/Makefile.am b/dispatch/Makefile.am
deleted file mode 100644
index 89fd3da..0000000
--- a/dispatch/Makefile.am
+++ /dev/null
@@ -1,28 +0,0 @@
-#
-#
-#
-
-if HAVE_SWIFT
-dispatchdir=${prefix}/lib/swift/dispatch
-else
-dispatchdir=$(includedir)/dispatch
-endif
-
-dispatch_HEADERS=	\
-	base.h			\
-	block.h			\
-	data.h			\
-	dispatch.h		\
-	group.h			\
-	introspection.h	\
-	io.h			\
-	object.h		\
-	once.h			\
-	queue.h			\
-	semaphore.h		\
-	source.h		\
-	time.h
-
-if HAVE_SWIFT
-dispatch_HEADERS+=module.modulemap
-endif
diff --git a/m4/.gitignore b/m4/.gitignore
deleted file mode 100644
index 38066dd..0000000
--- a/m4/.gitignore
+++ /dev/null
@@ -1,5 +0,0 @@
-libtool.m4
-ltoptions.m4
-ltsugar.m4
-ltversion.m4
-lt~obsolete.m4
diff --git a/m4/atomic.m4 b/m4/atomic.m4
deleted file mode 100644
index ba85004..0000000
--- a/m4/atomic.m4
+++ /dev/null
@@ -1,21 +0,0 @@
-AC_DEFUN([DISPATCH_C_ATOMIC_BUILTINS], [
-#
-# This is a bit subtle: on i386 systems without at least -march=i486 defined,
-# certain built-in atomics fall back to depending on undefined symbols if
-# their return values are used.
-#
-AC_CACHE_CHECK([for gcc atomic builtins],[dispatch_cv_atomic],
-[AC_LINK_IFELSE([AC_LANG_PROGRAM([],[[
-int i, x =0;
-i = __sync_add_and_fetch(&x,1);
-return x;]])],[dispatch_cv_atomic=yes],
-  [saveCFLAGS="$CFLAGS"
-  CFLAGS="$CFLAGS -march=i486"
-  AC_LINK_IFELSE([AC_LANG_PROGRAM([],[[
-  int i, x =0;
-  i = __sync_add_and_fetch(&x,1);
-  return x;]])],[CFLAGS="$saveCFLAGS"
-dispatch_cv_atomic="-march=i486"
-])])])
-
-])
diff --git a/m4/blocks.m4 b/m4/blocks.m4
deleted file mode 100644
index 38a8610..0000000
--- a/m4/blocks.m4
+++ /dev/null
@@ -1,132 +0,0 @@
-AC_DEFUN([DISPATCH_C_BLOCKS], [
-#
-# Allow configure to be passed a path to the directory where it should look
-# for the Blocks runtime library, if any.
-#
-AC_ARG_WITH([blocks-runtime],
-  [AS_HELP_STRING([--with-blocks-runtime],
-    [Specify path to the blocks runtime])],
-  [blocks_runtime=${withval}
-    LIBS="$LIBS -L$blocks_runtime"]
-)
-
-#
-# Configure argument to enable/disable using an embedded blocks runtime
-#
-AC_ARG_ENABLE([embedded_blocks_runtime],
-  [AS_HELP_STRING([--enable-embedded-blocks-runtime],
-    [Embed blocks runtime in libdispatch [default=yes on Linux, default=no on all other platforms]])],,
-  [case $target_os in
-      linux*)
-        enable_embedded_blocks_runtime=yes
-	    ;;
-      *)
-        enable_embedded_blocks_runtime=no
-   esac]
-)
-
-#
-# Detect compiler support for Blocks; perhaps someday -fblocks won't be
-# required, in which case we'll need to change this.
-#
-AC_CACHE_CHECK([for C Blocks support], [dispatch_cv_cblocks], [
-  saveCFLAGS="$CFLAGS"
-  CFLAGS="$CFLAGS -fblocks"
-  AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[(void)^{int i; i = 0; }();])], [
-    CFLAGS="$saveCFLAGS"
-    dispatch_cv_cblocks="-fblocks"
-  ], [
-    CFLAGS="$saveCFLAGS"
-    dispatch_cv_cblocks="no"
-  ])
-])
-
-AS_IF([test "x$dispatch_cv_cblocks" != "xno"], [
-    CBLOCKS_FLAGS="$dispatch_cv_cblocks"
-
-	AS_IF([test "x$enable_embedded_blocks_runtime" != "xyes"], [
-	    #
-	    # It may be necessary to directly link the Blocks runtime on some
-	    # systems, so give it a try if we can't link a C program that uses
-	    # Blocks.  We will want to remove this at somepoint, as really -fblocks
-	    # should force that linkage already.
-	    #
-	    saveCFLAGS="$CFLAGS"
-	    CFLAGS="$CFLAGS -fblocks -O0"
-	    AC_MSG_CHECKING([whether additional libraries are required for the Blocks runtime])
-	    AC_TRY_LINK([], [
-		^{ int j; j=0; }();
-	    ], [
-		AC_MSG_RESULT([no]);
-	    ], [
-	      saveLIBS="$LIBS"
-	      LIBS="$LIBS -lBlocksRuntime"
-	      AC_TRY_LINK([], [
-		^{ int k; k=0; }();
-	      ], [
-		AC_MSG_RESULT([-lBlocksRuntime])
-	      ], [
-		AC_MSG_ERROR([can't find Blocks runtime])
-	      ])
-	    ])
-	])
-    CFLAGS="$saveCFLAGS"
-    have_cblocks=true
-], [
-    CBLOCKS_FLAGS=""
-    have_cblocks=false
-])
-AM_CONDITIONAL(HAVE_CBLOCKS, $have_cblocks)
-AC_SUBST([CBLOCKS_FLAGS])
-AM_CONDITIONAL([BUILD_OWN_BLOCKS_RUNTIME], [test "x$enable_embedded_blocks_runtime" = "xyes"])
-
-#
-# Because a different C++ compiler may be specified than C compiler, we have
-# to do it again for C++.
-#
-AC_LANG_PUSH([C++])
-AC_CACHE_CHECK([for C++ Blocks support], [dispatch_cv_cxxblocks], [
-  saveCXXFLAGS="$CXXFLAGS"
-  CXXFLAGS="$CXXFLAGS -fblocks"
-  AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[(void)^{int i; i = 0; }();])], [
-    CXXFLAGS="$saveCXXFLAGS"
-    dispatch_cv_cxxblocks="-fblocks"
-  ], [
-    CXXFLAGS="$saveCXXFLAGS"
-    dispatch_cv_cxxblocks="no"
-  ])
-])
-
-AS_IF([test "x$dispatch_cv_cxxblocks" != "xno"], [
-    CXXBLOCKS_FLAGS="$dispatch_cv_cxxblocks"
-
-	AS_IF([test "x$enable_embedded_blocks_runtime" != "xyes"], [
-	    saveCXXFLAGS="$CXXFLAGS"
-	    CXXFLAGS="$CXXFLAGS -fblocks -O0"
-	    AC_MSG_CHECKING([whether additional libraries are required for the Blocks runtime])
-	    AC_TRY_LINK([], [
-		^{ int j; j=0; }();
-	    ], [
-		AC_MSG_RESULT([no]);
-	    ], [
-	      saveLIBS="$LIBS"
-	      LIBS="$LIBS -lBlocksRuntime"
-	      AC_TRY_LINK([], [
-		^{ int k; k=0; }();
-	      ], [
-		AC_MSG_RESULT([-lBlocksRuntime])
-	      ], [
-		AC_MSG_ERROR([can't find Blocks runtime])
-	      ])
-	    ])
-	])
-    CXXFLAGS="$saveCXXFLAGS"
-    have_cxxblocks=true
-], [
-    CXXBLOCKS_FLAGS=""
-    have_cxxblocks=false
-])
-AC_LANG_POP([C++])
-AM_CONDITIONAL(HAVE_CXXBLOCKS, $have_cxxblocks)
-AC_SUBST([CXXBLOCKS_FLAGS])
-])
diff --git a/m4/pkg.m4 b/m4/pkg.m4
deleted file mode 100644
index a0b9cd4..0000000
--- a/m4/pkg.m4
+++ /dev/null
@@ -1,155 +0,0 @@
-# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
-# 
-# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
-#
-# 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 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, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#
-# 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.
-
-# PKG_PROG_PKG_CONFIG([MIN-VERSION])
-# ----------------------------------
-AC_DEFUN([PKG_PROG_PKG_CONFIG],
-[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
-m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
-AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
-if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
-	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
-fi
-if test -n "$PKG_CONFIG"; then
-	_pkg_min_version=m4_default([$1], [0.9.0])
-	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
-	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
-		AC_MSG_RESULT([yes])
-	else
-		AC_MSG_RESULT([no])
-		PKG_CONFIG=""
-	fi
-		
-fi[]dnl
-])# PKG_PROG_PKG_CONFIG
-
-# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
-#
-# Check to see whether a particular set of modules exists.  Similar
-# to PKG_CHECK_MODULES(), but does not set variables or print errors.
-#
-#
-# Similar to PKG_CHECK_MODULES, make sure that the first instance of
-# this or PKG_CHECK_MODULES is called, or make sure to call
-# PKG_CHECK_EXISTS manually
-# --------------------------------------------------------------
-AC_DEFUN([PKG_CHECK_EXISTS],
-[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
-if test -n "$PKG_CONFIG" && \
-    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
-  m4_ifval([$2], [$2], [:])
-m4_ifvaln([$3], [else
-  $3])dnl
-fi])
-
-
-# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
-# ---------------------------------------------
-m4_define([_PKG_CONFIG],
-[if test -n "$$1"; then
-    pkg_cv_[]$1="$$1"
- elif test -n "$PKG_CONFIG"; then
-    PKG_CHECK_EXISTS([$3],
-                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
-		     [pkg_failed=yes])
- else
-    pkg_failed=untried
-fi[]dnl
-])# _PKG_CONFIG
-
-# _PKG_SHORT_ERRORS_SUPPORTED
-# -----------------------------
-AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
-[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
-        _pkg_short_errors_supported=yes
-else
-        _pkg_short_errors_supported=no
-fi[]dnl
-])# _PKG_SHORT_ERRORS_SUPPORTED
-
-
-# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
-# [ACTION-IF-NOT-FOUND])
-#
-#
-# Note that if there is a possibility the first call to
-# PKG_CHECK_MODULES might not happen, you should be sure to include an
-# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
-#
-#
-# --------------------------------------------------------------
-AC_DEFUN([PKG_CHECK_MODULES],
-[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
-AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
-AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
-
-pkg_failed=no
-AC_MSG_CHECKING([for $1])
-
-_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
-_PKG_CONFIG([$1][_LIBS], [libs], [$2])
-
-m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
-and $1[]_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.])
-
-if test $pkg_failed = yes; then
-        _PKG_SHORT_ERRORS_SUPPORTED
-        if test $_pkg_short_errors_supported = yes; then
-	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
-        else 
-	        $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
-        fi
-	# Put the nasty error message in config.log where it belongs
-	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
-
-	ifelse([$4], , [AC_MSG_ERROR(dnl
-[Package requirements ($2) were not met:
-
-$$1_PKG_ERRORS
-
-Consider adjusting the PKG_CONFIG_PATH environment variable if you
-installed software in a non-standard prefix.
-
-_PKG_TEXT
-])],
-		[AC_MSG_RESULT([no])
-                $4])
-elif test $pkg_failed = untried; then
-	ifelse([$4], , [AC_MSG_FAILURE(dnl
-[The pkg-config script could not be found or is too old.  Make sure it
-is in your PATH or set the PKG_CONFIG environment variable to the full
-path to pkg-config.
-
-_PKG_TEXT
-
-To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
-		[$4])
-else
-	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
-	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
-        AC_MSG_RESULT([yes])
-	ifelse([$3], , :, [$3])
-fi[]dnl
-])# PKG_CHECK_MODULES
diff --git a/man/Makefile.am b/man/Makefile.am
deleted file mode 100644
index 3ca6946..0000000
--- a/man/Makefile.am
+++ /dev/null
@@ -1,152 +0,0 @@
-#
-#
-#
-
-if !HAVE_SWIFT
-dist_man3_MANS=					\
-	dispatch.3					\
-	dispatch_after.3			\
-	dispatch_api.3				\
-	dispatch_apply.3			\
-	dispatch_async.3			\
-	dispatch_data_create.3		\
-	dispatch_group_create.3		\
-	dispatch_io_create.3		\
-	dispatch_io_read.3			\
-	dispatch_object.3			\
-	dispatch_once.3				\
-	dispatch_queue_create.3		\
-	dispatch_read.3				\
-	dispatch_semaphore_create.3	\
-	dispatch_source_create.3	\
-	dispatch_time.3
-
-EXTRA_DIST=						\
-	dispatch_benchmark.3
-
-#
-# Install man page hardlinks.  Is there a better way to do this in automake?
-#
-
-LN=ln
-
-install-data-hook:
-	cd $(DESTDIR)$(mandir)/man3 &&	\
-		$(LN) -f dispatch_after.3 dispatch_after_f.3 &&	\
-		$(LN) -f dispatch_apply.3 dispatch_apply_f.3 &&	\
-		$(LN) -f dispatch_async.3 dispatch_sync.3 &&	\
-		$(LN) -f dispatch_async.3 dispatch_async_f.3 &&	\
-		$(LN) -f dispatch_async.3 dispatch_sync_f.3 &&	\
-		$(LN) -f dispatch_group_create.3 dispatch_group_enter.3 &&	\
-		$(LN) -f dispatch_group_create.3 dispatch_group_leave.3 &&	\
-		$(LN) -f dispatch_group_create.3 dispatch_group_wait.3 &&	\
-		$(LN) -f dispatch_group_create.3 dispatch_group_notify.3 &&	\
-		$(LN) -f dispatch_group_create.3 dispatch_group_notify_f.3 &&	\
-		$(LN) -f dispatch_group_create.3 dispatch_group_async.3 &&	\
-		$(LN) -f dispatch_group_create.3 dispatch_group_async_f.3 &&	\
-		$(LN) -f dispatch_object.3 dispatch_retain.3 &&	\
-		$(LN) -f dispatch_object.3 dispatch_release.3 &&	\
-		$(LN) -f dispatch_object.3 dispatch_suspend.3 &&	\
-		$(LN) -f dispatch_object.3 dispatch_resume.3 &&	\
-		$(LN) -f dispatch_object.3 dispatch_get_context.3 &&	\
-		$(LN) -f dispatch_object.3 dispatch_set_context.3 &&	\
-		$(LN) -f dispatch_object.3 dispatch_set_finalizer_f.3 &&	\
-		$(LN) -f dispatch_once.3 dispatch_once_f.3 &&	\
-		$(LN) -f dispatch_queue_create.3 dispatch_queue_get_label.3 &&	\
-		$(LN) -f dispatch_queue_create.3 dispatch_get_current_queue.3 &&	\
-		$(LN) -f dispatch_queue_create.3 dispatch_get_global_queue.3 &&	\
-		$(LN) -f dispatch_queue_create.3 dispatch_get_main_queue.3 &&	\
-		$(LN) -f dispatch_queue_create.3 dispatch_main.3 &&	\
-		$(LN) -f dispatch_queue_create.3 dispatch_set_target_queue.3 &&	\
-		$(LN) -f dispatch_semaphore_create.3 dispatch_semaphore_signal.3 &&	\
-		$(LN) -f dispatch_semaphore_create.3 dispatch_semaphore_wait.3 &&	\
-		$(LN) -f dispatch_source_create.3 dispatch_source_set_event_handler.3 &&	\
-		$(LN) -f dispatch_source_create.3 dispatch_source_set_event_handler_f.3 &&	\
-		$(LN) -f dispatch_source_create.3 dispatch_source_set_registration_handler.3 &&	\
-		$(LN) -f dispatch_source_create.3 dispatch_source_set_registration_handler_f.3 &&	\
-		$(LN) -f dispatch_source_create.3 dispatch_source_set_cancel_handler.3 &&	\
-		$(LN) -f dispatch_source_create.3 dispatch_source_set_cancel_handler_f.3 &&	\
-		$(LN) -f dispatch_source_create.3 dispatch_source_cancel.3 &&	\
-		$(LN) -f dispatch_source_create.3 dispatch_source_testcancel.3 &&	\
-		$(LN) -f dispatch_source_create.3 dispatch_source_get_handle.3 &&	\
-		$(LN) -f dispatch_source_create.3 dispatch_source_get_mask.3 &&	\
-		$(LN) -f dispatch_source_create.3 dispatch_source_get_data.3 &&	\
-		$(LN) -f dispatch_source_create.3 dispatch_source_merge_data.3 &&	\
-		$(LN) -f dispatch_source_create.3 dispatch_source_set_timer.3 &&	\
-		$(LN) -f dispatch_time.3 dispatch_walltime.3 &&	\
-		$(LN) -f dispatch_data_create.3 dispatch_data_create_concat.3 &&	\
-		$(LN) -f dispatch_data_create.3 dispatch_data_create_subrange.3 &&	\
-		$(LN) -f dispatch_data_create.3 dispatch_data_create_map.3 &&	\
-		$(LN) -f dispatch_data_create.3 dispatch_data_apply.3 &&	\
-		$(LN) -f dispatch_data_create.3 dispatch_data_copy_region.3 &&	\
-		$(LN) -f dispatch_data_create.3 dispatch_data_get_size.3 &&	\
-		$(LN) -f dispatch_data_create.3 dispatch_data_empty.3 &&	\
-		$(LN) -f dispatch_io_create.3 dispatch_io_create_with_path.3 &&	\
-		$(LN) -f dispatch_io_create.3 dispatch_io_set_high_water.3 &&	\
-		$(LN) -f dispatch_io_create.3 dispatch_io_set_low_water.3 &&	\
-		$(LN) -f dispatch_io_create.3 dispatch_io_set_interval.3 &&	\
-		$(LN) -f dispatch_io_create.3 dispatch_io_close.3 &&	\
-		$(LN) -f dispatch_io_create.3 dispatch_io_barrier.3 &&	\
-		$(LN) -f dispatch_io_read.3 dispatch_io_write.3 &&	\
-		$(LN) -f dispatch_read.3 dispatch_write.3
-
-uninstall-hook:
-	cd $(DESTDIR)$(mandir)/man3 &&	\
-		rm -f dispatch_after_f.3	\
-			dispatch_apply_f.3	\
-			dispatch_sync.3	\
-			dispatch_async_f.3	\
-			dispatch_sync_f.3	\
-			dispatch_group_enter.3	\
-			dispatch_group_leave.3	\
-			dispatch_group_wait.3	\
-			dispatch_group_notify.3	\
-			dispatch_group_notify_f.3	\
-			dispatch_group_async.3	\
-			dispatch_group_async_f.3	\
-			dispatch_retain.3	\
-			dispatch_release.3	\
-			dispatch_suspend.3	\
-			dispatch_resume.3	\
-			dispatch_get_context.3	\
-			dispatch_set_context.3	\
-			dispatch_set_finalizer_f.3	\
-			dispatch_once_f.3	\
-			dispatch_queue_get_label.3	\
-			dispatch_get_current_queue.3	\
-			dispatch_get_global_queue.3	\
-			dispatch_get_main_queue.3	\
-			dispatch_main.3	\
-			dispatch_set_target_queue.3	\
-			dispatch_semaphore_signal.3	\
-			dispatch_semaphore_wait.3	\
-			dispatch_source_set_event_handler.3	\
-			dispatch_source_set_event_handler_f.3	\
-			dispatch_source_set_registration_handler.3	\
-			dispatch_source_set_registration_handler_f.3	\
-			dispatch_source_set_cancel_handler.3	\
-			dispatch_source_set_cancel_handler_f.3	\
-			dispatch_source_cancel.3	\
-			dispatch_source_testcancel.3	\
-			dispatch_source_get_handle.3	\
-			dispatch_source_get_mask.3	\
-			dispatch_source_get_data.3	\
-			dispatch_source_merge_data.3	\
-			dispatch_source_set_timer.3	\
-			dispatch_walltime.3	\
-			dispatch_data_create_concat.3	\
-			dispatch_data_create_subrange.3	\
-			dispatch_data_create_map.3	\
-			dispatch_data_apply.3	\
-			dispatch_data_copy_region.3	\
-			dispatch_data_get_size.3	\
-			dispatch_data_empty.3	\
-			dispatch_io_create_with_path.3	\
-			dispatch_io_set_high_water.3	\
-			dispatch_io_set_low_water.3	\
-			dispatch_io_set_interval.3	\
-			dispatch_io_close.3	\
-			dispatch_io_barrier.3	\
-			dispatch_io_write.3	\
-			dispatch_write.3
-endif
diff --git a/os/Makefile.am b/os/Makefile.am
deleted file mode 100644
index 8be68d7..0000000
--- a/os/Makefile.am
+++ /dev/null
@@ -1,18 +0,0 @@
-#
-#
-#
-
-if HAVE_SWIFT
-osdir=${prefix}/lib/swift/os
-else
-osdir=$(includedir)/os
-endif
-
-os_HEADERS=	\
-	object.h \
-	generic_unix_base.h
-
-noinst_HEADERS=	\
-	object_private.h \
-	voucher_activity_private.h \
-	voucher_private.h
diff --git a/private/Makefile.am b/private/Makefile.am
deleted file mode 100644
index 98840d5..0000000
--- a/private/Makefile.am
+++ /dev/null
@@ -1,15 +0,0 @@
-#
-#
-#
-
-noinst_HEADERS=			\
-	benchmark.h			\
-	data_private.h		\
-	introspection_private.h \
-	io_private.h		\
-	layout_private.h	\
-	mach_private.h		\
-	private.h			\
-	queue_private.h		\
-	source_private.h
-
diff --git a/src/Makefile.am b/src/Makefile.am
deleted file mode 100644
index e6d31f5..0000000
--- a/src/Makefile.am
+++ /dev/null
@@ -1,200 +0,0 @@
-#
-#
-#
-
-if HAVE_SWIFT
-swiftlibdir=${prefix}/lib/swift/${OS_STRING}
-swiftlib_LTLIBRARIES=libdispatch.la
-else
-lib_LTLIBRARIES=libdispatch.la
-endif
-
-if DISPATCH_USE_INTERNAL_WORKQUEUE
-INTERNAL_WORKQUEUE_SOURCES= 	\
-	event/workqueue.c		\
-	event/workqueue_internal.h
-endif
-
-libdispatch_la_SOURCES=			\
-	allocator.c			\
-	apply.c				\
-	benchmark.c			\
-	data.c				\
-	init.c				\
-	introspection.c			\
-	io.c				\
-	mach.c				\
-	object.c			\
-	once.c				\
-	queue.c				\
-	semaphore.c			\
-	source.c			\
-	time.c				\
-	transform.c			\
-	voucher.c			\
-	protocol.defs			\
-	provider.d			\
-	allocator_internal.h		\
-	data_internal.h			\
-	inline_internal.h		\
-	internal.h			\
-	introspection_internal.h	\
-	io_internal.h			\
-	mach_internal.h			\
-	object_internal.h		\
-	queue_internal.h		\
-	semaphore_internal.h		\
-	shims.h				\
-	source_internal.h		\
-	trace.h				\
-	voucher_internal.h		\
-	event/event.c			\
-	event/event_config.h		\
-	event/event_epoll.c		\
-	event/event_internal.h		\
-	event/event_kevent.c		\
-	firehose/firehose_internal.h	\
-	shims/android_stubs.h	\
-	shims/atomic.h			\
-	shims/atomic_sfb.h		\
-	shims/getprogname.h		\
-	shims/hw_config.h		\
-	shims/generic_unix_stubs.c		\
-	shims/generic_unix_stubs.h		\
-	shims/lock.c			\
-	shims/lock.h			\
-	shims/perfmon.h			\
-	shims/time.h			\
-	shims/tsd.h			\
-	shims/yield.h			\
-	$(INTERNAL_WORKQUEUE_SOURCES)
-
-EXTRA_libdispatch_la_SOURCES=
-EXTRA_libdispatch_la_DEPENDENCIES=
-
-AM_CPPFLAGS=-I$(top_builddir) -I$(top_srcdir) -I$(top_srcdir)/private
-
-DISPATCH_CFLAGS=-Wall $(VISIBILITY_FLAGS) $(OMIT_LEAF_FP_FLAGS) \
-	$(MARCH_FLAGS) $(BSD_OVERLAY_CFLAGS)
-if DISPATCH_ENABLE_ASSERTS
-DISPATCH_CFLAGS+=-DDISPATCH_DEBUG=1
-endif
-AM_CFLAGS= $(PTHREAD_WORKQUEUE_CFLAGS) $(DISPATCH_CFLAGS) $(CBLOCKS_FLAGS)
-AM_OBJCFLAGS=$(DISPATCH_CFLAGS) $(CBLOCKS_FLAGS)
-AM_CXXFLAGS=$(PTHREAD_WORKQUEUE_CFLAGS) $(DISPATCH_CFLAGS) $(CXXBLOCKS_FLAGS)
-AM_OBJCXXFLAGS=$(DISPATCH_CFLAGS) $(CXXBLOCKS_FLAGS)
-
-if HAVE_PTHREAD_WORKQUEUES
-  PTHREAD_WORKQUEUE_LIBS=-lpthread_workqueue
-  PTHREAD_WORKQUEUE_CFLAGS=
-endif
-
-if BUILD_OWN_BLOCKS_RUNTIME
-libdispatch_la_SOURCES+= BlocksRuntime/data.c BlocksRuntime/runtime.c
-CBLOCKS_FLAGS+= -I$(top_srcdir)/src/BlocksRuntime
-CXXBLOCKS_FLAGS+= -I$(top_srcdir)/src/BlocksRuntime
-if USE_OBJC
-BLOCKS_RUNTIME_LIBS=-ldl
-endif
-endif
-
-libdispatch_la_LDFLAGS=-avoid-version
-libdispatch_la_LIBADD=$(PTHREAD_WORKQUEUE_LIBS) $(BSD_OVERLAY_LIBS) $(BLOCKS_RUNTIME_LIBS)
-
-if HAVE_DARWIN_LD
-libdispatch_la_LDFLAGS+=-Wl,-compatibility_version,1 \
-	-Wl,-current_version,$(VERSION) -Wl,-dead_strip \
-	-Wl,-alias_list,$(top_srcdir)/xcodeconfig/libdispatch.aliases
-endif
-
-if USE_GOLD_LINKER
-libdispatch_la_LDFLAGS+=-Xcompiler -fuse-ld=gold
-endif
-
-if USE_OBJC
-libdispatch_la_SOURCES+=block.cpp data.m object.m
-libdispatch_la_OBJCFLAGS=$(AM_OBJCFLAGS) -Wno-switch -fobjc-gc
-libdispatch_la_CXXFLAGS=$(AM_CXXFLAGS) -std=gnu++11 -fno-exceptions
-libdispatch_la_LDFLAGS+=-Wl,-upward-lobjc -Wl,-upward-lauto \
-	-Wl,-order_file,$(top_srcdir)/xcodeconfig/libdispatch.order
-else
-libdispatch_la_SOURCES+=block.cpp
-libdispatch_la_CXXFLAGS=$(AM_CXXFLAGS) -std=gnu++11 -fno-exceptions
-endif
-
-if USE_MIG
-MIG_SOURCES=				\
-	protocolUser.c			\
-	protocol.h				\
-	protocolServer.c		\
-	protocolServer.h
-
-%User.c %.h %Server.c %Server.h: $(abs_srcdir)/%.defs
-	$(MIG) -user $*User.c -header $*.h \
-	    -server $*Server.c -sheader $*Server.h $<
-endif
-
-if USE_DTRACE
-DTRACE_SOURCES=provider.h
-
-%.h: $(abs_srcdir)/%.d
-	$(DTRACE) -h -s $< -o $@
-endif
-
-if HAVE_SWIFT
-SWIFT_SRC_FILES=\
-	swift/Block.swift \
-	swift/Data.swift \
-	swift/Dispatch.swift \
-	swift/IO.swift \
-	swift/Private.swift \
-	swift/Queue.swift \
-	swift/Source.swift \
-	swift/Time.swift \
-	swift/Wrapper.swift
-
-SWIFT_ABS_SRC_FILES = $(SWIFT_SRC_FILES:%=$(abs_srcdir)/%)
-SWIFT_OBJ_FILES = $(abs_builddir)/swift/swift_overlay.o
-SWIFT_LIBTOOL_OBJ_FILES = $(abs_builddir)/swift/swift_overlay.lo
-
-SWIFTC_FLAGS+= -Xcc -fmodule-map-file=$(abs_top_srcdir)/dispatch/module.modulemap -I$(abs_top_srcdir) -Xcc -fblocks
-if DISPATCH_ENABLE_OPTIMIZATION
-SWIFTC_FLAGS+=-O
-endif
-
-# this saves the object file, then tricks libtool into generating a .lo file and
-# then moves the object file back in the places libtool expects them to be for
-# the PIC and non-PIC case.
-$(abs_builddir)/swift/swift_overlay.lo:	$(abs_builddir)/swift/swift_overlay.o
-	mv $(abs_builddir)/swift/swift_overlay.o $(abs_builddir)/swift/.libs/swift_overlay.o.save
-	$(LIBTOOL) --mode=compile --tag=CC true -o $< -c /dev/null
-	cp $(abs_builddir)/swift/.libs/swift_overlay.o.save $(abs_builddir)/swift/.libs/swift_overlay.o
-	mv $(abs_builddir)/swift/.libs/swift_overlay.o.save $(abs_builddir)/swift/swift_overlay.o
-
-$(abs_builddir)/swift/swift_overlay.o:	$(SWIFT_ABS_SRC_FILES) $(SWIFTC)
-	@rm -f $@
-	$(SWIFTC) -whole-module-optimization -emit-library -c $(SWIFT_ABS_SRC_FILES) \
-	$(SWIFTC_FLAGS) -module-name Dispatch -module-link-name dispatch \
-	-o $@ -emit-module-path $(abs_builddir)/swift/Dispatch.swiftmodule
-
-libdispatch_la_SOURCES+=swift/DispatchStubs.cc
-EXTRA_libdispatch_la_SOURCES+=$(SWIFT_SRC_FILES)
-
-EXTRA_libdispatch_la_DEPENDENCIES+=$(SWIFT_OBJ_FILES) $(SWIFT_LIBTOOL_OBJ_FILES) $(abs_builddir)/swift/Dispatch.swiftmodule
-libdispatch_la_LIBADD+=$(SWIFT_LIBTOOL_OBJ_FILES)
-
-SWIFT_GEN_FILES=	\
-	$(abs_builddir)/swift/Dispatch.swiftmodule \
-	$(abs_builddir)/swift/Dispatch.swiftdoc \
-	$(SWIFT_OBJ_FILES)
-
-swiftmoddir=${prefix}/lib/swift/${OS_STRING}/${target_cpu}
-swiftmod_HEADERS=\
-	$(abs_builddir)/swift/Dispatch.swiftmodule \
-	$(abs_builddir)/swift/Dispatch.swiftdoc
-endif
-
-BUILT_SOURCES=$(MIG_SOURCES) $(DTRACE_SOURCES)
-nodist_libdispatch_la_SOURCES=$(BUILT_SOURCES)
-CLEANFILES=$(BUILT_SOURCES) $(SWIFT_GEN_FILES)
-DISTCLEANFILES=pthread_machdep.h pthread System mach objc
diff --git a/tests/Makefile.am b/tests/Makefile.am
deleted file mode 100644
index 56e5b58..0000000
--- a/tests/Makefile.am
+++ /dev/null
@@ -1,160 +0,0 @@
-#
-#
-#
-
-AUTOMAKE_OPTIONS = subdir-objects
-
-noinst_LTLIBRARIES=libbsdtests.la
-
-libbsdtests_la_SOURCES=				\
-	bsdtests.c				\
-	bsdtests.h				\
-	dispatch_test.c				\
-	dispatch_test.h				\
-	linux_port.h
-
-check_PROGRAMS=					\
-	bsdtestharness				\
-	bsdtestsummarize			\
-	$(TESTS)
-
-noinst_SCRIPTS=leaks-wrapper.sh
-
-# Tests that have not been ported to Linux
-# because they test unsupported functionality.
-UNPORTED_TESTS=					\
-	dispatch_deadname			\
-	dispatch_proc				\
-	dispatch_vm					\
-	dispatch_vnode
-
-# Tests that usually pass, but occasionally fail
-# and are therefore not suitable for general CI usage.
-UNRELIABLE_TESTS=				\
-	dispatch_priority			\
-	dispatch_priority2			\
-	dispatch_concur				\
-	dispatch_read				\
-	dispatch_read2				\
-	dispatch_suspend_timer		\
-	dispatch_pingpong			\
-	dispatch_drift				\
-	dispatch_readsync			\
-	dispatch_cascade			\
-	dispatch_io
-
-if EXTENDED_TEST_SUITE
-ADDITIONAL_TESTS= $(UNRELIABLE_TESTS)
-else
-ADDITIONAL_TESTS=
-endif
-
-# The set of tests that will be run by 'make check'
-TESTS=							\
-	dispatch_apply				\
-	dispatch_api				\
-	dispatch_c99				\
-	dispatch_debug				\
-	dispatch_queue_finalizer	\
-	dispatch_group				\
-	dispatch_overcommit			\
-	dispatch_plusplus			\
-	dispatch_context_for_key	\
-	dispatch_after				\
-	dispatch_timer				\
-	dispatch_timer_short		\
-	dispatch_timer_timeout		\
-	dispatch_sema				\
-	dispatch_timer_bit31		\
-	dispatch_timer_bit63		\
-	dispatch_timer_set_time		\
-	dispatch_starfish			\
-	dispatch_data				\
-	dispatch_io_net				\
-	dispatch_select				\
-	$(ADDITIONAL_TESTS)
-
-# For testing in swift.org CI system; make deadlines lenient by default
-# to reduce probability of test failures due to machine load.
-if HAVE_SWIFT
-CI_CFLAGS=-DLENIENT_DEADLINES=1
-endif
-
-dispatch_c99_CFLAGS=$(DISPATCH_TESTS_CFLAGS) $(CBLOCKS_FLAGS) -std=c99
-dispatch_plusplus_SOURCES=dispatch_plusplus.cpp
-dispatch_priority2_SOURCES=dispatch_priority.c
-dispatch_priority2_CPPFLAGS=$(AM_CPPFLAGS) -DUSE_SET_TARGET_QUEUE=1
-
-AM_CPPFLAGS=-I$(top_builddir) -I$(top_srcdir)
-
-DISPATCH_TESTS_CFLAGS=-Wall -Wno-deprecated-declarations $(MARCH_FLAGS) $(CI_CFLAGS)
-AM_CFLAGS=$(DISPATCH_TESTS_CFLAGS) $(CBLOCKS_FLAGS) $(BSD_OVERLAY_CFLAGS)
-AM_OBJCFLAGS=$(DISPATCH_TESTS_CFLAGS) $(CBLOCKS_FLAGS)
-AM_CXXFLAGS=$(DISPATCH_TESTS_CFLAGS) $(CXXBLOCKS_FLAGS) $(BSD_OVERLAY_CFLAGS)
-AM_OBJCXXFLAGS=$(DISPATCH_TESTS_CFLAGS) $(CXXBLOCKS_FLAGS)
-
-if HAVE_PTHREAD_WORKQUEUES
-  PTHREAD_WORKQUEUE_LIBS=-lpthread_workqueue
-endif
-
-if BUILD_OWN_BLOCKS_RUNTIME
-CBLOCKS_FLAGS+= -I$(top_srcdir)/src/BlocksRuntime
-CXXBLOCKS_FLAGS+= -I$(top_srcdir)/src/BlocksRuntime
-endif
-
-if HAVE_SWIFT
-  SWIFT_LIBS=-L$(SWIFT_LIBDIR) -lswiftCore -lswiftSwiftOnoneSupport
-  AM_LDFLAGS=-rpath $(SWIFT_LIBDIR)
-endif
-
-LDADD=libbsdtests.la $(top_builddir)/src/libdispatch.la $(PTHREAD_WORKQUEUE_LIBS) $(BSD_OVERLAY_LIBS) $(SWIFT_LIBS)
-libbsdtests_la_LDFLAGS=-avoid-version
-
-bsdtestsummarize_LDADD=-lm $(BSD_OVERLAY_LIBS)
-dispatch_timer_short_LDADD=-lm $(LDADD)
-dispatch_group_LDADD=-lm $(LDADD)
-
-if HAVE_LEAKS
-AM_TESTS_ENVIRONMENT=
-else
-AM_TESTS_ENVIRONMENT=NOLEAKS=1
-endif
-LOG_COMPILER=./bsdtestharness
-
-DISTCLEAN=Foundation/bench.cc
-
-if HAVE_COREFOUNDATION
-TESTS+=							\
-	dispatch_cf_main			\
-	dispatch_transform			\
-	dispatch_sync_on_main		\
-	cffd
-AM_CFLAGS+=-DHAVE_COREFOUNDATION
-
-dispatch_cf_main_LDFLAGS=-framework CoreFoundation
-dispatch_transform_LDFLAGS=-framework CoreFoundation -framework Security
-dispatch_sync_on_main_LDFLAGS=-framework CoreFoundation
-cffd_LDFLAGS=-framework CoreFoundation
-endif
-
-if HAVE_FOUNDATION
-TESTS+=							\
-	dispatch_sync_gc			\
-	dispatch_apply_gc			\
-	nsoperation					\
-	bench
-AM_CFLAGS+=-DHAVE_FOUNDATION
-
-dispatch_sync_gc_SOURCES=Foundation/dispatch_sync_gc.m
-dispatch_sync_gc_LDFLAGS=-framework Foundation
-dispatch_apply_gc_SOURCES=Foundation/dispatch_apply_gc.m
-dispatch_apply_gc_LDFLAGS=-framework Foundation
-nsoperation_SOURCES=Foundation/nsoperation.m
-nsoperation_LDFLAGS=-framework Foundation
-bench_SOURCES=Foundation/bench.mm func.c
-bench_LDFLAGS=-framework Foundation
-endif
-
-# For use by swift/utils/build-script to force test cases to be
-# built during the build phase of CI
-build-tests: $(TESTS) $(check_PROGRAMS)