comparison configure @ 109067:b5f73bf59a4f

Use non-deprecated Gtk+ functions, add changes for Gtk+3 with GSEAL_ENABLE. * configure.in: Add --with-x-toolkit=gtk3. Remove HAVE_GTK_MULTIDISPLAY, check for gtk_file_chooser_dialog_new, and HAVE_GTK_FILE_BOTH (implied by minimum required Gtk+ 2.6). Add checks for functions introduced in Gtk+ 2.14 or newer. * xterm.h (gtk_widget_get_window, gtk_widget_get_mapped) (gtk_adjustment_get_page_size, gtk_adjustment_get_upper): New defines based on what configure finds. * xterm.c (XTflash): Use gtk_widget_get_window. (xg_scroll_callback): Use gtk_adjustment_get_upper and gtk_adjustment_get_page_size. (handle_one_xevent): Use gtk_widget_get_mapped. (x_term_init): Remove HAVE_GTK_MULTIDISPLAY and associated error messages. * xmenu.c (create_and_show_popup_menu): Call gtk_widget_get_mapped. * gtkutil.h: Replace HAVE_GTK_FILE_BOTH with HAVE_GTK_FILE_SELECTION_NEW. * gtkutil.c (xg_display_open, xg_display_close): Remove HAVE_GTK_MULTIDISPLAY, it is always defined. (xg_display_open): Return type is void. (gtk_widget_set_has_window) (gtk_dialog_get_action_area, gtk_dialog_get_content_area) (gtk_widget_get_sensitive, gtk_adjustment_set_page_size) (gtk_adjustment_set_page_increment) (gtk_adjustment_get_step_increment): #define these if not found by configure. (remove_submenu): New define based on Gtk+ version. (xg_set_cursor, xg_frame_resized, xg_event_is_for_scrollbar): Use gtk_widget_get_window. (xg_frame_resized, xg_update_frame_menubar): Use gtk_widget_get_mapped. (xg_create_frame_widgets): Use gtk_widget_set_has_window. (create_dialog): Use gtk_dialog_get_action_area and gtk_dialog_get_content_area. (xg_uses_old_file_dialog, xg_get_file_name): Remove HAVE_GTK_FILE_BOTH and HAVE_GTK_FILE_CHOOSER_DIALOG_NEW. File chooser is always available, so checking for HAVE_GTK_FILE_SELECTION_NEW is enough. (xg_update_menubar, xg_update_submenu, xg_show_toolbar_item): Use g_object_ref and g_object_unref. (xg_update_menu_item, xg_tool_bar_menu_proxy): Use gtk_widget_get_sensitive. (xg_update_submenu): Use remove_submenu. (xg_update_scrollbar_pos): Don't use GtkFixedChild, use child properties instead to get old x and y position. (xg_set_toolkit_scroll_bar_thumb): Use gtk_adjustment_get_page_size, gtk_adjustment_get_step_increment, gtk_adjustment_set_page_size, gtk_adjustment_set_step_increment and gtk_adjustment_set_page_increment. (xg_get_tool_bar_widgets): New function. (xg_tool_bar_menu_proxy, xg_show_toolbar_item) (update_frame_tool_bar): Call xg_get_tool_bar_widgets. (toolbar_set_orientation): New #define based on if configure finds gtk_orientable_set_orientation. (xg_create_tool_bar): Call toolbar_set_orientation. (xg_make_tool_item, xg_show_toolbar_item): Call gtk_box_pack_start instead of gtk_box_pack_start_defaults.
author Jan D <jan.h.d@swipnet.se>
date Mon, 28 Jun 2010 12:11:26 +0200
parents 3ff97bad1c47
children c97bf1cfaa8d
comparison
equal deleted inserted replaced
109066:6d629fcc79e9 109067:b5f73bf59a4f
743 build_os 743 build_os
744 build_vendor 744 build_vendor
745 build_cpu 745 build_cpu
746 build 746 build
747 MAINT 747 MAINT
748 GZIP_INFO
748 target_alias 749 target_alias
749 host_alias 750 host_alias
750 build_alias 751 build_alias
751 LIBS 752 LIBS
752 ECHO_T 753 ECHO_T
813 with_gpm 814 with_gpm
814 with_dbus 815 with_dbus
815 with_gconf 816 with_gconf
816 with_selinux 817 with_selinux
817 with_makeinfo 818 with_makeinfo
819 with_compress_info
818 with_pkg_config_prog 820 with_pkg_config_prog
819 with_crt_dir 821 with_crt_dir
820 with_gnustep_conf 822 with_gnustep_conf
821 enable_ns_self_contained 823 enable_ns_self_contained
822 enable_asserts 824 enable_asserts
1493 --with-mail-unlink unlink, rather than empty, mail spool after reading 1495 --with-mail-unlink unlink, rather than empty, mail spool after reading
1494 --with-mailhost=HOSTNAME 1496 --with-mailhost=HOSTNAME
1495 string giving default POP mail host 1497 string giving default POP mail host
1496 --without-sound don't compile with sound support 1498 --without-sound don't compile with sound support
1497 --without-sync-input process async input synchronously 1499 --without-sync-input process async input synchronously
1498 --with-x-toolkit=KIT use an X toolkit (KIT one of: yes or gtk, lucid or 1500 --with-x-toolkit=KIT use an X toolkit (KIT one of: yes or gtk, gtk3,
1499 athena, motif, no) 1501 lucid or athena, motif, no)
1500 --without-xpm don't compile with XPM image support 1502 --without-xpm don't compile with XPM image support
1501 --without-jpeg don't compile with JPEG image support 1503 --without-jpeg don't compile with JPEG image support
1502 --without-tiff don't compile with TIFF image support 1504 --without-tiff don't compile with TIFF image support
1503 --without-gif don't compile with GIF image support 1505 --without-gif don't compile with GIF image support
1504 --without-png don't compile with PNG image support 1506 --without-png don't compile with PNG image support
1515 console 1517 console
1516 --without-dbus don't compile with D-Bus support 1518 --without-dbus don't compile with D-Bus support
1517 --without-gconf don't compile with GConf support 1519 --without-gconf don't compile with GConf support
1518 --without-selinux don't compile with SELinux support 1520 --without-selinux don't compile with SELinux support
1519 --without-makeinfo don't require makeinfo for building manuals 1521 --without-makeinfo don't require makeinfo for building manuals
1522 --without-compress-info don't compress the installed Info pages
1520 --with-pkg-config-prog=PATH 1523 --with-pkg-config-prog=PATH
1521 path to pkg-config for finding GTK and librsvg 1524 path to pkg-config for finding GTK and librsvg
1522 --with-crt-dir=DIR directory containing crtn.o etc. The default is 1525 --with-crt-dir=DIR directory containing crtn.o etc. The default is
1523 /usr/lib, or /usr/lib64 on some platforms. 1526 /usr/lib, or /usr/lib64 on some platforms.
1524 --with-gnustep-conf=PATH 1527 --with-gnustep-conf=PATH
2656 n | no ) val=no ;; 2659 n | no ) val=no ;;
2657 l | lu | luc | luci | lucid ) val=lucid ;; 2660 l | lu | luc | luci | lucid ) val=lucid ;;
2658 a | at | ath | athe | athen | athena ) val=athena ;; 2661 a | at | ath | athe | athen | athena ) val=athena ;;
2659 m | mo | mot | moti | motif ) val=motif ;; 2662 m | mo | mot | moti | motif ) val=motif ;;
2660 g | gt | gtk ) val=gtk ;; 2663 g | gt | gtk ) val=gtk ;;
2664 gtk3 ) val=gtk3 ;;
2661 * ) 2665 * )
2662 as_fn_error "\`--with-x-toolkit=$withval' is invalid; 2666 as_fn_error "\`--with-x-toolkit=$withval' is invalid;
2663 this option's value should be \`yes', \`no', \`lucid', \`athena', \`motif' or \`gtk'. 2667 this option's value should be \`yes', \`no', \`lucid', \`athena', \`motif', \`gtk' or
2664 \`yes' and \`gtk' are synonyms. \`athena' and \`lucid' are synonyms." "$LINENO" 5 2668 \`gtk3'. \`yes' and \`gtk' are synonyms. \`athena' and \`lucid' are synonyms." "$LINENO" 5
2665 ;; 2669 ;;
2666 esac 2670 esac
2667 with_x_toolkit=$val 2671 with_x_toolkit=$val
2668 2672
2669 fi 2673 fi
2815 # Check whether --with-makeinfo was given. 2819 # Check whether --with-makeinfo was given.
2816 if test "${with_makeinfo+set}" = set; then : 2820 if test "${with_makeinfo+set}" = set; then :
2817 withval=$with_makeinfo; 2821 withval=$with_makeinfo;
2818 else 2822 else
2819 with_makeinfo=yes 2823 with_makeinfo=yes
2824 fi
2825
2826
2827 ## This is an option because I do not know if all info/man support
2828 ## compressed files, nor how to test if they do so.
2829
2830 # Check whether --with-compress-info was given.
2831 if test "${with_compress_info+set}" = set; then :
2832 withval=$with_compress_info;
2833 else
2834 with_compress_info=yes
2835 fi
2836
2837 if test $with_compress_info = yes; then
2838 GZIP_INFO=yes
2839 else
2840 GZIP_INFO=
2820 fi 2841 fi
2821 2842
2822 2843
2823 2844
2824 # Check whether --with-pkg-config-prog was given. 2845 # Check whether --with-pkg-config-prog was given.
7480 case "${with_x_toolkit}" in 7501 case "${with_x_toolkit}" in
7481 athena | lucid ) USE_X_TOOLKIT=LUCID ;; 7502 athena | lucid ) USE_X_TOOLKIT=LUCID ;;
7482 motif ) USE_X_TOOLKIT=MOTIF ;; 7503 motif ) USE_X_TOOLKIT=MOTIF ;;
7483 gtk ) with_gtk=yes 7504 gtk ) with_gtk=yes
7484 USE_X_TOOLKIT=none ;; 7505 USE_X_TOOLKIT=none ;;
7506 gtk3 ) with_gtk3=yes
7507 USE_X_TOOLKIT=none ;;
7485 no ) USE_X_TOOLKIT=none ;; 7508 no ) USE_X_TOOLKIT=none ;;
7486 * ) USE_X_TOOLKIT=maybe ;; 7509 * ) USE_X_TOOLKIT=maybe ;;
7487 esac 7510 esac
7488 ;; 7511 ;;
7489 nextstep | none ) 7512 nextstep | none )
8315 fi 8338 fi
8316 fi 8339 fi
8317 8340
8318 8341
8319 HAVE_GTK=no 8342 HAVE_GTK=no
8320 if test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "maybe"; then 8343 if test "${with_gtk3}" = "yes"; then
8321 GLIB_REQUIRED=2.6 8344 GLIB_REQUIRED=2.6
8322 GTK_REQUIRED=2.6 8345 GTK_REQUIRED=2.90
8323 GTK_MODULES="gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED" 8346 GTK_MODULES="gtk+-3.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
8324 8347
8325 8348
8326 succeeded=no 8349 succeeded=no
8327 8350
8328 # Extract the first word of "pkg-config", so it can be a program name with args. 8351 # Extract the first word of "pkg-config", so it can be a program name with args.
8419 if test "$pkg_check_gtk" = "no" && test "$USE_X_TOOLKIT" != "maybe"; then 8442 if test "$pkg_check_gtk" = "no" && test "$USE_X_TOOLKIT" != "maybe"; then
8420 as_fn_error "$GTK_PKG_ERRORS" "$LINENO" 5 8443 as_fn_error "$GTK_PKG_ERRORS" "$LINENO" 5
8421 fi 8444 fi
8422 fi 8445 fi
8423 8446
8447 if test "$pkg_check_gtk" != "yes"; then
8448 HAVE_GTK=no
8449 if test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "maybe"; then
8450 GLIB_REQUIRED=2.6
8451 GTK_REQUIRED=2.6
8452 GTK_MODULES="gtk+-2.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
8453
8454
8455 succeeded=no
8456
8457 # Extract the first word of "pkg-config", so it can be a program name with args.
8458 set dummy pkg-config; ac_word=$2
8459 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8460 $as_echo_n "checking for $ac_word... " >&6; }
8461 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
8462 $as_echo_n "(cached) " >&6
8463 else
8464 case $PKG_CONFIG in
8465 [\\/]* | ?:[\\/]*)
8466 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8467 ;;
8468 *)
8469 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8470 for as_dir in $PATH
8471 do
8472 IFS=$as_save_IFS
8473 test -z "$as_dir" && as_dir=.
8474 for ac_exec_ext in '' $ac_executable_extensions; do
8475 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
8476 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
8477 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8478 break 2
8479 fi
8480 done
8481 done
8482 IFS=$as_save_IFS
8483
8484 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
8485 ;;
8486 esac
8487 fi
8488 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8489 if test -n "$PKG_CONFIG"; then
8490 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
8491 $as_echo "$PKG_CONFIG" >&6; }
8492 else
8493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8494 $as_echo "no" >&6; }
8495 fi
8496
8497
8498
8499 if test "$PKG_CONFIG" = "no" ; then
8500 pkg_check_gtk=no
8501 else
8502 PKG_CONFIG_MIN_VERSION=0.9.0
8503 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
8504 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $GTK_MODULES" >&5
8505 $as_echo_n "checking for $GTK_MODULES... " >&6; }
8506
8507 if $PKG_CONFIG --exists "$GTK_MODULES" 2>&5; then
8508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8509 $as_echo "yes" >&6; }
8510 succeeded=yes
8511
8512 { $as_echo "$as_me:${as_lineno-$LINENO}: checking GTK_CFLAGS" >&5
8513 $as_echo_n "checking GTK_CFLAGS... " >&6; }
8514 GTK_CFLAGS=`$PKG_CONFIG --cflags "$GTK_MODULES"|sed -e 's,///*,/,g'`
8515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTK_CFLAGS" >&5
8516 $as_echo "$GTK_CFLAGS" >&6; }
8517
8518 { $as_echo "$as_me:${as_lineno-$LINENO}: checking GTK_LIBS" >&5
8519 $as_echo_n "checking GTK_LIBS... " >&6; }
8520 GTK_LIBS=`$PKG_CONFIG --libs "$GTK_MODULES"|sed -e 's,///*,/,g'`
8521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTK_LIBS" >&5
8522 $as_echo "$GTK_LIBS" >&6; }
8523 else
8524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8525 $as_echo "no" >&6; }
8526 GTK_CFLAGS=""
8527 GTK_LIBS=""
8528 ## If we have a custom action on failure, don't print errors, but
8529 ## do set a variable so people can do so.
8530 GTK_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$GTK_MODULES"`
8531
8532 fi
8533
8534
8535
8536 else
8537 echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
8538 echo "*** See http://www.freedesktop.org/software/pkgconfig"
8539 fi
8540 fi
8541
8542 if test $succeeded = yes; then
8543 pkg_check_gtk=yes
8544 else
8545 pkg_check_gtk=no
8546 fi
8547
8548 if test "$pkg_check_gtk" = "no" && test "$USE_X_TOOLKIT" != "maybe"; then
8549 as_fn_error "$GTK_PKG_ERRORS" "$LINENO" 5
8550 fi
8551 fi
8552 fi
8424 8553
8425 GTK_OBJ= 8554 GTK_OBJ=
8426 if test x"$pkg_check_gtk" = xyes; then 8555 if test x"$pkg_check_gtk" = xyes; then
8427 8556
8428 8557
8476 8605
8477 if test "$with_toolkit_scroll_bars" != no; then 8606 if test "$with_toolkit_scroll_bars" != no; then
8478 with_toolkit_scroll_bars=yes 8607 with_toolkit_scroll_bars=yes
8479 fi 8608 fi
8480 8609
8481 HAVE_GTK_MULTIDISPLAY=no
8482 for ac_func in gdk_display_open
8483 do :
8484 ac_fn_c_check_func "$LINENO" "gdk_display_open" "ac_cv_func_gdk_display_open"
8485 if test "x$ac_cv_func_gdk_display_open" = x""yes; then :
8486 cat >>confdefs.h <<_ACEOF
8487 #define HAVE_GDK_DISPLAY_OPEN 1
8488 _ACEOF
8489 HAVE_GTK_MULTIDISPLAY=yes
8490 fi
8491 done
8492
8493 if test "${HAVE_GTK_MULTIDISPLAY}" = "yes"; then
8494
8495 $as_echo "#define HAVE_GTK_MULTIDISPLAY 1" >>confdefs.h
8496
8497 fi
8498
8499 HAVE_GTK_FILE_SELECTION=no 8610 HAVE_GTK_FILE_SELECTION=no
8500 ac_fn_c_check_decl "$LINENO" "GTK_TYPE_FILE_SELECTION" "ac_cv_have_decl_GTK_TYPE_FILE_SELECTION" "$ac_includes_default 8611 ac_fn_c_check_decl "$LINENO" "GTK_TYPE_FILE_SELECTION" "ac_cv_have_decl_GTK_TYPE_FILE_SELECTION" "$ac_includes_default
8501 #include <gtk/gtk.h> 8612 #include <gtk/gtk.h>
8502 " 8613 "
8503 if test "x$ac_cv_have_decl_GTK_TYPE_FILE_SELECTION" = x""yes; then : 8614 if test "x$ac_cv_have_decl_GTK_TYPE_FILE_SELECTION" = x""yes; then :
8512 ac_fn_c_check_func "$LINENO" "gtk_file_selection_new" "ac_cv_func_gtk_file_selection_new" 8623 ac_fn_c_check_func "$LINENO" "gtk_file_selection_new" "ac_cv_func_gtk_file_selection_new"
8513 if test "x$ac_cv_func_gtk_file_selection_new" = x""yes; then : 8624 if test "x$ac_cv_func_gtk_file_selection_new" = x""yes; then :
8514 cat >>confdefs.h <<_ACEOF 8625 cat >>confdefs.h <<_ACEOF
8515 #define HAVE_GTK_FILE_SELECTION_NEW 1 8626 #define HAVE_GTK_FILE_SELECTION_NEW 1
8516 _ACEOF 8627 _ACEOF
8517 HAVE_GTK_FILE_SELECTION=yes 8628
8518 else
8519 HAVE_GTK_FILE_SELECTION=no
8520 fi 8629 fi
8521 done 8630 done
8522 8631
8523 fi 8632 fi
8524 8633
8525 HAVE_GTK_FILE_CHOOSER=no 8634 HAVE_GTK_AND_PTHREAD=no
8526 ac_fn_c_check_decl "$LINENO" "GTK_TYPE_FILE_CHOOSER" "ac_cv_have_decl_GTK_TYPE_FILE_CHOOSER" "$ac_includes_default
8527 #include <gtk/gtk.h>
8528 "
8529 if test "x$ac_cv_have_decl_GTK_TYPE_FILE_CHOOSER" = x""yes; then :
8530 HAVE_GTK_FILE_CHOOSER=yes
8531 else
8532 HAVE_GTK_FILE_CHOOSER=no
8533 fi
8534
8535 if test "$HAVE_GTK_FILE_CHOOSER" = yes; then
8536 for ac_func in gtk_file_chooser_dialog_new
8537 do :
8538 ac_fn_c_check_func "$LINENO" "gtk_file_chooser_dialog_new" "ac_cv_func_gtk_file_chooser_dialog_new"
8539 if test "x$ac_cv_func_gtk_file_chooser_dialog_new" = x""yes; then :
8540 cat >>confdefs.h <<_ACEOF
8541 #define HAVE_GTK_FILE_CHOOSER_DIALOG_NEW 1
8542 _ACEOF
8543 HAVE_GTK_FILE_CHOOSER=yes
8544 else
8545 HAVE_GTK_FILE_CHOOSER=no
8546 fi
8547 done
8548
8549 fi
8550
8551 if test "$HAVE_GTK_FILE_SELECTION" = yes \
8552 && test "$HAVE_GTK_FILE_CHOOSER" = yes; then
8553
8554 $as_echo "#define HAVE_GTK_FILE_BOTH 1" >>confdefs.h
8555
8556 fi
8557
8558 if test "$HAVE_GTK_FILE_CHOOSER" = yes; then
8559 HAVE_GTK_AND_PTHREAD=no
8560 for ac_header in pthread.h 8635 for ac_header in pthread.h
8561 do : 8636 do :
8562 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default" 8637 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
8563 if test "x$ac_cv_header_pthread_h" = x""yes; then : 8638 if test "x$ac_cv_header_pthread_h" = x""yes; then :
8564 cat >>confdefs.h <<_ACEOF 8639 cat >>confdefs.h <<_ACEOF
8618 esac 8693 esac
8619 8694
8620 $as_echo "#define HAVE_GTK_AND_PTHREAD 1" >>confdefs.h 8695 $as_echo "#define HAVE_GTK_AND_PTHREAD 1" >>confdefs.h
8621 8696
8622 fi 8697 fi
8623 fi 8698
8699 for ac_func in gtk_widget_get_window gtk_widget_set_has_window \
8700 gtk_dialog_get_action_area gtk_widget_get_sensitive \
8701 gtk_widget_get_mapped gtk_adjustment_get_page_size \
8702 gtk_orientable_set_orientation
8703 do :
8704 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8705 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
8706 eval as_val=\$$as_ac_var
8707 if test "x$as_val" = x""yes; then :
8708 cat >>confdefs.h <<_ACEOF
8709 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
8710 _ACEOF
8711
8712 fi
8713 done
8714
8715
8624 fi 8716 fi
8625 8717
8626 HAVE_DBUS=no 8718 HAVE_DBUS=no
8627 DBUS_OBJ= 8719 DBUS_OBJ=
8628 if test "${with_dbus}" = "yes"; then 8720 if test "${with_dbus}" = "yes"; then