michael@0: # Copyright (c) 1999-2013, International Business Machines Corporation and michael@0: # others. All Rights Reserved. michael@0: # acinclude.m4 for ICU michael@0: # Don't edit aclocal.m4, do edit acinclude.m4 michael@0: # Stephen F. Booth michael@0: michael@0: # @TOP@ michael@0: michael@0: # ICU_CHECK_MH_FRAG michael@0: AC_DEFUN([ICU_CHECK_MH_FRAG], [ michael@0: AC_CACHE_CHECK( michael@0: [which Makefile fragment to use for ${host}], michael@0: [icu_cv_host_frag], michael@0: [ michael@0: case "${host}" in michael@0: *-*-solaris*) michael@0: if test "$GCC" = yes; then michael@0: icu_cv_host_frag=mh-solaris-gcc michael@0: else michael@0: icu_cv_host_frag=mh-solaris michael@0: fi ;; michael@0: alpha*-*-linux-gnu) michael@0: if test "$GCC" = yes; then michael@0: icu_cv_host_frag=mh-alpha-linux-gcc michael@0: else michael@0: icu_cv_host_frag=mh-alpha-linux-cc michael@0: fi ;; michael@0: powerpc*-*-linux*) michael@0: if test "$GCC" = yes; then michael@0: icu_cv_host_frag=mh-linux michael@0: else michael@0: icu_cv_host_frag=mh-linux-va michael@0: fi ;; michael@0: *-*-linux*|*-*-gnu|*-*-k*bsd*-gnu|*-*-kopensolaris*-gnu) icu_cv_host_frag=mh-linux ;; michael@0: *-*-cygwin|*-*-mingw32|*-*-mingw64) michael@0: if test "$GCC" = yes; then michael@0: AC_TRY_COMPILE([ michael@0: #ifndef __MINGW32__ michael@0: #error This is not MinGW michael@0: #endif], [], AC_TRY_COMPILE([ michael@0: #ifndef __MINGW64__ michael@0: #error This is not MinGW64 michael@0: #endif], [], icu_cv_host_frag=mh-mingw64, icu_cv_host_frag=mh-mingw), icu_cv_host_frag=mh-cygwin) michael@0: else michael@0: case "${host}" in michael@0: *-*-cygwin) icu_cv_host_frag=mh-cygwin-msvc ;; michael@0: *-*-mingw32|*-*-mingw64) icu_cv_host_frag=mh-msys-msvc ;; michael@0: esac michael@0: fi ;; michael@0: *-*-*bsd*|*-*-dragonfly*) icu_cv_host_frag=mh-bsd-gcc ;; michael@0: *-*-aix*) michael@0: if test "$GCC" = yes; then michael@0: icu_cv_host_frag=mh-aix-gcc michael@0: else michael@0: icu_cv_host_frag=mh-aix-va michael@0: fi ;; michael@0: *-*-hpux*) michael@0: if test "$GCC" = yes; then michael@0: icu_cv_host_frag=mh-hpux-gcc michael@0: else michael@0: case "$CXX" in michael@0: *aCC) icu_cv_host_frag=mh-hpux-acc ;; michael@0: esac michael@0: fi ;; michael@0: *-*ibm-openedition*|*-*-os390*) icu_cv_host_frag=mh-os390 ;; michael@0: *-*-os400*) icu_cv_host_frag=mh-os400 ;; michael@0: *-apple-rhapsody*) icu_cv_host_frag=mh-darwin ;; michael@0: *-apple-darwin*) icu_cv_host_frag=mh-darwin ;; michael@0: *-*-beos) icu_cv_host_frag=mh-beos ;; michael@0: *-*-haiku) icu_cv_host_frag=mh-haiku ;; michael@0: *-*-irix*) icu_cv_host_frag=mh-irix ;; michael@0: *-dec-osf*) icu_cv_host_frag=mh-alpha-osf ;; michael@0: *-*-nto*) icu_cv_host_frag=mh-qnx ;; michael@0: *-ncr-*) icu_cv_host_frag=mh-mpras ;; michael@0: *) icu_cv_host_frag=mh-unknown ;; michael@0: esac michael@0: ] michael@0: ) michael@0: ]) michael@0: michael@0: # ICU_CONDITIONAL - similar example taken from Automake 1.4 michael@0: AC_DEFUN([ICU_CONDITIONAL], michael@0: [AC_SUBST($1_TRUE) michael@0: if $2; then michael@0: $1_TRUE= michael@0: else michael@0: $1_TRUE='#' michael@0: fi]) michael@0: michael@0: # ICU_PROG_LINK - Make sure that the linker is usable michael@0: AC_DEFUN([ICU_PROG_LINK], michael@0: [ michael@0: case "${host}" in michael@0: *-*-cygwin*|*-*-mingw*) michael@0: if test "$GCC" != yes && test -n "`link --version 2>&1 | grep 'GNU coreutils'`"; then michael@0: AC_MSG_ERROR([link.exe is not a valid linker. Your PATH is incorrect. michael@0: Please follow the directions in ICU's readme.]) michael@0: fi;; michael@0: *);; michael@0: esac]) michael@0: michael@0: # AC_SEARCH_LIBS_FIRST(FUNCTION, SEARCH-LIBS [, ACTION-IF-FOUND michael@0: # [, ACTION-IF-NOT-FOUND [, OTHER-LIBRARIES]]]) michael@0: # Search for a library defining FUNC, then see if it's not already available. michael@0: michael@0: AC_DEFUN([AC_SEARCH_LIBS_FIRST], michael@0: [AC_PREREQ([2.13]) michael@0: AC_CACHE_CHECK([for library containing $1], [ac_cv_search_$1], michael@0: [ac_func_search_save_LIBS="$LIBS" michael@0: ac_cv_search_$1="no" michael@0: for i in $2; do michael@0: LIBS="-l$i $5 $ac_func_search_save_LIBS" michael@0: AC_TRY_LINK_FUNC([$1], michael@0: [ac_cv_search_$1="-l$i" michael@0: break]) michael@0: done michael@0: if test "$ac_cv_search_$1" = "no"; then michael@0: AC_TRY_LINK_FUNC([$1], [ac_cv_search_$1="none required"]) michael@0: fi michael@0: LIBS="$ac_func_search_save_LIBS"]) michael@0: if test "$ac_cv_search_$1" != "no"; then michael@0: test "$ac_cv_search_$1" = "none required" || LIBS="$ac_cv_search_$1 $LIBS" michael@0: $3 michael@0: else : michael@0: $4 michael@0: fi]) michael@0: michael@0: michael@0: michael@0: # Check if we can build and use 64-bit libraries michael@0: AC_DEFUN([AC_CHECK_64BIT_LIBS], michael@0: [ michael@0: BITS_REQ=nochange michael@0: ENABLE_64BIT_LIBS=unknown michael@0: ## revisit this for cross-compile. michael@0: michael@0: AC_ARG_ENABLE(64bit-libs, michael@0: [ --enable-64bit-libs (deprecated, use --with-library-bits) build 64-bit libraries [default= platform default]], michael@0: [echo "note, use --with-library-bits instead of --*-64bit-libs" michael@0: case "${enableval}" in michael@0: no|false|32) with_library_bits=32; ;; michael@0: yes|true|64) with_library_bits=64else32 ;; michael@0: nochange) with_library_bits=nochange; ;; michael@0: *) AC_MSG_ERROR(bad value ${enableval} for '--*-64bit-libs') ;; michael@0: esac] ) michael@0: michael@0: michael@0: AC_ARG_WITH(library-bits, michael@0: [ --with-library-bits=bits specify how many bits to use for the library (32, 64, 64else32, nochange) [default=nochange]], michael@0: [case "${withval}" in michael@0: ""|nochange) BITS_REQ=$withval ;; michael@0: 32|64|64else32) BITS_REQ=$withval ;; michael@0: *) AC_MSG_ERROR(bad value ${withval} for --with-library-bits) ;; michael@0: esac]) michael@0: michael@0: # don't use these for cross compiling michael@0: if test "$cross_compiling" = "yes" -a "${BITS_REQ}" != "nochange"; then michael@0: AC_MSG_ERROR([Don't specify bitness when cross compiling. See readme.html for help with cross compilation., and set compiler options manually.]) michael@0: fi michael@0: AC_CHECK_SIZEOF([void *]) michael@0: AC_MSG_CHECKING([whether runnable 64 bit binaries are built by default]) michael@0: case $ac_cv_sizeof_void_p in michael@0: 8) DEFAULT_64BIT=yes ;; michael@0: 4) DEFAULT_64BIT=no ;; michael@0: *) DEFAULT_64BIT=unknown michael@0: esac michael@0: BITS_GOT=unknown michael@0: michael@0: # 'OK' here means, we can exit any further checking, everything's copa michael@0: BITS_OK=yes michael@0: michael@0: # do we need to check for buildable/runnable 32 or 64 bit? michael@0: BITS_CHECK_32=no michael@0: BITS_CHECK_64=no michael@0: michael@0: # later, can we run the 32/64 bit binaries so made? michael@0: BITS_RUN_32=no michael@0: BITS_RUN_64=no michael@0: michael@0: if test "$DEFAULT_64BIT" = "yes"; then michael@0: # we get 64 bits by default. michael@0: BITS_GOT=64 michael@0: case "$BITS_REQ" in michael@0: 32) michael@0: # need to look for 32 bit support. michael@0: BITS_CHECK_32=yes michael@0: # not copa. michael@0: BITS_OK=no;; michael@0: # everyone else is happy. michael@0: nochange) ;; michael@0: *) ;; michael@0: esac michael@0: elif test "$DEFAULT_64BIT" = "no"; then michael@0: # not 64 bit by default. michael@0: BITS_GOT=32 michael@0: case "$BITS_REQ" in michael@0: 64|64else32) michael@0: BITS_CHECK_64=yes michael@0: #BITS_CHECK_32=yes michael@0: BITS_OK=no;; michael@0: nochange) ;; michael@0: *) ;; michael@0: esac michael@0: elif test "$DEFAULT_64BIT" = "unknown"; then michael@0: # cross compiling. michael@0: BITS_GOT=unknown michael@0: case "$BITS_REQ" in michael@0: 64|64else32) BITS_OK=no michael@0: BITS_CHECK_32=yes michael@0: BITS_CHECK_64=yes ;; michael@0: 32) BITS_OK=no;; michael@0: nochange) ;; michael@0: *) ;; michael@0: esac michael@0: fi michael@0: michael@0: AC_MSG_RESULT($DEFAULT_64BIT); michael@0: michael@0: if test "$BITS_OK" != "yes"; then michael@0: # not copa. back these up. michael@0: CFLAGS_OLD="${CFLAGS}" michael@0: CXXFLAGS_OLD="${CXXFLAGS}" michael@0: LDFLAGS_OLD="${LDFLAGS}" michael@0: ARFLAGS_OLD="${ARFLAGS}" michael@0: michael@0: CFLAGS_32="${CFLAGS}" michael@0: CXXFLAGS_32="${CXXFLAGS}" michael@0: LDFLAGS_32="${LDFLAGS}" michael@0: ARFLAGS_32="${ARFLAGS}" michael@0: michael@0: CFLAGS_64="${CFLAGS}" michael@0: CXXFLAGS_64="${CXXFLAGS}" michael@0: LDFLAGS_64="${LDFLAGS}" michael@0: ARFLAGS_64="${ARFLAGS}" michael@0: michael@0: CAN_BUILD_64=unknown michael@0: CAN_BUILD_32=unknown michael@0: # These results can't be cached because is sets compiler flags. michael@0: if test "$BITS_CHECK_64" = "yes"; then michael@0: AC_MSG_CHECKING([how to build 64-bit executables]) michael@0: CAN_BUILD_64=no michael@0: #### michael@0: # Find out if we think we can *build* for 64 bit. Doesn't check whether we can run it. michael@0: # Note, we don't have to actually check if the options work- we'll try them before using them. michael@0: # So, only try actually testing the options, if you are trying to decide between multiple options. michael@0: # On exit from the following clauses: michael@0: # if CAN_BUILD_64=yes: michael@0: # *FLAGS are assumed to contain the right settings for 64bit michael@0: # else if CAN_BUILD_64=no: (default) michael@0: # *FLAGS are assumed to be trashed, and will be reset from *FLAGS_OLD michael@0: michael@0: if test "$GCC" = yes; then michael@0: CFLAGS="${CFLAGS} -m64" michael@0: CXXFLAGS="${CXXFLAGS} -m64" michael@0: AC_COMPILE_IFELSE([AC_LANG_SOURCE([int main(void) {return (sizeof(void*)*8==64)?0:1;}])], michael@0: CAN_BUILD_64=yes, CAN_BUILD_64=no) michael@0: else michael@0: case "${host}" in michael@0: sparc*-*-solaris*) michael@0: # 1. try -m64 michael@0: CFLAGS="${CFLAGS} -m64" michael@0: CXXFLAGS="${CXXFLAGS} -m64" michael@0: AC_RUN_IFELSE([AC_LANG_SOURCE([int main(void) {return (sizeof(void*)*8==64)?0:1;}])], michael@0: CAN_BUILD_64=yes, CAN_BUILD_64=no, CAN_BUILD_64=unknown) michael@0: if test "$CAN_BUILD_64" != yes; then michael@0: # Nope. back out changes. michael@0: CFLAGS="${CFLAGS_OLD}" michael@0: CXXFLAGS="${CFLAGS_OLD}" michael@0: # 2. try xarch=v9 [deprecated] michael@0: ## TODO: cross compile: the following won't work. michael@0: SPARCV9=`isainfo -n 2>&1 | grep sparcv9` michael@0: SOL64=`$CXX -xarch=v9 2>&1 && $CC -xarch=v9 2>&1 | grep -v usage:` michael@0: # "Warning: -xarch=v9 is deprecated, use -m64 to create 64-bit programs" michael@0: if test -z "$SOL64" && test -n "$SPARCV9"; then michael@0: CFLAGS="${CFLAGS} -xtarget=ultra -xarch=v9" michael@0: CXXFLAGS="${CXXFLAGS} -xtarget=ultra -xarch=v9" michael@0: LDFLAGS="${LDFLAGS} -xtarget=ultra -xarch=v9" michael@0: CAN_BUILD_64=yes michael@0: fi michael@0: fi michael@0: ;; michael@0: i386-*-solaris*) michael@0: # 1. try -m64 michael@0: CFLAGS="${CFLAGS} -m64" michael@0: CXXFLAGS="${CXXFLAGS} -m64" michael@0: AC_RUN_IFELSE([AC_LANG_SOURCE([int main(void) {return (sizeof(void*)*8==64)?0:1;}])], michael@0: CAN_BUILD_64=yes, CAN_BUILD_64=no, CAN_BUILD_64=unknown) michael@0: if test "$CAN_BUILD_64" != yes; then michael@0: # Nope. back out changes. michael@0: CFLAGS="${CFLAGS_OLD}" michael@0: CXXFLAGS="${CXXFLAGS_OLD}" michael@0: # 2. try the older compiler option michael@0: ## TODO: cross compile problem michael@0: AMD64=`isainfo -n 2>&1 | grep amd64` michael@0: SOL64=`$CXX -xtarget=generic64 2>&1 && $CC -xtarget=generic64 2>&1 | grep -v usage:` michael@0: if test -z "$SOL64" && test -n "$AMD64"; then michael@0: CFLAGS="${CFLAGS} -xtarget=generic64" michael@0: CXXFLAGS="${CXXFLAGS} -xtarget=generic64" michael@0: CAN_BUILD_64=yes michael@0: fi michael@0: fi michael@0: ;; michael@0: ia64-*-linux*) michael@0: # check for ecc/ecpc compiler support michael@0: ## TODO: cross compiler problem michael@0: if test -n "`$CXX --help 2>&1 && $CC --help 2>&1 | grep -v Intel`"; then michael@0: if test -n "`$CXX --help 2>&1 && $CC --help 2>&1 | grep -v Itanium`"; then michael@0: CAN_BUILD_64=yes michael@0: fi michael@0: fi michael@0: ;; michael@0: *-*-cygwin) michael@0: # vcvarsamd64.bat should have been used to enable 64-bit builds. michael@0: # We only do this check to display the correct answer. michael@0: ## TODO: cross compiler problem michael@0: if test -n "`$CXX -help 2>&1 | grep 'for x64'`"; then michael@0: CAN_BUILD_64=yes michael@0: fi michael@0: ;; michael@0: *-*-aix*|powerpc64-*-linux*) michael@0: CFLAGS="${CFLAGS} -q64" michael@0: CXXFLAGS="${CXXFLAGS} -q64" michael@0: LDFLAGS="${LDFLAGS} -q64" michael@0: AC_COMPILE_IFELSE([AC_LANG_SOURCE([int main(void) {return (sizeof(void*)*8==64)?0:1;}])], michael@0: CAN_BUILD_64=yes, CAN_BUILD_64=no) michael@0: if test "$CAN_BUILD_64" = yes; then michael@0: # worked- set other options. michael@0: case "${host}" in michael@0: *-*-aix*) michael@0: # tell AIX what executable mode to use. michael@0: ARFLAGS="${ARFLAGS} -X64" michael@0: esac michael@0: fi michael@0: ;; michael@0: *-*-hpux*) michael@0: # First we try the newer +DD64, if that doesn't work, michael@0: # try other options. michael@0: michael@0: CFLAGS="${CFLAGS} +DD64" michael@0: CXXFLAGS="${CXXFLAGS} +DD64" michael@0: AC_COMPILE_IFELSE([AC_LANG_SOURCE([int main(void) {return (sizeof(void*)*8==64)?0:1;}])], michael@0: CAN_BUILD_64=yes, CAN_BUILD_64=no) michael@0: if test "$CAN_BUILD_64" != yes; then michael@0: # reset michael@0: CFLAGS="${CFLAGS_OLD}" michael@0: CXXFLAGS="${CXXFLAGS_OLD}" michael@0: # append michael@0: CFLAGS="${CFLAGS} +DA2.0W" michael@0: CXXFLAGS="${CXXFLAGS} +DA2.0W" michael@0: AC_COMPILE_IFELSE([AC_LANG_SOURCE([int main(void) {return (sizeof(void*)*8==64)?0:1;}])], michael@0: CAN_BUILD_64=yes, CAN_BUILD_64=no) michael@0: fi michael@0: ;; michael@0: *-*ibm-openedition*|*-*-os390*) michael@0: CFLAGS="${CFLAGS} -Wc,lp64" michael@0: CXXFLAGS="${CXXFLAGS} -Wc,lp64" michael@0: LDFLAGS="${LDFLAGS} -Wl,lp64" michael@0: AC_COMPILE_IFELSE([AC_LANG_SOURCE([int main(void) {return (sizeof(void*)*8==64)?0:1;}])], michael@0: CAN_BUILD_64=yes, CAN_BUILD_64=no) michael@0: ;; michael@0: *) michael@0: # unknown platform. michael@0: ;; michael@0: esac michael@0: fi michael@0: AC_MSG_RESULT($CAN_BUILD_64) michael@0: if test "$CAN_BUILD_64" = yes; then michael@0: AC_MSG_CHECKING([whether runnable 64-bit binaries are being built ]) michael@0: AC_RUN_IFELSE([AC_LANG_SOURCE([int main(void) {return (sizeof(void*)*8==64)?0:1;}])], michael@0: BITS_RUN_64=yes, BITS_RUN_64=no, BITS_RUN_64=unknown) michael@0: AC_MSG_RESULT($BITS_RUN_64); michael@0: michael@0: CFLAGS_64="${CFLAGS}" michael@0: CXXFLAGS_64="${CXXFLAGS}" michael@0: LDFLAGS_64="${LDFLAGS}" michael@0: ARFLAGS_64="${ARFLAGS}" michael@0: fi michael@0: # put it back. michael@0: CFLAGS="${CFLAGS_OLD}" michael@0: CXXFLAGS="${CXXFLAGS_OLD}" michael@0: LDFLAGS="${LDFLAGS_OLD}" michael@0: ARFLAGS="${ARFLAGS_OLD}" michael@0: fi michael@0: if test "$BITS_CHECK_32" = "yes"; then michael@0: # see comment under 'if BITS_CHECK_64', above. michael@0: AC_MSG_CHECKING([how to build 32-bit executables]) michael@0: if test "$GCC" = yes; then michael@0: CFLAGS="${CFLAGS} -m32" michael@0: CXXFLAGS="${CXXFLAGS} -m32" michael@0: AC_COMPILE_IFELSE([AC_LANG_SOURCE([int main(void) {return (sizeof(void*)*8==32)?0:1;}])], michael@0: CAN_BUILD_32=yes, CAN_BUILD_32=no) michael@0: fi michael@0: AC_MSG_RESULT($CAN_BUILD_32) michael@0: if test "$CAN_BUILD_32" = yes; then michael@0: AC_MSG_CHECKING([whether runnable 32-bit binaries are being built ]) michael@0: AC_RUN_IFELSE([AC_LANG_SOURCE([int main(void) {return (sizeof(void*)*8==32)?0:1;}])], michael@0: BITS_RUN_32=yes, BITS_RUN_32=no, BITS_RUN_32=unknown) michael@0: AC_MSG_RESULT($BITS_RUN_32); michael@0: CFLAGS_32="${CFLAGS}" michael@0: CXXFLAGS_32="${CXXFLAGS}" michael@0: LDFLAGS_32="${LDFLAGS}" michael@0: ARFLAGS_32="${ARFLAGS}" michael@0: fi michael@0: # put it back. michael@0: CFLAGS="${CFLAGS_OLD}" michael@0: CXXFLAGS="${CXXFLAGS_OLD}" michael@0: LDFLAGS="${LDFLAGS_OLD}" michael@0: ARFLAGS="${ARFLAGS_OLD}" michael@0: fi michael@0: michael@0: ## michael@0: # OK. Now, we've tested for 32 and 64 bitness. Let's see what we'll do. michael@0: # michael@0: michael@0: # First, implement 64else32 michael@0: if test "$BITS_REQ" = "64else32"; then michael@0: if test "$BITS_RUN_64" = "yes"; then michael@0: BITS_REQ=64 michael@0: else michael@0: # no changes. michael@0: BITS_OK=yes michael@0: fi michael@0: fi michael@0: michael@0: # implement. michael@0: if test "$BITS_REQ" = "32" -a "$BITS_RUN_32" = "yes"; then michael@0: CFLAGS="${CFLAGS_32}" michael@0: CXXFLAGS="${CXXFLAGS_32}" michael@0: LDFLAGS="${LDFLAGS_32}" michael@0: ARFLAGS="${ARFLAGS_32}" michael@0: BITS_OK=yes michael@0: elif test "$BITS_REQ" = "64" -a "$BITS_RUN_64" = "yes"; then michael@0: CFLAGS="${CFLAGS_64}" michael@0: CXXFLAGS="${CXXFLAGS_64}" michael@0: LDFLAGS="${LDFLAGS_64}" michael@0: ARFLAGS="${ARFLAGS_64}" michael@0: BITS_OK=yes michael@0: elif test "$BITS_OK" != "yes"; then michael@0: AC_MSG_ERROR([Requested $BITS_REQ bit binaries but could not compile and execute them. See readme.html for help with cross compilation., and set compiler options manually.]) michael@0: fi michael@0: fi michael@0: ]) michael@0: michael@0: # Strict compilation options. michael@0: AC_DEFUN([AC_CHECK_STRICT_COMPILE], michael@0: [ michael@0: AC_MSG_CHECKING([whether strict compiling is on]) michael@0: AC_ARG_ENABLE(strict,[ --enable-strict compile with strict compiler options [default=yes]], [ michael@0: if test "$enableval" = no michael@0: then michael@0: ac_use_strict_options=no michael@0: else michael@0: ac_use_strict_options=yes michael@0: fi michael@0: ], [ac_use_strict_options=yes]) michael@0: AC_MSG_RESULT($ac_use_strict_options) michael@0: michael@0: if test "$ac_use_strict_options" = yes michael@0: then michael@0: if test "$GCC" = yes michael@0: then michael@0: case "${host}" in michael@0: *-*-solaris*) michael@0: # Don't use -std=c99 option on Solaris/GCC michael@0: ;; michael@0: *) michael@0: # Do not use -ansi. It limits us to C90, and it breaks some platforms. michael@0: # We use -std=c99 to disable the gnu99 defaults and its associated warnings michael@0: CFLAGS="$CFLAGS -std=c99" michael@0: ;; michael@0: esac michael@0: michael@0: CFLAGS="$CFLAGS -Wall -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings" michael@0: else michael@0: case "${host}" in michael@0: *-*-cygwin) michael@0: if test "`$CC /help 2>&1 | head -c9`" = "Microsoft" michael@0: then michael@0: CFLAGS="$CFLAGS /W4" michael@0: fi ;; michael@0: *-*-mingw32|*-*-mingw64) michael@0: CFLAGS="$CFLAGS -W4" ;; michael@0: esac michael@0: fi michael@0: if test "$GXX" = yes michael@0: then michael@0: CXXFLAGS="$CXXFLAGS -W -Wall -pedantic -Wpointer-arith -Wwrite-strings -Wno-long-long" michael@0: else michael@0: case "${host}" in michael@0: *-*-cygwin) michael@0: if test "`$CXX /help 2>&1 | head -c9`" = "Microsoft" michael@0: then michael@0: CXXFLAGS="$CXXFLAGS /W4" michael@0: fi ;; michael@0: *-*-mingw32|*-*-mingw64) michael@0: CFLAGS="$CFLAGS -W4" ;; michael@0: esac michael@0: fi michael@0: fi michael@0: ]) michael@0: michael@0: