diff --git a/configure.ac b/configure.ac index 98e114209..73d661324 100644 --- a/configure.ac +++ b/configure.ac @@ -194,6 +194,9 @@ AC_ARG_WITH([swift-toolchain], 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 @@ -215,6 +218,7 @@ 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 diff --git a/src/Makefile.am b/src/Makefile.am index 967d5a073..1e2ba6538 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -3,7 +3,7 @@ # if HAVE_SWIFT -swiftlibdir=${prefix}/lib/swift/linux +swiftlibdir=${prefix}/lib/swift/${OS_STRING} swiftlib_LTLIBRARIES=libdispatch.la else lib_LTLIBRARIES=libdispatch.la @@ -171,7 +171,7 @@ SWIFT_GEN_FILES= \ $(abs_builddir)/swift/Dispatch.swiftdoc \ $(SWIFT_OBJ_FILES) -swiftmoddir=${prefix}/lib/swift/linux/${build_cpu} +swiftmoddir=${prefix}/lib/swift/${OS_STRING}/${host_cpu} swiftmod_HEADERS=\ $(abs_builddir)/swift/Dispatch.swiftmodule \ $(abs_builddir)/swift/Dispatch.swiftdoc