From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Mike Mattie Newsgroups: gmane.emacs.help Subject: Re: How to compile Emacs on Mac OS X with extra libs from MacPorts Date: Sat, 21 Mar 2009 10:04:38 -0700 Message-ID: <20090321170436.GA6362@reforged> References: <999bfc30-b636-4a59-b8fa-1679b0e55be3@d2g2000pra.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="RASg3xLB4tUQ4RcS" X-Trace: ger.gmane.org 1237655133 31015 80.91.229.12 (21 Mar 2009 17:05:33 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 21 Mar 2009 17:05:33 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: an0 Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Mar 21 18:06:50 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Ll4ed-0003RR-79 for geh-help-gnu-emacs@m.gmane.org; Sat, 21 Mar 2009 18:06:39 +0100 Original-Received: from localhost ([127.0.0.1]:53975 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ll4dG-0003k2-MR for geh-help-gnu-emacs@m.gmane.org; Sat, 21 Mar 2009 13:05:14 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Ll4ct-0003jn-8i for help-gnu-emacs@gnu.org; Sat, 21 Mar 2009 13:04:51 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Ll4cn-0003jb-VR for help-gnu-emacs@gnu.org; Sat, 21 Mar 2009 13:04:50 -0400 Original-Received: from [199.232.76.173] (port=56186 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ll4cn-0003jY-O6 for help-gnu-emacs@gnu.org; Sat, 21 Mar 2009 13:04:45 -0400 Original-Received: from wa-out-1112.google.com ([209.85.146.182]:44856) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Ll4cn-0002CD-3F for help-gnu-emacs@gnu.org; Sat, 21 Mar 2009 13:04:45 -0400 Original-Received: by wa-out-1112.google.com with SMTP id j40so855558wah.26 for ; Sat, 21 Mar 2009 10:04:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:references:mime-version:content-type:content-disposition :in-reply-to:user-agent; bh=OKI1/rtDSD4PneCsX//L/gef1jrwKdo5rwgmhTkJJlI=; b=J0BuN9CWbe28nPRDlnPOX9FLoDL6RjwZhLsbg/Sf2Q+0SJ1DYKfKphBfqw7tTOOUaV SPLjzQtp1F8ZFe4tRri2L4mmG6vFZ44hm7xEhdGppbdPTJFLFmznz/lg1z3wBIK9cnku gk4K1/zRGRCz634lzEYIPdJfS3e5g359wH37A= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=iro7VVg1ouvrLTFStWB0+zVtfmU+x6LdQGKhUL3kNfKGKbnI94GDwIZlCAZA7WcOD0 jd01k5b2OkkOu1F+03WfI2+HRzGeui/11yD4ZZHzb/yFwMtOejcrTm2eX/DB+XWxvNZx CuA+kJuAKFUCzhaZV0uD29xEiXBM0uRdQ07JY= Original-Received: by 10.114.144.1 with SMTP id r1mr3399265wad.2.1237655082353; Sat, 21 Mar 2009 10:04:42 -0700 (PDT) Original-Received: from @ (c66-235-1-45.sea2.cablespeed.com [66.235.1.45]) by mx.google.com with ESMTPS id n33sm3325604wag.53.2009.03.21.10.04.40 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 21 Mar 2009 10:04:41 -0700 (PDT) Content-Disposition: inline In-Reply-To: <999bfc30-b636-4a59-b8fa-1679b0e55be3@d2g2000pra.googlegroups.com> User-Agent: Mutt/1.5.16 (2007-06-09) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:63175 Archived-At: --RASg3xLB4tUQ4RcS Content-Type: multipart/mixed; boundary="bg08WKrSYDhXBjb5" Content-Disposition: inline --bg08WKrSYDhXBjb5 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Here is my solution. ymmv. It assumes that emacs cvs/tarball is in a subdir "emacs". As far as getting Emacs to pick up the X11 headers I have never been able t= o build against a pure Apple X11. To get all the right headers I usually install gtk via macports, which fails, but pulls just about all the X headers in the pr= ocess. It's ugly, but it can run when I go to bed, and in the morning building Ema= cs actually works. I hope it helps a bit. On Fri, Mar 20, 2009 at 08:20:27PM -0700, an0 wrote: > I've been using Emacs 23 cvs on Mac OS X, but never succeeded in > compiling it with extra libraries such as jpeg and png which are > installed via MacPorts(MacPorts itself is installed under /opt/ > local/). >=20 > Here is how I configure Emacs before compiling: > PKG_CONFIG_PATH=3D/opt/local/lib/pkgconfig/ CPPFLAGS+=3D'-I/opt/local/ > include' LDFLAGS+=3D'-L/opt/local/lib' ./configure --with-ns --with-jpeg > --with-png >=20 > And here is the summary of configure output: > What operating system and machine description files should Emacs use? > `s/darwin.h' and `m/intel386.h' > What compiler should emacs be built with? gcc -I/opt/ > local/include > Should Emacs use the GNU version of malloc? no > (The GNU allocators don't work with this system configuration.) > Should Emacs use a relocating allocator for buffers? no > Should Emacs use mmap(2) for buffer allocation? no > What window system should Emacs use? nextstep > What toolkit should Emacs use? none > Where do we find X Windows header files? /usr/X11/ > include > Where do we find X Windows libraries? /usr/X11/lib > Does Emacs use -lXaw3d? no > Does Emacs use -lXpm? no > Does Emacs use -ljpeg? no > Does Emacs use -ltiff? no > Does Emacs use a gif library? no > Does Emacs use -lpng? no > Does Emacs use -lrsvg-2? no > Does Emacs use -lgpm? no > Does Emacs use -ldbus? no > Does Emacs use -lfreetype? no > Does Emacs use -lm17n-flt? no > Does Emacs use -lotf? no > Does Emacs use -lxft? no > Does Emacs use toolkit scroll bars? yes >=20 > Have anyone made it on Mac OS X with MacPorts? Any hints are > appreciated. --=20 GnuPG Key: B9012279 is available from HKP server pgp.mit.edu --bg08WKrSYDhXBjb5 Content-Type: application/x-sh Content-Disposition: attachment; filename="configure-emacs.sh" Content-Transfer-Encoding: quoted-printable #! /bin/sh=0A=0A# Darwin uses the old style /usr/X11R6=0A=0Aemacs_cflags=3D= ""=0Aif test -d /usr/X11R6/include ; then=0A emacs_cflags=3D"-I/usr/X11R6/= include/"=0Afi=0A=0A# configure with X, no fancy toolkit crap, straight X. = It is more=0A# portable.=0A=0Aconf=3D"./configure --with-x --with-x-toolki= t=3Dlucid --without-xaw3d --without-toolkit-scrollbars"=0A=0A# get rid of m= ore weird crap=0Aconf=3D"$conf --without-pop --without-sound --without-dbus= "=0A=0A# font rendering is critical=0Aconf=3D"$conf --with-xft --with-freet= ype"=0A=0A# no funky mouse daemon=0Aconf=3D"$conf --without-gpm"=0A=0A# gra= phics formats=0Aconf=3D"$conf --with-png --without-gif --without-jpeg --wit= hout-tiff"=0A=0A# Darwin X11R6 does not have enough headers for a decent co= mpile. The=0A# only way I get it to work is to try and install GTK from mac= ports=0A# which pulls all the X headers. Then use the macports includes.=0A= =0Aif test -d /opt/local/include ; then=0A conf=3D"$conf --x-includes=3D\"= /opt/local/include\""=0Afi=0A=0Aconf=3D"$conf --prefix=3D\"$HOME/system/ins= talled/\""=0Acd emacs=0A=0A# putting the system X11R6 include path in the C= FLAGS variable, and=0A# putting the macports include as the x includes path= allows macports=0A# x11 packages to supersede the system packages.=0A=0Aev= al exec env CFLAGS=3D"$emacs_cflags" $conf=0A --bg08WKrSYDhXBjb5-- --RASg3xLB4tUQ4RcS Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) iEYEABECAAYFAknFHiMACgkQdfRchrkBInnIjACeOscdymxIntdbpD2S8GQeR9zc ETQAnR1HeK6bjD5Kt/3hZT1n0288LH3p =xUMO -----END PGP SIGNATURE----- --RASg3xLB4tUQ4RcS--