summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Jennings <mej@kainx.org>2005-06-27 00:07:13 +0000
committerMichael Jennings <mej@kainx.org>2005-06-27 00:07:13 +0000
commitf79bf997cf47559f97cec96c2ce39cc98141b2ec (patch)
tree0879adde5104fc3de88d69d07cc725a541fdd9c8
parent80e9c020d442e2c4fef233c89734580e6bc02ac5 (diff)
downloadeterm-f79bf997cf47559f97cec96c2ce39cc98141b2ec.tar.gz
Sun Jun 26 21:05:03 2005 Michael Jennings (mej)
Attempt to fix autogen.sh for Gentoo and Solaris. Detect and avoid E 0.17 faking E 0.16.x's IPC mechanisms. ---------------------------------------------------------------------- SVN revision: 15535
-rw-r--r--ChangeLog6
-rwxr-xr-xautogen.sh8
-rw-r--r--src/e.c27
-rw-r--r--src/startup.c1
-rw-r--r--src/startup.h1
5 files changed, 37 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 4423b44..fa243d6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -5403,3 +5403,9 @@ Tue Jun 14 15:36:09 2005 Michael Jennings (mej)
Added SSE2 support patch thanks to Tres Melton <tres@mindspring.com>
and John Ellson <ellson@research.att.com>.
----------------------------------------------------------------------
+Sun Jun 26 21:05:03 2005 Michael Jennings (mej)
+
+Attempt to fix autogen.sh for Gentoo and Solaris.
+
+Detect and avoid E 0.17 faking E 0.16.x's IPC mechanisms.
+----------------------------------------------------------------------
diff --git a/autogen.sh b/autogen.sh
index c900c4f..c494424 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -49,13 +49,13 @@ done
export LIBTOOLIZE ACLOCAL AUTOCONF AUTOHEADER AUTOMAKE
# Check for existing libast.m4 we can use. Use the local one if not.
-if test ! -f "`$ACLOCAL --print-ac-dir`/libast.m4"; then
- ACLOCAL_FLAGS="-I . $ACLOCAL_FLAGS"
-fi
+#if test ! -f "`$ACLOCAL --print-ac-dir`/libast.m4"; then
+# ACLOCAL_FLAGS="-I . $ACLOCAL_FLAGS"
+#fi
# Run the stuff.
(set -x && $LIBTOOLIZE -c -f)
-(set -x && $ACLOCAL $ACLOCAL_FLAGS)
+(set -x && $ACLOCAL -I . $ACLOCAL_FLAGS)
(set -x && $AUTOCONF)
(set -x && $AUTOHEADER)
(set -x && $AUTOMAKE -a -c)
diff --git a/src/e.c b/src/e.c
index c2b62a1..ed84f0f 100644
--- a/src/e.c
+++ b/src/e.c
@@ -64,7 +64,6 @@ check_for_enlightenment(void)
Window
enl_ipc_get_win(void)
{
-
unsigned char *str = NULL;
Atom prop;
unsigned long num, after;
@@ -75,7 +74,7 @@ enl_ipc_get_win(void)
D_ENL(("Searching for IPC window.\n"));
- if (props[PROP_ENL_COMMS] == None) {
+ if ((props[PROP_ENL_COMMS] == None) || (props[PROP_ENL_VERSION] == None)) {
D_ENL((" -> Enlightenment is not running. You lose!\n"));
return None;
}
@@ -85,6 +84,30 @@ enl_ipc_get_win(void)
XFree(str);
}
if (ipc_win != None) {
+ XGetWindowProperty(Xdisplay, Xroot, props[PROP_ENL_VERSION], 0, 14, False, AnyPropertyType,
+ &prop, &format, &num, &after, &str);
+ if (str) {
+ char *ver, *tmp;
+
+ tmp = strchr((char *) str, ' ');
+ if (tmp) {
+ ver = tmp + 1;
+ tmp = strchr((char *) ver, ' ');
+ if (tmp) {
+ *tmp = 0;
+ }
+
+ /* Make sure the version string is within the acceptable range. */
+ if (SPIF_CMP_IS_LESS(spiftool_version_compare(SPIF_CAST(charptr) str, SPIF_CAST(charptr) "0.16.4"))
+ || SPIF_CMP_IS_GREATER(spiftool_version_compare(SPIF_CAST(charptr) str, SPIF_CAST(charptr) "0.16.999"))) {
+ D_ENL((" -> IPC version string \"%s\" out of range. I'll have to ignore it.\n"));
+ ipc_win = None;
+ }
+ }
+ XFree(str);
+ }
+ }
+ if (ipc_win != None) {
if (!XGetGeometry
(Xdisplay, ipc_win, &dummy_win, &dummy_int, &dummy_int, &dummy_uint, &dummy_uint, &dummy_uint, &dummy_uint)) {
D_ENL((" -> IPC Window property is valid, but the window doesn't exist. I give up!\n"));
diff --git a/src/startup.c b/src/startup.c
index f993b14..8fb6f78 100644
--- a/src/startup.c
+++ b/src/startup.c
@@ -146,6 +146,7 @@ eterm_bootstrap(int argc, char *argv[])
props[PROP_SELECTION_INCR] = XInternAtom(Xdisplay, "INCR", False);
props[PROP_SELECTION_TARGETS] = XInternAtom(Xdisplay, "TARGETS", False);
props[PROP_ENL_COMMS] = XInternAtom(Xdisplay, "ENLIGHTENMENT_COMMS", True);
+ props[PROP_ENL_VERSION] = XInternAtom(Xdisplay, "ENLIGHTENMENT_VERSION", True);
props[PROP_ENL_MSG] = XInternAtom(Xdisplay, "ENL_MSG", False);
props[PROP_DELETE_WINDOW] = XInternAtom(Xdisplay, "WM_DELETE_WINDOW", False);
props[PROP_DND_PROTOCOL] = XInternAtom(Xdisplay, "DndProtocol", False);
diff --git a/src/startup.h b/src/startup.h
index 9358ae8..0fa14d9 100644
--- a/src/startup.h
+++ b/src/startup.h
@@ -98,6 +98,7 @@ enum {
PROP_SELECTION_INCR,
PROP_SELECTION_TARGETS,
PROP_ENL_COMMS,
+ PROP_ENL_VERSION,
PROP_ENL_MSG,
PROP_DELETE_WINDOW,
PROP_DND_PROTOCOL,