diff options
author | Austin Seipp <aseipp@pobox.com> | 2013-08-13 16:40:37 -0500 |
---|---|---|
committer | Austin Seipp <aseipp@pobox.com> | 2013-08-14 00:42:43 -0500 |
commit | 288ca49c93d5bc8fe42f9a823ed6555334762769 (patch) | |
tree | 89fb7fc4c680cd434b287165d43e4970938df17e /aclocal.m4 | |
parent | 5fb72555f7b7ab67a33583f33ad9160761ca434f (diff) | |
download | haskell-288ca49c93d5bc8fe42f9a823ed6555334762769.tar.gz |
iOS: generate archive files when compiling.
When cross compiling to iOS, we generate archive files which are linked
into the final executable. We already *did* generate archive files -
just with the wrong suffix.
Fixes #8125.
Authored-by: Stephen Blackheath <...@blacksapphire.com>
Signed-off-by: Austin Seipp <aseipp@pobox.com>
Diffstat (limited to 'aclocal.m4')
-rw-r--r-- | aclocal.m4 | 51 |
1 files changed, 34 insertions, 17 deletions
diff --git a/aclocal.m4 b/aclocal.m4 index 0852dbf90d..d604cc08e0 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -4,6 +4,34 @@ # ensure we don't clash with any pre-supplied autoconf ones. +AC_DEFUN([GHC_SELECT_FILE_EXTENSIONS], +[ + $2='' + $3='.so' + case $1 in + *-unknown-cygwin32) + AC_MSG_WARN([GHC does not support the Cygwin target at the moment]) + AC_MSG_WARN([I'm assuming you wanted to build for i386-unknown-mingw32]) + exit 1 + ;; + *-unknown-mingw32) + windows=YES + $2='.exe' + $3='.dll' + ;; + i386-apple-darwin|powerpc-apple-darwin) + $3='.dylib' + ;; + x86_64-apple-darwin) + $3='.dylib' + ;; + arm-apple-darwin10) + $2='.a' + $3='.dylib' + ;; + esac +]) + # FPTOOLS_SET_PLATFORM_VARS # ---------------------------------- # Set the platform variables @@ -86,25 +114,12 @@ AC_DEFUN([FPTOOLS_SET_PLATFORM_VARS], GHC_CONVERT_OS([$target_os], [$TargetArch], [TargetOS]) fi + GHC_SELECT_FILE_EXTENSIONS([$host], [exeext_host], [soext_host]) + GHC_SELECT_FILE_EXTENSIONS([$target], [exeext_target], [soext_target]) windows=NO - exeext='' - soext='.so' case $host in - *-unknown-cygwin32) - AC_MSG_WARN([GHC does not support the Cygwin target at the moment]) - AC_MSG_WARN([I'm assuming you wanted to build for i386-unknown-mingw32]) - exit 1 - ;; *-unknown-mingw32) windows=YES - exeext='.exe' - soext='.dll' - ;; - i386-apple-darwin|powerpc-apple-darwin) - soext='.dylib' - ;; - x86_64-apple-darwin) - soext='.dylib' ;; esac @@ -149,8 +164,10 @@ AC_DEFUN([FPTOOLS_SET_PLATFORM_VARS], AC_SUBST(BuildVendor_CPP) AC_SUBST(TargetVendor_CPP) - AC_SUBST(exeext) - AC_SUBST(soext) + AC_SUBST(exeext_host) + AC_SUBST(exeext_target) + AC_SUBST(soext_host) + AC_SUBST(soext_target) ]) |