From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: ludo@gnu.org (Ludovic =?iso-8859-1?Q?Court=E8s?=) Newsgroups: gmane.lisp.guile.bugs,gmane.lisp.guile.devel Subject: Re: Guile with win32 cross compiling Date: Sun, 24 Apr 2011 22:22:25 +0200 Message-ID: <87r58rpfge.fsf@gnu.org> References: <20110326220651.GA8300@flap> <20110401185020.GC13643@flap> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: dough.gmane.org 1303676579 14199 80.91.229.12 (24 Apr 2011 20:22:59 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 24 Apr 2011 20:22:59 +0000 (UTC) Cc: guile-devel@gnu.org To: bug-guile@gnu.org Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Sun Apr 24 22:22:51 2011 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QE5pR-0001HK-3w for guile-bugs@m.gmane.org; Sun, 24 Apr 2011 22:22:49 +0200 Original-Received: from localhost ([::1]:40651 helo=lists2.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QE5pQ-0002WQ-Bw for guile-bugs@m.gmane.org; Sun, 24 Apr 2011 16:22:48 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:35748) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QE5pN-0002WI-Lj for bug-guile@gnu.org; Sun, 24 Apr 2011 16:22:46 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QE5pM-0003Bj-8B for bug-guile@gnu.org; Sun, 24 Apr 2011 16:22:45 -0400 Original-Received: from lo.gmane.org ([80.91.229.12]:38880) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QE5pL-0003BC-Pn for bug-guile@gnu.org; Sun, 24 Apr 2011 16:22:44 -0400 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1QE5pJ-0001EM-GW for bug-guile@gnu.org; Sun, 24 Apr 2011 22:22:41 +0200 Original-Received: from reverse-83.fdn.fr ([80.67.176.83]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 24 Apr 2011 22:22:41 +0200 Original-Received: from ludo by reverse-83.fdn.fr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 24 Apr 2011 22:22:41 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Followup-To: gmane.lisp.guile.bugs Original-Lines: 73 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: reverse-83.fdn.fr X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 5 =?iso-8859-1?Q?Flor=E9al?= an 219 de la =?iso-8859-1?Q?R=E9volution?= X-PGP-Key-ID: 0xEA52ECF4 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 83C4 F8E5 10A3 3B4C 5BEA D15D 77DD 95E2 EA52 ECF4 X-OS: x86_64-unknown-linux-gnu User-Agent: Gnus/5.110015 (No Gnus v0.15) Emacs/23.3 (gnu/linux) Cancel-Lock: sha1:XYSvIX9Wy5iNfVOz2KSVRZyOsKs= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 80.91.229.12 X-BeenThere: bug-guile@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Original-Sender: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.bugs:5515 gmane.lisp.guile.devel:12329 Archived-At: Hi, Andy Wingo writes: > From b03f8337ea62091208680fab901606c9af360a5d Mon Sep 17 00:00:00 2001 > From: Andy Wingo > Date: Tue, 12 Apr 2011 13:12:56 +0200 > Subject: [PATCH] check for iconveh values at configure-time > > * configure.ac: Check for the iconveh values here, instead of relying on > gen-scmconfig to know them. That doesn't work in general because > gen-scmconfig runs on the build machine, not the target machine. > > * libguile/Makefile.am (gen-scmconfig.$(OBJEXT)): Revert rule to the > revision before 533d8212. > > * libguile/gen-scmconfig.h.in (SCM_I_GSC_ICONVEH_ERROR): > (SCM_I_GSC_ICONVEH_QUESTION_MARK): > (SCM_I_GSC_ICONVEH_ESCAPE_SEQUENCE): > * libguile/gen-scmconfig.c: Use configure-time substitutions to set > SCM_ICONVEH_ERROR_HANDLER et al. Nice! > #-------------------------------------------------------------------- > # > +# What values do the iconv error handlers have? > +# > +# The only place that we need iconv in our public interfaces is for > +# the error handlers, which are just ints. So we weaken our > +# dependency by looking up those values at configure-time. > +#-------------------------------------------------------------------- > +SCM_I_GSC_ICONVEH_ERROR=0 > +SCM_I_GSC_ICONVEH_QUESTION_MARK=1 > +SCM_I_GSC_ICONVEH_ESCAPE_SEQUENCE=2 > +AC_MSG_CHECKING([for iconveh_error]) > +AC_RUN_IFELSE([AC_LANG_SOURCE( > +[AC_INCLUDES_DEFAULT > +#include > +int > +main (int argc, char *argv[]) > +{ > + if (argc > 1) > + printf ("%d\n", (int)iconveh_error); > + return 0; > +}])], > + [SCM_I_GSC_ICONVEH_ERROR=`./conftest$EXEEXT pretty-please` > + AC_MSG_RESULT([$SCM_I_GSC_ICONVEH_ERROR])], > + [AC_MSG_FAILURE([failed to get iconveh_error])], > + [AC_MSG_WARN([assuming $SCM_I_GSC_ICONVEH_ERROR for cross-compilation])]) > + > +AC_MSG_CHECKING([for iconveh_question_mark]) > +AC_RUN_IFELSE([AC_LANG_SOURCE( > +[AC_INCLUDES_DEFAULT > +#include > +int > +main (int argc, char *argv[]) > +{ > + if (argc > 1) > + printf ("%d\n", (int)iconveh_question_mark); > + return 0; > +}])], > + [SCM_I_GSC_ICONVEH_QUESTION_MARK=`./conftest$EXEEXT pretty-please` > + AC_MSG_RESULT([$SCM_I_GSC_ICONVEH_QUESTION_MARK])], > + [AC_MSG_FAILURE([failed to get iconveh_question_mark])], > + [AC_MSG_WARN([assuming $SCM_I_GSC_ICONVEH_QUESTION_MARK for cross-compilation])]) Looks good to me. Could you factor it into an M4 macro, use AC_CACHE_CHECK, and move that to acinclude.m4? Thanks! Ludo’.