mirror of
https://github.com/aria2/aria2.git
synced 2025-04-06 14:07:37 +03:00
Don't add C++11 switch flags to CXXFLAGS
This commit is contained in:
parent
e4d4eabd85
commit
2a4d39b7e8
3 changed files with 15 additions and 2 deletions
13
configure.ac
13
configure.ac
|
@ -132,9 +132,19 @@ AC_LANG([C++])
|
||||||
PKG_PROG_PKG_CONFIG([0.20])
|
PKG_PROG_PKG_CONFIG([0.20])
|
||||||
|
|
||||||
# Check C++ compiler supports C++0x/C++11 feature
|
# Check C++ compiler supports C++0x/C++11 feature
|
||||||
|
ac_save_CXXFLAGS="$CXXFLAGS"
|
||||||
|
CXXFLAGS=
|
||||||
|
|
||||||
AX_CXX_COMPILE_STDCXX_11([noext], [mandatory])
|
AX_CXX_COMPILE_STDCXX_11([noext], [mandatory])
|
||||||
|
|
||||||
|
CXX1XCXXFLAGS="$CXXFLAGS"
|
||||||
|
CXXFLAGS="$ac_save_CXXFLAGS"
|
||||||
|
AC_SUBST([CXX1XCXXFLAGS])
|
||||||
|
|
||||||
# Check C++ compiler actually supports nullptr
|
# Check C++ compiler actually supports nullptr
|
||||||
|
ac_save_CXXFLAGS=$CXXFLAGS
|
||||||
|
CXXFLAGS="$CXXFLAGS $CXX1XCXXFLAGS"
|
||||||
|
|
||||||
AC_MSG_CHECKING([whether the c++ compiler supports nullptr])
|
AC_MSG_CHECKING([whether the c++ compiler supports nullptr])
|
||||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||||
]],
|
]],
|
||||||
|
@ -165,6 +175,8 @@ Derived x;
|
||||||
AC_DEFINE_UNQUOTED([CXX11_OVERRIDE], [$cxx11_override],
|
AC_DEFINE_UNQUOTED([CXX11_OVERRIDE], [$cxx11_override],
|
||||||
[Define `override` keyword if the compiler supports it])
|
[Define `override` keyword if the compiler supports it])
|
||||||
|
|
||||||
|
CXXFLAGS=$ac_save_CXXFLAGS
|
||||||
|
|
||||||
# Check static build is requested
|
# Check static build is requested
|
||||||
if test "x$ARIA2_STATIC" = "xyes"; then
|
if test "x$ARIA2_STATIC" = "xyes"; then
|
||||||
case "$host" in
|
case "$host" in
|
||||||
|
@ -1165,6 +1177,7 @@ CPPFLAGS: $CPPFLAGS
|
||||||
LDFLAGS: $LDFLAGS
|
LDFLAGS: $LDFLAGS
|
||||||
LIBS: $LIBS
|
LIBS: $LIBS
|
||||||
DEFS: $DEFS
|
DEFS: $DEFS
|
||||||
|
CXX1XCXXFLAGS: $CXX1XCXXFLAGS
|
||||||
EXTRACXXFLAGS: $EXTRACXXFLAGS
|
EXTRACXXFLAGS: $EXTRACXXFLAGS
|
||||||
EXTRACFLAGS: $EXTRACFLAGS
|
EXTRACFLAGS: $EXTRACFLAGS
|
||||||
EXTRACPPFLAGS: $EXTRACPPFLAGS
|
EXTRACPPFLAGS: $EXTRACPPFLAGS
|
||||||
|
|
|
@ -763,5 +763,5 @@ LDADD = libaria2.la @ALLOCA@ \
|
||||||
|
|
||||||
AM_CFLAGS = @EXTRACFLAGS@
|
AM_CFLAGS = @EXTRACFLAGS@
|
||||||
|
|
||||||
AM_CXXFLAGS = @WARNCXXFLAGS@ @EXTRACXXFLAGS@
|
AM_CXXFLAGS = @WARNCXXFLAGS@ @CXX1XCXXFLAGS@ @EXTRACXXFLAGS@
|
||||||
|
|
||||||
|
|
|
@ -294,7 +294,7 @@ AM_LDFLAGS = \
|
||||||
|
|
||||||
AM_CFLAGS = @EXTRACFLAGS@
|
AM_CFLAGS = @EXTRACFLAGS@
|
||||||
|
|
||||||
AM_CXXFLAGS = @WARNCXXFLAGS@ @EXTRACXXFLAGS@
|
AM_CXXFLAGS = @WARNCXXFLAGS@ @CXX1XCXXFLAGS@ @EXTRACXXFLAGS@
|
||||||
|
|
||||||
EXTRA_DIST = 4096chunk.txt\
|
EXTRA_DIST = 4096chunk.txt\
|
||||||
chunkChecksumTestFile250.txt\
|
chunkChecksumTestFile250.txt\
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue