qt tools are optional

master
Marc Wäckerlin 10 years ago
parent 70cf4e842c
commit 0be9cb0b09
  1. 10
      ChangeLog
  2. 18
      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,6 +27,9 @@
# data files themselves. # data files themselves.
AC_DEFUN([AX_CXX_QT_TOOL], [ AC_DEFUN([AX_CXX_QT_TOOL], [
if test -z "$HAVE_$1"; then
HAVE_$1=1
AC_MSG_CHECKING([for $2])
AC_ARG_VAR([$1], [path to Qt tool $2]) AC_ARG_VAR([$1], [path to Qt tool $2])
$1=${$1:-$(pkg-config --variable=$2_location Qt5Core)} $1=${$1:-$(pkg-config --variable=$2_location Qt5Core)}
$1=${$1:-$(pkg-config --variable=host_bins Qt5Core)/$2} $1=${$1:-$(pkg-config --variable=host_bins Qt5Core)/$2}
@ -36,15 +39,18 @@ AC_DEFUN([AX_CXX_QT_TOOL], [
if which "$2" > /dev/null; then if which "$2" > /dev/null; then
$1=$2 $1=$2
else else
if test -n "$$1"; then HAVE_$1=0
AC_MSG_ERROR([Missing Qt program: $2 (tested: $$1)]) $1=""
else
AC_MSG_ERROR([Missing Qt program: $2 (specify variable $1)])
fi
fi fi
fi fi
AC_SUBST($1) AC_SUBST($1)
AC_MSG_NOTICE([using $$1 for $2]) 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
]) ])
AC_DEFUN([AX_CXX_QT_TOOLS], [ AC_DEFUN([AX_CXX_QT_TOOLS], [

Loading…
Cancel
Save