Mercurial > hg > octave-lyh
diff configure.ac @ 15156:141b0b108292 gui
allow building without gui to work
* configure.ac: Enable building GUI by default. Rename OCTAVE_GUI to
AMCOND_BUILD_GUI. Don't define or substitute GUIDIR. Don't check for
GUI toolkit tools and libraries if building GUI is disabled.
* Makefile.am: Use else clause for AMCOND_BUILD_GUI automake conditional.
* src/Makefile.am: If not building GUI, make octave and octave-cli
binaries identical.
* gui/src/Makefile.am: Style fixes. Use - instead of _ and .cc
instead of .cpp in generated file names.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Sat, 11 Aug 2012 11:47:03 -0400 |
parents | 2eb789da13c3 |
children | 84d7a1ed5f29 |
line wrap: on
line diff
--- a/configure.ac +++ b/configure.ac @@ -2149,43 +2149,40 @@ ### GUI/Qt related tests. HAVE_QT=false -GUIDIR= QT_INCDIR= QT_LIBDIR= -AC_CHECK_PROGS(QMAKE, [qmake qmake-qt4 qmake-qt5]) -if test -n "$QMAKE"; then - QT_INCDIR=`$QMAKE -query | sed -n -e 's/^QT_INSTALL_HEADERS://p'` - QT_LIBDIR=`$QMAKE -query | sed -n -e 's/^QT_INSTALL_LIBS://p'` - AC_CHECK_PROGS(MOC, [moc moc-qt4 moc-qt5]) - AC_CHECK_PROGS(UIC, [uic uic-qt4 uic-qt5]) - AC_CHECK_PROGS(RCC, [rcc]) - if test -n "$MOC" && test -n "$UIC" && test -n "$RCC"; then - HAVE_QT=true - AC_DEFINE([HAVE_QT], 1, [Define to 1 if Qt is available (must have moc, uic, and rcc programs and developer header files and libraries installed)]) - GUIDIR=gui +build_gui=yes +win32_terminal=no +AC_ARG_ENABLE(gui, + [AS_HELP_STRING([--disable-gui], [build GUI (default is yes)])], + [if test "$enableval" = no; then build_gui=no; fi], [build_gui=yes]) + +if test $build_gui = yes; then + AC_CHECK_PROGS(QMAKE, [qmake qmake-qt4 qmake-qt5]) + if test -n "$QMAKE"; then + QT_INCDIR=`$QMAKE -query | sed -n -e 's/^QT_INSTALL_HEADERS://p'` + QT_LIBDIR=`$QMAKE -query | sed -n -e 's/^QT_INSTALL_LIBS://p'` + AC_CHECK_PROGS(MOC, [moc moc-qt4 moc-qt5]) + AC_CHECK_PROGS(UIC, [uic uic-qt4 uic-qt5]) + AC_CHECK_PROGS(RCC, [rcc]) + if test -n "$MOC" && test -n "$UIC" && test -n "$RCC"; then + HAVE_QT=true + AC_DEFINE([HAVE_QT], 1, [Define to 1 if Qt is available (must have moc, uic, and rcc programs and developer header files and libraries installed)]) + fi fi + + case "$canonical_host_type" in + *-*-mingw* | *-*-msdosmsvc*) win32_terminal=yes ;; + *) + AC_CHECK_HEADERS([pty.h libutil.h util.h]) + AC_SEARCH_LIBS([openpty], [util], [AC_DEFINE([HAVE_OPENPTY], [], [Define whether openpty exists])]) + ;; + esac fi +AM_CONDITIONAL([AMCOND_BUILD_GUI], [test $build_gui = yes]) +AM_CONDITIONAL([WIN32_TERMINAL], [test $win32_terminal = yes]) AC_SUBST(QT_INCDIR) AC_SUBST(QT_LIBDIR) -AC_SUBST(GUIDIR) - -case "$canonical_host_type" in - *-*-mingw* | *-*-msdosmsvc*) win32_terminal=yes ;; - *) - win32_terminal=no - AC_CHECK_HEADERS([pty.h libutil.h util.h]) - AC_SEARCH_LIBS([openpty], [util], [AC_DEFINE([HAVE_OPENPTY], [], [Define whether openpty exists])]) - ;; -esac -AM_CONDITIONAL([WIN32_TERMINAL], [test x$win32_terminal = xyes]) - -octave_gui= -AC_ARG_ENABLE(gui, - [AS_HELP_STRING([--enable-gui], [build GUI (default is no)])], - [if test "$enableval" = yes; then - octave_gui=yes - fi], []) -AM_CONDITIONAL([OCTAVE_GUI], [test x$octave_gui = xyes]) ### Run configure in subdirectories.