From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Andy Wingo 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: Mon, 13 Mar 2017 13:46:46 +0100 Message-ID: <878to9s5s9.fsf@pobox.com> References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1489409555 3091 195.159.176.226 (13 Mar 2017 12:52:35 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 13 Mar 2017 12:52:35 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) Cc: guile-devel@gnu.org To: Freja Nordsiek Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Mon Mar 13 13:52:28 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 1cnPSc-0007lR-AJ for guile-devel@m.gmane.org; Mon, 13 Mar 2017 13:52:26 +0100 Original-Received: from localhost ([::1]:51950 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cnPSd-0002Lc-5R for guile-devel@m.gmane.org; Mon, 13 Mar 2017 08:52:27 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57710) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cnPNL-0006DP-PK for guile-devel@gnu.org; Mon, 13 Mar 2017 08:47:00 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cnPNI-0000Bn-Mr for guile-devel@gnu.org; Mon, 13 Mar 2017 08:46:59 -0400 Original-Received: from pb-sasl2.pobox.com ([64.147.108.67]:52381 helo=sasl.smtp.pobox.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cnPNI-0000BX-J0 for guile-devel@gnu.org; Mon, 13 Mar 2017 08:46:56 -0400 Original-Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by pb-sasl2.pobox.com (Postfix) with ESMTP id D343A65A72; Mon, 13 Mar 2017 08:46:54 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=sasl; bh=bXy3lCFAF3q/zveBRrK4Ac6seWg=; b=LErd+F VYCkm+QfVjx0ZbhSfEPfxNr5iwwDcI3OyGIdkfoTEOl0p3+ZtOPVVDTpiTyiD54O jTv+P+LRb8oo1O6dmmCtn6Z2VN/yIBCP3h+sXThPAwiChoasi9GaZSp8H3695k3c ZsbdZRugBwbVOsX27QBM4YtdM5yAR3fCe2SNA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; q=dns; s=sasl; b=X1N4mGX7h4rG4v66hlZigTSzqehMV3Eg AGEyPKT8hBLz7ES6ea4zylP8BNu2qkO7Z6OmOvb9O7K4XIxLpWXIyeoH2SQQHEqM vvViIQfp8wx6DvWMmPE/Vp+AVigvQk1DnOlxjlspelx4wyryecaXl1JNG0s4FA1p wb5eQ/CxTzE= Original-Received: from pb-sasl2.nyi.icgroup.com (unknown [127.0.0.1]) by pb-sasl2.pobox.com (Postfix) with ESMTP id CDBA165A71; Mon, 13 Mar 2017 08:46:54 -0400 (EDT) Original-Received: from clucks (unknown [88.160.190.192]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by pb-sasl2.pobox.com (Postfix) with ESMTPSA id CA00165A70; Mon, 13 Mar 2017 08:46:53 -0400 (EDT) In-Reply-To: (Freja Nordsiek's message of "Sun, 12 Mar 2017 10:38:29 +0100") X-Pobox-Relay-ID: 22D48034-07EB-11E7-8CF1-85AB91A0D1B0-02397024!pb-sasl2.pobox.com X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 64.147.108.67 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:19034 Archived-At: 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