qt tools are optional

master
Marc Wäckerlin 10 years ago
parent 70cf4e842c
commit 0be9cb0b09
  1. 10
      ChangeLog
  2. 34
      m4/ax_check_qt.m4

@ -1,3 +1,13 @@
2015-03-04 13:28 marc
* m4/ax_check_qt.m4: try to fix «HAVE_QTNETWORK does not appear in
AM_CONDITIONAL» when there is no qt
2015-03-03 18:37 marc
* ChangeLog, README, configure.ac, debian/control.in: now also
depends on qt
2015-03-03 15:56 marc 2015-03-03 15:56 marc
* AUTHORS, ChangeLog, configure.ac, debian/changelog.in, * AUTHORS, ChangeLog, configure.ac, debian/changelog.in,

@ -27,24 +27,30 @@
# data files themselves. # data files themselves.
AC_DEFUN([AX_CXX_QT_TOOL], [ AC_DEFUN([AX_CXX_QT_TOOL], [
AC_ARG_VAR([$1], [path to Qt tool $2]) if test -z "$HAVE_$1"; then
$1=${$1:-$(pkg-config --variable=$2_location Qt5Core)} HAVE_$1=1
$1=${$1:-$(pkg-config --variable=host_bins Qt5Core)/$2} AC_MSG_CHECKING([for $2])
$1=${$1:-$(pkg-config --variable=$2_location QtCore)} AC_ARG_VAR([$1], [path to Qt tool $2])
$1=${$1:-$(pkg-config --variable=host_bins QtCore)/$2} $1=${$1:-$(pkg-config --variable=$2_location Qt5Core)}
if ! which "${$1%% *}" > /dev/null; then $1=${$1:-$(pkg-config --variable=host_bins Qt5Core)/$2}
if which "$2" > /dev/null; then $1=${$1:-$(pkg-config --variable=$2_location QtCore)}
$1=$2 $1=${$1:-$(pkg-config --variable=host_bins QtCore)/$2}
else if ! which "${$1%% *}" > /dev/null; then
if test -n "$$1"; then if which "$2" > /dev/null; then
AC_MSG_ERROR([Missing Qt program: $2 (tested: $$1)]) $1=$2
else else
AC_MSG_ERROR([Missing Qt program: $2 (specify variable $1)]) HAVE_$1=0
$1=""
fi fi
fi fi
AC_SUBST($1)
AM_CONDITIONAL(HAVE_$1, test $HAVE_$1 -eq 1)
if test $HAVE_$1 -eq 1; then
AC_MSG_RESULT([$$1])
else
AC_MSG_RESULT([not found])
fi
fi fi
AC_SUBST($1)
AC_MSG_NOTICE([using $$1 for $2])
]) ])
AC_DEFUN([AX_CXX_QT_TOOLS], [ AC_DEFUN([AX_CXX_QT_TOOLS], [

Loading…
Cancel
Save