unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Configuring Emacs on Windows with autoconf
@ 2012-11-23 18:34 Eli Zaretskii
  2012-11-23 19:19 ` Paul Eggert
  0 siblings, 1 reply; 4+ messages in thread
From: Eli Zaretskii @ 2012-11-23 18:34 UTC (permalink / raw)
  To: emacs-devel

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.)



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-11-23 20:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-23 18:34 Configuring Emacs on Windows with autoconf Eli Zaretskii
2012-11-23 19:19 ` Paul Eggert
2012-11-23 19:38   ` Eli Zaretskii
2012-11-23 20:56     ` Paul Eggert

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).