]> git.lyx.org Git - features.git/blobdiff - config/qt4.m4
Prepare LyX code to compile and link with Qt5:
[features.git] / config / qt4.m4
index eea6fdf4f8723d9c56afcef1f34ae3692d345c80..3114341051d374fdd5e64092370f3532e1dbc7c2 100644 (file)
@@ -39,6 +39,7 @@ AC_DEFUN([QT4_CHECK_COMPILE],
                qt4_cv_libname=
                for libname in '-lQtCore -lQtGui' \
                               '-lQtCore4 -lQtGui4' \
+                              '-framework QtCore -framework QtConcurrent -framework QtWidgets -framework QtGui'\
                               '-framework QtCore -framework QtGui'
                do
                        QT4_TRY_LINK($libname)
@@ -197,15 +198,23 @@ AC_DEFUN([QT4_DO_MANUAL_CONFIG],
        QT4_CORE_LDFLAGS=
        if test -n "$qt4_cv_includes"; then
                QT4_INCLUDES="-I$qt4_cv_includes"
-               for i in Qt QtCore QtGui; do
+               for i in Qt QtCore QtGui QtWidgets QtConcurrent; do
                        QT4_INCLUDES="$QT4_INCLUDES -I$qt4_cv_includes/$i"
                done
                QT4_CORE_INCLUDES="-I$qt4_cv_includes -I$qt4_cv_includes/QtCore"
        fi
-       if test -n "$qt4_cv_libraries"; then
+       case "$qt4_cv_libraries" in
+       *framework*)
+               QT4_LDFLAGS="-F$qt4_cv_libraries"
+               QT4_CORE_LDFLAGS="-F$qt4_cv_libraries"
+               ;;
+       "")
+               ;;
+       *)
                QT4_LDFLAGS="-L$qt4_cv_libraries"
                QT4_CORE_LDFLAGS="-L$qt4_cv_libraries"
-       fi
+               ;;
+       esac
        AC_SUBST(QT4_INCLUDES)
        AC_SUBST(QT4_CORE_INCLUDES)
        AC_SUBST(QT4_LDFLAGS)