picking up branches/tmp/sh/qt4-port/, merging it with trunk
[duncan/yast2-qt4.git] / acinclude.m4
1 ##   -*- autoconf -*-
2
3 dnl  Include file for "configure.in" for the YaST2 Qt UI
4 dnl  See file COPYING for license
5 dnl
6 dnl  Author:    Stefan Hundhammer <sh@suse.de>
7 dnl  Updated:   2007-07-25
8 dnl
9
10
11 dnl AC_MIN_QT_VERSION(numeric-qt-version, text_qt_version)
12 dnl Checks for Qt version as specified or higher
13 dnl
14 AC_DEFUN([AC_MIN_QT_VERSION],
15 [
16 AC_MSG_CHECKING([for Qt $2 or higher])
17 dnl save_CFLAGS="$CFLAGS"
18 dnl CFLAGS="$CFLAGS -I$QTDIR/include"
19
20 AC_TRY_COMPILE([
21 #include <Qt/qglobal.h>
22 ],
23 [
24 #if QT_VERSION < $1
25 #error Qt $2 or higher required!
26 #endif
27 ],
28 [AC_MSG_RESULT([yes])],
29 [AC_MSG_ERROR([Qt $2 or higher required!
30
31 Check whether the Qt base packages and the Qt development packages 
32 are installed!
33 ])]
34 )
35 dnl CFLAGS="$save_CFLAGS"
36 ])
37
38
39 dnl AC_QTDIRS
40 dnl Sets up directories for Qt
41 AC_DEFUN([AC_QTDIRS],
42 MOC=/usr/bin/moc
43 QT_INCLUDEDIR=/usr/include/Qt
44 QT_LIBDIR=/usr/lib
45 QT_SHAREDIR=/usr/share/qt4
46 QT_TRANSLATIONSDIR=${QT_SHAREDIR}/translations
47 QT_PLUGINDIR=/usr/lib/qt4/plugins
48 AC_SUBST(MOC)
49 AC_SUBST(QT_INCLUDEDIR)
50 AC_SUBST(QT_LIBDIR)
51 AC_SUBST(QT_SHAREDIR)
52 AC_SUBST(QT_TRANSLATIONSDIR)
53 AC_SUBST(QT_PLUGINDIR)
54 )