2 # Copyright (c) 1999-2006, International Business Machines Corporation and
3 # others. All Rights Reserved.
5 # runConfigureICU: This script will run the "configure" script for the appropriate platform
6 # Only supported platforms are recognized
21 echo "${uletter}sage: $me [ -h, --help ] [ --enable-debug | --disable-release ] platform [ configurearg ... ]"
26 Options: -h, --help Print this message and exit
27 --enable-debug Enable support for debugging
28 --disable-release Disable presetting optimization flags
30 The following names can be supplied as the argument for platform:
32 AIX Use the IBM Visual Age xlc_r/xlC_r compilers on AIX
33 AIX/GCC Use the GNU gcc/g++ compilers on AIX
34 BeOS Use the GNU gcc/g++ compilers on BeOS
35 Cygwin Use the GNU gcc/g++ compilers on Cygwin
36 Cygwin/MSVC Use the Microsoft Visual C++ compiler on Cygwin
37 Cygwin/ICL Use the Intel C++ compiler on Cygwin
38 FreeBSD Use the GNU gcc/g++ compilers on Free BSD
39 HP-UX/ACC Use the HP ANSI C/Advanced C++ compilers on HP-UX 11
40 Linux Use the GNU gcc/g++ compilers on Linux
41 Linux/ECC Use the Intel ECC compiler on Linux
42 Linux/ICC Use the Intel ICC compiler on Linux
43 Linux/VA Use the IBM Visual Age compiler on Power PC Linux
44 MacOSX Use the GNU gcc/g++ compilers on MacOS X (Darwin)
45 QNX Use the QNX QCC compiler on QNX/Neutrino
46 Solaris Use the Sun cc/CC compilers on Solaris
47 Solaris/GCC Use the GNU gcc/g++ compilers on Solaris
48 SolarisX86 Use the Sun cc/CC compilers on Solaris x86
49 TRU64V5.1/CXX Use the Compaq cxx compiler on Tru64 (OSF)
50 zOS Use the IBM cxx compiler on z/OS (os/390)
51 zOSV1R2 Use the IBM cxx compiler for z/OS 1.2
72 OPTS
="$OPTS --enable-debug"
76 OPTS
="$OPTS --disable-release"
87 if test x
$platform = x
101 if test x
$configure = x
103 if test -f .
/configure
107 configuredir
=`echo $0 | sed 's,[^/]*$,,'`
108 if test x
$configuredir = x
$0
114 if test x
$configuredir = x
119 configure
=$configuredir/configure
126 CC
=`which xlc_r`; export CC
127 CXX
=`which xlC_r`; export CXX
128 RELEASE_CFLAGS
="-O2 -qmaxmem=-1"
129 RELEASE_CXXFLAGS
="-O2 -qmaxmem=-1"
133 THE_COMP
="the GNU C++"
140 CC
=`which cc`; export CC
141 CXX
=`which CC`; export CXX
142 RELEASE_CFLAGS
="-xO4 -xlibmil"
143 RELEASE_CXXFLAGS
="-O4 -xlibmil"
147 THE_COMP
="the GNU C++"
156 CC
=`which cc`; export CC
157 CXX
=`which CC`; export CXX
158 LDFLAGS
="-L -lCrun";export LDFLAGS
167 RELEASE_CFLAGS
='+O2 +Ofltacc'
168 RELEASE_CXXFLAGS
='+O2 +Ofltacc'
172 THE_COMP
="Intel ECC 7.1"
176 RELEASE_CXXFLAGS
='-O2'
180 THE_COMP
="Intel ICC 9.0"
181 CC
=`which icc`; export CC
182 CXX
=`which icpc`; export CXX
184 RELEASE_CXXFLAGS
='-O'
188 THE_COMP
="IBM Visual Age C++ Compiler"
189 CC
=`which xlc_r`; export CC
190 CXX
=`which xlC_r`; export CXX
191 RELEASE_CFLAGS
="-O2 -qmaxmem=-1"
192 RELEASE_CXXFLAGS
="-O2 -qmaxmem=-1"
196 THE_COMP
="the GNU C++"
202 THE_COMP
="the GNU C++"
204 RELEASE_CXXFLAGS
='-O3'
207 THE_OS
="Windows with Cygwin"
208 THE_COMP
="Microsoft Visual C++"
211 RELEASE_CFLAGS
='/O2 /Ob2 /Op'
212 RELEASE_CXXFLAGS
='/O2 /Ob2 /Op'
215 DEBUG_LDFLAGS
='/DEBUG'
218 THE_OS
="Windows with Cygwin"
222 # The Intel compiler has optimization bugs. So we disable optimization.
224 RELEASE_CXXFLAGS
='/Od'
227 DEBUG_LDFLAGS
='/DEBUG'
230 THE_OS
="MacOS X (Darwin)"
231 THE_COMP
="the GNU C++"
233 RELEASE_CXXFLAGS
='-O2'
237 THE_COMP
="the GNU C++"
243 THE_COMP
="Compaq cxx"
255 THE_COMP
="the GNU C++"
256 OPTIMIZATIONS
="-fdefault-inline -fdefer-pop -fforce-mem -fforce-addr \
257 -finline -finline-functions \
258 -fkeep-inline-functions -fkeep-static-consts -fbranch-count-reg \
259 -ffunction-cse -fstrength-reduce -fthread-jumps -fcse-follow-jumps \
260 -fcse-skip-blocks -frerun-cse-after-loop -frerun-loop-opt \
261 -fexpensive-optimizations -foptimize-register-move -fregmove \
262 -fschedule-insns -fschedule-insns2 -ffloat-store -funroll-loops \
263 -fmove-all-movables -freduce-all-givs -fpeephole \
264 -funroll-all-loops -ffunction-sections -fdata-sections"
265 RELEASE_CFLAGS
="$OPTIMIZATIONS"
266 RELEASE_CXXFLAGS
="$OPTIMIZATIONS"
269 THE_OS
="z/OS (OS/390)"
270 THE_COMP
="z/OS C/C++"
273 export RELEASE_CFLAGS
="-2 -Wc,'inline(auto,noreport,500,2500)'"
274 export RELEASE_CXXFLAGS
="-2 -Wc,'inline(auto,noreport,300,2500)'"
278 THE_COMP
="z/OS 1.2 C/C++"
281 export COMPILE_LINK_ENVVAR
='_CXX_CVERSION=0x41020000 _C89_CVERSION=0x41020000 _CC_CVERSION=0x41020000 _CXX_PVERSION=0x41020000 _C89_PVERSION=0x41020000 _CC_PVERSION=0x41020000'
282 export _CXX_CVERSION
=0x41020000 _C89_CVERSION
=0x41020000 _CC_CVERSION
=0x41020000 _CXX_PVERSION
=0x41020000 _C89_PVERSION
=0x41020000 _CC_PVERSION
=0x41020000
283 export LDFLAGS
="-Wl,'compat=pm3'"
284 export CFLAGS
="-Wc,'target(zOSV1R2)'"
285 export CXXFLAGS
="-Wc,'target(zOSV1R2)'"
286 export RELEASE_CFLAGS
="-2 -Wc,'inline(auto,noreport,500,2500)'"
287 export RELEASE_CXXFLAGS
="-2 -Wc,'inline(auto,noreport,300,2500)'"
290 >&2 echo "$me: unrecognized platform \"$platform\" (use --help for help)"
297 if test $release -eq 1
299 if test "$RELEASE_CFLAGS" = ""
302 gcc
|*/gcc
|*-gcc-*|*/*-gcc-*)
307 if test "$RELEASE_CFLAGS" != ""
309 CFLAGS
="$CFLAGS $RELEASE_CFLAGS"
312 if test "$RELEASE_CXXFLAGS" = ""
315 g
++|*/g
++|*-g++-*|*/*-g++-*)
320 if test "$RELEASE_CXXFLAGS" != ""
322 CXXFLAGS
="$CXXFLAGS $RELEASE_CXXFLAGS"
329 if test "$DEBUG_CFLAGS" != ""
331 CFLAGS
="$CFLAGS $DEBUG_CFLAGS"
334 if test "$DEBUG_CXXFLAGS" != ""
336 CXXFLAGS
="$CXXFLAGS $DEBUG_CXXFLAGS"
339 if test "$DEBUG_LDFLAGS" != ""
341 LDFLAGS
="$LDFLAGS $DEBUG_LDFLAGS"
348 echo "Running ./configure $OPTS $@ for $THE_OS using $THE_COMP compiler"
352 echo If the result of the above commands looks okay to you
, go to the directory
353 echo source in the ICU distribution to build ICU. Please remember that ICU needs
354 echo GNU
make to build properly...