configure

changeset 44
473954dc6b74
parent 32
e5f4d8af567e
child 55
1ce14068ef31
equal deleted inserted replaced
43:ef01d2c90128 44:473954dc6b74
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 #
506 506
507 print_check_msg "$dep_checked_openssl" "no\n" 507 print_check_msg "$dep_checked_openssl" "no\n"
508 dep_checked_openssl=1 508 dep_checked_openssl=1
509 return 0 509 return 0
510 } 510 }
511 dependency_error_libadwaita()
512 {
513 print_check_msg "$dep_checked_libadwaita" "checking for libadwaita... "
514 # dependency libadwaita
515 while true
516 do
517 if [ -z "$PKG_CONFIG" ]; then
518 break
519 fi
520 if test_pkg_config "libadwaita-1" "" "" "" ; then
521 TEMP_CFLAGS="$TEMP_CFLAGS `"$PKG_CONFIG" --cflags libadwaita-1`"
522 TEMP_LDFLAGS="$TEMP_LDFLAGS `"$PKG_CONFIG" --libs libadwaita-1`"
523 else
524 break
525 fi
526 TEMP_CFLAGS="$TEMP_CFLAGS -DUI_GTK4 -DUI_LIBADWAITA"
527 TEMP_LDFLAGS="$TEMP_LDFLAGS -lpthread"
528 print_check_msg "$dep_checked_libadwaita" "yes\n"
529 dep_checked_libadwaita=1
530 return 1
531 done
532
533 print_check_msg "$dep_checked_libadwaita" "no\n"
534 dep_checked_libadwaita=1
535 return 0
536 }
511 dependency_error_motif() 537 dependency_error_motif()
512 { 538 {
513 print_check_msg "$dep_checked_motif" "checking for motif... " 539 print_check_msg "$dep_checked_motif" "checking for motif... "
514 # dependency motif platform="bsd" 540 # dependency motif platform="bsd"
515 while true 541 while true
749 fi 775 fi
750 776
751 # 777 #
752 # OPTION VALUES 778 # OPTION VALUES
753 # 779 #
780 checkopt_toolkit_libadwaita()
781 {
782 VERR=0
783 if dependency_error_libadwaita ; then
784 VERR=1
785 fi
786 if [ $VERR -ne 0 ]; then
787 return 1
788 fi
789 cat >> "$TEMP_DIR/make.mk" << __EOF__
790 TOOLKIT = gtk
791 GTKOBJ = draw_cairo.o
792 __EOF__
793 return 0
794 }
754 checkopt_toolkit_gtk4() 795 checkopt_toolkit_gtk4()
755 { 796 {
756 VERR=0 797 VERR=0
757 if dependency_error_gtk4 ; then 798 if dependency_error_gtk4 ; then
758 VERR=1 799 VERR=1
976 DEPENDENCIES_FAILED="$SAVED_DEPENDENCIES_FAILED" 1017 DEPENDENCIES_FAILED="$SAVED_DEPENDENCIES_FAILED"
977 else 1018 else
978 echo "checking option toolkit = $OPT_TOOLKIT" 1019 echo "checking option toolkit = $OPT_TOOLKIT"
979 if false; then 1020 if false; then
980 false 1021 false
1022 elif [ "$OPT_TOOLKIT" = "libadwaita" ]; then
1023 echo " toolkit: $OPT_TOOLKIT" >> $TEMP_DIR/options
1024 if checkopt_toolkit_libadwaita ; then
1025 :
1026 else
1027 ERROR=1
1028 DEPENDENCIES_FAILED="option 'toolkit' $DEPENDENCIES_FAILED"
1029 fi
981 elif [ "$OPT_TOOLKIT" = "gtk4" ]; then 1030 elif [ "$OPT_TOOLKIT" = "gtk4" ]; then
982 echo " toolkit: $OPT_TOOLKIT" >> $TEMP_DIR/options 1031 echo " toolkit: $OPT_TOOLKIT" >> $TEMP_DIR/options
983 if checkopt_toolkit_gtk4 ; then 1032 if checkopt_toolkit_gtk4 ; then
984 : 1033 :
985 else 1034 else

mercurial