X-Git-Url: https://git.saurik.com/apple/icu.git/blobdiff_plain/57a6839dcb3bba09e8228b822b290604668416fe..38fbf2fd31f5cd99b500914d6037b1d06b608645:/icuSources/acinclude.m4 diff --git a/icuSources/acinclude.m4 b/icuSources/acinclude.m4 index 5b2c8444..5c8fda71 100644 --- a/icuSources/acinclude.m4 +++ b/icuSources/acinclude.m4 @@ -1,4 +1,6 @@ -# Copyright (c) 1999-2013, International Business Machines Corporation and +# Copyright (C) 2016 and later: Unicode, Inc. and others. +# License & terms of use: http://www.unicode.org/copyright.html +# Copyright (c) 1999-2016, International Business Machines Corporation and # others. All Rights Reserved. # acinclude.m4 for ICU # Don't edit aclocal.m4, do edit acinclude.m4 @@ -32,17 +34,30 @@ powerpc*-*-linux*) icu_cv_host_frag=mh-linux-va fi ;; *-*-linux*|*-*-gnu|*-*-k*bsd*-gnu|*-*-kopensolaris*-gnu) icu_cv_host_frag=mh-linux ;; -*-*-cygwin|*-*-mingw32|*-*-mingw64) +i[[34567]]86-*-cygwin) if test "$GCC" = yes; then - AC_TRY_COMPILE([ -#ifndef __MINGW32__ -#error This is not MinGW -#endif], [], AC_TRY_COMPILE([ + icu_cv_host_frag=mh-cygwin + else + icu_cv_host_frag=mh-cygwin-msvc + fi ;; +x86_64-*-cygwin) + if test "$GCC" = yes; then + icu_cv_host_frag=mh-cygwin64 + else + icu_cv_host_frag=mh-cygwin-msvc + fi ;; +*-*-mingw*) + if test "$GCC" = yes; then + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #ifndef __MINGW64__ #error This is not MinGW64 -#endif], [], icu_cv_host_frag=mh-mingw64, icu_cv_host_frag=mh-mingw), icu_cv_host_frag=mh-cygwin) +#endif]])], [icu_cv_host_frag=mh-mingw64], + [icu_cv_host_frag=mh-mingw]) else - icu_cv_host_frag=mh-cygwin-msvc + case "${host}" in + *-*-mingw*) icu_cv_host_frag=mh-msys-msvc ;; + *-*-cygwin) icu_cv_host_frag=mh-cygwin-msvc ;; + esac fi ;; *-*-*bsd*|*-*-dragonfly*) icu_cv_host_frag=mh-bsd-gcc ;; *-*-aix*) @@ -75,15 +90,6 @@ esac ) ]) -# ICU_CONDITIONAL - similar example taken from Automake 1.4 -AC_DEFUN([ICU_CONDITIONAL], -[AC_SUBST($1_TRUE) -if $2; then - $1_TRUE= -else - $1_TRUE='#' -fi]) - # ICU_PROG_LINK - Make sure that the linker is usable AC_DEFUN([ICU_PROG_LINK], [ @@ -262,7 +268,7 @@ AC_DEFUN([AC_CHECK_64BIT_LIBS], if test "$CAN_BUILD_64" != yes; then # Nope. back out changes. CFLAGS="${CFLAGS_OLD}" - CXXFLAGS="${CFLAGS_OLD}" + CXXFLAGS="${CXXFLAGS_OLD}" # 2. try xarch=v9 [deprecated] ## TODO: cross compile: the following won't work. SPARCV9=`isainfo -n 2>&1 | grep sparcv9` @@ -458,7 +464,7 @@ AC_DEFUN([AC_CHECK_STRICT_COMPILE], then case "${host}" in *-*-solaris*) - # Don't use -std=c99 option on Solaris/GCC + # Don't use -std=c99 on Solaris because of timezone check fails ;; *) # Do not use -ansi. It limits us to C90, and it breaks some platforms. @@ -474,7 +480,9 @@ AC_DEFUN([AC_CHECK_STRICT_COMPILE], if test "`$CC /help 2>&1 | head -c9`" = "Microsoft" then CFLAGS="$CFLAGS /W4" - fi + fi ;; + *-*-mingw*) + CFLAGS="$CFLAGS -W4" ;; esac fi if test "$GXX" = yes @@ -486,7 +494,9 @@ AC_DEFUN([AC_CHECK_STRICT_COMPILE], if test "`$CXX /help 2>&1 | head -c9`" = "Microsoft" then CXXFLAGS="$CXXFLAGS /W4" - fi + fi ;; + *-*-mingw*) + CFLAGS="$CFLAGS -W4" ;; esac fi fi