comparison configure.ac @ 282:19eb6c4dca78

autotools: ax_have_qt sucks, use pkgconf instead this is particularly useful because m4_ax_have_qt really sucked when cross compiling because of qmake
author Paper <paper@paper.us.eu.org>
date Wed, 08 May 2024 15:54:10 -0400
parents f31305b9f60a
children 8535eb5fb836
comparison
equal deleted inserted replaced
281:3ede7be4f449 282:19eb6c4dca78
19 19
20 dnl Init libtool 20 dnl Init libtool
21 AM_PROG_AR 21 AM_PROG_AR
22 LT_INIT 22 LT_INIT
23 23
24
24 dnl Qt? 25 dnl Qt?
25 have_qt=no 26 AS_IF([test "${enable_qt}" != "no"], [
26 AX_HAVE_QT 27 PKG_CHECK_MODULES([QT], [Qt5Core >= 5.5.0 Qt5Widgets Qt5Gui Qt5Svg], [
27 28 QT_PATH="$(eval $PKG_CONFIG --variable=exec_prefix Qt5Core)"
28 AS_IF([test "x$have_qt" = "xno"], [AC_MSG_ERROR([*** Qt not found.])]) 29 QT_HOST_PATH="$(eval $PKG_CONFIG --variable=host_bins Qt5Core)"
29 AC_SUBST([QT_LRELEASE]) 30 QT_VERSION="$(eval $PKG_CONFIG --modversion Qt5Gui)"
30 AC_SUBST([QT_LUPDATE]) 31 AC_PATH_PROGS(QT_MOC, [moc-qt5 moc], moc, ["${QT_HOST_PATH}" "${QT_PATH}/bin"])
31 AC_SUBST([QT_MOC]) 32 AC_PATH_PROGS(QT_RCC, [rcc-qt5 rcc], rcc, ["${QT_HOST_PATH}" "${QT_PATH}/bin"])
32 AC_SUBST([QT_RCC]) 33 AC_PATH_PROGS(QT_UIC, [uic-qt5 uic], uic, ["${QT_HOST_PATH}" "${QT_PATH}/bin"])
34 AC_PATH_PROGS(QT_LRELEASE, [lrelease-qt5 lrelease], lrelease, ["${QT_HOST_PATH}" "${QT_PATH}/bin"])
35 AC_PATH_PROGS(QT_LUPDATE, [lupdate-qt5 lupdate], lupdate, ["${QT_HOST_PATH}" "${QT_PATH}/bin"])
36 ], [
37 AC_MSG_ERROR([${QT_PKG_ERRORS}])
38 ])
39 ])
33 40
34 dnl need this for moc 41 dnl need this for moc
35 AC_PROG_MKDIR_P 42 AC_PROG_MKDIR_P
36 AC_SUBST([MKDIR_P]) 43 AC_SUBST([MKDIR_P])
37 44