mirror of
https://gitlab.com/mbunkus/mkvtoolnix.git
synced 2024-12-25 04:11:44 +00:00
configure: add switch for circumventing pkg-config for Qt detection
Normally configure uses pkg-config for detecting Qt and setting QT_CFLAGS and QT_LIBS. With this option configure won't use pkg-config and rely on the user having set both variables before running configure. This enables using Qt on systems where no pkg-config files are generated (e.g. Qt 5.6.0 on MacOS with frameworks enabled). See https://github.com/Homebrew/homebrew/pull/50234
This commit is contained in:
parent
562d1d8e80
commit
8b6b876d2a
10
ChangeLog
10
ChangeLog
@ -1,3 +1,13 @@
|
||||
2016-03-20 Moritz Bunkus <moritz@bunkus.org>
|
||||
|
||||
* build system: added an option to configure
|
||||
»--without-qt-pkg-config«. Normally configure uses pkg-config for
|
||||
detecting Qt and setting QT_CFLAGS and QT_LIBS. With this option
|
||||
configure won't use pkg-config and rely on the user having set
|
||||
both variables before running configure. This enables using Qt on
|
||||
systems where no pkg-config files are generated (e.g. Qt 5.6.0 on
|
||||
MacOS with frameworks enabled).
|
||||
|
||||
2016-03-18 Moritz Bunkus <moritz@bunkus.org>
|
||||
|
||||
* mkvinfo: change: on Windows and Mac OS mkvinfo will now launch
|
||||
|
12
ac/qt5.m4
12
ac/qt5.m4
@ -9,6 +9,9 @@ AC_ARG_ENABLE([static_qt],
|
||||
AC_HELP_STRING([--enable-static-qt],[link to static versions of the Qt library (no)]))
|
||||
AC_ARG_WITH([qt_pkg_config_modules],
|
||||
AC_HELP_STRING([--with-qt-pkg-config-modules=modules],[gather include/link flags for additional Qt modules from pkg-config]))
|
||||
AC_ARG_WITH([qt_pkg_config],
|
||||
AC_HELP_STRING([--without-qt-pkg-config], [do not use pkg-config for detecting Qt; instead rely on QT_CFLAGS/QT_LIBS being set correctly already]),
|
||||
[ with_qt_pkg_config=${withval} ], [ with_qt_pkg_config=yes ])
|
||||
|
||||
qt_min_ver=5.2.0
|
||||
|
||||
@ -123,7 +126,7 @@ if test x"$enable_qt" = "xyes" -a \
|
||||
ok=1
|
||||
fi
|
||||
|
||||
if test $ok = 1; then
|
||||
if test $ok = 1 -a "x$with_qt_pkg_config" = xyes; then
|
||||
with_qt_pkg_config_modules="`echo "$with_qt_pkg_config_modules" | sed -e 's/ /,/g'`"
|
||||
if test x"$with_qt_pkg_config_modules" != x ; then
|
||||
with_qt_pkg_config_modules="$with_qt_pkg_config_modules,"
|
||||
@ -141,13 +144,14 @@ if test x"$enable_qt" = "xyes" -a \
|
||||
if test $ok = 0; then
|
||||
AC_MSG_RESULT(no: not found by pkg-config)
|
||||
fi
|
||||
|
||||
with_qt_pkg_config_modules="`echo "$with_qt_pkg_config_modules" | sed -e 's/,/ /g'`"
|
||||
QT_CFLAGS="`$PKG_CONFIG --cflags $with_qt_pkg_config_modules $QT_PKG_CONFIG_STATIC`"
|
||||
QT_LIBS="`$PKG_CONFIG --libs $with_qt_pkg_config_modules $QT_PKG_CONFIG_STATIC`"
|
||||
fi
|
||||
|
||||
if test $ok = 1; then
|
||||
dnl Try compiling and linking an application.
|
||||
with_qt_pkg_config_modules="`echo "$with_qt_pkg_config_modules" | sed -e 's/,/ /g'`"
|
||||
QT_CFLAGS="`$PKG_CONFIG --cflags $with_qt_pkg_config_modules $QT_PKG_CONFIG_STATIC`"
|
||||
QT_LIBS="`$PKG_CONFIG --libs $with_qt_pkg_config_modules $QT_PKG_CONFIG_STATIC`"
|
||||
|
||||
AC_LANG_PUSH(C++)
|
||||
AC_CACHE_VAL(am_cv_qt_compilation, [
|
||||
|
Loading…
Reference in New Issue
Block a user