octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: new HAVE_XXX macro for acinclude.m4


From: John W. Eaton
Subject: Re: new HAVE_XXX macro for acinclude.m4
Date: Mon, 16 Dec 2013 10:06:05 -0600
User-agent: Mozilla/5.0 (X11; Linux i686; rv:10.0.11) Gecko/20121123 Icedove/10.0.11

On 12/16/2013 09:55 AM, Richard wrote:
I'm trying to add a test for a Qt feature to acinclude.m4, and inserted
the following text at line 456:

dnl
dnl Check whether the Qt QTabWidget::setMovable() function exists.
dnl This function was added in Qt 4.5.
dnl
AC_DEFUN([OCTAVE_CHECK_FUNC_QTABWIDGET_SETMOVABLE], [
AC_CACHE_CHECK([whether Qt has the QTabWidget::setMovable() function],
[octave_cv_func_qtabwidget_setmovable],
[AC_LANG_PUSH(C++)
ac_octave_save_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$QT_CPPFLAGS $CPPFLAGS"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <QTabWidget>
class tab_widget : public QTabWidget
{
public:
tab_widget (QObject *parent = 0) : QTabWidget (parent) {
this->setMovable (true); }
~tab_widget () {}
};
]], [[
tab_widget tw;
]])],
octave_cv_func_qtabwidget_setmovable=yes,
octave_cv_func_qtabwidget_setmovable=no)
CPPFLAGS="$ac_octave_save_CPPFLAGS"
AC_LANG_POP(C++)
])
if test $octave_cv_func_qtabwidget_setmovable = yes; then
AC_DEFINE(HAVE_QTABWIDGET_SETMOVABLE, 1,
[Define to 1 if Qt has the QTabWidget::setMovable() function.])
fi
])


However, this is completely ignored by configure as far as I can tell.
I'm building out-of-tree and I did ./bootstrap ; cd build ; configure.
Am I missing some step here? Or is there some mistake in the macro I
don't see?

AC_DEFUN defines a macro. Now you need to use it. The right place for that is the configure.ac file along with the other Qt feature tests.

jwe


reply via email to

[Prev in Thread] Current Thread [Next in Thread]