Mercurial > hg > octave-jordi
changeset 16291:c22a6cecaedd
build: Use AMCOND to build GUI editor if Qscintilla available.
* configure.ac: Add new AMCOND_HAVE_QSCINTILLA Automake Conditional.
* libgui/src/m-editor/file-editor-interface.h,
libgui/src/m-editor/file-editor-tab.h, libgui/src/m-editor/file-editor.h,
libgui/src/m-editor/find-dialog.h, libgui/src/m-editor/lexer-octave-gui.h:
Remove '#ifdef HAVE_QSCINTILLA' declarations
* libgui/src/module.mk: Check AMCOND_HAVE_QSCINTILLA before adding
GUI editor files to octave_gui_MOC variable.
author | Rik <rik@octave.org> |
---|---|
date | Tue, 12 Mar 2013 19:03:07 -0700 |
parents | d07aeecb2d22 |
children | 6ce905b89cee |
files | configure.ac libgui/src/m-editor/file-editor-interface.h libgui/src/m-editor/file-editor-tab.h libgui/src/m-editor/file-editor.h libgui/src/m-editor/find-dialog.h libgui/src/m-editor/lexer-octave-gui.h libgui/src/module.mk |
diffstat | 7 files changed, 15 insertions(+), 27 deletions(-) [+] |
line wrap: on
line diff
--- a/configure.ac +++ b/configure.ac @@ -2634,6 +2634,8 @@ AC_DEFINE(HAVE_QSCINTILLA, 1, [Define to 1 if the QScintilla library and header files are available]) fi + AM_CONDITIONAL([AMCOND_HAVE_QSCINTILLA], + [test $octave_cv_lib_qscintilla = yes]) AC_CHECK_FUNCS([setlocale], [], [AC_MSG_WARN([setlocale not found -- disabling GUI])
--- a/libgui/src/m-editor/file-editor-interface.h +++ b/libgui/src/m-editor/file-editor-interface.h @@ -23,8 +23,6 @@ #ifndef FILEEDITORINTERFACE_H #define FILEEDITORINTERFACE_H -#ifdef HAVE_QSCINTILLA - #include <QMenu> #include <QToolBar> #include "octave-dock-widget.h" @@ -63,6 +61,4 @@ }; -#endif // HAVE_QSCINTILLA - -#endif // FILEEDITORINTERFACE_H +#endif // FILEEDITORINTERFACE_H
--- a/libgui/src/m-editor/file-editor-tab.h +++ b/libgui/src/m-editor/file-editor-tab.h @@ -23,8 +23,6 @@ #ifndef FILEEDITORTAB_H #define FILEEDITORTAB_H -#ifdef HAVE_QSCINTILLA - #include <Qsci/qsciscintilla.h> #include <QWidget> #include <QCloseEvent> @@ -158,6 +156,4 @@ QRect _find_dialog_geometry; }; -#endif // HAVE_QSCINTILLA - -#endif // FILEEDITORTAB_H +#endif // FILEEDITORTAB_H
--- a/libgui/src/m-editor/file-editor.h +++ b/libgui/src/m-editor/file-editor.h @@ -23,8 +23,6 @@ #ifndef FILEEDITORMDISUBWINDOW_H #define FILEEDITORMDISUBWINDOW_H -#ifdef HAVE_QSCINTILLA - #include <QToolBar> #include <QAction> #include <QMenuBar> @@ -156,6 +154,4 @@ }; -#endif // HAVE_QSCINTILLA - -#endif // FILEEDITORMDISUBWINDOW_H +#endif // FILEEDITORMDISUBWINDOW_H
--- a/libgui/src/m-editor/find-dialog.h +++ b/libgui/src/m-editor/find-dialog.h @@ -42,8 +42,6 @@ #ifndef FIND_DIALOG_H #define FIND_DIALOG_H -#ifdef HAVE_QSCINTILLA - #include <QDialog> #include <Qsci/qsciscintilla.h> @@ -88,7 +86,5 @@ bool _find_result_available; }; -#endif // HAVE_QSCINTILLA +#endif // FIND_DIALOG_H -#endif // FIND_DIALOG_H -
--- a/libgui/src/m-editor/lexer-octave-gui.h +++ b/libgui/src/m-editor/lexer-octave-gui.h @@ -23,8 +23,6 @@ #ifndef LEXEROCTAVE_H #define LEXEROCTAVE_H -#ifdef HAVE_QSCINTILLA - #include "resource-manager.h" #include <QObject> #include <Qsci/qsciglobal.h> @@ -65,6 +63,4 @@ QsciAPIs *lexer_api; }; -#endif // HAVE_QSCINTILLA - -#endif // LEXEROCTAVE_H +#endif
--- a/libgui/src/module.mk +++ b/libgui/src/module.mk @@ -55,12 +55,18 @@ src/icons/zoom-in.png \ src/icons/zoom-out.png -octave_gui_MOC = \ +octave_gui_MOC = + +if AMCOND_HAVE_QSCINTILLA +octave_gui_MOC += \ src/m-editor/moc-file-editor-interface.cc \ src/m-editor/moc-file-editor-tab.cc \ src/m-editor/moc-file-editor.cc \ src/m-editor/moc-find-dialog.cc \ - src/m-editor/moc-lexer-octave-gui.cc \ + src/m-editor/moc-lexer-octave-gui.cc +endif + +octave_gui_MOC += \ src/moc-documentation-dockwidget.cc \ src/moc-files-dockwidget.cc \ src/moc-history-dockwidget.cc \