@@ -118,11 +118,17 @@ AC_DEFUN([BITCOIN_QT_CONFIGURE],[
118
118
if test x$bitcoin_cv_static_qt = xyes; then
119
119
_BITCOIN_QT_FIND_STATIC_PLUGINS
120
120
AC_DEFINE ( QT_STATICPLUGIN , 1 , [ Define this symbol if qt plugins are static] )
121
- AC_CACHE_CHECK ( for Qt < 5.4 , bitcoin_cv_need_acc_widget ,[ AC_COMPILE_IFELSE ( [ AC_LANG_PROGRAM (
122
- [ [ #include <QtCore>] ] ,[ [
123
- #if QT_VERSION >= 0x050400
124
- choke;
125
- #endif
121
+ AC_CACHE_CHECK ( for Qt < 5.4 , bitcoin_cv_need_acc_widget ,[
122
+ AC_COMPILE_IFELSE ( [ AC_LANG_PROGRAM ( [ [
123
+ #include <QtCore/qconfig.h>
124
+ #ifndef QT_VERSION
125
+ # include <QtCore/qglobal.h>
126
+ #endif
127
+ ] ] ,
128
+ [ [
129
+ #if QT_VERSION >= 0x050400
130
+ choke
131
+ #endif
126
132
] ] ) ] ,
127
133
[ bitcoin_cv_need_acc_widget=yes] ,
128
134
[ bitcoin_cv_need_acc_widget=no] )
@@ -173,11 +179,16 @@ AC_DEFUN([BITCOIN_QT_CONFIGURE],[
173
179
TEMP_CXXFLAGS=$CXXFLAGS
174
180
CPPFLAGS="$QT_INCLUDES $CPPFLAGS"
175
181
CXXFLAGS="$PIE_FLAGS $CXXFLAGS"
176
- AC_COMPILE_IFELSE ( [ AC_LANG_PROGRAM ( [ [ #include <QtCore/qconfig.h>] ] ,
182
+ AC_COMPILE_IFELSE ( [ AC_LANG_PROGRAM ( [ [
183
+ #include <QtCore/qconfig.h>
184
+ #ifndef QT_VERSION
185
+ # include <QtCore/qglobal.h>
186
+ #endif
187
+ ] ] ,
177
188
[ [
178
- #if defined(QT_REDUCE_RELOCATIONS)
179
- choke;
180
- #endif
189
+ #if defined(QT_REDUCE_RELOCATIONS)
190
+ choke
191
+ #endif
181
192
] ] ) ] ,
182
193
[ AC_MSG_RESULT ( yes ) ; QT_PIE_FLAGS=$PIE_FLAGS ] ,
183
194
[ AC_MSG_RESULT ( no ) ; QT_PIE_FLAGS=$PIC_FLAGS]
@@ -190,11 +201,16 @@ AC_DEFUN([BITCOIN_QT_CONFIGURE],[
190
201
AC_MSG_CHECKING ( whether - fPIC is needed with this Qt config )
191
202
TEMP_CPPFLAGS=$CPPFLAGS
192
203
CPPFLAGS="$QT_INCLUDES $CPPFLAGS"
193
- AC_COMPILE_IFELSE ( [ AC_LANG_PROGRAM ( [ [ #include <QtCore/qconfig.h>] ] ,
204
+ AC_COMPILE_IFELSE ( [ AC_LANG_PROGRAM ( [ [
205
+ #include <QtCore/qconfig.h>
206
+ #ifndef QT_VERSION
207
+ # include <QtCore/qglobal.h>
208
+ #endif
209
+ ] ] ,
194
210
[ [
195
- #if defined(QT_REDUCE_RELOCATIONS)
196
- choke;
197
- #endif
211
+ #if defined(QT_REDUCE_RELOCATIONS)
212
+ choke
213
+ #endif
198
214
] ] ) ] ,
199
215
[ AC_MSG_RESULT ( no ) ] ,
200
216
[ AC_MSG_RESULT ( yes ) ; QT_PIE_FLAGS=$PIC_FLAGS]
@@ -269,13 +285,15 @@ dnl Requires: INCLUDES must be populated as necessary.
269
285
dnl Output: bitcoin_cv_qt5=yes|no
270
286
AC_DEFUN ( [ _BITCOIN_QT_CHECK_QT5] ,[
271
287
AC_CACHE_CHECK ( for Qt 5 , bitcoin_cv_qt5 ,[
272
- AC_COMPILE_IFELSE ( [ AC_LANG_PROGRAM (
273
- [ [ #include <QtCore>] ] ,
288
+ AC_COMPILE_IFELSE ( [ AC_LANG_PROGRAM ( [ [
289
+ #include <QtCore/qconfig.h>
290
+ #ifndef QT_VERSION
291
+ # include <QtCore/qglobal.h>
292
+ #endif
293
+ ] ] ,
274
294
[ [
275
295
#if QT_VERSION < 0x050000
276
- choke me
277
- #else
278
- return 0;
296
+ choke
279
297
#endif
280
298
] ] ) ] ,
281
299
[ bitcoin_cv_qt5=yes] ,
@@ -289,13 +307,15 @@ dnl Output: bitcoin_cv_static_qt=yes|no
289
307
dnl Output: Defines QT_STATICPLUGIN if plugins are static.
290
308
AC_DEFUN ( [ _BITCOIN_QT_IS_STATIC] ,[
291
309
AC_CACHE_CHECK ( for static Qt , bitcoin_cv_static_qt ,[
292
- AC_COMPILE_IFELSE ( [ AC_LANG_PROGRAM (
293
- [ [ #include <QtCore>] ] ,
310
+ AC_COMPILE_IFELSE ( [ AC_LANG_PROGRAM ( [ [
311
+ #include <QtCore/qconfig.h>
312
+ #ifndef QT_VERSION
313
+ # include <QtCore/qglobal.h>
314
+ #endif
315
+ ] ] ,
294
316
[ [
295
- #if defined(QT_STATIC)
296
- return 0;
297
- #else
298
- choke me
317
+ #if !defined(QT_STATIC)
318
+ choke
299
319
#endif
300
320
] ] ) ] ,
301
321
[ bitcoin_cv_static_qt=yes] ,
@@ -352,11 +372,17 @@ AC_DEFUN([_BITCOIN_QT_FIND_STATIC_PLUGINS],[
352
372
] )
353
373
else
354
374
if test x$TARGET_OS = xwindows; then
355
- AC_CACHE_CHECK ( for Qt >= 5.6 , bitcoin_cv_need_platformsupport ,[ AC_COMPILE_IFELSE ( [ AC_LANG_PROGRAM (
356
- [ [ #include <QtCore>] ] ,[ [
357
- #if QT_VERSION < 0x050600
358
- choke;
359
- #endif
375
+ AC_CACHE_CHECK ( for Qt >= 5.6 , bitcoin_cv_need_platformsupport ,[
376
+ AC_COMPILE_IFELSE ( [ AC_LANG_PROGRAM ( [ [
377
+ #include <QtCore/qconfig.h>
378
+ #ifndef QT_VERSION
379
+ # include <QtCore/qglobal.h>
380
+ #endif
381
+ ] ] ,
382
+ [ [
383
+ #if QT_VERSION < 0x050600
384
+ choke
385
+ #endif
360
386
] ] ) ] ,
361
387
[ bitcoin_cv_need_platformsupport=yes] ,
362
388
[ bitcoin_cv_need_platformsupport=no] )
0 commit comments