aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan D2011-03-08 09:34:55 +0100
committerJan D2011-03-08 09:34:55 +0100
commit0afb4571a7b54dc7693e605f7ec8a0a3a9251b4d (patch)
tree58fa84febc60c1bf678f3e5f72358968bd3eaeba
parent25bbfb31d5a71dee8d6049e9bbe10dd7d4b65db9 (diff)
downloademacs-0afb4571a7b54dc7693e605f7ec8a0a3a9251b4d.tar.gz
emacs-0afb4571a7b54dc7693e605f7ec8a0a3a9251b4d.zip
Updates for compiling with Gtk+ 3.0 (--with-x-toolkit=gtk3).
* configure.in: Require 3.0 for --with-gtk3. Add HAVE_GTK3. * doc/emacs/xresources.texi (GTK resources): ~/.emacs.d/gtkrc does not work for Gtk+ 3. * src/gtkutil.c: Include gtkx.h if HAVE_GTK3. If ! HAVE_GTK3, define gdk_window_get_screen, gdk_window_get_geometry, gdk_x11_window_lookup_for_display and GDK_KEY_g. (xg_set_screen): Use DEFAULT_GDK_DISPLAY. (xg_get_pixbuf_from_pixmap): New function. (xg_get_pixbuf_from_pix_and_mask): Change parameters from GdkPixmap to Pixmap, take frame as parameter, remove GdkColormap parameter. Call xg_get_pixbuf_from_pixmap instead of gdk_pixbuf_get_from_drawable. (xg_get_image_for_pixmap): Do not make GdkPixmaps, call xg_get_pixbuf_from_pix_and_mask with Pixmap parameters instead. (xg_check_special_colors): Use GtkStyleContext and its functions for HAVE_GTK3. (xg_prepare_tooltip, xg_hide_tooltip): Call gdk_window_get_screen. (xg_prepare_tooltip, create_dialog, menubar_map_cb) (xg_update_frame_menubar, xg_tool_bar_detach_callback) (xg_tool_bar_attach_callback, xg_update_tool_bar_sizes): Call gtk_widget_get_preferred_size. (xg_frame_resized): gdk_window_get_geometry only takes 5 parameters. (xg_win_to_widget, xg_event_is_for_menubar): Call gdk_x11_window_lookup_for_display. (xg_set_widget_bg): New function. (delete_cb): New function. (xg_create_frame_widgets): connect delete-event to delete_cb. Call xg_set_widget_bg. Only set backgrund pixmap for ! HAVE_GTK3 (xg_set_background_color): Call xg_set_widget_bg. (xg_set_frame_icon): Call xg_get_pixbuf_from_pix_and_mask. (xg_create_scroll_bar): vadj is a GtkAdjustment for HAVE_GTK3. Only call gtk_range_set_update_policy if ! HAVE_GTK3. (xg_make_tool_item): Only connect xg_tool_bar_item_expose_callback if ! HAVE_GTK3. (update_frame_tool_bar): Call gtk_widget_hide. (xg_initialize): Use GDK_KEY_g. * src/xmenu.c (menu_position_func): Call gtk_widget_get_preferred_size. * src/xsmfns.c (gdk_set_sm_client_id): Define to gdk_set_sm_client_id if ! HAVE_GTK3 (x_session_initialize): Call gdk_x11_set_sm_client_id. * src/xterm.c (XFillRectangle): Use cairo routines for HAVE_GTK3. (x_term_init): Disable Xinput(2) with GDK_CORE_DEVICE_EVENTS. Load ~/emacs.d/gtkrc only for ! HAVE_GTK3. * src/xterm.h (DEFAULT_GDK_DISPLAY): New define. (GDK_WINDOW_XID, gtk_widget_get_preferred_size): New defines for ! HAVE_GTK3. (GTK_WIDGET_TO_X_WIN): Use GDK_WINDOW_XID.
-rw-r--r--ChangeLog4
-rw-r--r--aclocal.m44
-rwxr-xr-xconfigure491
-rw-r--r--configure.in5
-rw-r--r--doc/emacs/ChangeLog5
-rw-r--r--doc/emacs/xresources.texi7
-rw-r--r--src/ChangeLog52
-rw-r--r--src/config.in3
-rw-r--r--src/gtkutil.c267
-rw-r--r--src/xmenu.c2
-rw-r--r--src/xsmfns.c6
-rw-r--r--src/xterm.c29
-rw-r--r--src/xterm.h13
13 files changed, 534 insertions, 354 deletions
diff --git a/ChangeLog b/ChangeLog
index 949862248bd..022eb468965 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
12011-03-08 Jan Djärv <jan.h.d@swipnet.se>
2
3 * configure.in: Require 3.0 for --with-gtk3. Add HAVE_GTK3.
4
12011-03-06 Glenn Morris <rgm@gnu.org> 52011-03-06 Glenn Morris <rgm@gnu.org>
2 6
3 * configure.in (FREETYPE_LIBS): Actually set it to something. 7 * configure.in (FREETYPE_LIBS): Actually set it to something.
diff --git a/aclocal.m4 b/aclocal.m4
index 9fdc8e76c49..963faafb453 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -13,8 +13,8 @@
13 13
14m4_ifndef([AC_AUTOCONF_VERSION], 14m4_ifndef([AC_AUTOCONF_VERSION],
15 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 15 [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
16m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.67],, 16m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],,
17[m4_warning([this file was generated for autoconf 2.67. 17[m4_warning([this file was generated for autoconf 2.65.
18You have another version of autoconf. It may work, but is not guaranteed to. 18You have another version of autoconf. It may work, but is not guaranteed to.
19If you have problems, you may need to regenerate the build system entirely. 19If you have problems, you may need to regenerate the build system entirely.
20To do so, use the procedure documented by the package, typically `autoreconf'.])]) 20To do so, use the procedure documented by the package, typically `autoreconf'.])])
diff --git a/configure b/configure
index b8a83e66779..efe9a55f988 100755
--- a/configure
+++ b/configure
@@ -1,11 +1,11 @@
1#! /bin/sh 1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles. 2# Guess values for system-dependent variables and create Makefiles.
3# Generated by GNU Autoconf 2.67 for emacs 24.0.50. 3# Generated by GNU Autoconf 2.65 for emacs 24.0.50.
4# 4#
5# 5#
6# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 6# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
7# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software 7# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
8# Foundation, Inc. 8# Inc.
9# 9#
10# 10#
11# This configure script is free software; the Free Software Foundation 11# This configure script is free software; the Free Software Foundation
@@ -316,7 +316,7 @@ $as_echo X"$as_dir" |
316 test -d "$as_dir" && break 316 test -d "$as_dir" && break
317 done 317 done
318 test -z "$as_dirs" || eval "mkdir $as_dirs" 318 test -z "$as_dirs" || eval "mkdir $as_dirs"
319 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" 319 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
320 320
321 321
322} # as_fn_mkdir_p 322} # as_fn_mkdir_p
@@ -356,19 +356,19 @@ else
356fi # as_fn_arith 356fi # as_fn_arith
357 357
358 358
359# as_fn_error STATUS ERROR [LINENO LOG_FD] 359# as_fn_error ERROR [LINENO LOG_FD]
360# ---------------------------------------- 360# ---------------------------------
361# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are 361# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
362# provided, also output the error to LOG_FD, referencing LINENO. Then exit the 362# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
363# script with STATUS, using 1 if that was 0. 363# script with status $?, using 1 if that was 0.
364as_fn_error () 364as_fn_error ()
365{ 365{
366 as_status=$1; test $as_status -eq 0 && as_status=1 366 as_status=$?; test $as_status -eq 0 && as_status=1
367 if test "$4"; then 367 if test "$3"; then
368 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 368 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
369 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 369 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
370 fi 370 fi
371 $as_echo "$as_me: error: $2" >&2 371 $as_echo "$as_me: error: $1" >&2
372 as_fn_exit $as_status 372 as_fn_exit $as_status
373} # as_fn_error 373} # as_fn_error
374 374
@@ -530,7 +530,7 @@ test -n "$DJDIR" || exec 7<&0 </dev/null
530exec 6>&1 530exec 6>&1
531 531
532# Name of the host. 532# Name of the host.
533# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, 533# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
534# so uname gets run too. 534# so uname gets run too.
535ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` 535ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
536 536
@@ -1220,9 +1220,8 @@ do
1220 fi 1220 fi
1221 1221
1222 case $ac_option in 1222 case $ac_option in
1223 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; 1223 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1224 *=) ac_optarg= ;; 1224 *) ac_optarg=yes ;;
1225 *) ac_optarg=yes ;;
1226 esac 1225 esac
1227 1226
1228 # Accept the important Cygnus configure options, so we can diagnose typos. 1227 # Accept the important Cygnus configure options, so we can diagnose typos.
@@ -1267,7 +1266,7 @@ do
1267 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` 1266 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1268 # Reject names that are not valid shell variable names. 1267 # Reject names that are not valid shell variable names.
1269 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && 1268 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1270 as_fn_error $? "invalid feature name: $ac_useropt" 1269 as_fn_error "invalid feature name: $ac_useropt"
1271 ac_useropt_orig=$ac_useropt 1270 ac_useropt_orig=$ac_useropt
1272 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` 1271 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1273 case $ac_user_opts in 1272 case $ac_user_opts in
@@ -1293,7 +1292,7 @@ do
1293 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` 1292 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1294 # Reject names that are not valid shell variable names. 1293 # Reject names that are not valid shell variable names.
1295 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && 1294 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1296 as_fn_error $? "invalid feature name: $ac_useropt" 1295 as_fn_error "invalid feature name: $ac_useropt"
1297 ac_useropt_orig=$ac_useropt 1296 ac_useropt_orig=$ac_useropt
1298 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` 1297 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1299 case $ac_user_opts in 1298 case $ac_user_opts in
@@ -1497,7 +1496,7 @@ do
1497 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` 1496 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1498 # Reject names that are not valid shell variable names. 1497 # Reject names that are not valid shell variable names.
1499 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && 1498 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1500 as_fn_error $? "invalid package name: $ac_useropt" 1499 as_fn_error "invalid package name: $ac_useropt"
1501 ac_useropt_orig=$ac_useropt 1500 ac_useropt_orig=$ac_useropt
1502 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` 1501 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1503 case $ac_user_opts in 1502 case $ac_user_opts in
@@ -1513,7 +1512,7 @@ do
1513 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` 1512 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1514 # Reject names that are not valid shell variable names. 1513 # Reject names that are not valid shell variable names.
1515 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && 1514 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1516 as_fn_error $? "invalid package name: $ac_useropt" 1515 as_fn_error "invalid package name: $ac_useropt"
1517 ac_useropt_orig=$ac_useropt 1516 ac_useropt_orig=$ac_useropt
1518 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` 1517 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1519 case $ac_user_opts in 1518 case $ac_user_opts in
@@ -1543,8 +1542,8 @@ do
1543 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) 1542 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1544 x_libraries=$ac_optarg ;; 1543 x_libraries=$ac_optarg ;;
1545 1544
1546 -*) as_fn_error $? "unrecognized option: \`$ac_option' 1545 -*) as_fn_error "unrecognized option: \`$ac_option'
1547Try \`$0 --help' for more information" 1546Try \`$0 --help' for more information."
1548 ;; 1547 ;;
1549 1548
1550 *=*) 1549 *=*)
@@ -1552,7 +1551,7 @@ Try \`$0 --help' for more information"
1552 # Reject names that are not valid shell variable names. 1551 # Reject names that are not valid shell variable names.
1553 case $ac_envvar in #( 1552 case $ac_envvar in #(
1554 '' | [0-9]* | *[!_$as_cr_alnum]* ) 1553 '' | [0-9]* | *[!_$as_cr_alnum]* )
1555 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; 1554 as_fn_error "invalid variable name: \`$ac_envvar'" ;;
1556 esac 1555 esac
1557 eval $ac_envvar=\$ac_optarg 1556 eval $ac_envvar=\$ac_optarg
1558 export $ac_envvar ;; 1557 export $ac_envvar ;;
@@ -1570,13 +1569,13 @@ done
1570 1569
1571if test -n "$ac_prev"; then 1570if test -n "$ac_prev"; then
1572 ac_option=--`echo $ac_prev | sed 's/_/-/g'` 1571 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1573 as_fn_error $? "missing argument to $ac_option" 1572 as_fn_error "missing argument to $ac_option"
1574fi 1573fi
1575 1574
1576if test -n "$ac_unrecognized_opts"; then 1575if test -n "$ac_unrecognized_opts"; then
1577 case $enable_option_checking in 1576 case $enable_option_checking in
1578 no) ;; 1577 no) ;;
1579 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; 1578 fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
1580 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; 1579 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1581 esac 1580 esac
1582fi 1581fi
@@ -1599,7 +1598,7 @@ do
1599 [\\/$]* | ?:[\\/]* ) continue;; 1598 [\\/$]* | ?:[\\/]* ) continue;;
1600 NONE | '' ) case $ac_var in *prefix ) continue;; esac;; 1599 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1601 esac 1600 esac
1602 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" 1601 as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
1603done 1602done
1604 1603
1605# There might be people who depend on the old broken behavior: `$host' 1604# There might be people who depend on the old broken behavior: `$host'
@@ -1613,8 +1612,8 @@ target=$target_alias
1613if test "x$host_alias" != x; then 1612if test "x$host_alias" != x; then
1614 if test "x$build_alias" = x; then 1613 if test "x$build_alias" = x; then
1615 cross_compiling=maybe 1614 cross_compiling=maybe
1616 $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. 1615 $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
1617 If a cross compiler is detected then cross compile mode will be used" >&2 1616 If a cross compiler is detected then cross compile mode will be used." >&2
1618 elif test "x$build_alias" != "x$host_alias"; then 1617 elif test "x$build_alias" != "x$host_alias"; then
1619 cross_compiling=yes 1618 cross_compiling=yes
1620 fi 1619 fi
@@ -1629,9 +1628,9 @@ test "$silent" = yes && exec 6>/dev/null
1629ac_pwd=`pwd` && test -n "$ac_pwd" && 1628ac_pwd=`pwd` && test -n "$ac_pwd" &&
1630ac_ls_di=`ls -di .` && 1629ac_ls_di=`ls -di .` &&
1631ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || 1630ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1632 as_fn_error $? "working directory cannot be determined" 1631 as_fn_error "working directory cannot be determined"
1633test "X$ac_ls_di" = "X$ac_pwd_ls_di" || 1632test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1634 as_fn_error $? "pwd does not report name of working directory" 1633 as_fn_error "pwd does not report name of working directory"
1635 1634
1636 1635
1637# Find the source files, if location was not specified. 1636# Find the source files, if location was not specified.
@@ -1670,11 +1669,11 @@ else
1670fi 1669fi
1671if test ! -r "$srcdir/$ac_unique_file"; then 1670if test ! -r "$srcdir/$ac_unique_file"; then
1672 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." 1671 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1673 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" 1672 as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
1674fi 1673fi
1675ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" 1674ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1676ac_abs_confdir=`( 1675ac_abs_confdir=`(
1677 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" 1676 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
1678 pwd)` 1677 pwd)`
1679# When building in place, set srcdir=. 1678# When building in place, set srcdir=.
1680if test "$ac_abs_confdir" = "$ac_pwd"; then 1679if test "$ac_abs_confdir" = "$ac_pwd"; then
@@ -1714,7 +1713,7 @@ Configuration:
1714 --help=short display options specific to this package 1713 --help=short display options specific to this package
1715 --help=recursive display the short help of all the included packages 1714 --help=recursive display the short help of all the included packages
1716 -V, --version display version information and exit 1715 -V, --version display version information and exit
1717 -q, --quiet, --silent do not print \`checking ...' messages 1716 -q, --quiet, --silent do not print \`checking...' messages
1718 --cache-file=FILE cache test results in FILE [disabled] 1717 --cache-file=FILE cache test results in FILE [disabled]
1719 -C, --config-cache alias for \`--cache-file=config.cache' 1718 -C, --config-cache alias for \`--cache-file=config.cache'
1720 -n, --no-create do not create output files 1719 -n, --no-create do not create output files
@@ -1936,9 +1935,9 @@ test -n "$ac_init_help" && exit $ac_status
1936if $ac_init_version; then 1935if $ac_init_version; then
1937 cat <<\_ACEOF 1936 cat <<\_ACEOF
1938emacs configure 24.0.50 1937emacs configure 24.0.50
1939generated by GNU Autoconf 2.67 1938generated by GNU Autoconf 2.65
1940 1939
1941Copyright (C) 2010 Free Software Foundation, Inc. 1940Copyright (C) 2009 Free Software Foundation, Inc.
1942This configure script is free software; the Free Software Foundation 1941This configure script is free software; the Free Software Foundation
1943gives unlimited permission to copy, distribute and modify it. 1942gives unlimited permission to copy, distribute and modify it.
1944_ACEOF 1943_ACEOF
@@ -2008,7 +2007,7 @@ $as_echo "$ac_try_echo"; } >&5
2008 mv -f conftest.er1 conftest.err 2007 mv -f conftest.er1 conftest.err
2009 fi 2008 fi
2010 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 2009 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2011 test $ac_status = 0; } > conftest.i && { 2010 test $ac_status = 0; } >/dev/null && {
2012 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || 2011 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2013 test ! -s conftest.err 2012 test ! -s conftest.err
2014 }; then : 2013 }; then :
@@ -2032,10 +2031,10 @@ fi
2032ac_fn_c_check_header_mongrel () 2031ac_fn_c_check_header_mongrel ()
2033{ 2032{
2034 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 2033 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2035 if eval "test \"\${$3+set}\"" = set; then : 2034 if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2036 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 2035 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2037$as_echo_n "checking for $2... " >&6; } 2036$as_echo_n "checking for $2... " >&6; }
2038if eval "test \"\${$3+set}\"" = set; then : 2037if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2039 $as_echo_n "(cached) " >&6 2038 $as_echo_n "(cached) " >&6
2040fi 2039fi
2041eval ac_res=\$$3 2040eval ac_res=\$$3
@@ -2071,7 +2070,7 @@ if ac_fn_c_try_cpp "$LINENO"; then :
2071else 2070else
2072 ac_header_preproc=no 2071 ac_header_preproc=no
2073fi 2072fi
2074rm -f conftest.err conftest.i conftest.$ac_ext 2073rm -f conftest.err conftest.$ac_ext
2075{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 2074{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2076$as_echo "$ac_header_preproc" >&6; } 2075$as_echo "$ac_header_preproc" >&6; }
2077 2076
@@ -2098,7 +2097,7 @@ $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2098esac 2097esac
2099 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 2098 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2100$as_echo_n "checking for $2... " >&6; } 2099$as_echo_n "checking for $2... " >&6; }
2101if eval "test \"\${$3+set}\"" = set; then : 2100if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2102 $as_echo_n "(cached) " >&6 2101 $as_echo_n "(cached) " >&6
2103else 2102else
2104 eval "$3=\$ac_header_compiler" 2103 eval "$3=\$ac_header_compiler"
@@ -2162,7 +2161,7 @@ ac_fn_c_check_header_compile ()
2162 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 2161 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2163 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 2162 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2164$as_echo_n "checking for $2... " >&6; } 2163$as_echo_n "checking for $2... " >&6; }
2165if eval "test \"\${$3+set}\"" = set; then : 2164if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2166 $as_echo_n "(cached) " >&6 2165 $as_echo_n "(cached) " >&6
2167else 2166else
2168 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2167 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -2230,18 +2229,15 @@ fi
2230 2229
2231} # ac_fn_c_try_link 2230} # ac_fn_c_try_link
2232 2231
2233# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES 2232# ac_fn_c_check_decl LINENO SYMBOL VAR
2234# --------------------------------------------- 2233# ------------------------------------
2235# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR 2234# Tests whether SYMBOL is declared, setting cache variable VAR accordingly.
2236# accordingly.
2237ac_fn_c_check_decl () 2235ac_fn_c_check_decl ()
2238{ 2236{
2239 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 2237 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2240 as_decl_name=`echo $2|sed 's/ *(.*//'` 2238 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5
2241 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` 2239$as_echo_n "checking whether $2 is declared... " >&6; }
2242 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 2240if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2243$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2244if eval "test \"\${$3+set}\"" = set; then :
2245 $as_echo_n "(cached) " >&6 2241 $as_echo_n "(cached) " >&6
2246else 2242else
2247 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2243 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -2250,12 +2246,8 @@ $4
2250int 2246int
2251main () 2247main ()
2252{ 2248{
2253#ifndef $as_decl_name 2249#ifndef $2
2254#ifdef __cplusplus 2250 (void) $2;
2255 (void) $as_decl_use;
2256#else
2257 (void) $as_decl_name;
2258#endif
2259#endif 2251#endif
2260 2252
2261 ; 2253 ;
@@ -2284,7 +2276,7 @@ ac_fn_c_check_header_preproc ()
2284 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 2276 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2285 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 2277 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2286$as_echo_n "checking for $2... " >&6; } 2278$as_echo_n "checking for $2... " >&6; }
2287if eval "test \"\${$3+set}\"" = set; then : 2279if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2288 $as_echo_n "(cached) " >&6 2280 $as_echo_n "(cached) " >&6
2289else 2281else
2290 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2282 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -2296,7 +2288,7 @@ if ac_fn_c_try_cpp "$LINENO"; then :
2296else 2288else
2297 eval "$3=no" 2289 eval "$3=no"
2298fi 2290fi
2299rm -f conftest.err conftest.i conftest.$ac_ext 2291rm -f conftest.err conftest.$ac_ext
2300fi 2292fi
2301eval ac_res=\$$3 2293eval ac_res=\$$3
2302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 2294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
@@ -2314,7 +2306,7 @@ ac_fn_c_check_member ()
2314 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 2306 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2315 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 2307 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2316$as_echo_n "checking for $2.$3... " >&6; } 2308$as_echo_n "checking for $2.$3... " >&6; }
2317if eval "test \"\${$4+set}\"" = set; then : 2309if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
2318 $as_echo_n "(cached) " >&6 2310 $as_echo_n "(cached) " >&6
2319else 2311else
2320 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2312 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -2370,7 +2362,7 @@ ac_fn_c_check_func ()
2370 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 2362 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2371 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 2363 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2372$as_echo_n "checking for $2... " >&6; } 2364$as_echo_n "checking for $2... " >&6; }
2373if eval "test \"\${$3+set}\"" = set; then : 2365if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2374 $as_echo_n "(cached) " >&6 2366 $as_echo_n "(cached) " >&6
2375else 2367else
2376 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2368 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -2438,7 +2430,7 @@ ac_fn_c_check_type ()
2438 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 2430 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2439 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 2431 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2440$as_echo_n "checking for $2... " >&6; } 2432$as_echo_n "checking for $2... " >&6; }
2441if eval "test \"\${$3+set}\"" = set; then : 2433if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
2442 $as_echo_n "(cached) " >&6 2434 $as_echo_n "(cached) " >&6
2443else 2435else
2444 eval "$3=no" 2436 eval "$3=no"
@@ -2665,7 +2657,7 @@ This file contains any messages produced by compilers while
2665running configure, to aid debugging if configure makes a mistake. 2657running configure, to aid debugging if configure makes a mistake.
2666 2658
2667It was created by emacs $as_me 24.0.50, which was 2659It was created by emacs $as_me 24.0.50, which was
2668generated by GNU Autoconf 2.67. Invocation command line was 2660generated by GNU Autoconf 2.65. Invocation command line was
2669 2661
2670 $ $0 $@ 2662 $ $0 $@
2671 2663
@@ -2775,9 +2767,11 @@ trap 'exit_status=$?
2775 { 2767 {
2776 echo 2768 echo
2777 2769
2778 $as_echo "## ---------------- ## 2770 cat <<\_ASBOX
2771## ---------------- ##
2779## Cache variables. ## 2772## Cache variables. ##
2780## ---------------- ##" 2773## ---------------- ##
2774_ASBOX
2781 echo 2775 echo
2782 # The following way of writing the cache mishandles newlines in values, 2776 # The following way of writing the cache mishandles newlines in values,
2783( 2777(
@@ -2811,9 +2805,11 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2811) 2805)
2812 echo 2806 echo
2813 2807
2814 $as_echo "## ----------------- ## 2808 cat <<\_ASBOX
2809## ----------------- ##
2815## Output variables. ## 2810## Output variables. ##
2816## ----------------- ##" 2811## ----------------- ##
2812_ASBOX
2817 echo 2813 echo
2818 for ac_var in $ac_subst_vars 2814 for ac_var in $ac_subst_vars
2819 do 2815 do
@@ -2826,9 +2822,11 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2826 echo 2822 echo
2827 2823
2828 if test -n "$ac_subst_files"; then 2824 if test -n "$ac_subst_files"; then
2829 $as_echo "## ------------------- ## 2825 cat <<\_ASBOX
2826## ------------------- ##
2830## File substitutions. ## 2827## File substitutions. ##
2831## ------------------- ##" 2828## ------------------- ##
2829_ASBOX
2832 echo 2830 echo
2833 for ac_var in $ac_subst_files 2831 for ac_var in $ac_subst_files
2834 do 2832 do
@@ -2842,9 +2840,11 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2842 fi 2840 fi
2843 2841
2844 if test -s confdefs.h; then 2842 if test -s confdefs.h; then
2845 $as_echo "## ----------- ## 2843 cat <<\_ASBOX
2844## ----------- ##
2846## confdefs.h. ## 2845## confdefs.h. ##
2847## ----------- ##" 2846## ----------- ##
2847_ASBOX
2848 echo 2848 echo
2849 cat confdefs.h 2849 cat confdefs.h
2850 echo 2850 echo
@@ -2899,12 +2899,7 @@ _ACEOF
2899ac_site_file1=NONE 2899ac_site_file1=NONE
2900ac_site_file2=NONE 2900ac_site_file2=NONE
2901if test -n "$CONFIG_SITE"; then 2901if test -n "$CONFIG_SITE"; then
2902 # We do not want a PATH search for config.site. 2902 ac_site_file1=$CONFIG_SITE
2903 case $CONFIG_SITE in #((
2904 -*) ac_site_file1=./$CONFIG_SITE;;
2905 */*) ac_site_file1=$CONFIG_SITE;;
2906 *) ac_site_file1=./$CONFIG_SITE;;
2907 esac
2908elif test "x$prefix" != xNONE; then 2903elif test "x$prefix" != xNONE; then
2909 ac_site_file1=$prefix/share/config.site 2904 ac_site_file1=$prefix/share/config.site
2910 ac_site_file2=$prefix/etc/config.site 2905 ac_site_file2=$prefix/etc/config.site
@@ -2919,11 +2914,7 @@ do
2919 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 2914 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2920$as_echo "$as_me: loading site script $ac_site_file" >&6;} 2915$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2921 sed 's/^/| /' "$ac_site_file" >&5 2916 sed 's/^/| /' "$ac_site_file" >&5
2922 . "$ac_site_file" \ 2917 . "$ac_site_file"
2923 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2924$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2925as_fn_error $? "failed to load site script $ac_site_file
2926See \`config.log' for more details" "$LINENO" 5 ; }
2927 fi 2918 fi
2928done 2919done
2929 2920
@@ -3014,7 +3005,7 @@ if $ac_cache_corrupted; then
3014$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 3005$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3015 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 3006 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3016$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} 3007$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3017 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 3008 as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3018fi 3009fi
3019## -------------------- ## 3010## -------------------- ##
3020## Main body of script. ## 3011## Main body of script. ##
@@ -3034,22 +3025,16 @@ am__api_version='1.11'
3034 3025
3035ac_aux_dir= 3026ac_aux_dir=
3036for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do 3027for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
3037 if test -f "$ac_dir/install-sh"; then 3028 for ac_t in install-sh install.sh shtool; do
3038 ac_aux_dir=$ac_dir 3029 if test -f "$ac_dir/$ac_t"; then
3039 ac_install_sh="$ac_aux_dir/install-sh -c" 3030 ac_aux_dir=$ac_dir
3040 break 3031 ac_install_sh="$ac_aux_dir/$ac_t -c"
3041 elif test -f "$ac_dir/install.sh"; then 3032 break 2
3042 ac_aux_dir=$ac_dir 3033 fi
3043 ac_install_sh="$ac_aux_dir/install.sh -c" 3034 done
3044 break
3045 elif test -f "$ac_dir/shtool"; then
3046 ac_aux_dir=$ac_dir
3047 ac_install_sh="$ac_aux_dir/shtool install -c"
3048 break
3049 fi
3050done 3035done
3051if test -z "$ac_aux_dir"; then 3036if test -z "$ac_aux_dir"; then
3052 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 3037 as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
3053fi 3038fi
3054 3039
3055# These three variables are undocumented and unsupported, 3040# These three variables are undocumented and unsupported,
@@ -3165,11 +3150,11 @@ am_lf='
3165' 3150'
3166case `pwd` in 3151case `pwd` in
3167 *[\\\"\#\$\&\'\`$am_lf]*) 3152 *[\\\"\#\$\&\'\`$am_lf]*)
3168 as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5 ;; 3153 as_fn_error "unsafe absolute working directory name" "$LINENO" 5;;
3169esac 3154esac
3170case $srcdir in 3155case $srcdir in
3171 *[\\\"\#\$\&\'\`$am_lf\ \ ]*) 3156 *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
3172 as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5 ;; 3157 as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
3173esac 3158esac
3174 3159
3175# Do `set' in a subshell so we don't clobber the current shell's 3160# Do `set' in a subshell so we don't clobber the current shell's
@@ -3191,7 +3176,7 @@ if (
3191 # if, for instance, CONFIG_SHELL is bash and it inherits a 3176 # if, for instance, CONFIG_SHELL is bash and it inherits a
3192 # broken ls alias from the environment. This has actually 3177 # broken ls alias from the environment. This has actually
3193 # happened. Such a system could not be considered "sane". 3178 # happened. Such a system could not be considered "sane".
3194 as_fn_error $? "ls -t appears to fail. Make sure there is not a broken 3179 as_fn_error "ls -t appears to fail. Make sure there is not a broken
3195alias in your environment" "$LINENO" 5 3180alias in your environment" "$LINENO" 5
3196 fi 3181 fi
3197 3182
@@ -3201,7 +3186,7 @@ then
3201 # Ok. 3186 # Ok.
3202 : 3187 :
3203else 3188else
3204 as_fn_error $? "newly created file is older than distributed files! 3189 as_fn_error "newly created file is older than distributed files!
3205Check your system clock" "$LINENO" 5 3190Check your system clock" "$LINENO" 5
3206fi 3191fi
3207{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 3192{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
@@ -3440,7 +3425,7 @@ done
3440$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } 3425$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
3441set x ${MAKE-make} 3426set x ${MAKE-make}
3442ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` 3427ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
3443if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then : 3428if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
3444 $as_echo_n "(cached) " >&6 3429 $as_echo_n "(cached) " >&6
3445else 3430else
3446 cat >conftest.make <<\_ACEOF 3431 cat >conftest.make <<\_ACEOF
@@ -3448,7 +3433,7 @@ SHELL = /bin/sh
3448all: 3433all:
3449 @echo '@@@%%%=$(MAKE)=@@@%%%' 3434 @echo '@@@%%%=$(MAKE)=@@@%%%'
3450_ACEOF 3435_ACEOF
3451# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. 3436# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3452case `${MAKE-make} -f conftest.make 2>/dev/null` in 3437case `${MAKE-make} -f conftest.make 2>/dev/null` in
3453 *@@@%%%=?*=@@@%%%*) 3438 *@@@%%%=?*=@@@%%%*)
3454 eval ac_cv_prog_make_${ac_make}_set=yes;; 3439 eval ac_cv_prog_make_${ac_make}_set=yes;;
@@ -3482,7 +3467,7 @@ if test "`cd $srcdir && pwd`" != "`pwd`"; then
3482 am__isrc=' -I$(srcdir)' 3467 am__isrc=' -I$(srcdir)'
3483 # test to see if srcdir already configured 3468 # test to see if srcdir already configured
3484 if test -f $srcdir/config.status; then 3469 if test -f $srcdir/config.status; then
3485 as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 3470 as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
3486 fi 3471 fi
3487fi 3472fi
3488 3473
@@ -3685,7 +3670,7 @@ if test "${with_x_toolkit+set}" = set; then :
3685 g | gt | gtk ) val=gtk ;; 3670 g | gt | gtk ) val=gtk ;;
3686 gtk3 ) val=gtk3 ;; 3671 gtk3 ) val=gtk3 ;;
3687 * ) 3672 * )
3688as_fn_error $? "\`--with-x-toolkit=$withval' is invalid; 3673as_fn_error "\`--with-x-toolkit=$withval' is invalid;
3689this option's value should be \`yes', \`no', \`lucid', \`athena', \`motif', \`gtk' or 3674this option's value should be \`yes', \`no', \`lucid', \`athena', \`motif', \`gtk' or
3690\`gtk3'. \`yes' and \`gtk' are synonyms. \`athena' and \`lucid' are synonyms." "$LINENO" 5 3675\`gtk3'. \`yes' and \`gtk' are synonyms. \`athena' and \`lucid' are synonyms." "$LINENO" 5
3691 ;; 3676 ;;
@@ -3998,7 +3983,7 @@ do
3998 stringfreelist) ac_gc_check_string_free_list=1 ;; 3983 stringfreelist) ac_gc_check_string_free_list=1 ;;
3999 xmallocoverrun) ac_xmalloc_overrun=1 ;; 3984 xmallocoverrun) ac_xmalloc_overrun=1 ;;
4000 conslist) ac_gc_check_cons_list=1 ;; 3985 conslist) ac_gc_check_cons_list=1 ;;
4001 *) as_fn_error $? "unknown check category $check" "$LINENO" 5 ;; 3986 *) as_fn_error "unknown check category $check" "$LINENO" 5 ;;
4002 esac 3987 esac
4003done 3988done
4004IFS="$ac_save_IFS" 3989IFS="$ac_save_IFS"
@@ -4113,7 +4098,7 @@ fi
4113 4098
4114# Make sure we can run config.sub. 4099# Make sure we can run config.sub.
4115$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || 4100$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
4116 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 4101 as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
4117 4102
4118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 4103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
4119$as_echo_n "checking build system type... " >&6; } 4104$as_echo_n "checking build system type... " >&6; }
@@ -4124,16 +4109,16 @@ else
4124test "x$ac_build_alias" = x && 4109test "x$ac_build_alias" = x &&
4125 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` 4110 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
4126test "x$ac_build_alias" = x && 4111test "x$ac_build_alias" = x &&
4127 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 4112 as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
4128ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || 4113ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
4129 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 4114 as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
4130 4115
4131fi 4116fi
4132{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 4117{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
4133$as_echo "$ac_cv_build" >&6; } 4118$as_echo "$ac_cv_build" >&6; }
4134case $ac_cv_build in 4119case $ac_cv_build in
4135*-*-*) ;; 4120*-*-*) ;;
4136*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;; 4121*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
4137esac 4122esac
4138build=$ac_cv_build 4123build=$ac_cv_build
4139ac_save_IFS=$IFS; IFS='-' 4124ac_save_IFS=$IFS; IFS='-'
@@ -4158,7 +4143,7 @@ else
4158 ac_cv_host=$ac_cv_build 4143 ac_cv_host=$ac_cv_build
4159else 4144else
4160 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || 4145 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
4161 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 4146 as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
4162fi 4147fi
4163 4148
4164fi 4149fi
@@ -4166,7 +4151,7 @@ fi
4166$as_echo "$ac_cv_host" >&6; } 4151$as_echo "$ac_cv_host" >&6; }
4167case $ac_cv_host in 4152case $ac_cv_host in
4168*-*-*) ;; 4153*-*-*) ;;
4169*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;; 4154*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
4170esac 4155esac
4171host=$ac_cv_host 4156host=$ac_cv_host
4172ac_save_IFS=$IFS; IFS='-' 4157ac_save_IFS=$IFS; IFS='-'
@@ -4420,7 +4405,7 @@ fi
4420 4405
4421 4406
4422if test $unported = yes; then 4407if test $unported = yes; then
4423 as_fn_error $? "Emacs hasn't been ported to \`${canonical}' systems. 4408 as_fn_error "Emacs hasn't been ported to \`${canonical}' systems.
4424Check \`etc/MACHINES' for recognized configuration names." "$LINENO" 5 4409Check \`etc/MACHINES' for recognized configuration names." "$LINENO" 5
4425fi 4410fi
4426 4411
@@ -4738,8 +4723,8 @@ fi
4738 4723
4739test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 4724test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4740$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 4725$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4741as_fn_error $? "no acceptable C compiler found in \$PATH 4726as_fn_error "no acceptable C compiler found in \$PATH
4742See \`config.log' for more details" "$LINENO" 5 ; } 4727See \`config.log' for more details." "$LINENO" 5; }
4743 4728
4744# Provide some information about the compiler. 4729# Provide some information about the compiler.
4745$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 4730$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
@@ -4853,8 +4838,9 @@ sed 's/^/| /' conftest.$ac_ext >&5
4853 4838
4854{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 4839{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4855$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 4840$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4856as_fn_error 77 "C compiler cannot create executables 4841{ as_fn_set_status 77
4857See \`config.log' for more details" "$LINENO" 5 ; } 4842as_fn_error "C compiler cannot create executables
4843See \`config.log' for more details." "$LINENO" 5; }; }
4858else 4844else
4859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 4845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4860$as_echo "yes" >&6; } 4846$as_echo "yes" >&6; }
@@ -4896,8 +4882,8 @@ done
4896else 4882else
4897 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 4883 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4898$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 4884$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4899as_fn_error $? "cannot compute suffix of executables: cannot compile and link 4885as_fn_error "cannot compute suffix of executables: cannot compile and link
4900See \`config.log' for more details" "$LINENO" 5 ; } 4886See \`config.log' for more details." "$LINENO" 5; }
4901fi 4887fi
4902rm -f conftest conftest$ac_cv_exeext 4888rm -f conftest conftest$ac_cv_exeext
4903{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 4889{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
@@ -4954,9 +4940,9 @@ $as_echo "$ac_try_echo"; } >&5
4954 else 4940 else
4955 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 4941 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4956$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 4942$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4957as_fn_error $? "cannot run C compiled programs. 4943as_fn_error "cannot run C compiled programs.
4958If you meant to cross compile, use \`--host'. 4944If you meant to cross compile, use \`--host'.
4959See \`config.log' for more details" "$LINENO" 5 ; } 4945See \`config.log' for more details." "$LINENO" 5; }
4960 fi 4946 fi
4961 fi 4947 fi
4962fi 4948fi
@@ -5007,8 +4993,8 @@ sed 's/^/| /' conftest.$ac_ext >&5
5007 4993
5008{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 4994{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5009$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 4995$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5010as_fn_error $? "cannot compute suffix of object files: cannot compile 4996as_fn_error "cannot compute suffix of object files: cannot compile
5011See \`config.log' for more details" "$LINENO" 5 ; } 4997See \`config.log' for more details." "$LINENO" 5; }
5012fi 4998fi
5013rm -f conftest.$ac_cv_objext conftest.$ac_ext 4999rm -f conftest.$ac_cv_objext conftest.$ac_ext
5014fi 5000fi
@@ -5426,7 +5412,7 @@ $as_echo_n "checking whether cc understands -c and -o together... " >&6; }
5426fi 5412fi
5427set dummy $CC; ac_cc=`$as_echo "$2" | 5413set dummy $CC; ac_cc=`$as_echo "$2" |
5428 sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` 5414 sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
5429if eval "test \"\${ac_cv_prog_cc_${ac_cc}_c_o+set}\"" = set; then : 5415if { as_var=ac_cv_prog_cc_${ac_cc}_c_o; eval "test \"\${$as_var+set}\" = set"; }; then :
5430 $as_echo_n "(cached) " >&6 5416 $as_echo_n "(cached) " >&6
5431else 5417else
5432 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 5418 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -5680,7 +5666,7 @@ else
5680 # Broken: fails on valid input. 5666 # Broken: fails on valid input.
5681continue 5667continue
5682fi 5668fi
5683rm -f conftest.err conftest.i conftest.$ac_ext 5669rm -f conftest.err conftest.$ac_ext
5684 5670
5685 # OK, works on sane cases. Now check whether nonexistent headers 5671 # OK, works on sane cases. Now check whether nonexistent headers
5686 # can be detected and how. 5672 # can be detected and how.
@@ -5696,11 +5682,11 @@ else
5696ac_preproc_ok=: 5682ac_preproc_ok=:
5697break 5683break
5698fi 5684fi
5699rm -f conftest.err conftest.i conftest.$ac_ext 5685rm -f conftest.err conftest.$ac_ext
5700 5686
5701done 5687done
5702# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. 5688# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5703rm -f conftest.i conftest.err conftest.$ac_ext 5689rm -f conftest.err conftest.$ac_ext
5704if $ac_preproc_ok; then : 5690if $ac_preproc_ok; then :
5705 break 5691 break
5706fi 5692fi
@@ -5739,7 +5725,7 @@ else
5739 # Broken: fails on valid input. 5725 # Broken: fails on valid input.
5740continue 5726continue
5741fi 5727fi
5742rm -f conftest.err conftest.i conftest.$ac_ext 5728rm -f conftest.err conftest.$ac_ext
5743 5729
5744 # OK, works on sane cases. Now check whether nonexistent headers 5730 # OK, works on sane cases. Now check whether nonexistent headers
5745 # can be detected and how. 5731 # can be detected and how.
@@ -5755,18 +5741,18 @@ else
5755ac_preproc_ok=: 5741ac_preproc_ok=:
5756break 5742break
5757fi 5743fi
5758rm -f conftest.err conftest.i conftest.$ac_ext 5744rm -f conftest.err conftest.$ac_ext
5759 5745
5760done 5746done
5761# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. 5747# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5762rm -f conftest.i conftest.err conftest.$ac_ext 5748rm -f conftest.err conftest.$ac_ext
5763if $ac_preproc_ok; then : 5749if $ac_preproc_ok; then :
5764 5750
5765else 5751else
5766 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 5752 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5767$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 5753$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5768as_fn_error $? "C preprocessor \"$CPP\" fails sanity check 5754as_fn_error "C preprocessor \"$CPP\" fails sanity check
5769See \`config.log' for more details" "$LINENO" 5 ; } 5755See \`config.log' for more details." "$LINENO" 5; }
5770fi 5756fi
5771 5757
5772ac_ext=c 5758ac_ext=c
@@ -5827,7 +5813,7 @@ esac
5827 done 5813 done
5828IFS=$as_save_IFS 5814IFS=$as_save_IFS
5829 if test -z "$ac_cv_path_GREP"; then 5815 if test -z "$ac_cv_path_GREP"; then
5830 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 5816 as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5831 fi 5817 fi
5832else 5818else
5833 ac_cv_path_GREP=$GREP 5819 ac_cv_path_GREP=$GREP
@@ -5893,7 +5879,7 @@ esac
5893 done 5879 done
5894IFS=$as_save_IFS 5880IFS=$as_save_IFS
5895 if test -z "$ac_cv_path_EGREP"; then 5881 if test -z "$ac_cv_path_EGREP"; then
5896 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 5882 as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5897 fi 5883 fi
5898else 5884else
5899 ac_cv_path_EGREP=$EGREP 5885 ac_cv_path_EGREP=$EGREP
@@ -6025,7 +6011,8 @@ do :
6025 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` 6011 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6026ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default 6012ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
6027" 6013"
6028if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : 6014eval as_val=\$$as_ac_Header
6015 if test "x$as_val" = x""yes; then :
6029 cat >>confdefs.h <<_ACEOF 6016 cat >>confdefs.h <<_ACEOF
6030#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 6017#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6031_ACEOF 6018_ACEOF
@@ -6356,7 +6343,7 @@ else
6356 # Broken: fails on valid input. 6343 # Broken: fails on valid input.
6357continue 6344continue
6358fi 6345fi
6359rm -f conftest.err conftest.i conftest.$ac_ext 6346rm -f conftest.err conftest.$ac_ext
6360 6347
6361 # OK, works on sane cases. Now check whether nonexistent headers 6348 # OK, works on sane cases. Now check whether nonexistent headers
6362 # can be detected and how. 6349 # can be detected and how.
@@ -6372,11 +6359,11 @@ else
6372ac_preproc_ok=: 6359ac_preproc_ok=:
6373break 6360break
6374fi 6361fi
6375rm -f conftest.err conftest.i conftest.$ac_ext 6362rm -f conftest.err conftest.$ac_ext
6376 6363
6377done 6364done
6378# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. 6365# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
6379rm -f conftest.i conftest.err conftest.$ac_ext 6366rm -f conftest.err conftest.$ac_ext
6380if $ac_preproc_ok; then : 6367if $ac_preproc_ok; then :
6381 break 6368 break
6382fi 6369fi
@@ -6415,7 +6402,7 @@ else
6415 # Broken: fails on valid input. 6402 # Broken: fails on valid input.
6416continue 6403continue
6417fi 6404fi
6418rm -f conftest.err conftest.i conftest.$ac_ext 6405rm -f conftest.err conftest.$ac_ext
6419 6406
6420 # OK, works on sane cases. Now check whether nonexistent headers 6407 # OK, works on sane cases. Now check whether nonexistent headers
6421 # can be detected and how. 6408 # can be detected and how.
@@ -6431,18 +6418,18 @@ else
6431ac_preproc_ok=: 6418ac_preproc_ok=:
6432break 6419break
6433fi 6420fi
6434rm -f conftest.err conftest.i conftest.$ac_ext 6421rm -f conftest.err conftest.$ac_ext
6435 6422
6436done 6423done
6437# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. 6424# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
6438rm -f conftest.i conftest.err conftest.$ac_ext 6425rm -f conftest.err conftest.$ac_ext
6439if $ac_preproc_ok; then : 6426if $ac_preproc_ok; then :
6440 6427
6441else 6428else
6442 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 6429 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6443$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 6430$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6444as_fn_error $? "C preprocessor \"$CPP\" fails sanity check 6431as_fn_error "C preprocessor \"$CPP\" fails sanity check
6445See \`config.log' for more details" "$LINENO" 5 ; } 6432See \`config.log' for more details." "$LINENO" 5; }
6446fi 6433fi
6447 6434
6448ac_ext=c 6435ac_ext=c
@@ -6790,7 +6777,7 @@ if test "$MAKEINFO" = "no"; then
6790 if test "x${with_makeinfo}" = "xno"; then 6777 if test "x${with_makeinfo}" = "xno"; then
6791 HAVE_MAKEINFO=no 6778 HAVE_MAKEINFO=no
6792 elif test ! -e $srcdir/info/emacs; then 6779 elif test ! -e $srcdir/info/emacs; then
6793 as_fn_error $? "You do not seem to have makeinfo >= 4.6, and your 6780 as_fn_error "You do not seem to have makeinfo >= 4.6, and your
6794source tree does not seem to have pre-built manuals in the \`info' directory. 6781source tree does not seem to have pre-built manuals in the \`info' directory.
6795Either install a suitable version of makeinfo, or re-run configure 6782Either install a suitable version of makeinfo, or re-run configure
6796with the \`--without-makeinfo' option to build without the manuals. " "$LINENO" 5 6783with the \`--without-makeinfo' option to build without the manuals. " "$LINENO" 5
@@ -6951,7 +6938,7 @@ fi
6951 if test "x$GCC" = "xyes"; then 6938 if test "x$GCC" = "xyes"; then
6952 C_SWITCH_MACHINE="-fno-common" 6939 C_SWITCH_MACHINE="-fno-common"
6953 else 6940 else
6954 as_fn_error $? "What gives? Fix me if DEC Unix supports ELF now." "$LINENO" 5 6941 as_fn_error "What gives? Fix me if DEC Unix supports ELF now." "$LINENO" 5
6955 fi 6942 fi
6956 else 6943 else
6957 UNEXEC_OBJ=unexalpha.o 6944 UNEXEC_OBJ=unexalpha.o
@@ -7227,7 +7214,7 @@ else
7227 ## Some platforms don't use any of these files, so it is not 7214 ## Some platforms don't use any of these files, so it is not
7228 ## appropriate to put this test outside the if block. 7215 ## appropriate to put this test outside the if block.
7229 test -e $CRT_DIR/crtn.o || test -e $CRT_DIR/crt0.o || \ 7216 test -e $CRT_DIR/crtn.o || test -e $CRT_DIR/crt0.o || \
7230 as_fn_error $? "crt*.o not found in specified location." "$LINENO" 5 7217 as_fn_error "crt*.o not found in specified location." "$LINENO" 5
7231 7218
7232fi 7219fi
7233 7220
@@ -7282,7 +7269,8 @@ if test "${with_sound}" != "no"; then
7282do : 7269do :
7283 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` 7270 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7284ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" 7271ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
7285if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : 7272eval as_val=\$$as_ac_Header
7273 if test "x$as_val" = x""yes; then :
7286 cat >>confdefs.h <<_ACEOF 7274 cat >>confdefs.h <<_ACEOF
7287#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 7275#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7288_ACEOF 7276_ACEOF
@@ -7473,7 +7461,7 @@ else
7473fi 7461fi
7474rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 7462rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7475 if test "$emacs_alsa_subdir" != yes; then 7463 if test "$emacs_alsa_subdir" != yes; then
7476 as_fn_error $? "pkg-config found alsa, but it does not compile. See config.log for error messages." "$LINENO" 5 7464 as_fn_error "pkg-config found alsa, but it does not compile. See config.log for error messages." "$LINENO" 5
7477 fi 7465 fi
7478 ALSA_CFLAGS="$ALSA_CFLAGS -DALSA_SUBDIR_INCLUDE" 7466 ALSA_CFLAGS="$ALSA_CFLAGS -DALSA_SUBDIR_INCLUDE"
7479 fi 7467 fi
@@ -7508,7 +7496,8 @@ for ac_header in sys/select.h sys/time.h unistd.h utime.h \
7508do : 7496do :
7509 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` 7497 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7510ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" 7498ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
7511if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : 7499eval as_val=\$$as_ac_Header
7500 if test "x$as_val" = x""yes; then :
7512 cat >>confdefs.h <<_ACEOF 7501 cat >>confdefs.h <<_ACEOF
7513#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 7502#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7514_ACEOF 7503_ACEOF
@@ -8563,8 +8552,8 @@ $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
8563 8552
8564 ;; #( 8553 ;; #(
8565 *) 8554 *)
8566 as_fn_error $? "unknown endianness 8555 as_fn_error "unknown endianness
8567 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; 8556 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
8568 esac 8557 esac
8569 8558
8570 8559
@@ -8603,7 +8592,7 @@ fi
8603$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } 8592$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
8604set x ${MAKE-make} 8593set x ${MAKE-make}
8605ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` 8594ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
8606if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then : 8595if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
8607 $as_echo_n "(cached) " >&6 8596 $as_echo_n "(cached) " >&6
8608else 8597else
8609 cat >conftest.make <<\_ACEOF 8598 cat >conftest.make <<\_ACEOF
@@ -8611,7 +8600,7 @@ SHELL = /bin/sh
8611all: 8600all:
8612 @echo '@@@%%%=$(MAKE)=@@@%%%' 8601 @echo '@@@%%%=$(MAKE)=@@@%%%'
8613_ACEOF 8602_ACEOF
8614# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. 8603# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
8615case `${MAKE-make} -f conftest.make 2>/dev/null` in 8604case `${MAKE-make} -f conftest.make 2>/dev/null` in
8616 *@@@%%%=?*=@@@%%%*) 8605 *@@@%%%=?*=@@@%%%*)
8617 eval ac_cv_prog_make_${ac_make}_set=yes;; 8606 eval ac_cv_prog_make_${ac_make}_set=yes;;
@@ -8747,7 +8736,7 @@ if test "x$with_x" = xno; then
8747 have_x=disabled 8736 have_x=disabled
8748else 8737else
8749 case $x_includes,$x_libraries in #( 8738 case $x_includes,$x_libraries in #(
8750 *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5 ;; #( 8739 *\'*) as_fn_error "cannot use X directory names containing '" "$LINENO" 5;; #(
8751 *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then : 8740 *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then :
8752 $as_echo_n "(cached) " >&6 8741 $as_echo_n "(cached) " >&6
8753else 8742else
@@ -8765,7 +8754,7 @@ libdir:
8765 @echo libdir='${LIBDIR}' 8754 @echo libdir='${LIBDIR}'
8766_ACEOF 8755_ACEOF
8767 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then 8756 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
8768 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. 8757 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
8769 for ac_var in incroot usrlibdir libdir; do 8758 for ac_var in incroot usrlibdir libdir; do
8770 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`" 8759 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
8771 done 8760 done
@@ -8851,7 +8840,7 @@ else
8851 fi 8840 fi
8852done 8841done
8853fi 8842fi
8854rm -f conftest.err conftest.i conftest.$ac_ext 8843rm -f conftest.err conftest.$ac_ext
8855fi # $ac_x_includes = no 8844fi # $ac_x_includes = no
8856 8845
8857if test "$ac_x_libraries" = no; then 8846if test "$ac_x_libraries" = no; then
@@ -9034,7 +9023,7 @@ if test "${with_ns}" != no; then
9034if test "x$ac_cv_header_AppKit_AppKit_h" = x""yes; then : 9023if test "x$ac_cv_header_AppKit_AppKit_h" = x""yes; then :
9035 HAVE_NS=yes 9024 HAVE_NS=yes
9036else 9025else
9037 as_fn_error $? "\`--with-ns' was specified, but the include 9026 as_fn_error "\`--with-ns' was specified, but the include
9038 files are missing or cannot be compiled." "$LINENO" 5 9027 files are missing or cannot be compiled." "$LINENO" 5
9039fi 9028fi
9040 9029
@@ -9153,7 +9142,7 @@ fi
9153 if test "$HAVE_XSERVER" = true || 9142 if test "$HAVE_XSERVER" = true ||
9154 test -n "$DISPLAY" || 9143 test -n "$DISPLAY" ||
9155 test "`echo /usr/lib/libX11.*`" != "/usr/lib/libX11.*"; then 9144 test "`echo /usr/lib/libX11.*`" != "/usr/lib/libX11.*"; then
9156 as_fn_error $? "You seem to be running X, but no X development libraries 9145 as_fn_error "You seem to be running X, but no X development libraries
9157were found. You should install the relevant development files for X 9146were found. You should install the relevant development files for X
9158and for the toolkit you want, such as Gtk+, Lesstif or Motif. Also make 9147and for the toolkit you want, such as Gtk+, Lesstif or Motif. Also make
9159sure you have development files for image handling, i.e. 9148sure you have development files for image handling, i.e.
@@ -9276,7 +9265,8 @@ do :
9276 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` 9265 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9277ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default 9266ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
9278" 9267"
9279if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : 9268eval as_val=\$$as_ac_Header
9269 if test "x$as_val" = x""yes; then :
9280 cat >>confdefs.h <<_ACEOF 9270 cat >>confdefs.h <<_ACEOF
9281#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 9271#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9282_ACEOF 9272_ACEOF
@@ -9382,7 +9372,6 @@ int
9382main () 9372main ()
9383{ 9373{
9384 char *data, *data2, *data3; 9374 char *data, *data2, *data3;
9385 const char *cdata2;
9386 int i, pagesize; 9375 int i, pagesize;
9387 int fd, fd2; 9376 int fd, fd2;
9388 9377
@@ -9407,10 +9396,10 @@ main ()
9407 fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600); 9396 fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600);
9408 if (fd2 < 0) 9397 if (fd2 < 0)
9409 return 4; 9398 return 4;
9410 cdata2 = ""; 9399 data2 = "";
9411 if (write (fd2, cdata2, 1) != 1) 9400 if (write (fd2, data2, 1) != 1)
9412 return 5; 9401 return 5;
9413 data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L); 9402 data2 = mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
9414 if (data2 == MAP_FAILED) 9403 if (data2 == MAP_FAILED)
9415 return 6; 9404 return 6;
9416 for (i = 0; i < pagesize; ++i) 9405 for (i = 0; i < pagesize; ++i)
@@ -9783,7 +9772,8 @@ XScreenNumberOfScreen XSetWMProtocols
9783do : 9772do :
9784 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` 9773 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9785ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" 9774ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
9786if eval test \"x\$"$as_ac_var"\" = x"yes"; then : 9775eval as_val=\$$as_ac_var
9776 if test "x$as_val" = x""yes; then :
9787 cat >>confdefs.h <<_ACEOF 9777 cat >>confdefs.h <<_ACEOF
9788#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 9778#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
9789_ACEOF 9779_ACEOF
@@ -10086,8 +10076,8 @@ fi
10086 10076
10087HAVE_GTK=no 10077HAVE_GTK=no
10088if test "${with_gtk3}" = "yes"; then 10078if test "${with_gtk3}" = "yes"; then
10089 GLIB_REQUIRED=2.6 10079 GLIB_REQUIRED=2.28
10090 GTK_REQUIRED=2.90 10080 GTK_REQUIRED=3.0
10091 GTK_MODULES="gtk+-3.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED" 10081 GTK_MODULES="gtk+-3.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
10092 10082
10093 10083
@@ -10185,8 +10175,11 @@ $as_echo "no" >&6; }
10185 fi 10175 fi
10186 10176
10187 if test "$pkg_check_gtk" = "no" && test "$USE_X_TOOLKIT" != "maybe"; then 10177 if test "$pkg_check_gtk" = "no" && test "$USE_X_TOOLKIT" != "maybe"; then
10188 as_fn_error $? "$GTK_PKG_ERRORS" "$LINENO" 5 10178 as_fn_error "$GTK_PKG_ERRORS" "$LINENO" 5
10189 fi 10179 fi
10180
10181$as_echo "#define HAVE_GTK3 1" >>confdefs.h
10182
10190fi 10183fi
10191 10184
10192if test "$pkg_check_gtk" != "yes"; then 10185if test "$pkg_check_gtk" != "yes"; then
@@ -10291,7 +10284,7 @@ $as_echo "no" >&6; }
10291 fi 10284 fi
10292 10285
10293 if test "$pkg_check_gtk" = "no" && test "$USE_X_TOOLKIT" != "maybe"; then 10286 if test "$pkg_check_gtk" = "no" && test "$USE_X_TOOLKIT" != "maybe"; then
10294 as_fn_error $? "$GTK_PKG_ERRORS" "$LINENO" 5 10287 as_fn_error "$GTK_PKG_ERRORS" "$LINENO" 5
10295 fi 10288 fi
10296fi 10289fi
10297fi 10290fi
@@ -10318,7 +10311,7 @@ done
10318 10311
10319 if test "${GTK_COMPILES}" != "yes"; then 10312 if test "${GTK_COMPILES}" != "yes"; then
10320 if test "$USE_X_TOOLKIT" != "maybe"; then 10313 if test "$USE_X_TOOLKIT" != "maybe"; then
10321 as_fn_error $? "Gtk+ wanted, but it does not compile, see config.log. Maybe some x11-devel files missing?" "$LINENO" 5 ; 10314 as_fn_error "Gtk+ wanted, but it does not compile, see config.log. Maybe some x11-devel files missing?" "$LINENO" 5;
10322 fi 10315 fi
10323 else 10316 else
10324 HAVE_GTK=yes 10317 HAVE_GTK=yes
@@ -10448,7 +10441,8 @@ $as_echo "#define HAVE_GTK_AND_PTHREAD 1" >>confdefs.h
10448do : 10441do :
10449 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` 10442 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10450ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" 10443ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10451if eval test \"x\$"$as_ac_var"\" = x"yes"; then : 10444eval as_val=\$$as_ac_var
10445 if test "x$as_val" = x""yes; then :
10452 cat >>confdefs.h <<_ACEOF 10446 cat >>confdefs.h <<_ACEOF
10453#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 10447#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
10454_ACEOF 10448_ACEOF
@@ -10970,7 +10964,7 @@ $as_echo "yes; using Lucid toolkit" >&6; }
10970 USE_X_TOOLKIT=LUCID 10964 USE_X_TOOLKIT=LUCID
10971 LUCID_LIBW=-lXaw 10965 LUCID_LIBW=-lXaw
10972 elif test x"${USE_X_TOOLKIT}" = xLUCID; then 10966 elif test x"${USE_X_TOOLKIT}" = xLUCID; then
10973 as_fn_error $? "Lucid toolkit requires X11/Xaw include files" "$LINENO" 5 10967 as_fn_error "Lucid toolkit requires X11/Xaw include files" "$LINENO" 5
10974 else 10968 else
10975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no; do not use toolkit by default" >&5 10969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no; do not use toolkit by default" >&5
10976$as_echo "no; do not use toolkit by default" >&6; } 10970$as_echo "no; do not use toolkit by default" >&6; }
@@ -11778,7 +11772,7 @@ $as_echo "no" >&6; }
11778 fi 11772 fi
11779 11773
11780 11774
11781 test "$HAVE_FREETYPE" = "no" && as_fn_error $? "libxft requires libfreetype" "$LINENO" 5 11775 test "$HAVE_FREETYPE" = "no" && as_fn_error "libxft requires libfreetype" "$LINENO" 5
11782 fi 11776 fi
11783 11777
11784 HAVE_LIBOTF=no 11778 HAVE_LIBOTF=no
@@ -12237,7 +12231,8 @@ if test "${HAVE_X11}" = "yes"; then
12237do : 12231do :
12238 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` 12232 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12239ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" 12233ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12240if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : 12234eval as_val=\$$as_ac_Header
12235 if test "x$as_val" = x""yes; then :
12241 cat >>confdefs.h <<_ACEOF 12236 cat >>confdefs.h <<_ACEOF
12242#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 12237#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12243_ACEOF 12238_ACEOF
@@ -12489,7 +12484,7 @@ if test "${HAVE_X11}" = "yes"; then
12489 MISSING="$MISSING libtiff" && WITH_NO="$WITH_NO --with-tiff=no" 12484 MISSING="$MISSING libtiff" && WITH_NO="$WITH_NO --with-tiff=no"
12490 12485
12491 if test "X${MISSING}" != X; then 12486 if test "X${MISSING}" != X; then
12492 as_fn_error $? "The following required libraries were not found: 12487 as_fn_error "The following required libraries were not found:
12493 $MISSING 12488 $MISSING
12494Maybe some development libraries/packages are missing? 12489Maybe some development libraries/packages are missing?
12495If you don't want to link with them give 12490If you don't want to link with them give
@@ -12978,7 +12973,8 @@ if test $ac_cv_os_cray = yes; then
12978 for ac_func in _getb67 GETB67 getb67; do 12973 for ac_func in _getb67 GETB67 getb67; do
12979 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` 12974 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12980ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" 12975ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12981if eval test \"x\$"$as_ac_var"\" = x"yes"; then : 12976eval as_val=\$$as_ac_var
12977 if test "x$as_val" = x""yes; then :
12982 12978
12983cat >>confdefs.h <<_ACEOF 12979cat >>confdefs.h <<_ACEOF
12984#define CRAY_STACKSEG_END $ac_func 12980#define CRAY_STACKSEG_END $ac_func
@@ -13042,7 +13038,7 @@ fi
13042 13038
13043 13039
13044if test x"$ac_cv_func_alloca_works" != xyes; then 13040if test x"$ac_cv_func_alloca_works" != xyes; then
13045 as_fn_error $? "a system implementation of alloca is required " "$LINENO" 5 13041 as_fn_error "a system implementation of alloca is required " "$LINENO" 5
13046fi 13042fi
13047 13043
13048# fmod, logb, and frexp are found in -lm on most systems. 13044# fmod, logb, and frexp are found in -lm on most systems.
@@ -13238,7 +13234,7 @@ fi
13238 13234
13239 13235
13240 if test $ac_cv_prog_liblockfile = yes; then 13236 if test $ac_cv_prog_liblockfile = yes; then
13241 as_fn_error $? "Shared liblockfile found but can't link against it. 13237 as_fn_error "Shared liblockfile found but can't link against it.
13242This probably means that movemail could lose mail. 13238This probably means that movemail could lose mail.
13243There may be a \`development' package to install containing liblockfile." "$LINENO" 5 13239There may be a \`development' package to install containing liblockfile." "$LINENO" 5
13244 fi 13240 fi
@@ -13327,7 +13323,8 @@ cfmakeraw cfsetspeed isnan copysign __executable_start
13327do : 13323do :
13328 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` 13324 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13329ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" 13325ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13330if eval test \"x\$"$as_ac_var"\" = x"yes"; then : 13326eval as_val=\$$as_ac_var
13327 if test "x$as_val" = x""yes; then :
13331 cat >>confdefs.h <<_ACEOF 13328 cat >>confdefs.h <<_ACEOF
13332#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 13329#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13333_ACEOF 13330_ACEOF
@@ -13719,8 +13716,8 @@ $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
13719 13716
13720 ;; #( 13717 ;; #(
13721 *) 13718 *)
13722 as_fn_error $? "unknown endianness 13719 as_fn_error "unknown endianness
13723 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; 13720 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
13724 esac 13721 esac
13725 13722
13726 13723
@@ -14621,7 +14618,8 @@ fi
14621do : 14618do :
14622 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` 14619 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14623ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" 14620ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
14624if eval test \"x\$"$as_ac_var"\" = x"yes"; then : 14621eval as_val=\$$as_ac_var
14622 if test "x$as_val" = x""yes; then :
14625 cat >>confdefs.h <<_ACEOF 14623 cat >>confdefs.h <<_ACEOF
14626#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 14624#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14627_ACEOF 14625_ACEOF
@@ -15353,7 +15351,7 @@ fi
15353 15351
15354# Make sure getloadavg.c is where it belongs, at configure-time. 15352# Make sure getloadavg.c is where it belongs, at configure-time.
15355test -f "$srcdir/$gl_source_base/getloadavg.c" || 15353test -f "$srcdir/$gl_source_base/getloadavg.c" ||
15356 as_fn_error $? "$srcdir/$gl_source_base/getloadavg.c is missing" "$LINENO" 5 15354 as_fn_error "$srcdir/$gl_source_base/getloadavg.c is missing" "$LINENO" 5
15357 15355
15358gl_save_LIBS=$LIBS 15356gl_save_LIBS=$LIBS
15359 15357
@@ -16951,7 +16949,8 @@ $as_echo "$gl_cv_header_working_stdint_h" >&6; }
16951do : 16949do :
16952 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` 16950 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
16953ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" 16951ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
16954if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : 16952eval as_val=\$$as_ac_Header
16953 if test "x$as_val" = x""yes; then :
16955 cat >>confdefs.h <<_ACEOF 16954 cat >>confdefs.h <<_ACEOF
16956#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 16955#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
16957_ACEOF 16956_ACEOF
@@ -16981,7 +16980,7 @@ done
16981 for gltype in ptrdiff_t size_t ; do 16980 for gltype in ptrdiff_t size_t ; do
16982 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5 16981 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
16983$as_echo_n "checking for bit size of $gltype... " >&6; } 16982$as_echo_n "checking for bit size of $gltype... " >&6; }
16984if eval "test \"\${gl_cv_bitsizeof_${gltype}+set}\"" = set; then : 16983if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then :
16985 $as_echo_n "(cached) " >&6 16984 $as_echo_n "(cached) " >&6
16986else 16985else
16987 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" " 16986 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
@@ -17026,7 +17025,7 @@ _ACEOF
17026 for gltype in sig_atomic_t wchar_t wint_t ; do 17025 for gltype in sig_atomic_t wchar_t wint_t ; do
17027 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5 17026 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
17028$as_echo_n "checking for bit size of $gltype... " >&6; } 17027$as_echo_n "checking for bit size of $gltype... " >&6; }
17029if eval "test \"\${gl_cv_bitsizeof_${gltype}+set}\"" = set; then : 17028if { as_var=gl_cv_bitsizeof_${gltype}; eval "test \"\${$as_var+set}\" = set"; }; then :
17030 $as_echo_n "(cached) " >&6 17029 $as_echo_n "(cached) " >&6
17031else 17030else
17032 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" " 17031 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
@@ -17070,7 +17069,7 @@ _ACEOF
17070 for gltype in sig_atomic_t wchar_t wint_t ; do 17069 for gltype in sig_atomic_t wchar_t wint_t ; do
17071 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5 17070 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
17072$as_echo_n "checking whether $gltype is signed... " >&6; } 17071$as_echo_n "checking whether $gltype is signed... " >&6; }
17073if eval "test \"\${gl_cv_type_${gltype}_signed+set}\"" = set; then : 17072if { as_var=gl_cv_type_${gltype}_signed; eval "test \"\${$as_var+set}\" = set"; }; then :
17074 $as_echo_n "(cached) " >&6 17073 $as_echo_n "(cached) " >&6
17075else 17074else
17076 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 17075 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -17129,7 +17128,7 @@ _ACEOF
17129 for gltype in ptrdiff_t size_t ; do 17128 for gltype in ptrdiff_t size_t ; do
17130 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5 17129 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
17131$as_echo_n "checking for $gltype integer literal suffix... " >&6; } 17130$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
17132if eval "test \"\${gl_cv_type_${gltype}_suffix+set}\"" = set; then : 17131if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then :
17133 $as_echo_n "(cached) " >&6 17132 $as_echo_n "(cached) " >&6
17134else 17133else
17135 eval gl_cv_type_${gltype}_suffix=no 17134 eval gl_cv_type_${gltype}_suffix=no
@@ -17201,7 +17200,7 @@ _ACEOF
17201 for gltype in sig_atomic_t wchar_t wint_t ; do 17200 for gltype in sig_atomic_t wchar_t wint_t ; do
17202 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5 17201 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
17203$as_echo_n "checking for $gltype integer literal suffix... " >&6; } 17202$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
17204if eval "test \"\${gl_cv_type_${gltype}_suffix+set}\"" = set; then : 17203if { as_var=gl_cv_type_${gltype}_suffix; eval "test \"\${$as_var+set}\" = set"; }; then :
17205 $as_echo_n "(cached) " >&6 17204 $as_echo_n "(cached) " >&6
17206else 17205else
17207 eval gl_cv_type_${gltype}_suffix=no 17206 eval gl_cv_type_${gltype}_suffix=no
@@ -17811,7 +17810,7 @@ else
17811fi 17810fi
17812 17811
17813if test "$have_tputs_et_al" != true; then 17812if test "$have_tputs_et_al" != true; then
17814 as_fn_error $? "I couldn't find termcap functions (tputs and friends). 17813 as_fn_error "I couldn't find termcap functions (tputs and friends).
17815Maybe some development libraries/packages are missing? Try installing 17814Maybe some development libraries/packages are missing? Try installing
17816libncurses-dev(el), libterminfo-dev(el) or similar." "$LINENO" 5 17815libncurses-dev(el), libterminfo-dev(el) or similar." "$LINENO" 5
17817fi 17816fi
@@ -18937,7 +18936,8 @@ for ac_func in fork vfork
18937do : 18936do :
18938 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` 18937 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
18939ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" 18938ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
18940if eval test \"x\$"$as_ac_var"\" = x"yes"; then : 18939eval as_val=\$$as_ac_var
18940 if test "x$as_val" = x""yes; then :
18941 cat >>confdefs.h <<_ACEOF 18941 cat >>confdefs.h <<_ACEOF
18942#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 18942#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
18943_ACEOF 18943_ACEOF
@@ -19257,7 +19257,7 @@ if test "x$GCC" = xyes \
19257 && test x"`$CC --version 2> /dev/null | grep 'gcc.* 4.5.0'`" != x \ 19257 && test x"`$CC --version 2> /dev/null | grep 'gcc.* 4.5.0'`" != x \
19258 && test x"`echo $CFLAGS | grep '\-O[23]'`" != x \ 19258 && test x"`echo $CFLAGS | grep '\-O[23]'`" != x \
19259 && test x"`echo $CFLAGS | grep '\-fno-optimize-sibling-calls'`" = x; then 19259 && test x"`echo $CFLAGS | grep '\-fno-optimize-sibling-calls'`" = x; then
19260 as_fn_error $? "GCC 4.5.0 has problems compiling Emacs; see etc/PROBLEMS'." "$LINENO" 5 19260 as_fn_error "GCC 4.5.0 has problems compiling Emacs; see etc/PROBLEMS'." "$LINENO" 5
19261fi 19261fi
19262 19262
19263version=$PACKAGE_VERSION 19263version=$PACKAGE_VERSION
@@ -19833,7 +19833,6 @@ DEFS=-DHAVE_CONFIG_H
19833 19833
19834ac_libobjs= 19834ac_libobjs=
19835ac_ltlibobjs= 19835ac_ltlibobjs=
19836U=
19837for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue 19836for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
19838 # 1. Remove the extension, and $U if already installed. 19837 # 1. Remove the extension, and $U if already installed.
19839 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' 19838 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
@@ -19857,16 +19856,16 @@ else
19857fi 19856fi
19858 19857
19859if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then 19858if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
19860 as_fn_error $? "conditional \"AMDEP\" was never defined. 19859 as_fn_error "conditional \"AMDEP\" was never defined.
19861Usually this means the macro was only invoked conditionally." "$LINENO" 5 19860Usually this means the macro was only invoked conditionally." "$LINENO" 5
19862fi 19861fi
19863if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then 19862if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
19864 as_fn_error $? "conditional \"am__fastdepCC\" was never defined. 19863 as_fn_error "conditional \"am__fastdepCC\" was never defined.
19865Usually this means the macro was only invoked conditionally." "$LINENO" 5 19864Usually this means the macro was only invoked conditionally." "$LINENO" 5
19866fi 19865fi
19867 19866
19868if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then 19867if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
19869 as_fn_error $? "conditional \"GL_COND_LIBTOOL\" was never defined. 19868 as_fn_error "conditional \"GL_COND_LIBTOOL\" was never defined.
19870Usually this means the macro was only invoked conditionally." "$LINENO" 5 19869Usually this means the macro was only invoked conditionally." "$LINENO" 5
19871fi 19870fi
19872 19871
@@ -20049,19 +20048,19 @@ export LANGUAGE
20049(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 20048(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
20050 20049
20051 20050
20052# as_fn_error STATUS ERROR [LINENO LOG_FD] 20051# as_fn_error ERROR [LINENO LOG_FD]
20053# ---------------------------------------- 20052# ---------------------------------
20054# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are 20053# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
20055# provided, also output the error to LOG_FD, referencing LINENO. Then exit the 20054# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
20056# script with STATUS, using 1 if that was 0. 20055# script with status $?, using 1 if that was 0.
20057as_fn_error () 20056as_fn_error ()
20058{ 20057{
20059 as_status=$1; test $as_status -eq 0 && as_status=1 20058 as_status=$?; test $as_status -eq 0 && as_status=1
20060 if test "$4"; then 20059 if test "$3"; then
20061 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 20060 as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
20062 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 20061 $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
20063 fi 20062 fi
20064 $as_echo "$as_me: error: $2" >&2 20063 $as_echo "$as_me: error: $1" >&2
20065 as_fn_exit $as_status 20064 as_fn_exit $as_status
20066} # as_fn_error 20065} # as_fn_error
20067 20066
@@ -20257,7 +20256,7 @@ $as_echo X"$as_dir" |
20257 test -d "$as_dir" && break 20256 test -d "$as_dir" && break
20258 done 20257 done
20259 test -z "$as_dirs" || eval "mkdir $as_dirs" 20258 test -z "$as_dirs" || eval "mkdir $as_dirs"
20260 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" 20259 } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
20261 20260
20262 20261
20263} # as_fn_mkdir_p 20262} # as_fn_mkdir_p
@@ -20311,7 +20310,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20311# values after options handling. 20310# values after options handling.
20312ac_log=" 20311ac_log="
20313This file was extended by emacs $as_me 24.0.50, which was 20312This file was extended by emacs $as_me 24.0.50, which was
20314generated by GNU Autoconf 2.67. Invocation command line was 20313generated by GNU Autoconf 2.65. Invocation command line was
20315 20314
20316 CONFIG_FILES = $CONFIG_FILES 20315 CONFIG_FILES = $CONFIG_FILES
20317 CONFIG_HEADERS = $CONFIG_HEADERS 20316 CONFIG_HEADERS = $CONFIG_HEADERS
@@ -20377,10 +20376,10 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20377ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" 20376ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
20378ac_cs_version="\\ 20377ac_cs_version="\\
20379emacs config.status 24.0.50 20378emacs config.status 24.0.50
20380configured by $0, generated by GNU Autoconf 2.67, 20379configured by $0, generated by GNU Autoconf 2.65,
20381 with options \\"\$ac_cs_config\\" 20380 with options \\"\$ac_cs_config\\"
20382 20381
20383Copyright (C) 2010 Free Software Foundation, Inc. 20382Copyright (C) 2009 Free Software Foundation, Inc.
20384This config.status script is free software; the Free Software Foundation 20383This config.status script is free software; the Free Software Foundation
20385gives unlimited permission to copy, distribute and modify it." 20384gives unlimited permission to copy, distribute and modify it."
20386 20385
@@ -20398,16 +20397,11 @@ ac_need_defaults=:
20398while test $# != 0 20397while test $# != 0
20399do 20398do
20400 case $1 in 20399 case $1 in
20401 --*=?*) 20400 --*=*)
20402 ac_option=`expr "X$1" : 'X\([^=]*\)='` 20401 ac_option=`expr "X$1" : 'X\([^=]*\)='`
20403 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` 20402 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
20404 ac_shift=: 20403 ac_shift=:
20405 ;; 20404 ;;
20406 --*=)
20407 ac_option=`expr "X$1" : 'X\([^=]*\)='`
20408 ac_optarg=
20409 ac_shift=:
20410 ;;
20411 *) 20405 *)
20412 ac_option=$1 20406 ac_option=$1
20413 ac_optarg=$2 20407 ac_optarg=$2
@@ -20429,7 +20423,6 @@ do
20429 $ac_shift 20423 $ac_shift
20430 case $ac_optarg in 20424 case $ac_optarg in
20431 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; 20425 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
20432 '') as_fn_error $? "missing file argument" ;;
20433 esac 20426 esac
20434 as_fn_append CONFIG_FILES " '$ac_optarg'" 20427 as_fn_append CONFIG_FILES " '$ac_optarg'"
20435 ac_need_defaults=false;; 20428 ac_need_defaults=false;;
@@ -20442,7 +20435,7 @@ do
20442 ac_need_defaults=false;; 20435 ac_need_defaults=false;;
20443 --he | --h) 20436 --he | --h)
20444 # Conflict between --help and --header 20437 # Conflict between --help and --header
20445 as_fn_error $? "ambiguous option: \`$1' 20438 as_fn_error "ambiguous option: \`$1'
20446Try \`$0 --help' for more information.";; 20439Try \`$0 --help' for more information.";;
20447 --help | --hel | -h ) 20440 --help | --hel | -h )
20448 $as_echo "$ac_cs_usage"; exit ;; 20441 $as_echo "$ac_cs_usage"; exit ;;
@@ -20451,7 +20444,7 @@ Try \`$0 --help' for more information.";;
20451 ac_cs_silent=: ;; 20444 ac_cs_silent=: ;;
20452 20445
20453 # This is an error. 20446 # This is an error.
20454 -*) as_fn_error $? "unrecognized option: \`$1' 20447 -*) as_fn_error "unrecognized option: \`$1'
20455Try \`$0 --help' for more information." ;; 20448Try \`$0 --help' for more information." ;;
20456 20449
20457 *) as_fn_append ac_config_targets " $1" 20450 *) as_fn_append ac_config_targets " $1"
@@ -20525,7 +20518,7 @@ do
20525 "epaths") CONFIG_COMMANDS="$CONFIG_COMMANDS epaths" ;; 20518 "epaths") CONFIG_COMMANDS="$CONFIG_COMMANDS epaths" ;;
20526 "gdbinit") CONFIG_COMMANDS="$CONFIG_COMMANDS gdbinit" ;; 20519 "gdbinit") CONFIG_COMMANDS="$CONFIG_COMMANDS gdbinit" ;;
20527 20520
20528 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;; 20521 *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
20529 esac 20522 esac
20530done 20523done
20531 20524
@@ -20563,7 +20556,7 @@ $debug ||
20563{ 20556{
20564 tmp=./conf$$-$RANDOM 20557 tmp=./conf$$-$RANDOM
20565 (umask 077 && mkdir "$tmp") 20558 (umask 077 && mkdir "$tmp")
20566} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 20559} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
20567 20560
20568# Set up the scripts for CONFIG_FILES section. 20561# Set up the scripts for CONFIG_FILES section.
20569# No need to generate them if there are no CONFIG_FILES. 20562# No need to generate them if there are no CONFIG_FILES.
@@ -20597,7 +20590,7 @@ if test "x$ac_cr" = x; then
20597fi 20590fi
20598ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null` 20591ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
20599if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then 20592if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
20600 ac_cs_awk_cr='\\r' 20593 ac_cs_awk_cr='\r'
20601else 20594else
20602 ac_cs_awk_cr=$ac_cr 20595 ac_cs_awk_cr=$ac_cr
20603fi 20596fi
@@ -20614,7 +20607,7 @@ _ACEOF
20614 echo "_ACEOF" 20607 echo "_ACEOF"
20615} >conf$$files.sh && 20608} >conf$$files.sh &&
20616. ./conf$$files.sh || 20609. ./conf$$files.sh ||
20617 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 20610 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
20618rm -f conf$$files.sh 20611rm -f conf$$files.sh
20619 20612
20620{ 20613{
@@ -20622,18 +20615,18 @@ rm -f conf$$files.sh
20622 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && 20615 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
20623 echo "_ACEOF" 20616 echo "_ACEOF"
20624} >conf$$subs.sh || 20617} >conf$$subs.sh ||
20625 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 20618 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
20626ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` 20619ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
20627ac_delim='%!_!# ' 20620ac_delim='%!_!# '
20628for ac_last_try in false false false false false :; do 20621for ac_last_try in false false false false false :; do
20629 . ./conf$$subs.sh || 20622 . ./conf$$subs.sh ||
20630 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 20623 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
20631 20624
20632 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` 20625 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
20633 if test $ac_delim_n = $ac_delim_num; then 20626 if test $ac_delim_n = $ac_delim_num; then
20634 break 20627 break
20635 elif $ac_last_try; then 20628 elif $ac_last_try; then
20636 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 20629 as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
20637 else 20630 else
20638 ac_delim="$ac_delim!$ac_delim _$ac_delim!! " 20631 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
20639 fi 20632 fi
@@ -20728,28 +20721,20 @@ if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
20728else 20721else
20729 cat 20722 cat
20730fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ 20723fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
20731 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 20724 || as_fn_error "could not setup config files machinery" "$LINENO" 5
20732_ACEOF 20725_ACEOF
20733 20726
20734# VPATH may cause trouble with some makes, so we remove sole $(srcdir), 20727# VPATH may cause trouble with some makes, so we remove $(srcdir),
20735# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and 20728# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
20736# trailing colons and then remove the whole line if VPATH becomes empty 20729# trailing colons and then remove the whole line if VPATH becomes empty
20737# (actually we leave an empty line to preserve line numbers). 20730# (actually we leave an empty line to preserve line numbers).
20738if test "x$srcdir" = x.; then 20731if test "x$srcdir" = x.; then
20739 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ 20732 ac_vpsub='/^[ ]*VPATH[ ]*=/{
20740h 20733s/:*\$(srcdir):*/:/
20741s/// 20734s/:*\${srcdir}:*/:/
20742s/^/:/ 20735s/:*@srcdir@:*/:/
20743s/[ ]*$/:/ 20736s/^\([^=]*=[ ]*\):*/\1/
20744s/:\$(srcdir):/:/g
20745s/:\${srcdir}:/:/g
20746s/:@srcdir@:/:/g
20747s/^:*//
20748s/:*$// 20737s/:*$//
20749x
20750s/\(=[ ]*\).*/\1/
20751G
20752s/\n//
20753s/^[^=]*=[ ]*$// 20738s/^[^=]*=[ ]*$//
20754}' 20739}'
20755fi 20740fi
@@ -20777,7 +20762,7 @@ for ac_last_try in false false :; do
20777 if test -z "$ac_t"; then 20762 if test -z "$ac_t"; then
20778 break 20763 break
20779 elif $ac_last_try; then 20764 elif $ac_last_try; then
20780 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 20765 as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
20781 else 20766 else
20782 ac_delim="$ac_delim!$ac_delim _$ac_delim!! " 20767 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
20783 fi 20768 fi
@@ -20862,7 +20847,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20862_ACAWK 20847_ACAWK
20863_ACEOF 20848_ACEOF
20864cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 20849cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20865 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 20850 as_fn_error "could not setup config headers machinery" "$LINENO" 5
20866fi # test -n "$CONFIG_HEADERS" 20851fi # test -n "$CONFIG_HEADERS"
20867 20852
20868 20853
@@ -20875,7 +20860,7 @@ do
20875 esac 20860 esac
20876 case $ac_mode$ac_tag in 20861 case $ac_mode$ac_tag in
20877 :[FHL]*:*);; 20862 :[FHL]*:*);;
20878 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;; 20863 :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
20879 :[FH]-) ac_tag=-:-;; 20864 :[FH]-) ac_tag=-:-;;
20880 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; 20865 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
20881 esac 20866 esac
@@ -20903,7 +20888,7 @@ do
20903 [\\/$]*) false;; 20888 [\\/$]*) false;;
20904 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; 20889 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
20905 esac || 20890 esac ||
20906 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;; 20891 as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
20907 esac 20892 esac
20908 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac 20893 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
20909 as_fn_append ac_file_inputs " '$ac_f'" 20894 as_fn_append ac_file_inputs " '$ac_f'"
@@ -20930,7 +20915,7 @@ $as_echo "$as_me: creating $ac_file" >&6;}
20930 20915
20931 case $ac_tag in 20916 case $ac_tag in
20932 *:-:* | *:-) cat >"$tmp/stdin" \ 20917 *:-:* | *:-) cat >"$tmp/stdin" \
20933 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; 20918 || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
20934 esac 20919 esac
20935 ;; 20920 ;;
20936 esac 20921 esac
@@ -21072,22 +21057,22 @@ if $ac_cs_awk_getline; then
21072else 21057else
21073 $AWK -f "$tmp/subs.awk" | $SHELL 21058 $AWK -f "$tmp/subs.awk" | $SHELL
21074fi >$tmp/out \ 21059fi >$tmp/out \
21075 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 21060 || as_fn_error "could not create $ac_file" "$LINENO" 5
21076 21061
21077test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && 21062test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
21078 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && 21063 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
21079 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && 21064 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
21080 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' 21065 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
21081which seems to be undefined. Please make sure it is defined" >&5 21066which seems to be undefined. Please make sure it is defined." >&5
21082$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' 21067$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
21083which seems to be undefined. Please make sure it is defined" >&2;} 21068which seems to be undefined. Please make sure it is defined." >&2;}
21084 21069
21085 rm -f "$tmp/stdin" 21070 rm -f "$tmp/stdin"
21086 case $ac_file in 21071 case $ac_file in
21087 -) cat "$tmp/out" && rm -f "$tmp/out";; 21072 -) cat "$tmp/out" && rm -f "$tmp/out";;
21088 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; 21073 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
21089 esac \ 21074 esac \
21090 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 21075 || as_fn_error "could not create $ac_file" "$LINENO" 5
21091 ;; 21076 ;;
21092 :H) 21077 :H)
21093 # 21078 #
@@ -21098,19 +21083,19 @@ which seems to be undefined. Please make sure it is defined" >&2;}
21098 $as_echo "/* $configure_input */" \ 21083 $as_echo "/* $configure_input */" \
21099 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" 21084 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
21100 } >"$tmp/config.h" \ 21085 } >"$tmp/config.h" \
21101 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 21086 || as_fn_error "could not create $ac_file" "$LINENO" 5
21102 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then 21087 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
21103 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 21088 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
21104$as_echo "$as_me: $ac_file is unchanged" >&6;} 21089$as_echo "$as_me: $ac_file is unchanged" >&6;}
21105 else 21090 else
21106 rm -f "$ac_file" 21091 rm -f "$ac_file"
21107 mv "$tmp/config.h" "$ac_file" \ 21092 mv "$tmp/config.h" "$ac_file" \
21108 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 21093 || as_fn_error "could not create $ac_file" "$LINENO" 5
21109 fi 21094 fi
21110 else 21095 else
21111 $as_echo "/* $configure_input */" \ 21096 $as_echo "/* $configure_input */" \
21112 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ 21097 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
21113 || as_fn_error $? "could not create -" "$LINENO" 5 21098 || as_fn_error "could not create -" "$LINENO" 5
21114 fi 21099 fi
21115# Compute "$ac_file"'s index in $config_headers. 21100# Compute "$ac_file"'s index in $config_headers.
21116_am_arg="$ac_file" 21101_am_arg="$ac_file"
@@ -21275,7 +21260,7 @@ _ACEOF
21275ac_clean_files=$ac_clean_files_save 21260ac_clean_files=$ac_clean_files_save
21276 21261
21277test $ac_write_fail = 0 || 21262test $ac_write_fail = 0 ||
21278 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 21263 as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
21279 21264
21280 21265
21281# configure is writing to config.log, and then calls config.status. 21266# configure is writing to config.log, and then calls config.status.
@@ -21296,7 +21281,7 @@ if test "$no_create" != yes; then
21296 exec 5>>config.log 21281 exec 5>>config.log
21297 # Use ||, not &&, to avoid exiting from the if with $? = 1, which 21282 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
21298 # would make configure fail if this is the last instruction. 21283 # would make configure fail if this is the last instruction.
21299 $ac_cs_success || as_fn_exit 1 21284 $ac_cs_success || as_fn_exit $?
21300fi 21285fi
21301if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then 21286if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
21302 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 21287 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
diff --git a/configure.in b/configure.in
index 69d1a1e5bd3..086a7e12d67 100644
--- a/configure.in
+++ b/configure.in
@@ -1826,8 +1826,8 @@ fi
1826 1826
1827HAVE_GTK=no 1827HAVE_GTK=no
1828if test "${with_gtk3}" = "yes"; then 1828if test "${with_gtk3}" = "yes"; then
1829 GLIB_REQUIRED=2.6 1829 GLIB_REQUIRED=2.28
1830 GTK_REQUIRED=2.90 1830 GTK_REQUIRED=3.0
1831 GTK_MODULES="gtk+-3.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED" 1831 GTK_MODULES="gtk+-3.0 >= $GTK_REQUIRED glib-2.0 >= $GLIB_REQUIRED"
1832 1832
1833 dnl Checks for libraries. 1833 dnl Checks for libraries.
@@ -1835,6 +1835,7 @@ if test "${with_gtk3}" = "yes"; then
1835 if test "$pkg_check_gtk" = "no" && test "$USE_X_TOOLKIT" != "maybe"; then 1835 if test "$pkg_check_gtk" = "no" && test "$USE_X_TOOLKIT" != "maybe"; then
1836 AC_MSG_ERROR($GTK_PKG_ERRORS) 1836 AC_MSG_ERROR($GTK_PKG_ERRORS)
1837 fi 1837 fi
1838 AC_DEFINE(HAVE_GTK3, 1, [Define to 1 if using GTK 3 or later.])
1838fi 1839fi
1839 1840
1840if test "$pkg_check_gtk" != "yes"; then 1841if test "$pkg_check_gtk" != "yes"; then
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog
index a2708b454f4..1c8ca4bc322 100644
--- a/doc/emacs/ChangeLog
+++ b/doc/emacs/ChangeLog
@@ -1,3 +1,8 @@
12011-03-08 Jan Djärv <jan.h.d@swipnet.se>
2
3 * xresources.texi (GTK resources): ~/.emacs.d/gtkrc does not work
4 for Gtk+ 3.
5
12011-03-08 Glenn Morris <rgm@gnu.org> 62011-03-08 Glenn Morris <rgm@gnu.org>
2 7
3 * display.texi (Optional Mode Line): Don't mention exactly where 8 * display.texi (Optional Mode Line): Don't mention exactly where
diff --git a/doc/emacs/xresources.texi b/doc/emacs/xresources.texi
index 41a09a5f713..33ea83d7d6e 100644
--- a/doc/emacs/xresources.texi
+++ b/doc/emacs/xresources.texi
@@ -660,8 +660,11 @@ The color for the border shadow, on the top and the left.
660@iftex 660@iftex
661 The most common way to customize the GTK widgets Emacs uses (menus, dialogs 661 The most common way to customize the GTK widgets Emacs uses (menus, dialogs
662tool bars and scroll bars) is by choosing an appropriate theme, for example 662tool bars and scroll bars) is by choosing an appropriate theme, for example
663with the GNOME theme selector. You can also do Emacs specific customization 663with the GNOME theme selector.
664by inserting GTK style directives in the file @file{~/.emacs.d/gtkrc}. Some GTK 664
665You can also do Emacs specific customization
666by inserting GTK style directives in the file @file{~/.emacs.d/gtkrc},
667but only if you have a Gtk+ version earlier than 3 (i.e. 2). Some GTK
665themes ignore customizations in @file{~/.emacs.d/gtkrc} so not everything 668themes ignore customizations in @file{~/.emacs.d/gtkrc} so not everything
666works with all themes. To customize Emacs font, background, faces, etc., use 669works with all themes. To customize Emacs font, background, faces, etc., use
667the normal X resources (@pxref{Resources}). We will present some examples of 670the normal X resources (@pxref{Resources}). We will present some examples of
diff --git a/src/ChangeLog b/src/ChangeLog
index b73e3d0c860..ff5ee064a92 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,55 @@
12011-03-08 Jan Djärv <jan.h.d@swipnet.se>
2
3 * xterm.h (DEFAULT_GDK_DISPLAY): New define.
4 (GDK_WINDOW_XID, gtk_widget_get_preferred_size): New defines
5 for ! HAVE_GTK3.
6 (GTK_WIDGET_TO_X_WIN): Use GDK_WINDOW_XID.
7
8 * xmenu.c (menu_position_func): Call gtk_widget_get_preferred_size.
9
10 * gtkutil.c: Include gtkx.h if HAVE_GTK3. If ! HAVE_GTK3, define
11 gdk_window_get_screen, gdk_window_get_geometry,
12 gdk_x11_window_lookup_for_display and GDK_KEY_g.
13 (xg_set_screen): Use DEFAULT_GDK_DISPLAY.
14 (xg_get_pixbuf_from_pixmap): New function.
15 (xg_get_pixbuf_from_pix_and_mask): Change parameters from GdkPixmap
16 to Pixmap, take frame as parameter, remove GdkColormap parameter.
17 Call xg_get_pixbuf_from_pixmap instead of
18 gdk_pixbuf_get_from_drawable.
19 (xg_get_image_for_pixmap): Do not make GdkPixmaps, call
20 xg_get_pixbuf_from_pix_and_mask with Pixmap parameters instead.
21 (xg_check_special_colors): Use GtkStyleContext and its functions
22 for HAVE_GTK3.
23 (xg_prepare_tooltip, xg_hide_tooltip): Call gdk_window_get_screen.
24 (xg_prepare_tooltip, create_dialog, menubar_map_cb)
25 (xg_update_frame_menubar, xg_tool_bar_detach_callback)
26 (xg_tool_bar_attach_callback, xg_update_tool_bar_sizes): Call
27 gtk_widget_get_preferred_size.
28 (xg_frame_resized): gdk_window_get_geometry only takes 5
29 parameters.
30 (xg_win_to_widget, xg_event_is_for_menubar): Call
31 gdk_x11_window_lookup_for_display.
32 (xg_set_widget_bg): New function.
33 (delete_cb): New function.
34 (xg_create_frame_widgets): connect delete-event to delete_cb.
35 Call xg_set_widget_bg. Only set backgrund pixmap for ! HAVE_GTK3
36 (xg_set_background_color): Call xg_set_widget_bg.
37 (xg_set_frame_icon): Call xg_get_pixbuf_from_pix_and_mask.
38 (xg_create_scroll_bar): vadj is a GtkAdjustment for HAVE_GTK3.
39 Only call gtk_range_set_update_policy if ! HAVE_GTK3.
40 (xg_make_tool_item): Only connect xg_tool_bar_item_expose_callback
41 if ! HAVE_GTK3.
42 (update_frame_tool_bar): Call gtk_widget_hide.
43 (xg_initialize): Use GDK_KEY_g.
44
45 * xsmfns.c (gdk_set_sm_client_id): Define to gdk_set_sm_client_id
46 if ! HAVE_GTK3
47 (x_session_initialize): Call gdk_x11_set_sm_client_id.
48
49 * xterm.c (XFillRectangle): Use cairo routines for HAVE_GTK3.
50 (x_term_init): Disable Xinput(2) with GDK_CORE_DEVICE_EVENTS.
51 Load ~/emacs.d/gtkrc only for ! HAVE_GTK3.
52
12011-03-08 Juanma Barranquero <lekktu@gmail.com> 532011-03-08 Juanma Barranquero <lekktu@gmail.com>
2 54
3 * w32xfns.c (select_palette): Check success of RealizePalette against 55 * w32xfns.c (select_palette): Check success of RealizePalette against
diff --git a/src/config.in b/src/config.in
index 7f33727c0b1..8889213b781 100644
--- a/src/config.in
+++ b/src/config.in
@@ -285,6 +285,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
285/* Define to 1 if you have the `grantpt' function. */ 285/* Define to 1 if you have the `grantpt' function. */
286#undef HAVE_GRANTPT 286#undef HAVE_GRANTPT
287 287
288/* Define to 1 if using GTK 3 or later. */
289#undef HAVE_GTK3
290
288/* Define to 1 if you have the `gtk_adjustment_get_page_size' function. */ 291/* Define to 1 if you have the `gtk_adjustment_get_page_size' function. */
289#undef HAVE_GTK_ADJUSTMENT_GET_PAGE_SIZE 292#undef HAVE_GTK_ADJUSTMENT_GET_PAGE_SIZE
290 293
diff --git a/src/gtkutil.c b/src/gtkutil.c
index 6ecd5d624af..b1ea6336eb6 100644
--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -40,6 +40,10 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
40#include <X11/Xft/Xft.h> 40#include <X11/Xft/Xft.h>
41#endif 41#endif
42 42
43#ifdef HAVE_GTK3
44#include <gtk/gtkx.h>
45#endif
46
43#define FRAME_TOTAL_PIXEL_HEIGHT(f) \ 47#define FRAME_TOTAL_PIXEL_HEIGHT(f) \
44 (FRAME_PIXEL_HEIGHT (f) + FRAME_MENUBAR_HEIGHT (f) + FRAME_TOOLBAR_HEIGHT (f)) 48 (FRAME_PIXEL_HEIGHT (f) + FRAME_MENUBAR_HEIGHT (f) + FRAME_TOOLBAR_HEIGHT (f))
45 49
@@ -69,6 +73,15 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
69#define remove_submenu(w) gtk_menu_item_remove_submenu ((w)) 73#define remove_submenu(w) gtk_menu_item_remove_submenu ((w))
70#endif 74#endif
71 75
76#ifndef HAVE_GTK3
77#define gdk_window_get_screen(w) gdk_drawable_get_screen (w)
78#define gdk_window_get_geometry(w, a, b, c, d) \
79 gdk_window_get_geometry (w, a, b, c, d, 0)
80#define gdk_x11_window_lookup_for_display(d, w) \
81 gdk_xid_table_lookup_for_display (d, w)
82#define GDK_KEY_g GDK_g
83#endif
84
72#define XG_BIN_CHILD(x) gtk_bin_get_child (GTK_BIN (x)) 85#define XG_BIN_CHILD(x) gtk_bin_get_child (GTK_BIN (x))
73 86
74 87
@@ -88,7 +101,7 @@ static GdkDisplay *gdpy_def;
88static void 101static void
89xg_set_screen (GtkWidget *w, FRAME_PTR f) 102xg_set_screen (GtkWidget *w, FRAME_PTR f)
90{ 103{
91 if (FRAME_X_DISPLAY (f) != GDK_DISPLAY ()) 104 if (FRAME_X_DISPLAY (f) != DEFAULT_GDK_DISPLAY ())
92 { 105 {
93 GdkDisplay *gdpy = gdk_x11_lookup_xdisplay (FRAME_X_DISPLAY (f)); 106 GdkDisplay *gdpy = gdk_x11_lookup_xdisplay (FRAME_X_DISPLAY (f));
94 GdkScreen *gscreen = gdk_display_get_default_screen (gdpy); 107 GdkScreen *gscreen = gdk_display_get_default_screen (gdpy);
@@ -229,29 +242,55 @@ xg_create_default_cursor (Display *dpy)
229 return gdk_cursor_new_for_display (gdpy, GDK_LEFT_PTR); 242 return gdk_cursor_new_for_display (gdpy, GDK_LEFT_PTR);
230} 243}
231 244
245static GdkPixbuf *
246xg_get_pixbuf_from_pixmap (FRAME_PTR f, Pixmap pix)
247{
248 int iunused;
249 GdkPixbuf *tmp_buf;
250 Window wunused;
251 unsigned int width, height, uunused;
252 XImage *xim;
253
254 XGetGeometry (FRAME_X_DISPLAY (f), pix, &wunused, &iunused, &iunused,
255 &width, &height, &uunused, &uunused);
256
257 xim = XGetImage (FRAME_X_DISPLAY (f), pix, 0, 0, width, height,
258 ~0, XYPixmap);
259 if (!xim) return 0;
260
261 tmp_buf = gdk_pixbuf_new_from_data (xim->data,
262 GDK_COLORSPACE_RGB,
263 FALSE,
264 xim->bitmap_unit,
265 (int) width,
266 (int) height,
267 xim->bytes_per_line,
268 NULL,
269 NULL);
270 XDestroyImage (xim);
271 return tmp_buf;
272}
273
232/* Apply GMASK to GPIX and return a GdkPixbuf with an alpha channel. */ 274/* Apply GMASK to GPIX and return a GdkPixbuf with an alpha channel. */
233 275
234static GdkPixbuf * 276static GdkPixbuf *
235xg_get_pixbuf_from_pix_and_mask (GdkPixmap *gpix, 277xg_get_pixbuf_from_pix_and_mask (FRAME_PTR f,
236 GdkPixmap *gmask, 278 Pixmap pix,
237 GdkColormap *cmap) 279 Pixmap mask)
238{ 280{
239 int width, height; 281 int width, height;
240 GdkPixbuf *icon_buf, *tmp_buf; 282 GdkPixbuf *icon_buf, *tmp_buf;
241 283
242 gdk_drawable_get_size (gpix, &width, &height); 284 tmp_buf = xg_get_pixbuf_from_pixmap (f, pix);
243 tmp_buf = gdk_pixbuf_get_from_drawable (NULL, gpix, cmap,
244 0, 0, 0, 0, width, height);
245 icon_buf = gdk_pixbuf_add_alpha (tmp_buf, FALSE, 0, 0, 0); 285 icon_buf = gdk_pixbuf_add_alpha (tmp_buf, FALSE, 0, 0, 0);
246 g_object_unref (G_OBJECT (tmp_buf)); 286 g_object_unref (G_OBJECT (tmp_buf));
247 287
248 if (gmask) 288 width = gdk_pixbuf_get_width (icon_buf);
289 height = gdk_pixbuf_get_height (icon_buf);
290
291 if (mask)
249 { 292 {
250 GdkPixbuf *mask_buf = gdk_pixbuf_get_from_drawable (NULL, 293 GdkPixbuf *mask_buf = xg_get_pixbuf_from_pixmap (f, mask);
251 gmask,
252 NULL,
253 0, 0, 0, 0,
254 width, height);
255 guchar *pixels = gdk_pixbuf_get_pixels (icon_buf); 294 guchar *pixels = gdk_pixbuf_get_pixels (icon_buf);
256 guchar *mask_pixels = gdk_pixbuf_get_pixels (mask_buf); 295 guchar *mask_pixels = gdk_pixbuf_get_pixels (mask_buf);
257 int rowstride = gdk_pixbuf_get_rowstride (icon_buf); 296 int rowstride = gdk_pixbuf_get_rowstride (icon_buf);
@@ -316,10 +355,6 @@ xg_get_image_for_pixmap (FRAME_PTR f,
316 GtkWidget *widget, 355 GtkWidget *widget,
317 GtkImage *old_widget) 356 GtkImage *old_widget)
318{ 357{
319 GdkPixmap *gpix;
320 GdkPixmap *gmask;
321 GdkDisplay *gdpy;
322 GdkColormap *cmap;
323 GdkPixbuf *icon_buf; 358 GdkPixbuf *icon_buf;
324 359
325 /* If we have a file, let GTK do all the image handling. 360 /* If we have a file, let GTK do all the image handling.
@@ -347,10 +382,6 @@ xg_get_image_for_pixmap (FRAME_PTR f,
347 on a monochrome display, and sometimes bad on all displays with 382 on a monochrome display, and sometimes bad on all displays with
348 certain themes. */ 383 certain themes. */
349 384
350 gdpy = gdk_x11_lookup_xdisplay (FRAME_X_DISPLAY (f));
351 gpix = gdk_pixmap_foreign_new_for_display (gdpy, img->pixmap);
352 gmask = img->mask ? gdk_pixmap_foreign_new_for_display (gdpy, img->mask) : 0;
353
354 /* This is a workaround to make icons look good on pseudo color 385 /* This is a workaround to make icons look good on pseudo color
355 displays. Apparently GTK expects the images to have an alpha 386 displays. Apparently GTK expects the images to have an alpha
356 channel. If they don't, insensitive and activated icons will 387 channel. If they don't, insensitive and activated icons will
@@ -360,18 +391,17 @@ xg_get_image_for_pixmap (FRAME_PTR f,
360 not associated with the img->pixmap. The img->pixmap may be removed 391 not associated with the img->pixmap. The img->pixmap may be removed
361 by clearing the image cache and then the tool bar redraw fails, since 392 by clearing the image cache and then the tool bar redraw fails, since
362 Gtk+ assumes the pixmap is always there. */ 393 Gtk+ assumes the pixmap is always there. */
363 cmap = gtk_widget_get_colormap (widget); 394 icon_buf = xg_get_pixbuf_from_pix_and_mask (f, img->pixmap, img->mask);
364 icon_buf = xg_get_pixbuf_from_pix_and_mask (gpix, gmask, cmap);
365
366 if (! old_widget)
367 old_widget = GTK_IMAGE (gtk_image_new_from_pixbuf (icon_buf));
368 else
369 gtk_image_set_from_pixbuf (old_widget, icon_buf);
370 395
371 g_object_unref (G_OBJECT (icon_buf)); 396 if (icon_buf)
397 {
398 if (! old_widget)
399 old_widget = GTK_IMAGE (gtk_image_new_from_pixbuf (icon_buf));
400 else
401 gtk_image_set_from_pixbuf (old_widget, icon_buf);
372 402
373 g_object_unref (G_OBJECT (gpix)); 403 g_object_unref (G_OBJECT (icon_buf));
374 if (gmask) g_object_unref (G_OBJECT (gmask)); 404 }
375 405
376 return GTK_WIDGET (old_widget); 406 return GTK_WIDGET (old_widget);
377} 407}
@@ -514,28 +544,43 @@ xg_check_special_colors (struct frame *f,
514 XColor *color) 544 XColor *color)
515{ 545{
516 int success_p = 0; 546 int success_p = 0;
517 if (FRAME_GTK_WIDGET (f)) 547 int get_bg = strcmp ("gtk_selection_bg_color", color_name) == 0;
518 { 548 int get_fg = !get_bg && strcmp ("gtk_selection_fg_color", color_name) == 0;
519 if (strcmp ("gtk_selection_bg_color", color_name) == 0) 549
520 { 550 if (! FRAME_GTK_WIDGET (f) || ! (get_bg || get_fg))
521 GtkStyle *gsty = gtk_widget_get_style (FRAME_GTK_WIDGET (f)); 551 return success_p;
522 color->red = gsty->bg[GTK_STATE_SELECTED].red; 552
523 color->green = gsty->bg[GTK_STATE_SELECTED].green; 553 BLOCK_INPUT;
524 color->blue = gsty->bg[GTK_STATE_SELECTED].blue; 554 {
525 color->pixel = gsty->bg[GTK_STATE_SELECTED].pixel; 555#ifdef HAVE_GTK3
526 success_p = 1; 556 GtkStyleContext *gsty
527 } 557 = gtk_widget_get_style_context (FRAME_GTK_OUTER_WIDGET (f));
528 else if (strcmp ("gtk_selection_fg_color", color_name) == 0) 558 GdkRGBA col;
529 { 559 char buf[64];
530 GtkStyle *gsty = gtk_widget_get_style (FRAME_GTK_WIDGET (f)); 560 int state = GTK_STATE_FLAG_SELECTED|GTK_STATE_FLAG_FOCUSED;
531 color->red = gsty->fg[GTK_STATE_SELECTED].red; 561 if (get_fg)
532 color->green = gsty->fg[GTK_STATE_SELECTED].green; 562 gtk_style_context_get_color (gsty, state, &col);
533 color->blue = gsty->fg[GTK_STATE_SELECTED].blue; 563 else
534 color->pixel = gsty->fg[GTK_STATE_SELECTED].pixel; 564 gtk_style_context_get_background_color (gsty, state, &col);
535 success_p = 1; 565
536 } 566 sprintf (buf, "rgbi:%lf/%lf/%lf", col.red, col.green, col.blue);
537 } 567 success_p = XParseColor (FRAME_X_DISPLAY (f), FRAME_X_COLORMAP (f),
568 buf, color);
569#else
570 GtkStyle *gsty = gtk_widget_get_style (FRAME_GTK_WIDGET (f));
571 GdkColor *grgb = get_bg
572 ? &gsty->bg[GTK_STATE_SELECTED]
573 : &gsty->fg[GTK_STATE_SELECTED];
574
575 color->red = grgb->red;
576 color->green = grgb->green;
577 color->blue = grgb->blue;
578 color->pixel = grgb->pixel;
579 success_p = 1;
580#endif
538 581
582 }
583 UNBLOCK_INPUT;
539 return success_p; 584 return success_p;
540} 585}
541 586
@@ -629,7 +674,7 @@ xg_prepare_tooltip (FRAME_PTR f,
629 encoded_string = ENCODE_UTF_8 (string); 674 encoded_string = ENCODE_UTF_8 (string);
630 widget = GTK_WIDGET (x->ttip_lbl); 675 widget = GTK_WIDGET (x->ttip_lbl);
631 gwin = gtk_widget_get_window (GTK_WIDGET (x->ttip_window)); 676 gwin = gtk_widget_get_window (GTK_WIDGET (x->ttip_window));
632 screen = gdk_drawable_get_screen (gwin); 677 screen = gdk_window_get_screen (gwin);
633 settings = gtk_settings_get_for_screen (screen); 678 settings = gtk_settings_get_for_screen (screen);
634 g_object_get (settings, "gtk-enable-tooltips", &tt_enabled, NULL); 679 g_object_get (settings, "gtk-enable-tooltips", &tt_enabled, NULL);
635 if (tt_enabled) 680 if (tt_enabled)
@@ -650,7 +695,7 @@ xg_prepare_tooltip (FRAME_PTR f,
650 gtk_tooltip_set_custom (x->ttip_widget, widget); 695 gtk_tooltip_set_custom (x->ttip_widget, widget);
651 696
652 gtk_tooltip_set_text (x->ttip_widget, SDATA (encoded_string)); 697 gtk_tooltip_set_text (x->ttip_widget, SDATA (encoded_string));
653 gtk_widget_size_request (GTK_WIDGET (x->ttip_window), &req); 698 gtk_widget_get_preferred_size (GTK_WIDGET (x->ttip_window), NULL, &req);
654 if (width) *width = req.width; 699 if (width) *width = req.width;
655 if (height) *height = req.height; 700 if (height) *height = req.height;
656 701
@@ -696,7 +741,7 @@ xg_hide_tooltip (FRAME_PTR f)
696 if (g_object_get_data (G_OBJECT (win), "restore-tt")) 741 if (g_object_get_data (G_OBJECT (win), "restore-tt"))
697 { 742 {
698 GdkWindow *gwin = gtk_widget_get_window (GTK_WIDGET (win)); 743 GdkWindow *gwin = gtk_widget_get_window (GTK_WIDGET (win));
699 GdkScreen *screen = gdk_drawable_get_screen (gwin); 744 GdkScreen *screen = gdk_window_get_screen (gwin);
700 GtkSettings *settings = gtk_settings_get_for_screen (screen); 745 GtkSettings *settings = gtk_settings_get_for_screen (screen);
701 g_object_set (settings, "gtk-enable-tooltips", TRUE, NULL); 746 g_object_set (settings, "gtk-enable-tooltips", TRUE, NULL);
702 } 747 }
@@ -797,7 +842,7 @@ xg_frame_resized (FRAME_PTR f, int pixelwidth, int pixelheight)
797 if (FRAME_GTK_WIDGET (f) && gtk_widget_get_mapped (FRAME_GTK_WIDGET (f))) 842 if (FRAME_GTK_WIDGET (f) && gtk_widget_get_mapped (FRAME_GTK_WIDGET (f)))
798 gdk_window_get_geometry (gtk_widget_get_window (FRAME_GTK_WIDGET (f)), 843 gdk_window_get_geometry (gtk_widget_get_window (FRAME_GTK_WIDGET (f)),
799 0, 0, 844 0, 0,
800 &pixelwidth, &pixelheight, 0); 845 &pixelwidth, &pixelheight);
801 else return; 846 else return;
802 } 847 }
803 848
@@ -910,8 +955,8 @@ xg_win_to_widget (Display *dpy, Window wdesc)
910 955
911 BLOCK_INPUT; 956 BLOCK_INPUT;
912 957
913 gdkwin = gdk_xid_table_lookup_for_display (gdk_x11_lookup_xdisplay (dpy), 958 gdkwin = gdk_x11_window_lookup_for_display (gdk_x11_lookup_xdisplay (dpy),
914 wdesc); 959 wdesc);
915 if (gdkwin) 960 if (gdkwin)
916 { 961 {
917 GdkEvent event; 962 GdkEvent event;
@@ -923,14 +968,29 @@ xg_win_to_widget (Display *dpy, Window wdesc)
923 return gwdesc; 968 return gwdesc;
924} 969}
925 970
926/* Fill in the GdkColor C so that it represents PIXEL. 971/* Set the background of widget W to PIXEL. */
927 W is the widget that color will be used for. Used to find colormap. */
928 972
929static void 973static void
930xg_pix_to_gcolor (GtkWidget *w, long unsigned int pixel, GdkColor *c) 974xg_set_widget_bg (FRAME_PTR f, GtkWidget *w, long unsigned int pixel)
931{ 975{
976#ifdef HAVE_GTK3
977 GdkRGBA bg;
978 XColor xbg;
979 xbg.pixel = pixel;
980 if (XQueryColor (FRAME_X_DISPLAY (f), FRAME_X_COLORMAP (f), &xbg))
981 {
982 bg.red = (double)xbg.red/65536.0;
983 bg.green = (double)xbg.green/65536.0;
984 bg.blue = (double)xbg.blue/65536.0;
985 bg.alpha = 1.0;
986 gtk_widget_override_background_color (w, GTK_STATE_FLAG_NORMAL, &bg);
987 }
988#else
989 GdkColor bg;
932 GdkColormap *map = gtk_widget_get_colormap (w); 990 GdkColormap *map = gtk_widget_get_colormap (w);
933 gdk_colormap_query_color (map, pixel, c); 991 gdk_colormap_query_color (map, pixel, &bg);
992 gtk_widget_modify_bg (FRAME_GTK_WIDGET (f), GTK_STATE_NORMAL, &bg);
993#endif
934} 994}
935 995
936/* Callback called when the gtk theme changes. 996/* Callback called when the gtk theme changes.
@@ -953,6 +1013,28 @@ style_changed_cb (GObject *go,
953 kbd_buffer_store_event (&event); 1013 kbd_buffer_store_event (&event);
954} 1014}
955 1015
1016/* Called when a delete-event occurs on WIDGET. */
1017
1018static gboolean
1019delete_cb (GtkWidget *widget,
1020 GdkEvent *event,
1021 gpointer user_data)
1022{
1023#ifdef HAVE_GTK3
1024 /* The event doesn't arrive in the normal event loop. Send event
1025 here. */
1026 FRAME_PTR f = (FRAME_PTR) user_data;
1027 struct input_event ie;
1028
1029 EVENT_INIT (ie);
1030 ie.kind = DELETE_WINDOW_EVENT;
1031 XSETFRAME (ie.frame_or_window, f);
1032 kbd_buffer_store_event (&ie);
1033#endif
1034
1035 return TRUE;
1036}
1037
956/* Create and set up the GTK widgets for frame F. 1038/* Create and set up the GTK widgets for frame F.
957 Return 0 if creation failed, non-zero otherwise. */ 1039 Return 0 if creation failed, non-zero otherwise. */
958 1040
@@ -962,7 +1044,6 @@ xg_create_frame_widgets (FRAME_PTR f)
962 GtkWidget *wtop; 1044 GtkWidget *wtop;
963 GtkWidget *wvbox, *whbox; 1045 GtkWidget *wvbox, *whbox;
964 GtkWidget *wfixed; 1046 GtkWidget *wfixed;
965 GdkColor bg;
966 GtkRcStyle *style; 1047 GtkRcStyle *style;
967 char *title = 0; 1048 char *title = 0;
968 1049
@@ -1029,7 +1110,7 @@ xg_create_frame_widgets (FRAME_PTR f)
1029 /* Add callback to do nothing on WM_DELETE_WINDOW. The default in 1110 /* Add callback to do nothing on WM_DELETE_WINDOW. The default in
1030 GTK is to destroy the widget. We want Emacs to do that instead. */ 1111 GTK is to destroy the widget. We want Emacs to do that instead. */
1031 g_signal_connect (G_OBJECT (wtop), "delete-event", 1112 g_signal_connect (G_OBJECT (wtop), "delete-event",
1032 G_CALLBACK (gtk_true), 0); 1113 G_CALLBACK (delete_cb), f);
1033 1114
1034 /* Convert our geometry parameters into a geometry string 1115 /* Convert our geometry parameters into a geometry string
1035 and specify it. 1116 and specify it.
@@ -1057,9 +1138,9 @@ xg_create_frame_widgets (FRAME_PTR f)
1057 1138
1058 /* Since GTK clears its window by filling with the background color, 1139 /* Since GTK clears its window by filling with the background color,
1059 we must keep X and GTK background in sync. */ 1140 we must keep X and GTK background in sync. */
1060 xg_pix_to_gcolor (wfixed, FRAME_BACKGROUND_PIXEL (f), &bg); 1141 xg_set_widget_bg (f, wfixed, FRAME_BACKGROUND_PIXEL (f));
1061 gtk_widget_modify_bg (wfixed, GTK_STATE_NORMAL, &bg);
1062 1142
1143#ifndef HAVE_GTK3
1063 /* Also, do not let any background pixmap to be set, this looks very 1144 /* Also, do not let any background pixmap to be set, this looks very
1064 bad as Emacs overwrites the background pixmap with its own idea 1145 bad as Emacs overwrites the background pixmap with its own idea
1065 of background color. */ 1146 of background color. */
@@ -1068,6 +1149,9 @@ xg_create_frame_widgets (FRAME_PTR f)
1068 /* Must use g_strdup because gtk_widget_modify_style does g_free. */ 1149 /* Must use g_strdup because gtk_widget_modify_style does g_free. */
1069 style->bg_pixmap_name[GTK_STATE_NORMAL] = g_strdup ("<none>"); 1150 style->bg_pixmap_name[GTK_STATE_NORMAL] = g_strdup ("<none>");
1070 gtk_widget_modify_style (wfixed, style); 1151 gtk_widget_modify_style (wfixed, style);
1152#else
1153 gtk_widget_set_can_focus (wfixed, TRUE);
1154#endif
1071 1155
1072#ifdef USE_GTK_TOOLTIP 1156#ifdef USE_GTK_TOOLTIP
1073 /* Steal a tool tip window we can move ourselves. */ 1157 /* Steal a tool tip window we can move ourselves. */
@@ -1224,11 +1308,8 @@ xg_set_background_color (FRAME_PTR f, long unsigned int bg)
1224{ 1308{
1225 if (FRAME_GTK_WIDGET (f)) 1309 if (FRAME_GTK_WIDGET (f))
1226 { 1310 {
1227 GdkColor gdk_bg;
1228
1229 BLOCK_INPUT; 1311 BLOCK_INPUT;
1230 xg_pix_to_gcolor (FRAME_GTK_WIDGET (f), bg, &gdk_bg); 1312 xg_set_widget_bg (f, FRAME_GTK_WIDGET (f), FRAME_BACKGROUND_PIXEL (f));
1231 gtk_widget_modify_bg (FRAME_GTK_WIDGET (f), GTK_STATE_NORMAL, &gdk_bg);
1232 UNBLOCK_INPUT; 1313 UNBLOCK_INPUT;
1233 } 1314 }
1234} 1315}
@@ -1240,11 +1321,10 @@ xg_set_background_color (FRAME_PTR f, long unsigned int bg)
1240void 1321void
1241xg_set_frame_icon (FRAME_PTR f, Pixmap icon_pixmap, Pixmap icon_mask) 1322xg_set_frame_icon (FRAME_PTR f, Pixmap icon_pixmap, Pixmap icon_mask)
1242{ 1323{
1243 GdkDisplay *gdpy = gdk_x11_lookup_xdisplay (FRAME_X_DISPLAY (f)); 1324 GdkPixbuf *gp = xg_get_pixbuf_from_pix_and_mask (f,
1244 GdkPixmap *gpix = gdk_pixmap_foreign_new_for_display (gdpy, icon_pixmap); 1325 icon_pixmap,
1245 GdkPixmap *gmask = gdk_pixmap_foreign_new_for_display (gdpy, icon_mask); 1326 icon_mask);
1246 GdkPixbuf *gp = xg_get_pixbuf_from_pix_and_mask (gpix, gmask, NULL); 1327 if (gp)
1247
1248 gtk_window_set_icon (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)), gp); 1328 gtk_window_set_icon (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)), gp);
1249} 1329}
1250 1330
@@ -1381,7 +1461,7 @@ create_dialog (widget_value *wv,
1381 /* Try to make dialog look better. Must realize first so 1461 /* Try to make dialog look better. Must realize first so
1382 the widget can calculate the size it needs. */ 1462 the widget can calculate the size it needs. */
1383 gtk_widget_realize (w); 1463 gtk_widget_realize (w);
1384 gtk_widget_size_request (w, &req); 1464 gtk_widget_get_preferred_size (w, NULL, &req);
1385 gtk_box_set_spacing (wvbox, req.height); 1465 gtk_box_set_spacing (wvbox, req.height);
1386 if (item->value && strlen (item->value) > 0) 1466 if (item->value && strlen (item->value) > 0)
1387 button_spacing = 2*req.width/strlen (item->value); 1467 button_spacing = 2*req.width/strlen (item->value);
@@ -3028,7 +3108,7 @@ menubar_map_cb (GtkWidget *w, gpointer user_data)
3028{ 3108{
3029 GtkRequisition req; 3109 GtkRequisition req;
3030 FRAME_PTR f = (FRAME_PTR) user_data; 3110 FRAME_PTR f = (FRAME_PTR) user_data;
3031 gtk_widget_size_request (w, &req); 3111 gtk_widget_get_preferred_size (w, NULL, &req);
3032 if (FRAME_MENUBAR_HEIGHT (f) != req.height) 3112 if (FRAME_MENUBAR_HEIGHT (f) != req.height)
3033 { 3113 {
3034 FRAME_MENUBAR_HEIGHT (f) = req.height; 3114 FRAME_MENUBAR_HEIGHT (f) = req.height;
@@ -3059,7 +3139,7 @@ xg_update_frame_menubar (FRAME_PTR f)
3059 3139
3060 g_signal_connect (x->menubar_widget, "map", G_CALLBACK (menubar_map_cb), f); 3140 g_signal_connect (x->menubar_widget, "map", G_CALLBACK (menubar_map_cb), f);
3061 gtk_widget_show_all (x->menubar_widget); 3141 gtk_widget_show_all (x->menubar_widget);
3062 gtk_widget_size_request (x->menubar_widget, &req); 3142 gtk_widget_get_preferred_size (x->menubar_widget, NULL, &req);
3063 3143
3064 /* If menu bar doesn't know its height yet, cheat a little so the frame 3144 /* If menu bar doesn't know its height yet, cheat a little so the frame
3065 doesn't jump so much when resized later in menubar_map_cb. */ 3145 doesn't jump so much when resized later in menubar_map_cb. */
@@ -3120,7 +3200,7 @@ xg_event_is_for_menubar (FRAME_PTR f, XEvent *event)
3120 return 0; 3200 return 0;
3121 3201
3122 gdpy = gdk_x11_lookup_xdisplay (FRAME_X_DISPLAY (f)); 3202 gdpy = gdk_x11_lookup_xdisplay (FRAME_X_DISPLAY (f));
3123 gw = gdk_xid_table_lookup_for_display (gdpy, event->xbutton.window); 3203 gw = gdk_x11_window_lookup_for_display (gdpy, event->xbutton.window);
3124 if (! gw) return 0; 3204 if (! gw) return 0;
3125 gevent.any.window = gw; 3205 gevent.any.window = gw;
3126 gwdesc = gtk_get_event_widget (&gevent); 3206 gwdesc = gtk_get_event_widget (&gevent);
@@ -3284,8 +3364,12 @@ xg_create_scroll_bar (FRAME_PTR f,
3284{ 3364{
3285 GtkWidget *wscroll; 3365 GtkWidget *wscroll;
3286 GtkWidget *webox; 3366 GtkWidget *webox;
3287 GtkObject *vadj;
3288 int scroll_id; 3367 int scroll_id;
3368#ifdef HAVE_GTK3
3369 GtkAdjustment *vadj;
3370#else
3371 GtkObject *vadj;
3372#endif
3289 3373
3290 /* Page, step increment values are not so important here, they 3374 /* Page, step increment values are not so important here, they
3291 will be corrected in x_set_toolkit_scroll_bar_thumb. */ 3375 will be corrected in x_set_toolkit_scroll_bar_thumb. */
@@ -3295,7 +3379,9 @@ xg_create_scroll_bar (FRAME_PTR f,
3295 wscroll = gtk_vscrollbar_new (GTK_ADJUSTMENT (vadj)); 3379 wscroll = gtk_vscrollbar_new (GTK_ADJUSTMENT (vadj));
3296 webox = gtk_event_box_new (); 3380 webox = gtk_event_box_new ();
3297 gtk_widget_set_name (wscroll, scroll_bar_name); 3381 gtk_widget_set_name (wscroll, scroll_bar_name);
3382#ifndef HAVE_GTK3
3298 gtk_range_set_update_policy (GTK_RANGE (wscroll), GTK_UPDATE_CONTINUOUS); 3383 gtk_range_set_update_policy (GTK_RANGE (wscroll), GTK_UPDATE_CONTINUOUS);
3384#endif
3299 g_object_set_data (G_OBJECT (wscroll), XG_FRAME_DATA, (gpointer)f); 3385 g_object_set_data (G_OBJECT (wscroll), XG_FRAME_DATA, (gpointer)f);
3300 3386
3301 scroll_id = xg_store_widget_in_map (wscroll); 3387 scroll_id = xg_store_widget_in_map (wscroll);
@@ -3793,8 +3879,8 @@ xg_tool_bar_detach_callback (GtkHandleBox *wbox,
3793 { 3879 {
3794 GtkRequisition req, req2; 3880 GtkRequisition req, req2;
3795 FRAME_X_OUTPUT (f)->toolbar_detached = 1; 3881 FRAME_X_OUTPUT (f)->toolbar_detached = 1;
3796 gtk_widget_size_request (GTK_WIDGET (wbox), &req); 3882 gtk_widget_get_preferred_size (GTK_WIDGET (wbox), NULL, &req);
3797 gtk_widget_size_request (w, &req2); 3883 gtk_widget_get_preferred_size (w, NULL, &req2);
3798 req.width -= req2.width; 3884 req.width -= req2.width;
3799 req.height -= req2.height; 3885 req.height -= req2.height;
3800 if (FRAME_TOOLBAR_TOP_HEIGHT (f) != 0) 3886 if (FRAME_TOOLBAR_TOP_HEIGHT (f) != 0)
@@ -3828,8 +3914,8 @@ xg_tool_bar_attach_callback (GtkHandleBox *wbox,
3828 { 3914 {
3829 GtkRequisition req, req2; 3915 GtkRequisition req, req2;
3830 FRAME_X_OUTPUT (f)->toolbar_detached = 0; 3916 FRAME_X_OUTPUT (f)->toolbar_detached = 0;
3831 gtk_widget_size_request (GTK_WIDGET (wbox), &req); 3917 gtk_widget_get_preferred_size (GTK_WIDGET (wbox), NULL, &req);
3832 gtk_widget_size_request (w, &req2); 3918 gtk_widget_get_preferred_size (w, NULL, &req2);
3833 req.width += req2.width; 3919 req.width += req2.width;
3834 req.height += req2.height; 3920 req.height += req2.height;
3835 if (FRAME_TOOLBAR_TOP_HEIGHT (f) != 0) 3921 if (FRAME_TOOLBAR_TOP_HEIGHT (f) != 0)
@@ -3894,6 +3980,7 @@ xg_tool_bar_help_callback (GtkWidget *w,
3894 3980
3895 Returns FALSE to tell GTK to keep processing this event. */ 3981 Returns FALSE to tell GTK to keep processing this event. */
3896 3982
3983#ifndef HAVE_GTK3
3897static gboolean 3984static gboolean
3898xg_tool_bar_item_expose_callback (GtkWidget *w, 3985xg_tool_bar_item_expose_callback (GtkWidget *w,
3899 GdkEventExpose *event, 3986 GdkEventExpose *event,
@@ -3902,7 +3989,6 @@ xg_tool_bar_item_expose_callback (GtkWidget *w,
3902 gint width, height; 3989 gint width, height;
3903 3990
3904 gdk_drawable_get_size (event->window, &width, &height); 3991 gdk_drawable_get_size (event->window, &width, &height);
3905
3906 event->area.x -= width > event->area.width ? width-event->area.width : 0; 3992 event->area.x -= width > event->area.width ? width-event->area.width : 0;
3907 event->area.y -= height > event->area.height ? height-event->area.height : 0; 3993 event->area.y -= height > event->area.height ? height-event->area.height : 0;
3908 3994
@@ -3914,6 +4000,7 @@ xg_tool_bar_item_expose_callback (GtkWidget *w,
3914 4000
3915 return FALSE; 4001 return FALSE;
3916} 4002}
4003#endif
3917 4004
3918#ifdef HAVE_GTK_ORIENTABLE_SET_ORIENTATION 4005#ifdef HAVE_GTK_ORIENTABLE_SET_ORIENTATION
3919#define toolbar_set_orientation(w, o) \ 4006#define toolbar_set_orientation(w, o) \
@@ -4063,13 +4150,14 @@ xg_make_tool_item (FRAME_PTR f,
4063 4150
4064 g_object_set_data (G_OBJECT (weventbox), XG_FRAME_DATA, (gpointer)f); 4151 g_object_set_data (G_OBJECT (weventbox), XG_FRAME_DATA, (gpointer)f);
4065 4152
4153#ifndef HAVE_GTK3
4066 /* Catch expose events to overcome an annoying redraw bug, see 4154 /* Catch expose events to overcome an annoying redraw bug, see
4067 comment for xg_tool_bar_item_expose_callback. */ 4155 comment for xg_tool_bar_item_expose_callback. */
4068 g_signal_connect (G_OBJECT (ti), 4156 g_signal_connect (G_OBJECT (ti),
4069 "expose-event", 4157 "expose-event",
4070 G_CALLBACK (xg_tool_bar_item_expose_callback), 4158 G_CALLBACK (xg_tool_bar_item_expose_callback),
4071 0); 4159 0);
4072 4160#endif
4073 gtk_tool_item_set_homogeneous (ti, FALSE); 4161 gtk_tool_item_set_homogeneous (ti, FALSE);
4074 4162
4075 /* Callback to save modifyer mask (Shift/Control, etc). GTK makes 4163 /* Callback to save modifyer mask (Shift/Control, etc). GTK makes
@@ -4153,7 +4241,7 @@ xg_update_tool_bar_sizes (FRAME_PTR f)
4153 GtkRequisition req; 4241 GtkRequisition req;
4154 int nl = 0, nr = 0, nt = 0, nb = 0; 4242 int nl = 0, nr = 0, nt = 0, nb = 0;
4155 4243
4156 gtk_widget_size_request (GTK_WIDGET (x->handlebox_widget), &req); 4244 gtk_widget_get_preferred_size (GTK_WIDGET (x->handlebox_widget), NULL, &req);
4157 if (x->toolbar_in_hbox) 4245 if (x->toolbar_in_hbox)
4158 { 4246 {
4159 int pos; 4247 int pos;
@@ -4203,7 +4291,6 @@ update_frame_tool_bar (FRAME_PTR f)
4203 GtkToolItem *ti; 4291 GtkToolItem *ti;
4204 GtkTextDirection dir; 4292 GtkTextDirection dir;
4205 int pack_tool_bar = x->handlebox_widget == NULL; 4293 int pack_tool_bar = x->handlebox_widget == NULL;
4206
4207 Lisp_Object style; 4294 Lisp_Object style;
4208 int text_image, horiz; 4295 int text_image, horiz;
4209 4296
@@ -4551,13 +4638,13 @@ xg_initialize (void)
4551 /* Make dialogs close on C-g. Since file dialog inherits from 4638 /* Make dialogs close on C-g. Since file dialog inherits from
4552 dialog, this works for them also. */ 4639 dialog, this works for them also. */
4553 binding_set = gtk_binding_set_by_class (g_type_class_ref (GTK_TYPE_DIALOG)); 4640 binding_set = gtk_binding_set_by_class (g_type_class_ref (GTK_TYPE_DIALOG));
4554 gtk_binding_entry_add_signal (binding_set, GDK_g, GDK_CONTROL_MASK, 4641 gtk_binding_entry_add_signal (binding_set, GDK_KEY_g, GDK_CONTROL_MASK,
4555 "close", 0); 4642 "close", 0);
4556 4643
4557 /* Make menus close on C-g. */ 4644 /* Make menus close on C-g. */
4558 binding_set = gtk_binding_set_by_class (g_type_class_ref 4645 binding_set = gtk_binding_set_by_class (g_type_class_ref
4559 (GTK_TYPE_MENU_SHELL)); 4646 (GTK_TYPE_MENU_SHELL));
4560 gtk_binding_entry_add_signal (binding_set, GDK_g, GDK_CONTROL_MASK, 4647 gtk_binding_entry_add_signal (binding_set, GDK_KEY_g, GDK_CONTROL_MASK,
4561 "cancel", 0); 4648 "cancel", 0);
4562} 4649}
4563 4650
diff --git a/src/xmenu.c b/src/xmenu.c
index 934db0f0406..8967437a376 100644
--- a/src/xmenu.c
+++ b/src/xmenu.c
@@ -1390,7 +1390,7 @@ menu_position_func (GtkMenu *menu, gint *x, gint *y, gboolean *push_in, gpointer
1390 1390
1391 /* Check if there is room for the menu. If not, adjust x/y so that 1391 /* Check if there is room for the menu. If not, adjust x/y so that
1392 the menu is fully visible. */ 1392 the menu is fully visible. */
1393 gtk_widget_size_request (GTK_WIDGET (menu), &req); 1393 gtk_widget_get_preferred_size (GTK_WIDGET (menu), NULL, &req);
1394 if (data->x + req.width > disp_width) 1394 if (data->x + req.width > disp_width)
1395 *x -= data->x + req.width - disp_width; 1395 *x -= data->x + req.width - disp_width;
1396 if (data->y + req.height > disp_height) 1396 if (data->y + req.height > disp_height)
diff --git a/src/xsmfns.c b/src/xsmfns.c
index 825cec451d9..f3879dbcec0 100644
--- a/src/xsmfns.c
+++ b/src/xsmfns.c
@@ -41,6 +41,10 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
41#include "process.h" 41#include "process.h"
42#include "keyboard.h" 42#include "keyboard.h"
43 43
44#ifndef HAVE_GTK3
45#define gdk_x11_set_sm_client_id(w) gdk_set_sm_client_id (w)
46#endif
47
44/* This is the event used when SAVE_SESSION_EVENT occurs. */ 48/* This is the event used when SAVE_SESSION_EVENT occurs. */
45 49
46static struct input_event emacs_event; 50static struct input_event emacs_event;
@@ -459,7 +463,7 @@ x_session_initialize (struct x_display_info *dpyinfo)
459#ifdef USE_GTK 463#ifdef USE_GTK
460 /* GTK creats a leader window by itself, but we need to tell 464 /* GTK creats a leader window by itself, but we need to tell
461 it about our client_id. */ 465 it about our client_id. */
462 gdk_set_sm_client_id (client_id); 466 gdk_x11_set_sm_client_id (client_id);
463#else 467#else
464 create_client_leader_window (dpyinfo, client_id); 468 create_client_leader_window (dpyinfo, client_id);
465#endif 469#endif
diff --git a/src/xterm.c b/src/xterm.c
index 909b6978f5a..bb792d8b9a7 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -3021,6 +3021,17 @@ XTflash (struct frame *f)
3021 /* Use Gdk routines to draw. This way, we won't draw over scroll bars 3021 /* Use Gdk routines to draw. This way, we won't draw over scroll bars
3022 when the scroll bars and the edit widget share the same X window. */ 3022 when the scroll bars and the edit widget share the same X window. */
3023 GdkWindow *window = gtk_widget_get_window (FRAME_GTK_WIDGET (f)); 3023 GdkWindow *window = gtk_widget_get_window (FRAME_GTK_WIDGET (f));
3024#ifdef HAVE_GTK3
3025 cairo_t *cr = gdk_cairo_create (window);
3026 cairo_set_source_rgb (cr, 1, 1, 1);
3027 cairo_set_operator (cr, CAIRO_OPERATOR_DIFFERENCE);
3028#define XFillRectangle(d, win, gc, x, y, w, h) \
3029 do { \
3030 cairo_rectangle (cr, x, y, w, h); \
3031 cairo_fill (cr); \
3032 } \
3033 while (0)
3034#else /* ! HAVE_GTK3 */
3024 GdkGCValues vals; 3035 GdkGCValues vals;
3025 GdkGC *gc; 3036 GdkGC *gc;
3026 vals.foreground.pixel = (FRAME_FOREGROUND_PIXEL (f) 3037 vals.foreground.pixel = (FRAME_FOREGROUND_PIXEL (f)
@@ -3030,7 +3041,8 @@ XTflash (struct frame *f)
3030 &vals, GDK_GC_FUNCTION | GDK_GC_FOREGROUND); 3041 &vals, GDK_GC_FUNCTION | GDK_GC_FOREGROUND);
3031#define XFillRectangle(d, win, gc, x, y, w, h) \ 3042#define XFillRectangle(d, win, gc, x, y, w, h) \
3032 gdk_draw_rectangle (window, gc, TRUE, x, y, w, h) 3043 gdk_draw_rectangle (window, gc, TRUE, x, y, w, h)
3033#else 3044#endif /* ! HAVE_GTK3 */
3045#else /* ! USE_GTK */
3034 GC gc; 3046 GC gc;
3035 3047
3036 /* Create a GC that will use the GXxor function to flip foreground 3048 /* Create a GC that will use the GXxor function to flip foreground
@@ -3151,7 +3163,11 @@ XTflash (struct frame *f)
3151 width, height - 2 * FRAME_INTERNAL_BORDER_WIDTH (f)); 3163 width, height - 2 * FRAME_INTERNAL_BORDER_WIDTH (f));
3152 3164
3153#ifdef USE_GTK 3165#ifdef USE_GTK
3166#ifdef HAVE_GTK3
3167 cairo_destroy (cr);
3168#else
3154 g_object_unref (G_OBJECT (gc)); 3169 g_object_unref (G_OBJECT (gc));
3170#endif
3155#undef XFillRectangle 3171#undef XFillRectangle
3156#else 3172#else
3157 XFreeGC (FRAME_X_DISPLAY (f), gc); 3173 XFreeGC (FRAME_X_DISPLAY (f), gc);
@@ -9863,6 +9879,13 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name)
9863 9879
9864 XSetLocaleModifiers (""); 9880 XSetLocaleModifiers ("");
9865 9881
9882 /* Emacs can only handle core input events, so make sure
9883 Gtk doesn't use Xinput or Xinput2 extensions. */
9884 {
9885 static char fix_events[] = "GDK_CORE_DEVICE_EVENTS=1";
9886 putenv (fix_events);
9887 }
9888
9866 /* Work around GLib bug that outputs a faulty warning. See 9889 /* Work around GLib bug that outputs a faulty warning. See
9867 https://bugzilla.gnome.org/show_bug.cgi?id=563627. */ 9890 https://bugzilla.gnome.org/show_bug.cgi?id=563627. */
9868 id = g_log_set_handler ("GLib", G_LOG_LEVEL_WARNING | G_LOG_FLAG_FATAL 9891 id = g_log_set_handler ("GLib", G_LOG_LEVEL_WARNING | G_LOG_FLAG_FATAL
@@ -9874,11 +9897,12 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name)
9874 fixup_locale (); 9897 fixup_locale ();
9875 xg_initialize (); 9898 xg_initialize ();
9876 9899
9877 dpy = GDK_DISPLAY (); 9900 dpy = DEFAULT_GDK_DISPLAY ();
9878 9901
9879 /* NULL window -> events for all windows go to our function */ 9902 /* NULL window -> events for all windows go to our function */
9880 gdk_window_add_filter (NULL, event_handler_gdk, NULL); 9903 gdk_window_add_filter (NULL, event_handler_gdk, NULL);
9881 9904
9905#if GTK_MAJOR_VERSION <= 2 && GTK_MINOR_VERSION <= 90
9882 /* Load our own gtkrc if it exists. */ 9906 /* Load our own gtkrc if it exists. */
9883 { 9907 {
9884 const char *file = "~/.emacs.d/gtkrc"; 9908 const char *file = "~/.emacs.d/gtkrc";
@@ -9890,6 +9914,7 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name)
9890 if (! NILP (abs_file) && !NILP (Ffile_readable_p (abs_file))) 9914 if (! NILP (abs_file) && !NILP (Ffile_readable_p (abs_file)))
9891 gtk_rc_parse (SSDATA (abs_file)); 9915 gtk_rc_parse (SSDATA (abs_file));
9892 } 9916 }
9917#endif
9893 9918
9894 XSetErrorHandler (x_error_handler); 9919 XSetErrorHandler (x_error_handler);
9895 XSetIOErrorHandler (x_io_error_quitter); 9920 XSetIOErrorHandler (x_io_error_quitter);
diff --git a/src/xterm.h b/src/xterm.h
index 48d68557796..ee17cfe2bd5 100644
--- a/src/xterm.h
+++ b/src/xterm.h
@@ -675,9 +675,20 @@ enum
675#define gtk_adjustment_get_upper(w) ((w)->upper) 675#define gtk_adjustment_get_upper(w) ((w)->upper)
676#endif 676#endif
677 677
678#ifdef HAVE_GTK3
679#define DEFAULT_GDK_DISPLAY() \
680 gdk_x11_display_get_xdisplay (gdk_display_get_default ())
681#else
682#undef GDK_WINDOW_XID
683#define GDK_WINDOW_XID(w) GDK_WINDOW_XWINDOW (w)
684#define DEFAULT_GDK_DISPLAY() GDK_DISPLAY ()
685#define gtk_widget_get_preferred_size(a, ign, b) \
686 gtk_widget_size_request(a, b)
687#endif
688
678#define GTK_WIDGET_TO_X_WIN(w) \ 689#define GTK_WIDGET_TO_X_WIN(w) \
679 ((w) && gtk_widget_get_window (w) \ 690 ((w) && gtk_widget_get_window (w) \
680 ? GDK_WINDOW_XWINDOW (gtk_widget_get_window (w)) : 0) 691 ? GDK_WINDOW_XID (gtk_widget_get_window (w)) : 0)
681 692
682#define FRAME_GTK_OUTER_WIDGET(f) ((f)->output_data.x->widget) 693#define FRAME_GTK_OUTER_WIDGET(f) ((f)->output_data.x->widget)
683#define FRAME_GTK_WIDGET(f) ((f)->output_data.x->edit_widget) 694#define FRAME_GTK_WIDGET(f) ((f)->output_data.x->edit_widget)