-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #24 from helios-base/develop
Support v18
- Loading branch information
Showing
31 changed files
with
1,131 additions
and
419 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
# Process this file with autoconf to produce a configure script. | ||
|
||
AC_PREREQ(2.61) | ||
AC_INIT([soccerwindow2], [2020.08], [[email protected]]) | ||
AC_INIT([soccerwindow2], [2023], [[email protected]]) | ||
|
||
AC_CONFIG_SRCDIR([config.h.in]) | ||
AC_CONFIG_HEADERS([config.h]) | ||
|
@@ -37,54 +37,19 @@ AC_PROG_INSTALL | |
|
||
# ---------------------------------------------------------- | ||
# check Qt | ||
AC_ARG_ENABLE(qt4, | ||
AC_HELP_STRING([--enable-qt4], | ||
[use Qt4 tool kit instead of Qt5 (default no)])) | ||
AC_ARG_ENABLE(gl, | ||
AC_HELP_STRING([--enable-gl], | ||
[enable GLWidget for Qt (default yes)])) | ||
|
||
if test "x$enable_qt4" == "xyes"; then | ||
AC_MSG_NOTICE(enabled Qt4) | ||
|
||
QTMODULES="QtCore QtGui QtNetwork" | ||
|
||
if test "x$enable_gl" == "xyes"; then | ||
AC_MSG_NOTICE(enabled GLWidget) | ||
CFLAGS="-DUSE_GLWIDGET $CFLAGS" | ||
CXXFLAGS="-DUSE_GLWIDGET $CXXFLAGS" | ||
QTMODULES="$QTMODULES QtOpenGL" | ||
fi | ||
|
||
AX_QT([4.3.0],[$QTMODULES]) | ||
else | ||
AC_MSG_NOTICE(enabled Qt5) | ||
|
||
QTMODULES="Qt5Core Qt5Gui Qt5Widgets Qt5Network" | ||
|
||
if test "x$enable_gl" == "xyes"; then | ||
AC_MSG_NOTICE(enabled GL5Widget) | ||
CFLAGS="-DUSE_GLWIDGET $CFLAGS" | ||
CXXFLAGS="-DUSE_GLWIDGET $CXXFLAGS" | ||
QTMODULES="$QTMODULES Qt5OpenGL" | ||
fi | ||
|
||
AX_QT([5.0.0],[$QTMODULES]) | ||
fi | ||
|
||
if test x$have_qt != xyes ; then | ||
AC_MSG_ERROR([$QTMODULES could not be found.]) | ||
AX_HAVE_QT | ||
if test "x$have_qt" != "xyes"; then | ||
AC_MSG_ERROR([Qt not found.]) | ||
AM_CONDITIONAL(BUILD_QT, [test "1" = "0"]) | ||
else | ||
CFLAGS="-fPIC $CFLAGS" | ||
CXXFLAGS="-fPIC $CXXFLAGS" | ||
AM_CONDITIONAL(BUILD_QT, [test "1" = "1"]) | ||
fi | ||
|
||
# ---------------------------------------------------------- | ||
# check C++ | ||
|
||
AX_CXX_COMPILE_STDCXX_14(noext) | ||
AX_CXX_COMPILE_STDCXX_17(noext) | ||
|
||
# ---------------------------------------------------------- | ||
# check boost | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,13 +10,13 @@ | |
# | ||
# Check for baseline language coverage in the compiler for the specified | ||
# version of the C++ standard. If necessary, add switches to CXX and | ||
# CXXCPP to enable support. VERSION may be '11' (for the C++11 standard) | ||
# or '14' (for the C++14 standard). | ||
# CXXCPP to enable support. VERSION may be '11', '14', '17', or '20' for | ||
# the respective C++ standard version. | ||
# | ||
# The second argument, if specified, indicates whether you insist on an | ||
# extended mode (e.g. -std=gnu++11) or a strict conformance mode (e.g. | ||
# -std=c++11). If neither is specified, you get whatever works, with | ||
# preference for an extended mode. | ||
# preference for no added switch, and then for an extended mode. | ||
# | ||
# The third argument, if specified 'mandatory' or if left unspecified, | ||
# indicates that baseline support for the specified C++ standard is | ||
|
@@ -34,13 +34,16 @@ | |
# Copyright (c) 2015 Paul Norman <[email protected]> | ||
# Copyright (c) 2015 Moritz Klammler <[email protected]> | ||
# Copyright (c) 2016, 2018 Krzesimir Nowak <[email protected]> | ||
# Copyright (c) 2019 Enji Cooper <[email protected]> | ||
# Copyright (c) 2020 Jason Merrill <[email protected]> | ||
# Copyright (c) 2021 Jörn Heusipp <[email protected]> | ||
# | ||
# Copying and distribution of this file, with or without modification, are | ||
# permitted in any medium without royalty provided the copyright notice | ||
# and this notice are preserved. This file is offered as-is, without any | ||
# warranty. | ||
|
||
#serial 10 | ||
#serial 18 | ||
|
||
dnl This macro is based on the code from the AX_CXX_COMPILE_STDCXX_11 macro | ||
dnl (serial version number 13). | ||
|
@@ -49,6 +52,7 @@ AC_DEFUN([AX_CXX_COMPILE_STDCXX], [dnl | |
m4_if([$1], [11], [ax_cxx_compile_alternatives="11 0x"], | ||
[$1], [14], [ax_cxx_compile_alternatives="14 1y"], | ||
[$1], [17], [ax_cxx_compile_alternatives="17 1z"], | ||
[$1], [20], [ax_cxx_compile_alternatives="20"], | ||
[m4_fatal([invalid first argument `$1' to AX_CXX_COMPILE_STDCXX])])dnl | ||
m4_if([$2], [], [], | ||
[$2], [ext], [], | ||
|
@@ -61,6 +65,16 @@ AC_DEFUN([AX_CXX_COMPILE_STDCXX], [dnl | |
AC_LANG_PUSH([C++])dnl | ||
ac_success=no | ||
m4_if([$2], [], [dnl | ||
AC_CACHE_CHECK(whether $CXX supports C++$1 features by default, | ||
ax_cv_cxx_compile_cxx$1, | ||
[AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])], | ||
[ax_cv_cxx_compile_cxx$1=yes], | ||
[ax_cv_cxx_compile_cxx$1=no])]) | ||
if test x$ax_cv_cxx_compile_cxx$1 = xyes; then | ||
ac_success=yes | ||
fi]) | ||
m4_if([$2], [noext], [], [dnl | ||
if test x$ac_success = xno; then | ||
for alternative in ${ax_cxx_compile_alternatives}; do | ||
|
@@ -90,9 +104,18 @@ AC_DEFUN([AX_CXX_COMPILE_STDCXX], [dnl | |
dnl HP's aCC needs +std=c++11 according to: | ||
dnl http://h21007.www2.hp.com/portal/download/files/unprot/aCxx/PDF_Release_Notes/769149-001.pdf | ||
dnl Cray's crayCC needs "-h std=c++11" | ||
dnl MSVC needs -std:c++NN for C++17 and later (default is C++14) | ||
for alternative in ${ax_cxx_compile_alternatives}; do | ||
for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do | ||
cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx$1_$switch]) | ||
for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}" MSVC; do | ||
if test x"$switch" = xMSVC; then | ||
dnl AS_TR_SH maps both `:` and `=` to `_` so -std:c++17 would collide | ||
dnl with -std=c++17. We suffix the cache variable name with _MSVC to | ||
dnl avoid this. | ||
switch=-std:c++${alternative} | ||
cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx$1_${switch}_MSVC]) | ||
else | ||
cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx$1_$switch]) | ||
fi | ||
AC_CACHE_CHECK(whether $CXX supports C++$1 features with $switch, | ||
$cachevar, | ||
[ac_save_CXX="$CXX" | ||
|
@@ -139,20 +162,31 @@ m4_define([_AX_CXX_COMPILE_STDCXX_testbody_11], | |
_AX_CXX_COMPILE_STDCXX_testbody_new_in_11 | ||
) | ||
|
||
|
||
dnl Test body for checking C++14 support | ||
|
||
m4_define([_AX_CXX_COMPILE_STDCXX_testbody_14], | ||
_AX_CXX_COMPILE_STDCXX_testbody_new_in_11 | ||
_AX_CXX_COMPILE_STDCXX_testbody_new_in_14 | ||
) | ||
|
||
dnl Test body for checking C++17 support | ||
|
||
m4_define([_AX_CXX_COMPILE_STDCXX_testbody_17], | ||
_AX_CXX_COMPILE_STDCXX_testbody_new_in_11 | ||
_AX_CXX_COMPILE_STDCXX_testbody_new_in_14 | ||
_AX_CXX_COMPILE_STDCXX_testbody_new_in_17 | ||
) | ||
|
||
dnl Test body for checking C++20 support | ||
|
||
m4_define([_AX_CXX_COMPILE_STDCXX_testbody_20], | ||
_AX_CXX_COMPILE_STDCXX_testbody_new_in_11 | ||
_AX_CXX_COMPILE_STDCXX_testbody_new_in_14 | ||
_AX_CXX_COMPILE_STDCXX_testbody_new_in_17 | ||
_AX_CXX_COMPILE_STDCXX_testbody_new_in_20 | ||
) | ||
|
||
|
||
dnl Tests for new features in C++11 | ||
|
||
m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_11], [[ | ||
|
@@ -164,7 +198,11 @@ m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_11], [[ | |
#error "This is not a C++ compiler" | ||
#elif __cplusplus < 201103L | ||
// MSVC always sets __cplusplus to 199711L in older versions; newer versions | ||
// only set it correctly if /Zc:__cplusplus is specified as well as a | ||
// /std:c++NN switch: | ||
// https://devblogs.microsoft.com/cppblog/msvc-now-correctly-reports-__cplusplus/ | ||
#elif __cplusplus < 201103L && !defined _MSC_VER | ||
#error "This is not a C++11 compiler" | ||
|
@@ -189,11 +227,13 @@ namespace cxx11 | |
struct Base | ||
{ | ||
virtual ~Base() {} | ||
virtual void f() {} | ||
}; | ||
struct Derived : public Base | ||
{ | ||
virtual ~Derived() override {} | ||
virtual void f() override {} | ||
}; | ||
|
@@ -453,7 +493,7 @@ m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_14], [[ | |
#error "This is not a C++ compiler" | ||
#elif __cplusplus < 201402L | ||
#elif __cplusplus < 201402L && !defined _MSC_VER | ||
#error "This is not a C++14 compiler" | ||
|
@@ -577,7 +617,7 @@ m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_17], [[ | |
#error "This is not a C++ compiler" | ||
#elif __cplusplus < 201703L | ||
#elif __cplusplus < 201703L && !defined _MSC_VER | ||
#error "This is not a C++17 compiler" | ||
|
@@ -943,6 +983,36 @@ namespace cxx17 | |
} // namespace cxx17 | ||
#endif // __cplusplus < 201703L | ||
#endif // __cplusplus < 201703L && !defined _MSC_VER | ||
]]) | ||
|
||
|
||
dnl Tests for new features in C++20 | ||
|
||
m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_20], [[ | ||
#ifndef __cplusplus | ||
#error "This is not a C++ compiler" | ||
#elif __cplusplus < 202002L && !defined _MSC_VER | ||
#error "This is not a C++20 compiler" | ||
#else | ||
#include <version> | ||
namespace cxx20 | ||
{ | ||
// As C++20 supports feature test macros in the standard, there is no | ||
// immediate need to actually test for feature availability on the | ||
// Autoconf side. | ||
} // namespace cxx20 | ||
#endif // __cplusplus < 202002L && !defined _MSC_VER | ||
]]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# ============================================================================= | ||
# https://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx_17.html | ||
# ============================================================================= | ||
# | ||
# SYNOPSIS | ||
# | ||
# AX_CXX_COMPILE_STDCXX_17([ext|noext], [mandatory|optional]) | ||
# | ||
# DESCRIPTION | ||
# | ||
# Check for baseline language coverage in the compiler for the C++17 | ||
# standard; if necessary, add switches to CXX and CXXCPP to enable | ||
# support. | ||
# | ||
# This macro is a convenience alias for calling the AX_CXX_COMPILE_STDCXX | ||
# macro with the version set to C++17. The two optional arguments are | ||
# forwarded literally as the second and third argument respectively. | ||
# Please see the documentation for the AX_CXX_COMPILE_STDCXX macro for | ||
# more information. If you want to use this macro, you also need to | ||
# download the ax_cxx_compile_stdcxx.m4 file. | ||
# | ||
# LICENSE | ||
# | ||
# Copyright (c) 2015 Moritz Klammler <[email protected]> | ||
# Copyright (c) 2016 Krzesimir Nowak <[email protected]> | ||
# | ||
# Copying and distribution of this file, with or without modification, are | ||
# permitted in any medium without royalty provided the copyright notice | ||
# and this notice are preserved. This file is offered as-is, without any | ||
# warranty. | ||
|
||
#serial 2 | ||
|
||
AX_REQUIRE_DEFINED([AX_CXX_COMPILE_STDCXX]) | ||
AC_DEFUN([AX_CXX_COMPILE_STDCXX_17], [AX_CXX_COMPILE_STDCXX([17], [$1], [$2])]) |
Oops, something went wrong.