"./configure --with-x --without-carbon" on MacOSX

Nozomu Ando <[email protected]> Tue, 9 Jul 2002 17:52:46 +0900
Newsgroups gmane.emacs.macintosh.devel
Message-ID <[email protected]>
--Apple-Mail-1-652926791
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
	charset=US-ASCII;
	format=flowed

Hi,

I had to compile emacs of current CVS tree  with X window support on 
MacOSX. But

	./configure --with-x --without-carbon

did not work. I think there are two problems.

P1. Some symbols conflict between code for X and code for Carbon.
P2. Even when the abobe problem is solved, temacs linked with X dynlib 
cannot unexec.

To solve the problem 1, I made small patch attached to this mail.

I think I cannot solve the problem 2. But there is workaround. e.g.:

	W2a. make directory contains only statically-linked X library.
		% sudo mkdir /usr/X11R6/libstatic
		% cd /usr/X11R6/libstatic
		% sudo ln -s ../lib/lib*.a ../lib/X11 .
	W2b. configure Emacs with the libraries.
		% ./configure --without-carbon --with-x --x-
libraries=/usr/X11R6/libstatic

This emacs on XDarwin also works fine for me.

I hope this helps.

Nozomu Ando

--Apple-Mail-1-652926791
Content-Disposition: attachment;
	filename=emacs_with_x_patch.txt
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
	x-unix-mode=0644;
	name="emacs_with_x_patch.txt"

Index: src/s/darwin.h
===================================================================
RCS file: /cvsroot/emacs/emacs/src/s/darwin.h,v
retrieving revision 1.3
diff -u -r1.3 darwin.h
--- src/s/darwin.h	1 Jul 2002 23:30:21 -0000	1.3
+++ src/s/darwin.h	9 Jul 2002 08:21:26 -0000
@@ -40,8 +40,10 @@
 /* MAC_OS is used to conditionally compile code common to both MAC_OS8
    and MAC_OSX.  */
 #ifdef MAC_OSX
+#ifdef HAVE_CARBON
 #define MAC_OS
 #endif
+#endif
 
 /* SYSTEM_TYPE should indicate the kind of system you are using.
  It sets the Lisp variable system-type.  */
@@ -222,7 +224,9 @@
 #define HAVE_SOCKETS
 
 /* Extra initialization calls in main for Mac OS X system type.  */
+#ifdef HAVE_CARBON
 #define SYMS_SYSTEM syms_of_mac()
+#endif
 
 /* Definitions for how to dump.  Copied from nextstep.h.  */
 
@@ -271,7 +275,9 @@
 
 /* Tell src/Makefile.in to create files in the Mac OS X application
    bundle mac/Emacs.app.  */
+#ifdef HAVE_CARBON
 #define OTHER_FILES macosx-app
+#endif
 
 
 /* Define the following so emacs symbols will not conflict with those

--Apple-Mail-1-652926791--



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Stuff, things, and much much more.
http://thinkgeek.com/sf