2 # Copyright (c) 1999-2008, 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 Cygwin Use the GNU gcc/g++ compilers on Cygwin
35 Cygwin/MSVC Use the Microsoft Visual C++ compiler on Cygwin
36 Cygwin/MSVC2005 Use the Microsoft Visual C++ 2005 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 IBMi Use the iCC compilers on IBM i, i5/OS, OS/400
41 Linux Use the GNU gcc/g++ compilers on Linux
42 Linux/ECC Use the Intel ECC compiler on Linux
43 Linux/ICC Use the Intel ICC compiler on Linux
44 Linux/VA Use the IBM Visual Age compiler on Power PC Linux
45 MacOSX Use the GNU gcc/g++ compilers on MacOS X (Darwin)
46 QNX Use the QNX QCC compiler on QNX/Neutrino
47 Solaris Use the Sun cc/CC compilers on Solaris
48 Solaris/GCC Use the GNU gcc/g++ compilers on Solaris
49 SolarisX86 Use the Sun cc/CC compilers on Solaris x86
50 TRU64V5.1/CXX Use the Compaq cxx compiler on Tru64 (OSF)
51 zOS Use the IBM cxx compiler on z/OS (os/390)
52 zOSV1R2 Use the IBM cxx compiler for z/OS 1.2
73 OPTS
="$OPTS --enable-debug"
77 OPTS
="$OPTS --disable-release"
88 if test x
$platform = x
102 if test x
$configure = x
104 if test -f .
/configure
108 configuredir
=`echo $0 | sed 's,[^/]*$,,'`
109 if test x
$configuredir = x
$0
115 if test x
$configuredir = x
120 configure
=$configuredir/configure
127 CC
=`which xlc_r`; export CC
128 CXX
=`which xlC_r`; export CXX
129 RELEASE_CFLAGS
="-O2 -qmaxmem=-1"
130 RELEASE_CXXFLAGS
="-O2 -qmaxmem=-1"
134 THE_COMP
="the GNU C++"
141 CC
=`which cc`; export CC
142 CXX
=`which CC`; export CXX
143 RELEASE_CFLAGS
="-xO4 -xlibmil"
144 RELEASE_CXXFLAGS
="-O4 -xlibmil"
148 THE_COMP
="the GNU C++"
157 CC
=`which cc`; export CC
158 CXX
=`which CC`; export CXX
159 LDFLAGS
="-L -lCrun";export LDFLAGS
168 RELEASE_CFLAGS
='+O2 +Ofltacc'
169 RELEASE_CXXFLAGS
='+O2 +Ofltacc'
173 THE_COMP
="the iCC C++"
174 CC
=/usr
/bin
/icc
; export CC
175 CXX
=/usr
/bin
/icc
; export CXX
176 MAKE
=/usr
/bin
/gmake
; export MAKE
178 RELEASE_CXXFLAGS
='-O4'
182 THE_COMP
="Intel ECC 7.1"
186 RELEASE_CXXFLAGS
='-O2'
190 THE_COMP
="Intel ICC 9.0"
191 CC
=`which icc`; export CC
192 CXX
=`which icpc`; export CXX
194 RELEASE_CXXFLAGS
='-O'
198 THE_COMP
="IBM Visual Age C++ Compiler"
199 CC
=`which xlc_r`; export CC
200 CXX
=`which xlC_r`; export CXX
201 RELEASE_CFLAGS
="-O2 -qmaxmem=-1"
202 RELEASE_CXXFLAGS
="-O2 -qmaxmem=-1"
206 THE_COMP
="the GNU C++"
212 THE_COMP
="the GNU C++"
214 RELEASE_CXXFLAGS
='-O3'
217 THE_OS
="Windows with Cygwin"
218 THE_COMP
="Microsoft Visual C++"
221 RELEASE_CFLAGS
='/O2 /Ob2 /Op'
222 RELEASE_CXXFLAGS
='/O2 /Ob2 /Op'
225 DEBUG_LDFLAGS
='/DEBUG'
228 THE_OS
="Windows with Cygwin"
229 THE_COMP
="Microsoft Visual C++ 2005"
232 RELEASE_CFLAGS
='/O2 /Ob2'
233 RELEASE_CXXFLAGS
='/O2 /Ob2'
236 DEBUG_LDFLAGS
='/DEBUG'
239 THE_OS
="Windows with Cygwin"
243 # The Intel compiler has optimization bugs. So we disable optimization.
245 RELEASE_CXXFLAGS
='/Od'
248 DEBUG_LDFLAGS
='/DEBUG'
251 THE_OS
="MacOS X (Darwin)"
252 THE_COMP
="the GNU C++"
254 RELEASE_CXXFLAGS
='-O2'
258 THE_COMP
="the GNU C++"
264 THE_COMP
="Compaq cxx"
275 THE_OS
="z/OS (OS/390)"
276 THE_COMP
="z/OS C/C++"
279 RELEASE_CFLAGS
="-2 -Wc,'inline(auto,noreport,500,4000)'"
280 RELEASE_CXXFLAGS
="-2 -Wc,'inline(auto,noreport,500,4000)'"
284 THE_COMP
="z/OS 1.2 C/C++"
287 export COMPILE_LINK_ENVVAR
='_CXX_CVERSION=0x41020000 _C89_CVERSION=0x41020000 _CC_CVERSION=0x41020000 _CXX_PVERSION=0x41020000 _C89_PVERSION=0x41020000 _CC_PVERSION=0x41020000'
288 export _CXX_CVERSION
=0x41020000 _C89_CVERSION
=0x41020000 _CC_CVERSION
=0x41020000 _CXX_PVERSION
=0x41020000 _C89_PVERSION
=0x41020000 _CC_PVERSION
=0x41020000
289 export LDFLAGS
="-Wl,'compat=pm3'"
290 export CFLAGS
="-Wc,'target(zOSV1R2)'"
291 export CXXFLAGS
="-Wc,'target(zOSV1R2)'"
292 export RELEASE_CFLAGS
="-2 -Wc,'inline(auto,noreport,500,4000)'"
293 export RELEASE_CXXFLAGS
="-2 -Wc,'inline(auto,noreport,500,4000)'"
296 >&2 echo "$me: unrecognized platform \"$platform\" (use --help for help)"
303 if test $release -eq 1
305 if test "$RELEASE_CFLAGS" = ""
308 gcc
|*/gcc
|*-gcc-*|*/*-gcc-*)
313 if test "$RELEASE_CFLAGS" != ""
315 CFLAGS
="$CFLAGS $RELEASE_CFLAGS"
317 if test "$RELEASE_CXXFLAGS" = ""
320 g
++|*/g
++|*-g++-*|*/*-g++-*)
325 if test "$RELEASE_CXXFLAGS" != ""
327 CXXFLAGS
="$CXXFLAGS $RELEASE_CXXFLAGS"
329 if test "$RELEASE_LDFLAGS" != ""
331 LDFLAGS
="$LDFLAGS $RELEASE_LDFLAGS"
337 if test "$DEBUG_CFLAGS" != ""
339 CFLAGS
="$CFLAGS $DEBUG_CFLAGS"
341 if test "$DEBUG_CXXFLAGS" != ""
343 CXXFLAGS
="$CXXFLAGS $DEBUG_CXXFLAGS"
345 if test "$DEBUG_LDFLAGS" != ""
347 LDFLAGS
="$LDFLAGS $DEBUG_LDFLAGS"
357 echo "Running ./configure $OPTS $@ for $THE_OS using $THE_COMP compiler"
361 echo If the result of the above commands looks okay to you
, go to the directory
362 echo source in the ICU distribution to build ICU. Please remember that ICU needs
363 echo GNU
make to build properly...