From b259938e811547b5248d31ed37d929e00a183207 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Fri, 22 Apr 2022 01:12:07 +0300 Subject: [PATCH 43/43] macOS: Add configure options --with-qt?-framework See osdn #44412 Signed-off-by: Marko Lindqvist --- m4/qt5-darwin.m4 | 18 ++++++++++++++---- m4/qt6-darwin.m4 | 18 ++++++++++++++---- 2 files changed, 28 insertions(+), 8 deletions(-) diff --git a/m4/qt5-darwin.m4 b/m4/qt5-darwin.m4 index 9a0b57c7f2..10cc52e35f 100644 --- a/m4/qt5-darwin.m4 +++ b/m4/qt5-darwin.m4 @@ -2,19 +2,27 @@ AC_DEFUN([FC_QT5_DARWIN], [ + AC_ARG_WITH([qt5-framework], + AS_HELP_STRING([--with-qt5-framework], [path to root of Qt5 framework (MacOS, autodetected if wasn't specified)]), + [qt5_path="${withval}"]) + AC_ARG_WITH([qt5_framework_bin], AS_HELP_STRING([--with-qt5-framework-bin], [path to binares of Qt5 framework (MacOS X, autodetected if wasn't specified)])) AC_CHECK_PROG([QTPATHS], [qtpaths], [qtpaths], [no]) - if test "x$QTPATHS" != "xno" ; then + if test "x$qt5_path" != "x" || test "x$QTPATHS" != "xno" ; then AC_MSG_CHECKING([Qt5 framework]) if test "x$qt5_framework_bin" = "x" ; then - qt5_framework_bin="$($QTPATHS --binaries-dir)" + if test "x$QTPATHS" != "xno" ; then + qt5_framework_bin="$($QTPATHS --binaries-dir)" + fi + fi + if test "x$qt5_path" = "x" ; then + qt5_path="$($QTPATHS --install-prefix)" fi - qt5_path="$($QTPATHS --install-prefix)" if test "x$qt5_path" != "x" ; then AC_LANG_PUSH([C++]) @@ -27,7 +35,9 @@ AC_DEFUN([FC_QT5_DARWIN], AC_LANG_POP([C++]) if test "x$qt5_libs" = "xyes" ; then - AS_IF([test "x$MOCCMD" = "x"], [MOCCMD="$qt5_framework_bin/moc"]) + if test "x$qt5_framework_bin" != "x" ; then + AS_IF([test "x$MOCCMD" = "x"], [MOCCMD="$qt5_framework_bin/moc"]) + fi AS_IF([test -x $MOCCMD], [fc_qt5_usable=true], [fc_qt5_usable=false]) else fc_qt5_usable=false diff --git a/m4/qt6-darwin.m4 b/m4/qt6-darwin.m4 index 95848bda14..ace620d46d 100644 --- a/m4/qt6-darwin.m4 +++ b/m4/qt6-darwin.m4 @@ -2,19 +2,27 @@ AC_DEFUN([FC_QT6_DARWIN], [ + AC_ARG_WITH([qt6-framework], + AS_HELP_STRING([--with-qt6-framework], [path to root of Qt6 framework (MacOS, autodetected if wasn't specified)]), + [qt6_path="${withval}"]) + AC_ARG_WITH([qt6_framework_bin], AS_HELP_STRING([--with-qt6-framework-bin], [path to binares of Qt6 framework (MacOS X, autodetected if wasn't specified)])) AC_CHECK_PROG([QTPATHS], [qtpaths], [qtpaths], [no]) - if test "x$QTPATHS" != "xno" ; then + if test "x$qt6_path" != "x" || test "x$QTPATHS" != "xno" ; then AC_MSG_CHECKING([Qt6 framework]) if test "x$qt6_framework_bin" = "x" ; then - qt6_framework_bin="$($QTPATHS --binaries-dir)" + if test "x$QTPATHS" != "xno" ; then + qt6_framework_bin="$($QTPATHS --binaries-dir)" + fi + fi + if test "x$qt6_path" = "x" ; then + qt6_path="$($QTPATHS --install-prefix)" fi - qt6_path="$($QTPATHS --install-prefix)" if test "x$qt6_path" != "x" ; then AC_LANG_PUSH([C++]) @@ -27,7 +35,9 @@ AC_DEFUN([FC_QT6_DARWIN], AC_LANG_POP([C++]) if test "x$qt6_libs" = "xyes" ; then - AS_IF([test "x$MOCCMD" = "x"], [MOCCMD="$qt6_framework_bin/moc"]) + if test "x$qt6_framework_bin" != "x" ; then + AS_IF([test "x$MOCCMD" = "x"], [MOCCMD="$qt6_framework_bin/moc"]) + fi AS_IF([test -x $MOCCMD], [fc_qt6_usable=true], [fc_qt6_usable=false]) else fc_qt6_usable=false -- 2.35.1