2 # Copyright (c) 1999-2010, 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 if [ ! -x $CC ]; then
129 echo "ERROR: xlc_r was not found, please check the PATH to make sure it is correct."; exit 1
131 CXX
=`which xlC_r`; export CXX
132 if [ ! -x $CXX ]; then
133 echo "ERROR: xlC_r was not found, please check the PATH to make sure it is correct."; exit 1
135 RELEASE_CFLAGS
="-O2 -qmaxmem=-1"
136 RELEASE_CXXFLAGS
="-O2 -qmaxmem=-1"
140 THE_COMP
="the GNU C++"
143 DEBUG_CFLAGS
='-g -O0'
144 DEBUG_CXFLAGS
='-g -O0'
149 CC
=`which cc`; export CC
150 CXX
=`which CC`; export CXX
151 RELEASE_CFLAGS
="-xO4 -xlibmil"
152 RELEASE_CXXFLAGS
="-O4 -xlibmil"
156 THE_COMP
="the GNU C++"
165 CC
=`which cc`; export CC
166 CXX
=`which CC`; export CXX
167 LDFLAGS
="-L -lCrun";export LDFLAGS
176 RELEASE_CFLAGS
='+O2 +Ofltacc'
177 RELEASE_CXXFLAGS
='+O2 +Ofltacc'
181 THE_COMP
="the iCC C++"
182 CC
=/usr
/bin
/icc
; export CC
183 CXX
=/usr
/bin
/icc
; export CXX
184 CPP
="$CC -c -qpponly"; export CPP
185 MAKE
=/usr
/bin
/gmake
; export MAKE
187 RELEASE_CXXFLAGS
='-O4'
191 THE_COMP
="Intel ECC 7.1"
195 RELEASE_CXXFLAGS
='-O2'
199 CC
=`which icc`; export CC
200 CXX
=`which icpc`; export CXX
201 ICC_VER
=`${CC} -v 2>&1`
203 RELEASE_CXXFLAGS
='-O'
204 export CFLAGS
="-fp-model precise"
205 export CXXFLAGS
="-fp-model precise"
206 if [ "${ICC_VER}" = "Version 9.0 " ]; then
209 export CFLAGS
="${CFLAGS} -O0"
210 export CXXFLAGS
="${CXXFLAGS} -O0"
211 echo "ICC 9.0 does not work with optimization- disabling optimizations"
213 THE_COMP
="Intel ${ICC_VER}"
217 THE_COMP
="IBM Visual Age C++ Compiler"
218 CC
=`which xlc_r`; export CC
219 CXX
=`which xlC_r`; export CXX
220 RELEASE_CFLAGS
="-O2 -qmaxmem=-1"
221 RELEASE_CXXFLAGS
="-O2 -qmaxmem=-1"
225 THE_COMP
="the GNU C++"
228 DEBUG_CFLAGS
='-g -O0'
229 DEBUG_CXFLAGS
='-g -O0'
233 THE_COMP
="the GNU C++"
235 RELEASE_CXXFLAGS
='-O3'
238 THE_OS
="Windows with Cygwin"
239 THE_COMP
="Microsoft Visual C++"
242 RELEASE_CFLAGS
='/Gy /MD'
243 RELEASE_CXXFLAGS
='/Gy /MD'
244 DEBUG_CFLAGS
='/Zi /MDd'
245 DEBUG_CXXFLAGS
='/Zi /MDd'
246 DEBUG_LDFLAGS
='/DEBUG'
249 THE_OS
="Windows with Cygwin"
250 THE_COMP
="Microsoft Visual C++ 2005"
253 RELEASE_CFLAGS
='/Gy /MD'
254 RELEASE_CXXFLAGS
='/Gy /MD'
255 DEBUG_CFLAGS
='/Zi /MDd'
256 DEBUG_CXXFLAGS
='/Zi /MDd'
257 DEBUG_LDFLAGS
='/DEBUG'
260 THE_OS
="Windows with Cygwin"
264 # The Intel compiler has optimization bugs. So we disable optimization.
266 RELEASE_CXXFLAGS
='/Od'
269 DEBUG_LDFLAGS
='/DEBUG'
272 THE_OS
="MacOS X (Darwin)"
273 THE_COMP
="the GNU C++"
275 RELEASE_CXXFLAGS
='-O2'
276 DEBUG_CFLAGS
='-g -O0'
277 DEBUG_CXXFLAGS
='-g -O0'
281 THE_COMP
="the GNU C++"
284 DEBUG_CFLAGS
='-g -O0'
285 DEBUG_CXFLAGS
='-g -O0'
289 THE_COMP
="Compaq cxx"
300 THE_OS
="z/OS (OS/390)"
301 THE_COMP
="z/OS C/C++"
304 RELEASE_CFLAGS
="-2 -Wc,'inline(auto,noreport,500,4000)'"
305 RELEASE_CXXFLAGS
="-2 -Wc,'inline(auto,noreport,500,4000)'"
309 THE_COMP
="z/OS 1.2 C/C++"
312 export COMPILE_LINK_ENVVAR
='_CXX_CICC_VER}=0x41020000 _C89_CVERSION=0x41020000 _CC_CVERSION=0x41020000 _CXX_PVERSION=0x41020000 _C89_PVERSION=0x41020000 _CC_PVERSION=0x41020000'
313 export _CXX_CVERSION
=0x41020000 _C89_CVERSION
=0x41020000 _CC_CVERSION
=0x41020000 _CXX_PVERSION
=0x41020000 _C89_PVERSION
=0x41020000 _CC_PVERSION
=0x41020000
314 export LDFLAGS
="-Wl,'compat=pm3'"
315 export CFLAGS
="-Wc,'target(zOSV1R2)'"
316 export CXXFLAGS
="-Wc,'target(zOSV1R2)'"
317 RELEASE_CFLAGS
="-2 -Wc,'inline(auto,noreport,500,4000)'"
318 RELEASE_CXXFLAGS
="-2 -Wc,'inline(auto,noreport,500,4000)'"
321 >&2 echo "$me: unrecognized platform \"$platform\" (use --help for help)"
328 if test $release -eq 1
330 if test "$RELEASE_CFLAGS" = ""
333 gcc
|*/gcc
|*-gcc-*|*/*-gcc-*)
338 if test "$RELEASE_CFLAGS" != ""
340 CFLAGS
="$CFLAGS $RELEASE_CFLAGS"
342 if test "$RELEASE_CXXFLAGS" = ""
345 g
++|*/g
++|*-g++-*|*/*-g++-*)
350 if test "$RELEASE_CXXFLAGS" != ""
352 CXXFLAGS
="$CXXFLAGS $RELEASE_CXXFLAGS"
354 if test "$RELEASE_LDFLAGS" != ""
356 LDFLAGS
="$LDFLAGS $RELEASE_LDFLAGS"
362 if test "$DEBUG_CFLAGS" != ""
364 CFLAGS
="$CFLAGS $DEBUG_CFLAGS"
366 if test "$DEBUG_CXXFLAGS" != ""
368 CXXFLAGS
="$CXXFLAGS $DEBUG_CXXFLAGS"
370 if test "$DEBUG_LDFLAGS" != ""
372 LDFLAGS
="$LDFLAGS $DEBUG_LDFLAGS"
382 echo "export CPP=$CPP CC=$CC CXX=$CXX CPPFLAGS=$CPPFLAGS CFLAGS=$CFLAGS CXXFLAGS=$CXXFLAGS LDFLAGS=$LDFLAGS MAKE=$MAKE"
383 echo "Running ./configure $OPTS $@ for $THE_OS using $THE_COMP compiler"
385 if $configure $OPTS $@
388 echo If the result of the above commands looks okay to you
, go to the directory
389 echo source in the ICU distribution to build ICU. Please remember that ICU needs
390 echo GNU
make to build properly...
392 echo $0: .
/configure failed