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: Rik
Subject: Re: new HAVE_XXX macro for acinclude.m4
Date: Mon, 16 Dec 2013 08:12:42 -0800

On 12/16/2013 07: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?

12/16/13

Richard,

It's a two-step process.  First you need to define the macro (done!), and then you need to call it from configure.ac.

The right place looks to be around line 2723 where we have determined that the Qt GUI can be built and then check for some miscellaneous functions.

--- configure.ac:2723 ---
if test $build_gui = yes; then
  OCTAVE_CHECK_QFONT_MONOSPACE
  OCTAVE_CHECK_FUNC_SETPLACEHOLDERTEXT
fi
-------------------------

Add the macro call there and then run bootstrap to regenerate configure from configure.ac and it should all work out.

--Rik


reply via email to

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