test/configure

changeset 2
14a4b7f0bc74
parent 0
38775db5fdf5
child 3
9d60baefa4ed
equal deleted inserted replaced
1:c393cdf57f2e 2:14a4b7f0bc74
236 do 236 do
237 which qmake-qt4 > /dev/null 237 which qmake-qt4 > /dev/null
238 if [ $? -ne 0 ]; then 238 if [ $? -ne 0 ]; then
239 break 239 break
240 fi 240 fi
241 cat >> $TEMP_DIR/make.mk << __EOF__
242 $sub.make
243 __EOF__
241 echo yes 244 echo yes
242 return 0 245 return 0
243 done 246 done
244 247
245 echo no 248 echo no
254 if ! isplatform "windows"; then 257 if ! isplatform "windows"; then
255 break 258 break
256 fi 259 fi
257 CFLAGS+="-I/mingw/include" 260 CFLAGS+="-I/mingw/include"
258 LDFLAGS+="-lcurl" 261 LDFLAGS+="-lcurl"
262 cat >> $TEMP_DIR/make.mk << __EOF__
263 $sub.make
264 __EOF__
259 echo yes 265 echo yes
260 return 0 266 return 0
261 done 267 done
262 268
263 # dependency curl platform="macos" 269 # dependency curl platform="macos"
276 if [ $? -eq 0 ]; then 282 if [ $? -eq 0 ]; then
277 LDFLAGS+=" `curl-config --ldflags`" 283 LDFLAGS+=" `curl-config --ldflags`"
278 else 284 else
279 break 285 break
280 fi 286 fi
287 cat >> $TEMP_DIR/make.mk << __EOF__
288 $sub.make
289 __EOF__
281 echo yes 290 echo yes
282 return 0 291 return 0
283 done 292 done
284 293
285 # dependency curl 294 # dependency curl
291 if ! pkg-config libcurl ; then 300 if ! pkg-config libcurl ; then
292 break 301 break
293 fi 302 fi
294 CFLAGS+=" `pkg-config --cflags libcurl`" 303 CFLAGS+=" `pkg-config --cflags libcurl`"
295 LDFLAGS+=" `pkg-config --libs libcurl`" 304 LDFLAGS+=" `pkg-config --libs libcurl`"
305 cat >> $TEMP_DIR/make.mk << __EOF__
306 $sub.make
307 __EOF__
296 echo yes 308 echo yes
297 return 0 309 return 0
298 done 310 done
299 311
300 echo no 312 echo no
312 if ! pkg-config sqlite3 ; then 324 if ! pkg-config sqlite3 ; then
313 break 325 break
314 fi 326 fi
315 CFLAGS+=" `pkg-config --cflags sqlite3`" 327 CFLAGS+=" `pkg-config --cflags sqlite3`"
316 LDFLAGS+=" `pkg-config --libs sqlite3`" 328 LDFLAGS+=" `pkg-config --libs sqlite3`"
329 cat >> $TEMP_DIR/make.mk << __EOF__
330 $sub.make
331 __EOF__
317 echo yes 332 echo yes
318 return 0 333 return 0
319 done 334 done
320 335
321 echo no 336 echo no
326 printf "checking for test... " 341 printf "checking for test... "
327 # dependency test 342 # dependency test
328 while true 343 while true
329 do 344 do
330 CFLAGS+="-DTEST" 345 CFLAGS+="-DTEST"
346 cat >> $TEMP_DIR/make.mk << __EOF__
347 $sub.make
348 __EOF__
331 echo yes 349 echo yes
332 return 0 350 return 0
333 done 351 done
334 352
335 echo no 353 echo no
347 if ! pkg-config gtk+-2.0 ; then 365 if ! pkg-config gtk+-2.0 ; then
348 break 366 break
349 fi 367 fi
350 CFLAGS+=" `pkg-config --cflags gtk+-2.0`" 368 CFLAGS+=" `pkg-config --cflags gtk+-2.0`"
351 LDFLAGS+=" `pkg-config --libs gtk+-2.0`" 369 LDFLAGS+=" `pkg-config --libs gtk+-2.0`"
370 cat >> $TEMP_DIR/make.mk << __EOF__
371 $sub.make
372 __EOF__
352 echo yes 373 echo yes
353 return 0 374 return 0
354 done 375 done
355 376
356 echo no 377 echo no
368 if ! pkg-config gtk+-5.0 ; then 389 if ! pkg-config gtk+-5.0 ; then
369 break 390 break
370 fi 391 fi
371 CFLAGS+=" `pkg-config --cflags gtk+-5.0`" 392 CFLAGS+=" `pkg-config --cflags gtk+-5.0`"
372 LDFLAGS+=" `pkg-config --libs gtk+-5.0`" 393 LDFLAGS+=" `pkg-config --libs gtk+-5.0`"
394 cat >> $TEMP_DIR/make.mk << __EOF__
395 $sub.make
396 __EOF__
373 echo yes 397 echo yes
374 return 0 398 return 0
375 done 399 done
376 400
377 echo no 401 echo no
389 if ! pkg-config libxml-2.0 ; then 413 if ! pkg-config libxml-2.0 ; then
390 break 414 break
391 fi 415 fi
392 CFLAGS+=" `pkg-config --cflags libxml-2.0`" 416 CFLAGS+=" `pkg-config --cflags libxml-2.0`"
393 LDFLAGS+=" `pkg-config --libs libxml-2.0`" 417 LDFLAGS+=" `pkg-config --libs libxml-2.0`"
418 cat >> $TEMP_DIR/make.mk << __EOF__
419 $sub.make
420 __EOF__
394 echo yes 421 echo yes
395 return 0 422 return 0
396 done 423 done
397 424
398 echo no 425 echo no
399 return 1 426 return 1
400 } 427 }
401 428
402 DEPENDENCIES_FAILED= 429 DEPENDENCIES_FAILED=
403 ERROR=0 430 ERROR=0
431 # general dependencies
432 CFLAGS=
433 LDFLAGS=
434 while true
435 do
436 while true
437 do
438
439 cat >> $TEMP_DIR/make.mk << __EOF__
440 $dependency.make
441 __EOF__
442
443 break
444 done
445
446 break
447 done
448
449 # add general dependency flags to config.mk
450 echo >> $TEMP_DIR/config.mk
451 if [[ ! -z ${CFLAGS} ]]; then
452 echo "CFLAGS += $CFLAGS" >> $TEMP_DIR/config.mk
453 fi
454 if [[ ! -z ${CXXFLAGS} ]]; then
455 echo "CXXFLAGS += $CXXFLAGS" >> $TEMP_DIR/config.mk
456 fi
457 if [[ ! -z ${LDFLAGS} ]]; then
458 echo "LDFLAGS += $LDFLAGS" >> $TEMP_DIR/config.mk
459 fi
404 460
405 # 461 #
406 # OPTION VALUES 462 # OPTION VALUES
407 # 463 #
408 checkopt_toolkit_gtk3() 464 checkopt_toolkit_gtk3()

mercurial