Skip to content

Commit 28ac996

Browse files
committed
- 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
1 parent 2caa5f5 commit 28ac996

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

configure.in

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -437,22 +437,26 @@ fi
437437

438438
if test -n "$QMAKE"; then
439439
AC_MSG_CHECKING([for qwt])
440-
AC_ARG_WITH(qwt, [ --with-qwt Compile plotting libraries using qwt. Default searches PREFIX/include/{qwt,qwt-qt4}], [], [with_qwt=yes])
440+
AC_ARG_WITH(qwt, [ --with-qwt Compile plotting libraries using qwt5. Default searches PREFIX/include/{qwt5,qwt,qwt-qt4}], [], [with_qwt=yes])
441441

442442
if test x"$with_qwt" = "xyes"; then
443443
with_qwt_checked=""
444444
with_qwt_suffix=""
445-
for f in {/usr,/opt,$PREFIX}/include/{qwt,qwt-qt4}/; do
445+
for f in {/usr,/opt,$PREFIX}/include/{qwt5,qwt,qwt-qt4}/; do
446446
test -f "$f/qwt.h" && with_qwt="$f" || with_qwt_checked="$with_qwt_checked $f"
447447
done
448448
echo $with_qwt | grep -q -- -qt4 && with_qwt_suffix="-qt4"
449+
with_qwt_res=$with_qwt
450+
grep -q 'QWT_VERSION *0x05@<:@0-9@:>@\{4\}$' "$with_qwt/qwt_global.h" || with_qwt="bad"
449451
fi
450452

451453
if test x"$with_qwt" = "xno"; then
452454
QMAKE=""
453455
AC_MSG_RESULT([disabled])
454456
elif test x"$with_qwt" = "xyes"; then
455457
AC_MSG_ERROR([not found (searched $with_qwt_checked)])
458+
elif test x"$with_qwt" = "xbad"; then
459+
AC_MSG_ERROR([$with_qwt_res/qwt_global.h is not a qwt5 header])
456460
else
457461
AC_MSG_RESULT($with_qwt)
458462
fi

0 commit comments

Comments
 (0)