-# 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
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*)
)
])
-# 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],
[
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`
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.
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
if test "`$CXX /help 2>&1 | head -c9`" = "Microsoft"
then
CXXFLAGS="$CXXFLAGS /W4"
- fi
+ fi ;;
+ *-*-mingw*)
+ CFLAGS="$CFLAGS -W4" ;;
esac
fi
fi