Salome HOME
Merge from V6_main 01/04/2013
[modules/gui.git] / adm_local / unix / config_files / check_qt.m4
1 dnl Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
2 dnl
3 dnl Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 dnl CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5 dnl
6 dnl This library is free software; you can redistribute it and/or
7 dnl modify it under the terms of the GNU Lesser General Public
8 dnl License as published by the Free Software Foundation; either
9 dnl version 2.1 of the License.
10 dnl
11 dnl This library is distributed in the hope that it will be useful,
12 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
13 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14 dnl Lesser General Public License for more details.
15 dnl
16 dnl You should have received a copy of the GNU Lesser General Public
17 dnl License along with this library; if not, write to the Free Software
18 dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
19 dnl
20 dnl See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 dnl
22
23 dnl  OPTIONS_QT
24 dnl  ------------------------------------------------------------------------
25 dnl  Adds the --with-qt=path
26 dnl
27 AC_DEFUN([OPTIONS_QT], [
28   AC_ARG_WITH([qt],
29               [AC_HELP_STRING([--with-qt], [Possible usage:
30                                              "Qt_Install_Path" - prefix to path where Qt was installd;
31                                              "" or "yes" or "auto" - means seaching installed Qt product in the system (checking $QTDIR and then - standard system paths );
32                                              "no" - not use Qt product (is not supported)
33                                             By default "" option is used)])],
34               [with_qt=$withval], [with_qt=""])
35 ])
36
37 AC_DEFUN([CHECK_QT],[
38 AC_REQUIRE([AC_PROG_CC])dnl
39 AC_REQUIRE([AC_PROG_CXX])dnl
40 AC_REQUIRE([AC_PROG_CPP])dnl
41 AC_REQUIRE([AC_PROG_CXXCPP])dnl
42 AC_REQUIRE([CHECK_OPENGL])dnl
43 AC_REQUIRE([AC_LINKER_OPTIONS])dnl
44 AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
45
46 AC_REQUIRE([OPTIONS_QT])dnl
47
48 AC_CHECKING(for Qt)
49
50 if test "x$OpenGL_ok" != "xyes" ; then
51    AC_MSG_WARN(Qt needs OpenGL correct configuration, check configure output)
52 fi
53
54 qt_ok=yes
55
56 QTDIR=$(echo $QTDIR | sed 's%[/]\+$%%')
57
58 AC_LANG_SAVE
59 AC_LANG_CPLUSPLUS
60
61 dnl QT install dir
62 if test -z $with_qt ; then
63   with_qt=""
64 fi
65 if test "x$with_qt" = "xyes" ; then
66   dnl in case user wrote --with-qt=yes
67   with_qt=""
68 fi
69 if test "x$with_qt" = "xauto" ; then
70   dnl in case user wrote --with-qt=auto
71   with_qt=""
72 fi
73 if test "x$with_qt" = "xno" ; then
74   dnl in case user wrote --with-qt=no
75   with_qt=""
76   AC_MSG_WARN(Value no, specified for option --with-qt, is not supported)
77 fi
78
79 if test "x$with_qt" != "x" ; then
80   dnl Using "--with-qt" prefix path
81   QTDIR="$with_qt"
82 elif test "$QTDIR" = "/usr/lib/qt3" ; then
83   dnl Using QTDIR environment variable
84   AC_MSG_RESULT(current QTDIR is $QTDIR)
85   dnl 
86   if test -d /usr/lib/qt4 ; then
87     AC_MSG_RESULT(it is strange for a qt4 installation !)
88     AC_MSG_RESULT(/usr/lib/qt4 is present)
89     AC_MSG_RESULT(replacing QTDIR by /usr/lib/qt4)
90     QTDIR=/usr/lib/qt4
91   fi
92 elif test -z $QTDIR ; then
93   AC_MSG_WARN(undefined QTDIR variable which specify where Qt product was installed, trying to guess using pkg-config)
94   PKG_PROG_PKG_CONFIG()
95   AS_IF([test "x$PKG_CONFIG" != "x"],
96     [
97       QT_REQUIRED_VERSION=4.0.0
98       if $PKG_CONFIG --exists "QtCore >= $QT_REQUIRED_VERSION"
99       then
100         QT_USING_PKGCONFIG=yes
101         QT_VERSION=`$PKG_CONFIG --modversion QtCore --atleast-version=$QT_REQUIRED_VERSION`
102         QT_VERSION_ID=`echo $QT_VERSION | awk -F. '{v=$[1]*10000+$[2]*100+$[3];print v}'`
103
104         MOC=`$PKG_CONFIG --variable=moc_location "QtCore >= $QT_REQUIRED_VERSION"`
105         UIC=`$PKG_CONFIG --variable=uic_location "QtCore >= $QT_REQUIRED_VERSION"`
106         QRCC=`$PKG_CONFIG --variable=rcc_location "QtCore >= $QT_REQUIRED_VERSION"`
107         LRELEASE=`$PKG_CONFIG --variable=lrelease_location "QtCore >= $QT_REQUIRED_VERSION"`
108
109         QTCORE_CPPFLAGS=`$PKG_CONFIG --cflags "QtCore >= $QT_REQUIRED_VERSION"`
110         QTGUI_CPPFLAGS=`$PKG_CONFIG --cflags "QtGui >= $QT_REQUIRED_VERSION"`
111         QTOPENGL_CPPFLAGS=`$PKG_CONFIG --cflags "QtOpenGL >= $QT_REQUIRED_VERSION"`
112         QTXML_CPPFLAGS=`$PKG_CONFIG --cflags "QtXml >= $QT_REQUIRED_VERSION"`
113         QTASSISTANT_CPPFLAGS=`$PKG_CONFIG --cflags "QtAssistant >= $QT_REQUIRED_VERSION"`
114         QTNETWORK_CPPFLAGS=`$PKG_CONFIG --cflags "QtNetwork >= $QT_REQUIRED_VERSION"`
115         QTWEBKIT_CPPFLAGS=`$PKG_CONFIG --cflags "QtWebKit >= $QT_REQUIRED_VERSION"`
116
117         QTCORE_LDFLAGS=`$PKG_CONFIG --libs "QtCore >= $QT_REQUIRED_VERSION"`
118         QTGUI_LDFLAGS=`$PKG_CONFIG --libs "QtGui >= $QT_REQUIRED_VERSION"`
119         QTOPENGL_LDFLAGS=`$PKG_CONFIG --libs "QtOpenGL >= $QT_REQUIRED_VERSION"`
120         QTXML_LDFLAGS=`$PKG_CONFIG --libs "QtXml >= $QT_REQUIRED_VERSION"`
121         QTASSISTANT_LDFLAGS=`$PKG_CONFIG --libs "QtAssistant >= $QT_REQUIRED_VERSION"`
122         QTNETWORK_LDFLAGS=`$PKG_CONFIG --libs "QtNetwork >= $QT_REQUIRED_VERSION"`
123         QTWEBKIT_LDFLAGS=`$PKG_CONFIG --libs "QtWebKit >= $QT_REQUIRED_VERSION"`
124       else
125         AC_MSG_WARN(Qt not found)
126       fi
127     ],
128     [
129       AC_MSG_WARN([pkg-config not found])
130     ]
131   )
132 fi
133 if test -z $QTDIR ; then
134   AC_MSG_WARN(undefined QTDIR variable which specify where Qt product was installed)
135   for d in /usr/local/lib/qt4 /usr/lib/qt4 /usr ; do
136     if test -f ${d}/lib/libQtCore.so ; then
137       AC_MSG_RESULT(trying ${d})
138       QTDIR="${d}"
139       break
140     elif test -f ${d}/lib64/libQtCore.so ; then
141       AC_MSG_RESULT(trying ${d})
142       QTDIR="${d}"
143       break
144     elif test -f ${d}/libQtCore.so ; then
145       AC_MSG_RESULT(trying ${d})
146       QTDIR="${d}"
147       break
148     fi
149   done
150 fi
151 #
152 # check QTDIR environment variable
153 #
154 if test "x$QTDIR" = "x" -a "x$QT_USING_PKGCONFIG" != "xyes"
155 then
156    AC_MSG_RESULT(Please define correct path in "--with-qt" option or use correct $QTDIR variable)
157    qt_ok=no
158 fi
159
160 #
161 # check Qt version
162 #
163 if  test "x$qt_ok" = "xyes"
164 then
165    AC_MSG_CHECKING(whether Qt version >= 4.0)
166    if test "x$QT_USING_PKGCONFIG" != "xyes"
167    then
168      qt_inc_ok=no
169      QTINC=""
170      AC_CHECK_FILE(${QTDIR}/include/qt4/QtCore/qglobal.h,QTINC="/qt4",QTINC="")
171      if test "x$QTINC" = "x"
172      then
173        AC_CHECK_FILE(${QTDIR}/include${QTINC}/QtCore/qglobal.h,qt_inc_ok=yes,qt_inc_ok=no)
174      else
175        qt_inc_ok=yes
176      fi
177
178      if test "x$qt_inc_ok" = "xyes"
179      then
180        QT_VERSION=`grep "QT_VERSION_STR" ${QTDIR}/include${QTINC}/QtCore/qglobal.h | sed -e 's%^#define QT_VERSION_STR[[:space:]]*\"\([[:digit:]\.]*\)\"%\1%g'`
181      fi
182    fi
183
184
185   if test "x$qt_inc_ok" = "xyes" -o "x$QT_USING_PKGCONFIG" = "xyes"
186   then
187      QT_VERSION_ID=`echo $QT_VERSION | awk -F. '{v=$[1]*10000+$[2]*100+$[3];print v}'`
188      if test $QT_VERSION_ID -ge 40000
189      then
190        AC_MSG_RESULT(yes)
191      else
192        AC_MSG_RESULT(no)
193        qt_ok=no
194      fi
195      AC_MSG_CHECKING(Qt version)
196      AC_MSG_RESULT($QT_VERSION)
197    else
198      qt_ok=no
199    fi
200 fi
201
202 #
203 # check moc presence (meta-object compiler)
204 #
205 qt_add=no
206
207 if  test "x$qt_ok" = "xyes"
208 then
209   if test "x$QT_USING_PKGCONFIG" != "xyes"
210   then
211     if test -f ${QTDIR}/bin/moc
212     then
213       MOC=${QTDIR}/bin/moc
214     else
215       AC_PATH_PROG(MOC, moc)
216     fi
217   fi
218
219   if test "x$MOC" = "x"
220   then
221     qt_ok=no
222     AC_MSG_RESULT(moc (Qt meta-object compiler) is not in the PATH variable)
223   else
224     qt_ok=yes
225     AC_MSG_RESULT(moc (Qt meta-object compiler) is found)
226   fi
227
228   if test "x$qt_ok" = "xyes"
229   then
230     dnl check moc version
231     AC_MSG_CHECKING( equality Qt and moc tool version)
232     MOC_VERSION=`$MOC -v 2>&1 | awk 'BEGIN{FS="[[ ()]]"};{print $(NF-1)}'`
233     if test "x$QT_VERSION" = "x$MOC_VERSION"
234     then
235       AC_MSG_RESULT(yes)
236       qt_ok=yes
237     else
238       AC_MSG_RESULT(moc tool and Qt product are incompatible $MOC_VERSION)
239       QT_VERSION_MAJ=`echo $QT_VERSION | awk -F. '{v=$[1];print v}'`
240       AC_MSG_CHECKING(for moc-qt$QT_VERSION_MAJ compatible version)
241       if test -f ${QTDIR}/bin/moc-qt$QT_VERSION_MAJ
242       then
243         MOC=${QTDIR}/bin/moc-qt$QT_VERSION_MAJ
244         qt_ok=yes
245         qt_add=$QT_VERSION_MAJ
246         AC_MSG_RESULT(yes)
247       else
248         AC_MSG_RESULT(no)
249         qt_ok=no
250       fi
251     fi
252   fi
253 fi
254 AC_MSG_CHECKING(moc tool and Qt product done)
255 AC_MSG_RESULT(yes)
256
257 #
258 # check uic presence (user interface compiler)
259 #
260 if  test "x$qt_ok" = "xyes"
261 then
262   if test "x$QT_USING_PKGCONFIG" != "xyes"
263   then
264     if test "x$qt_add" = "xno"
265     then
266        AC_MSG_CHECKING(uic)
267        if test -f ${QTDIR}/bin/uic
268        then
269          UIC=${QTDIR}/bin/uic
270        else
271          AC_PATH_PROG(UIC, uic)
272        fi
273        AC_MSG_RESULT(yes)
274     else
275        AC_MSG_CHECKING(uic-qt$qt_add)
276        if test -f ${QTDIR}/bin/uic-qt$qt_add
277        then
278          UIC=${QTDIR}/bin/uic-qt$qt_add
279        else
280          AC_PATH_PROG(UIC, uic)
281        fi
282        AC_MSG_RESULT(yes)
283     fi
284   fi
285
286   if test "x$UIC" = "x"
287   then
288     qt_ok=no
289     AC_MSG_RESULT(uic (Qt user interface compiler) is not in the PATH variable)
290   else
291     qt_ok=yes
292     AC_MSG_RESULT(uic (Qt user interface compiler) is found)
293   fi
294
295   if test "x$qt_ok" = "xyes"
296   then
297     dnl check uic version
298     AC_MSG_CHECKING(cheching equality Qt and uic tool version)
299     UIC_VERSION=`$UIC -version 2>&1 | awk '{print $NF}'`
300     if test "x$QT_VERSION" = "x$UIC_VERSION"
301     then
302       AC_MSG_RESULT(yes)
303       qt_ok=yes
304     else
305       AC_MSG_RESULT(uic tool and Qt product are incompatible)
306       qt_ok=no
307     fi
308   fi
309 fi
310
311 #
312 # check rcc presence (resources compiler)
313 #
314 if  test "x$qt_ok" = "xyes"
315 then
316   if test "x$QT_USING_PKGONFIG" != "xyes"
317   then
318     if test "x$qt_add" = "xno"
319     then
320        if test -f ${QTDIR}/bin/rcc
321        then
322          QRCC=${QTDIR}/bin/rcc
323        else
324          AC_PATH_PROG(QRCC, rcc)
325        fi
326     else
327        if test -f ${QTDIR}/bin/rcc-qt$qt_add
328        then
329          QRCC=${QTDIR}/bin/rcc-qt$qt_add
330        else
331          AC_PATH_PROG(QRCC, rcc)
332        fi
333     fi
334   fi
335
336   if test "x$QRCC" = "x"
337   then
338     qt_ok=no
339     AC_MSG_RESULT(rcc (Qt resources compiler) is not in the PATH variable)
340   else
341     qt_ok=yes
342     AC_MSG_RESULT(rcc (Qt resources compiler) is found)
343   fi
344
345   if test "x$qt_ok" = "xyes"
346   then
347     dnl check rcc version
348     AC_MSG_CHECKING(cheching equality Qt and rcc tool version)
349     QRCC_VERSION=`$QRCC -v 2>&1 | awk '{print $NF}'`
350     if test "x$QT_VERSION" = "x$QRCC_VERSION"
351     then
352       AC_MSG_RESULT(yes)
353       qt_ok=yes
354     else
355       AC_MSG_RESULT(rcc tool and Qt product are incompatible)
356       qt_ok=no
357     fi
358   fi
359 fi
360
361 #
362 # check lrelease presence (translation files compiler)
363 #
364 if  test "x$qt_ok" = "xyes"
365 then
366   if test "x$QT_USING_PKGCONFIG" != "xyes"
367   then
368     if test "x$qt_add" = "xno"
369     then
370        if test -f ${QTDIR}/bin/lrelease
371        then
372          LRELEASE=${QTDIR}/bin/lrelease
373        else
374          AC_PATH_PROG(LRELEASE, lrelease)
375        fi
376     else
377        if test -f ${QTDIR}/bin/lrelease-qt$qt_add
378        then
379          LRELEASE=${QTDIR}/bin/lrelease-qt$qt_add
380        else
381          AC_PATH_PROG(LRELEASE, lrelease)
382        fi
383     fi
384   fi
385
386   if test "x$LRELEASE" = "x"
387   then
388     qt_ok=no
389     AC_MSG_RESULT(lrelease (Qt translation files compiler) is not in the PATH variable)
390   else
391     qt_ok=yes
392     AC_MSG_RESULT(lrelease (Qt translation files compiler) is found)
393   fi
394   
395   if test "x$qt_ok" = "xyes"
396   then
397     dnl check lrelease version
398     AC_MSG_CHECKING( equality of Qt and lrelease tool version)
399     LRELEASE_VERSION=`$LRELEASE -version 2>&1 | awk '{print $NF}'`
400     if test "x$QT_VERSION" = "x$LRELEASE_VERSION"
401     then
402       AC_MSG_RESULT(yes)
403       qt_ok=yes
404     else
405       AC_MSG_RESULT(lrelease tool and Qt product are incompatible)
406       qt_ok=no
407     fi
408   fi
409 fi
410
411 QT_ROOT=$QTDIR
412
413 #
414 # check Qt header files
415 #
416 if  test "x$qt_ok" = "xyes"
417 then
418   AC_CHECKING(include Qt header files)
419
420   CPPFLAGS_old=$CPPFLAGS
421   if test "x$QT_USING_PKGCONFIG" != "xyes"
422   then
423     CPPFLAGS="$CPPFLAGS -I${QTDIR}/include${QTINC} -I${QTDIR}/include${QTINC}/QtCore"
424   else
425     CPPFLAGS="$CPPFLAGS $QTCORE_CPPFLAGS"
426   fi
427   AC_CHECK_HEADER(QObject,qt_ok=yes,qt_ok=no)
428   CPPFLAGS=$CPPFLAGS_old
429
430   if  test "x$qt_ok" = "xno"
431   then
432     AC_MSG_RESULT(qt header files are not found in $QTDIR/include${QTINC}/QtCore)
433     AC_MSG_RESULT(QTDIR environment variable may be wrong (probably too old Qt version))
434   else
435     AC_MSG_RESULT(qt header files seem to be OK)
436     if test "x$QT_USING_PKGCONFIG" != "xyes"
437     then
438        QT_BASE="-I${QTDIR}/include${QTINC}"
439        # user header files
440        QTCORE_CPPFLAGS="${QT_BASE}/QtCore"
441        QTGUI_CPPFLAGS="${QT_BASE}/QtGui"
442        QTOPENGL_CPPFLAGS="${QT_BASE}/QtOpenGL"
443        QTWEBKIT_CPPFLAGS="${QT_BASE}/QtWebKit"
444        QTXML_CPPFLAGS="${QT_BASE}/QtXml"
445
446        QTASSISTANT_CPPFLAGS="${QT_BASE}/QtAssistant"
447        QTNETWORK_CPPFLAGS="${QT_BASE}/QtNetwork"
448      fi
449
450      QT_INCLUDES="$QT_BASE $QTCORE_CPPFLAGS $QTGUI_CPPFLAGS $QTOPENGL_CPPFLAGS $QTXML_CPPFLAGS $QTWEBKIT_CPPFLAGS"
451
452      QT_ASSISTANT_INCLUDES="$QTASSISTANT_CPPFLAGS $QTNETWORK_CPPFLAGS"
453      QT_MT_INCLUDES="${QT_INCLUDES}"
454   fi
455 fi
456
457 #
458 # test Qt libraries
459 #
460 if  test "x$qt_ok" = "xyes"
461 then
462   AC_MSG_CHECKING(linking against Qt library)
463
464   CXXFLAGS_old=$CXXFLAGS
465   CXXFLAGS="$CXXFLAGS $QT_INCLUDES"
466
467   LIBS_old=$LIBS
468   if test "x$QT_USING_PKGCONFIG" = "xyes"
469   then
470     LIBS="$LIBS $QTCORE_LDFLAGS"
471   else
472     if test "x$QTDIR" = "x/usr" ; then
473       QT_LIB_DIR=""
474     elif test -d ${QTDIR}/lib; then
475       QT_LIB_DIR="-L$QTDIR/lib"
476     elif test -d ${QTDIR}/lib64; then
477       QT_LIB_DIR="-L$QTDIR/lib64"
478     elif test "x$QTDIR" = "x/usr/lib/qt4" ; then
479       QT_LIB_DIR=""
480     else
481       AC_MSG_ERROR(Can't detect Qt library directory )  #'
482       qt_ok=no
483     fi
484     LIBS="$LIBS $QT_LIB_DIR -lQtCore"
485   fi
486
487   AC_CACHE_VAL(salome_cv_lib_qt,[
488     AC_TRY_LINK(
489 #include <QCoreApplication>
490 ,   int n;
491     char **s;
492     QCoreApplication a(n, s);
493     a.exec();,
494     eval "salome_cv_lib_qt=yes",eval "salome_cv_lib_qt=no")
495   ])
496   qt_ok="$salome_cv_lib_qt"
497
498   # BEGIN: for CCRT (installation of qt have only a "lib" directory)
499   if  test "x$qt_ok" = "xno"
500   then
501     QT_LIB_DIR="-L$QTDIR/lib"
502     LIBS="$LIBS_old $QT_LIB_DIR -lQtCore"
503
504     AC_CACHE_VAL(salome_cv_lib_qt,[
505       AC_TRY_LINK(
506 #include <QCoreApplication>
507 ,     int n;
508       char **s;
509       QCoreApplication a(n, s);
510       a.exec();,
511       eval "salome_cv_lib_qt=yes",eval "salome_cv_lib_qt=no")
512     ])
513     qt_ok="$salome_cv_lib_qt"
514   fi
515   # END: for CCRT
516
517   if  test "x$qt_ok" = "xno"
518   then
519     AC_MSG_RESULT(no)
520     AC_MSG_RESULT(unable to link with qt library)
521     AC_MSG_RESULT(QTDIR environment variable may be wrong (probably too old Qt version))
522   else
523     AC_MSG_RESULT(yes)
524     # core libs
525     if test "x$QT_USING_PKGCONFIG" = "xyes"
526     then
527       QT_CORE_LIBS="$QTCORE_LDFLAGS $QTXML_LDFLAGS"
528       QT_GUI_LIBS="$QTGUI_LDFLAGS $QTOPENGL_LDFLAGS $QTWEBKIT_LDFLAGS"
529       QT_ASSISTANT_LIBS="$QTASSISTANT_LDFLAGS $QTNETWORK_LDFLAGS"
530     else
531       QT_CORE_LIBS="$QT_LIB_DIR -lQtCore -lQtXml"
532       # gui libs
533       QT_GUI_LIBS="$QT_LIB_DIR -lQtGui -lQtOpenGL -lQtWebKit"
534       # other libs (currently not used)
535       QT_OTHER_LIBS="$QT_LIB_DIR"
536       # other libs (can be used if necessary)
537       #QT_OTHER_LIBS="$QT_LIB_DIR -lQt3Support -lQtAssistantClient -lQtDesigner -lQtNetwork -lQtSql -lQtSvg -lQtTest -ltQtUiTools"
538       QT_ASSISTANT_LIBS="$QT_LIB_DIR -lQtAssistantClient -lQtNetwork"
539     fi
540     # all libs
541     QT_LIBS="$QT_CORE_LIBS $QT_GUI_LIBS $QT_OTHER_LIBS"
542     # this flag is obsolete with Qt 4
543     QT_MT_LIBS="$QT_LIBS"
544   fi
545   LIBS=$LIBS_old
546   CXXFLAGS=$CXXFLAGS_old
547 fi
548
549 AC_SUBST(QTDIR)
550 AC_SUBST(MOC)
551 AC_SUBST(UIC)
552 AC_SUBST(QRCC)
553 AC_SUBST(LRELEASE)
554
555 AC_SUBST(QT_ROOT)
556 AC_SUBST(QT_INCLUDES)
557 AC_SUBST(QT_MT_INCLUDES)
558 AC_SUBST(QT_ASSISTANT_INCLUDES)
559 AC_SUBST(QT_LIB_DIR)
560 AC_SUBST(QT_CORE_LIBS)
561 AC_SUBST(QT_GUI_LIBS)
562 AC_SUBST(QT_OTHER_LIBS)
563 AC_SUBST(QT_LIBS)
564 AC_SUBST(QT_MT_LIBS)
565 AC_SUBST(QT_ASSISTANT_LIBS)
566 AC_SUBST(QT_VERSION)
567 AC_SUBST(QT_VERSION_ID)
568
569 AC_LANG_RESTORE
570
571 AC_MSG_RESULT(for Qt: $qt_ok)
572
573 # Save cache
574 AC_CACHE_SAVE
575
576 ])dnl
577 dnl