mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-08 06:53:45 +00:00
ICU-7721 Remove duplicate code in configure script.
X-SVN-Rev: 28769
This commit is contained in:
parent
5878b80ed9
commit
0c59484979
2 changed files with 8 additions and 32 deletions
22
icu4c/source/configure
vendored
22
icu4c/source/configure
vendored
|
@ -3579,20 +3579,6 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
|
|||
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
|
||||
ac_compiler_gnu=$ac_cv_c_compiler_gnu
|
||||
|
||||
|
||||
# Ensure that if CFLAGS was not set when calling configure, set it correctly based on (enable/disable) debug or release option
|
||||
# The release mode use is the default one for autoconf
|
||||
if test "$GCC" = yes; then
|
||||
if test "$CFLAGS" = ""; then
|
||||
if test "$ENABLE_DEBUG" = 1; then
|
||||
CFLAGS=-g
|
||||
fi
|
||||
if test "$ENABLE_RELEASE" = 1; then
|
||||
CFLAGS="$CFLAGS -O2"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
ac_ext=cpp
|
||||
ac_cpp='$CXXCPP $CPPFLAGS'
|
||||
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
|
||||
|
@ -3851,14 +3837,16 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
|
|||
ac_compiler_gnu=$ac_cv_c_compiler_gnu
|
||||
|
||||
|
||||
# Ensure that if CXXFLAGS was not set when calling configure, set it correctly based on (enable/disable) debug or release option
|
||||
# Ensure that if CXXFLAGS/CFLAGS were not set when calling configure, set it correctly based on (enable/disable) debug or release option
|
||||
# The release mode use is the default one for autoconf
|
||||
if test "$GXX" = yes; then
|
||||
if test "$CXXFLAGS" = ""; then
|
||||
if test "$GCC" = yes; then
|
||||
if test "$CFLAGS" = ""; then
|
||||
if test "$ENABLE_DEBUG" = 1; then
|
||||
CFLAGS=-g
|
||||
CXXFLAGS=-g
|
||||
fi
|
||||
if test "$ENABLE_RELEASE" = 1; then
|
||||
CFLAGS="$CFLAGS -O2"
|
||||
CXXFLAGS="$CXXFLAGS -O2"
|
||||
fi
|
||||
fi
|
||||
|
|
|
@ -112,30 +112,18 @@ AC_SUBST(ENABLE_RELEASE)
|
|||
|
||||
# Checks for programs
|
||||
AC_PROG_CC
|
||||
AC_PROG_CXX
|
||||
|
||||
# Ensure that if CFLAGS was not set when calling configure, set it correctly based on (enable/disable) debug or release option
|
||||
# Ensure that if CXXFLAGS/CFLAGS were not set when calling configure, set it correctly based on (enable/disable) debug or release option
|
||||
# The release mode use is the default one for autoconf
|
||||
if test "$GCC" = yes; then
|
||||
if test "$CFLAGS" = ""; then
|
||||
if test "$ENABLE_DEBUG" = 1; then
|
||||
CFLAGS=-g
|
||||
fi
|
||||
if test "$ENABLE_RELEASE" = 1; then
|
||||
CFLAGS="$CFLAGS -O2"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_PROG_CXX
|
||||
|
||||
# Ensure that if CXXFLAGS was not set when calling configure, set it correctly based on (enable/disable) debug or release option
|
||||
# The release mode use is the default one for autoconf
|
||||
if test "$GXX" = yes; then
|
||||
if test "$CXXFLAGS" = ""; then
|
||||
if test "$ENABLE_DEBUG" = 1; then
|
||||
CXXFLAGS=-g
|
||||
fi
|
||||
if test "$ENABLE_RELEASE" = 1; then
|
||||
CFLAGS="$CFLAGS -O2"
|
||||
CXXFLAGS="$CXXFLAGS -O2"
|
||||
fi
|
||||
fi
|
||||
|
|
Loading…
Add table
Reference in a new issue