From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.devel Subject: Re: Configuring Emacs on Windows with autoconf Date: Fri, 23 Nov 2012 12:56:13 -0800 Organization: UCLA Computer Science Department Message-ID: <50AFE2ED.1040006@cs.ucla.edu> References: <83d2z4tbg3.fsf@gnu.org> <50AFCC34.60909@cs.ucla.edu> <83boeot8hh.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1353704180 4591 80.91.229.3 (23 Nov 2012 20:56:20 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 23 Nov 2012 20:56:20 +0000 (UTC) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Nov 23 21:56:32 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Tc0IX-00076m-Dv for ged-emacs-devel@m.gmane.org; Fri, 23 Nov 2012 21:56:29 +0100 Original-Received: from localhost ([::1]:45733 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tc0IM-0001q2-Jq for ged-emacs-devel@m.gmane.org; Fri, 23 Nov 2012 15:56:18 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:35805) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tc0IK-0001nB-4g for emacs-devel@gnu.org; Fri, 23 Nov 2012 15:56:17 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tc0IJ-0007iD-5y for emacs-devel@gnu.org; Fri, 23 Nov 2012 15:56:16 -0500 Original-Received: from smtp.cs.ucla.edu ([131.179.128.62]:57299) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tc0IH-0007i0-P1; Fri, 23 Nov 2012 15:56:13 -0500 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id 06128A60008; Fri, 23 Nov 2012 12:56:13 -0800 (PST) X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu Original-Received: from smtp.cs.ucla.edu ([127.0.0.1]) by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id h7T+x7dragDZ; Fri, 23 Nov 2012 12:56:12 -0800 (PST) Original-Received: from [192.168.1.3] (pool-71-189-154-249.lsanca.fios.verizon.net [71.189.154.249]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id A2A9AA60005; Fri, 23 Nov 2012 12:56:12 -0800 (PST) User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/17.0 Thunderbird/17.0 In-Reply-To: <83boeot8hh.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 131.179.128.62 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:155044 Archived-At: On 11/23/2012 11:38 AM, Eli Zaretskii wrote: > how would configure know to use those > lib/foo.c files for one particular build configuration? Here's a common pattern: gl_FUNC_STRTOUMAX if test $ac_cv_func_strtoumax = no; then AC_LIBOBJ([strtoumax]) gl_PREREQ_STRTOUMAX fi The first macro tests whether strtoumax exists. If it doesn't, the code invokes AC_LIBOBJ to say that lib/strtoumax.o is needed, and invokes gl_PREREQ_STRTOUMAX to configure all the stuff that is needed to compile strtoumax.c. If strtoumax exists, the code doesn't compile strtoumax.c and doesn't do the work necessary to configure it. A different pattern is used when one must replace a function rather than simply provide a substitute when the function is missing.