From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Matt Wette Newsgroups: gmane.lisp.guile.user Subject: configuring apps for guile Date: Wed, 12 Feb 2020 05:54:18 -0800 Message-ID: <5f967b74-9704-bd49-de82-97a2f1c665df@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="97793"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 To: guile-user@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Wed Feb 12 14:54:47 2020 Return-path: Envelope-to: guile-user@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1j1sTX-000PE8-GB for guile-user@m.gmane-mx.org; Wed, 12 Feb 2020 14:54:47 +0100 Original-Received: from localhost ([::1]:38234 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j1sTW-0001W0-EG for guile-user@m.gmane-mx.org; Wed, 12 Feb 2020 08:54:46 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40989) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j1sTD-0001LF-G6 for guile-user@gnu.org; Wed, 12 Feb 2020 08:54:31 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j1sT9-0005Tw-6k for guile-user@gnu.org; Wed, 12 Feb 2020 08:54:27 -0500 Original-Received: from mail-pf1-x429.google.com ([2607:f8b0:4864:20::429]:41793) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j1sT9-0005T2-0W for guile-user@gnu.org; Wed, 12 Feb 2020 08:54:23 -0500 Original-Received: by mail-pf1-x429.google.com with SMTP id j9so1278328pfa.8 for ; Wed, 12 Feb 2020 05:54:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=to:from:subject:message-id:date:user-agent:mime-version :content-transfer-encoding:content-language; bh=NtetoKQ/9ilJb0jiykJHXfRLIQU/QObjjz9BUgtxhPY=; b=GdAjIc+0B/xhuvFyzYAa3zUF1rNq9K4hKccsD9XTBdvgn7pDJiSBkHzH5Xy0UzezR/ VV83GtG448OfON40wU893MYcVyBc8/Fv2vj9RNzGEL+efnGJ4OzlykS7d6uTiB8YQmBr NtlX2bFoj4PAcXMuCHwDSHLaWVl13pDKa0DLIqN3s+w1Ks21k+gCVxv1GPkrBurv/aLZ 7K9s5nsRf5+EHLg6gAQQfGX3jiuQVVvSrRw4yxFM/6pKgPTQRquB6YUoUCoyXil7yX44 KPtxdmBJ88T5xT4vz7YnBT4l3HR3Y0l8y9x7CvZ53SS7d/oMiU+EWiydvucbTnjoHGfy 9HGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:from:subject:message-id:date:user-agent :mime-version:content-transfer-encoding:content-language; bh=NtetoKQ/9ilJb0jiykJHXfRLIQU/QObjjz9BUgtxhPY=; b=NHLCusWBx15cqiKVi/u/8pQmCuhEM4ifUaIdyjnTXrqaVVXGNe7efY8Epcxhb3XnF4 SS0OKMm8tSHqTM4DmcPSCtStNXoe0sTgJqfpRj5+eAGvAxKGiW6MMXC5frt9M8oy9QRx +iGe+qpxLxN0zNzbh4c1nm/vZsIa8V20zbM3K2B9IPyf7OcLcRDrY3qBQvVi24oEk/rN b2vIY30OLAYvhYE+PWWGMs4vpYTB0v3+SdDRht5/A3mM9tsOyJIKr18UIixfvevW2ibx 6VgA4bms2kzOjlwHspy4n/5q3aT+9uHBhdyyElqoT8w9fFO6m6Oy2LoEdJ+R8HXr6PuB FrTQ== X-Gm-Message-State: APjAAAVus2GZ8BtlPtZJaSIW9mur4QrrblqhpH5ALNltVhrVHyMZBGPN Z0e8LTr9LZpdG9syaikEdefkSU+G X-Google-Smtp-Source: APXvYqw2fhBvNe8WVIxgwxIwyPj+RD49lZKL6zHedC4/e+s1MgS7F5Sd59cWfEpv7Ae9kWBXylfb/A== X-Received: by 2002:a63:8c18:: with SMTP id m24mr1735934pgd.70.1581515660980; Wed, 12 Feb 2020 05:54:20 -0800 (PST) Original-Received: from [192.168.2.183] (64-52-176-132.championbroadband.com. [64.52.176.132]) by smtp.gmail.com with ESMTPSA id v8sm1040851pff.151.2020.02.12.05.54.19 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 12 Feb 2020 05:54:20 -0800 (PST) Content-Language: en-US X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::429 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Original-Sender: "guile-user" Xref: news.gmane.io gmane.lisp.guile.user:16162 Archived-At: Hi All, Over the last year I have been dealing with issues getting a configure.ac put together for my guile app.  It needs to install .scm and .go files into the place guile expects to see them: (%site-ccache-dir) and %load-path.   If I compile for my ubuntu system then the installed go files need to go in a non-standard place:   /usr/lib/x86_64-linux-gnu/guile/2.2/site-ccache If I compile for the guix context then the expectation is that the files are installed in  $prefix/lib/guile/2.2/site-ccache Here is my solution.  What do you think?  If $prefix is the same as used to build guile then I use the directories from $guile.  Otherwise, I use the default.  This now works on ubuntu and guix. From configure.ac: guile_build_prefix=`$GUILE -c "(display (assq-ref %guile-build-info 'prefix))"` if test "$guile_build_prefix" == "$prefix"; then   echo "using paths for installed guile"   GUILE_SITE_DIR   GUILE_SITE_GO_DIR   GUILE_DATA_DIR else   echo "using default paths for guile"   GUILE_SITE=$prefix/share/guile/site/$GUILE_EFFECTIVE_VERSION GUILE_SITE_GO=$prefix/lib/guile/$GUILE_EFFECTIVE_VERSION/site-ccache   GUILE_DATA=$prefix/share   AC_SUBST([GUILE_SITE])   AC_SUBST([GUILE_SITE_GO])   AC_SUBST([GUILE_DATA]) fi GUILE_SITE_DIR is defined in guile.m4, the others are in my own package m4.