test/configure

changeset 3
9d60baefa4ed
parent 2
14a4b7f0bc74
child 4
6bf4c948d0ba
equal deleted inserted replaced
2:14a4b7f0bc74 3:9d60baefa4ed
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__ 241 echo yes
242 $sub.make
243 __EOF__
244 echo yes
245 return 0 242 return 0
246 done 243 done
247 244
248 echo no 245 echo no
249 return 1 246 return 1
257 if ! isplatform "windows"; then 254 if ! isplatform "windows"; then
258 break 255 break
259 fi 256 fi
260 CFLAGS+="-I/mingw/include" 257 CFLAGS+="-I/mingw/include"
261 LDFLAGS+="-lcurl" 258 LDFLAGS+="-lcurl"
262 cat >> $TEMP_DIR/make.mk << __EOF__ 259 echo yes
263 $sub.make
264 __EOF__
265 echo yes
266 return 0 260 return 0
267 done 261 done
268 262
269 # dependency curl platform="macos" 263 # dependency curl platform="macos"
270 while true 264 while true
282 if [ $? -eq 0 ]; then 276 if [ $? -eq 0 ]; then
283 LDFLAGS+=" `curl-config --ldflags`" 277 LDFLAGS+=" `curl-config --ldflags`"
284 else 278 else
285 break 279 break
286 fi 280 fi
287 cat >> $TEMP_DIR/make.mk << __EOF__ 281 echo yes
288 $sub.make
289 __EOF__
290 echo yes
291 return 0 282 return 0
292 done 283 done
293 284
294 # dependency curl 285 # dependency curl
295 while true 286 while true
300 if ! pkg-config libcurl ; then 291 if ! pkg-config libcurl ; then
301 break 292 break
302 fi 293 fi
303 CFLAGS+=" `pkg-config --cflags libcurl`" 294 CFLAGS+=" `pkg-config --cflags libcurl`"
304 LDFLAGS+=" `pkg-config --libs libcurl`" 295 LDFLAGS+=" `pkg-config --libs libcurl`"
305 cat >> $TEMP_DIR/make.mk << __EOF__ 296 echo yes
306 $sub.make
307 __EOF__
308 echo yes
309 return 0 297 return 0
310 done 298 done
311 299
312 echo no 300 echo no
313 return 1 301 return 1
314 } 302 }
303 dependency_test()
304 {
305 printf "checking for test... "
306 # dependency test platform="bsd"
307 while true
308 do
309 if ! isplatform "bsd"; then
310 break
311 fi
312 if isplatform "macos"; then
313 break
314 fi
315 CFLAGS+="-DBSD"
316 echo yes
317 return 0
318 done
319
320 # dependency test
321 while true
322 do
323 CFLAGS+="-DTEST"
324 echo yes
325 return 0
326 done
327
328 echo no
329 return 1
330 }
315 dependency_sqlite() 331 dependency_sqlite()
316 { 332 {
317 printf "checking for sqlite... " 333 printf "checking for sqlite... "
318 # dependency sqlite 334 # dependency sqlite
319 while true 335 while true
324 if ! pkg-config sqlite3 ; then 340 if ! pkg-config sqlite3 ; then
325 break 341 break
326 fi 342 fi
327 CFLAGS+=" `pkg-config --cflags sqlite3`" 343 CFLAGS+=" `pkg-config --cflags sqlite3`"
328 LDFLAGS+=" `pkg-config --libs sqlite3`" 344 LDFLAGS+=" `pkg-config --libs sqlite3`"
329 cat >> $TEMP_DIR/make.mk << __EOF__ 345 echo yes
330 $sub.make
331 __EOF__
332 echo yes
333 return 0 346 return 0
334 done 347 done
335 348
336 echo no 349 echo no
337 return 1 350 return 1
338 } 351 }
339 dependency_test() 352 dependency_gtk2()
340 { 353 {
341 printf "checking for test... " 354 printf "checking for gtk2... "
342 # dependency test 355 # dependency gtk2
343 while true 356 while true
344 do 357 do
345 CFLAGS+="-DTEST" 358 if [ -z "PKG_CONFIG" ]; then
346 cat >> $TEMP_DIR/make.mk << __EOF__ 359 break
347 $sub.make 360 fi
348 __EOF__ 361 if ! pkg-config gtk+-2.0 ; then
349 echo yes 362 break
363 fi
364 CFLAGS+=" `pkg-config --cflags gtk+-2.0`"
365 LDFLAGS+=" `pkg-config --libs gtk+-2.0`"
366 echo yes
350 return 0 367 return 0
351 done 368 done
352 369
353 echo no 370 echo no
354 return 1 371 return 1
355 } 372 }
356 dependency_gtk2() 373 dependency_gtk3()
357 { 374 {
358 printf "checking for gtk2... " 375 printf "checking for gtk3... "
359 # dependency gtk2 376 # dependency gtk3
360 while true 377 while true
361 do 378 do
362 if [ -z "PKG_CONFIG" ]; then 379 if [ -z "PKG_CONFIG" ]; then
363 break 380 break
364 fi 381 fi
365 if ! pkg-config gtk+-2.0 ; then
366 break
367 fi
368 CFLAGS+=" `pkg-config --cflags gtk+-2.0`"
369 LDFLAGS+=" `pkg-config --libs gtk+-2.0`"
370 cat >> $TEMP_DIR/make.mk << __EOF__
371 $sub.make
372 __EOF__
373 echo yes
374 return 0
375 done
376
377 echo no
378 return 1
379 }
380 dependency_gtk3()
381 {
382 printf "checking for gtk3... "
383 # dependency gtk3
384 while true
385 do
386 if [ -z "PKG_CONFIG" ]; then
387 break
388 fi
389 if ! pkg-config gtk+-5.0 ; then 382 if ! pkg-config gtk+-5.0 ; then
390 break 383 break
391 fi 384 fi
392 CFLAGS+=" `pkg-config --cflags gtk+-5.0`" 385 CFLAGS+=" `pkg-config --cflags gtk+-5.0`"
393 LDFLAGS+=" `pkg-config --libs gtk+-5.0`" 386 LDFLAGS+=" `pkg-config --libs gtk+-5.0`"
394 cat >> $TEMP_DIR/make.mk << __EOF__ 387 echo yes
395 $sub.make
396 __EOF__
397 echo yes
398 return 0 388 return 0
399 done 389 done
400 390
401 echo no 391 echo no
402 return 1 392 return 1
414 break 404 break
415 fi 405 fi
416 CFLAGS+=" `pkg-config --cflags libxml-2.0`" 406 CFLAGS+=" `pkg-config --cflags libxml-2.0`"
417 LDFLAGS+=" `pkg-config --libs libxml-2.0`" 407 LDFLAGS+=" `pkg-config --libs libxml-2.0`"
418 cat >> $TEMP_DIR/make.mk << __EOF__ 408 cat >> $TEMP_DIR/make.mk << __EOF__
419 $sub.make 409 # Dependency: libxml2
410 xml = libxml2
411
420 __EOF__ 412 __EOF__
421 echo yes 413 echo yes
422 return 0 414 return 0
423 done 415 done
424 416
425 echo no 417 echo no
426 return 1 418 return 1
434 while true 426 while true
435 do 427 do
436 while true 428 while true
437 do 429 do
438 430
439 cat >> $TEMP_DIR/make.mk << __EOF__
440 $dependency.make
441 __EOF__
442 431
443 break 432 break
444 done 433 done
445 434
446 break 435 break

mercurial