2000-02-18 21:02:44 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
# runConfigureICU: This script will run the "configure" script for the appropriate platform
|
|
|
|
# Only supported platforms are recognized
|
|
|
|
|
2001-04-18 03:06:43 +00:00
|
|
|
me=`basename $0`
|
2002-03-08 00:25:53 +00:00
|
|
|
OPTS=
|
2001-04-18 03:06:43 +00:00
|
|
|
|
2000-02-18 21:02:44 +00:00
|
|
|
usage()
|
|
|
|
{
|
2001-04-18 03:06:43 +00:00
|
|
|
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
|
2000-02-18 21:02:44 +00:00
|
|
|
|
2001-04-18 03:06:43 +00:00
|
|
|
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:
|
|
|
|
|
2002-01-29 19:41:11 +00:00
|
|
|
AIX4.3xlC Use IBM's xlC on AIX 4.3
|
2002-03-08 00:25:53 +00:00
|
|
|
AIX4.3xlC_nothreads Use IBM's xlC on AIX 4.3 with no multithreading
|
2002-01-29 19:41:11 +00:00
|
|
|
AIX4.3VA Use IBM's Visual Age xlC_r compiler on AIX 4.3
|
2002-03-08 00:25:53 +00:00
|
|
|
AIX4.3VA_nothreads Use IBM's Visual Age xlC_r compiler on AIX 4.3 with no multithreading
|
2001-09-19 16:49:43 +00:00
|
|
|
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
|
2002-01-03 22:35:03 +00:00
|
|
|
CygWin Use the GNU C++ compiler on CygWin
|
2001-04-18 03:06:43 +00:00
|
|
|
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
|
2001-10-30 20:03:50 +00:00
|
|
|
TRU64V5.1/CXX Use Copmaq's cxx compiler on Tru64 (OSF)
|
2002-01-29 19:41:11 +00:00
|
|
|
zOS/cxx Use IBM's cxx compiler on z/OS (os/390)
|
2001-04-18 03:06:43 +00:00
|
|
|
EOE
|
|
|
|
fi
|
2000-02-18 21:02:44 +00:00
|
|
|
|
2001-04-18 03:06:43 +00:00
|
|
|
exit $ec
|
|
|
|
}
|
2000-05-15 18:20:15 +00:00
|
|
|
|
2001-04-18 03:06:43 +00:00
|
|
|
# Parse arguments
|
|
|
|
|
|
|
|
platform=
|
|
|
|
debug=0
|
|
|
|
release=1
|
|
|
|
|
|
|
|
while test $# -ne 0
|
|
|
|
do
|
|
|
|
case "$1" in
|
2001-07-06 01:21:59 +00:00
|
|
|
-h|--help)
|
|
|
|
usage 0
|
|
|
|
;;
|
|
|
|
--enable-debug)
|
|
|
|
debug=1
|
|
|
|
release=0
|
|
|
|
;;
|
|
|
|
--disable-release)
|
|
|
|
debug=0
|
|
|
|
release=0
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
platform="$1"
|
|
|
|
shift
|
|
|
|
break
|
|
|
|
;;
|
2001-04-18 03:06:43 +00:00
|
|
|
esac
|
|
|
|
shift
|
|
|
|
done
|
|
|
|
|
|
|
|
if test x$platform = x
|
|
|
|
then
|
|
|
|
usage 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Go.
|
2000-05-15 18:20:15 +00:00
|
|
|
|
2000-02-18 21:02:44 +00:00
|
|
|
rm -f config.cache
|
|
|
|
rm -f config.log
|
|
|
|
rm -f config.status
|
|
|
|
|
2001-05-25 18:00:38 +00:00
|
|
|
DEBUG_CFLAGS='-g'
|
|
|
|
DEBUG_CXXFLAGS='-g'
|
|
|
|
|
2000-06-22 23:08:13 +00:00
|
|
|
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
|
|
|
|
|
2000-02-18 21:02:44 +00:00
|
|
|
case $platform in
|
2001-07-06 01:21:59 +00:00
|
|
|
AIX4.3xlC)
|
|
|
|
THE_OS=AIX
|
2002-01-29 19:41:11 +00:00
|
|
|
THE_COMP="xlC_r"
|
2002-03-12 17:14:58 +00:00
|
|
|
CC=/usr/ibmcxx/bin/xlc_r; export CC
|
2001-07-06 01:21:59 +00:00
|
|
|
CXX=/usr/ibmcxx/bin/xlC_r; export CXX
|
2001-10-16 18:10:08 +00:00
|
|
|
RELEASE_CFLAGS="-O -qmaxmem=-1"
|
|
|
|
RELEASE_CXXFLAGS="-O -qmaxmem=-1"
|
2001-07-06 01:21:59 +00:00
|
|
|
;;
|
2002-03-08 00:25:53 +00:00
|
|
|
AIX4.3xlC_nothreads)
|
|
|
|
THE_OS=AIX
|
|
|
|
THE_COMP="xlC"
|
|
|
|
CC=/usr/ibmcxx/bin/xlc; export CC
|
|
|
|
CXX=/usr/ibmcxx/bin/xlC; export CXX
|
2002-03-12 17:14:58 +00:00
|
|
|
AIX_SHLIB=/usr/ibmcxx/bin/makeC++SharedLib; export AIX_SHLIB
|
2002-03-08 00:25:53 +00:00
|
|
|
RELEASE_CFLAGS="-O -qmaxmem=-1"
|
|
|
|
RELEASE_CXXFLAGS="-O -qmaxmem=-1"
|
2002-03-12 17:14:58 +00:00
|
|
|
OPTS="$OPTS --enable-threads=no"
|
2002-03-08 00:25:53 +00:00
|
|
|
;;
|
2001-07-06 01:21:59 +00:00
|
|
|
AIX4.3VA)
|
|
|
|
THE_OS=AIX
|
2002-01-29 19:41:11 +00:00
|
|
|
THE_COMP="xlC_r"
|
2001-11-30 00:37:50 +00:00
|
|
|
CC=/usr/vacpp/bin/xlc_r; export CC
|
2001-07-06 01:21:59 +00:00
|
|
|
CXX=/usr/vacpp/bin/xlC_r; export CXX
|
|
|
|
#RELEASE_CFLAGS=-O2
|
|
|
|
#RELEASE_CXXFLAGS=-O2
|
|
|
|
#CPPFLAGS=-I/usr/lpp/xlC/include; export CPPFLAGS
|
|
|
|
#LDFLAGS=-L/usr/lpp/xlC/lib; export LDFLAGS
|
|
|
|
;;
|
2002-03-08 00:25:53 +00:00
|
|
|
AIX4.3VA_nothreads)
|
|
|
|
THE_OS=AIX
|
|
|
|
THE_COMP="xlC"
|
|
|
|
CC=/usr/vacpp/bin/xlc; export CC
|
|
|
|
CXX=/usr/vacpp/bin/xlC; export CXX
|
2002-03-12 17:14:58 +00:00
|
|
|
OPTS="$OPTS --enable-threads=no"
|
2002-03-08 00:25:53 +00:00
|
|
|
#RELEASE_CFLAGS=-O2
|
|
|
|
#RELEASE_CXXFLAGS=-O2
|
|
|
|
#CPPFLAGS=-I/usr/lpp/xlC/include; export CPPFLAGS
|
|
|
|
#LDFLAGS=-L/usr/lpp/xlC/lib; export LDFLAGS
|
|
|
|
;;
|
2001-07-06 01:21:59 +00:00
|
|
|
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
|
|
|
|
;;
|
|
|
|
ALPHA/LINUXGCC)
|
|
|
|
THE_OS="Linux"
|
|
|
|
THE_COMP="the GNU C++"
|
|
|
|
CC=gcc; export CC
|
|
|
|
CXX=g++; export CXX
|
|
|
|
;;
|
2001-10-30 20:03:50 +00:00
|
|
|
TRU64V5.1/CXX)
|
|
|
|
THE_OS="OSF1"
|
|
|
|
THE_COMP="Compaq cxx"
|
|
|
|
CC=cxx; export CC
|
|
|
|
CXX=cxx; export CXX
|
|
|
|
;;
|
2001-09-19 16:49:43 +00:00
|
|
|
LinuxRedHat*)
|
|
|
|
THE_OS="Linux"
|
|
|
|
THE_COMP="the GNU C++"
|
|
|
|
CC=gcc; export CC
|
|
|
|
CXX=g++; export CXX
|
|
|
|
;;
|
2002-01-03 22:35:03 +00:00
|
|
|
CygWin)
|
|
|
|
;;
|
2001-09-19 16:49:43 +00:00
|
|
|
*BSD)
|
|
|
|
THE_OS="BSD"
|
|
|
|
THE_COMP="the GNU C++"
|
|
|
|
CC=gcc; export CC
|
|
|
|
CXX=g++; export CXX
|
|
|
|
;;
|
2002-01-29 19:41:11 +00:00
|
|
|
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'
|
|
|
|
;;
|
2001-07-06 01:21:59 +00:00
|
|
|
*)
|
|
|
|
>&2 echo "$me: unrecognized platform \"$platform\" (use --help for help)"
|
|
|
|
exit 1;;
|
2000-02-18 21:02:44 +00:00
|
|
|
esac
|
|
|
|
|
2001-05-25 18:00:38 +00:00
|
|
|
|
2001-04-18 03:06:43 +00:00
|
|
|
# Tweak flags
|
|
|
|
|
|
|
|
if test $release -eq 1
|
|
|
|
then
|
2001-04-25 21:07:25 +00:00
|
|
|
if test "$RELEASE_CFLAGS" = ""
|
2001-04-18 03:06:43 +00:00
|
|
|
then
|
2001-05-25 18:00:38 +00:00
|
|
|
case $CC in
|
|
|
|
gcc|*/gcc|*-gcc-*|*/*-gcc-*)
|
|
|
|
RELEASE_CFLAGS=-O3
|
|
|
|
;;
|
|
|
|
esac
|
2001-04-18 03:06:43 +00:00
|
|
|
fi
|
2001-04-25 21:07:25 +00:00
|
|
|
if test "$RELEASE_CFLAGS" != ""
|
2001-04-18 03:06:43 +00:00
|
|
|
then
|
2001-05-25 18:00:38 +00:00
|
|
|
CFLAGS="$CFLAGS $RELEASE_CFLAGS"
|
2001-04-18 03:06:43 +00:00
|
|
|
fi
|
|
|
|
export CFLAGS
|
2001-04-25 21:07:25 +00:00
|
|
|
if test "$RELEASE_CXXFLAGS" = ""
|
2001-04-18 03:06:43 +00:00
|
|
|
then
|
2001-05-25 18:00:38 +00:00
|
|
|
case $CXX in
|
|
|
|
g++|*/g++|*-g++-*|*/*-g++-*)
|
|
|
|
RELEASE_CXXFLAGS=-O
|
|
|
|
;;
|
|
|
|
esac
|
2001-04-18 03:06:43 +00:00
|
|
|
fi
|
2001-04-25 21:07:25 +00:00
|
|
|
if test "$RELEASE_CXXFLAGS" != ""
|
2001-04-18 03:06:43 +00:00
|
|
|
then
|
2001-05-25 18:00:38 +00:00
|
|
|
CXXFLAGS="$CXXFLAGS $RELEASE_CXXFLAGS"
|
2001-04-18 03:06:43 +00:00
|
|
|
fi
|
|
|
|
export CXXFLAGS
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test $debug -eq 1
|
|
|
|
then
|
2001-04-25 21:07:25 +00:00
|
|
|
if test "$DEBUG_CFLAGS" != ""
|
2001-04-18 03:06:43 +00:00
|
|
|
then
|
2001-05-25 18:00:38 +00:00
|
|
|
CFLAGS="$CFLAGS $DEBUG_CFLAGS"
|
2001-04-18 03:06:43 +00:00
|
|
|
fi
|
|
|
|
export CFLAGS
|
2001-04-25 21:07:25 +00:00
|
|
|
if test "$DEBUG_CXXFLAGS" != ""
|
2001-04-18 03:06:43 +00:00
|
|
|
then
|
2001-05-25 18:00:38 +00:00
|
|
|
CXXFLAGS="$CXXFLAGS $DEBUG_CXXFLAGS"
|
2001-04-18 03:06:43 +00:00
|
|
|
fi
|
|
|
|
export CXXFLAGS
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Run configure
|
|
|
|
|
2002-03-08 00:25:53 +00:00
|
|
|
echo "Running ./configure $OPTS $@ for $THE_OS using $THE_COMP compiler"
|
2001-04-18 03:06:43 +00:00
|
|
|
echo
|
2002-03-08 00:25:53 +00:00
|
|
|
$configure $OPTS $@
|
2000-02-18 21:02:44 +00:00
|
|
|
echo
|
2001-04-18 03:06:43 +00:00
|
|
|
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...
|
2000-11-30 19:04:05 +00:00
|
|
|
|