ICU-5014 Make --disable-64-libs use -m32 on gcc platforms.
X-SVN-Rev: 19698
This commit is contained in:
parent
1d7d7f00ba
commit
90521732dc
13
icu4c/source/aclocal.m4
vendored
13
icu4c/source/aclocal.m4
vendored
@ -275,6 +275,19 @@ AC_DEFUN(AC_CHECK_64BIT_LIBS,
|
||||
ENABLE_64BIT_LIBS=no
|
||||
;;
|
||||
esac
|
||||
else
|
||||
if test "$GCC" = yes; then
|
||||
OLD_CFLAGS="${CFLAGS}"
|
||||
OLD_CXXFLAGS="${CXXFLAGS}"
|
||||
CFLAGS="${CFLAGS} -m32"
|
||||
CXXFLAGS="${CXXFLAGS} -m32"
|
||||
AC_TRY_RUN(int main(void) {return 0;},
|
||||
ENABLE_64BIT_LIBS=no, ENABLE_64BIT_LIBS=yes, ENABLE_64BIT_LIBS=yes)
|
||||
if test "$ENABLE_64BIT_LIBS" = yes; then
|
||||
CFLAGS="${OLD_CFLAGS}"
|
||||
CXXFLAGS="${OLD_CXXFLAGS}"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
dnl Individual tests that fail should reset their own flags.
|
||||
AC_MSG_RESULT($ENABLE_64BIT_LIBS)
|
||||
|
44
icu4c/source/configure
vendored
44
icu4c/source/configure
vendored
@ -3327,6 +3327,50 @@ fi
|
||||
ENABLE_64BIT_LIBS=no
|
||||
;;
|
||||
esac
|
||||
else
|
||||
if test "$GCC" = yes; then
|
||||
OLD_CFLAGS="${CFLAGS}"
|
||||
OLD_CXXFLAGS="${CXXFLAGS}"
|
||||
CFLAGS="${CFLAGS} -m32"
|
||||
CXXFLAGS="${CXXFLAGS} -m32"
|
||||
if test "$cross_compiling" = yes; then
|
||||
ENABLE_64BIT_LIBS=yes
|
||||
else
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
/* confdefs.h. */
|
||||
_ACEOF
|
||||
cat confdefs.h >>conftest.$ac_ext
|
||||
cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
int main(void) {return 0;}
|
||||
_ACEOF
|
||||
rm -f conftest$ac_exeext
|
||||
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
|
||||
(eval $ac_link) 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); }; }; then
|
||||
ENABLE_64BIT_LIBS=no
|
||||
else
|
||||
echo "$as_me: program exited with status $ac_status" >&5
|
||||
echo "$as_me: failed program was:" >&5
|
||||
sed 's/^/| /' conftest.$ac_ext >&5
|
||||
|
||||
( exit $ac_status )
|
||||
ENABLE_64BIT_LIBS=yes
|
||||
fi
|
||||
rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
|
||||
fi
|
||||
if test "$ENABLE_64BIT_LIBS" = yes; then
|
||||
CFLAGS="${OLD_CFLAGS}"
|
||||
CXXFLAGS="${OLD_CXXFLAGS}"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
echo "$as_me:$LINENO: result: $ENABLE_64BIT_LIBS" >&5
|
||||
echo "${ECHO_T}$ENABLE_64BIT_LIBS" >&6
|
||||
|
Loading…
Reference in New Issue
Block a user