39 lines
1.5 KiB
Diff
39 lines
1.5 KiB
Diff
Upstream: maybe
|
|
Description: Moving some runtime check to compile time check
|
|
--- a/configure.ac
|
|
+++ b/configure.ac
|
|
@@ -13410,12 +13410,13 @@ then
|
|
save_CXXFLAGS=$CXXFLAGS
|
|
CXXFLAGS="$CXXFLAGS $KF5_CFLAGS"
|
|
AC_MSG_CHECKING([whether KDE is >= 5.0])
|
|
- AC_RUN_IFELSE([AC_LANG_SOURCE([[
|
|
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
|
|
#include <kcoreaddons_version.h>
|
|
|
|
int main(int argc, char **argv) {
|
|
- if (KCOREADDONS_VERSION_MAJOR == 5 && KCOREADDONS_VERSION_MINOR >= 0) return 0;
|
|
- else return 1;
|
|
+ int a[2 * (KCOREADDONS_VERSION_MAJOR == 5 && KCOREADDONS_VERSION_MINOR >= 0) - 1];
|
|
+ a[0] = 0;
|
|
+ return a[0];
|
|
}
|
|
]])],[AC_MSG_RESULT([yes])],[AC_MSG_ERROR([KDE version too old])],[])
|
|
CXXFLAGS=$save_CXXFLAGS
|
|
@@ -13486,12 +13487,13 @@ then
|
|
CXXFLAGS="$CXXFLAGS $KF6_CFLAGS"
|
|
dnl KF6 development version as of 2023-06 uses version number 5.240
|
|
AC_MSG_CHECKING([whether KDE is >= 5.240])
|
|
- AC_RUN_IFELSE([AC_LANG_SOURCE([[
|
|
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
|
|
#include <kcoreaddons_version.h>
|
|
|
|
int main(int argc, char **argv) {
|
|
- if (KCOREADDONS_VERSION_MAJOR == 6 || (KCOREADDONS_VERSION_MAJOR == 5 && KCOREADDONS_VERSION_MINOR >= 240)) return 0;
|
|
- else return 1;
|
|
+ int a[2 *(KCOREADDONS_VERSION_MAJOR == 6 || (KCOREADDONS_VERSION_MAJOR == 5 && KCOREADDONS_VERSION_MINOR >= 240)) - 1];
|
|
+ a[0] = 0;
|
|
+ return a[0];
|
|
}
|
|
]])],[AC_MSG_RESULT([yes])],[AC_MSG_ERROR([KDE version too old])],[])
|
|
CXXFLAGS=$save_CXXFLAGS
|