unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: emacs-devel@gnu.org
Subject: Configuring Emacs on Windows with autoconf
Date: Fri, 23 Nov 2012 20:34:52 +0200	[thread overview]
Message-ID: <83d2z4tbg3.fsf@gnu.org> (raw)

I need help from the autoconf experts here.

I'm trying to configure Emacs for Windows using the configure script
(modified to DTRT for the MinGW build).  The problem I face is how to
get configure.ac to produce correct results for library functions
implemented in Emacs sources, or shadowed by sys_FOO functions.  The
goal is to provide the necessary HAVE_FOO macros and prevent configure
from linking replacements (from lib/ and sysdep) where an
implementation already exists.

I could simply do something like what this does for Cygwin:

  case $opsys in
    cygwin)
      AC_DEFINE(G_SLICE_ALWAYS_MALLOC, 1, [Define to set the
	G_SLICE environment variable to "always-malloc" at startup, if
	using GTK.])
      ;;

IOW, simply unconditionally define by hand all those HAVE_FOO macros
for which the implementation is in Emacs itself, and similarly for the
various ac_cv_func_FOO variables that control whether gnulib
replacements are used.  But I wonder whether there's a better
alternative.

(I already considered the possibility of adding to gnulib the code
which implements in Emacs the missing or faulty library functions in
the Windows runtime.  My conclusion was that this would be a very
large job, since the implementations we have in Emacs are almost
always not general enough to be pushed into gnulib, and also depend
internally on some Emacs-only facilities.  So I'd like for now not to
go that way.)

TIA.

P.S.  This is the first time I do something half-serious in autoconf,
and I must say that its manual is grossly inadequate: too abstract,
with vague language, and too few examples.  It makes me frequently
try-and-err.  (Yes, I know this is not the right place to complain
about autoconf; just letting off some steam.)



             reply	other threads:[~2012-11-23 18:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-23 18:34 Eli Zaretskii [this message]
2012-11-23 19:19 ` Configuring Emacs on Windows with autoconf Paul Eggert
2012-11-23 19:38   ` Eli Zaretskii
2012-11-23 20:56     ` Paul Eggert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83d2z4tbg3.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).