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)
17 AC_MSG_CHECKING(for moc)
18 AS_IF([test -x ${QT_MOC}],
20 AC_MSG_RESULT(${QT_MOC})
24 AC_MSG_RESULT("not found")
30 AS_IF([test "${QT_MOC}" != "not found"],
32 AC_MSG_CHECKING(for moc version >= 4)
33 QT_MOC_VERSION=`${QT_MOC} -v 2>&1 | sed -e 's/^.* (/(/'`
34 AS_IF([test `echo ${QT_MOC_VERSION} | sed -e 's/^.* //' -e 's/\..*$//'` = 4],
36 AC_MSG_RESULT(found ${QT_MOC_VERSION})
39 AC_MSG_RESULT(not found ${QT_MOC_VERSION} is too old)
45 AC_DEFUN([CHECK_QT_HEADERS],
47 AC_REQUIRE([PKG_PROG_PKG_CONFIG])
48 AC_MSG_CHECKING(for qt)
49 AS_IF([test `${PKG_CONFIG} QtCore` --exists && `${PKG_CONFIG} QtGui --exists`],
52 AC_MSG_CHECKING(for qt core cflags)
53 QT_CORE_CXXFLAGS=`${PKG_CONFIG} --cflags QtCore`
54 AC_MSG_RESULT($QT_CORE_CFLAGS)
55 AC_MSG_CHECKING(for qt core libs)
56 QT_CORE_LIBS=`${PKG_CONFIG} --libs QtCore`
57 AC_MSG_RESULT($QT_CORE_LIBS)
58 AC_MSG_CHECKING(for qt gui cflags)
59 QT_GUI_CXXFLAGS=`${PKG_CONFIG} --cflags QtGui`
60 AC_MSG_RESULT($QT_GUI_CFLAGS)
61 AC_MSG_CHECKING(for qt gui libs)
62 QT_GUI_LIBS=`${PKG_CONFIG} --libs QtGui`
63 AC_MSG_RESULT($QT_GUI_LIBS)
65 [AC_MSG_RESULT(not found)]
67 AC_SUBST(QT_CORE_CXXFLAGS)
68 AC_SUBST(QT_CORE_LIBS)
69 AC_SUBST(QT_GUI_CXXFLAGS)