From 28ac9962cede490fc93355348c5d795902359175 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Sj=C3=B6lund?= Date: Thu, 5 Jul 2012 19:20:12 +0000 Subject: [PATCH] - Check for include/qwt5, then check the header for QWT5 macro (using grep) git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@12289 f25d12d1-65f4-0310-ae8a-bbce733d8d8e --- configure.in | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/configure.in b/configure.in index 0c877358f96..48306ea0bd1 100644 --- a/configure.in +++ b/configure.in @@ -437,15 +437,17 @@ fi if test -n "$QMAKE"; then AC_MSG_CHECKING([for qwt]) - AC_ARG_WITH(qwt, [ --with-qwt Compile plotting libraries using qwt. Default searches PREFIX/include/{qwt,qwt-qt4}], [], [with_qwt=yes]) + AC_ARG_WITH(qwt, [ --with-qwt Compile plotting libraries using qwt5. Default searches PREFIX/include/{qwt5,qwt,qwt-qt4}], [], [with_qwt=yes]) if test x"$with_qwt" = "xyes"; then with_qwt_checked="" with_qwt_suffix="" - for f in {/usr,/opt,$PREFIX}/include/{qwt,qwt-qt4}/; do + for f in {/usr,/opt,$PREFIX}/include/{qwt5,qwt,qwt-qt4}/; do test -f "$f/qwt.h" && with_qwt="$f" || with_qwt_checked="$with_qwt_checked $f" done echo $with_qwt | grep -q -- -qt4 && with_qwt_suffix="-qt4" + with_qwt_res=$with_qwt + grep -q 'QWT_VERSION *0x05@<:@0-9@:>@\{4\}$' "$with_qwt/qwt_global.h" || with_qwt="bad" fi if test x"$with_qwt" = "xno"; then @@ -453,6 +455,8 @@ if test -n "$QMAKE"; then AC_MSG_RESULT([disabled]) elif test x"$with_qwt" = "xyes"; then AC_MSG_ERROR([not found (searched $with_qwt_checked)]) + elif test x"$with_qwt" = "xbad"; then + AC_MSG_ERROR([$with_qwt_res/qwt_global.h is not a qwt5 header]) else AC_MSG_RESULT($with_qwt) fi