|
|
@ -4995,10 +4995,10 @@ $as_echo "$as_me: Your boost libraries seems to old (version $_version)." >&6;} |
|
|
|
$as_echo "#define HAVE_BOOST /**/" >>confdefs.h |
|
|
|
$as_echo "#define HAVE_BOOST /**/" >>confdefs.h |
|
|
|
|
|
|
|
|
|
|
|
# execute ACTION-IF-FOUND (if present): |
|
|
|
# execute ACTION-IF-FOUND (if present): |
|
|
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: Boost CPPFLAGS: \"$BOOST_CPPFLAGS\" |
|
|
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: Boost CXXFLAGS: \"$BOOST_CPPFLAGS\"" >&5 |
|
|
|
Boost LDFLAGS: \"$BOOST_LDFLAGS\"" >&5 |
|
|
|
$as_echo "$as_me: Boost CXXFLAGS: \"$BOOST_CPPFLAGS\"" >&6;} |
|
|
|
$as_echo "$as_me: Boost CPPFLAGS: \"$BOOST_CPPFLAGS\" |
|
|
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: Boost LDFLAGS: \"$BOOST_LDFLAGS\"" >&5 |
|
|
|
Boost LDFLAGS: \"$BOOST_LDFLAGS\"" >&6;} |
|
|
|
$as_echo "$as_me: Boost LDFLAGS: \"$BOOST_LDFLAGS\"" >&6;} |
|
|
|
fi |
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
CPPFLAGS="$CPPFLAGS_SAVED" |
|
|
|
CPPFLAGS="$CPPFLAGS_SAVED" |
|
|
@ -5009,16 +5009,10 @@ fi |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CPPFLAGS="$BOOST_CPPFLAGS $CPPFLAGS" |
|
|
|
CXXFLAGS="$BOOST_CPPFLAGS $CXXFLAGS" |
|
|
|
LDFLAGS="$BOOST_LDFLAGS $LDFLAGS" |
|
|
|
LDFLAGS="$BOOST_LDFLAGS $LDFLAGS" |
|
|
|
|
|
|
|
|
|
|
|
# add workaround for problematic boost version |
|
|
|
# add workaround for problematic boost version |
|
|
|
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 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# taken from ax_boost_base.m4 |
|
|
|
# taken from ax_boost_base.m4 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -5039,12 +5033,6 @@ else |
|
|
|
QBT_ADD_DEFINES="$QBT_ADD_DEFINES BOOST_NO_CXX11_RVALUE_REFERENCES" |
|
|
|
QBT_ADD_DEFINES="$QBT_ADD_DEFINES BOOST_NO_CXX11_RVALUE_REFERENCES" |
|
|
|
fi |
|
|
|
fi |
|
|
|
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
|
|
|
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
|
|
|
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 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -5398,7 +5386,7 @@ else |
|
|
|
libtorrent_LIBS=$pkg_cv_libtorrent_LIBS |
|
|
|
libtorrent_LIBS=$pkg_cv_libtorrent_LIBS |
|
|
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
|
|
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
|
|
|
$as_echo "yes" >&6; } |
|
|
|
$as_echo "yes" >&6; } |
|
|
|
CPPFLAGS="$libtorrent_CFLAGS $CPPFLAGS" |
|
|
|
CXXFLAGS="$libtorrent_CFLAGS $CXXFLAGS" |
|
|
|
LIBS="$libtorrent_LIBS $LIBS" |
|
|
|
LIBS="$libtorrent_LIBS $LIBS" |
|
|
|
fi |
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
@ -5491,21 +5479,13 @@ else |
|
|
|
zlib_LIBS=$pkg_cv_zlib_LIBS |
|
|
|
zlib_LIBS=$pkg_cv_zlib_LIBS |
|
|
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
|
|
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
|
|
|
$as_echo "yes" >&6; } |
|
|
|
$as_echo "yes" >&6; } |
|
|
|
CPPFLAGS="$zlib_CFLAGS $CPPFLAGS" |
|
|
|
CXXFLAGS="$zlib_CFLAGS $CXXFLAGS" |
|
|
|
LIBS="$zlib_LIBS $LIBS" |
|
|
|
LIBS="$zlib_LIBS $LIBS" |
|
|
|
fi |
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
# Check compiler C++11 support |
|
|
|
# Check if already in >= C++11 mode because of the flags returned by one of the above packages |
|
|
|
ac_ext=cpp |
|
|
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler is using C++11 or later mode" >&5 |
|
|
|
ac_cpp='$CXXCPP $CPPFLAGS' |
|
|
|
$as_echo_n "checking if compiler is using C++11 or later mode... " >&6; } |
|
|
|
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 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_tmp="$CXXFLAGS" |
|
|
|
|
|
|
|
CXXFLAGS="$CXXFLAGS -std=c++11" |
|
|
|
|
|
|
|
cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
|
|
|
cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
|
|
|
/* end confdefs.h. */ |
|
|
|
/* end confdefs.h. */ |
|
|
|
|
|
|
|
|
|
|
@ -5521,17 +5501,26 @@ main () |
|
|
|
; |
|
|
|
; |
|
|
|
return 0; |
|
|
|
return 0; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
_ACEOF |
|
|
|
_ACEOF |
|
|
|
if ac_fn_cxx_try_compile "$LINENO"; then : |
|
|
|
if ac_fn_cxx_try_compile "$LINENO"; then : |
|
|
|
|
|
|
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
|
|
|
|
|
|
|
$as_echo "yes" >&6; } |
|
|
|
|
|
|
|
QBT_CXX11_FOUND="yes" |
|
|
|
else |
|
|
|
else |
|
|
|
as_fn_error $? "A compiler supporting C++11 is required." "$LINENO" 5 |
|
|
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
|
|
|
|
|
|
|
$as_echo "no" >&6; } |
|
|
|
|
|
|
|
QBT_CXX11_FOUND="no" |
|
|
|
fi |
|
|
|
fi |
|
|
|
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
|
|
|
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
|
|
|
CXXFLAGS="$_tmp" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_tmp="$CXXFLAGS" |
|
|
|
# In case of no, check if the compiler can support at least C++11 |
|
|
|
CXXFLAGS="$CXXFLAGS $libtorrent_CFLAGS" |
|
|
|
# and if yes, enable it leaving a warning to the user |
|
|
|
|
|
|
|
if test "x$QBT_CXX11_FOUND" = "xno"; then : |
|
|
|
|
|
|
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports C++11" >&5 |
|
|
|
|
|
|
|
$as_echo_n "checking if compiler supports C++11... " >&6; } |
|
|
|
|
|
|
|
TMP_CXXFLAGS="$CXXFLAGS" |
|
|
|
|
|
|
|
CXXFLAGS="$CXXFLAGS -std=c++11" |
|
|
|
cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
|
|
|
cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
|
|
|
/* end confdefs.h. */ |
|
|
|
/* end confdefs.h. */ |
|
|
|
|
|
|
|
|
|
|
@ -5547,22 +5536,58 @@ main () |
|
|
|
; |
|
|
|
; |
|
|
|
return 0; |
|
|
|
return 0; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
_ACEOF |
|
|
|
_ACEOF |
|
|
|
if ac_fn_cxx_try_compile "$LINENO"; then : |
|
|
|
if ac_fn_cxx_try_compile "$LINENO"; then : |
|
|
|
|
|
|
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
|
|
|
|
|
|
|
$as_echo "yes" >&6; } |
|
|
|
|
|
|
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if C++11 is disabled by the set compiler flags" >&5 |
|
|
|
|
|
|
|
$as_echo_n "checking if C++11 is disabled by the set compiler flags... " >&6; } |
|
|
|
|
|
|
|
# prepend the flag so it won't override conflicting user defined flags |
|
|
|
|
|
|
|
CXXFLAGS="-std=c++11 $TMP_CXXFLAGS" |
|
|
|
|
|
|
|
cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
|
|
|
|
|
|
|
/* end confdefs.h. */ |
|
|
|
|
|
|
|
|
|
|
|
else |
|
|
|
#ifndef __cplusplus |
|
|
|
as_fn_error $? "Compiler is not working in C++11 or later mode. |
|
|
|
#error "This is not a C++ compiler" |
|
|
|
|
|
|
|
#elif __cplusplus < 201103L |
|
|
|
|
|
|
|
#error "This is not a C++11 compiler" |
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
int |
|
|
|
|
|
|
|
main () |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
; |
|
|
|
|
|
|
|
return 0; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_ACEOF |
|
|
|
|
|
|
|
if ac_fn_cxx_try_compile "$LINENO"; then : |
|
|
|
|
|
|
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
|
|
|
|
|
|
|
$as_echo "no" >&6; } |
|
|
|
|
|
|
|
CXXFLAGS="$TMP_CXXFLAGS -std=c++11" |
|
|
|
|
|
|
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C++11 mode is now force enabled. |
|
|
|
|
|
|
|
Make sure you use the same C++ mode for qBittorrent and its dependencies. |
|
|
|
|
|
|
|
To explicitly set qBittorrent to a later mode use CXXFLAGS. |
|
|
|
|
|
|
|
Example: \`CXXFLAGS=\"\$CXXFLAGS -std=c++14\" ./configure\`" >&5 |
|
|
|
|
|
|
|
$as_echo "$as_me: WARNING: C++11 mode is now force enabled. |
|
|
|
Make sure you use the same C++ mode for qBittorrent and its dependencies. |
|
|
|
Make sure you use the same C++ mode for qBittorrent and its dependencies. |
|
|
|
Example: \`CXXFLAGS=\"\$CXXFLAGS -std=c++11\" ./configure\`" "$LINENO" 5 |
|
|
|
To explicitly set qBittorrent to a later mode use CXXFLAGS. |
|
|
|
|
|
|
|
Example: \`CXXFLAGS=\"\$CXXFLAGS -std=c++14\" ./configure\`" >&2;} |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
|
|
|
|
|
|
|
$as_echo "yes" >&6; } |
|
|
|
|
|
|
|
as_fn_error $? "The compiler supports C++11 but the user or a dependency has explicitly enabled a lower mode." "$LINENO" 5 |
|
|
|
|
|
|
|
fi |
|
|
|
|
|
|
|
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
|
|
|
|
|
|
|
$as_echo "no" >&6; } |
|
|
|
|
|
|
|
as_fn_error $? "A compiler supporting C++11 is required." "$LINENO" 5 |
|
|
|
fi |
|
|
|
fi |
|
|
|
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
|
|
|
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
|
|
|
CXXFLAGS="$_tmp" |
|
|
|
|
|
|
|
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 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
# These are required because autoconf doesn't expand these **particular** |
|
|
|
# These are required because autoconf doesn't expand these **particular** |
|
|
|
# vars automatically. And qmake cannot autoexpand them. |
|
|
|
# vars automatically. And qmake cannot autoexpand them. |
|
|
@ -5650,15 +5675,15 @@ extract() { |
|
|
|
for i in $string; do |
|
|
|
for i in $string; do |
|
|
|
case "$(echo "$i" | cut -c1)" in |
|
|
|
case "$(echo "$i" | cut -c1)" in |
|
|
|
'') ;; |
|
|
|
'') ;; |
|
|
|
D) QBT_CONF_DEFINES="$(echo $i | cut -c2-) $QBT_CONF_DEFINES";; |
|
|
|
D) QBT_CONF_DEFINES="$QBT_CONF_DEFINES $(echo $i | cut -c2-)";; |
|
|
|
I) QBT_CONF_INCLUDES="$(echo $i | cut -c2-) $QBT_CONF_INCLUDES";; |
|
|
|
I) QBT_CONF_INCLUDES="$QBT_CONF_INCLUDES $(echo $i | cut -c2-)";; |
|
|
|
*) QBT_CONF_EXTRA_CFLAGS="-$i $QBT_CONF_EXTRA_CFLAGS";; |
|
|
|
*) QBT_CONF_EXTRA_CFLAGS="$QBT_CONF_EXTRA_CFLAGS -$i";; |
|
|
|
esac |
|
|
|
esac |
|
|
|
done |
|
|
|
done |
|
|
|
IFS=$SAVEIFS |
|
|
|
IFS=$SAVEIFS |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
extract "$CFLAGS $CPPFLAGS $CXXFLAGS" |
|
|
|
extract "$CFLAGS $CXXFLAGS" |
|
|
|
QBT_ADD_DEFINES="$QBT_ADD_DEFINES $QBT_CONF_DEFINES" |
|
|
|
QBT_ADD_DEFINES="$QBT_ADD_DEFINES $QBT_CONF_DEFINES" |
|
|
|
|
|
|
|
|
|
|
|
# Substitute the values of these vars in conf.pri.in |
|
|
|
# Substitute the values of these vars in conf.pri.in |
|
|
|