emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Configuring Emacs on Windows with autoconf


From: Eli Zaretskii
Subject: Configuring Emacs on Windows with autoconf
Date: Fri, 23 Nov 2012 20:34:52 +0200

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 via email to

[Prev in Thread] Current Thread [Next in Thread]