From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Freja Nordsiek Newsgroups: gmane.lisp.guile.devel Subject: Re: [PATCH] Add to the 2.1.x branch GUILE_SITE_CCACHE_DIR and GUILE_EXTENSION_DIR Autoconf macros along with needed siteccachdir entry in pkgconfig file Date: Tue, 14 Mar 2017 15:08:47 +0100 Message-ID: References: <878to9s5s9.fsf@pobox.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=001a11468a98ea1e69054ab15dc6 X-Trace: blaine.gmane.org 1489500564 4241 195.159.176.226 (14 Mar 2017 14:09:24 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 14 Mar 2017 14:09:24 +0000 (UTC) Cc: guile-devel@gnu.org To: Andy Wingo Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Tue Mar 14 15:09:15 2017 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cnn8J-0007fw-Im for guile-devel@m.gmane.org; Tue, 14 Mar 2017 15:09:03 +0100 Original-Received: from localhost ([::1]:59673 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cnn8P-0007b4-6k for guile-devel@m.gmane.org; Tue, 14 Mar 2017 10:09:09 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42429) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cnn8B-0007Z3-Nr for guile-devel@gnu.org; Tue, 14 Mar 2017 10:09:01 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cnn86-0008Uk-7r for guile-devel@gnu.org; Tue, 14 Mar 2017 10:08:55 -0400 Original-Received: from mail-wm0-x243.google.com ([2a00:1450:400c:c09::243]:34372) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cnn85-0008UH-Tf for guile-devel@gnu.org; Tue, 14 Mar 2017 10:08:50 -0400 Original-Received: by mail-wm0-x243.google.com with SMTP id u132so15060482wmg.1 for ; Tue, 14 Mar 2017 07:08:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=/EtK8+uPOkthh75WyDxTiPpGxgiC5rlrkR80NcWfHlQ=; b=NASIjyCXileg+eYKuwoK05o1us0kcBOeTjJjKDDnhz0yQQqhNbmLmWf1LVgXAm7Y9K /BiGJY+MqgZ8LHKLj6NFTNIMIQp4D/veARozzOkXVGy31ss/cs0qXGo+t9HgANlANF1x gsv/46XrSx9xAdS2GoMAe1/cqSNUwOpjpVToWFHTCkiVdVlU5oNawQieZ4kFzHj/9TdA 4pegzQB9AHxDfozkKI5YfDDS0vUrj2mlCWDbTuyeQwXkEUgQYKpsmDnyB4VU3u65vJ8F zu0c9IH+o1Z90N0ufJ9fESQzbQQhtt2b8/fCOWSuTnbH6Iux9mKNK62mUtYjChyclC/W apBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=/EtK8+uPOkthh75WyDxTiPpGxgiC5rlrkR80NcWfHlQ=; b=Qmatz8N151lFXljh1WHmc55A0KT2fDAIJ4tv0k8lVIEM/uHiHXIUgf6BIg5hg3LMjF uAB8jTzJilDXKy7qLMvrnEd1xgS6su8kBf1dntl2LeaH7Ren7YxU5jRdvT7+xp0LzFUr nwJO5c/S+cKw8MDHZFKYMvzSK+zsPpvQFrhx9NM287XsNKe9m/IW8HlanzTfUhA9+zSt Cn1z83f0CwKSM4nYJA4xnmH6X67kCS9LZqRsvO6nMZsW7zO72g5PM54cRTi+e6uFbC+X EcPj8Dim66UkqG1FytLdsfXwK+bqlkY+rmUiIPxxtntdcUTfg1gbbc1VGPYoUhJ5FX7g +5Tw== X-Gm-Message-State: AFeK/H2+ACtG/VRjQ6/LfvTkKAigW2127e1YDTIkSOzVq2kpgbFOl7i4pynyIZ4CVBdrVsfL0m+RQYlBFb9Hxg== X-Received: by 10.28.143.84 with SMTP id r81mr14453876wmd.14.1489500528830; Tue, 14 Mar 2017 07:08:48 -0700 (PDT) Original-Received: by 10.28.234.73 with HTTP; Tue, 14 Mar 2017 07:08:47 -0700 (PDT) In-Reply-To: <878to9s5s9.fsf@pobox.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:400c:c09::243 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: "guile-devel" Xref: news.gmane.org gmane.lisp.guile.devel:19043 Archived-At: --001a11468a98ea1e69054ab15dc6 Content-Type: text/plain; charset=UTF-8 I coalesced the new macros into the existing GUILE_SITE_DIR macro, though I had to change a few things as will be explained. It works on Guile 2.1.x, 2.0.x, and 1.8.x. I changed it so that if the directories for go files and compiled C extensions are not found, a warning is raised and those variables are set to blank. Otherwise, it would just result in failure on Guile 1.8.x. While testing this for these different Guile versions, I uncovered a small bug in the GUILE_PROGS macro that I will make a patch for in another email (back on the email chain for the relevant bug). Freja Nordsiek On Mon, Mar 13, 2017 at 1:46 PM, Andy Wingo wrote: > On Sun 12 Mar 2017 10:38, Freja Nordsiek writes: > >> Guile provides the GUILE_SITE_DIR Autoconf macro for finding where a >> user should install scheme files, but there are no equivalent macros >> for the directories to put compiled go files and C extensions into. >> The patch adds the equivalent macros to do this for the 2.1.x branch >> (it might work as is for the 2.0.x branch but I haven't tested it), >> which are more or less copy-pastes of the GUILE_SITE_DIR macro. > > The patch looks good. WDYT though about instead extending > GUILE_SITE_DIR to search for the ccache dir and the extension dir and > AC_SUBST them? It would be nice to avoid adding more ceremonial lines > to configure.ac. > > (I really wish I hadn't named it "ccache"; oh well, too late in 2.1.x to > change.) > >> GUILE_SITE_CCACHE_DIR does require an additional entry to be put into >> Guile's pkgconfig file, which I named siteccachedir to fit in with the >> rest. One major issue is that the GUILE_SITE_CCACHE_DIR macro will >> fail for any version of Guile that does not have the new entry in the >> pkgconfig file, which would be all 2.0.x and 2.1.x releases thus far. >> One way around it would be to instead of using pkgconfig for it would >> to instead use the following macro that uses the Guile interpreter >> itself to find the directory (this is more or less the version I use >> in one of my own projects). >> >> AC_DEFUN([GUILE_SITE_CCACHE_DIR], >> [AC_REQUIRE([GUILE_PROGS]) >> AC_MSG_CHECKING([for Guile site-ccache directory]) >> GUILE_SITE_CCACHE=`$GUILE -c "(display (%site-ccache-dir))"` >> if test $? != "0" -o "$GUILE_SITE_CCACHE" = ""; then >> AC_MSG_FAILURE([siteccachedir not found]) >> fi >> AC_MSG_RESULT([$GUILE_SITE_CCACHE]) >> AC_SUBST([GUILE_SITE_CCACHE]) >> ]) > > A fallback sounds good. In that case it would work fine with 2.0. We > can add more paths to the pkg-config file as well, in parallel; it's > better for other build systems. > > Andy --001a11468a98ea1e69054ab15dc6 Content-Type: text/x-patch; charset=US-ASCII; name="0001-Made-GUILE_SITE_DIR-Autoconf-macro-look-for-director.patch" Content-Disposition: attachment; filename="0001-Made-GUILE_SITE_DIR-Autoconf-macro-look-for-director.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_j09m1etk0 RnJvbSA5MGRhZjc5NmM4MjlmOGU0MjJhMjgxZDUwMWY3MTExMzhmMjFhMzM0IE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBGcmVqYSBOb3Jkc2llayA8Zm5vcmRzaWVAZ21haWwuY29tPgpE YXRlOiBUdWUsIDE0IE1hciAyMDE3IDE1OjA0OjM4ICswMTAw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