aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaroly Lorentey2007-02-24 20:29:24 +0000
committerKaroly Lorentey2007-02-24 20:29:24 +0000
commitfa1b1007cac59bafd16df7bd501ef2591dd77d62 (patch)
tree5dd11da1e3c6d33ae64f62f06f2f2047edc93139
parent6baa22c1ac97113e597cee93abb607463378af0d (diff)
downloademacs-fa1b1007cac59bafd16df7bd501ef2591dd77d62.tar.gz
emacs-fa1b1007cac59bafd16df7bd501ef2591dd77d62.zip
Re-enable GTK multidisplay support.
* configure.in (HAVE_GTK_MULTIDISPLAY): Remove override. * configure: Regenerate. * xterm.c (x_term_init): Reword error string for GTK. git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-598
-rwxr-xr-xconfigure102
-rw-r--r--configure.in13
-rw-r--r--src/xterm.c7
3 files changed, 107 insertions, 15 deletions
diff --git a/configure b/configure
index 0d3a98c8a14..2374219b45c 100755
--- a/configure
+++ b/configure
@@ -11106,7 +11106,107 @@ _ACEOF
11106 with_toolkit_scroll_bars=yes 11106 with_toolkit_scroll_bars=yes
11107 fi 11107 fi
11108 11108
11109 HAVE_GTK_MULTIDISPLAY=no 11109
11110for ac_func in gdk_display_open
11111do
11112as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11113{ echo "$as_me:$LINENO: checking for $ac_func" >&5
11114echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
11115if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
11116 echo $ECHO_N "(cached) $ECHO_C" >&6
11117else
11118 cat >conftest.$ac_ext <<_ACEOF
11119/* confdefs.h. */
11120_ACEOF
11121cat confdefs.h >>conftest.$ac_ext
11122cat >>conftest.$ac_ext <<_ACEOF
11123/* end confdefs.h. */
11124/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
11125 For example, HP-UX 11i <limits.h> declares gettimeofday. */
11126#define $ac_func innocuous_$ac_func
11127
11128/* System header to define __stub macros and hopefully few prototypes,
11129 which can conflict with char $ac_func (); below.
11130 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11131 <limits.h> exists even on freestanding compilers. */
11132
11133#ifdef __STDC__
11134# include <limits.h>
11135#else
11136# include <assert.h>
11137#endif
11138
11139#undef $ac_func
11140
11141/* Override any GCC internal prototype to avoid an error.
11142 Use char because int might match the return type of a GCC
11143 builtin and then its argument prototype would still apply. */
11144#ifdef __cplusplus
11145extern "C"
11146#endif
11147char $ac_func ();
11148/* The GNU C library defines this for functions which it implements
11149 to always fail with ENOSYS. Some functions are actually named
11150 something starting with __ and the normal name is an alias. */
11151#if defined __stub_$ac_func || defined __stub___$ac_func
11152choke me
11153#endif
11154
11155int
11156main ()
11157{
11158return $ac_func ();
11159 ;
11160 return 0;
11161}
11162_ACEOF
11163rm -f conftest.$ac_objext conftest$ac_exeext
11164if { (ac_try="$ac_link"
11165case "(($ac_try" in
11166 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11167 *) ac_try_echo=$ac_try;;
11168esac
11169eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11170 (eval "$ac_link") 2>conftest.er1
11171 ac_status=$?
11172 grep -v '^ *+' conftest.er1 >conftest.err
11173 rm -f conftest.er1
11174 cat conftest.err >&5
11175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11176 (exit $ac_status); } && {
11177 test -z "$ac_c_werror_flag" ||
11178 test ! -s conftest.err
11179 } && test -s conftest$ac_exeext &&
11180 $as_test_x conftest$ac_exeext; then
11181 eval "$as_ac_var=yes"
11182else
11183 echo "$as_me: failed program was:" >&5
11184sed 's/^/| /' conftest.$ac_ext >&5
11185
11186 eval "$as_ac_var=no"
11187fi
11188
11189rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11190 conftest$ac_exeext conftest.$ac_ext
11191fi
11192ac_res=`eval echo '${'$as_ac_var'}'`
11193 { echo "$as_me:$LINENO: result: $ac_res" >&5
11194echo "${ECHO_T}$ac_res" >&6; }
11195if test `eval echo '${'$as_ac_var'}'` = yes; then
11196 cat >>confdefs.h <<_ACEOF
11197#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11198_ACEOF
11199 HAVE_GTK_MULTIDISPLAY=yes
11200fi
11201done
11202
11203 if test "${HAVE_GTK_MULTIDISPLAY}" = "yes"; then
11204
11205cat >>confdefs.h <<\_ACEOF
11206#define HAVE_GTK_MULTIDISPLAY 1
11207_ACEOF
11208
11209 fi
11110 11210
11111 HAVE_GTK_FILE_SELECTION=no 11211 HAVE_GTK_FILE_SELECTION=no
11112 11212
diff --git a/configure.in b/configure.in
index 2981e8888f0..625faa9f60f 100644
--- a/configure.in
+++ b/configure.in
@@ -2069,14 +2069,11 @@ if test "${with_gtk}" = "yes" || test "$USE_X_TOOLKIT" = "gtk"; then
2069 2069
2070 dnl Check if we can use multiple displays with this GTK version. 2070 dnl Check if we can use multiple displays with this GTK version.
2071 dnl If gdk_display_open exists, assume all others are there also. 2071 dnl If gdk_display_open exists, assume all others are there also.
2072 dnl XXX The multidisplay feature is severely broken in current GTK 2072 AC_CHECK_FUNCS(gdk_display_open, HAVE_GTK_MULTIDISPLAY=yes)
2073 dnl versions. --lorentey 2073 if test "${HAVE_GTK_MULTIDISPLAY}" = "yes"; then
2074 HAVE_GTK_MULTIDISPLAY=no 2074 AC_DEFINE(HAVE_GTK_MULTIDISPLAY, 1,
2075 dnl AC_CHECK_FUNCS(gdk_display_open, HAVE_GTK_MULTIDISPLAY=yes) 2075 [Define to 1 if GTK can handle more than one display.])
2076 dnl if test "${HAVE_GTK_MULTIDISPLAY}" = "yes"; then 2076 fi
2077 dnl AC_DEFINE(HAVE_GTK_MULTIDISPLAY, 1,
2078 dnl [Define to 1 if GTK can handle more than one display.])
2079 dnl fi
2080 2077
2081 dnl Check if we have the old file selection dialog. 2078 dnl Check if we have the old file selection dialog.
2082 dnl If gdk_display_open exists, assume all others are there also. 2079 dnl If gdk_display_open exists, assume all others are there also.
diff --git a/src/xterm.c b/src/xterm.c
index 5810eb14b20..5fb04d8103e 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -10566,13 +10566,8 @@ x_term_init (display_name, xrm_option, resource_name)
10566 than zero, we are probably on GTK 2.0, which can only handle 10566 than zero, we are probably on GTK 2.0, which can only handle
10567 one display. GTK 2.2 or later can handle more than one. */ 10567 one display. GTK 2.2 or later can handle more than one. */
10568 if (xg_display_open (SDATA (display_name), &dpy) < 0) 10568 if (xg_display_open (SDATA (display_name), &dpy) < 0)
10569 error ("Sorry, this version of GTK can only handle one display");
10570#else
10571 /* XXX Unfortunately, multiple display support is severely broken
10572 in recent GTK versions, so HAVE_GTK_MULTIDISPLAY is
10573 unconditionally disabled in configure.in. */
10574 error ("Sorry, multiple display support is broken in current GTK versions");
10575#endif 10569#endif
10570 error ("Sorry, this version of GTK can only handle one display");
10576 } 10571 }
10577 else 10572 else
10578 { 10573 {