]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/runConfigureICU
ICU-400.37.tar.gz
[apple/icu.git] / icuSources / runConfigureICU
index 16527912a3bb5da2819ecad8c95dbd0b40738f8a..a64831995c1c70970c4d2109ae57e08d84e1e0f2 100755 (executable)
@@ -1,5 +1,5 @@
 #!/bin/sh
-# Copyright (c) 1999-2003, International Business Machines Corporation and
+# Copyright (c) 1999-2008, International Business Machines Corporation and
 # others. All Rights Reserved.
 
 # runConfigureICU: This script will run the "configure" script for the appropriate platform
@@ -29,26 +29,27 @@ Options: -h, --help         Print this message and exit
 
 The following names can be supplied as the argument for platform:
 
-    AIX4.3xlC               Use IBM's xlC on AIX 4.3
-    AIX4.3xlC_nothreads     Use IBM's xlC on AIX 4.3 with no multithreading
-    AIX4.3VA                Use IBM's Visual Age xlC_r compiler on AIX 4.3
-    ALPHA/LINUXGCC          Use GCC on Alpha/Linux systems
-    ALPHA/LINUXCCC          Use Compaq C compiler on Alpha/Linux systems
-    CygWin                  Use the GNU C++ compiler on CygWin
-    FreeBSD                 Use the GNU C++ compiler on Free BSD
-    HP-UX11CC               Use HP's C++ compiler on HP-UX 11
-    HP-UX11ACC              Use the Advanced C++ compiler on HP-UX 11
-    LinuxRedHat             Use the GNU C++ compiler on Linux
-    MacOSX                  Use the GNU C++ compiler on MacOS X (Darwin)
-    QNX                     Use QNX's QCC compiler on QNX/Neutrino
-    SOLARISCC               Use Sun's CC compiler on Solaris
-    SOLARISCC/W4.2          Use Sun's Workshop 4.2 CC compiler on Solaris
-    SOLARISGCC              Use the GNU C++ compiler on Solaris
-    SOLARISX86              Use Sun's CC compiler on Solaris x86
-    TRU64V5.1/CXX           Use Compaq's cxx compiler on Tru64 (OSF)
-    zOS                     Use IBM's cxx compiler on z/OS (os/390)
-    zOSV1R2                 Use IBM's cxx compiler for z/OS 1.2
-    OS390V2R10              Use IBM's cxx compiler for OS/390 2.10
+    AIX                 Use the IBM Visual Age xlc_r/xlC_r compilers on AIX
+    AIX/GCC             Use the GNU gcc/g++ compilers on AIX
+    Cygwin              Use the GNU gcc/g++ compilers on Cygwin
+    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
+    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/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)
+    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
+    SolarisX86          Use the Sun cc/CC compilers on Solaris x86
+    TRU64V5.1/CXX       Use the Compaq cxx compiler on Tru64 (OSF)
+    zOS                 Use the IBM cxx compiler on z/OS (os/390)
+    zOSV1R2             Use the IBM cxx compiler for z/OS 1.2
 EOE
     fi
 
@@ -69,11 +70,11 @@ do
         ;;
     --enable-debug)
         debug=1
-        release=0
+        OPTS="$OPTS --enable-debug"
         ;;
     --disable-release)
-        debug=0
         release=0
+        OPTS="$OPTS --disable-release"
         ;;
     *)
         platform="$1"
@@ -120,87 +121,46 @@ then
 fi
 
 case $platform in
-    AIX4.3xlC)
-        THE_OS=AIX
-        THE_COMP="xlC_r"
-        CC=/usr/ibmcxx/bin/xlc_r; export CC
-        CXX=/usr/ibmcxx/bin/xlC_r; export CXX
-        RELEASE_CFLAGS="-O -qmaxmem=-1"
-        RELEASE_CXXFLAGS="-O -qmaxmem=-1"
-        ;;
-    AIX4.3xlC_nothreads)
-        THE_OS=AIX
-        THE_COMP="xlC"
-        CC=/usr/ibmcxx/bin/xlc; export CC
-        CXX=/usr/ibmcxx/bin/xlC; export CXX
-        AIX_SHLIB=/usr/ibmcxx/bin/makeC++SharedLib; export AIX_SHLIB
-        RELEASE_CFLAGS="-O -qmaxmem=-1"
-        RELEASE_CXXFLAGS="-O -qmaxmem=-1"
-        OPTS="$OPTS --enable-threads=no"
-        ;;
-    AIX4.3VA)
+    AIX)
         THE_OS=AIX
         THE_COMP="xlC_r"
         CC=`which xlc_r`; export CC
         CXX=`which xlC_r`; export CXX
         RELEASE_CFLAGS="-O2 -qmaxmem=-1"
         RELEASE_CXXFLAGS="-O2 -qmaxmem=-1"
-        #LDFLAGS=-L/usr/lpp/xlC/lib; export LDFLAGS
         ;;
-# Just use --enable-threads=no. Visual Age makes no distinction between xlC and xlC_r or any other _r programs.
-#    AIX4.3VA_nothreads)
-#        THE_OS=AIX
-#        THE_COMP="xlC"
-#        # Only in Visual Age, there is no different between xlc and xlc_r.
-#        CC=`which xlc`; export CC
-#        CXX=`which xlC`; export CXX
-#        OPTS="$OPTS --enable-threads=no"
-#        RELEASE_CFLAGS="-O2 -qmaxmem=-1"
-#        RELEASE_CXXFLAGS="-O2 -qmaxmem=-1"
-#        #LDFLAGS=-L/usr/lpp/xlC/lib; export LDFLAGS
-#        ;;
-    SOLARISX86)
-        THE_OS="SOLARIS X86"
-        THE_COMP="Sun's CC"
-        CC=`which cc`; export CC
-        CXX=`which CC`; export CXX
-        CXX_FLAGS="-w";export CXX_FLAGS
-        C_FLAGS="-w";export C_FLAGS
-        LDFLAGS="-L -lCrun";export LDFLAGS
-        RELEASE_CFLAGS=-xO3
-        RELEASE_CXXFLAGS=-O3
+    AIX/GCC)
+        THE_OS=AIX
+        THE_COMP="the GNU C++"
+        CC=gcc; export CC
+        CXX=g++; export CXX
         ;;
-    SOLARISCC)
+    Solaris)
         THE_OS=SOLARIS
         THE_COMP="Sun's CC"
         CC=`which cc`; export CC
         CXX=`which CC`; export CXX
-        RELEASE_CFLAGS=-xO4
-        RELEASE_CXXFLAGS=-O4
+        RELEASE_CFLAGS="-xO4 -xlibmil"
+        RELEASE_CXXFLAGS="-O4 -xlibmil"
         ;;
-    SOLARISCC/W4.2)
+    Solaris/GCC)
         THE_OS=SOLARIS
+        THE_COMP="the GNU C++"
+        CC=gcc; export CC
+        CXX=g++; export CXX
+        RELEASE_CFLAGS=-O1
+        RELEASE_CXXFLAGS=-O3
+        ;;
+    SolarisX86)
+        THE_OS="SOLARIS X86"
         THE_COMP="Sun's CC"
         CC=`which cc`; export CC
         CXX=`which CC`; export CXX
-        RELEASE_CFLAGS=-x04
-        RELEASE_CXXFLAGS="-O4 +d"
-        ;;
-    SOLARISGCC)
-        THE_OS=SOLARIS
-        THE_COMP="the GNU C++"
-        CXXFLAGS=-I/usr/local/include/g++; export CXXFLAGS
-        LDFLAGS=-R/usr/local/lib; export LDFLAGS
-        ;;
-    HP-UX11CC)
-        THE_OS="HP-UX 11"
-        THE_COMP="HP's CC"
-        CC=cc; export CC
-        CXX=CC; export CXX
-        RELEASE_CFLAGS='+O2 +Ofltacc'
-        RELEASE_CXXFLAGS='+O2 +Ofltacc'
+        LDFLAGS="-L -lCrun";export LDFLAGS
+        RELEASE_CFLAGS=-xO3
+        RELEASE_CXXFLAGS=-O3
         ;;
-    HP-UX11ACC)
+    HP-UX/ACC)
         THE_OS="HP-UX 11"
         THE_COMP="aCC"
         CC=cc; export CC
@@ -208,35 +168,84 @@ case $platform in
         RELEASE_CFLAGS='+O2 +Ofltacc'
         RELEASE_CXXFLAGS='+O2 +Ofltacc'
         ;;
-    TRU64V5.1/CXX)
-        THE_OS="OSF1"
-        THE_COMP="Compaq cxx"
-        CC=cc; export CC
-        CXX=cxx; export CXX
-        ;;
-    ALPHA/LINUXCCC)
-        THE_OS="Linux"
-        THE_COMP="Compaq's CC"
-        CC=ccc; export CC
-        CXX=cxx; export CXX
+    IBMi)
+        THE_OS="IBM i"
+        THE_COMP="the iCC C++"
+        CC=/usr/bin/icc; export CC
+        CXX=/usr/bin/icc; export CXX
+        MAKE=/usr/bin/gmake; export MAKE
         RELEASE_CFLAGS='-O4'
         RELEASE_CXXFLAGS='-O4'
         ;;
-    ALPHA/LINUXGCC)
+    Linux/ECC)
         THE_OS="Linux"
-        THE_COMP="the GNU C++"
-        CC=gcc; export CC
-        CXX=g++; export CXX
+        THE_COMP="Intel ECC 7.1"
+        CC=ecc; export CC
+        CXX=ecpc; export CXX
+        RELEASE_CFLAGS='-O2'
+        RELEASE_CXXFLAGS='-O2'
+        ;;
+    Linux/ICC)
+        THE_OS="Linux"
+        THE_COMP="Intel ICC 9.0"
+        CC=`which icc`; export CC
+        CXX=`which icpc`; export CXX
+        RELEASE_CFLAGS='-O'
+        RELEASE_CXXFLAGS='-O'
+        ;;
+    Linux/VA)
+        THE_OS="Linux"
+        THE_COMP="IBM Visual Age C++ Compiler"
+        CC=`which xlc_r`; export CC
+        CXX=`which xlC_r`; export CXX
+        RELEASE_CFLAGS="-O2 -qmaxmem=-1"
+        RELEASE_CXXFLAGS="-O2 -qmaxmem=-1"
         ;;
-    LinuxRedHat*)
+    Linux*)
         THE_OS="Linux"
         THE_COMP="the GNU C++"
         CC=gcc; export CC
         CXX=g++; export CXX
         ;;
-    CygWin)
-        THE_OS="CygWin"
+    Cygwin)
+        THE_OS="Cygwin"
         THE_COMP="the GNU C++"
+        RELEASE_CFLAGS='-O3'
+        RELEASE_CXXFLAGS='-O3'
+        ;;
+    Cygwin/MSVC)
+        THE_OS="Windows with Cygwin"
+        THE_COMP="Microsoft Visual C++"
+        CC=cl; export CC
+        CXX=cl; export CXX
+        RELEASE_CFLAGS='/O2 /Ob2 /Op'
+        RELEASE_CXXFLAGS='/O2 /Ob2 /Op'
+        DEBUG_CFLAGS='/Zi'
+        DEBUG_CXXFLAGS='/Zi'
+        DEBUG_LDFLAGS='/DEBUG'
+        ;;
+    Cygwin/MSVC2005)
+        THE_OS="Windows with Cygwin"
+        THE_COMP="Microsoft Visual C++ 2005"
+        CC=cl; export CC
+        CXX=cl; export CXX
+        RELEASE_CFLAGS='/O2 /Ob2'
+        RELEASE_CXXFLAGS='/O2 /Ob2'
+        DEBUG_CFLAGS='/Zi'
+        DEBUG_CXXFLAGS='/Zi'
+        DEBUG_LDFLAGS='/DEBUG'
+        ;;
+    Cygwin/ICL)
+        THE_OS="Windows with Cygwin"
+        THE_COMP="Intel C++"
+        CC=icl; export CC
+        CXX=icl; export CXX
+        # The Intel compiler has optimization bugs. So we disable optimization.
+        RELEASE_CFLAGS='/Od'
+        RELEASE_CXXFLAGS='/Od'
+        DEBUG_CFLAGS='/Zi'
+        DEBUG_CXXFLAGS='/Zi'
+        DEBUG_LDFLAGS='/DEBUG'
         ;;
     MacOSX)
         THE_OS="MacOS X (Darwin)"
@@ -250,6 +259,12 @@ case $platform in
         CC=gcc; export CC
         CXX=g++; export CXX
         ;;
+    TRU64V5.1/CXX)
+        THE_OS="OSF1"
+        THE_COMP="Compaq cxx"
+        CC=cc; export CC
+        CXX=cxx; export CXX
+        ;;
     QNX)
         THE_OS="QNX"
         THE_COMP="QNX cc"
@@ -258,11 +273,11 @@ case $platform in
         ;;
     zOS)
         THE_OS="z/OS (OS/390)"
-        THE_COMP="z/OS 1.2 (through OS/390 v2r10) C/C++"
+        THE_COMP="z/OS C/C++"
         CC=cc; export CC
         CXX=cxx; export CXX
-        export RELEASE_CFLAGS='-2'
-        export RELEASE_CXXFLAGS='-2'
+        RELEASE_CFLAGS="-2 -Wc,'inline(auto,noreport,500,4000)'"
+        RELEASE_CXXFLAGS="-2 -Wc,'inline(auto,noreport,500,4000)'"
         ;;
     zOSV1R2)
         THE_OS="z/OS 1.2"
@@ -271,24 +286,11 @@ case $platform in
         CXX=cxx; export CXX
         export COMPILE_LINK_ENVVAR='_CXX_CVERSION=0x41020000 _C89_CVERSION=0x41020000 _CC_CVERSION=0x41020000 _CXX_PVERSION=0x41020000 _C89_PVERSION=0x41020000 _CC_PVERSION=0x41020000'
         export _CXX_CVERSION=0x41020000 _C89_CVERSION=0x41020000 _CC_CVERSION=0x41020000 _CXX_PVERSION=0x41020000 _C89_PVERSION=0x41020000 _CC_PVERSION=0x41020000
-        export LDFLAGS=-Wl,"compat=pm3"
-        export CFLAGS='-Wc,"target(zOSV1R2)"'
-        export CXXFLAGS='-Wc,"target(zOSV1R2)"'
-        export RELEASE_CFLAGS='-2'
-        export RELEASE_CXXFLAGS='-2'
-        ;;
-    OS390V2R10)
-        THE_OS="OS/390 2.10"
-        THE_COMP="OS/390 2.10 C/C++"
-        CC=cc; export CC
-        CXX=cxx; export CXX
-        export COMPILE_LINK_ENVVAR='_CXX_CVERSION=0x220A0000 _C89_CVERSION=0x220A0000 _CC_CVERSION=0x220A0000 _CXX_PVERSION=0x220A0000 _C89_PVERSION=0x220A0000 _CC_PVERSION=0x220A0000'
-        export _CXX_CVERSION=0x220A0000 _C89_CVERSION=0x220A0000 _CC_CVERSION=0x220A0000 _CXX_PVERSION=0x220A0000 _C89_PVERSION=0x220A0000 _CC_PVERSION=0x220A0000
-        export LDFLAGS=-Wl,"compat=pm3"
-        export CFLAGS='-Wc,"target(OSV2R10)"'
-        export CXXFLAGS='-Wc,"target(OSV2R10)"'
-        export RELEASE_CFLAGS='-2'
-        export RELEASE_CXXFLAGS='-2'
+        export LDFLAGS="-Wl,'compat=pm3'"
+        export CFLAGS="-Wc,'target(zOSV1R2)'"
+        export CXXFLAGS="-Wc,'target(zOSV1R2)'"
+        export RELEASE_CFLAGS="-2 -Wc,'inline(auto,noreport,500,4000)'"
+        export RELEASE_CXXFLAGS="-2 -Wc,'inline(auto,noreport,500,4000)'"
         ;;
     *)
         >&2 echo "$me: unrecognized platform \"$platform\" (use --help for help)"
@@ -312,7 +314,6 @@ then
     then
         CFLAGS="$CFLAGS $RELEASE_CFLAGS"
     fi
-    export CFLAGS
     if test "$RELEASE_CXXFLAGS" = ""
     then
         case $CXX in
@@ -325,7 +326,10 @@ then
     then
         CXXFLAGS="$CXXFLAGS $RELEASE_CXXFLAGS"
     fi
-    export CXXFLAGS
+    if test "$RELEASE_LDFLAGS" != ""
+    then
+        LDFLAGS="$LDFLAGS $RELEASE_LDFLAGS"
+    fi
 fi
 
 if test $debug -eq 1
@@ -334,14 +338,20 @@ then
     then
         CFLAGS="$CFLAGS $DEBUG_CFLAGS"
     fi
-    export CFLAGS
     if test "$DEBUG_CXXFLAGS" != ""
     then
         CXXFLAGS="$CXXFLAGS $DEBUG_CXXFLAGS"
     fi
-    export CXXFLAGS
+    if test "$DEBUG_LDFLAGS" != ""
+    then
+        LDFLAGS="$LDFLAGS $DEBUG_LDFLAGS"
+    fi
 fi
 
+export CFLAGS
+export CXXFLAGS
+export LDFLAGS
+
 # Run configure
 
 echo "Running ./configure $OPTS $@ for $THE_OS using $THE_COMP compiler"
@@ -351,4 +361,3 @@ echo
 echo If the result of the above commands looks okay to you, go to the directory
 echo source in the ICU distribution to build ICU. Please remember that ICU needs
 echo GNU make to build properly...
-