[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: CXSPARSE includes
From: |
Rik |
Subject: |
Re: CXSPARSE includes |
Date: |
Wed, 8 Feb 2017 17:55:24 -0800 |
I backported Mike's fix to stable.
Separately, there were two cases in acinclude.m4 where we were saving
CXXFLAGS, but then only using the pre-processor to perform tests with
AC_PREPROC_IFELSE. I pushed a cset to stop the unnecessary save&restore
here http://hg.savannah.gnu.org/hgweb/octave/rev/e9d7932373ad.
Finally, following Carlo's investigations I looked in config.log and found
that the test for the Qt SetPlaceHolderText function was failing with
conftest.cpp:123:32: fatal error: Qt/qglobal.h: No such file or directory
but I do have qglobal.h installed at
/usr/include/qt4/Qt/qglobal.h
/usr/include/qt4/QtCore/qglobal.h
/usr/include/x86_64-linux-gnu/qt5/QtCore/qglobal.h
Since Octave now defaults to Qt5, it is not finding the last instance.
The m4 code in acinclude.m4 is:
dnl
dnl Check whether QScintilla SetPlaceholderText function exists.
dnl FIXME: This test uses a version number. It potentially could
dnl be re-written to actually call the function, but is it worth it?
dnl
AC_DEFUN([OCTAVE_CHECK_FUNC_SETPLACEHOLDERTEXT], [
AC_CACHE_CHECK([whether Qt has SetPlaceholderText function],
[octave_cv_func_setplaceholdertext],
[AC_LANG_PUSH(C++)
ac_octave_save_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$QT_CPPFLAGS $CXXPICFLAG $CPPFLAGS"
AC_PREPROC_IFELSE([AC_LANG_PROGRAM([[
#include <Qt/qglobal.h>
]], [[
#if QT_VERSION < 0x040700
#error No SetPlacholderText function available.
#endif
]])],
octave_cv_func_setplaceholdertext=yes,
octave_cv_func_setplaceholdertext=no)
CPPFLAGS="$ac_octave_save_CPPFLAGS"
AC_LANG_POP(C++)
])
if test $octave_cv_func_setplaceholdertext = yes; then
AC_DEFINE(HAVE_SETPLACEHOLDERTEXT, 1,
[Define to 1 if you have the Qt SetPlaceholderText function.])
fi
])
Is it enough to change
#include <Qt/qglobal.h>
to
#include <qglobal.h>
It seemed to work for me, but I haven't gone and tested back with Qt4.
--Rik