configure

branch
newapi
changeset 170
ad9edb497857
parent 159
84a6e7a7b457
child 171
5065d0d52680
equal deleted inserted replaced
169:fe49cff3c571 170:ad9edb497857
53 --datadir=DIR read-only architecture-independent data [DATAROOTDIR] 53 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
54 --infodir=DIR info documentation [DATAROOTDIR/info] 54 --infodir=DIR info documentation [DATAROOTDIR/info]
55 --mandir=DIR man documentation [DATAROOTDIR/man] 55 --mandir=DIR man documentation [DATAROOTDIR/man]
56 56
57 Options: 57 Options:
58 --toolkit=(gtk3|gtk2|gtk2legacy|qt5|qt4|motif) 58 --toolkit=(gtk4|gtk3|gtk2|gtk2legacy|qt5|qt4|motif)
59 59
60 __EOF__ 60 __EOF__
61 } 61 }
62 62
63 # 63 #
374 done 374 done
375 375
376 echo no 376 echo no
377 return 1 377 return 1
378 } 378 }
379 dependency_gtk4()
380 {
381 printf "checking for gtk4... "
382 # dependency gtk4
383 while true
384 do
385 if [ -z "$PKG_CONFIG" ]; then
386 break
387 fi
388 $PKG_CONFIG gtk+-4.0
389 if [ $? -ne 0 ] ; then
390 break
391 fi
392 CFLAGS="$CFLAGS `$PKG_CONFIG --cflags gtk+-4.0`"
393 LDFLAGS="$LDFLAGS `$PKG_CONFIG --libs gtk+-4.0`"
394 CFLAGS="$CFLAGS -DUI_GTK3"
395 LDFLAGS="$LDFLAGS -lpthread"
396 echo yes
397 return 0
398 done
399
400 echo no
401 return 1
402 }
379 dependency_motif() 403 dependency_motif()
380 { 404 {
381 printf "checking for motif... " 405 printf "checking for motif... "
382 # dependency motif 406 # dependency motif
383 while true 407 while true
489 fi 513 fi
490 514
491 # 515 #
492 # OPTION VALUES 516 # OPTION VALUES
493 # 517 #
518 checkopt_toolkit_gtk4()
519 {
520 VERR=0
521 dependency_gtk4
522 if [ $? -ne 0 ]; then
523 VERR=1
524 fi
525 if [ $VERR -ne 0 ]; then
526 return 1
527 fi
528 cat >> $TEMP_DIR/make.mk << __EOF__
529 TOOLKIT = gtk
530 GTKOBJ = draw_cairo.o
531
532 __EOF__
533 return 0
534 }
494 checkopt_toolkit_gtk3() 535 checkopt_toolkit_gtk3()
495 { 536 {
496 VERR=0 537 VERR=0
497 dependency_gtk3 538 dependency_gtk3
498 if [ $? -ne 0 ]; then 539 if [ $? -ne 0 ]; then
669 ERROR=$SAVED_ERROR 710 ERROR=$SAVED_ERROR
670 DEPENDENCIES_FAILED=$SAVED_DEPENDENCIES_FAILED= 711 DEPENDENCIES_FAILED=$SAVED_DEPENDENCIES_FAILED=
671 else 712 else
672 if false; then 713 if false; then
673 false 714 false
715 elif [ $OPT_TOOLKIT = "gtk4" ]; then
716 echo " toolkit: $OPT_TOOLKIT" >> $TEMP_DIR/options
717 checkopt_toolkit_gtk4
718 if [ $? -ne 0 ]; then
719 ERROR=1
720 fi
674 elif [ $OPT_TOOLKIT = "gtk3" ]; then 721 elif [ $OPT_TOOLKIT = "gtk3" ]; then
675 echo " toolkit: $OPT_TOOLKIT" >> $TEMP_DIR/options 722 echo " toolkit: $OPT_TOOLKIT" >> $TEMP_DIR/options
676 checkopt_toolkit_gtk3 723 checkopt_toolkit_gtk3
677 if [ $? -ne 0 ]; then 724 if [ $? -ne 0 ]; then
678 ERROR=1 725 ERROR=1

mercurial