2 # Copyright (c) 1999-2013, 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 If you want to add custom CFLAGS or CXXFLAGS or similar, provide them _before_
31 the runConfigureICU command:
33 CXXFLAGS=xyz path/to/runConfigureICU --enable-debug ...
35 The following names can be supplied as the argument for platform:
37 AIX Use the IBM Visual Age xlc_r/xlC_r compilers on AIX
38 AIX/GCC Use the GNU gcc/g++ compilers on AIX
39 Cygwin Use the GNU gcc/g++ compilers on Cygwin
40 Cygwin/MSVC Use the Microsoft Visual C++ compiler on Cygwin
41 Cygwin/MSVC2005 Use the Microsoft Visual C++ 2005 compiler on Cygwin
42 Cygwin/ICL Use the Intel C++ compiler on Cygwin
43 FreeBSD Use the GNU gcc/g++ compilers on Free BSD
44 HP-UX/ACC Use the HP ANSI C/Advanced C++ compilers on HP-UX 11
45 IBMi Use the iCC compilers on IBM i, i5/OS, OS/400
46 Linux Use the clang/clang++ or GNU gcc/g++ compilers on Linux
47 Linux/gcc Use the GNU gcc/g++ compilers on Linux
48 Linux/ECC Use the Intel ECC compiler on Linux
49 Linux/ICC Use the Intel ICC compiler on Linux
50 Linux/VA Use the IBM Visual Age compiler on Power PC Linux
51 MacOSX Use the default compilers on MacOS X (Darwin)
52 MacOSX/GCC Use the GNU gcc/g++ compilers on MacOSX (Darwin)
53 MinGW Use the GNU gcc/g++ compilers on MinGW
54 QNX Use the QNX QCC compiler on QNX/Neutrino
55 Solaris Use the Sun cc/CC compilers on Solaris
56 Solaris/GCC Use the GNU gcc/g++ compilers on Solaris
57 SolarisX86 Use the Sun cc/CC compilers on Solaris x86
58 TRU64V5.1/CXX Use the Compaq cxx compiler on Tru64 (OSF)
59 zOS Use the IBM cxx compiler on z/OS (os/390)
60 zOSV1R2 Use the IBM cxx compiler for z/OS 1.2
81 OPTS
="$OPTS --enable-debug"
85 OPTS
="$OPTS --disable-release"
96 if test x
$platform = x
110 if test x
$configure = x
112 if test -f .
/configure
116 configuredir
=`echo $0 | sed 's,[^/]*$,,'`
117 if test x
$configuredir = x
$0
123 if test x
$configuredir = x
128 configure
=$configuredir/configure
135 CC
=`which xlc_r`; export CC
136 if [ ! -x $CC ]; then
137 echo "ERROR: xlc_r was not found, please check the PATH to make sure it is correct."; exit 1
139 CXX
=`which xlC_r`; export CXX
140 if [ ! -x $CXX ]; then
141 echo "ERROR: xlC_r was not found, please check the PATH to make sure it is correct."; exit 1
143 RELEASE_CFLAGS
="-O2 -qmaxmem=-1"
144 RELEASE_CXXFLAGS
="-O2 -qmaxmem=-1"
148 THE_COMP
="the GNU C++"
151 DEBUG_CFLAGS
='-g -O0'
152 DEBUG_CXXFLAGS
='-g -O0'
157 CC
=`which cc`; export CC
158 CXX
=`which CC`; export CXX
159 RELEASE_CFLAGS
="-xO1 -xlibmil"
160 RELEASE_CXXFLAGS
="-O4 -xlibmil"
164 THE_COMP
="the GNU C++"
173 CC
=`which cc`; export CC
174 CXX
=`which CC`; export CXX
175 LDFLAGS
="${LDFLAGS} -lCrun";export LDFLAGS
184 RELEASE_CFLAGS
='+O2 +Ofltacc'
185 RELEASE_CXXFLAGS
='+O2 +Ofltacc'
189 THE_COMP
="the iCC C++"
192 CPP
="$CC -c -qpponly"; export CPP
193 MAKE
=gmake
; export MAKE
194 U_MAKE
=gmake
; export U_MAKE
195 # gmake is a .pgm and may not be on the path. Don't use a full path, just use gmake.
196 ac_cv_path_U_MAKE
=gmake
; export ac_cv_path_U_MAKE
198 RELEASE_CXXFLAGS
='-O4'
202 THE_COMP
="Intel ECC 7.1"
206 RELEASE_CXXFLAGS
='-O2'
210 CC
=`which icc`; export CC
211 CXX
=`which icpc`; export CXX
212 ICC_VER
=`${CC} -v 2>&1`
214 RELEASE_CXXFLAGS
='-O'
215 export CFLAGS
="-fp-model precise"
216 export CXXFLAGS
="-fp-model precise"
217 if [ "${ICC_VER}" = "Version 9.0 " ]; then
220 export CFLAGS
="${CFLAGS} -O0"
221 export CXXFLAGS
="${CXXFLAGS} -O0"
222 echo "ICC 9.0 does not work with optimization- disabling optimizations"
224 THE_COMP
="Intel ${ICC_VER}"
228 THE_COMP
="IBM Visual Age C++ Compiler"
229 CC
=`which xlc_r`; export CC
230 CXX
=`which xlC_r`; export CXX
231 RELEASE_CFLAGS
="-O2 -qmaxmem=-1"
232 RELEASE_CXXFLAGS
="-O2 -qmaxmem=-1"
236 THE_COMP
="the GNU C++"
240 RELEASE_CXXFLAGS
='-O3'
246 THE_COMP
="the clang or else GNU C++"
248 RELEASE_CXXFLAGS
='-O3'
254 THE_COMP
="the GNU C++"
256 RELEASE_CXXFLAGS
='-O3'
259 THE_OS
="Windows with Cygwin"
260 THE_COMP
="Microsoft Visual C++"
263 RELEASE_CFLAGS
='-Gy -MD'
264 RELEASE_CXXFLAGS
='-Gy -MD'
265 DEBUG_CFLAGS
='-Zi -MDd'
266 DEBUG_CXXFLAGS
='-Zi -MDd'
267 DEBUG_LDFLAGS
='-DEBUG'
270 THE_OS
="Windows with Cygwin"
271 THE_COMP
="Microsoft Visual C++ 2005"
274 RELEASE_CFLAGS
='/Gy /MD'
275 RELEASE_CXXFLAGS
='/Gy /MD'
276 DEBUG_CFLAGS
='/Zi /MDd'
277 DEBUG_CXXFLAGS
='/Zi /MDd'
278 DEBUG_LDFLAGS
='/DEBUG'
281 THE_OS
="Windows with Cygwin"
285 # The Intel compiler has optimization bugs. So we disable optimization.
287 RELEASE_CXXFLAGS
='/Od'
290 DEBUG_LDFLAGS
='/DEBUG'
293 THE_OS
="MacOS X (Darwin)"
294 THE_COMP
="the default"
296 RELEASE_CXXFLAGS
='-O2'
297 DEBUG_CFLAGS
='-g -O0'
298 DEBUG_CXXFLAGS
='-g -O0'
301 THE_OS
="MacOS X (Darwin)"
302 THE_COMP
="the GNU C++"
304 RELEASE_CXXFLAGS
='-O2'
305 DEBUG_CFLAGS
='-g -O0'
306 DEBUG_CXXFLAGS
='-g -O0'
312 THE_COMP
="the GNU C++"
314 RELEASE_CXXFLAGS
='-O3'
315 CXXFLAGS
="--std=c++03"
320 THE_COMP
="the GNU C++"
323 DEBUG_CFLAGS
='-g -O0'
324 DEBUG_CXXFLAGS
='-g -O0'
328 THE_COMP
="Compaq cxx"
339 THE_OS
="z/OS (OS/390)"
340 THE_COMP
="z/OS C/C++"
343 RELEASE_CFLAGS
="-O2 -Wc,'inline(AUTO,NOREPORT,1000,8000)'"
344 RELEASE_CXXFLAGS
="-O2 -Wc,'inline(AUTO,NOREPORT,1000,8000)'"
348 THE_COMP
="z/OS 1.2 C/C++"
351 export COMPILE_LINK_ENVVAR
='_CXX_CICC_VER}=0x41020000 _C89_CVERSION=0x41020000 _CC_CVERSION=0x41020000 _CXX_PVERSION=0x41020000 _C89_PVERSION=0x41020000 _CC_PVERSION=0x41020000'
352 export _CXX_CVERSION
=0x41020000 _C89_CVERSION
=0x41020000 _CC_CVERSION
=0x41020000 _CXX_PVERSION
=0x41020000 _C89_PVERSION
=0x41020000 _CC_PVERSION
=0x41020000
353 export LDFLAGS
="-Wl,'compat=pm3'"
354 export CFLAGS
="-Wc,'target(zOSV1R2)'"
355 export CXXFLAGS
="-Wc,'target(zOSV1R2)'"
356 RELEASE_CFLAGS
="-2 -Wc,'inline(auto,noreport,500,4000)'"
357 RELEASE_CXXFLAGS
="-2 -Wc,'inline(auto,noreport,500,4000)'"
360 >&2 echo "$me: unrecognized platform \"$platform\" (use --help for help)"
367 if test $release -eq 1
369 if test "$RELEASE_CFLAGS" = ""
372 gcc
|*/gcc
|*-gcc-*|*/*-gcc-*)
377 if test "$RELEASE_CFLAGS" != ""
379 CFLAGS
="$CFLAGS $RELEASE_CFLAGS"
381 if test "$RELEASE_CXXFLAGS" = ""
384 g
++|*/g
++|*-g++-*|*/*-g++-*)
389 if test "$RELEASE_CXXFLAGS" != ""
391 CXXFLAGS
="$CXXFLAGS $RELEASE_CXXFLAGS"
393 if test "$RELEASE_LDFLAGS" != ""
395 LDFLAGS
="$LDFLAGS $RELEASE_LDFLAGS"
401 if test "$DEBUG_CFLAGS" != ""
403 CFLAGS
="$CFLAGS $DEBUG_CFLAGS"
405 if test "$DEBUG_CXXFLAGS" != ""
407 CXXFLAGS
="$CXXFLAGS $DEBUG_CXXFLAGS"
409 if test "$DEBUG_LDFLAGS" != ""
411 LDFLAGS
="$LDFLAGS $DEBUG_LDFLAGS"
421 echo "export CPP=$CPP CC=$CC CXX=$CXX CPPFLAGS=$CPPFLAGS CFLAGS=$CFLAGS CXXFLAGS=$CXXFLAGS LDFLAGS=$LDFLAGS MAKE=$MAKE"
422 echo "Running ./configure $OPTS $@ for $THE_OS using $THE_COMP compiler"
424 if $configure $OPTS $@
427 echo If the result of the above commands looks okay to you
, go to the directory
428 echo source in the ICU distribution to build ICU. Please remember that ICU needs
429 echo GNU
make to build properly...
431 echo $0: .
/configure failed