ICU-6564 remove default 64bit=yes. Merge r24704:24803 from /repos/icu/icu/branches/srl/unbreak

X-SVN-Rev: 24804
This commit is contained in:
Steven R. Loomis 2008-10-14 22:55:22 +00:00
parent 85121155a5
commit b90b3d2fba
3 changed files with 780 additions and 488 deletions

View File

@ -117,181 +117,274 @@ else :
$4
fi])
# Check if we can build and use 64-bit libraries
AC_DEFUN(AC_CHECK_64BIT_LIBS,
[
BITS_REQ=nochange
ENABLE_64BIT_LIBS=unknown
## revisit this for cross-compile.
AC_ARG_ENABLE(64bit-libs,
[ --enable-64bit-libs build 64-bit libraries [default=yes]],
[ENABLE_64BIT_LIBS=${enableval}],
[ENABLE_64BIT_LIBS=yes]
)
# These results can't be cached because is sets compiler flags.
AC_MSG_CHECKING([for 64-bit executable support])
if test "$ENABLE_64BIT_LIBS" != no; then
if test "$GCC" = yes; then
# First we check that gcc already compiles as 64-bit
if test -n "`$CXX -dumpspecs 2>&1 && $CC -dumpspecs 2>&1 | grep -v __LP64__`"; then
ENABLE_64BIT_LIBS=yes
else
# Now we check a little more forcefully.
# Maybe the compiler builds as 32-bit on a 64-bit machine.
[ --enable-64bit-libs (deprecated, use --with-library-bits) build 64-bit libraries [default= platform default]],
[echo "note, use --with-library-bits instead of --*-64bit-libs"
case "${withval}" in
no|false|32) BITS_REQ=32 ;;
yes|true|64) BITS_REQ=64 ;;
nochange) BITS_REQ=nochange ;;
*) AC_MSG_ERROR(bad value ${withval} for --with-library-bits) ;;
esac] )
AC_ARG_WITH(library-bits,
[ --with-library-bits=bits specify how many bits to use for the library (32, 64, 64else32, nochange) [default=nochange]],
[case "${withval}" in
nochange) BITS_REQ=$withval ;;
32|64|64else32) BITS_REQ=$withval ;;
*) AC_MSG_ERROR(bad value ${withval} for --with-library-bits) ;;
esac])
DEFAULT_64BIT=no
AC_MSG_CHECKING([whether 64 bit binaries are built by default])
AC_RUN_IFELSE(int main(void) {return (sizeof(void*)*8==64)?0:1;},
DEFAULT_64BIT=yes, DEFAULT_64BIT=no, DEFAULT_64BIT=unknown)
BITS_GOT=unknown
BITS_OK=yes
if test "$DEFAULT_64BIT" = "yes"; then
BITS_GOT=64
case "$BITS_REQ" in
32) BITS_OK=no;;
nochange) ;;
*) ;;
esac
elif test "$DEFAULT_64BIT" = "no"; then
BITS_GOT=32
case "$BITS_REQ" in
64|64else32) BITS_OK=no;;
nochange) ;;
*) ;;
esac
elif test "$DEFAULT_64BIT" = "unknown"; then
BITS_GOT=unknown
case "$BITS_REQ" in
64|64else32) BITS_OK=no;;
32) BITS_OK=no;;
nochange) ;;
*) ;;
esac
fi
AC_MSG_RESULT($DEFAULT_64BIT);
#AC_MSG_RESULT($DEFAULT_64BIT - got $BITS_GOT wanted $BITS_REQ okness $BITS_OK);
if test "$BITS_OK" != "yes"; then
# These results can't be cached because is sets compiler flags.
if test "$BITS_REQ" = "64" -o "$BITS_REQ" = "64else32"; then
AC_MSG_CHECKING([how to build 64-bit executables])
if test "$GCC" = yes; then
#DONOTUSE# This test is wrong. If it's GCC, just test m64
#DONOTUSE#if test -n "`$CXX -dumpspecs 2>&1 && $CC -dumpspecs 2>&1 | grep -v __LP64__`"; then
OLD_CFLAGS="${CFLAGS}"
OLD_CXXFLAGS="${CXXFLAGS}"
CFLAGS="${CFLAGS} -m64"
CXXFLAGS="${CXXFLAGS} -m64"
AC_TRY_RUN(int main(void) {return 0;},
ENABLE_64BIT_LIBS=yes, ENABLE_64BIT_LIBS=no, ENABLE_64BIT_LIBS=no)
if test "$ENABLE_64BIT_LIBS" = no; then
# Nope. We're on a 32-bit machine with a 32-bit compiler.
AC_COMPILE_IFELSE(int main(void) {return (sizeof(void*)*8==64)?0:1;},
ENABLE_64BIT_LIBS=yes, ENABLE_64BIT_LIBS=no)
if test "$ENABLE_64BIT_LIBS" != yes; then
# Nope. back out changes.
CFLAGS="${OLD_CFLAGS}"
CXXFLAGS="${OLD_CXXFLAGS}"
fi
fi
else
case "${host}" in
sparc*-*-solaris*)
SPARCV9=`isainfo -n 2>&1 | grep sparcv9`
# "Warning: -xarch=v9 is deprecated, use -m64 to create 64-bit programs"
SOL64=`$CXX -xarch=v9 2>&1 && $CC -xarch=v9 2>&1 | grep -v usage:`
if test -z "$SOL64" && test -n "$SPARCV9"; then
CFLAGS="${CFLAGS} -xtarget=ultra -xarch=v9"
CXXFLAGS="${CXXFLAGS} -xtarget=ultra -xarch=v9"
LDFLAGS="${LDFLAGS} -xtarget=ultra -xarch=v9"
ENABLE_64BIT_LIBS=yes
else
SOL64=`$CXX -m64 2>&1 && $CC -m64 2>&1 | grep -v usage:`
if test -z "$SOL64" && test -n "$SPARCV9"; then
CFLAGS="${CFLAGS} -m64 "
CXXFLAGS="${CXXFLAGS} -m64 "
LDFLAGS="${LDFLAGS} -m64 "
ENABLE_64BIT_LIBS=yes
else
ENABLE_64BIT_LIBS=no
fi
fi
;;
i386-*-solaris*)
AMD64=`isainfo -n 2>&1 | grep amd64`
# The new compiler option
SOL64=`$CXX -m64 2>&1 && $CC -m64 2>&1 | grep -v usage:`
if test -z "$SOL64" && test -n "$AMD64"; then
else
case "${host}" in
sparc*-*-solaris*)
# 0. save old flags
OLD_CFLAGS="${CFLAGS}"
OLD_CXXFLAGS="${CXXFLAGS}"
# 1. try -m64
CFLAGS="${CFLAGS} -m64"
CXXFLAGS="${CXXFLAGS} -m64"
ENABLE_64BIT_LIBS=yes
else
# The older compiler option
SOL64=`$CXX -xtarget=generic64 2>&1 && $CC -xtarget=generic64 2>&1 | grep -v usage:`
if test -z "$SOL64" && test -n "$AMD64"; then
CFLAGS="${CFLAGS} -xtarget=generic64"
CXXFLAGS="${CXXFLAGS} -xtarget=generic64"
ENABLE_64BIT_LIBS=yes
else
ENABLE_64BIT_LIBS=no
fi
fi
;;
ia64-*-linux*)
# check for ecc/ecpc compiler support
if test -n "`$CXX --help 2>&1 && $CC --help 2>&1 | grep -v Intel`"; then
if test -n "`$CXX --help 2>&1 && $CC --help 2>&1 | grep -v Itanium`"; then
ENABLE_64BIT_LIBS=yes
else
ENABLE_64BIT_LIBS=no
fi
else
# unknown
ENABLE_64BIT_LIBS=no
fi
;;
*-*-cygwin)
# vcvarsamd64.bat should have been used to enable 64-bit builds.
# We only do this check to display the correct answer.
if test -n "`$CXX -help 2>&1 | grep 'for x64'`"; then
ENABLE_64BIT_LIBS=yes
else
# unknown
ENABLE_64BIT_LIBS=no
fi
;;
*-*-aix*|powerpc64-*-linux*)
OLD_CFLAGS="${CFLAGS}"
OLD_CXXFLAGS="${CXXFLAGS}"
OLD_LDFLAGS="${LDFLAGS}"
CFLAGS="${CFLAGS} -q64"
CXXFLAGS="${CXXFLAGS} -q64"
LDFLAGS="${LDFLAGS} -q64"
AC_TRY_RUN(int main(void) {return 0;},
ENABLE_64BIT_LIBS=yes, ENABLE_64BIT_LIBS=no, ENABLE_64BIT_LIBS=no)
if test "$ENABLE_64BIT_LIBS" = no; then
CFLAGS="${OLD_CFLAGS}"
CXXFLAGS="${OLD_CXXFLAGS}"
LDFLAGS="${OLD_LDFLAGS}"
else
case "${host}" in
*-*-aix*)
ARFLAGS="${ARFLAGS} -X64"
esac
fi
;;
*-*-hpux*)
# First we try the newer +DD64, if that doesn't work,
# try other options.
OLD_CFLAGS="${CFLAGS}"
OLD_CXXFLAGS="${CXXFLAGS}"
CFLAGS="${CFLAGS} +DD64"
CXXFLAGS="${CXXFLAGS} +DD64"
AC_TRY_RUN(int main(void) {return 0;},
ENABLE_64BIT_LIBS=yes, ENABLE_64BIT_LIBS=no, ENABLE_64BIT_LIBS=no)
if test "$ENABLE_64BIT_LIBS" = no; then
CFLAGS="${OLD_CFLAGS}"
CXXFLAGS="${OLD_CXXFLAGS}"
CFLAGS="${CFLAGS} +DA2.0W"
CXXFLAGS="${CXXFLAGS} +DA2.0W"
AC_TRY_RUN(int main(void) {return 0;},
ENABLE_64BIT_LIBS=yes, ENABLE_64BIT_LIBS=no, ENABLE_64BIT_LIBS=no)
if test "$ENABLE_64BIT_LIBS" = no; then
AC_COMPILE_IFELSE(int main(void) {return (sizeof(void*)*8==64)?0:1;},
ENABLE_64BIT_LIBS=yes, ENABLE_64BIT_LIBS=no)
if test "$ENABLE_64BIT_LIBS" != yes; then
# Nope. back out changes.
CFLAGS="${OLD_CFLAGS}"
CXXFLAGS="${OLD_CXXFLAGS}"
# 2. try xarch=v9 [deprecated]
## TODO: cross compile: the following won't work.
SPARCV9=`isainfo -n 2>&1 | grep sparcv9`
SOL64=`$CXX -xarch=v9 2>&1 && $CC -xarch=v9 2>&1 | grep -v usage:`
# "Warning: -xarch=v9 is deprecated, use -m64 to create 64-bit programs"
if test -z "$SOL64" && test -n "$SPARCV9"; then
CFLAGS="${CFLAGS} -xtarget=ultra -xarch=v9"
CXXFLAGS="${CXXFLAGS} -xtarget=ultra -xarch=v9"
LDFLAGS="${LDFLAGS} -xtarget=ultra -xarch=v9"
ENABLE_64BIT_LIBS=yes
else
ENABLE_64BIT_LIBS=no
fi
fi
fi
;;
*-*ibm-openedition*|*-*-os390*)
;;
i386-*-solaris*)
# 0. save old flags
OLD_CFLAGS="${CFLAGS}"
OLD_CXXFLAGS="${CXXFLAGS}"
# 1. try -m64
CFLAGS="${CFLAGS} -m64"
CXXFLAGS="${CXXFLAGS} -m64"
AC_COMPILE_IFELSE(int main(void) {return (sizeof(void*)*8==64)?0:1;},
ENABLE_64BIT_LIBS=yes, ENABLE_64BIT_LIBS=no)
if test "$ENABLE_64BIT_LIBS" != yes; then
# Nope. back out changes.
CFLAGS="${OLD_CFLAGS}"
CXXFLAGS="${OLD_CXXFLAGS}"
# 2. try the older compiler option
## TODO: cross compile problem
SOL64=`$CXX -xtarget=generic64 2>&1 && $CC -xtarget=generic64 2>&1 | grep -v usage:`
if test -z "$SOL64" && test -n "$AMD64"; then
CFLAGS="${CFLAGS} -xtarget=generic64"
CXXFLAGS="${CXXFLAGS} -xtarget=generic64"
ENABLE_64BIT_LIBS=yes
else
ENABLE_64BIT_LIBS=no
fi
fi
;;
ia64-*-linux*)
# check for ecc/ecpc compiler support
## TODO: cross compiler problem
if test -n "`$CXX --help 2>&1 && $CC --help 2>&1 | grep -v Intel`"; then
if test -n "`$CXX --help 2>&1 && $CC --help 2>&1 | grep -v Itanium`"; then
ENABLE_64BIT_LIBS=yes
else
ENABLE_64BIT_LIBS=no
fi
else
# unknown
ENABLE_64BIT_LIBS=no
fi
;;
*-*-cygwin)
# vcvarsamd64.bat should have been used to enable 64-bit builds.
# We only do this check to display the correct answer.
## TODO: cross compiler problem
if test -n "`$CXX -help 2>&1 | grep 'for x64'`"; then
ENABLE_64BIT_LIBS=yes
else
# unknown
ENABLE_64BIT_LIBS=no
fi
;;
*-*-aix*|powerpc64-*-linux*)
OLD_CFLAGS="${CFLAGS}"
OLD_CXXFLAGS="${CXXFLAGS}"
OLD_LDFLAGS="${LDFLAGS}"
CFLAGS="${CFLAGS} -q64"
CXXFLAGS="${CXXFLAGS} -q64"
LDFLAGS="${LDFLAGS} -q64"
AC_COMPILE_IFELSE(int main(void) {return (sizeof(void*)*8==64)?0:1;},
ENABLE_64BIT_LIBS=yes, ENABLE_64BIT_LIBS=no)
if test "$ENABLE_64BIT_LIBS" != yes; then
CFLAGS="${OLD_CFLAGS}"
CXXFLAGS="${OLD_CXXFLAGS}"
LDFLAGS="${OLD_LDFLAGS}"
else
case "${host}" in
*-*-aix*)
ARFLAGS="${ARFLAGS} -X64"
esac
fi
;;
*-*-hpux*)
# First we try the newer +DD64, if that doesn't work,
# try other options.
OLD_CFLAGS="${CFLAGS}"
OLD_CXXFLAGS="${CXXFLAGS}"
CFLAGS="${CFLAGS} +DD64"
CXXFLAGS="${CXXFLAGS} +DD64"
AC_COMPILE_IFELSE(int main(void) {return (sizeof(void*)*8==64)?0:1;},
ENABLE_64BIT_LIBS=yes, ENABLE_64BIT_LIBS=no)
if test "$ENABLE_64BIT_LIBS" != yes; then
CFLAGS="${OLD_CFLAGS}"
CXXFLAGS="${OLD_CXXFLAGS}"
CFLAGS="${CFLAGS} +DA2.0W"
CXXFLAGS="${CXXFLAGS} +DA2.0W"
AC_COMPILE_IFELSE(int main(void) {return (sizeof(void*)*8==64)?0:1;},
ENABLE_64BIT_LIBS=yes, ENABLE_64BIT_LIBS=no)
if test "$ENABLE_64BIT_LIBS" != yes; then
CFLAGS="${OLD_CFLAGS}"
CXXFLAGS="${OLD_CXXFLAGS}"
fi
fi
;;
*-*ibm-openedition*|*-*-os390*)
OLD_CFLAGS="${CFLAGS}"
OLD_CXXFLAGS="${CXXFLAGS}"
OLD_LDFLAGS="${LDFLAGS}"
CFLAGS="${CFLAGS} -Wc,lp64"
CXXFLAGS="${CXXFLAGS} -Wc,lp64"
LDFLAGS="${LDFLAGS} -Wl,lp64"
AC_COMPILE_IFELSE(int main(void) {return (sizeof(void*)*8==64)?0:1;},
ENABLE_64BIT_LIBS=yes, ENABLE_64BIT_LIBS=no)
if test "$ENABLE_64BIT_LIBS" != yes; then
CFLAGS="${OLD_CFLAGS}"
CXXFLAGS="${OLD_CXXFLAGS}"
LDFLAGS="${OLD_LDFLAGS}"
fi
;;
*)
ENABLE_64BIT_LIBS=no
;;
esac
fi
AC_MSG_RESULT($ENABLE_64BIT_LIBS)
elif test "$BITS_REQ" = "32"; then
AC_MSG_CHECKING([how to build 32-bit executables])
if test "$GCC" = yes; then
OLD_CFLAGS="${CFLAGS}"
OLD_CXXFLAGS="${CXXFLAGS}"
OLD_LDFLAGS="${LDFLAGS}"
CFLAGS="${CFLAGS} -Wc,lp64"
CXXFLAGS="${CXXFLAGS} -Wc,lp64"
LDFLAGS="${LDFLAGS} -Wl,lp64"
AC_TRY_RUN(int main(void) {return 0;},
ENABLE_64BIT_LIBS=yes, ENABLE_64BIT_LIBS=no, ENABLE_64BIT_LIBS=no)
if test "$ENABLE_64BIT_LIBS" = no; then
CFLAGS="${CFLAGS} -m32"
CXXFLAGS="${CXXFLAGS} -m32"
AC_COMPILE_IFELSE(int main(void) {return (sizeof(void*)*8==32)?0:1;},
ENABLE_64BIT_LIBS=no, ENABLE_64BIT_LIBS=yes)
if test "$ENABLE_64BIT_LIBS" != no; then
CFLAGS="${OLD_CFLAGS}"
CXXFLAGS="${OLD_CXXFLAGS}"
LDFLAGS="${OLD_LDFLAGS}"
fi
;;
*)
ENABLE_64BIT_LIBS=no
;;
esac
fi
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)
else
echo " Note: not sure how to build 32 bit executables on this platform."
fi
# 'How to build 32 bit...' will be opposite of 64 bit
if test "$ENABLE_64BIT_LIBS" = yes; then
CFLAGS="${OLD_CFLAGS}"
CXXFLAGS="${OLD_CXXFLAGS}"
AC_MSG_RESULT(no)
else
if test "$ENABLE_64BIT_LIBS" = no; then
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(unknown)
fi
fi
fi
# Individual tests that fail should reset their own flags.
NOW_64BIT=no
NOW_32BIT=no
AC_MSG_CHECKING([whether runnable 64-bit binaries are being built ])
AC_TRY_RUN(int main(void) {return (sizeof(void*)*8==64)?0:1;},
NOW_64BIT=yes, NOW_64BIT=no, NOW_64BIT=unknown)
AC_MSG_RESULT($NOW_64BIT);
AC_MSG_CHECKING([whether runnable 32-bit binaries are being built ])
AC_TRY_RUN(int main(void) {return (sizeof(void*)*8==32)?0:1;},
NOW_32BIT=yes, NOW_32BIT=no, NOW_32BIT=unknown)
AC_MSG_RESULT($NOW_32BIT);
if test "$BITS_REQ" = "32" -a "$NOW_64BIT" = "yes"; then
AC_MSG_ERROR([Requested $BITS_REQ but got 64 bit binaries])
elif test "$BITS_REQ" = "64" -a "$NOW_32BIT" = "yes"; then
AC_MSG_ERROR([Requested $BITS_REQ but got 32 bit binaries])
elif test "$NOW_32BIT" != "yes" -a "$NOW_64BIT" != "yes"; then
echo "*** Note: Cannot determine bitness - if configure fails later, try --with-library-bits=nochange"
fi
fi
# Individual tests that fail should reset their own flags.
AC_MSG_RESULT($ENABLE_64BIT_LIBS)
])
# Strict compilation options.

873
icu4c/source/configure vendored
View File

@ -777,6 +777,7 @@ ac_user_opts='
enable_option_checking
enable_strict
enable_64bit_libs
with_library_bits
enable_shared
enable_static
enable_debug
@ -1432,7 +1433,7 @@ Optional Features:
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
--enable-strict compile with strict compiler options default=yes
--enable-64bit-libs build 64-bit libraries default=yes
--enable-64bit-libs (deprecated, use --with-library-bits) build 64-bit libraries default= platform default
--enable-shared build shared libraries default=yes
--enable-static build static libraries default=no
--enable-debug build debug libraries default=no
@ -1455,6 +1456,7 @@ If set, it will REPLACE any automatic list of libraries.
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
--with-library-bits=bits specify how many bits to use for the library (32, 64, 64else32, nochange) default=nochange
--with-iostream=version specify the version of iostream to use (none, old, std, auto) default=auto
--with-data-packaging=type specify how to package ICU data (files, archive, library, auto) default=auto
--with-library-suffix=suffix tag a suffix to the library names default=
@ -3662,399 +3664,537 @@ $as_echo "$ac_use_strict_options" >&6; }
# Check if we can build and use 64-bit libraries
BITS_REQ=nochange
ENABLE_64BIT_LIBS=unknown
## revisit this for cross-compile.
# Check whether --enable-64bit-libs was given.
if test "${enable_64bit_libs+set}" = set; then
enableval=$enable_64bit_libs; ENABLE_64BIT_LIBS=${enableval}
else
ENABLE_64BIT_LIBS=yes
enableval=$enable_64bit_libs; echo "note, use --with-library-bits instead of --*-64bit-libs"
case "${withval}" in
no|false|32) BITS_REQ=32 ;;
yes|true|64) BITS_REQ=64 ;;
nochange) BITS_REQ=nochange ;;
*) { { $as_echo "$as_me:$LINENO: error: bad value ${withval} for --with-library-bits" >&5
$as_echo "$as_me: error: bad value ${withval} for --with-library-bits" >&2;}
{ (exit 1); exit 1; }; } ;;
esac
fi
# These results can't be cached because is sets compiler flags.
{ $as_echo "$as_me:$LINENO: checking for 64-bit executable support" >&5
$as_echo_n "checking for 64-bit executable support... " >&6; }
if test "$ENABLE_64BIT_LIBS" != no; then
if test "$GCC" = yes; then
# First we check that gcc already compiles as 64-bit
if test -n "`$CXX -dumpspecs 2>&1 && $CC -dumpspecs 2>&1 | grep -v __LP64__`"; then
ENABLE_64BIT_LIBS=yes
else
# Now we check a little more forcefully.
# Maybe the compiler builds as 32-bit on a 64-bit machine.
# Check whether --with-library-bits was given.
if test "${with_library_bits+set}" = set; then
withval=$with_library_bits; case "${withval}" in
nochange) BITS_REQ=$withval ;;
32|64|64else32) BITS_REQ=$withval ;;
*) { { $as_echo "$as_me:$LINENO: error: bad value ${withval} for --with-library-bits" >&5
$as_echo "$as_me: error: bad value ${withval} for --with-library-bits" >&2;}
{ (exit 1); exit 1; }; } ;;
esac
fi
DEFAULT_64BIT=no
{ $as_echo "$as_me:$LINENO: checking whether 64 bit binaries are built by default" >&5
$as_echo_n "checking whether 64 bit binaries are built by default... " >&6; }
if test "$cross_compiling" = yes; then
DEFAULT_64BIT=unknown
else
cat >conftest.$ac_ext <<_ACEOF
int main(void) {return (sizeof(void*)*8==64)?0:1;}
_ACEOF
rm -f conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
(eval "$ac_link") 2>&5
ac_status=$?
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
{ (case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
(eval "$ac_try") 2>&5
ac_status=$?
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
DEFAULT_64BIT=yes
else
$as_echo "$as_me: program exited with status $ac_status" >&5
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
( exit $ac_status )
DEFAULT_64BIT=no
fi
rm -rf conftest.dSYM
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
BITS_GOT=unknown
BITS_OK=yes
if test "$DEFAULT_64BIT" = "yes"; then
BITS_GOT=64
case "$BITS_REQ" in
32) BITS_OK=no;;
nochange) ;;
*) ;;
esac
elif test "$DEFAULT_64BIT" = "no"; then
BITS_GOT=32
case "$BITS_REQ" in
64|64else32) BITS_OK=no;;
nochange) ;;
*) ;;
esac
elif test "$DEFAULT_64BIT" = "unknown"; then
BITS_GOT=unknown
case "$BITS_REQ" in
64|64else32) BITS_OK=no;;
32) BITS_OK=no;;
nochange) ;;
*) ;;
esac
fi
{ $as_echo "$as_me:$LINENO: result: $DEFAULT_64BIT" >&5
$as_echo "$DEFAULT_64BIT" >&6; };
#AC_MSG_RESULT($DEFAULT_64BIT - got $BITS_GOT wanted $BITS_REQ okness $BITS_OK);
if test "$BITS_OK" != "yes"; then
# These results can't be cached because is sets compiler flags.
if test "$BITS_REQ" = "64" -o "$BITS_REQ" = "64else32"; then
{ $as_echo "$as_me:$LINENO: checking how to build 64-bit executables" >&5
$as_echo_n "checking how to build 64-bit executables... " >&6; }
if test "$GCC" = yes; then
#DONOTUSE# This test is wrong. If it's GCC, just test m64
#DONOTUSE#if test -n "`$CXX -dumpspecs 2>&1 && $CC -dumpspecs 2>&1 | grep -v __LP64__`"; then
OLD_CFLAGS="${CFLAGS}"
OLD_CXXFLAGS="${CXXFLAGS}"
CFLAGS="${CFLAGS} -m64"
CXXFLAGS="${CXXFLAGS} -m64"
if test "$cross_compiling" = yes; then
ENABLE_64BIT_LIBS=no
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
cat >conftest.$ac_ext <<_ACEOF
int main(void) {return (sizeof(void*)*8==64)?0:1;}
_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 { (ac_try="$ac_link"
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
(eval "$ac_link") 2>&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
{ (case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
(eval "$ac_try") 2>&5
ac_status=$?
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
ENABLE_64BIT_LIBS=yes
else
$as_echo "$as_me: program exited with status $ac_status" >&5
$as_echo "$as_me: failed program was:" >&5
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
( exit $ac_status )
ENABLE_64BIT_LIBS=no
fi
rm -rf conftest.dSYM
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ENABLE_64BIT_LIBS=no
fi
if test "$ENABLE_64BIT_LIBS" = no; then
# Nope. We're on a 32-bit machine with a 32-bit compiler.
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
if test "$ENABLE_64BIT_LIBS" != yes; then
# Nope. back out changes.
CFLAGS="${OLD_CFLAGS}"
CXXFLAGS="${OLD_CXXFLAGS}"
fi
fi
else
case "${host}" in
sparc*-*-solaris*)
SPARCV9=`isainfo -n 2>&1 | grep sparcv9`
# "Warning: -xarch=v9 is deprecated, use -m64 to create 64-bit programs"
SOL64=`$CXX -xarch=v9 2>&1 && $CC -xarch=v9 2>&1 | grep -v usage:`
if test -z "$SOL64" && test -n "$SPARCV9"; then
CFLAGS="${CFLAGS} -xtarget=ultra -xarch=v9"
CXXFLAGS="${CXXFLAGS} -xtarget=ultra -xarch=v9"
LDFLAGS="${LDFLAGS} -xtarget=ultra -xarch=v9"
ENABLE_64BIT_LIBS=yes
else
SOL64=`$CXX -m64 2>&1 && $CC -m64 2>&1 | grep -v usage:`
if test -z "$SOL64" && test -n "$SPARCV9"; then
CFLAGS="${CFLAGS} -m64 "
CXXFLAGS="${CXXFLAGS} -m64 "
LDFLAGS="${LDFLAGS} -m64 "
ENABLE_64BIT_LIBS=yes
else
ENABLE_64BIT_LIBS=no
fi
fi
;;
i386-*-solaris*)
AMD64=`isainfo -n 2>&1 | grep amd64`
# The new compiler option
SOL64=`$CXX -m64 2>&1 && $CC -m64 2>&1 | grep -v usage:`
if test -z "$SOL64" && test -n "$AMD64"; then
else
case "${host}" in
sparc*-*-solaris*)
# 0. save old flags
OLD_CFLAGS="${CFLAGS}"
OLD_CXXFLAGS="${CXXFLAGS}"
# 1. try -m64
CFLAGS="${CFLAGS} -m64"
CXXFLAGS="${CXXFLAGS} -m64"
ENABLE_64BIT_LIBS=yes
else
# The older compiler option
SOL64=`$CXX -xtarget=generic64 2>&1 && $CC -xtarget=generic64 2>&1 | grep -v usage:`
if test -z "$SOL64" && test -n "$AMD64"; then
CFLAGS="${CFLAGS} -xtarget=generic64"
CXXFLAGS="${CXXFLAGS} -xtarget=generic64"
ENABLE_64BIT_LIBS=yes
else
ENABLE_64BIT_LIBS=no
fi
fi
;;
ia64-*-linux*)
# check for ecc/ecpc compiler support
if test -n "`$CXX --help 2>&1 && $CC --help 2>&1 | grep -v Intel`"; then
if test -n "`$CXX --help 2>&1 && $CC --help 2>&1 | grep -v Itanium`"; then
ENABLE_64BIT_LIBS=yes
else
ENABLE_64BIT_LIBS=no
fi
else
# unknown
ENABLE_64BIT_LIBS=no
fi
;;
*-*-cygwin)
# vcvarsamd64.bat should have been used to enable 64-bit builds.
# We only do this check to display the correct answer.
if test -n "`$CXX -help 2>&1 | grep 'for x64'`"; then
ENABLE_64BIT_LIBS=yes
else
# unknown
ENABLE_64BIT_LIBS=no
fi
;;
*-*-aix*|powerpc64-*-linux*)
OLD_CFLAGS="${CFLAGS}"
OLD_CXXFLAGS="${CXXFLAGS}"
OLD_LDFLAGS="${LDFLAGS}"
CFLAGS="${CFLAGS} -q64"
CXXFLAGS="${CXXFLAGS} -q64"
LDFLAGS="${LDFLAGS} -q64"
if test "$cross_compiling" = yes; then
ENABLE_64BIT_LIBS=no
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
cat >conftest.$ac_ext <<_ACEOF
int main(void) {return (sizeof(void*)*8==64)?0:1;}
_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 { (ac_try="$ac_link"
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
(eval "$ac_link") 2>&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
{ (case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
(eval "$ac_try") 2>&5
ac_status=$?
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
ENABLE_64BIT_LIBS=yes
else
$as_echo "$as_me: program exited with status $ac_status" >&5
$as_echo "$as_me: failed program was:" >&5
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
( exit $ac_status )
ENABLE_64BIT_LIBS=no
fi
rm -rf conftest.dSYM
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ENABLE_64BIT_LIBS=no
fi
if test "$ENABLE_64BIT_LIBS" = no; then
CFLAGS="${OLD_CFLAGS}"
CXXFLAGS="${OLD_CXXFLAGS}"
LDFLAGS="${OLD_LDFLAGS}"
else
case "${host}" in
*-*-aix*)
ARFLAGS="${ARFLAGS} -X64"
esac
fi
;;
*-*-hpux*)
# First we try the newer +DD64, if that doesn't work,
# try other options.
OLD_CFLAGS="${CFLAGS}"
OLD_CXXFLAGS="${CXXFLAGS}"
CFLAGS="${CFLAGS} +DD64"
CXXFLAGS="${CXXFLAGS} +DD64"
if test "$cross_compiling" = yes; then
ENABLE_64BIT_LIBS=no
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 { (ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
(eval "$ac_link") 2>&5
ac_status=$?
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
{ (case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
(eval "$ac_try") 2>&5
ac_status=$?
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ENABLE_64BIT_LIBS=yes
else
$as_echo "$as_me: program exited with status $ac_status" >&5
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
( exit $ac_status )
ENABLE_64BIT_LIBS=no
fi
rm -rf conftest.dSYM
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
if test "$ENABLE_64BIT_LIBS" = no; then
CFLAGS="${OLD_CFLAGS}"
CXXFLAGS="${OLD_CXXFLAGS}"
CFLAGS="${CFLAGS} +DA2.0W"
CXXFLAGS="${CXXFLAGS} +DA2.0W"
if test "$cross_compiling" = yes; then
ENABLE_64BIT_LIBS=no
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 { (ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
(eval "$ac_link") 2>&5
ac_status=$?
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
{ (case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
(eval "$ac_try") 2>&5
ac_status=$?
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ENABLE_64BIT_LIBS=yes
else
$as_echo "$as_me: program exited with status $ac_status" >&5
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
( exit $ac_status )
ENABLE_64BIT_LIBS=no
fi
rm -rf conftest.dSYM
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
if test "$ENABLE_64BIT_LIBS" = no; then
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
if test "$ENABLE_64BIT_LIBS" != yes; then
# Nope. back out changes.
CFLAGS="${OLD_CFLAGS}"
CXXFLAGS="${OLD_CXXFLAGS}"
# 2. try xarch=v9 [deprecated]
## TODO: cross compile: the following won't work.
SPARCV9=`isainfo -n 2>&1 | grep sparcv9`
SOL64=`$CXX -xarch=v9 2>&1 && $CC -xarch=v9 2>&1 | grep -v usage:`
# "Warning: -xarch=v9 is deprecated, use -m64 to create 64-bit programs"
if test -z "$SOL64" && test -n "$SPARCV9"; then
CFLAGS="${CFLAGS} -xtarget=ultra -xarch=v9"
CXXFLAGS="${CXXFLAGS} -xtarget=ultra -xarch=v9"
LDFLAGS="${LDFLAGS} -xtarget=ultra -xarch=v9"
ENABLE_64BIT_LIBS=yes
else
ENABLE_64BIT_LIBS=no
fi
fi
fi
;;
*-*ibm-openedition*|*-*-os390*)
;;
i386-*-solaris*)
# 0. save old flags
OLD_CFLAGS="${CFLAGS}"
OLD_CXXFLAGS="${CXXFLAGS}"
# 1. try -m64
CFLAGS="${CFLAGS} -m64"
CXXFLAGS="${CXXFLAGS} -m64"
cat >conftest.$ac_ext <<_ACEOF
int main(void) {return (sizeof(void*)*8==64)?0:1;}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
ENABLE_64BIT_LIBS=yes
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ENABLE_64BIT_LIBS=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
if test "$ENABLE_64BIT_LIBS" != yes; then
# Nope. back out changes.
CFLAGS="${OLD_CFLAGS}"
CXXFLAGS="${OLD_CXXFLAGS}"
# 2. try the older compiler option
## TODO: cross compile problem
SOL64=`$CXX -xtarget=generic64 2>&1 && $CC -xtarget=generic64 2>&1 | grep -v usage:`
if test -z "$SOL64" && test -n "$AMD64"; then
CFLAGS="${CFLAGS} -xtarget=generic64"
CXXFLAGS="${CXXFLAGS} -xtarget=generic64"
ENABLE_64BIT_LIBS=yes
else
ENABLE_64BIT_LIBS=no
fi
fi
;;
ia64-*-linux*)
# check for ecc/ecpc compiler support
## TODO: cross compiler problem
if test -n "`$CXX --help 2>&1 && $CC --help 2>&1 | grep -v Intel`"; then
if test -n "`$CXX --help 2>&1 && $CC --help 2>&1 | grep -v Itanium`"; then
ENABLE_64BIT_LIBS=yes
else
ENABLE_64BIT_LIBS=no
fi
else
# unknown
ENABLE_64BIT_LIBS=no
fi
;;
*-*-cygwin)
# vcvarsamd64.bat should have been used to enable 64-bit builds.
# We only do this check to display the correct answer.
## TODO: cross compiler problem
if test -n "`$CXX -help 2>&1 | grep 'for x64'`"; then
ENABLE_64BIT_LIBS=yes
else
# unknown
ENABLE_64BIT_LIBS=no
fi
;;
*-*-aix*|powerpc64-*-linux*)
OLD_CFLAGS="${CFLAGS}"
OLD_CXXFLAGS="${CXXFLAGS}"
OLD_LDFLAGS="${LDFLAGS}"
CFLAGS="${CFLAGS} -q64"
CXXFLAGS="${CXXFLAGS} -q64"
LDFLAGS="${LDFLAGS} -q64"
cat >conftest.$ac_ext <<_ACEOF
int main(void) {return (sizeof(void*)*8==64)?0:1;}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
ENABLE_64BIT_LIBS=yes
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ENABLE_64BIT_LIBS=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
if test "$ENABLE_64BIT_LIBS" != yes; then
CFLAGS="${OLD_CFLAGS}"
CXXFLAGS="${OLD_CXXFLAGS}"
LDFLAGS="${OLD_LDFLAGS}"
else
case "${host}" in
*-*-aix*)
ARFLAGS="${ARFLAGS} -X64"
esac
fi
;;
*-*-hpux*)
# First we try the newer +DD64, if that doesn't work,
# try other options.
OLD_CFLAGS="${CFLAGS}"
OLD_CXXFLAGS="${CXXFLAGS}"
CFLAGS="${CFLAGS} +DD64"
CXXFLAGS="${CXXFLAGS} +DD64"
cat >conftest.$ac_ext <<_ACEOF
int main(void) {return (sizeof(void*)*8==64)?0:1;}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
ENABLE_64BIT_LIBS=yes
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ENABLE_64BIT_LIBS=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
if test "$ENABLE_64BIT_LIBS" != yes; then
CFLAGS="${OLD_CFLAGS}"
CXXFLAGS="${OLD_CXXFLAGS}"
CFLAGS="${CFLAGS} +DA2.0W"
CXXFLAGS="${CXXFLAGS} +DA2.0W"
cat >conftest.$ac_ext <<_ACEOF
int main(void) {return (sizeof(void*)*8==64)?0:1;}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
ENABLE_64BIT_LIBS=yes
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ENABLE_64BIT_LIBS=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
if test "$ENABLE_64BIT_LIBS" != yes; then
CFLAGS="${OLD_CFLAGS}"
CXXFLAGS="${OLD_CXXFLAGS}"
fi
fi
;;
*-*ibm-openedition*|*-*-os390*)
OLD_CFLAGS="${CFLAGS}"
OLD_CXXFLAGS="${CXXFLAGS}"
OLD_LDFLAGS="${LDFLAGS}"
CFLAGS="${CFLAGS} -Wc,lp64"
CXXFLAGS="${CXXFLAGS} -Wc,lp64"
LDFLAGS="${LDFLAGS} -Wl,lp64"
cat >conftest.$ac_ext <<_ACEOF
int main(void) {return (sizeof(void*)*8==64)?0:1;}
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
ENABLE_64BIT_LIBS=yes
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ENABLE_64BIT_LIBS=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
if test "$ENABLE_64BIT_LIBS" != yes; then
CFLAGS="${OLD_CFLAGS}"
CXXFLAGS="${OLD_CXXFLAGS}"
LDFLAGS="${OLD_LDFLAGS}"
fi
;;
*)
ENABLE_64BIT_LIBS=no
;;
esac
fi
{ $as_echo "$as_me:$LINENO: result: $ENABLE_64BIT_LIBS" >&5
$as_echo "$ENABLE_64BIT_LIBS" >&6; }
elif test "$BITS_REQ" = "32"; then
{ $as_echo "$as_me:$LINENO: checking how to build 32-bit executables" >&5
$as_echo_n "checking how to build 32-bit executables... " >&6; }
if test "$GCC" = yes; then
OLD_CFLAGS="${CFLAGS}"
OLD_CXXFLAGS="${CXXFLAGS}"
OLD_LDFLAGS="${LDFLAGS}"
CFLAGS="${CFLAGS} -Wc,lp64"
CXXFLAGS="${CXXFLAGS} -Wc,lp64"
LDFLAGS="${LDFLAGS} -Wl,lp64"
if test "$cross_compiling" = yes; then
ENABLE_64BIT_LIBS=no
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
CFLAGS="${CFLAGS} -m32"
CXXFLAGS="${CXXFLAGS} -m32"
cat >conftest.$ac_ext <<_ACEOF
int main(void) {return (sizeof(void*)*8==32)?0:1;}
_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 { (ac_try="$ac_link"
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
(eval "$ac_link") 2>&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
{ (case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
(eval "$ac_try") 2>&5
ac_status=$?
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ENABLE_64BIT_LIBS=yes
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
ENABLE_64BIT_LIBS=no
else
$as_echo "$as_me: program exited with status $ac_status" >&5
$as_echo "$as_me: failed program was:" >&5
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
( exit $ac_status )
ENABLE_64BIT_LIBS=no
fi
rm -rf conftest.dSYM
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
ENABLE_64BIT_LIBS=yes
fi
if test "$ENABLE_64BIT_LIBS" = no; then
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
if test "$ENABLE_64BIT_LIBS" != no; then
CFLAGS="${OLD_CFLAGS}"
CXXFLAGS="${OLD_CXXFLAGS}"
LDFLAGS="${OLD_LDFLAGS}"
fi
;;
*)
ENABLE_64BIT_LIBS=no
;;
esac
else
echo " Note: not sure how to build 32 bit executables on this platform."
fi
# 'How to build 32 bit...' will be opposite of 64 bit
if test "$ENABLE_64BIT_LIBS" = yes; then
{ $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
else
if test "$ENABLE_64BIT_LIBS" = no; then
{ $as_echo "$as_me:$LINENO: result: yes" >&5
$as_echo "yes" >&6; }
else
{ $as_echo "$as_me:$LINENO: result: unknown" >&5
$as_echo "unknown" >&6; }
fi
fi
fi
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
# Individual tests that fail should reset their own flags.
NOW_64BIT=no
NOW_32BIT=no
{ $as_echo "$as_me:$LINENO: checking whether runnable 64-bit binaries are being built " >&5
$as_echo_n "checking whether runnable 64-bit binaries are being built ... " >&6; }
if test "$cross_compiling" = yes; then
NOW_64BIT=unknown
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
@ -4062,7 +4202,7 @@ _ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
int main(void) {return 0;}
int main(void) {return (sizeof(void*)*8==64)?0:1;}
_ACEOF
rm -f conftest$ac_exeext
if { (ac_try="$ac_link"
@ -4086,29 +4226,86 @@ $as_echo "$ac_try_echo") >&5
ac_status=$?
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ENABLE_64BIT_LIBS=no
NOW_64BIT=yes
else
$as_echo "$as_me: program exited with status $ac_status" >&5
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
( exit $ac_status )
ENABLE_64BIT_LIBS=yes
NOW_64BIT=no
fi
rm -rf conftest.dSYM
rm -f core *.core core.conftest.* 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
{ $as_echo "$as_me:$LINENO: result: $NOW_64BIT" >&5
$as_echo "$NOW_64BIT" >&6; };
{ $as_echo "$as_me:$LINENO: checking whether runnable 32-bit binaries are being built " >&5
$as_echo_n "checking whether runnable 32-bit binaries are being built ... " >&6; }
if test "$cross_compiling" = yes; then
NOW_32BIT=unknown
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 (sizeof(void*)*8==32)?0:1;}
_ACEOF
rm -f conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
(eval "$ac_link") 2>&5
ac_status=$?
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && { ac_try='./conftest$ac_exeext'
{ (case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
(eval "$ac_try") 2>&5
ac_status=$?
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
NOW_32BIT=yes
else
$as_echo "$as_me: program exited with status $ac_status" >&5
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
( exit $ac_status )
NOW_32BIT=no
fi
rm -rf conftest.dSYM
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
{ $as_echo "$as_me:$LINENO: result: $NOW_32BIT" >&5
$as_echo "$NOW_32BIT" >&6; };
if test "$BITS_REQ" = "32" -a "$NOW_64BIT" = "yes"; then
{ { $as_echo "$as_me:$LINENO: error: Requested $BITS_REQ but got 64 bit binaries" >&5
$as_echo "$as_me: error: Requested $BITS_REQ but got 64 bit binaries" >&2;}
{ (exit 1); exit 1; }; }
elif test "$BITS_REQ" = "64" -a "$NOW_32BIT" = "yes"; then
{ { $as_echo "$as_me:$LINENO: error: Requested $BITS_REQ but got 32 bit binaries" >&5
$as_echo "$as_me: error: Requested $BITS_REQ but got 32 bit binaries" >&2;}
{ (exit 1); exit 1; }; }
elif test "$NOW_32BIT" != "yes" -a "$NOW_64BIT" != "yes"; then
echo "*** Note: Cannot determine bitness - if configure fails later, try --with-library-bits=nochange"
fi
fi
# Individual tests that fail should reset their own flags.
{ $as_echo "$as_me:$LINENO: result: $ENABLE_64BIT_LIBS" >&5
$as_echo "$ENABLE_64BIT_LIBS" >&6; }

View File

@ -241,3 +241,5 @@ ifneq ($(ENABLE_SHARED),YES)
LINK.c = $(LINK.cc)
endif
# optional include at top
-include $(top_builddir)/icudefs.local