summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--aclocal.m450
1 files changed, 19 insertions, 31 deletions
diff --git a/aclocal.m4 b/aclocal.m4
index 32e55cd6ac..0d113c1da8 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -20,14 +20,8 @@ AC_DEFUN([GHC_SELECT_FILE_EXTENSIONS],
$2='.exe'
$3='.dll'
;;
- i386-apple-darwin|powerpc-apple-darwin)
- $3='.dylib'
- ;;
- x86_64-apple-darwin)
- $3='.dylib'
- ;;
- arm-apple-darwin10|i386-apple-darwin11|aarch64-apple-darwin14|x86_64-apple-darwin14)
- $2='.a'
+ # apple platform uses .dylib (macOS, iOS, ...)
+ *-apple-*)
$3='.dylib'
;;
esac
@@ -796,20 +790,17 @@ AC_CACHE_CHECK([leading underscore in symbol names], [fptools_cv_leading_undersc
# Hack!: nlist() under Digital UNIX insist on there being an _,
# but symbol table listings shows none. What is going on here?!?
case $TargetPlatform in
-*linux-android*) fptools_cv_leading_underscore=no;;
-*openbsd*) # x86 openbsd is ELF from 3.4 >, meaning no leading uscore
- case $build in
- i386-*2\.@<:@0-9@:>@ | i386-*3\.@<:@0-3@:>@ ) fptools_cv_leading_underscore=yes ;;
- *) fptools_cv_leading_underscore=no ;;
- esac ;;
-i386-unknown-mingw32) fptools_cv_leading_underscore=yes;;
-x86_64-unknown-mingw32) fptools_cv_leading_underscore=no;;
-
- # HACK: Apple doesn't seem to provide nlist in the 64-bit-libraries
-x86_64-apple-darwin*) fptools_cv_leading_underscore=yes;;
-*-apple-ios) fptools_cv_leading_underscore=yes;;
-
-*) AC_RUN_IFELSE([AC_LANG_SOURCE([[#ifdef HAVE_NLIST_H
+ # Apples mach-o platforms use leading underscores
+ *-apple-*) fptools_cv_leading_underscore=yes;;
+ *linux-android*) fptools_cv_leading_underscore=no;;
+ *openbsd*) # x86 openbsd is ELF from 3.4 >, meaning no leading uscore
+ case $build in
+ i386-*2\.@<:@0-9@:>@ | i386-*3\.@<:@0-3@:>@ ) fptools_cv_leading_underscore=yes ;;
+ *) fptools_cv_leading_underscore=no ;;
+ esac ;;
+ i386-unknown-mingw32) fptools_cv_leading_underscore=yes;;
+ x86_64-unknown-mingw32) fptools_cv_leading_underscore=no;;
+ *) AC_RUN_IFELSE([AC_LANG_SOURCE([[#ifdef HAVE_NLIST_H
#include <nlist.h>
struct nlist xYzzY1[] = {{"xYzzY1", 0},{0}};
struct nlist xYzzY2[] = {{"_xYzzY2", 0},{0}};
@@ -1145,7 +1136,7 @@ AC_DEFUN([FP_PROG_AR_NEEDS_RANLIB],[
if test $fp_prog_ar_is_gnu = yes
then
fp_cv_prog_ar_needs_ranlib=no
- elif test "$TargetOS_CPP" = "darwin"
+ elif test "$TargetVendor_CPP" = "apple"
then
# It's quite tedious to check for Apple's crazy timestamps in
# .a files, so we hardcode it.
@@ -1882,12 +1873,11 @@ AC_DEFUN([GHC_CONVERT_VENDOR],[
# --------------------------------
# converts os from gnu to ghc naming, and assigns the result to $target_var
AC_DEFUN([GHC_CONVERT_OS],[
-case "$1-$2" in
- darwin10-arm|darwin11-i386|darwin14-aarch64|darwin14-x86_64)
- $3="ios"
- ;;
- *)
case "$1" in
+ # watchos and tvos are ios variant as of May 2017.
+ ios|watchos|tvos)
+ $3="ios"
+ ;;
linux-android*)
$3="linux-android"
;;
@@ -1914,8 +1904,6 @@ case "$1-$2" in
exit 1
;;
esac
- ;;
- esac
])
# BOOTSTRAPPING_GHC_INFO_FIELD
@@ -1947,7 +1935,7 @@ AC_SUBST(LIBRARY_[]translit([$1], [-], [_])[]_VERSION)
# --------------------------------
# Gets the version number of XCode, if on a Mac
AC_DEFUN([XCODE_VERSION],[
- if test "$TargetOS_CPP" = "darwin"
+ if test "$TargetVendor_CPP" = "apple"
then
AC_MSG_CHECKING(XCode version)
XCodeVersion=`xcodebuild -version | grep Xcode | sed "s/Xcode //"`