Mercurial > octave
comparison m4/acinclude.m4 @ 15291:7ae14907ae43
build: Add tests for specific Qt functions to configure.ac
* configure.ac: Add OCTAVE_CHECK_FUNC_FINDFIRST_MODERN and
OCTAVE_CHECK_FUNC_SETPLACEHOLDERTEXT macro calls
* m4/acinclude.m4 (OCTAVE_CHECK_FUNC_SETPLACEHOLDERTEXT):
Check whether Qt has SetPlaceholderText function.
* (OCTAVE_CHECK_FUNC_FINDFIRST_MODERN):
Check whether Qscintilla FindFirst accepts 16 or 17 input arguments.
* find-dialog.cc, webinfo.cc: check configure HAVE_XXX values
before using possibly unsupported functions.
author | Rik <rik@octave.org> |
---|---|
date | Tue, 04 Sep 2012 15:54:12 -0700 |
parents | 87f337783d95 |
children | 2981cdbb955f |
comparison
equal
deleted
inserted
replaced
15290:99db33cae82b | 15291:7ae14907ae43 |
---|---|
138 AC_LANG_POP(C++) | 138 AC_LANG_POP(C++) |
139 ]) | 139 ]) |
140 if eval "test \"`echo '$octave_cv_func_cmath_f'$ac_safe`\" = yes"; then | 140 if eval "test \"`echo '$octave_cv_func_cmath_f'$ac_safe`\" = yes"; then |
141 AC_DEFINE(AS_TR_CPP([[HAVE_CMATH_][$1][F]]), 1, | 141 AC_DEFINE(AS_TR_CPP([[HAVE_CMATH_][$1][F]]), 1, |
142 [Define to 1 if <cmath> provides float variant of $1.]) | 142 [Define to 1 if <cmath> provides float variant of $1.]) |
143 fi | |
144 ]) | |
145 dnl | |
146 dnl Check whether Qscintilla FindFirst function is old (16 inputs) or | |
147 dnl new (17 inputs). | |
148 dnl FIXME: This test uses a version number. It potentially could | |
149 dnl be re-written to actually call the function, but is it worth it? | |
150 dnl | |
151 AC_DEFUN([OCTAVE_CHECK_FUNC_FINDFIRST_MODERN], [ | |
152 AC_CACHE_CHECK([whether Qscintilla FindFirst uses 16 or 17 input arguments], | |
153 [octave_cv_func_findfirst_modern], | |
154 [AC_LANG_PUSH(C++) | |
155 save_CPPFLAGS="$CPPFLAGS" | |
156 CPPFLAGS="-I$QT_INCDIR -I$QT_INCDIR/Qt $CPPFLAGS" | |
157 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ | |
158 #include <Qsci/qsciglobal.h> | |
159 ]], [[ | |
160 #if QSCINTILLA_VERSION < 0x020600 | |
161 Old Form Found; | |
162 #endif | |
163 ]])], | |
164 octave_cv_func_findfirst_modern=yes, | |
165 octave_cv_func_findfirst_modern=no) | |
166 CPPFLAGS="$save_CPPFLAGS" | |
167 AC_LANG_POP(C++) | |
168 ]) | |
169 if test $octave_cv_func_findfirst_modern = "yes"; then | |
170 AC_DEFINE(HAVE_FINDFIRST_MODERN, 1, | |
171 [Define to 1 if Qscintilla FindFirst uses modern form with 17 inputs.]) | |
143 fi | 172 fi |
144 ]) | 173 ]) |
145 dnl | 174 dnl |
146 dnl Check if Fortran compiler has the intrinsic function ISNAN. | 175 dnl Check if Fortran compiler has the intrinsic function ISNAN. |
147 dnl | 176 dnl |
188 AC_LANG_POP(C++) | 217 AC_LANG_POP(C++) |
189 ]) | 218 ]) |
190 if test $octave_cv_func_glutesscallback_threedots = "yes"; then | 219 if test $octave_cv_func_glutesscallback_threedots = "yes"; then |
191 AC_DEFINE(HAVE_GLUTESSCALLBACK_THREEDOTS, 1, | 220 AC_DEFINE(HAVE_GLUTESSCALLBACK_THREEDOTS, 1, |
192 [Define to 1 if gluTessCallback is called with (...).]) | 221 [Define to 1 if gluTessCallback is called with (...).]) |
222 fi | |
223 ]) | |
224 dnl | |
225 dnl Check whether Qscintilla SetPlaceholderText function exists. | |
226 dnl FIXME: This test uses a version number. It potentially could | |
227 dnl be re-written to actually call the function, but is it worth it? | |
228 dnl | |
229 AC_DEFUN([OCTAVE_CHECK_FUNC_SETPLACEHOLDERTEXT], [ | |
230 AC_CACHE_CHECK([whether Qt has SetPlaceholderText function], | |
231 [octave_cv_func_setplaceholdertext], | |
232 [AC_LANG_PUSH(C++) | |
233 save_CPPFLAGS="$CPPFLAGS" | |
234 CPPFLAGS="-I$QT_INCDIR $CPPFLAGS" | |
235 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ | |
236 #include <Qt/qglobal.h> | |
237 ]], [[ | |
238 #if QT_VERSION < 0x040700 | |
239 No SetPlacholderText function available; | |
240 #endif | |
241 ]])], | |
242 octave_cv_func_setplaceholdertext=yes, | |
243 octave_cv_func_setplaceholdertext=no) | |
244 CPPFLAGS="$save_CPPFLAGS" | |
245 AC_LANG_POP(C++) | |
246 ]) | |
247 if test $octave_cv_func_setplaceholdertext = "yes"; then | |
248 AC_DEFINE(HAVE_SETPLACEHOLDERTEXT, 1, | |
249 [Define to 1 if you have the Qt SetPlaceholderText function.]) | |
193 fi | 250 fi |
194 ]) | 251 ]) |
195 dnl | 252 dnl |
196 dnl Check whether HDF5 library has version 1.6 API functions. | 253 dnl Check whether HDF5 library has version 1.6 API functions. |
197 dnl | 254 dnl |