1 AC_DEFUN([QT_CONFIG_OPTIONS],
5 [AS_HELP_STRING([--with-moc=PATH],
6 [Search in PATH for Qt's meta object compiler])],
7 [QT_MOC=$withval], [QT_MOC=""])
10 AC_DEFUN([CHECK_MOC_VERSION],
12 AS_IF([test -z ${QT_MOC}],
14 AC_PATH_PROGS(QT_MOC, moc-qt4 moc)
15 AS_IF([test -z ${QT_MOC}],
22 AC_MSG_CHECKING(for moc)
23 AS_IF([test -x ${QT_MOC}],
25 AC_MSG_RESULT(${QT_MOC})
29 AC_MSG_RESULT("not found")
36 AS_IF([test "${QT_MOC}" != "not found"],
38 AC_MSG_CHECKING(for moc version >= 4)
39 QT_MOC_VERSION=`${QT_MOC} -v 2>&1 | sed -e 's/^.* (/(/'`
40 AS_IF([test `echo ${QT_MOC_VERSION} | sed -e 's/^.* //' -e 's/\..*$//'` = 4],
42 AC_MSG_RESULT(found ${QT_MOC_VERSION})
45 AC_MSG_RESULT(not found ${QT_MOC_VERSION} is too old)
52 AC_DEFUN([CHECK_QT_HEADERS],
54 AC_REQUIRE([PKG_PROG_PKG_CONFIG])
55 AC_MSG_CHECKING(for qt)
56 AS_IF([test `${PKG_CONFIG} QtCore` --exists && `${PKG_CONFIG} QtGui --exists`],
59 AC_MSG_CHECKING(for qt core cflags)
60 QT_CORE_CXXFLAGS=`${PKG_CONFIG} --cflags QtCore`
61 AC_MSG_RESULT($QT_CORE_CFLAGS)
62 AC_MSG_CHECKING(for qt core libs)
63 QT_CORE_LIBS=`${PKG_CONFIG} --libs QtCore`
64 AC_MSG_RESULT($QT_CORE_LIBS)
65 AC_MSG_CHECKING(for qt gui cflags)
66 QT_GUI_CXXFLAGS=`${PKG_CONFIG} --cflags QtGui`
67 AC_MSG_RESULT($QT_GUI_CFLAGS)
68 AC_MSG_CHECKING(for qt gui libs)
69 QT_GUI_LIBS=`${PKG_CONFIG} --libs QtGui`
70 AC_MSG_RESULT($QT_GUI_LIBS)
72 [AC_MSG_RESULT(not found)]
76 AS_IF([test `${PKG_CONFIG} QtDBus --modversion | sed -e 's/\.//g'` -ge 470 ],
78 QT_DBUS_LDFLAGS="-lQtDBus"
79 AC_SUBST(QT_DBUS_LDFLAGS)
82 AC_SUBST(QT_CORE_CXXFLAGS)
83 AC_SUBST(QT_CORE_LIBS)
84 AC_SUBST(QT_GUI_CXXFLAGS)