summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile.config.in3
-rw-r--r--autoconf/ax_qt.m427
-rw-r--r--configure.in7
3 files changed, 35 insertions, 2 deletions
diff --git a/Makefile.config.in b/Makefile.config.in
index 54ed018..374bea5 100644
--- a/Makefile.config.in
+++ b/Makefile.config.in
@@ -16,5 +16,4 @@ HAVE_LIBXML=@CONFIG_HAVE_LIBXML@
HAVE_OPENSSL=@CONFIG_HAVE_OPENSSL@
WIN32=@CONFIG_WIN32@
MACOSX=@CONFIG_MACOSX@
-# FIXME
-QMAKE=qmake
+QMAKE=@QMAKE@
diff --git a/autoconf/ax_qt.m4 b/autoconf/ax_qt.m4
new file mode 100644
index 0000000..6b55c13
--- /dev/null
+++ b/autoconf/ax_qt.m4
@@ -0,0 +1,27 @@
+# Author: Remko Tronçon
+
+AC_DEFUN([AX_QT],
+[
+ AC_ARG_WITH(
+ [qt],
+ AC_HELP_STRING([--with-qt=@<:@ARG@:>@],[Path to Qt installation]),
+ [
+ WITH_QT="$withval"
+ if test "$withval" != "no" -a "$withval" != "yes"; then
+ QT_PATH="$withval/bin"
+ else
+ QT_PATH="$PATH"
+ fi
+ ],
+ [
+ WITH_QT="yes"
+ QT_PATH="$PATH"
+ ])
+
+ if test "$WITH_QT" != "no"; then
+ AC_PATH_PROG(QMAKE, qmake, [], $QT_PATH)
+ if test "$QMAKE"; then
+ HAVE_QT=yes
+ fi
+ fi
+])
diff --git a/configure.in b/configure.in
index f1ee664..f703be9 100644
--- a/configure.in
+++ b/configure.in
@@ -126,6 +126,12 @@ if test -z "$MM"; then
MM="$CC"
fi
+# Qt
+AX_QT()
+if test "$HAVE_QT" != yes; then
+ AC_MSG_ERROR([Could not find Qt])
+fi
+
# Expat
AX_LIB_EXPAT()
if test "$HAVE_EXPAT" = yes; then
@@ -199,6 +205,7 @@ AC_SUBST(CONFIG_MACOSX)
AC_SUBST(CONFIG_HAVE_OPENSSL)
AC_SUBST(USE_BUNDLED_EXPAT)
AC_SUBST(CONFIG_HAVE_LIBXML)
+AC_SUBST(QMAKE)
AC_CONFIG_FILES([Makefile.config])
AC_OUTPUT