use C++ compiler for all getsockopt() tests, not just one of them to fix compilation under HP-UX (patch 1693708)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45298 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2007-04-07 13:18:56 +00:00
parent d87887c1b7
commit 6daba577e9

View File

@ -6295,6 +6295,12 @@ if test "$wxUSE_SOCKETS" = "yes" ; then
AC_CACHE_CHECK([what is the type of the fifth argument of getsockopt],
wx_cv_type_getsockopt5,
[
dnl Note that the rules for compatibility of pointers
dnl are somewhat different between C and C++, so code
dnl that fails in C++ may not even give a warning about
dnl converting between incompatible pointer types in C.
dnl So this test needs to be done in C++ mode.
AC_LANG_PUSH(C++)
AC_TRY_COMPILE(
[
#include <sys/types.h>
@ -6306,12 +6312,6 @@ if test "$wxUSE_SOCKETS" = "yes" ; then
],
wx_cv_type_getsockopt5=socklen_t,
[
dnl Note that the rules for compatibility of pointers
dnl are somewhat different between C and C++, so code
dnl that fails in C++ may not even give a warning about
dnl converting between incompatible pointer types in C.
dnl So this test needs to be done in C++ mode.
AC_LANG_PUSH(C++)
AC_TRY_COMPILE(
[
#include <sys/types.h>
@ -6335,9 +6335,9 @@ if test "$wxUSE_SOCKETS" = "yes" ; then
wx_cv_type_getsockopt5=unknown
)
)
AC_LANG_POP()
]
)
AC_LANG_POP()
])
if test "$wx_cv_type_getsockopt5" = "unknown"; then