delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/11/03/21:55:30

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-ID: <418999E4.9010206@users.sourceforge.net>
Date: Wed, 03 Nov 2004 21:54:28 -0500
From: Yaakov Selkowitz <yselkowitz AT users DOT sourceforge DOT net>
User-Agent: Mozilla Thunderbird 0.8 (Windows/20040913)
MIME-Version: 1.0
To: cygwin-apps AT cygwin DOT com, cygwin AT cygwin DOT com
Subject: Re: don't use AC_FUNC_MMAP, use AC_CHECK_FUNCS(mmap) instead.
References: <41711A33 DOT 20207 AT familiehaase DOT de> <41711EC2 DOT 5080305 AT familiehaase DOT de> <4171D6B5 DOT 60107 AT users DOT sourceforge DOT net> <417220BC DOT 1090302 AT familiehaase DOT de>
In-Reply-To: <417220BC.1090302@familiehaase.de>
X-Enigmail-Version: 0.86.1.0
X-Enigmail-Supports: pgp-inline, pgp-mime
X-Authentication-Info: Submitted using SMTP AUTH at out011.verizon.net from [68.161.75.73] at Wed, 3 Nov 2004 20:54:36 -0600

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Gerrit P. Haase wrote:
| Yaakov Selkowitz wrote:
|
|> Gerrit P. Haase wrote:
|> |> AC_CHECK_FUNCS(mmap) issues this:
|> |> checking for mmap... yes
|> |>
|> |> This is what I will using now for all the GNOME packages, there are
|> |> several packages affected, so far I know of:
|> |> - libgtop
|> |> - gtk+
|> |> - libgnomeprint
|> |> - libgsf
|>
|> Actually, looking again at my libgnomeprint22 package, I already had
|> manually patched the few places that needed mmap (i.e.
|> #if defined(HAVE_MMAP) || defined(__CYGWIN__)
|> ) due to build errors.  I'll have to look at libgsf though.
|>
|> |> I think it just tries to link against the system library and it
|> |> succeeds, so mmap() is considered to be available.  Fine with me.
|> |>
|> |> Using the macro AC_FUNC_MMAP, the test fails and mmap() will not be
|> |> available.
|> |
|> | BTW, it looks like this in configure.ac:
|> | case "$host" in
|> |   *cygwin*)
|> |     AC_CHECK_FUNCS(mmap)
|> |     ;;
|> |   *)
|> |     AC_FUNC_MMAP
|> |     ;;
|> | esac
|>
|> Thanks for the tip.  But how does that define HAVE_MMAP?  And what about
|> fixing AC_FUNC_MMAP itself?

Well, I did think of the following solution:

case "$host" in
~  *-*-cygwin*)
~        ac_cv_func_mmap_fixed_mapped=yes
~        AC_DEFINE(HAVE_MMAP, 1,
~                [Define to 1 if you have a working `mmap' system call.])
~        ;;
~  *)
~        AC_FUNC_MMAP
~        ;;
esac

That should do everything that a successful AC_FUNC_MMAP test would do,
I think.  Sure better than patching code ifdefs in a dozen places.

| I don't know how, maybe it doesn't do it, I'm not sure, at least it is
| so in GMP, but this is very special.  Better fix AC_FUNC_MMAP.
|
| Submit a patch to the Cygwin autoconf maintainer, since there were no
| upstream autoconf releases for years, it needs to be fixed locally at
| first.

Corinna, according to the Cygwin README, autoconf-devel is yours.  As
this has been a problem both here and on the main list, would it be
possible to fix the AC_FUNC_MMAP macro in
/usr/autotool/devel/share/autoconf/autoconf/functions.m4?  This affects
building a LOT of packages.  I suppose using a similar logic to the
above would suffice.  Thank you.


Yaakov
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (Cygwin)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFBiZnipiWmPGlmQSMRAsBPAJwO+R56Ec18NXQjhTQBLTRZZq/5dACePlCX
/giqwlOt9RC9hjocnqKcFcA=
=+nju
-----END PGP SIGNATURE-----


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019