Compile the check for ICONV_CONST as C++

On OpenIndiana (SunOS) the result is different when compiled as C,
and the C++ result is what matters to wxWidgets.

Fixes compilation of src/common/strconv.cpp on OpenIndiana.
This commit is contained in:
Lauri Nurmi
2017-04-06 14:07:43 +03:00
parent 0ac0f4b259
commit aa5af25870
2 changed files with 17 additions and 3 deletions

18
configure vendored
View File

@@ -28118,6 +28118,12 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
if test "$TOOLKIT" != "MSW"; then
if test "$wxUSE_LIBICONV" != "no" ; then
ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
@@ -28154,7 +28160,7 @@ iconv_t cd = iconv_open("","");
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
if ac_fn_cxx_try_link "$LINENO"; then :
am_cv_func_iconv=yes
fi
rm -f core conftest.err conftest.$ac_objext \
@@ -28176,7 +28182,7 @@ iconv_t cd = iconv_open("","");
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
if ac_fn_cxx_try_link "$LINENO"; then :
am_cv_lib_iconv=yes
am_cv_func_iconv=yes
fi
@@ -28220,7 +28226,7 @@ main ()
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
if ac_fn_cxx_try_compile "$LINENO"; then :
wx_cv_func_iconv_const="no"
else
wx_cv_func_iconv_const="yes"
@@ -28249,6 +28255,12 @@ _ACEOF
fi
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
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
LIBS="$LIBICONV $LIBS"
fi

View File

@@ -4117,7 +4117,9 @@ if test "$TOOLKIT" != "MSW"; then
dnl check for available version of iconv()
if test "$wxUSE_LIBICONV" != "no" ; then
AC_LANG_PUSH(C++)
AM_ICONV
AC_LANG_POP()
LIBS="$LIBICONV $LIBS"
fi