2014-04-19 23:47:08 +04:00
|
|
|
# Checking for pkg-config. If found, check for QtCore and query pkg-config
|
|
|
|
# for its exec-prefix variable.
|
|
|
|
|
|
|
|
# FIND_QT5()
|
|
|
|
# Sets the QT_QMAKE variable to the path of Qt5 qmake if found.
|
|
|
|
# --------------------------------------
|
|
|
|
AC_DEFUN([FIND_QT5],
|
2019-03-03 21:33:17 +03:00
|
|
|
[PKG_CHECK_EXISTS([Qt5Core >= 5.9.0],
|
2014-04-19 23:47:08 +04:00
|
|
|
[PKG_CHECK_VAR(QT_QMAKE,
|
2019-03-03 21:33:17 +03:00
|
|
|
[Qt5Core >= 5.9.0],
|
2014-11-26 16:26:12 +03:00
|
|
|
[host_bins])
|
2014-04-19 23:47:08 +04:00
|
|
|
])
|
|
|
|
|
2016-01-21 02:26:55 +03:00
|
|
|
AS_IF([test -f "$QT_QMAKE/qmake"],
|
2014-11-23 21:24:57 +03:00
|
|
|
[QT_QMAKE="$QT_QMAKE/qmake"],
|
2017-02-07 00:00:22 +03:00
|
|
|
[AS_IF([test -f "$QT_QMAKE/qmake-qt5"],
|
2014-11-23 21:24:57 +03:00
|
|
|
[QT_QMAKE="$QT_QMAKE/qmake-qt5"],
|
|
|
|
[QT_QMAKE=""])
|
|
|
|
])
|
2014-11-26 16:28:07 +03:00
|
|
|
|
2019-03-03 21:33:17 +03:00
|
|
|
AC_MSG_CHECKING([for Qt5 qmake >= 5.9.0])
|
2014-04-19 23:47:08 +04:00
|
|
|
AS_IF([test "x$QT_QMAKE" != "x"],
|
|
|
|
[AC_MSG_RESULT([$QT_QMAKE])],
|
|
|
|
[AC_MSG_RESULT([not found])]
|
|
|
|
)
|
|
|
|
])
|
|
|
|
|
|
|
|
# FIND_QTDBUS()
|
|
|
|
# Sets the HAVE_QTDBUS variable to true or false.
|
|
|
|
# --------------------------------------
|
|
|
|
AC_DEFUN([FIND_QTDBUS],
|
2019-03-03 21:33:17 +03:00
|
|
|
[AC_MSG_CHECKING([for Qt5DBus >= 5.9.0])
|
|
|
|
PKG_CHECK_EXISTS([Qt5DBus >= 5.9.0],
|
2014-04-19 23:47:08 +04:00
|
|
|
[AC_MSG_RESULT([found])
|
|
|
|
HAVE_QTDBUS=[true]],
|
|
|
|
[AC_MSG_RESULT([not found])
|
|
|
|
HAVE_QTDBUS=[false]])
|
|
|
|
])
|
2018-11-24 01:12:38 +03:00
|
|
|
|
2018-12-24 08:23:25 +03:00
|
|
|
# DETECT_CPP14_PROGRAM()
|
|
|
|
# Detects if at least C++14 mode is enabled.
|
2018-11-24 01:12:38 +03:00
|
|
|
# --------------------------------------
|
2018-12-24 08:23:25 +03:00
|
|
|
AC_DEFUN([DETECT_CPP14_PROGRAM],
|
2018-11-24 01:12:38 +03:00
|
|
|
[AC_LANG_PROGRAM([[
|
|
|
|
#ifndef __cplusplus
|
|
|
|
#error "This is not a C++ compiler"
|
2018-12-24 08:23:25 +03:00
|
|
|
#elif __cplusplus < 201402L
|
|
|
|
#error "This is not a C++14 compiler"
|
2018-11-24 01:12:38 +03:00
|
|
|
#endif]],
|
|
|
|
[[]])
|
|
|
|
])
|