From fd931786fd7298b1873c34231383591dfaab520c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20W=C3=A4ckerlin?= Date: Fri, 19 Sep 2014 09:04:03 +0000 Subject: [PATCH] need variables; refs #41 --- ax_check_qt.m4 | 6 ++++++ configure.in | 3 +++ 2 files changed, 9 insertions(+) diff --git a/ax_check_qt.m4 b/ax_check_qt.m4 index 26d9b4e..a2019a5 100644 --- a/ax_check_qt.m4 +++ b/ax_check_qt.m4 @@ -62,10 +62,16 @@ AC_DEFUN([AX_CXX_CHECK_QT], [ PKG_CHECK_MODULES([$1], [${qt_modules//Qt/Qt5}], [ HAVE_$1=1 AC_DEFINE([HAVE_$1]) + CPPFLAGS+=" ${$1_CFLAGS}" + CXXFLAGS+=" ${$1_CFLAGS}" + LIBS+=" ${$1_LIBS}" ], [ PKG_CHECK_MODULES([$1], [${qt_modules}], [ HAVE_$1=1 AC_DEFINE([HAVE_$1]) + CPPFLAGS+=" ${$1_CFLAGS}" + CXXFLAGS+=" ${$1_CFLAGS}" + LIBS+=" ${$1_LIBS}" ]) ]) AM_CONDITIONAL(HAVE_$1, test $HAVE_$1 -eq 1) diff --git a/configure.in b/configure.in index 8e867c8..e53cade 100644 --- a/configure.in +++ b/configure.in @@ -117,6 +117,9 @@ case $host in esac AX_CXX_CHECK_QT([QT], [Qt5Core Qt5Gui Qt5Widgets Qt5Network]) AC_ARG_VAR(LUPDATE_ARGS, [arguments for qt lupdate command, e.g. -no-obsolete]) +if test $HAVE_$1 -eq 1; then + CPPFLAGS+=" -DQT_NETWORK_LIB" +fi AC_ARG_ENABLE(pedantic, [AS_HELP_STRING([--enable-pedantic],