2 # Copyright (c) 1999-2004, 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 AIX4.3xlC Use IBM's xlC on AIX 4.3
33 AIX4.3xlC_nothreads Use IBM's xlC on AIX 4.3 with no multithreading
34 AIX4.3VA Use IBM's Visual Age xlC_r compiler on AIX 4.3
36 ALPHA/LINUXGCC Use GCC on Alpha/Linux systems
37 ALPHA/LINUXCCC Use Compaq C compiler on Alpha/Linux systems
38 BeOS Use the GNU C++ compiler on BeOS
39 Cygwin Use the GNU C++ compiler on Cygwin
40 Cygwin/MSVC Use the Microsoft Visual C++ compiler on Cygwin
41 FreeBSD Use the GNU C++ compiler on Free BSD
42 HP-UX11ACC Use the Advanced C++ compiler on HP-UX 11
43 HP-UX11CC Use HP's C++ compiler on HP-UX 11
44 LinuxRedHat Use the GNU C++ compiler on Linux
45 LINUX/ECC Use the Intel ECC compiler on Linux
46 LINUX/ICC Use the Intel ICC compiler on Linux
47 LINUX/VA Use IBM's Visual Age compiler on Power PC Linux
48 MacOSX Use the GNU C++ compiler on MacOS X (Darwin)
49 QNX Use QNX's QCC compiler on QNX/Neutrino
50 SOLARISCC Use Sun's CC compiler on Solaris
51 SOLARISCC/W4.2 Use Sun's Workshop 4.2 CC compiler on Solaris
52 SOLARISGCC Use the GNU C++ compiler on Solaris
53 SOLARISX86 Use Sun's CC compiler on Solaris x86
54 TRU64V5.1/CXX Use Compaq's cxx compiler on Tru64 (OSF)
55 zOS Use IBM's cxx compiler on z/OS (os/390)
56 zOSV1R2 Use IBM's cxx compiler for z/OS 1.2
57 OS390V2R10 Use IBM's cxx compiler for OS/390 2.10
78 OPTS
="$OPTS --enable-debug"
82 OPTS
="$OPTS --disable-release"
93 if test x
$platform = x
107 if test x
$configure = x
109 if test -f .
/configure
113 configuredir
=`echo $0 | sed 's,[^/]*$,,'`
114 if test x
$configuredir = x
$0
120 if test x
$configuredir = x
125 configure
=$configuredir/configure
132 CC
=/usr
/ibmcxx
/bin
/xlc_r
; export CC
133 CXX
=/usr
/ibmcxx
/bin
/xlC_r
; export CXX
134 RELEASE_CFLAGS
="-O -qmaxmem=-1"
135 RELEASE_CXXFLAGS
="-O -qmaxmem=-1"
140 CC
=/usr
/ibmcxx
/bin
/xlc
; export CC
141 CXX
=/usr
/ibmcxx
/bin
/xlC
; export CXX
142 AIX_SHLIB
=/usr
/ibmcxx
/bin
/makeC
++SharedLib
; export AIX_SHLIB
143 RELEASE_CFLAGS
="-O -qmaxmem=-1"
144 RELEASE_CXXFLAGS
="-O -qmaxmem=-1"
145 OPTS
="$OPTS --enable-threads=no"
150 CC
=`which xlc_r`; export CC
151 CXX
=`which xlC_r`; export CXX
152 RELEASE_CFLAGS
="-O2 -qmaxmem=-1"
153 RELEASE_CXXFLAGS
="-O2 -qmaxmem=-1"
154 #LDFLAGS=-L/usr/lpp/xlC/lib; export LDFLAGS
156 # For no threads use --enable-threads=no. Visual Age makes no distinction between xlC and xlC_r or any other _r programs.
160 CC
=`which gcc`; export CC
161 CXX
=`which g++`; export CXX
166 CC
=`which cc`; export CC
167 CXX
=`which CC`; export CXX
168 CXX_FLAGS
="-w";export CXX_FLAGS
169 C_FLAGS
="-w";export C_FLAGS
170 LDFLAGS
="-L -lCrun";export LDFLAGS
177 CC
=`which cc`; export CC
178 CXX
=`which CC`; export CXX
185 CC
=`which cc`; export CC
186 CXX
=`which CC`; export CXX
188 RELEASE_CXXFLAGS
="-O4 +d"
192 THE_COMP
="the GNU C++"
193 CXXFLAGS
="$CXXFLAGS -I/usr/local/include/g++"; export CXXFLAGS
194 LDFLAGS
="$LDFLAGS -R/usr/local/lib"; export LDFLAGS
203 RELEASE_CFLAGS
='+O2 +Ofltacc'
204 RELEASE_CXXFLAGS
='+O2 +Ofltacc'
211 RELEASE_CFLAGS
='+O2 +Ofltacc'
212 RELEASE_CXXFLAGS
='+O2 +Ofltacc'
216 THE_COMP
="Compaq cxx"
222 THE_COMP
="Compaq's CC"
226 RELEASE_CXXFLAGS
='-O4'
230 THE_COMP
="the GNU C++"
236 THE_COMP
="the GNU C++"
242 THE_COMP
="Intel ECC 7.1"
246 RELEASE_CXXFLAGS
='-O2'
250 THE_COMP
="Intel ICC 6.0"
254 RELEASE_CXXFLAGS
='-O0'
258 THE_COMP
="IBM Visual Age C++ Compiler"
259 CC
=`which xlc_r`; export CC
260 CXX
=`which xlC_r`; export CXX
261 RELEASE_CFLAGS
="-O2 -qmaxmem=-1"
262 RELEASE_CXXFLAGS
="-O2 -qmaxmem=-1"
266 THE_COMP
="the GNU C++"
268 RELEASE_CXXFLAGS
='-O3'
271 THE_OS
="Windows with Cygwin"
272 THE_COMP
="Microsoft Visual C++"
275 RELEASE_CFLAGS
='/O2 /Ob2'
276 RELEASE_CXXFLAGS
='/O2 /Ob2'
277 # The real debug flags are defined by the mh file because configure can't handle them.
282 THE_OS
="MacOS X (Darwin)"
283 THE_COMP
="the GNU C++"
285 RELEASE_CXXFLAGS
='-O2'
289 THE_COMP
="the GNU C++"
301 THE_COMP
="the GNU C++"
302 OPTIMIZATIONS
="-fdefault-inline -fdefer-pop -fforce-mem -fforce-addr \
303 -finline -finline-functions \
304 -fkeep-inline-functions -fkeep-static-consts -fbranch-count-reg \
305 -ffunction-cse -fstrength-reduce -fthread-jumps -fcse-follow-jumps \
306 -fcse-skip-blocks -frerun-cse-after-loop -frerun-loop-opt \
307 -fexpensive-optimizations -foptimize-register-move -fregmove \
308 -fschedule-insns -fschedule-insns2 -ffloat-store -funroll-loops \
309 -fmove-all-movables -freduce-all-givs -fpeephole \
310 -funroll-all-loops -ffunction-sections -fdata-sections"
311 RELEASE_CFLAGS
="$OPTIMIZATIONS"
312 RELEASE_CXXFLAGS
="$OPTIMIZATIONS"
315 THE_OS
="z/OS (OS/390)"
316 THE_COMP
="z/OS 1.2 (through OS/390 v2r10) C/C++"
319 export RELEASE_CFLAGS
='-2'
320 export RELEASE_CXXFLAGS
='-2'
324 THE_COMP
="z/OS 1.2 C/C++"
327 export COMPILE_LINK_ENVVAR
='_CXX_CVERSION=0x41020000 _C89_CVERSION=0x41020000 _CC_CVERSION=0x41020000 _CXX_PVERSION=0x41020000 _C89_PVERSION=0x41020000 _CC_PVERSION=0x41020000'
328 export _CXX_CVERSION
=0x41020000 _C89_CVERSION
=0x41020000 _CC_CVERSION
=0x41020000 _CXX_PVERSION
=0x41020000 _C89_PVERSION
=0x41020000 _CC_PVERSION
=0x41020000
329 export LDFLAGS
=-Wl,"compat=pm3"
330 export CFLAGS
='-Wc,"target(zOSV1R2)"'
331 export CXXFLAGS
='-Wc,"target(zOSV1R2)"'
332 export RELEASE_CFLAGS
='-2'
333 export RELEASE_CXXFLAGS
='-2'
337 THE_COMP
="OS/390 2.10 C/C++"
340 export COMPILE_LINK_ENVVAR
='_CXX_CVERSION=0x220A0000 _C89_CVERSION=0x220A0000 _CC_CVERSION=0x220A0000 _CXX_PVERSION=0x220A0000 _C89_PVERSION=0x220A0000 _CC_PVERSION=0x220A0000'
341 export _CXX_CVERSION
=0x220A0000 _C89_CVERSION
=0x220A0000 _CC_CVERSION
=0x220A0000 _CXX_PVERSION
=0x220A0000 _C89_PVERSION
=0x220A0000 _CC_PVERSION
=0x220A0000
342 export LDFLAGS
=-Wl,"compat=pm3"
343 export CFLAGS
='-Wc,"target(OSV2R10)"'
344 export CXXFLAGS
='-Wc,"target(OSV2R10)"'
345 export RELEASE_CFLAGS
='-2'
346 export RELEASE_CXXFLAGS
='-2'
349 >&2 echo "$me: unrecognized platform \"$platform\" (use --help for help)"
356 if test $release -eq 1
358 if test "$RELEASE_CFLAGS" = ""
361 gcc
|*/gcc
|*-gcc-*|*/*-gcc-*)
366 if test "$RELEASE_CFLAGS" != ""
368 CFLAGS
="$CFLAGS $RELEASE_CFLAGS"
371 if test "$RELEASE_CXXFLAGS" = ""
374 g
++|*/g
++|*-g++-*|*/*-g++-*)
379 if test "$RELEASE_CXXFLAGS" != ""
381 CXXFLAGS
="$CXXFLAGS $RELEASE_CXXFLAGS"
388 if test "$DEBUG_CFLAGS" != ""
390 CFLAGS
="$CFLAGS $DEBUG_CFLAGS"
393 if test "$DEBUG_CXXFLAGS" != ""
395 CXXFLAGS
="$CXXFLAGS $DEBUG_CXXFLAGS"
398 if test "$DEBUG_LDFLAGS" != ""
400 LDFLAGS
="$LDFLAGS $DEBUG_LDFLAGS"
407 echo "Running ./configure $OPTS $@ for $THE_OS using $THE_COMP compiler"
411 echo If the result of the above commands looks okay to you
, go to the directory
412 echo source in the ICU distribution to build ICU. Please remember that ICU needs
413 echo GNU
make to build properly...