Don't try to remove folders for a torrent without metadata
[qBittorrent.git] / m4 / qbittorrent.m4
blob1dff738afa6a495524988eb810daea5c48e29776
1 # Checking for pkg-config. If found, check for QtCore and query pkg-config
2 # for its exec-prefix variable.
4 # FIND_QT5()
5 # Sets the QT_QMAKE variable to the path of Qt5 qmake if found.
6 # --------------------------------------
7 AC_DEFUN([FIND_QT5],
8 [PKG_CHECK_EXISTS([Qt5Core >= 5.9.0],
9                  [PKG_CHECK_VAR(QT_QMAKE,
10                                 [Qt5Core >= 5.9.0],
11                                 [host_bins])
12                  ])
14 AS_IF([test -f "$QT_QMAKE/qmake"],
15               [QT_QMAKE="$QT_QMAKE/qmake"],
16               [AS_IF([test -f "$QT_QMAKE/qmake-qt5"],
17                              [QT_QMAKE="$QT_QMAKE/qmake-qt5"],
18                              [QT_QMAKE=""])
19               ])
21 AC_MSG_CHECKING([for Qt5 qmake >= 5.9.0])
22 AS_IF([test "x$QT_QMAKE" != "x"],
23       [AC_MSG_RESULT([$QT_QMAKE])],
24       [AC_MSG_RESULT([not found])]
25       )
28 # FIND_QTDBUS()
29 # Sets the HAVE_QTDBUS variable to true or false.
30 # --------------------------------------
31 AC_DEFUN([FIND_QTDBUS],
32        [AC_MSG_CHECKING([for Qt5DBus >= 5.9.0])
33        PKG_CHECK_EXISTS([Qt5DBus >= 5.9.0],
34                         [AC_MSG_RESULT([found])
35                          HAVE_QTDBUS=[true]],
36                         [AC_MSG_RESULT([not found])
37                          HAVE_QTDBUS=[false]])
40 # DETECT_CPP14_PROGRAM()
41 # Detects if at least C++14 mode is enabled.
42 # --------------------------------------
43 AC_DEFUN([DETECT_CPP14_PROGRAM],
44        [AC_LANG_PROGRAM([[
45             #ifndef __cplusplus
46             #error "This is not a C++ compiler"
47             #elif __cplusplus < 201402L
48             #error "This is not a C++14 compiler"
49             #endif]],
50             [[]])