Mercurial > octave
comparison m4/acinclude.m4 @ 26881:4af9840f9ce5 stable
make building with Qt4 QGLWidget work again (bug #55735)
* acinclude.m4 (OCTAVE_CHECK_QT_VERSION): Also set and substitute
QT_OPENGL_CPPFLAGS and QT_OPENGL_LDFLAGS variables.
(OCTAVE_CHECK_QT_OPENGL_OK, OCTAVE_CHECK_QT_OPENGL_OFFSCREEN):
Add QT_OPENGL_CPPFLAGS to CPPFLAGS for tests, not QT_CPPFLAGS.
* libgui/graphics/module.mk %canon_reldir%___init_qt___la_CPPFLAGS):
Use QT_OPENGL_CPPFLAGS instead of QT_CPPFLAGS.
(%canon_reldir%___init_qt___la_LDFLAGS): Also include
$(QT_OPENGL_LDFLAGS) in the list.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Mon, 11 Mar 2019 20:17:43 +0000 |
parents | df42ea23502f |
children | 4b256f00650c |
comparison
equal
deleted
inserted
replaced
26880:6c25c714bec4 | 26881:4af9840f9ce5 |
---|---|
1818 dnl Qt header files associated with the compilation test, set and restore | 1818 dnl Qt header files associated with the compilation test, set and restore |
1819 dnl these values outside of the AC_CACHE_CHECK for this macro only. | 1819 dnl these values outside of the AC_CACHE_CHECK for this macro only. |
1820 AC_LANG_PUSH(C++) | 1820 AC_LANG_PUSH(C++) |
1821 ac_octave_save_CPPFLAGS="$CPPFLAGS" | 1821 ac_octave_save_CPPFLAGS="$CPPFLAGS" |
1822 ac_octave_save_CXXFLAGS="$CXXFLAGS" | 1822 ac_octave_save_CXXFLAGS="$CXXFLAGS" |
1823 CPPFLAGS="$QT_CPPFLAGS $CXXPICFLAG $CPPFLAGS" | 1823 CPPFLAGS="$QT_OPENGL_CPPFLAGS $CXXPICFLAG $CPPFLAGS" |
1824 CXXFLAGS="$CXXPICFLAG $CXXFLAGS" | 1824 CXXFLAGS="$CXXPICFLAG $CXXFLAGS" |
1825 AC_CHECK_HEADERS([QOffscreenSurface]) | 1825 AC_CHECK_HEADERS([QOffscreenSurface]) |
1826 AC_CACHE_CHECK([whether Qt supports full offscreen OpenGL rendering], | 1826 AC_CACHE_CHECK([whether Qt supports full offscreen OpenGL rendering], |
1827 [octave_cv_qt_opengl_os_ok], | 1827 [octave_cv_qt_opengl_os_ok], |
1828 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ | 1828 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ |
1872 dnl Qt header files associated with the compilation test, set and restore | 1872 dnl Qt header files associated with the compilation test, set and restore |
1873 dnl these values outside of the AC_CACHE_CHECK for this macro only. | 1873 dnl these values outside of the AC_CACHE_CHECK for this macro only. |
1874 AC_LANG_PUSH(C++) | 1874 AC_LANG_PUSH(C++) |
1875 ac_octave_save_CPPFLAGS="$CPPFLAGS" | 1875 ac_octave_save_CPPFLAGS="$CPPFLAGS" |
1876 ac_octave_save_CXXFLAGS="$CXXFLAGS" | 1876 ac_octave_save_CXXFLAGS="$CXXFLAGS" |
1877 CPPFLAGS="$QT_CPPFLAGS $CXXPICFLAG $CPPFLAGS" | 1877 CPPFLAGS="$QT_OPENGL_CPPFLAGS $CXXPICFLAG $CPPFLAGS" |
1878 CXXFLAGS="$CXXPICFLAG $CXXFLAGS" | 1878 CXXFLAGS="$CXXPICFLAG $CXXFLAGS" |
1879 AC_CHECK_HEADERS([QOpenGLWidget QGLWidget QGLFunctions_1_1]) | 1879 AC_CHECK_HEADERS([QOpenGLWidget QGLWidget QGLFunctions_1_1]) |
1880 AC_CACHE_CHECK([whether Qt works with OpenGL and GLU], | 1880 AC_CACHE_CHECK([whether Qt works with OpenGL and GLU], |
1881 [octave_cv_qt_opengl_ok], | 1881 [octave_cv_qt_opengl_ok], |
1882 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ | 1882 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ |
2007 if test $build_qt_gui = yes; then | 2007 if test $build_qt_gui = yes; then |
2008 ## Retrieve Qt compilation and linker flags | 2008 ## Retrieve Qt compilation and linker flags |
2009 QT_CPPFLAGS="$($PKG_CONFIG --cflags-only-I $QT_MODULES | $SED -e 's/^ *$//')" | 2009 QT_CPPFLAGS="$($PKG_CONFIG --cflags-only-I $QT_MODULES | $SED -e 's/^ *$//')" |
2010 QT_LDFLAGS="$($PKG_CONFIG --libs-only-L $QT_MODULES | $SED -e 's/^ *$//')" | 2010 QT_LDFLAGS="$($PKG_CONFIG --libs-only-L $QT_MODULES | $SED -e 's/^ *$//')" |
2011 QT_LIBS="$($PKG_CONFIG --libs-only-l $QT_MODULES | $SED -e 's/^ *$//')" | 2011 QT_LIBS="$($PKG_CONFIG --libs-only-l $QT_MODULES | $SED -e 's/^ *$//')" |
2012 QT_OPENGL_CPPFLAGS="$($PKG_CONFIG --cflags-only-I $QT_OPENGL_MODULE | $SED -e 's/^ *$//')" | |
2013 QT_OPENGL_LDFLAGS="$($PKG_CONFIG --libs-only-L $QT_OPENGL_MODULE | $SED -e 's/^ *$//')" | |
2012 QT_OPENGL_LIBS="$($PKG_CONFIG --libs-only-l $QT_OPENGL_MODULE | $SED -e 's/^ *$//')" | 2014 QT_OPENGL_LIBS="$($PKG_CONFIG --libs-only-l $QT_OPENGL_MODULE | $SED -e 's/^ *$//')" |
2013 | 2015 |
2014 case $host_os in | 2016 case $host_os in |
2015 *darwin*) | 2017 *darwin*) |
2016 ## Qt might be installed in framework | 2018 ## Qt might be installed in framework |
2017 if test -z "$QT_LIBS"; then | 2019 if test -z "$QT_LIBS"; then |
2018 QT_LDFLAGS="`$PKG_CONFIG --libs-only-other $QT_MODULES | tr ' ' '\n' | $GREP -e '-F' | uniq | tr '\n' ' '`" | 2020 QT_LDFLAGS="`$PKG_CONFIG --libs-only-other $QT_MODULES | tr ' ' '\n' | $GREP -e '-F' | uniq | tr '\n' ' '`" |
2019 QT_LIBS="`$PKG_CONFIG --libs-only-other $QT_MODULES | tr ' ' '\n' | $GREP -v -e '-F' | uniq | tr '\n' ' '`" | 2021 QT_LIBS="`$PKG_CONFIG --libs-only-other $QT_MODULES | tr ' ' '\n' | $GREP -v -e '-F' | uniq | tr '\n' ' '`" |
2022 QT_OPENGL_LDFLAGS="`$PKG_CONFIG --libs-only-other $QT_OPENGL_MODULE | tr ' ' '\n' | $GREP -e '-F' | uniq | tr '\n' ' '`" | |
2020 QT_OPENGL_LIBS="`$PKG_CONFIG --libs-only-other $QT_OPENGL_MODULE | tr ' ' '\n' | $GREP -v -e '-F' | uniq | tr '\n' ' '`" | 2023 QT_OPENGL_LIBS="`$PKG_CONFIG --libs-only-other $QT_OPENGL_MODULE | tr ' ' '\n' | $GREP -v -e '-F' | uniq | tr '\n' ' '`" |
2021 ## Enabling link_all_deps works around libtool's imperfect handling | 2024 ## Enabling link_all_deps works around libtool's imperfect handling |
2022 ## of the -F flag | 2025 ## of the -F flag |
2023 AM_CONDITIONAL([AMCOND_LINK_ALL_DEPS], | 2026 AM_CONDITIONAL([AMCOND_LINK_ALL_DEPS], |
2024 [test $link_all_deps = yes || test -n "$QT_LDFLAGS"]) | 2027 [test $link_all_deps = yes || test -n "$QT_LDFLAGS"]) |
2171 AC_SUBST(QCOLLECTIONGENERATORFLAGS) | 2174 AC_SUBST(QCOLLECTIONGENERATORFLAGS) |
2172 AC_SUBST(QHELPGENERATORFLAGS) | 2175 AC_SUBST(QHELPGENERATORFLAGS) |
2173 AC_SUBST(QT_CPPFLAGS) | 2176 AC_SUBST(QT_CPPFLAGS) |
2174 AC_SUBST(QT_LDFLAGS) | 2177 AC_SUBST(QT_LDFLAGS) |
2175 AC_SUBST(QT_LIBS) | 2178 AC_SUBST(QT_LIBS) |
2179 AC_SUBST(QT_OPENGL_CPPFLAGS) | |
2180 AC_SUBST(QT_OPENGL_LDFLAGS) | |
2176 AC_SUBST(QT_OPENGL_LIBS) | 2181 AC_SUBST(QT_OPENGL_LIBS) |
2177 ]) | 2182 ]) |
2178 dnl | 2183 dnl |
2179 dnl Check if the default Fortran INTEGER is 64 bits wide. | 2184 dnl Check if the default Fortran INTEGER is 64 bits wide. |
2180 dnl If cross-compiling, assume 4 bytes unless the cache value | 2185 dnl If cross-compiling, assume 4 bytes unless the cache value |