Fix C++11 check when --with-cxx=11 is used
AX_CXX_COMPILE_STDCXX() macro does not define HAVE_CXX11 when C++11 is required (and not optional, as with --enable-cxx11), so the build was broken when --with-cxx=11 was used under OS X as -stdlib=libc++ was not used. Fix this and also leave only a single AX_CXX_COMPILE_STDCXX() check for C++11, this saves us ~1000 lines in configure.
This commit is contained in:
12
configure.in
12
configure.in
@@ -1065,12 +1065,12 @@ if test -n "$wxWITH_CXX"; then
|
||||
dnl autoconf, not run, time.
|
||||
case "$wxWITH_CXX" in
|
||||
11)
|
||||
AX_CXX_COMPILE_STDCXX(11,,optional)
|
||||
if test -n "$wxWITH_CXX_IS_OPTIONAL"; then
|
||||
AX_CXX_COMPILE_STDCXX(11,,optional)
|
||||
else
|
||||
AX_CXX_COMPILE_STDCXX(11)
|
||||
if test "$HAVE_CXX11" != 1; then
|
||||
AC_MSG_FAILURE([C++11 support was requested but is not available])
|
||||
fi
|
||||
fi
|
||||
have_cxxN=$HAVE_CXX11
|
||||
;;
|
||||
|
||||
14)
|
||||
@@ -1078,6 +1078,10 @@ if test -n "$wxWITH_CXX"; then
|
||||
dnl and not --enable-cxx14 option.
|
||||
AX_CXX_COMPILE_STDCXX(14)
|
||||
|
||||
dnl Notice that because it's not optional, the macro doesn't define
|
||||
dnl HAVE_CXX14. We don't use it anyhow so far, so it doesn't
|
||||
dnl matter, but we could need to do it ourselves here in the future.
|
||||
|
||||
dnl If we have C++14, we necessarily have C++11 too.
|
||||
HAVE_CXX11=1
|
||||
;;
|
||||
|
Reference in New Issue
Block a user