Improve detection of C++11 compiler and set appropriate flags to use C++11/C++0x features
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2009-matevz@13867 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
77ccb6f21c
commit
c94418b603
3 changed files with 14 additions and 9 deletions
|
|
@ -24,7 +24,7 @@
|
|||
TARGET =
|
||||
CC = @CC@
|
||||
CXX = @CXX@
|
||||
CFLAGS = @PLATFLAGS@
|
||||
CFLAGS = @PLATCFLAGS@
|
||||
CXXFLAGS = @PLATCXXFLAGS@
|
||||
prefix = @prefix@
|
||||
exec_prefix= @exec_prefix@
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ top_srcdir = @top_srcdir@
|
|||
SWIG = ../$(top_srcdir)/preinst-swig
|
||||
CC = @CC@
|
||||
CXX = @CXX@
|
||||
CFLAGS = @PLATFLAGS@
|
||||
CFLAGS = @PLATCFLAGS@
|
||||
GUILEINCLUDE = @GUILEINCLUDE@
|
||||
GUILELINK = @GUILELINK@
|
||||
SWIGOPT =
|
||||
|
|
|
|||
19
configure.in
19
configure.in
|
|
@ -314,16 +314,21 @@ case $host in
|
|||
esac
|
||||
|
||||
# Optional CFLAGS used to silence compiler warnings on some platforms.
|
||||
AC_SUBST(PLATCFLAGS)
|
||||
PLATCFLAGS=
|
||||
|
||||
AC_SUBST(PLATFLAGS)
|
||||
PLATFLAGS=
|
||||
|
||||
# Add switch to enable C++0x support
|
||||
# Add switch if necessary to enable C++11 support - just for tests
|
||||
AC_LANG_PUSH([C++])
|
||||
CXXFLAGS_SAVED=$CXXFLAGS
|
||||
AX_CXX_COMPILE_STDCXX_11([noext], [nostop])
|
||||
CXXFLAGS=$CXXFLAGS_SAVED
|
||||
AC_LANG_POP([C++])
|
||||
AC_SUBST(PLATCXXFLAGS)
|
||||
if test "$GCC" = yes; then
|
||||
PLATCXXFLAGS=$PLATFLAGS" -std=c++0x "
|
||||
AC_SUBST(HAVE_CXX11_COMPILER)
|
||||
if test x"$CXX11FLAGS" = x; then
|
||||
PLATCXXFLAGS="$PLATCFLAGS"
|
||||
else
|
||||
PLATCXXFLAGS=$PLATFLAGS
|
||||
PLATCXXFLAGS="$CXX11FLAGS $PLATCFLAGS"
|
||||
fi
|
||||
|
||||
# Check for specific libraries. Used for SWIG examples
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue