@ -468,7 +468,7 @@ AC_DEFUN([KDE_SET_DEFAULT_PATHS],
if test "$1" = "default"; then
if test -z "$kde_htmldir"; then
kde_htmldir='\${datadir}/doc/HTML'
kde_htmldir='\${datadir}/doc/tde/ HTML'
fi
if test -z "$kde_appsdir"; then
kde_appsdir='\${datadir}/applnk'
@ -1233,7 +1233,7 @@ AC_DEFUN([KDE_USE_QT],
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
ac_cxxflags_safe="$CXXFLAGS"
CXXFLAGS="-I/usr/include/tqt"
CXXFLAGS="$CXXFLAGS -I/usr/include/tqt"
AC_TRY_COMPILE([
#define TQT_VERSION_ONLY
#include <tqt.h>
@ -1252,7 +1252,7 @@ AC_DEFUN([KDE_USE_QT],
AC_MSG_RESULT(Detected TQt3...)
fi
if test "$kde_qtver" = "4"; then
AC_MSG_RESULT(Detected T Qt4...)
AC_MSG_RESULT(Detected Qt4...)
fi
#else
@ -1798,9 +1798,12 @@ cat > actest.ui << EOF
</property>
</widget>
</widget>
<includes>
<include location="global" impldecl="in implementation">klineedit.h</include>
</includes>
</UI>
EOF
kde_cv_uic_plugins=no
@ -2234,12 +2237,12 @@ if test "$kde_qtver" = "4"; then
kde_cv_have_kdeqtaddon=yes,
kde_cv_have_kdeqtaddon=no
)
fi
LDFLAGS=$kde_ldflags_safe
LIBS=$kde_libs_safe
CXXFLAGS=$kde_cxxflags_safe
])
fi
AC_MSG_RESULT($kde_cv_have_kdeqtaddon)
@ -2858,9 +2861,7 @@ dnl all_libraries="$all_libraries $LIBTQT_LDFLAGS"
if test "$build_arts" '!=' "no"; then
KDE_FIND_PATH(mcopidl, TQTMCOPIDL, [$kde_default_bindirs], [KDE_MISSING_ARTS_ERROR(mcopidl)])
fi
if test -n "$trinity2ornewer"; then
KDE_FIND_PATH(dcopidlng, TQTDCOPIDLNG, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidlng)])
fi
KDE_FIND_PATH(dcopidlng, TQTDCOPIDLNG, [$kde_default_bindirs], [KDE_MISSING_PROG_ERROR(dcopidlng)])
AC_SUBST(TQTDCOPIDL)
AC_SUBST(TQTMCOPIDL)
@ -3507,8 +3508,8 @@ AC_DEFUN([AC_CHECK_COMPILERS],
CXXFLAGS="-Wall -W -Wpointer-arith $CXXFLAGS"
case $host in
*-*-linux-gnu)
CFLAGS="-std=iso9899:1990 - W -Wall -Wchar-subscripts -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -D_XOPEN_SOURCE=500 -D_BSD_SOURCE $CFLAGS"
CXXFLAGS="-ansi - D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wchar-subscripts $CXXFLAGS"
CFLAGS="-W -Wall -Wchar-subscripts -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -D_XOPEN_SOURCE=500 -D_BSD_SOURCE $CFLAGS"
CXXFLAGS="-D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wchar-subscripts $CXXFLAGS"
KDE_CHECK_COMPILER_FLAG(Wmissing-format-attribute, [CXXFLAGS="$CXXFLAGS -Wformat-security -Wmissing-format-attribute"])
KDE_CHECK_C_COMPILER_FLAG(Wmissing-format-attribute, [CFLAGS="$CFLAGS -Wformat-security -Wmissing-format-attribute"])
;;
@ -3963,8 +3964,6 @@ AC_DEFUN([AC_CHECK_SOCKLEN_T],
fi
AC_DEFINE_UNQUOTED(kde_socklen_t, $kde_cv_socklen_t_equiv,
[type to use in place of socklen_t if not defined])
AC_DEFINE_UNQUOTED(ksize_t, $kde_cv_socklen_t_equiv,
[type to use in place of socklen_t if not defined (deprecated, use kde_socklen_t)])
])
dnl This is a merge of some macros out of the gettext aclocal.m4
@ -4881,7 +4880,8 @@ fi
PYTHONINC=-I$python_incdir
python_libdirs="$ac_python_dir/lib$kdelibsuff /usr/lib$kdelibsuff /usr/local /usr/lib$kdelibsuff $kde_extra_libs"
python_multiarch_libdirs="`find /usr/lib/ -maxdepth 1 -type d | xargs echo`"
python_libdirs="$ac_python_dir/lib$kdelibsuff /usr/lib$kdelibsuff /usr/local /usr/lib$kdelibsuff $python_multiarch_libdirs $kde_extra_libs"
AC_FIND_FILE(libpython$version.so, $python_libdirs, python_libdir)
if test ! -r $python_libdir/libpython$version.so; then
AC_FIND_FILE(libpython$version.a, $python_libdirs, python_libdir)
@ -5683,8 +5683,11 @@ if test "x$kde_java_bindir" != "xno"; then
if test ! -x "$kde_java_bindir/javac"; then
AC_MSG_ERROR([javac not found under $kde_java_bindir - it seems you passed a wrong --with-java.])
fi
if test ! -x "$kde_java_bindir/javah"; then
AC_MSG_ERROR([javah not found under $kde_java_bindir. javac was found though! Use --with-java or --without-java.])
kde_javac_h=`$kde_java_bindir/javac -h 2>&1 | grep "invalid flag"`
if test -n "$kde_javac_h"; then
if test ! -x "$kde_java_bindir/javah"; then
AC_MSG_ERROR([javah not found under $kde_java_bindir. javac was found though! Use --with-java or --without-java.])
fi
fi
if test ! -x "$kde_java_bindir/jar"; then
AC_MSG_ERROR([jar not found under $kde_java_bindir. javac was found though! Use --with-java or --without-java.])
@ -5726,12 +5729,6 @@ if test "x$kde_java_bindir" != "xno"; then
dnl not needed for gcj compile
if test "x$kde_java_libgcjdir" = "x"; then
if test ! -r "$kde_java_libhpidir/libhpi.so"; then
AC_MSG_ERROR([libhpi.so not found under $kde_java_libhpidir. Use --without-java.])
fi
fi
if test -n "$jni_includes"; then
dnl Check for JNI version
AC_LANG_SAVE
@ -5768,8 +5765,12 @@ if test "x$kde_java_bindir" != "xno"; then
JAVAH=$kde_java_bindir/javah
JAR=$kde_java_bindir/jar
AC_DEFINE_UNQUOTED(PATH_JAVA, "$kde_java_bindir/java", [Define where your java executable is])
if test "x$kde_java_libgcjdir" = "x"; then
JVMLIBS="-L$kde_java_libjvmdir -ljvm -L$kde_java_libhpidir -lhpi"
if test "x$kde_java_libgcjdir" = "x"; then
if test ! -r "$kde_java_libhpidir/libhpi.so"; then
JVMLIBS="-L$kde_java_libjvmdir -ljvm"
else
JVMLIBS="-L$kde_java_libjvmdir -ljvm -L$kde_java_libhpidir -lhpi"
fi
else
JVMLIBS="-L$kde_java_libgcjdir -lgcj"
fi
@ -5794,7 +5795,23 @@ else
AC_MSG_RESULT([none found])
fi
AC_MSG_CHECKING([if Java is >= 8])
JAVA8=false
if test -x "$kde_java_bindir/javac"; then
kde_javac_h=`$kde_java_bindir/javac -h 2>&1 | grep "invalid flag"`
if test -z "$kde_javac_h"; then
JAVA8=true
JAVAH=
fi
fi
if $JAVA8; then
AC_MSG_RESULT(yes)
else
AC_MSG_RESULT(no)
fi
AC_SUBST(JAVAC)
AC_SUBST(JAVA8)
AC_SUBST(JAVAH)
AC_SUBST(JAR)
AC_SUBST(JVMLIBS)
@ -6405,63 +6422,72 @@ if test "x$enable_cppunit" = "xyes"; then
[ --enable-online-tests Include online tests with CPPUNIT tests],,
enable_online_tests=no)
AC_MSG_RESULT($enable_online_tests)
cppunit_version_min=$1
if test x$cppunit_config_exec_prefix != x ; then
cppunit_config_args="$cppunit_config_args --exec-prefix=$cppunit_config_exec_prefix"
if test x${CPPUNIT_CONFIG+set} != xset ; then
CPPUNIT_CONFIG=$cppunit_config_exec_prefix/bin/cppunit-config
if test "$PKG_CONFIG" != "no" && $PKG_CONFIG --exists cppunit; then
PKG_CHECK_MODULES(CPPUNIT, [cppunit >= $cppunit_version_min],,
[
AC_MSG_WARN(Minimum version of CPPUNIT couldn't be found. Tests will not be built)
no_cppunit=yes
])
else
if test x$cppunit_config_exec_prefix != x ; then
cppunit_config_args="$cppunit_config_args --exec-prefix=$cppunit_config_exec_prefix"
if test x${CPPUNIT_CONFIG+set} != xset ; then
CPPUNIT_CONFIG=$cppunit_config_exec_prefix/bin/cppunit-config
fi
fi
fi
if test x$cppunit_config_prefix != x ; then
cppunit_config_args="$cppunit_config_args --prefix=$cppunit_config_prefix"
if test x${CPPUNIT_CONFIG+set} != xset ; then
CPPUNIT_CONFIG=$cppunit_config_prefix/bin/cppunit-config
if test x$cppunit_con fig_prefix != x ; then
cppunit_config_args="$cppunit_config_args --prefix=$cppunit_config_prefix"
if test x${CPPUNIT_CONFIG+set} != xset ; then
CPPUNIT_CONFIG=$cppunit_config_prefix/bin/cppunit-config
fi
fi
fi
AC_PATH_PROG(CPPUNIT_CONFIG, cppunit-config, no)
cppunit_version_min=$1
AC_PATH_PROG(CPPUNIT_CONFIG, cppunit-config, no)
AC_MSG_CHECKING(for CPPUNIT - version >= $cppunit_version_min)
no_cppunit=""
if test "$CPPUNIT_CONFIG" = "no" ; then
AC_MSG_RESULT(no)
AC_MSG_WARN(Unable to locate cppunit-config. Tests will not be built)
no_cppunit=yes
else
CPPUNIT_CFLAGS=`$CPPUNIT_CONFIG --cflags`
CPPUNIT_LIBS=`$CPPUNIT_CONFIG --libs`
cppunit_version=`$CPPUNIT_CONFIG --version`
cppunit_major_version=`echo $cppunit_version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
cppunit_minor_version=`echo $cppunit_version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
cppunit_micro_version=`echo $cppunit_version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
cppunit_major_min=`echo $cppunit_version_min | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
cppunit_minor_min=`echo $cppunit_version_min | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
cppunit_micro_min=`echo $cppunit_version_min | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
cppunit_version_proper=`expr \
$cppunit_major_version \> $cppunit_major_min \| \
$cppunit_major_version \= $cppunit_major_min \& \
$cppunit_minor_version \> $cppunit_minor_min \| \
$cppunit_major_version \= $cppunit_major_min \& \
$cppunit_minor_version \= $cppunit_minor_min \& \
$cppunit_micro_version \>= $cppunit_micro_min `
if test "$cppunit_version_proper" = "1" ; then
AC_MSG_RESULT([$cppunit_major_version.$cppunit_minor_version.$cppunit_micro_version])
else
AC_MSG_RESULT(no)
AC_MSG_WARN(Minimum version of CPPUNIT couldn't be found. Tests will not be built)
no_cppunit=yes
fi
fi
AC_MSG_CHECKING(for CPPUNIT - version >= $cppunit_version_min)
no_cppunit=""
if test "$CPPUNIT_CONFIG" = "no" ; then
AC_MSG_RESULT(no)
AC_MSG_WARN(Unable to locate cppunit-config. Tests will not be built)
no_cppunit=yes
else
CPPUNIT_CFLAGS=`$CPPUNIT_CONFIG --cflags`
CPPUNIT_LIBS=`$CPPUNIT_CONFIG --libs`
cppunit_version=`$CPPUNIT_CONFIG --version`
cppunit_major_version=`echo $cppunit_version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
cppunit_minor_version=`echo $cppunit_version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
cppunit_micro_version=`echo $cppunit_version | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
cppunit_major_min=`echo $cppunit_version_min | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
cppunit_minor_min=`echo $cppunit_version_min | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
cppunit_micro_min=`echo $cppunit_version_min | \
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
cppunit_version_proper=`expr \
$cppunit_major_version \> $cppunit_major_min \| \
$cppunit_major_version \= $cppunit_major_min \& \
$cppunit_minor_version \> $cppunit_minor_min \| \
$cppunit_major_version \= $cppunit_major_min \& \
$cppunit_minor_version \= $cppunit_minor_min \& \
$cppunit_micro_version \>= $cppunit_micro_min `
if test "$cppunit_version_proper" = "1" ; then
AC_MSG_RESULT([$cppunit_major_version.$cppunit_minor_version.$cppunit_micro_version])
else
AC_MSG_RESULT(no)
AC_MSG_WARN(Minimum version of CPPUNIT couldn't be found. Tests will not be built)
no_cppunit=yes
fi
fi
else
no_cppunit=user
@ -6724,7 +6750,19 @@ AC_DEFUN([AC_SQLITE3], [
QTDIR=`dirname $MOC`
QTDIR=${QTDIR%/bin}
fi
LIBSQLITE3=${QTDIR}/plugins/sqldrivers/libsqlite3${qtlib}.so
if test "$PKG_CONFIG" != "no" ; then
if $PKG_CONFIG --exists qt-mt ; then
qt_plugins_dir="`pkg-config --variable=pluginsdir qt-mt`"
else
if $PKG_CONFIG --exists tqt-mt ; then
qt_plugins_dir="`pkg-config --variable=pluginsdir tqt-mt`"
fi
fi
fi
if test "x$qt_plugins_dir" = "x"; then
qt_plugins_dir=${QTDIR}/plugins
fi
LIBSQLITE3=${qt_plugins_dir}/sqldrivers/libqsqlite3${qtlib}.so
# do the checks
if test $enable_sqlite3 = auto; then
@ -6824,3 +6862,215 @@ EOF
AC_SUBST(LIBSQLITE3)
fi
])
# ===========================================================================
#
# SYNOPSIS
#
# TDE_CXX_COMPILE_STDCXX(VERSION, [ext|noext], [mandatory|optional])
#
# DESCRIPTION
#
# 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).
#
# 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 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
# required and that the macro should error out if no mode with that
# support is found. If specified 'optional', then configuration proceeds
# regardless, after defining HAVE_CXX${VERSION} if and only if a
# supporting mode is found.
#
# LICENSE
#
# Copyright (c) 2008 Benjamin Kosnik <bkoz@redhat.com>
# Copyright (c) 2012 Zack Weinberg <zackw@panix.com>
# Copyright (c) 2013 Roy Stogner <roystgnr@ices.utexas.edu>
# Copyright (c) 2014, 2015 Google Inc.; contributed by Alexey Sokolov <sokolov@google.com>
# Copyright (c) 2015 Paul Norman <penorman@mac.com>
# Copyright (c) 2015 Moritz Klammler <moritz@klammler.eu>
# Copyright (c) 2016, 2018 Krzesimir Nowak <qdlacz@gmail.com>
# Copyright (c) 2019 Enji Cooper <yaneurabeya@gmail.com>
# Copyright (c) 2020 Jason Merrill <jason@redhat.com>
# Copyright (c) 2021 Slávek Banko <slavek.banko@axis.cz>
#
# 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.
dnl This macro is simplified version of the macro AX_CXX_COMPILE_STDCXX
AC_DEFUN([TDE_CXX_COMPILE_STDCXX], [dnl
m4_if([$1], [11], [tde_cxx_compile_alternatives="11 0x"],
[$1], [14], [tde_cxx_compile_alternatives="14 1y"],
[$1], [17], [tde_cxx_compile_alternatives="17 1z"],
[m4_fatal([invalid first argument `$1' to TDE_CXX_COMPILE_STDCXX])])dnl
m4_if([$2], [], [],
[$2], [ext], [],
[$2], [noext], [],
[m4_fatal([invalid second argument `$2' to TDE_CXX_COMPILE_STDCXX])])dnl
m4_if([$3], [], [tde_cxx_compile_cxx$1_required=true],
[$3], [mandatory], [tde_cxx_compile_cxx$1_required=true],
[$3], [optional], [tde_cxx_compile_cxx$1_required=false],
[m4_fatal([invalid third argument `$3' to TDE_CXX_COMPILE_STDCXX])])
AC_LANG_PUSH([C++])dnl
ac_success=no
m4_if([$2], [], [dnl
AC_CACHE_CHECK(whether $CXX supports C++$1 features by default,
tde_cv_cxx_compile_cxx$1,
[AC_COMPILE_IFELSE([AC_LANG_SOURCE([_TDE_CXX_COMPILE_STDCXX_testbody_$1])],
[tde_cv_cxx_compile_cxx$1=yes],
[tde_cv_cxx_compile_cxx$1=no])])
if test x$tde_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 ${tde_cxx_compile_alternatives}; do
switch="-std=gnu++${alternative}"
cachevar=AS_TR_SH([tde_cv_cxx_compile_cxx$1_$switch])
AC_CACHE_CHECK(whether $CXX supports C++$1 features with $switch,
$cachevar,
[ac_save_CXX="$CXX"
CXX="$CXX $switch"
AC_COMPILE_IFELSE([AC_LANG_SOURCE([_TDE_CXX_COMPILE_STDCXX_testbody_$1])],
[eval $cachevar=yes],
[eval $cachevar=no])
CXX="$ac_save_CXX"])
if eval test x\$$cachevar = xyes; then
CXX="$CXX $switch"
if test -n "$CXXCPP" ; then
CXXCPP="$CXXCPP $switch"
fi
ac_success=yes
break
fi
done
fi])
m4_if([$2], [ext], [], [dnl
if test x$ac_success = xno; then
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"
for alternative in ${tde_cxx_compile_alternatives}; do
for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do
cachevar=AS_TR_SH([tde_cv_cxx_compile_cxx$1_$switch])
AC_CACHE_CHECK(whether $CXX supports C++$1 features with $switch,
$cachevar,
[ac_save_CXX="$CXX"
CXX="$CXX $switch"
AC_COMPILE_IFELSE([AC_LANG_SOURCE([_TDE_CXX_COMPILE_STDCXX_testbody_$1])],
[eval $cachevar=yes],
[eval $cachevar=no])
CXX="$ac_save_CXX"])
if eval test x\$$cachevar = xyes; then
CXX="$CXX $switch"
if test -n "$CXXCPP" ; then
CXXCPP="$CXXCPP $switch"
fi
ac_success=yes
break
fi
done
if test x$ac_success = xyes; then
break
fi
done
fi])
AC_LANG_POP([C++])
if test x$tde_cxx_compile_cxx$1_required = xtrue; then
if test x$ac_success = xno; then
AC_MSG_ERROR([*** A compiler with support for C++$1 language features is required.])
fi
fi
if test x$ac_success = xno; then
HAVE_CXX$1=0
AC_MSG_NOTICE([No compiler with C++$1 support was found])
else
HAVE_CXX$1=1
AC_DEFINE(HAVE_CXX$1,1,
[define if the compiler supports basic C++$1 syntax])
fi
AC_SUBST(HAVE_CXX$1)
])
dnl Test body for checking C++11 support
m4_define([_TDE_CXX_COMPILE_STDCXX_testbody_11],
_TDE_CXX_COMPILE_STDCXX_testbody_new_in_11
)
dnl Test body for checking C++14 support
m4_define([_TDE_CXX_COMPILE_STDCXX_testbody_14],
_TDE_CXX_COMPILE_STDCXX_testbody_new_in_11
_TDE_CXX_COMPILE_STDCXX_testbody_new_in_14
)
m4_define([_TDE_CXX_COMPILE_STDCXX_testbody_17],
_TDE_CXX_COMPILE_STDCXX_testbody_new_in_11
_TDE_CXX_COMPILE_STDCXX_testbody_new_in_14
_TDE_CXX_COMPILE_STDCXX_testbody_new_in_17
)
dnl Tests for new features in C++11
m4_define([_TDE_CXX_COMPILE_STDCXX_testbody_new_in_11], [[
#ifndef __cplusplus
#error "This is not a C++ compiler"
#elif __cplusplus < 201103L
#error "This is not a C++11 compiler"
#endif // __cplusplus >= 201103L
]])
dnl Tests for new features in C++14
m4_define([_TDE_CXX_COMPILE_STDCXX_testbody_new_in_14], [[
#ifndef __cplusplus
#error "This is not a C++ compiler"
#elif __cplusplus < 201402L
#error "This is not a C++14 compiler"
#endif // __cplusplus >= 201402L
]])
dnl Tests for new features in C++17
m4_define([_TDE_CXX_COMPILE_STDCXX_testbody_new_in_17], [[
#ifndef __cplusplus
#error "This is not a C++ compiler"
#elif __cplusplus < 201703L
#error "This is not a C++17 compiler"
#endif // __cplusplus >= 201703L
]])