2 # Copyright (c) 1999-2011, 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 MinGW Use the GNU gcc/g++ compilers on MinGW
47 QNX Use the QNX QCC compiler on QNX/Neutrino
48 Solaris Use the Sun cc/CC compilers on Solaris
49 Solaris/GCC Use the GNU gcc/g++ compilers on Solaris
50 SolarisX86 Use the Sun cc/CC compilers on Solaris x86
51 TRU64V5.1/CXX Use the Compaq cxx compiler on Tru64 (OSF)
52 zOS Use the IBM cxx compiler on z/OS (os/390)
53 zOSV1R2 Use the IBM cxx compiler for z/OS 1.2
74 OPTS
="$OPTS --enable-debug"
78 OPTS
="$OPTS --disable-release"
89 if test x
$platform = x
103 if test x
$configure = x
105 if test -f .
/configure
109 configuredir
=`echo $0 | sed 's,[^/]*$,,'`
110 if test x
$configuredir = x
$0
116 if test x
$configuredir = x
121 configure
=$configuredir/configure
128 CC
=`which xlc_r`; export CC
129 if [ ! -x $CC ]; then
130 echo "ERROR: xlc_r was not found, please check the PATH to make sure it is correct."; exit 1
132 CXX
=`which xlC_r`; export CXX
133 if [ ! -x $CXX ]; then
134 echo "ERROR: xlC_r was not found, please check the PATH to make sure it is correct."; exit 1
136 RELEASE_CFLAGS
="-O2 -qmaxmem=-1"
137 RELEASE_CXXFLAGS
="-O2 -qmaxmem=-1"
141 THE_COMP
="the GNU C++"
144 DEBUG_CFLAGS
='-g -O0'
145 DEBUG_CXFLAGS
='-g -O0'
150 CC
=`which cc`; export CC
151 CXX
=`which CC`; export CXX
152 RELEASE_CFLAGS
="-xO1 -xlibmil"
153 RELEASE_CXXFLAGS
="-O4 -xlibmil"
157 THE_COMP
="the GNU C++"
166 CC
=`which cc`; export CC
167 CXX
=`which CC`; export CXX
168 LDFLAGS
="${LDFLAGS} -lCrun";export LDFLAGS
177 RELEASE_CFLAGS
='+O2 +Ofltacc'
178 RELEASE_CXXFLAGS
='+O2 +Ofltacc'
182 THE_COMP
="the iCC C++"
185 CPP
="$CC -c -qpponly"; export CPP
186 MAKE
=gmake
; export MAKE
187 U_MAKE
=gmake
; export U_MAKE
188 # gmake is a .pgm and may not be on the path. Don't use a full path, just use gmake.
189 ac_cv_path_U_MAKE
=gmake
; export ac_cv_path_U_MAKE
191 RELEASE_CXXFLAGS
='-O4'
195 THE_COMP
="Intel ECC 7.1"
199 RELEASE_CXXFLAGS
='-O2'
203 CC
=`which icc`; export CC
204 CXX
=`which icpc`; export CXX
205 ICC_VER
=`${CC} -v 2>&1`
207 RELEASE_CXXFLAGS
='-O'
208 export CFLAGS
="-fp-model precise"
209 export CXXFLAGS
="-fp-model precise"
210 if [ "${ICC_VER}" = "Version 9.0 " ]; then
213 export CFLAGS
="${CFLAGS} -O0"
214 export CXXFLAGS
="${CXXFLAGS} -O0"
215 echo "ICC 9.0 does not work with optimization- disabling optimizations"
217 THE_COMP
="Intel ${ICC_VER}"
221 THE_COMP
="IBM Visual Age C++ Compiler"
222 CC
=`which xlc_r`; export CC
223 CXX
=`which xlC_r`; export CXX
224 RELEASE_CFLAGS
="-O2 -qmaxmem=-1"
225 RELEASE_CXXFLAGS
="-O2 -qmaxmem=-1"
229 THE_COMP
="the GNU C++"
232 DEBUG_CFLAGS
='-g -O0'
233 DEBUG_CXFLAGS
='-g -O0'
237 THE_COMP
="the GNU C++"
239 RELEASE_CXXFLAGS
='-O3'
242 THE_OS
="Windows with Cygwin"
243 THE_COMP
="Microsoft Visual C++"
246 RELEASE_CFLAGS
='/Gy /MD'
247 RELEASE_CXXFLAGS
='/Gy /MD'
248 DEBUG_CFLAGS
='/Zi /MDd'
249 DEBUG_CXXFLAGS
='/Zi /MDd'
250 DEBUG_LDFLAGS
='/DEBUG'
253 THE_OS
="Windows with Cygwin"
254 THE_COMP
="Microsoft Visual C++ 2005"
257 RELEASE_CFLAGS
='/Gy /MD'
258 RELEASE_CXXFLAGS
='/Gy /MD'
259 DEBUG_CFLAGS
='/Zi /MDd'
260 DEBUG_CXXFLAGS
='/Zi /MDd'
261 DEBUG_LDFLAGS
='/DEBUG'
264 THE_OS
="Windows with Cygwin"
268 # The Intel compiler has optimization bugs. So we disable optimization.
270 RELEASE_CXXFLAGS
='/Od'
273 DEBUG_LDFLAGS
='/DEBUG'
276 THE_OS
="MacOS X (Darwin)"
277 THE_COMP
="the GNU C++"
279 RELEASE_CXXFLAGS
='-O2'
280 DEBUG_CFLAGS
='-g -O0'
281 DEBUG_CXXFLAGS
='-g -O0'
285 THE_COMP
="the GNU C++"
287 RELEASE_CXXFLAGS
='-O3'
291 THE_COMP
="the GNU C++"
294 DEBUG_CFLAGS
='-g -O0'
295 DEBUG_CXFLAGS
='-g -O0'
299 THE_COMP
="Compaq cxx"
310 THE_OS
="z/OS (OS/390)"
311 THE_COMP
="z/OS C/C++"
314 RELEASE_CFLAGS
="-2 -Wc,'inline(auto,noreport,500,4000)'"
315 RELEASE_CXXFLAGS
="-2 -Wc,'inline(auto,noreport,500,4000)'"
319 THE_COMP
="z/OS 1.2 C/C++"
322 export COMPILE_LINK_ENVVAR
='_CXX_CICC_VER}=0x41020000 _C89_CVERSION=0x41020000 _CC_CVERSION=0x41020000 _CXX_PVERSION=0x41020000 _C89_PVERSION=0x41020000 _CC_PVERSION=0x41020000'
323 export _CXX_CVERSION
=0x41020000 _C89_CVERSION
=0x41020000 _CC_CVERSION
=0x41020000 _CXX_PVERSION
=0x41020000 _C89_PVERSION
=0x41020000 _CC_PVERSION
=0x41020000
324 export LDFLAGS
="-Wl,'compat=pm3'"
325 export CFLAGS
="-Wc,'target(zOSV1R2)'"
326 export CXXFLAGS
="-Wc,'target(zOSV1R2)'"
327 RELEASE_CFLAGS
="-2 -Wc,'inline(auto,noreport,500,4000)'"
328 RELEASE_CXXFLAGS
="-2 -Wc,'inline(auto,noreport,500,4000)'"
331 >&2 echo "$me: unrecognized platform \"$platform\" (use --help for help)"
338 if test $release -eq 1
340 if test "$RELEASE_CFLAGS" = ""
343 gcc
|*/gcc
|*-gcc-*|*/*-gcc-*)
348 if test "$RELEASE_CFLAGS" != ""
350 CFLAGS
="$CFLAGS $RELEASE_CFLAGS"
352 if test "$RELEASE_CXXFLAGS" = ""
355 g
++|*/g
++|*-g++-*|*/*-g++-*)
360 if test "$RELEASE_CXXFLAGS" != ""
362 CXXFLAGS
="$CXXFLAGS $RELEASE_CXXFLAGS"
364 if test "$RELEASE_LDFLAGS" != ""
366 LDFLAGS
="$LDFLAGS $RELEASE_LDFLAGS"
372 if test "$DEBUG_CFLAGS" != ""
374 CFLAGS
="$CFLAGS $DEBUG_CFLAGS"
376 if test "$DEBUG_CXXFLAGS" != ""
378 CXXFLAGS
="$CXXFLAGS $DEBUG_CXXFLAGS"
380 if test "$DEBUG_LDFLAGS" != ""
382 LDFLAGS
="$LDFLAGS $DEBUG_LDFLAGS"
392 echo "export CPP=$CPP CC=$CC CXX=$CXX CPPFLAGS=$CPPFLAGS CFLAGS=$CFLAGS CXXFLAGS=$CXXFLAGS LDFLAGS=$LDFLAGS MAKE=$MAKE"
393 echo "Running ./configure $OPTS $@ for $THE_OS using $THE_COMP compiler"
395 if $configure $OPTS $@
398 echo If the result of the above commands looks okay to you
, go to the directory
399 echo source in the ICU distribution to build ICU. Please remember that ICU needs
400 echo GNU
make to build properly...
402 echo $0: .
/configure failed