mirror of
https://gitlab.gnome.org/GNOME/gparted
synced 2024-08-27 11:40:03 +00:00
Always require C++11 compilation (!117)
All the oldest supported distributions now have versions of GTK C++ libraries which require C++11 compilation, therefore forcing GParted to require C++11 compilation [1][2][3]. Fragment of existing ./configure output which lists the library versions requiring C++11 compilation: $ ./configure ... checking for glibmm >= 2.45.40 which requires C++11 compilation... yes checking for libsigc++ >= 2.5.1 which requires C++11 compilation... yes checking for gtkmm >= 3.18.0 which requires C++11 compilation... yes checking whether g++ supports C++11 features with -std=gnu++11... yes The oldest supported distributions and their versions of GTK C++ libraries and GCC compiler: Distribution gtkmm glibmm libsigc++ gcc Debian 10 3.24.0 2.58.0 2.10.1 4.8.3 RHEL / CentOS 7.9 3.22.2 2.56.0 2.10.0 4.8.5 SLES 12 SP5 3.20.1 2.48.1 2.8.0 4.8 Ubuntu 20.04 LTS 3.24.2 2.64.2 2.10.2 9.3.0 Technically GCC didn't have full C++11 support until GCC 4.8.1 [6] and SLES 12 SP5 only has GCC 4.8 (as well as many later versions of GCC). However which ever version of the GCC compiler is being used to compile the GTK C++ libraries it must have all the features needed to compile those libraries. Simplify the configure script and just always require a C++11 capable compiler. This also allows the use of C++11 features in the GParted code. [1] commitcc0740148e
port-to-gtk3: Switch to Gtkmm3 (#7) [2] commit707bae6fed
Enable C++11 compilation when using libsigc++ 2.5.1 and later (#758545) [3] commitd6d7cb2bbf
Enable C++11 compilation when using glibmm 2.45.40 and later (#756035) [4] SUSE Product Support Lifecycle, SUSE Linux Enterprise Server 12 https://www.suse.com/lifecycle/#suse-linux-enterprise-server-12 [5] SUSE package search https://scc.suse.com/packages?name=SUSE%20Linux%20Enterprise%20Server&version=12.5&arch=x86_64&query=&module= [6] C++ Standards Support in GCC, C++11 Support in GCC https://gcc.gnu.org/projects/cxx-status.html#cxx11 Closes !117 - Require C++11 compilation
This commit is contained in:
parent
1e548c55a6
commit
9f473b70cb
34
configure.ac
34
configure.ac
|
@ -209,38 +209,8 @@ dnl Check for glibmm minimum required version.
|
|||
PKG_CHECK_MODULES([GLIBMM], [glibmm-2.4 >= 2.32.0])
|
||||
|
||||
|
||||
need_cxx_compile_stdcxx_11=no
|
||||
dnl Check for glibmm >= 2.45.40 which requires C++11 compilation.
|
||||
AC_MSG_CHECKING([for glibmm >= 2.45.40 which requires C++11 compilation])
|
||||
PKG_CHECK_EXISTS(
|
||||
[glibmm-2.4 >= 2.45.40],
|
||||
[need_cxx_compile_stdcxx_11=yes
|
||||
AC_MSG_RESULT([yes])
|
||||
],
|
||||
[AC_MSG_RESULT([no])]
|
||||
)
|
||||
dnl Check for libsigc++ >= 2.5.1 which requires C++11 compilation.
|
||||
AC_MSG_CHECKING([for libsigc++ >= 2.5.1 which requires C++11 compilation])
|
||||
PKG_CHECK_EXISTS(
|
||||
[sigc++-2.0 >= 2.5.1],
|
||||
[need_cxx_compile_stdcxx_11=yes
|
||||
AC_MSG_RESULT([yes])
|
||||
],
|
||||
[AC_MSG_RESULT([no])]
|
||||
)
|
||||
dnl Check for gtkmm >= 3.18.0 which requires C++11 compilation.
|
||||
AC_MSG_CHECKING([for gtkmm >= 3.18.0 which requires C++11 compilation])
|
||||
PKG_CHECK_EXISTS(
|
||||
[gtkmm-3.0 >= 3.18.0],
|
||||
[need_cxx_compile_stdcxx_11=yes
|
||||
AC_MSG_RESULT([yes])
|
||||
],
|
||||
[AC_MSG_RESULT([no])]
|
||||
)
|
||||
dnl Enable C++11 compilation only if required.
|
||||
if test "x$need_cxx_compile_stdcxx_11" = xyes; then
|
||||
AX_CXX_COMPILE_STDCXX_11()
|
||||
fi
|
||||
dnl Require C++11 compilation.
|
||||
AX_CXX_COMPILE_STDCXX_11()
|
||||
|
||||
|
||||
dnl Check for gtkmm >= 3.16 to determine availability of Gtk::Label::set_xalign().
|
||||
|
|
Loading…
Reference in a new issue