use -Woverloaded-virtual if g++ supports it

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56751 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2008-11-12 15:58:56 +00:00
parent 53263fdff9
commit 411484436d
4 changed files with 361 additions and 33 deletions

168
configure vendored
View File

@@ -1,5 +1,5 @@
#! /bin/sh
# From configure.in Id: configure.in 56671 2008-11-03 21:55:03Z VZ .
# From configure.in Id: configure.in 56747 2008-11-12 15:31:44Z VZ .
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.61 for wxWidgets 2.9.0.
#
@@ -2646,7 +2646,6 @@ DEFAULT_DEFAULT_wxUSE_X11=0
DEFAULT_DEFAULT_wxUSE_DFB=0
PROGRAM_EXT=
SO_SUFFIX=so
SAMPLES_RPATH_FLAG=
SAMPLES_RPATH_POSTLINK=
@@ -2657,7 +2656,6 @@ case "${host}" in
USE_HPUX=1
DEFAULT_DEFAULT_wxUSE_MOTIF=1
NEEDS_D_REENTRANT_FOR_R_FUNCS=1
SO_SUFFIX=sl
cat >>confdefs.h <<\_ACEOF
#define __HPUX__ 1
_ACEOF
@@ -2829,7 +2827,6 @@ _ACEOF
USE_AIX=1
USE_SYSV=1
USE_SVR4=1
SO_SUFFIX=a
cat >>confdefs.h <<\_ACEOF
#define __AIX__ 1
_ACEOF
@@ -2856,8 +2853,7 @@ _ACEOF
;;
*-*-cygwin* | *-*-mingw32* )
SO_SUFFIX=dll
PROGRAM_EXT=".exe"
PROGRAM_EXT=".exe"
DEFAULT_DEFAULT_wxUSE_MSW=1
;;
@@ -2907,7 +2903,6 @@ _ACEOF
*-*-darwin* )
USE_BSD=1
USE_DARWIN=1
SO_SUFFIX=dylib
cat >>confdefs.h <<\_ACEOF
#define __BSD__ 1
_ACEOF
@@ -2926,7 +2921,6 @@ _ACEOF
powerpc-apple-macos* )
USE_UNIX=0
ac_cv_c_bigendian=yes
SO_SUFFIX=shlib
DEFAULT_DEFAULT_wxUSE_OSX_CARBON=1
DEFAULT_STD_FLAG=no
;;
@@ -23274,6 +23268,8 @@ _ACEOF
fi
fi
LARGEFILE_CPPFLAGS=
# Check whether --enable-largefile was given.
if test "${enable_largefile+set}" = set; then
enableval=$enable_largefile;
@@ -23428,25 +23424,29 @@ _ACEOF
echo "${ECHO_T}$wx_largefile" >&6; }
fi
if test "$ac_cv_sys_file_offset_bits" = "64"; then
LARGEFILE_CPPFLAGS="-D_FILE_OFFSET_BITS=64"
elif test "$ac_cv_sys_large_files" = 1; then
LARGEFILE_CPPFLAGS="-D_LARGE_FILES"
fi
if test "x$wx_largefile" = "xyes"; then
if test "x$ac_cv_sys_file_offset_bits" = "x64"; then
WXCONFIG_CPPFLAGS="$WXCONFIG_CPPFLAGS -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES"
if test -n "$LARGEFILE_CPPFLAGS"; then
WXCONFIG_CPPFLAGS="$WXCONFIG_CPPFLAGS $LARGEFILE_CPPFLAGS"
if test "$USE_HPUX" = 1 -a "$GXX" = "yes"; then
{ echo "$as_me:$LINENO: checking if -D__STDC_EXT__ is required" >&5
if test "$USE_HPUX" = 1 -a "$GXX" = "yes"; then
{ echo "$as_me:$LINENO: checking if -D__STDC_EXT__ is required" >&5
echo $ECHO_N "checking if -D__STDC_EXT__ is required... $ECHO_C" >&6; }
if test "${wx_cv_STDC_EXT_required+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_ext=cpp
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
cat >conftest.$ac_ext <<_ACEOF
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
@@ -23457,9 +23457,9 @@ int
main ()
{
#ifndef __STDC_EXT__
choke me
#endif
#ifndef __STDC_EXT__
choke me
#endif
;
return 0;
@@ -23492,7 +23492,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
ac_ext=c
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'
@@ -23503,14 +23503,21 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
fi
{ echo "$as_me:$LINENO: result: $wx_cv_STDC_EXT_required" >&5
echo "${ECHO_T}$wx_cv_STDC_EXT_required" >&6; }
if test "x$wx_cv_STDC_EXT_required" = "xyes"; then
WXCONFIG_CXXFLAGS="$WXCONFIG_CXXFLAGS -D__STDC_EXT__"
fi
if test "x$wx_cv_STDC_EXT_required" = "xyes"; then
WXCONFIG_CXXFLAGS="$WXCONFIG_CXXFLAGS -D__STDC_EXT__"
fi
else
WXCONFIG_CPPFLAGS="$WXCONFIG_CPPFLAGS -D_LARGE_FILES"
fi
{ echo "$as_me:$LINENO: checking for _LARGEFILE_SOURCE value needed for large files" >&5
fi
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
old_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $LARGEFILE_CPPFLAGS"
{ echo "$as_me:$LINENO: checking for _LARGEFILE_SOURCE value needed for large files" >&5
echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6; }
if test "${ac_cv_sys_largefile_source+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -23547,7 +23554,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test -z "$ac_cxx_werror_flag" ||
test ! -s conftest.err
} && test -s conftest$ac_exeext &&
$as_test_x conftest$ac_exeext; then
@@ -23593,7 +23600,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test -z "$ac_cxx_werror_flag" ||
test ! -s conftest.err
} && test -s conftest$ac_exeext &&
$as_test_x conftest$ac_exeext; then
@@ -23634,9 +23641,15 @@ _ACEOF
fi
if test "$ac_cv_sys_largefile_source" != no; then
WXCONFIG_CPPFLAGS="$WXCONFIG_CPPFLAGS -D_LARGEFILE_SOURCE=$ac_cv_sys_largefile_source"
fi
CPPFLAGS="$old_CPPFLAGS"
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
if test "$ac_cv_sys_largefile_source" != no; then
WXCONFIG_CPPFLAGS="$WXCONFIG_CPPFLAGS -D_LARGEFILE_SOURCE=$ac_cv_sys_largefile_source"
fi
{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
@@ -42913,7 +42926,7 @@ _ACEOF
fi
fi
if test "$wxUSE_XLOCALE" == "yes" ; then
if test "$wxUSE_XLOCALE" = "yes" ; then
cat >>confdefs.h <<\_ACEOF
#define wxUSE_XLOCALE 1
_ACEOF
@@ -46746,7 +46759,96 @@ fi
if test "x$INTELCXX" = "xyes" ; then
CXXWARNINGS="-Wall -wd279,383,444,810,869,981,1418,1419"
elif test "$GXX" = yes ; then
CXXWARNINGS="-Wall -Wundef -Wunused-parameter -Wno-ctor-dtor-privacy"
CXXWARNINGS="-Wall -Wundef -Wunused-parameter -Wno-ctor-dtor-privacy"
{ echo "$as_me:$LINENO: checking CXXWARNINGS for gcc -Woverloaded-virtual" >&5
echo $ECHO_N "checking CXXWARNINGS for gcc -Woverloaded-virtual... $ECHO_C" >&6; }
if test "${ac_cv_cxxflags_gcc_option__Woverloaded_virtual+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_cv_cxxflags_gcc_option__Woverloaded_virtual="no, unknown"
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
ac_save_CXXFLAGS="$CXXFLAGS"
for ac_arg in "-pedantic -Werror % -Woverloaded-virtual" "-pedantic % -Woverloaded-virtual %% no, obsolete" #
do CXXFLAGS="$ac_save_CXXFLAGS "`echo $ac_arg | sed -e 's,%%.*,,' -e 's,%,,'`
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
int
main ()
{
return 0;
;
return 0;
}
_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 "echo \"\$as_me:$LINENO: $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
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_cxx_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
ac_cv_cxxflags_gcc_option__Woverloaded_virtual=`echo $ac_arg | sed -e 's,.*% *,,'` ; break
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
done
CXXFLAGS="$ac_save_CXXFLAGS"
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
fi
{ echo "$as_me:$LINENO: result: $ac_cv_cxxflags_gcc_option__Woverloaded_virtual" >&5
echo "${ECHO_T}$ac_cv_cxxflags_gcc_option__Woverloaded_virtual" >&6; }
case ".$ac_cv_cxxflags_gcc_option__Woverloaded_virtual" in
.ok|.ok,*) ;;
.|.no|.no,*) ;;
*)
if echo " $CXXWARNINGS " | grep " $ac_cv_cxxflags_gcc_option__Woverloaded_virtual " 2>&1 >/dev/null
then { (echo "$as_me:$LINENO: : CXXWARNINGS does contain \$ac_cv_cxxflags_gcc_option__Woverloaded_virtual") >&5
(: CXXWARNINGS does contain $ac_cv_cxxflags_gcc_option__Woverloaded_virtual) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }
else { (echo "$as_me:$LINENO: : CXXWARNINGS=\"\$CXXWARNINGS \$ac_cv_cxxflags_gcc_option__Woverloaded_virtual\"") >&5
(: CXXWARNINGS="$CXXWARNINGS $ac_cv_cxxflags_gcc_option__Woverloaded_virtual") 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }
CXXWARNINGS="$CXXWARNINGS $ac_cv_cxxflags_gcc_option__Woverloaded_virtual"
fi
;;
esac
fi
@@ -47711,6 +47813,8 @@ fi
dlldir="$libdir"
case "${BAKEFILE_HOST}" in
ia64-hp-hpux* )
;;
*-hp-hpux* )
SO_SUFFIX="sl"
SO_SUFFIX_MODULE="sl"