Mercurial > hg > octave-lyh
comparison 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 |
comparison
equal
deleted
inserted
replaced
15155:9e62d5a3a45e | 15156:141b0b108292 |
---|---|
2147 AC_SUBST(WARN_CXXFLAGS) | 2147 AC_SUBST(WARN_CXXFLAGS) |
2148 | 2148 |
2149 ### GUI/Qt related tests. | 2149 ### GUI/Qt related tests. |
2150 | 2150 |
2151 HAVE_QT=false | 2151 HAVE_QT=false |
2152 GUIDIR= | |
2153 QT_INCDIR= | 2152 QT_INCDIR= |
2154 QT_LIBDIR= | 2153 QT_LIBDIR= |
2155 AC_CHECK_PROGS(QMAKE, [qmake qmake-qt4 qmake-qt5]) | 2154 build_gui=yes |
2156 if test -n "$QMAKE"; then | 2155 win32_terminal=no |
2157 QT_INCDIR=`$QMAKE -query | sed -n -e 's/^QT_INSTALL_HEADERS://p'` | 2156 AC_ARG_ENABLE(gui, |
2158 QT_LIBDIR=`$QMAKE -query | sed -n -e 's/^QT_INSTALL_LIBS://p'` | 2157 [AS_HELP_STRING([--disable-gui], [build GUI (default is yes)])], |
2159 AC_CHECK_PROGS(MOC, [moc moc-qt4 moc-qt5]) | 2158 [if test "$enableval" = no; then build_gui=no; fi], [build_gui=yes]) |
2160 AC_CHECK_PROGS(UIC, [uic uic-qt4 uic-qt5]) | 2159 |
2161 AC_CHECK_PROGS(RCC, [rcc]) | 2160 if test $build_gui = yes; then |
2162 if test -n "$MOC" && test -n "$UIC" && test -n "$RCC"; then | 2161 AC_CHECK_PROGS(QMAKE, [qmake qmake-qt4 qmake-qt5]) |
2163 HAVE_QT=true | 2162 if test -n "$QMAKE"; then |
2164 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)]) | 2163 QT_INCDIR=`$QMAKE -query | sed -n -e 's/^QT_INSTALL_HEADERS://p'` |
2165 GUIDIR=gui | 2164 QT_LIBDIR=`$QMAKE -query | sed -n -e 's/^QT_INSTALL_LIBS://p'` |
2165 AC_CHECK_PROGS(MOC, [moc moc-qt4 moc-qt5]) | |
2166 AC_CHECK_PROGS(UIC, [uic uic-qt4 uic-qt5]) | |
2167 AC_CHECK_PROGS(RCC, [rcc]) | |
2168 if test -n "$MOC" && test -n "$UIC" && test -n "$RCC"; then | |
2169 HAVE_QT=true | |
2170 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)]) | |
2171 fi | |
2166 fi | 2172 fi |
2167 fi | 2173 |
2174 case "$canonical_host_type" in | |
2175 *-*-mingw* | *-*-msdosmsvc*) win32_terminal=yes ;; | |
2176 *) | |
2177 AC_CHECK_HEADERS([pty.h libutil.h util.h]) | |
2178 AC_SEARCH_LIBS([openpty], [util], [AC_DEFINE([HAVE_OPENPTY], [], [Define whether openpty exists])]) | |
2179 ;; | |
2180 esac | |
2181 fi | |
2182 AM_CONDITIONAL([AMCOND_BUILD_GUI], [test $build_gui = yes]) | |
2183 AM_CONDITIONAL([WIN32_TERMINAL], [test $win32_terminal = yes]) | |
2168 AC_SUBST(QT_INCDIR) | 2184 AC_SUBST(QT_INCDIR) |
2169 AC_SUBST(QT_LIBDIR) | 2185 AC_SUBST(QT_LIBDIR) |
2170 AC_SUBST(GUIDIR) | |
2171 | |
2172 case "$canonical_host_type" in | |
2173 *-*-mingw* | *-*-msdosmsvc*) win32_terminal=yes ;; | |
2174 *) | |
2175 win32_terminal=no | |
2176 AC_CHECK_HEADERS([pty.h libutil.h util.h]) | |
2177 AC_SEARCH_LIBS([openpty], [util], [AC_DEFINE([HAVE_OPENPTY], [], [Define whether openpty exists])]) | |
2178 ;; | |
2179 esac | |
2180 AM_CONDITIONAL([WIN32_TERMINAL], [test x$win32_terminal = xyes]) | |
2181 | |
2182 octave_gui= | |
2183 AC_ARG_ENABLE(gui, | |
2184 [AS_HELP_STRING([--enable-gui], [build GUI (default is no)])], | |
2185 [if test "$enableval" = yes; then | |
2186 octave_gui=yes | |
2187 fi], []) | |
2188 AM_CONDITIONAL([OCTAVE_GUI], [test x$octave_gui = xyes]) | |
2189 | 2186 |
2190 ### Run configure in subdirectories. | 2187 ### Run configure in subdirectories. |
2191 | 2188 |
2192 export CC | 2189 export CC |
2193 export CXX | 2190 export CXX |