1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299
|
#!/bin/sh
# runConfigureICU: This script will run the "configure" script for the appropriate platform
# Only supported platforms are recognized
me=`basename $0`
OPTS=
usage()
{
ec=0$1
if test $ec -eq 0
then
uletter=U
else
uletter=u
fi
echo "${uletter}sage: $me [ -h, --help ] [ --enable-debug | --disable-release ] platform [ configurearg ... ]"
if test $ec -eq 0
then
cat <<EOE
Options: -h, --help Print this message and exit
--enable-debug Enable support for debugging
--disable-release Disable presetting optimization flags
The following names can be supplied as the argument for platform:
AIX4.3xlC Use IBM's xlC on AIX 4.3
AIX4.3xlC_nothreads Use IBM's xlC on AIX 4.3 with no multithreading
AIX4.3VA Use IBM's Visual Age xlC_r compiler on AIX 4.3
AIX4.3VA_nothreads Use IBM's Visual Age xlC_r compiler on AIX 4.3 with no multithreading
ALPHA/LINUXGCC Use GCC on Alpha/Linux systems
ALPHA/LINUXCCC Use Compaq C compiler on Alpha/Linux systems
FreeBSD Use the GNU C++ compiler on Free BSD
HP/UX11CC Use HP's C++ compiler on HP-UX 11
HP/UX11ACC Use the Advanced C++ compiler on HP-UX 11
LinuxRedHat Use the GNU C++ compiler on Linux
CygWin Use the GNU C++ compiler on CygWin
SOLARISCC Use Sun's CC compiler on Solaris
SOLARISGCC Use the GNU C++ compiler on Solaris
SOLARISX86 Use Sun's CC compiler on Solaris x86
TRU64V5.1/CXX Use Copmaq's cxx compiler on Tru64 (OSF)
zOS/cxx Use IBM's cxx compiler on z/OS (os/390)
EOE
fi
exit $ec
}
# Parse arguments
platform=
debug=0
release=1
while test $# -ne 0
do
case "$1" in
-h|--help)
usage 0
;;
--enable-debug)
debug=1
release=0
;;
--disable-release)
debug=0
release=0
;;
*)
platform="$1"
shift
break
;;
esac
shift
done
if test x$platform = x
then
usage 1
fi
# Go.
rm -f config.cache
rm -f config.log
rm -f config.status
DEBUG_CFLAGS='-g'
DEBUG_CXXFLAGS='-g'
if test x$configure = x
then
if test -f ./configure
then
configuredir=.
else
configuredir=`echo $0 | sed 's,[^/]*$,,'`
if test x$configuredir = x$0
then
configuredir=.
fi
fi
if test x$configuredir = x
then
configuredir=.
fi
configure=$configuredir/configure
fi
case $platform in
AIX4.3xlC)
THE_OS=AIX
THE_COMP="xlC_r"
CC=/usr/ibmcxx/bin/xlc_r; export CC
CXX=/usr/ibmcxx/bin/xlC_r; export CXX
RELEASE_CFLAGS="-O -qmaxmem=-1"
RELEASE_CXXFLAGS="-O -qmaxmem=-1"
;;
AIX4.3xlC_nothreads)
THE_OS=AIX
THE_COMP="xlC"
CC=/usr/ibmcxx/bin/xlc; export CC
CXX=/usr/ibmcxx/bin/xlC; export CXX
AIX_SHLIB=/usr/ibmcxx/bin/makeC++SharedLib; export AIX_SHLIB
RELEASE_CFLAGS="-O -qmaxmem=-1"
RELEASE_CXXFLAGS="-O -qmaxmem=-1"
OPTS="$OPTS --enable-threads=no"
;;
AIX4.3VA)
THE_OS=AIX
THE_COMP="xlC_r"
CC=/usr/vacpp/bin/xlc_r; export CC
CXX=/usr/vacpp/bin/xlC_r; export CXX
RELEASE_CFLAGS="-O2 -qmaxmem=-1"
RELEASE_CXXFLAGS="-O2 -qmaxmem=-1"
#LDFLAGS=-L/usr/lpp/xlC/lib; export LDFLAGS
;;
AIX4.3VA_nothreads)
THE_OS=AIX
THE_COMP="xlC"
CC=/usr/vacpp/bin/xlc; export CC
CXX=/usr/vacpp/bin/xlC; export CXX
OPTS="$OPTS --enable-threads=no"
RELEASE_CFLAGS="-O2 -qmaxmem=-1"
RELEASE_CXXFLAGS="-O2 -qmaxmem=-1"
#LDFLAGS=-L/usr/lpp/xlC/lib; export LDFLAGS
;;
SOLARISX86)
THE_OS="SOLARIS X86"
THE_COMP="Sun's CC"
CC=`which cc`; export CC
CXX=`which CC`; export CXX
CXX_FLAGS="-w";export CXX_FLAGS
C_FLAGS="-w";export C_FLAGS
LDFLAGS="-L -lCrun";export LDFLAGS
RELEASE_CFLAGS=-xO3
RELEASE_CXXFLAGS=-O3
;;
SOLARISCC)
THE_OS=SOLARIS
THE_COMP="Sun's CC"
CC=`which cc`; export CC
CXX=`which CC`; export CXX
RELEASE_CFLAGS=-xO3
RELEASE_CXXFLAGS=-O3
;;
SOLARISGCC)
THE_OS=SOLARIS
THE_COMP="the GNU C++"
CXXFLAGS=-I/usr/local/include/g++; export CXXFLAGS
LDFLAGS=-R/usr/local/lib; export LDFLAGS
;;
HP/UX11CC)
THE_OS="HP-UX 11"
THE_COMP="HP's CC"
CC=cc; export CC
CXX=CC; export CXX
RELEASE_CFLAGS='+O2 +Ofltacc'
RELEASE_CXXFLAGS='+O2 +Ofltacc'
;;
HP/UX11ACC)
THE_OS="HP-UX 11"
THE_COMP="aCC"
CC=cc; export CC
CXX=aCC; export CXX
RELEASE_CFLAGS='+O2 +Ofltacc'
RELEASE_CXXFLAGS='+O2 +Ofltacc'
;;
ALPHA/LINUXCCC)
THE_OS="Linux"
THE_COMP="Compaq's CC"
CC=ccc; export CC
CXX=cxx; export CXX
RELEASE_CFLAGS='-O4'
RELEASE_CXXFLAGS='-O4'
;;
ALPHA/LINUXGCC)
THE_OS="Linux"
THE_COMP="the GNU C++"
CC=gcc; export CC
CXX=g++; export CXX
;;
TRU64V5.1/CXX)
THE_OS="OSF1"
THE_COMP="Compaq cxx"
CC=cxx; export CC
CXX=cxx; export CXX
;;
LinuxRedHat*)
THE_OS="Linux"
THE_COMP="the GNU C++"
CC=gcc; export CC
CXX=g++; export CXX
;;
CygWin)
;;
*BSD)
THE_OS="BSD"
THE_COMP="the GNU C++"
CC=gcc; export CC
CXX=g++; export CXX
;;
zOS/cxx)
THE_OS="z/OS"
THE_COMP="r10 cxx"
CC=cc; export CC
CXX=cxx; export CXX
export IEEE390=1
export RELEASE_CFLAGS='-2'
export RELEASE_CXXFLAGS='-2'
;;
*)
>&2 echo "$me: unrecognized platform \"$platform\" (use --help for help)"
exit 1;;
esac
# Tweak flags
if test $release -eq 1
then
if test "$RELEASE_CFLAGS" = ""
then
case $CC in
gcc|*/gcc|*-gcc-*|*/*-gcc-*)
RELEASE_CFLAGS=-O3
;;
esac
fi
if test "$RELEASE_CFLAGS" != ""
then
CFLAGS="$CFLAGS $RELEASE_CFLAGS"
fi
export CFLAGS
if test "$RELEASE_CXXFLAGS" = ""
then
case $CXX in
g++|*/g++|*-g++-*|*/*-g++-*)
RELEASE_CXXFLAGS=-O
;;
esac
fi
if test "$RELEASE_CXXFLAGS" != ""
then
CXXFLAGS="$CXXFLAGS $RELEASE_CXXFLAGS"
fi
export CXXFLAGS
fi
if test $debug -eq 1
then
if test "$DEBUG_CFLAGS" != ""
then
CFLAGS="$CFLAGS $DEBUG_CFLAGS"
fi
export CFLAGS
if test "$DEBUG_CXXFLAGS" != ""
then
CXXFLAGS="$CXXFLAGS $DEBUG_CXXFLAGS"
fi
export CXXFLAGS
fi
# Run configure
echo "Running ./configure $OPTS $@ for $THE_OS using $THE_COMP compiler"
echo
$configure $OPTS $@
echo
echo If the result of the above commands looks okay to you, go to the directory
echo source in the ICU distribution to build ICU. Please remember that ICU needs
echo GNU make to build properly...
|