X-Git-Url: https://git.saurik.com/apple/icu.git/blobdiff_plain/729e4ab9bc6618bc3d8a898e575df7f4019e29ca..a01113dcd0f39d5da295ef82785beff9ed86fe38:/icuSources/runConfigureICU diff --git a/icuSources/runConfigureICU b/icuSources/runConfigureICU index 033186dd..77df3a06 100755 --- a/icuSources/runConfigureICU +++ b/icuSources/runConfigureICU @@ -1,5 +1,7 @@ #!/bin/sh -# Copyright (c) 1999-2010, 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-2015, International Business Machines Corporation and # others. All Rights Reserved. # runConfigureICU: This script will run the "configure" script for the appropriate platform @@ -27,6 +29,11 @@ Options: -h, --help Print this message and exit --enable-debug Enable support for debugging --disable-release Disable presetting optimization flags +If you want to add custom CFLAGS or CXXFLAGS or similar, provide them _before_ +the runConfigureICU command: + + CXXFLAGS=xyz path/to/runConfigureICU --enable-debug ... + The following names can be supplied as the argument for platform: AIX Use the IBM Visual Age xlc_r/xlC_r compilers on AIX @@ -35,14 +42,18 @@ The following names can be supplied as the argument for platform: Cygwin/MSVC Use the Microsoft Visual C++ compiler on Cygwin Cygwin/MSVC2005 Use the Microsoft Visual C++ 2005 compiler on Cygwin Cygwin/ICL Use the Intel C++ compiler on Cygwin - FreeBSD Use the GNU gcc/g++ compilers on Free BSD + FreeBSD Use the clang/clang++ or GNU gcc/g++ compilers on FreeBSD HP-UX/ACC Use the HP ANSI C/Advanced C++ compilers on HP-UX 11 IBMi Use the iCC compilers on IBM i, i5/OS, OS/400 - Linux Use the GNU gcc/g++ compilers on Linux + Linux Use the clang/clang++ or GNU gcc/g++ compilers on Linux + Linux/gcc Use the GNU gcc/g++ compilers on Linux Linux/ECC Use the Intel ECC compiler on Linux Linux/ICC Use the Intel ICC compiler on Linux Linux/VA Use the IBM Visual Age compiler on Power PC Linux - MacOSX Use the GNU gcc/g++ compilers on MacOS X (Darwin) + MacOSX Use the default compilers on MacOS X (Darwin) + MacOSX/GCC Use the GNU gcc/g++ compilers on MacOSX (Darwin) + MinGW Use the GNU gcc/g++ compilers on MinGW + MSYS/MSVC Use the Microsoft Visual C++ computer on MSYS QNX Use the QNX QCC compiler on QNX/Neutrino Solaris Use the Sun cc/CC compilers on Solaris Solaris/GCC Use the GNU gcc/g++ compilers on Solaris @@ -141,14 +152,14 @@ case $platform in CC=gcc; export CC CXX=g++; export CXX DEBUG_CFLAGS='-g -O0' - DEBUG_CXFLAGS='-g -O0' + DEBUG_CXXFLAGS='-g -O0' ;; Solaris) THE_OS=SOLARIS THE_COMP="Sun's CC" CC=`which cc`; export CC CXX=`which CC`; export CXX - RELEASE_CFLAGS="-xO4 -xlibmil" + RELEASE_CFLAGS="-xO1 -xlibmil" RELEASE_CXXFLAGS="-O4 -xlibmil" ;; Solaris/GCC) @@ -157,14 +168,14 @@ case $platform in CC=gcc; export CC CXX=g++; export CXX RELEASE_CFLAGS=-O1 - RELEASE_CXXFLAGS=-O3 + RELEASE_CXXFLAGS=-O2 ;; SolarisX86) THE_OS="SOLARIS X86" THE_COMP="Sun's CC" CC=`which cc`; export CC CXX=`which CC`; export CXX - LDFLAGS="-L -lCrun";export LDFLAGS + LDFLAGS="${LDFLAGS} -lCrun";export LDFLAGS RELEASE_CFLAGS=-xO3 RELEASE_CXXFLAGS=-O3 ;; @@ -179,10 +190,13 @@ case $platform in IBMi) THE_OS="IBM i" THE_COMP="the iCC C++" - CC=/usr/bin/icc; export CC - CXX=/usr/bin/icc; export CXX + CC=icc; export CC + CXX=icc; export CXX CPP="$CC -c -qpponly"; export CPP - MAKE=/usr/bin/gmake; export MAKE + MAKE=gmake; export MAKE + U_MAKE=gmake; export U_MAKE + # gmake is a .pgm and may not be on the path. Don't use a full path, just use gmake. + ac_cv_path_U_MAKE=gmake; export ac_cv_path_U_MAKE RELEASE_CFLAGS='-O4' RELEASE_CXXFLAGS='-O4' ;; @@ -220,13 +234,23 @@ case $platform in RELEASE_CFLAGS="-O2 -qmaxmem=-1" RELEASE_CXXFLAGS="-O2 -qmaxmem=-1" ;; - Linux*) + Linux/gcc) THE_OS="Linux" THE_COMP="the GNU C++" CC=gcc; export CC CXX=g++; export CXX - DEBUG_CFLAGS='-g -O0' - DEBUG_CXFLAGS='-g -O0' + RELEASE_CFLAGS='-O3' + RELEASE_CXXFLAGS='-O3' + DEBUG_CFLAGS='-g' + DEBUG_CXXFLAGS='-g' + ;; + Linux*) + THE_OS="Linux" + THE_COMP="the clang or else GNU C++" + RELEASE_CFLAGS='-O3' + RELEASE_CXXFLAGS='-O3' + DEBUG_CFLAGS='-g' + DEBUG_CXXFLAGS='-g' ;; Cygwin) THE_OS="Cygwin" @@ -239,11 +263,11 @@ case $platform in THE_COMP="Microsoft Visual C++" CC=cl; export CC CXX=cl; export CXX - RELEASE_CFLAGS='/Gy /MD' - RELEASE_CXXFLAGS='/Gy /MD' - DEBUG_CFLAGS='/Zi /MDd' - DEBUG_CXXFLAGS='/Zi /MDd' - DEBUG_LDFLAGS='/DEBUG' + RELEASE_CFLAGS='-Gy -MD' + RELEASE_CXXFLAGS='-Gy -MD' + DEBUG_CFLAGS='-FS -Zi -MDd' + DEBUG_CXXFLAGS='-FS -Zi -MDd' + DEBUG_LDFLAGS='-DEBUG' ;; Cygwin/MSVC2005) THE_OS="Windows with Cygwin" @@ -269,20 +293,46 @@ case $platform in DEBUG_LDFLAGS='/DEBUG' ;; MacOSX) + THE_OS="MacOS X (Darwin)" + THE_COMP="the default" + RELEASE_CFLAGS='-O2' + RELEASE_CXXFLAGS='-O2' + DEBUG_CFLAGS='-g -O0' + DEBUG_CXXFLAGS='-g -O0' + ;; + MacOSX/GCC) THE_OS="MacOS X (Darwin)" THE_COMP="the GNU C++" RELEASE_CFLAGS='-O2' RELEASE_CXXFLAGS='-O2' DEBUG_CFLAGS='-g -O0' DEBUG_CXXFLAGS='-g -O0' + CC=gcc; export CC + CXX=g++; export CXX + ;; + MinGW) + THE_OS="MinGW" + THE_COMP="the GNU C++" + RELEASE_CFLAGS='-O3' + RELEASE_CXXFLAGS='-O3' + export CXXFLAGS + ;; + MSYS/MSVC) + THE_OS="MSYS" + THE_COMP="Microsoft Visual C++" + CC=cl; export CC + CXX=cl; export CXX + RELEASE_CFLAGS='-Gy -MD' + RELEASE_CXXFLAGS='-Gy -MD' + DEBUG_CFLAGS='-FS -Zi -MDd' + DEBUG_CXXFLAGS='-FS -Zi -MDd' + DEBUG_LDFLAGS='-DEBUG' ;; *BSD) THE_OS="BSD" THE_COMP="the GNU C++" - CC=gcc; export CC - CXX=g++; export CXX DEBUG_CFLAGS='-g -O0' - DEBUG_CXFLAGS='-g -O0' + DEBUG_CXXFLAGS='-g -O0' ;; TRU64V5.1/CXX) THE_OS="OSF1" @@ -299,10 +349,10 @@ case $platform in zOS) THE_OS="z/OS (OS/390)" THE_COMP="z/OS C/C++" - CC=cc; export CC - CXX=cxx; export CXX - RELEASE_CFLAGS="-2 -Wc,'inline(auto,noreport,500,4000)'" - RELEASE_CXXFLAGS="-2 -Wc,'inline(auto,noreport,500,4000)'" + CC=xlc; export CC + CXX=xlC; export CXX + RELEASE_CFLAGS="-O2 -Wc,'inline(AUTO,NOREPORT,1000,8000)'" + RELEASE_CXXFLAGS="-O2 -Wc,'inline(AUTO,NOREPORT,1000,8000)'" ;; zOSV1R2) THE_OS="z/OS 1.2" @@ -337,7 +387,7 @@ then fi if test "$RELEASE_CFLAGS" != "" then - CFLAGS="$CFLAGS $RELEASE_CFLAGS" + CFLAGS="$RELEASE_CFLAGS $CFLAGS" fi if test "$RELEASE_CXXFLAGS" = "" then @@ -349,11 +399,11 @@ then fi if test "$RELEASE_CXXFLAGS" != "" then - CXXFLAGS="$CXXFLAGS $RELEASE_CXXFLAGS" + CXXFLAGS="$RELEASE_CXXFLAGS $CXXFLAGS" fi if test "$RELEASE_LDFLAGS" != "" then - LDFLAGS="$LDFLAGS $RELEASE_LDFLAGS" + LDFLAGS="$RELEASE_LDFLAGS $LDFLAGS" fi fi @@ -361,15 +411,15 @@ if test $debug -eq 1 then if test "$DEBUG_CFLAGS" != "" then - CFLAGS="$CFLAGS $DEBUG_CFLAGS" + CFLAGS="$DEBUG_CFLAGS $CFLAGS" fi if test "$DEBUG_CXXFLAGS" != "" then - CXXFLAGS="$CXXFLAGS $DEBUG_CXXFLAGS" + CXXFLAGS="$DEBUG_CXXFLAGS $CXXFLAGS" fi if test "$DEBUG_LDFLAGS" != "" then - LDFLAGS="$LDFLAGS $DEBUG_LDFLAGS" + LDFLAGS="$DEBUG_LDFLAGS $LDFLAGS" fi fi