2007-08-23 04:00:56 +00:00
|
|
|
#!/bin/sh
|
2011-01-18 17:33:07 +00:00
|
|
|
# Copyright (c) 1999-2011, International Business Machines Corporation and
|
2007-08-23 04:00:56 +00:00
|
|
|
# others. All Rights Reserved.
|
2000-02-18 21:02:44 +00:00
|
|
|
|
2007-08-23 04:00:56 +00:00
|
|
|
# runConfigureICU: This script will run the "configure" script for the appropriate platform
|
|
|
|
# Only supported platforms are recognized
|
2000-02-18 21:02:44 +00:00
|
|
|
|
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()
|
2007-08-23 04:00:56 +00:00
|
|
|
{
|
2001-04-18 03:06:43 +00:00
|
|
|
ec=0$1
|
|
|
|
if test $ec -eq 0
|
|
|
|
then
|
|
|
|
uletter=U
|
|
|
|
else
|
2002-05-10 15:54:01 +00:00
|
|
|
uletter=u
|
2001-04-18 03:06:43 +00:00
|
|
|
fi
|
2002-05-10 15:54:01 +00:00
|
|
|
|
2007-08-23 04:00:56 +00:00
|
|
|
echo "${uletter}sage: $me [ -h, --help ] [ --enable-debug | --disable-release ] platform [ configurearg ... ]"
|
2001-04-18 03:06:43 +00:00
|
|
|
if test $ec -eq 0
|
|
|
|
then
|
2002-05-10 15:54:01 +00:00
|
|
|
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
|
2002-05-10 15:54:01 +00:00
|
|
|
--enable-debug Enable support for debugging
|
|
|
|
--disable-release Disable presetting optimization flags
|
2001-04-18 03:06:43 +00:00
|
|
|
|
|
|
|
The following names can be supplied as the argument for platform:
|
|
|
|
|
2005-03-15 18:20:10 +00:00
|
|
|
AIX Use the IBM Visual Age xlc_r/xlC_r compilers on AIX
|
|
|
|
AIX/GCC Use the GNU gcc/g++ compilers on AIX
|
|
|
|
Cygwin Use the GNU gcc/g++ compilers on Cygwin
|
|
|
|
Cygwin/MSVC Use the Microsoft Visual C++ compiler on Cygwin
|
2007-08-23 03:54:36 +00:00
|
|
|
Cygwin/MSVC2005 Use the Microsoft Visual C++ 2005 compiler on Cygwin
|
2005-05-18 17:28:59 +00:00
|
|
|
Cygwin/ICL Use the Intel C++ compiler on Cygwin
|
2005-03-15 18:20:10 +00:00
|
|
|
FreeBSD Use the GNU gcc/g++ compilers on Free BSD
|
|
|
|
HP-UX/ACC Use the HP ANSI C/Advanced C++ compilers on HP-UX 11
|
2008-05-02 19:57:54 +00:00
|
|
|
IBMi Use the iCC compilers on IBM i, i5/OS, OS/400
|
2005-03-15 18:20:10 +00:00
|
|
|
Linux Use the GNU gcc/g++ compilers on Linux
|
|
|
|
Linux/ECC Use the Intel ECC compiler on Linux
|
|
|
|
Linux/ICC Use the Intel ICC compiler on Linux
|
|
|
|
Linux/VA Use the IBM Visual Age compiler on Power PC Linux
|
|
|
|
MacOSX Use the GNU gcc/g++ compilers on MacOS X (Darwin)
|
2011-06-29 19:49:05 +00:00
|
|
|
MinGW Use the GNU gcc/g++ compilers on MinGW
|
2005-03-15 18:20:10 +00:00
|
|
|
QNX Use the QNX QCC compiler on QNX/Neutrino
|
|
|
|
Solaris Use the Sun cc/CC compilers on Solaris
|
|
|
|
Solaris/GCC Use the GNU gcc/g++ compilers on Solaris
|
|
|
|
SolarisX86 Use the Sun cc/CC compilers on Solaris x86
|
|
|
|
TRU64V5.1/CXX Use the Compaq cxx compiler on Tru64 (OSF)
|
|
|
|
zOS Use the IBM cxx compiler on z/OS (os/390)
|
|
|
|
zOSV1R2 Use the IBM cxx compiler for z/OS 1.2
|
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
|
2007-08-23 04:00:56 +00:00
|
|
|
}
|
2000-05-15 18:20:15 +00:00
|
|
|
|
2007-08-23 04:00:56 +00:00
|
|
|
# Parse arguments
|
2001-04-18 03:06:43 +00:00
|
|
|
|
|
|
|
platform=
|
|
|
|
debug=0
|
|
|
|
release=1
|
|
|
|
|
2007-08-23 04:00:56 +00:00
|
|
|
while test $# -ne 0
|
2001-04-18 03:06:43 +00:00
|
|
|
do
|
|
|
|
case "$1" in
|
2001-07-06 01:21:59 +00:00
|
|
|
-h|--help)
|
|
|
|
usage 0
|
|
|
|
;;
|
|
|
|
--enable-debug)
|
|
|
|
debug=1
|
2003-10-16 21:08:31 +00:00
|
|
|
OPTS="$OPTS --enable-debug"
|
2001-07-06 01:21:59 +00:00
|
|
|
;;
|
|
|
|
--disable-release)
|
|
|
|
release=0
|
2003-10-16 21:08:31 +00:00
|
|
|
OPTS="$OPTS --disable-release"
|
2001-07-06 01:21:59 +00:00
|
|
|
;;
|
|
|
|
*)
|
|
|
|
platform="$1"
|
|
|
|
shift
|
|
|
|
break
|
|
|
|
;;
|
2001-04-18 03:06:43 +00:00
|
|
|
esac
|
|
|
|
shift
|
|
|
|
done
|
|
|
|
|
|
|
|
if test x$platform = x
|
|
|
|
then
|
|
|
|
usage 1
|
|
|
|
fi
|
|
|
|
|
2007-08-23 04:00:56 +00:00
|
|
|
# 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
|
2005-03-15 18:20:10 +00:00
|
|
|
AIX)
|
2001-07-06 01:21:59 +00:00
|
|
|
THE_OS=AIX
|
2002-01-29 19:41:11 +00:00
|
|
|
THE_COMP="xlC_r"
|
2002-07-22 19:07:11 +00:00
|
|
|
CC=`which xlc_r`; export CC
|
2009-07-24 21:52:08 +00:00
|
|
|
if [ ! -x $CC ]; then
|
2009-07-24 20:01:52 +00:00
|
|
|
echo "ERROR: xlc_r was not found, please check the PATH to make sure it is correct."; exit 1
|
|
|
|
fi
|
2002-07-22 19:07:11 +00:00
|
|
|
CXX=`which xlC_r`; export CXX
|
2009-07-24 21:52:08 +00:00
|
|
|
if [ ! -x $CXX ]; then
|
2009-07-24 20:01:52 +00:00
|
|
|
echo "ERROR: xlC_r was not found, please check the PATH to make sure it is correct."; exit 1
|
|
|
|
fi
|
2002-03-22 22:46:46 +00:00
|
|
|
RELEASE_CFLAGS="-O2 -qmaxmem=-1"
|
|
|
|
RELEASE_CXXFLAGS="-O2 -qmaxmem=-1"
|
2001-07-06 01:21:59 +00:00
|
|
|
;;
|
2005-03-15 18:20:10 +00:00
|
|
|
AIX/GCC)
|
2004-01-14 23:54:41 +00:00
|
|
|
THE_OS=AIX
|
2006-07-13 07:38:31 +00:00
|
|
|
THE_COMP="the GNU C++"
|
|
|
|
CC=gcc; export CC
|
|
|
|
CXX=g++; export CXX
|
2010-08-30 19:24:42 +00:00
|
|
|
DEBUG_CFLAGS='-g -O0'
|
|
|
|
DEBUG_CXFLAGS='-g -O0'
|
2004-01-14 23:54:41 +00:00
|
|
|
;;
|
2005-03-15 18:20:10 +00:00
|
|
|
Solaris)
|
2001-07-06 01:21:59 +00:00
|
|
|
THE_OS=SOLARIS
|
|
|
|
THE_COMP="Sun's CC"
|
|
|
|
CC=`which cc`; export CC
|
|
|
|
CXX=`which CC`; export CXX
|
2011-01-30 21:03:27 +00:00
|
|
|
RELEASE_CFLAGS="-xO1 -xlibmil"
|
2005-04-13 19:26:58 +00:00
|
|
|
RELEASE_CXXFLAGS="-O4 -xlibmil"
|
2001-07-06 01:21:59 +00:00
|
|
|
;;
|
2005-03-15 18:20:10 +00:00
|
|
|
Solaris/GCC)
|
2001-07-06 01:21:59 +00:00
|
|
|
THE_OS=SOLARIS
|
|
|
|
THE_COMP="the GNU C++"
|
2006-07-13 07:38:31 +00:00
|
|
|
CC=gcc; export CC
|
|
|
|
CXX=g++; export CXX
|
2006-07-13 23:36:35 +00:00
|
|
|
RELEASE_CFLAGS=-O1
|
2011-08-22 22:42:11 +00:00
|
|
|
RELEASE_CXXFLAGS=-O2
|
2001-07-06 01:21:59 +00:00
|
|
|
;;
|
2005-03-15 18:20:10 +00:00
|
|
|
SolarisX86)
|
|
|
|
THE_OS="SOLARIS X86"
|
|
|
|
THE_COMP="Sun's CC"
|
|
|
|
CC=`which cc`; export CC
|
|
|
|
CXX=`which CC`; export CXX
|
2011-06-22 16:52:44 +00:00
|
|
|
LDFLAGS="${LDFLAGS} -lCrun";export LDFLAGS
|
2005-03-15 18:20:10 +00:00
|
|
|
RELEASE_CFLAGS=-xO3
|
|
|
|
RELEASE_CXXFLAGS=-O3
|
2001-07-06 01:21:59 +00:00
|
|
|
;;
|
2005-03-15 18:20:10 +00:00
|
|
|
HP-UX/ACC)
|
2001-07-06 01:21:59 +00:00
|
|
|
THE_OS="HP-UX 11"
|
|
|
|
THE_COMP="aCC"
|
|
|
|
CC=cc; export CC
|
|
|
|
CXX=aCC; export CXX
|
|
|
|
RELEASE_CFLAGS='+O2 +Ofltacc'
|
|
|
|
RELEASE_CXXFLAGS='+O2 +Ofltacc'
|
|
|
|
;;
|
2008-05-02 19:57:54 +00:00
|
|
|
IBMi)
|
|
|
|
THE_OS="IBM i"
|
|
|
|
THE_COMP="the iCC C++"
|
2011-09-15 19:34:17 +00:00
|
|
|
CC=icc; export CC
|
|
|
|
CXX=icc; export CXX
|
2009-09-16 01:08:54 +00:00
|
|
|
CPP="$CC -c -qpponly"; export CPP
|
2011-09-15 19:34:17 +00:00
|
|
|
MAKE=gmake; export MAKE
|
|
|
|
U_MAKE=gmake; export U_MAKE
|
|
|
|
# gmake is a .pgm and may not be on the path. Don't use a full path, just use gmake.
|
|
|
|
ac_cv_path_U_MAKE=gmake; export ac_cv_path_U_MAKE
|
2007-08-23 04:03:45 +00:00
|
|
|
RELEASE_CFLAGS='-O4'
|
|
|
|
RELEASE_CXXFLAGS='-O4'
|
|
|
|
;;
|
2005-03-15 18:20:10 +00:00
|
|
|
Linux/ECC)
|
2003-09-02 19:39:32 +00:00
|
|
|
THE_OS="Linux"
|
2003-09-18 21:42:09 +00:00
|
|
|
THE_COMP="Intel ECC 7.1"
|
2003-09-02 19:39:32 +00:00
|
|
|
CC=ecc; export CC
|
2003-09-18 21:42:09 +00:00
|
|
|
CXX=ecpc; export CXX
|
2003-09-19 17:44:23 +00:00
|
|
|
RELEASE_CFLAGS='-O2'
|
|
|
|
RELEASE_CXXFLAGS='-O2'
|
2003-09-02 19:39:32 +00:00
|
|
|
;;
|
2005-05-13 17:53:09 +00:00
|
|
|
Linux/ICC)
|
|
|
|
THE_OS="Linux"
|
2006-02-20 19:39:44 +00:00
|
|
|
CC=`which icc`; export CC
|
|
|
|
CXX=`which icpc`; export CXX
|
2009-08-26 01:02:40 +00:00
|
|
|
ICC_VER=`${CC} -v 2>&1`
|
2005-05-13 17:53:09 +00:00
|
|
|
RELEASE_CFLAGS='-O'
|
|
|
|
RELEASE_CXXFLAGS='-O'
|
2009-08-26 01:02:40 +00:00
|
|
|
export CFLAGS="-fp-model precise"
|
|
|
|
export CXXFLAGS="-fp-model precise"
|
|
|
|
if [ "${ICC_VER}" = "Version 9.0 " ]; then
|
|
|
|
RELEASE_CFLAGS=''
|
|
|
|
RELEASE_CXXFLAGS=''
|
|
|
|
export CFLAGS="${CFLAGS} -O0"
|
|
|
|
export CXXFLAGS="${CXXFLAGS} -O0"
|
|
|
|
echo "ICC 9.0 does not work with optimization- disabling optimizations"
|
|
|
|
fi
|
|
|
|
THE_COMP="Intel ${ICC_VER}"
|
2005-05-13 17:53:09 +00:00
|
|
|
;;
|
2005-03-15 18:20:10 +00:00
|
|
|
Linux/VA)
|
2004-09-30 18:51:03 +00:00
|
|
|
THE_OS="Linux"
|
|
|
|
THE_COMP="IBM Visual Age C++ Compiler"
|
|
|
|
CC=`which xlc_r`; export CC
|
|
|
|
CXX=`which xlC_r`; export CXX
|
|
|
|
RELEASE_CFLAGS="-O2 -qmaxmem=-1"
|
|
|
|
RELEASE_CXXFLAGS="-O2 -qmaxmem=-1"
|
|
|
|
;;
|
2005-03-15 18:20:10 +00:00
|
|
|
Linux*)
|
|
|
|
THE_OS="Linux"
|
|
|
|
THE_COMP="the GNU C++"
|
|
|
|
CC=gcc; export CC
|
|
|
|
CXX=g++; export CXX
|
2010-08-30 19:24:42 +00:00
|
|
|
DEBUG_CFLAGS='-g -O0'
|
|
|
|
DEBUG_CXFLAGS='-g -O0'
|
2005-03-15 18:20:10 +00:00
|
|
|
;;
|
2004-04-01 01:25:30 +00:00
|
|
|
Cygwin)
|
|
|
|
THE_OS="Cygwin"
|
2002-04-17 23:54:04 +00:00
|
|
|
THE_COMP="the GNU C++"
|
2003-10-10 17:17:50 +00:00
|
|
|
RELEASE_CFLAGS='-O3'
|
|
|
|
RELEASE_CXXFLAGS='-O3'
|
2002-04-17 23:54:04 +00:00
|
|
|
;;
|
2004-04-01 01:25:30 +00:00
|
|
|
Cygwin/MSVC)
|
|
|
|
THE_OS="Windows with Cygwin"
|
2004-03-31 22:33:46 +00:00
|
|
|
THE_COMP="Microsoft Visual C++"
|
|
|
|
CC=cl; export CC
|
|
|
|
CXX=cl; export CXX
|
2009-08-21 23:29:07 +00:00
|
|
|
RELEASE_CFLAGS='/Gy /MD'
|
|
|
|
RELEASE_CXXFLAGS='/Gy /MD'
|
2009-08-20 20:00:01 +00:00
|
|
|
DEBUG_CFLAGS='/Zi /MDd'
|
|
|
|
DEBUG_CXXFLAGS='/Zi /MDd'
|
2007-08-23 03:54:36 +00:00
|
|
|
DEBUG_LDFLAGS='/DEBUG'
|
|
|
|
;;
|
|
|
|
Cygwin/MSVC2005)
|
|
|
|
THE_OS="Windows with Cygwin"
|
|
|
|
THE_COMP="Microsoft Visual C++ 2005"
|
|
|
|
CC=cl; export CC
|
|
|
|
CXX=cl; export CXX
|
2009-08-21 23:29:07 +00:00
|
|
|
RELEASE_CFLAGS='/Gy /MD'
|
|
|
|
RELEASE_CXXFLAGS='/Gy /MD'
|
2009-08-20 20:00:01 +00:00
|
|
|
DEBUG_CFLAGS='/Zi /MDd'
|
|
|
|
DEBUG_CXXFLAGS='/Zi /MDd'
|
2005-12-01 02:06:30 +00:00
|
|
|
DEBUG_LDFLAGS='/DEBUG'
|
2004-03-31 22:33:46 +00:00
|
|
|
;;
|
2005-05-18 17:28:59 +00:00
|
|
|
Cygwin/ICL)
|
|
|
|
THE_OS="Windows with Cygwin"
|
|
|
|
THE_COMP="Intel C++"
|
|
|
|
CC=icl; export CC
|
|
|
|
CXX=icl; export CXX
|
2007-08-23 04:00:56 +00:00
|
|
|
# The Intel compiler has optimization bugs. So we disable optimization.
|
2005-05-18 17:28:59 +00:00
|
|
|
RELEASE_CFLAGS='/Od'
|
|
|
|
RELEASE_CXXFLAGS='/Od'
|
2005-12-01 02:06:30 +00:00
|
|
|
DEBUG_CFLAGS='/Zi'
|
|
|
|
DEBUG_CXXFLAGS='/Zi'
|
|
|
|
DEBUG_LDFLAGS='/DEBUG'
|
2005-05-18 17:28:59 +00:00
|
|
|
;;
|
2002-04-17 23:54:04 +00:00
|
|
|
MacOSX)
|
|
|
|
THE_OS="MacOS X (Darwin)"
|
|
|
|
THE_COMP="the GNU C++"
|
2002-05-10 15:54:01 +00:00
|
|
|
RELEASE_CFLAGS='-O2'
|
|
|
|
RELEASE_CXXFLAGS='-O2'
|
2010-08-30 19:24:42 +00:00
|
|
|
DEBUG_CFLAGS='-g -O0'
|
|
|
|
DEBUG_CXXFLAGS='-g -O0'
|
2002-01-03 22:35:03 +00:00
|
|
|
;;
|
2011-06-29 19:49:05 +00:00
|
|
|
MinGW)
|
|
|
|
THE_OS="MinGW"
|
|
|
|
THE_COMP="the GNU C++"
|
|
|
|
RELEASE_CFLAGS='-O3'
|
|
|
|
RELEASE_CXXFLAGS='-O3'
|
|
|
|
;;
|
2001-09-19 16:49:43 +00:00
|
|
|
*BSD)
|
|
|
|
THE_OS="BSD"
|
|
|
|
THE_COMP="the GNU C++"
|
2002-04-19 00:27:24 +00:00
|
|
|
CC=gcc; export CC
|
|
|
|
CXX=g++; export CXX
|
2010-08-30 19:24:42 +00:00
|
|
|
DEBUG_CFLAGS='-g -O0'
|
|
|
|
DEBUG_CXFLAGS='-g -O0'
|
2001-09-19 16:49:43 +00:00
|
|
|
;;
|
2005-03-15 18:20:10 +00:00
|
|
|
TRU64V5.1/CXX)
|
|
|
|
THE_OS="OSF1"
|
|
|
|
THE_COMP="Compaq cxx"
|
|
|
|
CC=cc; export CC
|
|
|
|
CXX=cxx; export CXX
|
|
|
|
;;
|
2003-03-20 20:26:28 +00:00
|
|
|
QNX)
|
|
|
|
THE_OS="QNX"
|
|
|
|
THE_COMP="QNX cc"
|
|
|
|
CC=qcc; export CC
|
|
|
|
CXX=QCC; export CXX
|
2003-05-23 03:45:30 +00:00
|
|
|
;;
|
|
|
|
zOS)
|
2002-07-11 15:44:06 +00:00
|
|
|
THE_OS="z/OS (OS/390)"
|
2006-01-30 05:47:05 +00:00
|
|
|
THE_COMP="z/OS C/C++"
|
2002-01-29 19:41:11 +00:00
|
|
|
CC=cc; export CC
|
|
|
|
CXX=cxx; export CXX
|
2007-08-23 03:54:36 +00:00
|
|
|
RELEASE_CFLAGS="-2 -Wc,'inline(auto,noreport,500,4000)'"
|
|
|
|
RELEASE_CXXFLAGS="-2 -Wc,'inline(auto,noreport,500,4000)'"
|
2003-05-23 03:45:30 +00:00
|
|
|
;;
|
|
|
|
zOSV1R2)
|
|
|
|
THE_OS="z/OS 1.2"
|
|
|
|
THE_COMP="z/OS 1.2 C/C++"
|
|
|
|
CC=cc; export CC
|
|
|
|
CXX=cxx; export CXX
|
2009-08-26 01:02:40 +00:00
|
|
|
export COMPILE_LINK_ENVVAR='_CXX_CICC_VER}=0x41020000 _C89_CVERSION=0x41020000 _CC_CVERSION=0x41020000 _CXX_PVERSION=0x41020000 _C89_PVERSION=0x41020000 _CC_PVERSION=0x41020000'
|
2007-08-23 04:00:56 +00:00
|
|
|
export _CXX_CVERSION=0x41020000 _C89_CVERSION=0x41020000 _CC_CVERSION=0x41020000 _CXX_PVERSION=0x41020000 _C89_PVERSION=0x41020000 _CC_PVERSION=0x41020000
|
2005-11-21 08:02:13 +00:00
|
|
|
export LDFLAGS="-Wl,'compat=pm3'"
|
|
|
|
export CFLAGS="-Wc,'target(zOSV1R2)'"
|
|
|
|
export CXXFLAGS="-Wc,'target(zOSV1R2)'"
|
2010-05-18 21:28:12 +00:00
|
|
|
RELEASE_CFLAGS="-2 -Wc,'inline(auto,noreport,500,4000)'"
|
|
|
|
RELEASE_CXXFLAGS="-2 -Wc,'inline(auto,noreport,500,4000)'"
|
2003-05-23 03:45:30 +00:00
|
|
|
;;
|
2001-07-06 01:21:59 +00:00
|
|
|
*)
|
2007-08-23 04:00:56 +00:00
|
|
|
>&2 echo "$me: unrecognized platform \"$platform\" (use --help for help)"
|
2001-07-06 01:21:59 +00:00
|
|
|
exit 1;;
|
2000-02-18 21:02:44 +00:00
|
|
|
esac
|
|
|
|
|
2001-05-25 18:00:38 +00:00
|
|
|
|
2007-08-23 04:00:56 +00:00
|
|
|
# Tweak flags
|
2001-04-18 03:06:43 +00:00
|
|
|
|
|
|
|
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
|
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++-*)
|
2009-07-29 19:44:01 +00:00
|
|
|
RELEASE_CXXFLAGS=-O3
|
2001-05-25 18:00:38 +00:00
|
|
|
;;
|
|
|
|
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"
|
2007-08-23 03:54:36 +00:00
|
|
|
fi
|
|
|
|
if test "$RELEASE_LDFLAGS" != ""
|
|
|
|
then
|
|
|
|
LDFLAGS="$LDFLAGS $RELEASE_LDFLAGS"
|
2001-04-18 03:06:43 +00:00
|
|
|
fi
|
|
|
|
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
|
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
|
2003-10-10 17:17:50 +00:00
|
|
|
if test "$DEBUG_LDFLAGS" != ""
|
|
|
|
then
|
|
|
|
LDFLAGS="$LDFLAGS $DEBUG_LDFLAGS"
|
|
|
|
fi
|
2001-04-18 03:06:43 +00:00
|
|
|
fi
|
|
|
|
|
2007-08-23 03:54:36 +00:00
|
|
|
export CFLAGS
|
|
|
|
export CXXFLAGS
|
|
|
|
export LDFLAGS
|
|
|
|
|
2007-08-23 04:00:56 +00:00
|
|
|
# Run configure
|
2001-04-18 03:06:43 +00:00
|
|
|
|
2010-05-18 21:28:12 +00:00
|
|
|
echo "export CPP=$CPP CC=$CC CXX=$CXX CPPFLAGS=$CPPFLAGS CFLAGS=$CFLAGS CXXFLAGS=$CXXFLAGS LDFLAGS=$LDFLAGS MAKE=$MAKE"
|
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
|
2009-04-01 01:54:14 +00:00
|
|
|
if $configure $OPTS $@
|
|
|
|
then
|
|
|
|
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...
|
|
|
|
else
|
|
|
|
echo $0: ./configure failed
|
|
|
|
exit 1
|
|
|
|
fi
|