ICU-4941 Allow icu-config to work correctly with the if statements.

X-SVN-Rev: 18844
This commit is contained in:
George Rhoten 2005-12-01 02:06:30 +00:00
parent 7bec1acff3
commit c0056fbde0
5 changed files with 40 additions and 34 deletions

View file

@ -1,4 +1,4 @@
## Cygwin-specific setup
## Cygwin with Microsoft Visual C++ compiler specific setup
## Copyright (c) 2001-2005, International Business Machines Corporation and
## others. All Rights Reserved.
@ -16,7 +16,7 @@ GEN_DEPS.cc= :
## Flags to create/use a static library
ifneq ($(ENABLE_SHARED),YES)
## Make sure that the static libraries can be built and used
CPPFLAGS += -DU_STATIC_IMPLEMENTATION
CPPFLAGS += -DU_STATIC_IMPLEMENTATION#M#
else
## Make sure that the static libraries can be built
STATICCPPFLAGS = -DU_STATIC_IMPLEMENTATION
@ -30,20 +30,6 @@ SHAREDLIBCPPFLAGS =
## Additional flags when building libraries and with threads
LIBCPPFLAGS =
ifeq ($(ENABLE_DEBUG),1)
# /MDd means 'compiles and links a debugable multithreaded program with DLL'
THREADSCFLAGS += /MDd
THREADSCXXFLAGS += /MDd
# The debug flags are defined here because configure can't handle them.
CFLAGS+=/Zi
CXXFLAGS+=/Zi
LDFLAGS+=/DEBUG
else
# /MD means 'compiles and links a multithreaded program with DLL'
THREADSCFLAGS += /MD
THREADSCXXFLAGS += /MD
endif
ifeq ($(ENABLE_RELEASE),1)
# Make sure that assertions are disabled
CPPFLAGS+=-DU_RELEASE=1
@ -51,8 +37,8 @@ endif
# /GF pools strings and places them into read-only memory
# /EHsc enables exception handling
CFLAGS += /GF
CXXFLAGS += /GF /EHsc
CFLAGS+=/GF
CXXFLAGS+=/GF /EHsc
CPPFLAGS+=/nologo
DEFS+=-DWIN32
LDFLAGS+=/nologo

View file

@ -49,15 +49,15 @@ CXXFLAGS += -Wc,'langlvl(extended),spill(2000),ros' $(ICU_BUILD_OPTIONS)
DEFS += -D_OPEN_THREADS -D_XOPEN_SOURCE_EXTENDED -D_MSE_PROTOS -D_SHR_TZNAME -D_SHR_TIMEZONE -DU_LIBICUDATA_NAME=\"$(ICUPREFIX)$(DATA_STUBNAME)$(ICULIBSUFFIX)\"
ARFLAGS = -cr
# TODO: Fix this configuration so that icu-config will work!
# This means we shouldn't be using so many of these special case defines.
ifeq (${OS390_XPLINK}, 1)
#SH# if [ "x$OS390_XPLINK" = "x1" ]; then
# Note: The following options require the PTF for PQ69418 on z/OS 1.2
# and later.
# These lines must be the last options specified.
ICU_XPLINK_C = -Wc,'xplink(backchain,storeargs)' -Wc,'GOFF,NOCSECT,RENT,SSCOMM'
ICU_XPLINK_CPP = -Wc,'xplink(backchain,storeargs)' -Wc,'GOFF,NOCSECT,NOTEMPINC'
ICU_XPLINK_L = -Wl,dll,xplink -Wl,EDIT=NO
#SH# fi
endif
## OS390BATCH
@ -142,18 +142,19 @@ LIBICUIO= $(top_builddir)/io/$(LIBICU)io$(ICULIBSUFFIX)$(SO_TARGET_VERSION).x
LIBCTESTFW= $(top_builddir)/tools/ctestfw/$(LIBICU)test$(ICULIBSUFFIX)$(SO_TARGET_VERSION).x
LIBICUTOOLUTIL= $(top_builddir)/tools/toolutil/$(LIBICU)tu$(ICULIBSUFFIX)$(SO_TARGET_VERSION).x
# TODO: Fix this configuration so that icu-config will work!
# If statements don't work well when icu-config is generated.
ifneq (${ICUDATA_CHAR},e)
#SH# if [ "$ICUDATA_CHAR" != "e" ]; then
## We're in ASCII mode.
CFLAGS += -Wc,'ascii'#M#
CXXFLAGS += -Wc,'ascii'#M#
SO = so#M#
CFLAGS += -Wc,'ascii'
CXXFLAGS += -Wc,'ascii'
SO = so
else
#SH# else
## We're in EBCDIC mode.
## Shared object suffix
SO = dll
endif
#SH# fi
## Special 390 rules

View file

@ -4300,6 +4300,13 @@ echo "${ECHO_T}$ac_cv_func_pthread_mutex_lock" >&6
*-pc-cygwin*|*-pc-mingw*)
if test "$ac_cv_c_compiler_gnu" = no; then
ICU_USE_THREADS=1
if test $ENABLE_DEBUG = 1; then
CFLAGS="${CFLAGS} /MDd"
CXXFLAGS="${CXXFLAGS} /MDd"
else
CFLAGS="${CFLAGS} /MD"
CXXFLAGS="${CXXFLAGS} /MD"
fi
fi ;;
*-*-hpux*)
case "${icu_cv_host_frag}" in
@ -8177,9 +8184,10 @@ for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
# 1. Remove the extension, and $U if already installed.
ac_i=`echo "$ac_i" |
sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
# 2. Add them.
ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
# 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
# will be set to the directory where LIBOBJS objects are built.
ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
done
LIBOBJS=$ac_libobjs

View file

@ -294,6 +294,15 @@ if test $threads = true; then
if test "$ac_cv_prog_gcc" = no; then
dnl We're using normal windows compilers. Threading is available.
ICU_USE_THREADS=1
if test $ENABLE_DEBUG = 1; then
dnl /MDd means 'compiles and links a debugable multithreaded program with DLL'
CFLAGS="${CFLAGS} /MDd"
CXXFLAGS="${CXXFLAGS} /MDd"
else
dnl /MD means 'compiles and links a multithreaded program with DLL'
CFLAGS="${CFLAGS} /MD"
CXXFLAGS="${CXXFLAGS} /MD"
fi
fi ;;
*-*-hpux*)
dnl Add -mt because it does several nice things on newer compilers.

View file

@ -220,9 +220,10 @@ case $platform in
CXX=cl; export CXX
RELEASE_CFLAGS='/O2 /Ob2 /Op'
RELEASE_CXXFLAGS='/O2 /Ob2 /Op'
# The real debug flags are defined by the mh file because configure can't handle them.
DEBUG_CFLAGS=
DEBUG_CXXFLAGS=
# The some debug flags are defined by the mh file because configure can't handle them.
DEBUG_CFLAGS='/Zi'
DEBUG_CXXFLAGS='/Zi'
DEBUG_LDFLAGS='/DEBUG'
;;
Cygwin/ICL)
THE_OS="Windows with Cygwin"
@ -232,9 +233,10 @@ case $platform in
# The Intel compiler has optimization bugs. So we disable optimization.
RELEASE_CFLAGS='/Od'
RELEASE_CXXFLAGS='/Od'
# The real debug flags are defined by the mh file because configure can't handle them.
DEBUG_CFLAGS=
DEBUG_CXXFLAGS=
# The some debug flags are defined by the mh file because configure can't handle them.
DEBUG_CFLAGS='/Zi'
DEBUG_CXXFLAGS='/Zi'
DEBUG_LDFLAGS='/DEBUG'
;;
MacOSX)
THE_OS="MacOS X (Darwin)"