configure

branch
newapi
changeset 302
b00cbbfeec7a
parent 292
8e5e7adf5372
child 404
384f6d1f5784
equal deleted inserted replaced
301:f9e7c57e1e2f 302:b00cbbfeec7a
70 --localedir=DIR locale-dependent data [DATAROOTDIR/locale] 70 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
71 71
72 Options: 72 Options:
73 --debug add extra compile flags for debug builds 73 --debug add extra compile flags for debug builds
74 --release add extra compile flags for release builds 74 --release add extra compile flags for release builds
75 --toolkit=(gtk4|gtk3|gtk2|gtk2legacy|qt5|qt4|motif) 75 --toolkit=(libadwaita|gtk4|gtk3|gtk2|gtk2legacy|qt5|qt4|motif)
76 76
77 __EOF__ 77 __EOF__
78 } 78 }
79 79
80 # 80 #
380 380
381 print_check_msg "$dep_checked_gtk4" "no\n" 381 print_check_msg "$dep_checked_gtk4" "no\n"
382 dep_checked_gtk4=1 382 dep_checked_gtk4=1
383 return 0 383 return 0
384 } 384 }
385 dependency_error_libadwaita()
386 {
387 print_check_msg "$dep_checked_libadwaita" "checking for libadwaita... "
388 # dependency libadwaita
389 while true
390 do
391 if [ -z "$PKG_CONFIG" ]; then
392 break
393 fi
394 if test_pkg_config "libadwaita-1" "" "" "" ; then
395 TEMP_CFLAGS="$TEMP_CFLAGS `"$PKG_CONFIG" --cflags libadwaita-1`"
396 TEMP_LDFLAGS="$TEMP_LDFLAGS `"$PKG_CONFIG" --libs libadwaita-1`"
397 else
398 break
399 fi
400 TEMP_CFLAGS="$TEMP_CFLAGS -DUI_GTK4 -DUI_LIBADWAITA"
401 TEMP_LDFLAGS="$TEMP_LDFLAGS -lpthread"
402 print_check_msg "$dep_checked_libadwaita" "yes\n"
403 dep_checked_libadwaita=1
404 return 1
405 done
406
407 print_check_msg "$dep_checked_libadwaita" "no\n"
408 dep_checked_libadwaita=1
409 return 0
410 }
385 dependency_error_motif() 411 dependency_error_motif()
386 { 412 {
387 print_check_msg "$dep_checked_motif" "checking for motif... " 413 print_check_msg "$dep_checked_motif" "checking for motif... "
388 # dependency motif platform="bsd" 414 # dependency motif platform="bsd"
389 while true 415 while true
539 fi 565 fi
540 566
541 # 567 #
542 # OPTION VALUES 568 # OPTION VALUES
543 # 569 #
570 checkopt_toolkit_libadwaita()
571 {
572 VERR=0
573 if dependency_error_libadwaita ; then
574 VERR=1
575 fi
576 if [ $VERR -ne 0 ]; then
577 return 1
578 fi
579 cat >> "$TEMP_DIR/make.mk" << __EOF__
580 TOOLKIT = gtk
581 GTKOBJ = draw_cairo.o
582 __EOF__
583 return 0
584 }
544 checkopt_toolkit_gtk4() 585 checkopt_toolkit_gtk4()
545 { 586 {
546 VERR=0 587 VERR=0
547 if dependency_error_gtk4 ; then 588 if dependency_error_gtk4 ; then
548 VERR=1 589 VERR=1
717 DEPENDENCIES_FAILED="$SAVED_DEPENDENCIES_FAILED" 758 DEPENDENCIES_FAILED="$SAVED_DEPENDENCIES_FAILED"
718 else 759 else
719 echo "checking option toolkit = $OPT_TOOLKIT" 760 echo "checking option toolkit = $OPT_TOOLKIT"
720 if false; then 761 if false; then
721 false 762 false
763 elif [ "$OPT_TOOLKIT" = "libadwaita" ]; then
764 echo " toolkit: $OPT_TOOLKIT" >> $TEMP_DIR/options
765 if checkopt_toolkit_libadwaita ; then
766 :
767 else
768 ERROR=1
769 DEPENDENCIES_FAILED="option 'toolkit' $DEPENDENCIES_FAILED"
770 fi
722 elif [ "$OPT_TOOLKIT" = "gtk4" ]; then 771 elif [ "$OPT_TOOLKIT" = "gtk4" ]; then
723 echo " toolkit: $OPT_TOOLKIT" >> $TEMP_DIR/options 772 echo " toolkit: $OPT_TOOLKIT" >> $TEMP_DIR/options
724 if checkopt_toolkit_gtk4 ; then 773 if checkopt_toolkit_gtk4 ; then
725 : 774 :
726 else 775 else

mercurial