| 297 shift |
297 shift |
| 298 printf "$@" |
298 printf "$@" |
| 299 fi |
299 fi |
| 300 } |
300 } |
| 301 |
301 |
| 302 dependency_error_sdl2_ttf() |
|
| 303 { |
|
| 304 print_check_msg "$dep_checked_sdl2_ttf" "checking for sdl2_ttf... " |
|
| 305 # dependency sdl2_ttf |
|
| 306 while true |
|
| 307 do |
|
| 308 if [ -z "$PKG_CONFIG" ]; then |
|
| 309 break |
|
| 310 fi |
|
| 311 if test_pkg_config "SDL2_ttf" "" "" "" ; then |
|
| 312 TEMP_CFLAGS="$TEMP_CFLAGS `"$PKG_CONFIG" --cflags SDL2_ttf`" |
|
| 313 TEMP_LDFLAGS="$TEMP_LDFLAGS `"$PKG_CONFIG" --libs SDL2_ttf`" |
|
| 314 else |
|
| 315 break |
|
| 316 fi |
|
| 317 print_check_msg "$dep_checked_sdl2_ttf" "yes\n" |
|
| 318 dep_checked_sdl2_ttf=1 |
|
| 319 return 1 |
|
| 320 done |
|
| 321 |
|
| 322 print_check_msg "$dep_checked_sdl2_ttf" "no\n" |
|
| 323 dep_checked_sdl2_ttf=1 |
|
| 324 return 0 |
|
| 325 } |
|
| 326 dependency_error_asan() |
302 dependency_error_asan() |
| 327 { |
303 { |
| 328 print_check_msg "$dep_checked_asan" "checking for asan... " |
304 print_check_msg "$dep_checked_asan" "checking for asan... " |
| 329 # dependency asan toolchain="gnuc" |
305 # dependency asan toolchain="gnuc" |
| 330 while true |
306 while true |
| 341 |
317 |
| 342 print_check_msg "$dep_checked_asan" "no\n" |
318 print_check_msg "$dep_checked_asan" "no\n" |
| 343 dep_checked_asan=1 |
319 dep_checked_asan=1 |
| 344 return 0 |
320 return 0 |
| 345 } |
321 } |
| 346 dependency_error_sdl2() |
322 dependency_error_sdl3_ttf() |
| 347 { |
323 { |
| 348 print_check_msg "$dep_checked_sdl2" "checking for sdl2... " |
324 print_check_msg "$dep_checked_sdl3_ttf" "checking for sdl3_ttf... " |
| 349 # dependency sdl2 |
325 # dependency sdl3_ttf |
| 350 while true |
326 while true |
| 351 do |
327 do |
| 352 if [ -z "$PKG_CONFIG" ]; then |
328 if [ -z "$PKG_CONFIG" ]; then |
| 353 break |
329 break |
| 354 fi |
330 fi |
| 355 if test_pkg_config "sdl2" "" "" "" ; then |
331 if test_pkg_config "sdl3-ttf" "" "" "" ; then |
| 356 TEMP_CFLAGS="$TEMP_CFLAGS `"$PKG_CONFIG" --cflags sdl2`" |
332 TEMP_CFLAGS="$TEMP_CFLAGS `"$PKG_CONFIG" --cflags sdl3-ttf`" |
| 357 TEMP_LDFLAGS="$TEMP_LDFLAGS `"$PKG_CONFIG" --libs sdl2`" |
333 TEMP_LDFLAGS="$TEMP_LDFLAGS `"$PKG_CONFIG" --libs sdl3-ttf`" |
| 358 else |
334 else |
| 359 break |
335 break |
| 360 fi |
336 fi |
| 361 print_check_msg "$dep_checked_sdl2" "yes\n" |
337 print_check_msg "$dep_checked_sdl3_ttf" "yes\n" |
| 362 dep_checked_sdl2=1 |
338 dep_checked_sdl3_ttf=1 |
| 363 return 1 |
339 return 1 |
| 364 done |
340 done |
| 365 |
341 |
| 366 print_check_msg "$dep_checked_sdl2" "no\n" |
342 print_check_msg "$dep_checked_sdl3_ttf" "no\n" |
| 367 dep_checked_sdl2=1 |
343 dep_checked_sdl3_ttf=1 |
| 368 return 0 |
|
| 369 } |
|
| 370 dependency_error_sdl2_image() |
|
| 371 { |
|
| 372 print_check_msg "$dep_checked_sdl2_image" "checking for sdl2_image... " |
|
| 373 # dependency sdl2_image |
|
| 374 while true |
|
| 375 do |
|
| 376 if [ -z "$PKG_CONFIG" ]; then |
|
| 377 break |
|
| 378 fi |
|
| 379 if test_pkg_config "SDL2_image" "" "" "" ; then |
|
| 380 TEMP_CFLAGS="$TEMP_CFLAGS `"$PKG_CONFIG" --cflags SDL2_image`" |
|
| 381 TEMP_LDFLAGS="$TEMP_LDFLAGS `"$PKG_CONFIG" --libs SDL2_image`" |
|
| 382 else |
|
| 383 break |
|
| 384 fi |
|
| 385 print_check_msg "$dep_checked_sdl2_image" "yes\n" |
|
| 386 dep_checked_sdl2_image=1 |
|
| 387 return 1 |
|
| 388 done |
|
| 389 |
|
| 390 print_check_msg "$dep_checked_sdl2_image" "no\n" |
|
| 391 dep_checked_sdl2_image=1 |
|
| 392 return 0 |
344 return 0 |
| 393 } |
345 } |
| 394 dependency_error_glew() |
346 dependency_error_glew() |
| 395 { |
347 { |
| 396 print_check_msg "$dep_checked_glew" "checking for glew... " |
348 print_check_msg "$dep_checked_glew" "checking for glew... " |
| 413 |
365 |
| 414 print_check_msg "$dep_checked_glew" "no\n" |
366 print_check_msg "$dep_checked_glew" "no\n" |
| 415 dep_checked_glew=1 |
367 dep_checked_glew=1 |
| 416 return 0 |
368 return 0 |
| 417 } |
369 } |
| |
370 dependency_error_sdl3_image() |
| |
371 { |
| |
372 print_check_msg "$dep_checked_sdl3_image" "checking for sdl3_image... " |
| |
373 # dependency sdl3_image |
| |
374 while true |
| |
375 do |
| |
376 if [ -z "$PKG_CONFIG" ]; then |
| |
377 break |
| |
378 fi |
| |
379 if test_pkg_config "sdl3-image" "" "" "" ; then |
| |
380 TEMP_CFLAGS="$TEMP_CFLAGS `"$PKG_CONFIG" --cflags sdl3-image`" |
| |
381 TEMP_LDFLAGS="$TEMP_LDFLAGS `"$PKG_CONFIG" --libs sdl3-image`" |
| |
382 else |
| |
383 break |
| |
384 fi |
| |
385 print_check_msg "$dep_checked_sdl3_image" "yes\n" |
| |
386 dep_checked_sdl3_image=1 |
| |
387 return 1 |
| |
388 done |
| |
389 |
| |
390 print_check_msg "$dep_checked_sdl3_image" "no\n" |
| |
391 dep_checked_sdl3_image=1 |
| |
392 return 0 |
| |
393 } |
| 418 dependency_error_ucx() |
394 dependency_error_ucx() |
| 419 { |
395 { |
| 420 print_check_msg "$dep_checked_ucx" "checking for ucx... " |
396 print_check_msg "$dep_checked_ucx" "checking for ucx... " |
| 421 # dependency ucx |
397 # dependency ucx |
| 422 while true |
398 while true |
| 432 return 1 |
408 return 1 |
| 433 done |
409 done |
| 434 |
410 |
| 435 print_check_msg "$dep_checked_ucx" "no\n" |
411 print_check_msg "$dep_checked_ucx" "no\n" |
| 436 dep_checked_ucx=1 |
412 dep_checked_ucx=1 |
| |
413 return 0 |
| |
414 } |
| |
415 dependency_error_sdl3() |
| |
416 { |
| |
417 print_check_msg "$dep_checked_sdl3" "checking for sdl3... " |
| |
418 # dependency sdl3 |
| |
419 while true |
| |
420 do |
| |
421 if [ -z "$PKG_CONFIG" ]; then |
| |
422 break |
| |
423 fi |
| |
424 if test_pkg_config "sdl3" "" "" "" ; then |
| |
425 TEMP_CFLAGS="$TEMP_CFLAGS `"$PKG_CONFIG" --cflags sdl3`" |
| |
426 TEMP_LDFLAGS="$TEMP_LDFLAGS `"$PKG_CONFIG" --libs sdl3`" |
| |
427 else |
| |
428 break |
| |
429 fi |
| |
430 print_check_msg "$dep_checked_sdl3" "yes\n" |
| |
431 dep_checked_sdl3=1 |
| |
432 return 1 |
| |
433 done |
| |
434 |
| |
435 print_check_msg "$dep_checked_sdl3" "no\n" |
| |
436 dep_checked_sdl3=1 |
| 437 return 0 |
437 return 0 |
| 438 } |
438 } |
| 439 |
439 |
| 440 # start collecting dependency information |
440 # start collecting dependency information |
| 441 echo > "$TEMP_DIR/flags.mk" |
441 echo > "$TEMP_DIR/flags.mk" |
| 503 |
503 |
| 504 if dependency_error_ucx; then |
504 if dependency_error_ucx; then |
| 505 DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED ucx " |
505 DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED ucx " |
| 506 ERROR=1 |
506 ERROR=1 |
| 507 fi |
507 fi |
| 508 if dependency_error_sdl2; then |
508 if dependency_error_sdl3; then |
| 509 DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED sdl2 " |
509 DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED sdl3 " |
| 510 ERROR=1 |
510 ERROR=1 |
| 511 fi |
511 fi |
| 512 if dependency_error_sdl2_ttf; then |
512 if dependency_error_sdl3_ttf; then |
| 513 DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED sdl2_ttf " |
513 DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED sdl3_ttf " |
| 514 ERROR=1 |
514 ERROR=1 |
| 515 fi |
515 fi |
| 516 if dependency_error_sdl2_image; then |
516 if dependency_error_sdl3_image; then |
| 517 DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED sdl2_image " |
517 DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED sdl3_image " |
| 518 ERROR=1 |
518 ERROR=1 |
| 519 fi |
519 fi |
| 520 if dependency_error_glew; then |
520 if dependency_error_glew; then |
| 521 DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED glew " |
521 DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED glew " |
| 522 ERROR=1 |
522 ERROR=1 |