| OLD | NEW |
| 1 # Copyright (c) 1999-2013, International Business Machines Corporation and | 1 # Copyright (c) 1999-2014, International Business Machines Corporation and |
| 2 # others. All Rights Reserved. | 2 # others. All Rights Reserved. |
| 3 # acinclude.m4 for ICU | 3 # acinclude.m4 for ICU |
| 4 # Don't edit aclocal.m4, do edit acinclude.m4 | 4 # Don't edit aclocal.m4, do edit acinclude.m4 |
| 5 # Stephen F. Booth | 5 # Stephen F. Booth |
| 6 | 6 |
| 7 # @TOP@ | 7 # @TOP@ |
| 8 | 8 |
| 9 # ICU_CHECK_MH_FRAG | 9 # ICU_CHECK_MH_FRAG |
| 10 AC_DEFUN([ICU_CHECK_MH_FRAG], [ | 10 AC_DEFUN([ICU_CHECK_MH_FRAG], [ |
| 11 AC_CACHE_CHECK( | 11 AC_CACHE_CHECK( |
| (...skipping 13 matching lines...) Expand all Loading... |
| 25 else | 25 else |
| 26 icu_cv_host_frag=mh-alpha-linux-cc | 26 icu_cv_host_frag=mh-alpha-linux-cc |
| 27 fi ;; | 27 fi ;; |
| 28 powerpc*-*-linux*) | 28 powerpc*-*-linux*) |
| 29 if test "$GCC" = yes; then | 29 if test "$GCC" = yes; then |
| 30 icu_cv_host_frag=mh-linux | 30 icu_cv_host_frag=mh-linux |
| 31 else | 31 else |
| 32 icu_cv_host_frag=mh-linux-va | 32 icu_cv_host_frag=mh-linux-va |
| 33 fi ;; | 33 fi ;; |
| 34 *-*-linux*|*-*-gnu|*-*-k*bsd*-gnu|*-*-kopensolaris*-gnu) icu_cv_host_frag=mh-lin
ux ;; | 34 *-*-linux*|*-*-gnu|*-*-k*bsd*-gnu|*-*-kopensolaris*-gnu) icu_cv_host_frag=mh-lin
ux ;; |
| 35 *-*-cygwin|*-*-mingw32|*-*-mingw64) | 35 i[[34567]]86-*-cygwin) |
| 36 if test "$GCC" = yes; then | 36 if test "$GCC" = yes; then |
| 37 » » AC_TRY_COMPILE([ | 37 » » icu_cv_host_frag=mh-cygwin |
| 38 #ifndef __MINGW32__ | |
| 39 #error This is not MinGW | |
| 40 #endif], [], AC_TRY_COMPILE([ | |
| 41 #ifndef __MINGW64__ | |
| 42 #error This is not MinGW64 | |
| 43 #endif], [], icu_cv_host_frag=mh-mingw64, icu_cv_host_frag=mh-mingw), icu_cv_hos
t_frag=mh-cygwin) | |
| 44 else | 38 else |
| 45 icu_cv_host_frag=mh-cygwin-msvc | 39 icu_cv_host_frag=mh-cygwin-msvc |
| 46 fi ;; | 40 fi ;; |
| 41 x86_64-*-cygwin) |
| 42 if test "$GCC" = yes; then |
| 43 icu_cv_host_frag=mh-cygwin64 |
| 44 else |
| 45 icu_cv_host_frag=mh-cygwin-msvc |
| 46 fi ;; |
| 47 *-*-mingw*) |
| 48 if test "$GCC" = yes; then |
| 49 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ |
| 50 #ifndef __MINGW64__ |
| 51 #error This is not MinGW64 |
| 52 #endif]])], [icu_cv_host_frag=mh-mingw64], |
| 53 [icu_cv_host_frag=mh-mingw]) |
| 54 else |
| 55 case "${host}" in |
| 56 *-*-mingw*) icu_cv_host_frag=mh-msys-msvc ;; |
| 57 *-*-cygwin) icu_cv_host_frag=mh-cygwin-msvc ;; |
| 58 esac |
| 59 fi ;; |
| 47 *-*-*bsd*|*-*-dragonfly*) icu_cv_host_frag=mh-bsd-gcc ;; | 60 *-*-*bsd*|*-*-dragonfly*) icu_cv_host_frag=mh-bsd-gcc ;; |
| 48 *-*-aix*) | 61 *-*-aix*) |
| 49 if test "$GCC" = yes; then | 62 if test "$GCC" = yes; then |
| 50 icu_cv_host_frag=mh-aix-gcc | 63 icu_cv_host_frag=mh-aix-gcc |
| 51 else | 64 else |
| 52 icu_cv_host_frag=mh-aix-va | 65 icu_cv_host_frag=mh-aix-va |
| 53 fi ;; | 66 fi ;; |
| 54 *-*-hpux*) | 67 *-*-hpux*) |
| 55 if test "$GCC" = yes; then | 68 if test "$GCC" = yes; then |
| 56 icu_cv_host_frag=mh-hpux-gcc | 69 icu_cv_host_frag=mh-hpux-gcc |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 255 case "${host}" in | 268 case "${host}" in |
| 256 sparc*-*-solaris*) | 269 sparc*-*-solaris*) |
| 257 # 1. try -m64 | 270 # 1. try -m64 |
| 258 CFLAGS="${CFLAGS} -m64" | 271 CFLAGS="${CFLAGS} -m64" |
| 259 CXXFLAGS="${CXXFLAGS} -m64" | 272 CXXFLAGS="${CXXFLAGS} -m64" |
| 260 AC_RUN_IFELSE([AC_LANG_SOURCE([int main(void) {return (sizeo
f(void*)*8==64)?0:1;}])], | 273 AC_RUN_IFELSE([AC_LANG_SOURCE([int main(void) {return (sizeo
f(void*)*8==64)?0:1;}])], |
| 261 CAN_BUILD_64=yes, CAN_BUILD_64=no, CAN_BUILD_64=unknown) | 274 CAN_BUILD_64=yes, CAN_BUILD_64=no, CAN_BUILD_64=unknown) |
| 262 if test "$CAN_BUILD_64" != yes; then | 275 if test "$CAN_BUILD_64" != yes; then |
| 263 # Nope. back out changes. | 276 # Nope. back out changes. |
| 264 CFLAGS="${CFLAGS_OLD}" | 277 CFLAGS="${CFLAGS_OLD}" |
| 265 CXXFLAGS="${CFLAGS_OLD}" | 278 CXXFLAGS="${CXXFLAGS_OLD}" |
| 266 # 2. try xarch=v9 [deprecated] | 279 # 2. try xarch=v9 [deprecated] |
| 267 ## TODO: cross compile: the following won't work. | 280 ## TODO: cross compile: the following won't work. |
| 268 SPARCV9=`isainfo -n 2>&1 | grep sparcv9` | 281 SPARCV9=`isainfo -n 2>&1 | grep sparcv9` |
| 269 SOL64=`$CXX -xarch=v9 2>&1 && $CC -xarch=v9 2>&1 | grep
-v usage:` | 282 SOL64=`$CXX -xarch=v9 2>&1 && $CC -xarch=v9 2>&1 | grep
-v usage:` |
| 270 # "Warning: -xarch=v9 is deprecated, use -m64 to create
64-bit programs" | 283 # "Warning: -xarch=v9 is deprecated, use -m64 to create
64-bit programs" |
| 271 if test -z "$SOL64" && test -n "$SPARCV9"; then | 284 if test -z "$SOL64" && test -n "$SPARCV9"; then |
| 272 CFLAGS="${CFLAGS} -xtarget=ultra -xarch=v9" | 285 CFLAGS="${CFLAGS} -xtarget=ultra -xarch=v9" |
| 273 CXXFLAGS="${CXXFLAGS} -xtarget=ultra -xarch=v9" | 286 CXXFLAGS="${CXXFLAGS} -xtarget=ultra -xarch=v9" |
| 274 LDFLAGS="${LDFLAGS} -xtarget=ultra -xarch=v9" | 287 LDFLAGS="${LDFLAGS} -xtarget=ultra -xarch=v9" |
| 275 CAN_BUILD_64=yes | 288 CAN_BUILD_64=yes |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 450 ac_use_strict_options=yes | 463 ac_use_strict_options=yes |
| 451 fi | 464 fi |
| 452 ], [ac_use_strict_options=yes]) | 465 ], [ac_use_strict_options=yes]) |
| 453 AC_MSG_RESULT($ac_use_strict_options) | 466 AC_MSG_RESULT($ac_use_strict_options) |
| 454 | 467 |
| 455 if test "$ac_use_strict_options" = yes | 468 if test "$ac_use_strict_options" = yes |
| 456 then | 469 then |
| 457 if test "$GCC" = yes | 470 if test "$GCC" = yes |
| 458 then | 471 then |
| 459 case "${host}" in | 472 case "${host}" in |
| 460 *-*-solaris*) | |
| 461 # Don't use -std=c99 option on Solaris/GCC | |
| 462 ;; | |
| 463 *) | 473 *) |
| 464 # Do not use -ansi. It limits us to C90, and it breaks some plat
forms. | 474 # Do not use -ansi. It limits us to C90, and it breaks some plat
forms. |
| 465 # We use -std=c99 to disable the gnu99 defaults and its associat
ed warnings | 475 # We use -std=c99 to disable the gnu99 defaults and its associat
ed warnings |
| 466 CFLAGS="$CFLAGS -std=c99" | 476 CFLAGS="$CFLAGS -std=c99" |
| 467 ;; | 477 ;; |
| 468 esac | 478 esac |
| 469 | 479 |
| 470 CFLAGS="$CFLAGS -Wall -pedantic -Wshadow -Wpointer-arith -Wmissing-p
rototypes -Wwrite-strings" | 480 CFLAGS="$CFLAGS -Wall -pedantic -Wshadow -Wpointer-arith -Wmissing-p
rototypes -Wwrite-strings" |
| 471 else | 481 else |
| 472 case "${host}" in | 482 case "${host}" in |
| 473 *-*-cygwin) | 483 *-*-cygwin) |
| 474 if test "`$CC /help 2>&1 | head -c9`" = "Microsoft" | 484 if test "`$CC /help 2>&1 | head -c9`" = "Microsoft" |
| 475 then | 485 then |
| 476 CFLAGS="$CFLAGS /W4" | 486 CFLAGS="$CFLAGS /W4" |
| 477 fi | 487 fi ;; |
| 488 *-*-mingw*) |
| 489 CFLAGS="$CFLAGS -W4" ;; |
| 478 esac | 490 esac |
| 479 fi | 491 fi |
| 480 if test "$GXX" = yes | 492 if test "$GXX" = yes |
| 481 then | 493 then |
| 482 CXXFLAGS="$CXXFLAGS -W -Wall -pedantic -Wpointer-arith -Wwrite-strin
gs -Wno-long-long" | 494 CXXFLAGS="$CXXFLAGS -W -Wall -pedantic -Wpointer-arith -Wwrite-strin
gs -Wno-long-long" |
| 483 else | 495 else |
| 484 case "${host}" in | 496 case "${host}" in |
| 485 *-*-cygwin) | 497 *-*-cygwin) |
| 486 if test "`$CXX /help 2>&1 | head -c9`" = "Microsoft" | 498 if test "`$CXX /help 2>&1 | head -c9`" = "Microsoft" |
| 487 then | 499 then |
| 488 CXXFLAGS="$CXXFLAGS /W4" | 500 CXXFLAGS="$CXXFLAGS /W4" |
| 489 fi | 501 fi ;; |
| 502 *-*-mingw*) |
| 503 CFLAGS="$CFLAGS -W4" ;; |
| 490 esac | 504 esac |
| 491 fi | 505 fi |
| 492 fi | 506 fi |
| 493 ]) | 507 ]) |
| 494 | 508 |
| 495 | 509 |
| OLD | NEW |