ICU-9217 fix configure for static library optimization

X-SVN-Rev: 31653
This commit is contained in:
Steven R. Loomis 2012-03-21 17:14:27 +00:00
parent e88e050aa2
commit 15cb25c42d
2 changed files with 14 additions and 3 deletions

View File

@ -5266,13 +5266,24 @@ $as_echo_n "checking whether we can use static library optimization option... "
;; ;;
esac esac
if ac_fn_c_try_link "$LINENO"; then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
main ()
{
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
CHECK_STATIC_OPT_FLAG=yes CHECK_STATIC_OPT_FLAG=yes
else else
CHECK_STATIC_OPT_FLAG=no CHECK_STATIC_OPT_FLAG=no
fi fi
rm -f core conftest.err conftest.$ac_objext \ rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest$ac_exeext conftest.$ac_ext
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_STATIC_OPT_FLAG" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_STATIC_OPT_FLAG" >&5
$as_echo "$CHECK_STATIC_OPT_FLAG" >&6; } $as_echo "$CHECK_STATIC_OPT_FLAG" >&6; }
if test "$CHECK_STATIC_OPT_FLAG" = no; then if test "$CHECK_STATIC_OPT_FLAG" = no; then

View File

@ -285,7 +285,7 @@ if test "$ENABLE_STATIC" = "YES"; then
;; ;;
esac esac
AC_LINK_IFELSE(AC_LANG_SOURCE, CHECK_STATIC_OPT_FLAG=yes, CHECK_STATIC_OPT_FLAG=no, ) AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])], [CHECK_STATIC_OPT_FLAG=yes], [CHECK_STATIC_OPT_FLAG=no])
AC_MSG_RESULT($CHECK_STATIC_OPT_FLAG) AC_MSG_RESULT($CHECK_STATIC_OPT_FLAG)
if test "$CHECK_STATIC_OPT_FLAG" = no; then if test "$CHECK_STATIC_OPT_FLAG" = no; then
CPPFLAGS="${OLD_CPPFLAGS}" CPPFLAGS="${OLD_CPPFLAGS}"